Skip to content

Commit

Permalink
Merge bitcoin#30493: policy: enable full-rbf by default
Browse files Browse the repository at this point in the history
590456e policy: enable full-rbf by default (Peter Todd)
195e98e doc: add release notes for full-rbf (Peter Todd)

Pull request description:

  This pull request enables full rbf (mempool policy) by default. bitcoin#28132 was closed recently with this [comment](bitcoin#28132 (comment)).

  ---

  Rationale:

  - Full RBF config option was added in July 2022: bitcoin#25353

  - It is used regularly: https://mempool.space/rbf#fullrbf

  - Most mining pools are using it: bitcoin#28132 (comment)

ACKs for top commit:
  petertodd:
    ACK 590456e
  instagibbs:
    reACK bitcoin@590456e
  glozow:
    reACK 590456e
  achow101:
    ACK 590456e
  ariard:
    tested ACK 590456e
  murchandamus:
    reACK 590456e

Tree-SHA512: 83fceef9961021687e6ff979041f89be0c616f7a49cc28a5d7edf7d8ad064fcb9c0e2af0c31f4f89867a9f6dff4e40ef8ad4dbd624e7d6a4e00ac1f1c1f66c7a
  • Loading branch information
achow101 committed Aug 5, 2024
2 parents 69df012 + 590456e commit 902dd14
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions doc/release-notes-30493.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Full Replace-By-Fee
===================

`mempoolfullrbf=1` is now set by default.
2 changes: 1 addition & 1 deletion src/kernel/mempool_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static constexpr unsigned int DEFAULT_BLOCKSONLY_MAX_MEMPOOL_SIZE_MB{5};
/** Default for -mempoolexpiry, expiration time for mempool transactions in hours */
static constexpr unsigned int DEFAULT_MEMPOOL_EXPIRY_HOURS{336};
/** Default for -mempoolfullrbf, if the transaction replaceability signaling is ignored */
static constexpr bool DEFAULT_MEMPOOL_FULL_RBF{false};
static constexpr bool DEFAULT_MEMPOOL_FULL_RBF{true};
/** Whether to fall back to legacy V1 serialization when writing mempool.dat */
static constexpr bool DEFAULT_PERSIST_V1_DAT{false};
/** Default for -acceptnonstdtxn */
Expand Down
5 changes: 4 additions & 1 deletion test/functional/feature_rbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ def add_options(self, parser):

def set_test_params(self):
self.num_nodes = 2
# both nodes disable full-rbf to test BIP125 signaling
self.extra_args = [
[
"-mempoolfullrbf=0",
"-limitancestorcount=50",
"-limitancestorsize=101",
"-limitdescendantcount=200",
"-limitdescendantsize=101",
],
# second node has default mempool parameters
# second node has default mempool parameters, besides mempoolfullrbf being disabled
[
"-mempoolfullrbf=0",
],
]
self.supports_cli = False
Expand Down
1 change: 1 addition & 0 deletions test/functional/mempool_accept.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def set_test_params(self):
self.num_nodes = 1
self.extra_args = [[
'-txindex','-permitbaremultisig=0',
'-mempoolfullrbf=0',
]] * self.num_nodes
self.supports_cli = False

Expand Down
2 changes: 1 addition & 1 deletion test/functional/mempool_truc.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def test_truc_replacement(self):
self.check_mempool([tx_v3_bip125_rbf_v2["txid"], tx_v3_parent["txid"], tx_v3_child["txid"]])


@cleanup(extra_args=None)
@cleanup(extra_args=["-mempoolfullrbf=0"])
def test_truc_bip125(self):
node = self.nodes[0]
self.log.info("Test TRUC transactions that don't signal BIP125 are replaceable")
Expand Down
5 changes: 4 additions & 1 deletion test/functional/p2p_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,17 @@ def check_tx_relay(self):

self.log.debug("Check that node[1] will not send an invalid tx to node[0]")
tx.vout[0].nValue += 1
# add dust to cause policy rejection but no disconnection
tx.vout.append(tx.vout[0])
tx.vout[-1].nValue = 0
txid = tx.rehash()
# Send the transaction twice. The first time, it'll be rejected by ATMP because it conflicts
# with a mempool transaction. The second time, it'll be in the m_lazy_recent_rejects filter.
p2p_rebroadcast_wallet.send_txs_and_test(
[tx],
self.nodes[1],
success=False,
reject_reason='{} (wtxid={}) from peer=0 was not accepted: txn-mempool-conflict'.format(txid, tx.getwtxid())
reject_reason='{} (wtxid={}) from peer=0 was not accepted: dust'.format(txid, tx.getwtxid())
)

p2p_rebroadcast_wallet.send_txs_and_test(
Expand Down

0 comments on commit 902dd14

Please sign in to comment.