[BIP draft] Consensus-enforced transaction replacement signalled via sequence numbers



Summary:

Mark Friedenbach has proposed a soft-fork change to the consensus-enforced behaviour of sequence numbers for transaction replacement via per-input relative lock-times. He has written a reference implementation and BIP draft for the same, which can be found at https://gist.github.com/maaku/be15629fe64618b14f5a and https://github.com/maaku/bitcoin/tree/sequencenumbers respectively. The proposal makes use of the full range of 32-bit sequence number which until now has rarely been used for anything other than boolean control over absolute nLockTime. It does so in a way that is semantically compatible with the originally envisioned use of sequence numbers for fast mempool transaction replacement. However, external constraints often prevent the full range of sequence numbers from being used when interpreted as a relative lock-time and re-purposing nSequence as a relative lock-time precludes its use in other contexts. This problem has been addressed partially by having relative lock-time semantics enforced only if the most-significant bit of nSequence is set, preserving 31 bits for alternative use when relative lock-times are not required. Mark Friedenbach has requested the BIP editor to assign a BIP number for this work.


Updated on: 2023-06-09T22:08:33.878989+00:00