forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
BIP118 states:
- Extension:
- If ''hash_type & 0xc0'' is not
SIGHASH_ANYPREVOUTANYSCRIPT:
- ''tapleaf_hash'' (32): the tapleaf hash as defined in BIP 341
- ''key_version'' (1): a constant value ''0x01'' representing that this is a signature for a BIP 118 public key.
- ''codesep_pos'' (4): the opcode position of the last executed
OP_CODESEPARATORbefore the currently executed signature opcode, with the value in little endian (or ''0xffffffff'' if none executed). The first opcode in a script has a position of 0. A multi-byte push opcode is counted as one opcode, regardless of the size of data being pushed.
However the "codesep_pos" is itself a weak commitment to the Script spent. I think "codesep_pos" should not be committed if the hash type is SIGHASH_ANYPREVOUTANYSCRIPT?
Reactions are currently unavailable