Skip to content

Commit 902dd14

Browse files
committed
Merge bitcoin#30493: policy: enable full-rbf by default
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
2 parents 69df012 + 590456e commit 902dd14

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

doc/release-notes-30493.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Full Replace-By-Fee
2+
===================
3+
4+
`mempoolfullrbf=1` is now set by default.

src/kernel/mempool_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static constexpr unsigned int DEFAULT_BLOCKSONLY_MAX_MEMPOOL_SIZE_MB{5};
2222
/** Default for -mempoolexpiry, expiration time for mempool transactions in hours */
2323
static constexpr unsigned int DEFAULT_MEMPOOL_EXPIRY_HOURS{336};
2424
/** Default for -mempoolfullrbf, if the transaction replaceability signaling is ignored */
25-
static constexpr bool DEFAULT_MEMPOOL_FULL_RBF{false};
25+
static constexpr bool DEFAULT_MEMPOOL_FULL_RBF{true};
2626
/** Whether to fall back to legacy V1 serialization when writing mempool.dat */
2727
static constexpr bool DEFAULT_PERSIST_V1_DAT{false};
2828
/** Default for -acceptnonstdtxn */

test/functional/feature_rbf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,18 @@ def add_options(self, parser):
2626

2727
def set_test_params(self):
2828
self.num_nodes = 2
29+
# both nodes disable full-rbf to test BIP125 signaling
2930
self.extra_args = [
3031
[
32+
"-mempoolfullrbf=0",
3133
"-limitancestorcount=50",
3234
"-limitancestorsize=101",
3335
"-limitdescendantcount=200",
3436
"-limitdescendantsize=101",
3537
],
36-
# second node has default mempool parameters
38+
# second node has default mempool parameters, besides mempoolfullrbf being disabled
3739
[
40+
"-mempoolfullrbf=0",
3841
],
3942
]
4043
self.supports_cli = False

test/functional/mempool_accept.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def set_test_params(self):
5555
self.num_nodes = 1
5656
self.extra_args = [[
5757
'-txindex','-permitbaremultisig=0',
58+
'-mempoolfullrbf=0',
5859
]] * self.num_nodes
5960
self.supports_cli = False
6061

test/functional/mempool_truc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def test_truc_replacement(self):
162162
self.check_mempool([tx_v3_bip125_rbf_v2["txid"], tx_v3_parent["txid"], tx_v3_child["txid"]])
163163

164164

165-
@cleanup(extra_args=None)
165+
@cleanup(extra_args=["-mempoolfullrbf=0"])
166166
def test_truc_bip125(self):
167167
node = self.nodes[0]
168168
self.log.info("Test TRUC transactions that don't signal BIP125 are replaceable")

test/functional/p2p_permissions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,17 @@ def check_tx_relay(self):
119119

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

132135
p2p_rebroadcast_wallet.send_txs_and_test(

0 commit comments

Comments
 (0)