Signing CHECKSIG position in Tapscript



Summary:

In this email thread, Russell O'Connor and gmaxwell are discussing potential amendments to the CODESEPARATOR's behavior in Bitcoin's scripting language. The proposed amendment would update an accumulator with a running hash value to ensure that all executed CODESEPARATOR positions are covered by the signature. Gmaxwell suggests using the name "OP_BREADCRUMB" for this new functionality. However, aj cautions against proposing this idea too soon, citing concerns about practical need and whether opcode or sighash flag functionality is more appropriate. Aj also suggests a policy that would allow signatures to cover some function of witness value and proposes a replacement for CODESEPARATOR's behavior that pushes a stack item into the accumulator rather than pushing the CODESEPARATOR position. Aj also notes that the annex may not be general enough to accommodate these changes and proposes committing to a hash of all witness data as a possible solution. They propose an "OP_DATACOMMIT" opcode that pops an element from the stack, does hash_"DataCommit", and later signatures commit to that value. Aj suggests implementing CODESEP at position "x" in the script as equivalent to "DATACOMMIT," but acknowledges that this approach warrants something better. Overall, aj suggests that this proposal needs further exploration before it can be coded into consensus.


Updated on: 2023-05-20T21:09:37.565038+00:00