Posted by RobinLinus
Apr 11, 2025/17:37 UTC
In discussing the technicalities of Bitcoin transactions, an important correction is necessary regarding the specific sighash flags used to presign a transaction. Initially, it was mentioned that the appropriate sighash flag combination for a particular transaction signing scenario is SINGLE|NONE
. However, this was incorrect. The correct sighash flags to be used in this context are ANYONECANPAY|NONE
. This adjustment is crucial for anyone working with Bitcoin transactions where selective signing is involved, as the sighash flag dictates how the transaction is signed by indicating which parts of the transaction are signed and which are not.
The use of ANYONECANPAY
allows the signer to specify that they are only signing their own inputs, without regard to any other inputs that might be added to the transaction. This is particularly useful in scenarios where multiple parties are contributing inputs to a single transaction, but each party wants to ensure that their contribution is correctly signed without having to sign for the entire transaction. The NONE
option signifies that no outputs are being signed for, giving further flexibility in constructing transactions that can later have outputs modified or added by others. This correction underscores the importance of understanding the nuanced functionalities provided by Bitcoin's sighash flags, enabling developers to create more flexible and secure transaction protocols.
TLDR
We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project?
Give Feedback