Document RBF settings #9232

issue unsystemizer opened this issue on November 28, 2016
  1. unsystemizer commented at 8:22 AM on November 28, 2016: contributor

    v0.13.1. I've been trying to figure out how RBF works and at first, I couldn't find the settings in the docs. Once I gathered these from the source, I couldn't get it to work (still get that txn-mempool-conflict (code -26)).

    Because I can't get this to work, I can't create a doco PR myself, but I'd like to see the following documented:

    • what options need to be added to bitcoin.conf
    • is that enough or are any per-tx parameters required as well (I couldn't find any)
  2. fanquake added the label Docs and Output on Nov 28, 2016
  3. achow101 commented at 1:23 PM on November 28, 2016: member

    IIRC nothing needs to be added to the bitcoin.conf file as opt-in RBF should already be enabled by default.

    To send a transaction that signals opt-in RBF, at least one input's sequence number must be less than MAX_INT.

  4. MarcoFalke commented at 1:28 PM on November 28, 2016: member

    @unsystemizer Can you provide exact step to reproduce the txn-mempool-conflict? Also, you might want to enable the option added in #8601 to opt-in with the wallet.

  5. unsystemizer commented at 2:37 PM on November 28, 2016: contributor

    Yes I can, but that's not really why I've created this issue. What I want is that once the docs or manpages are improved, noone who RTFM will end up asking what settings have to be enabled for this to work. Put another way, IMO https://github.com/bitcoin/bitcoin/search?utf8=%E2%9C%93&q=walletrbf should contain at least one Markdown or text result, but there are none. One shouldn't need to go thru C++ code to figure this out.

    Now, to answer your question: I enabled walletrbf as well as the other one which you didn't mention (mempoolreplacement) and restarted. First I created 2 "same" send tx from the same address, one with a 0 miner fee, one with a non-0 miner fee (216 bytes, 0.00015 BTC, on testnet) and then I sent them in that order using debug console. The 2nd one failed with the above mentioned error. But again, I am not looking for help on how to make this work, but for the settings to be documented somewhere (https://github.com/bitcoin/bitcoin/tree/master/doc/man or wherever appropriate). Once it's documented, I'll read the docs and make it work. @achow101- https://github.com/bitcoin/bitcoin/blob/0.13/doc/release-notes/release-notes-0.12.0.md says mempoolreplacement=0, implying by default it is off. I know this is for v0.12, but I didn't find any updates regarding this in a later version, so unless 0 means yes here, something needs to be changed/enabled for RBF to work.... I have mempoolreplacement=1.

  6. achow101 commented at 2:50 PM on November 28, 2016: member

    @unsystemizer the release notes say

    Transaction replacement can be disabled with a new command line option, '-mempoolreplacement=0'.

    That implies that transaction replacement is already enabled by default and command to disable is the given onee.

  7. unsystemizer commented at 3:03 PM on November 28, 2016: contributor

    Okay. I tried without mempoolreplacement in the config file as well, also got the same error. So likely my transactions weren't correct.

    To send a transaction that signals opt-in RBF, at least one input's sequence number must be less than MAX_INT.

    My input sequence number is identical in the both transactions. Is there an explorer example or a unit test that we can reference?

    Back to this topic of docs: I just did bitcoind -help one more time and had another look, and there's no mempoolreplacement or walletrdf in the output. Do you agree that these options should be documented as other defaults are?

  8. achow101 commented at 3:11 PM on November 28, 2016: member

    My input sequence number is identical in the both transactions. Is there an example or a unit test of for this that we can reference?

    BIP 125: https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki documents what needs to be done.

    RBF tests are available at https://github.com/bitcoin/bitcoin/blob/master/qa/rpc-tests/replace-by-fee.py

    Back to this topic of docs: I just did bitcoind -help one more time and had another look, and there's no mempoolreplacement or walletrdf in the output. Do you agree that these options should be documented as other defaults are?

    Look more closely, under Node relay options. Here it is in the code: https://github.com/bitcoin/bitcoin/blob/master/src/init.cpp#L468

    It would probably be a good idea to document all default node policy behavior. I will write those.

  9. luke-jr commented at 6:56 PM on November 28, 2016: member

    mempoolreplacement only controls node acceptance of BIP-125 RBF transactions, it has no influence on the wallet.

    walletrbf causes the wallet to set the flag, but is not supported by any released version of Bitcoin Core. (it is, however, supported by Bitcoin Knots since v0.12.0)

  10. MarcoFalke commented at 3:23 PM on December 25, 2017: member

    v0.13.1.

    According to 37ac67816afbefe88806e0325b8d3719c411183e this option was added in 0.14.0

  11. MarcoFalke closed this on Dec 25, 2017

  12. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me