Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Add option to opt into full-RBF when sending funds #7132
Conversation
luke-jr
and 4 others
commented on an outdated diff
Nov 30, 2015
| @@ -405,6 +405,7 @@ std::string HelpMessage(HelpMessageMode mode) | ||
| strUsage += HelpMessageOpt("-txconfirmtarget=<n>", strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), DEFAULT_TX_CONFIRM_TARGET)); | ||
| strUsage += HelpMessageOpt("-maxtxfee=<amt>", strprintf(_("Maximum total fees (in %s) to use in a single wallet transaction; setting this too low may abort large transactions (default: %s)"), | ||
| CURRENCY_UNIT, FormatMoney(DEFAULT_TRANSACTION_MAXFEE))); | ||
| + strUsage += HelpMessageOpt("-optintofullrbf", strprintf(_("Send transactions with full-RBF opt-in enabled (default: %u)"), DEFAULT_OPT_INTO_FULL_RBF)); |
petertodd
Member
|
|
Wasn't this already closed? |
|
@dcousens The closed version defaulted to opt-in=true. |
jonasschnelli
added
the
Wallet
label
Nov 30, 2015
|
utACK |
ghost
commented
Nov 30, 2015
|
utACK |
|
utACK, but does the wallet actually support the re-creation of a transaction in any sane way? Or is this a political thing? concept ACK only if the wallet actually allows you to re-broadcast a replacement. |
|
@dcousens I suppose it's useful for testing software-- e.g. if you want something that identifies these transactions you need to generate some, if nothing else. Actual replacement will be a non-trivial amount of work. Concept ACK at least... |
Then use
IMHO, then that is what should prefix this flag. Otherwise its just misleading. |
|
Real world use case: Core's wallet is used in day-to-day operation, but occasionally stuck transactions need replacing to get confirmed, which the user then uses an external script for. It's not pretty, but it's a real use case. If it was only needed for testing stuff, I'd say +1 to just telling people to use sendrawtransaction also - or modify the code. |
|
@dcousens I have scripts that do the rebroadcast, and using those scripts is a pain if Bitcoin Core isn't already sending txs with opt-in enabled, allowing those scripts to be used with existing txs. I'm sure we'll have even better support in the future, but this is a trivial first-step. Particularly with the opt-in defaulting to false, I can't see how this is political - we're just making it a little easier to use a feature that we've already merged. |
Sure, concept ACK then.
If you don't accept the above use case as a possibility, then, IMHO, it didn't really serve any other purpose. I didn't personally think people would be mixing scripts and the UI. |
|
Rebased |
|
Just changed this to set nSequence to maxint-2 instead, so that more of the nSequence bits are identical to non-opt-in behavior. This might come in handy if we, for instance, ever implement proof-of-stake blocksize voting and need a default option that matches what most wallets already do. |
|
re-ACK |
|
What do you mean by "100 nSequence bits"? On 2 December 2015 12:32:11 GMT+08:00, Daniel Cousens notifications@github.com wrote:
|
|
|
|
Sorry, I don't see what's the advantage of that; maxint-2 seems simpler. On 2 December 2015 12:38:06 GMT+08:00, Daniel Cousens notifications@github.com wrote:
|
|
@petertodd my understanding is you're expanding the non-opt-in space by 1 to allow for possible future usage. |
|
Oh! That's not at all what I'm doing! This is just the wallet code; I'm changing what txs the wallet produces, not changing the rules for what is considered RBF opt-in. On 2 December 2015 12:43:47 GMT+08:00, Daniel Cousens notifications@github.com wrote:
|
|
@petertodd my bad. Lost context. On that note then, why not |
|
@dcousens Because of #7132 (comment) Remember that all we need is for all users' to be using the same nSequence number for a given type of tx; for privacy the common standard is what matters, not exactly what number we pick. |
|
Sure. |
laanwj
added
the
Feature
label
Dec 3, 2015
jonasschnelli
referenced this pull request
Dec 17, 2015
Merged
RPC: Indicate which transactions are signaling opt-in RBF #7222
|
Concept ACK |
|
Tend to NACK. I think base work for this (starting with rawtx command) could be #7159. |
laanwj
added this to the 0.13.0 milestone
Apr 1, 2016
|
Agree with @jonasschnelli here, a global option is too coarse, need a way to have control over this per transaction. |
laanwj
removed this from the 0.13.0 milestone
Apr 25, 2016
|
Why not both? On 25 April 2016 05:43:48 GMT-04:00, "Wladimir J. van der Laan" notifications@github.com wrote:
|
|
Especially as it's aimed at third-party scripts it is better if those scripts can specify the option, without requiring the user to change yet another option before they can be used. |
|
Rebased |
|
needs rebase |
|
@arowser can you stop posting "Can one of the admins verify this patch?" in every pull, this is annoying and completely redundant. You can help by reviewing or testing the code. |
|
Rebased |
|
Would this work with further nit: anything "optin" will become "optout" if the default changes, so perhaps: "sendfullrbf"? Makes it clearer it's about sending, not mempool replacement. concept ACK, I'd really like something for 0.13. |
jtimon
commented on the diff
Jun 17, 2016
| BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins) | ||
| txNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second,CScript(), | ||
| - std::numeric_limits<unsigned int>::max()-1)); | ||
| + std::numeric_limits<unsigned int>::max() - (fOptIntoFullRbf ? 2 : 1))); |
instagibbs
Member
|
added a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Jun 28, 2016
|
Is there anything blocking this? (besides needing rebase again, sorry) |
|
Concept ACK. Needs rebase. |
laanwj
referenced this pull request
Aug 26, 2016
Merged
Add option to opt into full-RBF when sending funds (rebase, original by petertodd) #8601
|
Closing in favor of #8601 |
petertodd commentedNov 30, 2015
Useful for anyone using third-party scripts to make use of RBF functionality.
Defaults to sending txs with full-RBF off.