BIP 125: Opt-in Full Replace-by-Fee Signaling #261

pull harding wants to merge 1 commits into bitcoin:master from harding:opt-in-full-rbf changing 2 files +193 −0
  1. harding commented at 5:04 PM on December 11, 2015: contributor

    @petertodd and I present the following proposed BIP describing opt-in full-RBF signaling, as requested in the 2015-12-03 bitcoin-dev IRC meeting.

    Opt-in full-RBF has previously been discussed on the mailing list and support for it has been added to Bitcoin Core, so I humbly request the assignment of a BIP number from the BIP editor, @gmaxwell.

    Upon receipt of the number assignment and fixing any initial issues found with this proposed text, I will post a copy of this BIP to the mailing list for interested developers to read.

  2. Add opt-in full-RBF signaling BIP b57eea446c
  3. sdaftuar commented at 5:19 PM on December 11, 2015: member

    Thanks for writing this up! This looks good to me. @petertodd How should wallet authors be checking if a new transaction has an ancestor that has signaled RBF? That seems like something we ought to expose more easily via RPC somehow, perhaps?

  4. in bip-opt-in-rbf.mediawiki:None in b57eea446c
     145 | +
     146 | +There are no known problematic interactions between opt-in full-RBF and
     147 | +other uses of nSequence. Specifically, opt-in full-RBF is compatible
     148 | +with consensus-enforced locktime as provided in the Bitcoin 0.1
     149 | +implementation, draft BIP68 (Relative lock-time using consensus-enforced
     150 | +sequence numbers), and draft BIP112 (CHECKSEQUENCEVERIFY).
    


    amacneil commented at 5:55 PM on December 11, 2015:

    Perhaps add a clarification that all BIP68/BIP112 transactions will by definition now be opting into RBF?


    dabura667 commented at 3:08 AM on December 13, 2015:

    nSequence of 0xfffffffe will not opt-in to RBF but will still be valid for BIP68/BIP112 (as it is not 0xffffffff)


    sdaftuar commented at 3:03 PM on December 17, 2015:

    @dabura667 If the leading bit is set, then that disables BIP68 semantics for nSequence. So anything that is using BIP68 necessarily has a 0 in the leading bit and therefore will also be opting-in to RBF.


    petertodd commented at 12:31 PM on December 18, 2015:

    @sdaftuar BIP68 doesn't exist yet... As part of the soft-fork, the opt-in conditions for RBF can be modified if there's demand to do so.


    sdaftuar commented at 1:20 PM on December 18, 2015:

    Fwiw I wasn't trying to imply any need to change; the behavior seems reasonable to me as-is (including taking into account the draft BIPs).

  5. in bip-opt-in-rbf.mediawiki:None in b57eea446c
      19 | +that they want to be able to replace that transaction in the future.
      20 | +In response to this signal,
      21 | +
      22 | +* Nodes may allow transactions containing this signal to be replaced in their mempools.
      23 | +
      24 | +* The recipient or recipients of a transaction containing this signal may choose not to treat it as payment until it has been confirmed, eliminating the risk that the spender will use allowed replacements to defraud them.
    


    luke-jr commented at 6:56 AM on December 12, 2015:

    This erroneously implies non-signalling transactions are significantly safer.


    harding commented at 1:42 PM on December 12, 2015:

    @luke-jr I don't think it implies that, but I agree that it doesn't stop people from making that inference. And why should it? There seem to be plenty of people who do think non-replaceable transactions are safer than replaceable transactions, and the purpose of this document isn't to challenge their preconceptions but rather to inform them about a new policy which will make creating transaction replacements easier.


    petertodd commented at 12:32 PM on December 18, 2015:

    Agreed - it's not acceptable to give the impression that non-signalling txs are any safer.

    In fact, I think it'd be good if we make it clear that opt-in RBF was created for political reasons, not technical.


    voisine commented at 1:01 AM on December 19, 2015:

    Non-signalling txs can potentially be safer. With non-signaling tx you potentially only need to trust miners not to reverse them if you can get miners to report that they've accepted them. With RBF, you must trust the signer not to reverse them while they remain unconfirmed. That's a technical difference.


    petertodd commented at 5:45 PM on December 19, 2015:

    Miners are not in a position where they can provide those kinds of guarantees in a decentralized environment, and we should not be encouraging it.


    voisine commented at 5:54 PM on December 19, 2015:

    What about by broadcasting partial block solutions? This is a decentralized way to indicate how much hashing power is being expended attempting to mine any given transaction.


    petertodd commented at 6:06 PM on December 19, 2015:

    There aren't any incentive compatible partial block proposals yet; not relevant to the current ecosystem.

    On 19 December 2015 09:54:25 GMT-08:00, Aaron Voisine notifications@github.com wrote:

    • +==Abstract==
    • +Many nodes today will not replace any transaction in their mempool with +another transaction that spends the same inputs, making it difficult for +spenders to adjust their previously-sent transactions to deal with +unexpected confirmation delays or to perform other useful replacements.
    • +The opt-in full Replace-by-Fee (opt-in full-RBF) signaling policy +described here allows spenders to add a signal to a transaction indicating +that they want to be able to replace that transaction in the future. +In response to this signal,
    • +* Nodes may allow transactions containing this signal to be replaced in their mempools.
    • +* The recipient or recipients of a transaction containing this signal may choose not to treat it as payment until it has been confirmed, eliminating the risk that the spender will use allowed replacements to defraud them.

    What about by broadcasting partial block solutions? This is a decentralized way to indicate how much hashing power is being expended attempting to mine any given transaction.


    Reply to this email directly or view it on GitHub: https://github.com/bitcoin/bips/pull/261/files#r48095057


    voisine commented at 1:53 AM on December 20, 2015:

    The cost is close to zero. If it's built into bitcoin-core and other mining software, then we have an incentive compatible solution since it would take additional effort to disable it. It's relevant to the RBF discussion, since RBF transactions preclude any future improvements to 0-conf safety that would make them practical in more situations.

  6. in bip-opt-in-rbf.mediawiki:None in b57eea446c
      23 | +
      24 | +* The recipient or recipients of a transaction containing this signal may choose not to treat it as payment until it has been confirmed, eliminating the risk that the spender will use allowed replacements to defraud them.
      25 | +
      26 | +Nodes and recipients may continue to treat transactions without the
      27 | +signal the same way they treated them before, preserving the existing
      28 | +status quo.
    


    luke-jr commented at 6:57 AM on December 12, 2015:

    They may also opt not to.


    harding commented at 1:43 PM on December 12, 2015:

    Agreed; I think that's implied by the word "may" on line 26. Is there a specific text change you're advocating for here?

  7. in bip-opt-in-rbf.mediawiki:None in b57eea446c
      66 | +data about unconfirmed transactions to automated systems should consider
      67 | +doing one of the following:
      68 | +
      69 | +# Conveying additional suspicion about opt-in full-RBF transactions to the user or data consumer.
      70 | +
      71 | +# Ignoring the opt-in transaction until it has been confirmed.
    


    luke-jr commented at 6:59 AM on December 12, 2015:

    IMO wallets should not treat these any differently.


    harding commented at 2:08 PM on December 12, 2015:

    I think the UX is really hard here. Unconfirmed transactions of any kind are insecure compared to even 1-conf transactions, however because most users mostly deal with reliable partners, they will only rarely ever have a transaction fail to confirm---so they are lulled into a false belief that unconfirmed transactions are fundamentally reliable.

    Although I don't think opt-in full-RBF doesn't significantly changes the dynamics for serious double spenders, it does make it possible for people with less technical knowledge and fewer resources to execute successful double spends. That's a change from the current status quo, and I think it should be communicated to users.

    However, I agree that we don't want to imply that wallets must do anything differently. If there's a phrasing change you have in mind, perhaps changing "should consider" to "may want to consider", I'd be happy to hear it.


    voisine commented at 7:06 PM on December 12, 2015:

    @luke-jr Double-spending a non-RBF transaction (lets say with all inputs confirmed) does require more resources and is less likely to succeed than with RBF, wouldn't you agree? And if miners and pools in future were to communicate which transactions they have accepted into their block templates, and/or broadcast partial block solutions proving they've expended hashing power attempting to mine them, that would raise the cost and difficulty of a successful 0-conf double-spend even further.

    I think we can solve the problem of 0-conf security well enough to make it practical for the majority of typical use cases.


    luke-jr commented at 8:19 PM on December 12, 2015:

    @harding That still sounds too much like a recommendation. @voisine It doesn't require more resources, and isn't much less likely to succeed if you do it right.


    voisine commented at 9:03 PM on December 12, 2015:

    @luke-jr to double spend a 0-conf with a high rate of success, you would need to broadcast your double spend directly to a large portion of hashing power while simultaneously getting the legitimate tx to the victim. If we assume the victim is listening to random nodes on the network, then this does seem to have a not-insignificantly lower chance of success than with RBF. Please disabuse me of this notion if I'm missing something. We want to accurately communicate the risks while keeping the user experience competitive with other payment methods to the greatest extent possible.


    luke-jr commented at 9:35 PM on December 12, 2015:

    If we assume the victim is listening to random nodes on the network,

    This assumption does not usually hold. Furthermore, the legitimate tx could be tiny and quick to propagate the non-mining nodes, while the miners could receive large transactions that are slow to move beyond them.

    Additionally, you are assuming a naive case of legitimate-vs-fraud competition. If an attacker simply spends the same coins with N merchants at once, all N transactions are legitimate and N-1 are guaranteed to lose out.

  8. in bip-opt-in-rbf.mediawiki:None in b57eea446c
     153 | +
     154 | +Now, and since Bitcoin's first release, 100% of the network hash rate
     155 | +mines transactions using opt-in full-RBF semantics (sequence less than
     156 | +(0xffffffff - 1)).
     157 | +
     158 | +Opt-in full-RBF as a default mempool replacement policy among nodes
    


    luke-jr commented at 7:04 AM on December 12, 2015:

    Perhaps this ought to mention how nodes can disable the signalling (either to never-RBF or always-RBF)?

  9. luke-jr added the label New BIP on Dec 12, 2015
  10. luke-jr added the label Needs number assignment on Dec 12, 2015
  11. luke-jr assigned gmaxwell on Dec 12, 2015
  12. luke-jr unassigned gmaxwell on Jan 8, 2016
  13. luke-jr assigned luke-jr on Jan 8, 2016
  14. luke-jr renamed this:
    Add opt-in full-RBF signaling BIP
    BIP 125: Opt-in Full Replace-by-Fee Signaling
    on Jan 8, 2016
  15. luke-jr removed the label Needs number assignment on Jan 8, 2016
  16. luke-jr merged this on Jan 8, 2016
  17. luke-jr closed this on Jan 8, 2016

  18. luke-jr referenced this in commit c93cd75d88 on Jan 20, 2018

github-metadata-mirror

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

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