![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
이것은 심층적 인 고장에 대한 성숙의 시점에 도달 한 개별 언약 제안에 대한 시리즈의 다섯 번째 기사입니다.
This is the fifth article in a series deep diving into individual covenant proposals that have reached a point of maturity meriting an in-depth breakdown.
이것은 심층적 인 고장에 대한 성숙의 시점에 도달 한 개별 언약 제안에 대한 시리즈의 다섯 번째 기사입니다.
OP_CAT, put forward for reactivation in tapscript by Ethan Heilman and Armin Sabouri in BIP 347, is not a covenant. It was an opcode that was originally included in the first release of Bitcoin for manipulating data elements on the stack. It was deactivated in 2010 with the release of Bitcoin 0.3.10 along with a number of other opcodes due to concerns of denial of service attacks that could crash nodes. A global maximum limit of 520 bytes for any individual item on the stack while executing a script was also added.
OP_CAT는 BIP 347의 Ethan Heilman과 Armin Sabouri에 의한 tapscript에서 재 활성화를위한 전제는 언약이 아닙니다. 스택에서 데이터 요소를 조작하기 위해 Bitcoin의 첫 번째 릴리스에 원래 포함 된 Opcode였습니다. 2010 년에 비트 코인 0.3.10이 출시되면서 노드를 충돌시킬 수있는 서비스 거부 공격에 대한 우려로 인해 비활성화되었습니다. 스크립트를 실행하는 동안 스택의 모든 개별 항목에 대해 520 바이트의 전역 최대 한계가 추가되었습니다.
You should already have a basic understanding of how script evaluation on the stack works, and the basic pieces of a bitcoin transaction, so there isn’t really much pre-requisite explaining necessary for OP_CAT.
스택에 대한 스크립트 평가가 어떻게 작동하는지에 대한 기본적인 이해와 비트 코인 트랜잭션의 기본 부분에 대한 기본적인 이해가 있어야하므로 OP_CAT에 필요한 사전 수준의 설명은 많지 않습니다.
While OP_CAT may not be a covenant in and of itself, it can emulate covenants due to a quirk in how Schnorr signatures work. This is a pretty in depth topic, fully explained here by Andrew Poelstra from Blockstream, so I’ll just stick with a high level view. Every elliptic curve has a generator point, which is essentially “0”, that is used in the elliptic curve math for key generation and signing. With Schnorr, you can sign using the generator point as a key, and give or take a few bytes that you have to sign repeatedly to get right, the resulting signature is actually the same hash of the transaction you signed.
OP_CAT는 그 자체로 언약이 아닐 수도 있지만, Schnorr 서명의 작동 방식에 대한 기발로 인해 계약을 모방 할 수 있습니다. 이것은 Blockstream의 Andrew Poelstra가 여기에서 완전히 설명한 깊이있는 주제이므로 높은 수준의 시야를 고수하겠습니다. 모든 타원 곡선에는 주요 생성 및 서명을 위해 타원 곡선 수학에 사용되는 발전기 포인트가 있습니다. Schnorr를 사용하면 발전기 지점을 키로 사용하여 서명 할 수 있으며, 오른쪽으로 서명 해야하는 몇 바이트를 주거나 가져갈 수 있습니다. 결과 서명은 실제로 서명 한 트랜잭션의 해시입니다.
Set aside the mechanics of how that works mathematically for now, and just remember for later that these “weird” signatures allow you to get the current transactions TXID on the stack.
지금은 수학적으로 어떻게 작동하는지에 대한 메커니즘을 제쳐두고 나중에이“이상한”서명을 통해 현재 트랜잭션 TXID를 스택에서 얻을 수 있음을 기억하십시오.
How OP_CAT Works
OP_CAT의 작동 방식
OP_CAT takes the top two data items on the stack and concatenates them together. So if the top two items on the stack are “1” and “2”, OP_CAT removes both of them and then puts “12” on top of the stack. That’s it.
OP_CAT는 스택에서 상위 두 개의 데이터 항목을 가져 와서 함께 연결합니다. 따라서 스택의 상단 두 항목이 "1"과 "2"인 경우 OP_CAT는 두 가지를 모두 제거한 다음 스택 위에 "12"를 넣습니다. 그게 다야.
What Is OP_CAT Useful For
OP_CAT에 유용한 것은 무엇입니까?
Okay, so what’s the big deal? Why is everyone freaking out about OP_CAT even though it’s so simple the explanation of how it works didn’t even take a full paragraph to write.
좋아, 그럼 큰 문제는 무엇입니까? 왜 모든 사람들이 OP_CAT에 대해 놀라게 하는가?
Two reasons, although given the nature of OP_CAT I can give no guarantees these are the only two reasons. OP_CAT allows the construction and verification of merkle trees directly on the stack, which opens the door to some interesting behavior and functionality. It also allows emulation of covenants enabling full granular introspection due to the “weird” Schnorr signatures mentioned above.
두 가지 이유, OP_CAT의 본질을 감안할 때 나는 이것이 유일한 두 가지 이유라고 보장 할 수 없습니다. OP_CAT는 스택에 직접 머클 트리의 구조 및 검증을 허용하여 흥미로운 행동과 기능의 문을 열어줍니다. 또한 위에서 언급 한 "이상한"슈 노르 서명으로 인해 완전한 세분화 된 내성을 가능하게하는 계약의 에뮬레이션을 허용합니다.
Merkle proof verification is a key component of Taproot, but the way it is implemented merkle tree verification only occurs in the context of verifying that a tapscript spending path is committed to in the root Schnorr public key in the output script of the coin being spent. Taproot does not support generic merkle proof verification.
Merkle Proof Verification은 TapRoot의 핵심 구성 요소이지만, Merkle Tree Verification이 구현되는 방식은 동전의 출력 스크립트에서 TAPSCRIP 지출 경로가 Root Schnorr 공개 키에서 저지른지 확인하는 맥락에서만 발생합니다. TapRoot는 일반적인 머클 증거 검증을 지원하지 않습니다.
OP_CAT allows this in a totally generic manner. Simply providing the leaf hash(es) and then interior hash nodes in the right order and calling OP_CAT successively will allow you to reconstruct a merkle root hash, and compare against a pre-defined hash in the script. You could do this to provide unilateral withdrawal paths for shared UTXOs like in CatVM, you could make transactions dependent on other transactions having been included in a block with valid work, you can make a transaction dependent on pretty much any condition that can be verified with a merkle proof.
OP_CAT는 이것을 완전히 일반적인 방식으로 허용합니다. 잎 해시 (ES)를 제공 한 다음 올바른 순서로 내부 해시 노드를 제공하고 OP_CAT를 연속적으로 호출하면 머클 루트 해시를 재구성하고 스크립트에서 사전 정의 된 해시와 비교할 수 있습니다. CATVM과 같은 공유 UTXO에 대한 일방적 인 철회 경로를 제공하기 위해이를 수행 할 수 있습니다. 유효한 작업이있는 블록에 포함 된 다른 거래에 의존 할 수 있으므로, 트랜잭션을 메르클 증명으로 검증 할 수있는 거의 모든 조건에 따라 거래를 할 수 있습니다.
Now, for the covenant emulation that enables full introspection. What you are trying to do is ensure that a transaction has to have certain characteristics to be valid. Remember now that the “weird” signature gets the hash of the transaction on the stack. A transaction signature isn’t actually done over the raw transaction, it’s done over its hash. This allows us to do something interesting.
이제 완전한 내성을 가능하게하는 언약 에뮬레이션을 위해. 당신이하려고하는 것은 거래가 특정 특성을 유효 해야하는지 확인하는 것입니다. "이상한"서명이 스택에서 트랜잭션의 해시를 얻는다는 것을 기억하십시오. 트랜잭션 서명은 실제로 원시 거래를 통해 수행되지 않으며 해시를 통해 수행됩니다. 이것은 우리가 흥미로운 일을 할 수있게합니다.
You can construct very complicated and convoluted scripts using OP_CAT to take the individual raw pieces of the transaction as part of the witness, and slowly put them together on the
OP_CAT를 사용하여 매우 복잡하고 복잡한 스크립트를 구성하여 증인의 일부로 거래의 개별 원시 조각을 가져 와서 천천히 함께 모을 수 있습니다.
부인 성명:info@kdj.com
제공된 정보는 거래 조언이 아닙니다. kdj.com은 이 기사에 제공된 정보를 기반으로 이루어진 투자에 대해 어떠한 책임도 지지 않습니다. 암호화폐는 변동성이 매우 높으므로 철저한 조사 후 신중하게 투자하는 것이 좋습니다!
본 웹사이트에 사용된 내용이 귀하의 저작권을 침해한다고 판단되는 경우, 즉시 당사(info@kdj.com)로 연락주시면 즉시 삭제하도록 하겠습니다.