From ff8a36200bc270b574916e00fcc33ce8cdd807cb Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 7 Jan 2020 13:17:13 -0800 Subject: Redefine leaf versions to be incrementally increasing from 0 --- bip-tapscript.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bip-tapscript.mediawiki') diff --git a/bip-tapscript.mediawiki b/bip-tapscript.mediawiki index 759d0d8..120a617 100644 --- a/bip-tapscript.mediawiki +++ b/bip-tapscript.mediawiki @@ -51,7 +51,7 @@ The rules below only apply when validating a transaction input for which all of * The transaction input is a '''segregated witness spend''' (i.e., the scriptPubKey contains a witness program as defined in [https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki BIP141]). * It is a '''taproot spend''' as defined in bip-taproot (i.e., the witness version is 1, the witness program is 32 bytes, and it is not P2SH wrapped). * It is a '''script path spend''' as defined in bip-taproot (i.e., after removing the optional annex from the witness stack, two or more stack elements remain). -* The leaf version is ''0xc0'' (i.e. the first byte of the last witness element after removing the optional annex is ''0xc0'' or ''0xc1'')'''How is the ''0xc0'' constant chosen?''' Following the guidelines in bip-taproot, by choosing a value having the two top bits set, tapscript spends are identifiable even without access to the UTXO being spent., marking it as a '''tapscript spend'''. +* The leaf version is 0 (i.e. the first byte of the last witness element after removing the optional annex is ''0xc0'' or ''0xc1''), marking it as a '''tapscript spend'''. Validation of such inputs must be equivalent to performing the following steps in the specified order. # If the input is invalid due to BIP141 or bip-taproot, fail. -- cgit v1.2.3