Fix RBF nsequence: canonical value, all inputs#12
Open
bc1cindy wants to merge 2 commits into
Open
Conversation
0x01 signals opt-in RBF but also sets a BIP-68 relative timelock of 1 block, which is unintended. It is also an abnormal value that fingerprints the wallet on-chain, which is harmful in collaborative settings like payjoin. Most wallets use 0xFFFFFFFD to opt into RBF without imposing a timelock.
Setting the sequence only on inputs[0] leaves the remaining inputs at 0xFFFFFFFF, producing a mixed pattern that itself fingerprints the wallet. Applying it to every input keeps nsequence uniform within the transaction. The same bug existed in both builders.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0x01signals opt-in RBF, but on v2 txs it also sets a BIP-68 relative timelock of 1 block (unintended), and it's an abnormal value that fingerprints the wallet on-chain, harmful in collaborative settings like payjoin. It was also applied only toinputs[0], leaving a mixed[0x01, MAX, …]pattern that fingerprints too.use the canonical
0xFFFFFFFD(ENABLE_RBF_NO_LOCKTIME) and apply it to every input, in both builders.ref: payjoin/rust-payjoin#1597