Safer sighashes and more granular SIGHASH_NOINPUT



Summary:

In a Bitcoin-dev discussion, Russell O'Connor proposed signing the actual weight of a transaction instead of an upper bound on the weight. Anthony Towns suggested to assume every signature is 65 witness bytes and just be grateful for the prioritisation benefit if someone chooses a shorter signature. The proposal to sign the weight commits to the feerate and hence transaction priority, and it's reasonable to target the lower bound feerate because the potential loss is only that you get a higher feerate and would have saved "0.8%" on f if you'd been able to be 100% sure of that. Signing an upper bound requires specifying that upper bound somewhere in the transaction, which is not possible since sneaky places to stash that data are out. Committing to a minimum feerate seems more useful as it applies for ANYONECANPAY crowd-funding type transactions.


Updated on: 2023-05-20T18:03:59.441600+00:00