-
Notifications
You must be signed in to change notification settings - Fork 38.7k
[RPC] Add RBF opt-in possibilities to rawtx functions #7159
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
Conversation
|
Perhaps just parameterize the setting of |
src/rpcrawtransaction.cpp
Outdated
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.
Typo "with height fees"
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.
Sorry.. meant to be "higher fees". Will fix.
|
I tend to agree with @dcousens, maybe this is slightly more 'user friendly', but allowing setting the underlying values is more in the spirit of raw transaction usage. |
For For
Right. There I guess instead of a RFB opt-in we could offer a easy way to set the nSequence number per input. |
|
Sure, for |
|
Don't extend createrawtransaction without also extending bitcoin-tx -- that's the preferred place for pure function work unconnected to wallet. |
|
Anti-sniping (which I think createrawtransaction should do by default) is an argument against bitcoin-tx; even absent that: the complete application of createrawtransaction is not pure function-- you had to get the txids for the coins from somewhere... but sure this should have parity in bitcoin-tx. I think createrawtransaction should gain the ability to manually set sequences per input. No more parameters are needed: just add "seq" to the dictionary that takes the vin/txid fields now. I don't see any harm in having a replacable flag that sets the default sequence to MAX-2. |
It's not an argument against bitcoin-tx. A program can get the current block number from anywhere and pass it to |
|
IIRC I agree with @jgarzik that bitcoin-tx should also support nSequence and/or RBF opt-in. I check now if it makes sense to extend bitcoin-tx within this PR (or if it require to much work in terms or parameter parsing and syntax). |
34bbc8c to
f84a91b
Compare
|
Added two bitcoin-tx related commits.
|
Are you going to add this? I think its a good idea. |
d999afe to
7c73bba
Compare
Rebased & added a commit that allows to set the sequence per input when using |
|
@jonasschnelli what is the syntax OOI? (haven't had a chance to read the impl. yet) |
|
@dcousens: The inputs object in |
src/rpcrawtransaction.cpp
Outdated
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.
This really isn't necessary, the RBF rules are very clear such that if sequence is specified at all (aka, < 0xffffffff - 2?), then it will be used.
Its as much work by the user to just add the sequence field per input, so we could just omit this opt-in RBF parameter entirely.
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.
It would also be less confusing what rbfOptIn does in a context of it being disabled on the CLI.
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.
But is setting all inputs sequence to INT-MAX-2 an adequate API for creating a transaction that is suitable for RBF? IMO a clear Boolean should be preferred.
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.
But is setting all inputs sequence to INT-MAX-2 an adequate API for creating a transaction that is suitable for RBF?
IMHO, yes.
|
Here again the API changes: API changes: createrawtransaction [{\"txid\":\"id\",\"vout\":n, \"sequence\":},...]
{\"address\":amount,\"data\":\"hex\",...} ( locktime ) ( opt into Replace-By-Fee )[bool]
fundrawtransaction \"hexstring\" ( includeWatching ) ( opt into Replace-By-Fee )[bool] Bitcoin-Tx in=TXID:VOUT(:SEQUENCE_NUMBER) rbfoptin(=N) Set RBF opt-in sequence number for input N (if not provided, opt-in all available inputs Thanks for reviews. |
This will allow to add flags for RBF and other features Github-Pull: bitcoin#7159 Rebased-From: cde33d3
Github-Pull: bitcoin#7159 Rebased-From: aeaabd6
Github-Pull: bitcoin#7159 Rebased-From: 3e21c66
Github-Pull: bitcoin#7159 Rebased-From: 00c31dc
Github-Pull: bitcoin#7159 Rebased-From: 475128a
Github-Pull: bitcoin#7159 Rebased-From: cbf2d56
Github-Pull: bitcoin#7159 Rebased-From: e17853f
… input Github-Pull: bitcoin#7159 Rebased-From: 7c73bba
This will allow to add flags for RBF and other features
7c73bba to
b64ebaf
Compare
|
Rebased. IMO the |
|
ut ACK |
|
Closing in favor of #7865. |
This allows to opt into RBF over the RPCs
createrawtransaction(wallet-less) andfundrawtransaction(requires wallet).API changes:
createrawtransaction [{\"txid\":\"id\",\"vout\":n, \"sequence\":},...] {\"address\":amount,\"data\":\"hex\",...} ( locktime ) ( opt into Replace-By-Fee )[bool]Bitcoin-Tx