-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(wallet)!: enable RBF by default on TxBuilder #1616
feat(wallet)!: enable RBF by default on TxBuilder #1616
Conversation
Thanks for working on this @luisschwab |
I am inclined to think everyone with production applications will have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a slightly different take but I think we agree on the end goal of making RBF the default for new transactions. I think the place to address it is by fixing the logic in create_tx
to first check the value of requirements.csv
, then allow any Sequence value passed in by the user, or else fall back to the new default ENABLE_RBF_NO_LOCKTIME
(0xFFFFFFFD). To make it simple RbfValue
should implement Default but maybe not strictly necessary.
Instead of disable_rbf
I think we should have a method nsequence
that accepts a Sequence
and internally sets the rbf
value. If we go this way, it's likely we'd then have to remove the error CreateTxError::RbfSequence
that tries to stop you from setting an rbf value too high. Let me know what you think.
I added this to the 1.0.0-beta milestone since it's an breaking API change that should be done for 1.0. |
How's it going on this @luisschwab ? I hope we didn't derail progress too much with the previous discussion. I like that you made an effort not to change the existing API - for what it's worth, the bdk team had a talk and determined that if we're going to break the API as it relates to enabling RBF then it's better to do it now while still in beta. While the implementation here looks correct I'd prefer that we get the API sorted out rather than postpone it. After thinking more about it I want to update my suggestion to instead change the TxParams |
Sorry, I've been busy these last few days, but will resume work on this later today. Yes, since we're still in beta it's best to get it right rather than breaking the API later. |
@ValuedMammal I agree with your thinking. |
Sounds good, I'll update the PR taking this into consideration. |
@luisschwab how is progress on this so far? Do you need a hand with this? |
ff0a0a2
to
7b9a3f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to fix the formatting checks caught by CI, and also I left a few comments that I wonder if you or anyone has an opinion on.
7b9a3f4
to
8910189
Compare
Forgot to rename some things. |
668bb82
to
eb1a248
Compare
Rebased due to 519728c |
eb1a248
to
f6fa15e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-added test and squashed commits. |
f6fa15e
to
f15551b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK f15551b
Looks good!
Description
Closes #791
This PR enables RBF by default on
TxBuilder
Notes to the reviewers
Changelog notice
rbf
becomessequence
set_exact_sequence()
, so the user can define an arbitrary sequence valuen_sequence
now defaults to0xFFFFFFFD
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
Bugfixes: