BIP125: rephrase rule 2 for clarity #745

pull harding wants to merge 1 commits into bitcoin:master from harding:2018-12-bip125-clarify-rule-2 changing 1 files +1 −1
  1. harding commented at 9:59 PM on December 4, 2018: contributor

    It's been reported that the double negative in rule 2 is confusing people (including myself, on re-read). This PR revises out both negatives and, I believe, significantly improves clarity.

    For reference, this document was based on the implementation in Bitcoin Core 0.12.0, which includes these lines:

                for (unsigned int j = 0; j < tx.vin.size(); j++)
                {
                    // We don't want to accept replacements that require low
                    // feerate junk to be mined first. Ideally we'd keep track of
                    // the ancestor feerates and make the decision based on that,
                    // but for now requiring all new inputs to be confirmed works.
                    if (!setConflictsParents.count(tx.vin[j].prevout.hash))
                    {
                        // Rather than check the UTXO set - potentially expensive -
                        // it's cheaper to just check if the new input refers to a
                        // tx that's in the mempool.
                        if (pool.mapTx.find(tx.vin[j].prevout.hash) != pool.mapTx.end())
                            return state.DoS(0, error("AcceptToMemoryPool: replacement %s adds unconfirmed input, idx %d",
                                                      hash.ToString(), j),
                                             REJECT_NONSTANDARD, "replacement-adds-unconfirmed");
                  }
    

    Changing this was suggested by @jnewbery, who also reviewed the code in master with me (which is the same but is moved to validation.cpp).

    CC: @petertodd

    Request to BIP editor @luke-jr: I think your usually policy is to merge policy-acceptable changes to BIPs solely based on the requests of their authors. As a co-author, I request this be left open for at least one week (December 13th) to give @petertodd a chance to comment if he wants.

  2. BIP125: rephrase rule #2 for clarity af878ab42e
  3. jnewbery commented at 10:10 PM on December 4, 2018: member

    ACK af878ab42e8ca4ef1ffa74f7b500ec66e2d91d30

  4. jnewbery cross-referenced this on Dec 4, 2018 from issue Add intro to RBF by jnewbery
  5. petertodd commented at 12:58 AM on December 10, 2018: contributor

    ACK

  6. jnewbery commented at 9:10 PM on December 10, 2018: member

    @luke-jr : ready for merge. Both BIP authors have now ACKed.

  7. luke-jr merged this on Dec 14, 2018
  8. luke-jr closed this on Dec 14, 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-21 12:10 UTC

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