rpc, mempool: rpcdeprecate `fullrbf` key in getmempoolinfo RPC response
What changed, and why it matters
This change removes a now-obsolete 'fullrbf' field from the getmempoolinfo RPC response by default, while still allowing it to appear if the user explicitly requests legacy behavior with -deprecatedrpc=fullrbf. It is a routine cleanup of a deprecated API field and does not fix or introduce any security vulnerability.
No security action required. Developers relying on getmempoolinfo['fullrbf'] should migrate to the current behavior or enable -deprecatedrpc=fullrbf during transition.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit moves the ‘fullrbf’ key in MempoolInfoToJSON() behind an IsDeprecatedRPCEnabled(‘fullrbf’) guard and updates the getmempoolinfo help schema to conditionally include the field. The functional test is updated to pass -deprecatedrpc=fullrbf to the first node so existing assertions about the field continue to pass. This is purely an RPC deprecation/behavioral cleanup; no consensus, mempool policy, or networking code is changed.
Changed components
src/rpc/mempool.cpptest/functional/feature_rbf.pyInspect captured patch +28 / −19
diff --git a/src/rpc/mempool.cpp b/src/rpc/mempool.cpp
index 1a94d10b..1b76f7d8 100644
--- a/src/rpc/mempool.cpp
+++ b/src/rpc/mempool.cpp
@@ -1055,12 +1055,14 @@ UniValue MempoolInfoToJSON(const CTxMemPool& pool)
ret.pushKV("minrelaytxfee", ValueFromAmount(pool.m_opts.min_relay_feerate.GetFeePerK()));
ret.pushKV("incrementalrelayfee", ValueFromAmount(pool.m_opts.incremental_relay_feerate.GetFeePerK()));
ret.pushKV("unbroadcastcount", pool.GetUnbroadcastTxs().size());
- ret.pushKV("fullrbf", true);
ret.pushKV("permitbaremultisig", pool.m_opts.permit_bare_multisig);
ret.pushKV("maxdatacarriersize", pool.m_opts.max_datacarrier_bytes.value_or(0));
ret.pushKV("limitclustercount", pool.m_opts.limits.cluster_count);
ret.pushKV("limitclustersize", pool.m_opts.limits.cluster_size_vbytes);
ret.pushKV("optimal", pool.m_txgraph->DoWork(0)); // 0 work is a quick check for known optimality
+ if (IsDeprecatedRPCEnabled("fullrbf")) {
+ ret.pushKV("fullrbf", true);
+ }
return ret;
}
@@ -1071,24 +1073,30 @@ static RPCHelpMan getmempoolinfo()
{},
RPCResult{
RPCResult::Type::OBJ, "", "",
- {
- {RPCResult::Type::BOOL, "loaded", "True if the initial load attempt of the persisted mempool finished"},
- {RPCResult::Type::NUM, "size", "Current tx count"},
- {RPCResult::Type::NUM, "bytes", "Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted"},
- {RPCResult::Type::NUM, "usage", "Total memory usage for the mempool"},
- {RPCResult::Type::STR_AMOUNT, "total_fee", "Total fees for the mempool in " + CURRENCY_UNIT + ", ignoring modified fees through prioritisetransaction"},
- {RPCResult::Type::NUM, "maxmempool", "Maximum memory usage for the mempool"},
- {RPCResult::Type::STR_AMOUNT, "mempoolminfee", "Minimum fee rate in " + CURRENCY_UNIT + "/kvB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee"},
- {RPCResult::Type::STR_AMOUNT, "minrelaytxfee", "Current minimum relay fee for transactions"},
- {RPCResult::Type::NUM, "incrementalrelayfee", "minimum fee rate increment for mempool limiting or replacement in " + CURRENCY_UNIT + "/kvB"},
- {RPCResult::Type::NUM, "unbroadcastcount", "Current number of transactions that haven't passed initial broadcast yet"},
- {RPCResult::Type::BOOL, "fullrbf", "True if the mempool accepts RBF without replaceability signaling inspection (DEPRECATED)"},
- {RPCResult::Type::BOOL, "permitbaremultisig", "True if the mempool accepts transactions with bare multisig outputs"},
- {RPCResult::Type::NUM, "maxdatacarriersize", "Maximum number of bytes that can be used by OP_RETURN outputs in the mempool"},
- {RPCResult::Type::NUM, "limitclustercount", "Maximum number of transactions that can be in a cluster (configured by -limitclustercount)"},
- {RPCResult::Type::NUM, "limitclustersize", "Maximum size of a cluster in virtual bytes (configured by -limitclustersize)"},
- {RPCResult::Type::BOOL, "optimal", "If the mempool is in a known-optimal transaction ordering"},
- }},
+ [](){
+ std::vector<RPCResult> list = {
+ {RPCResult::Type::BOOL, "loaded", "True if the initial load attempt of the persisted mempool finished"},
+ {RPCResult::Type::NUM, "size", "Current tx count"},
+ {RPCResult::Type::NUM, "bytes", "Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted"},
+ {RPCResult::Type::NUM, "usage", "Total memory usage for the mempool"},
+ {RPCResult::Type::STR_AMOUNT, "total_fee", "Total fees for the mempool in " + CURRENCY_UNIT + ", ignoring modified fees through prioritisetransaction"},
+ {RPCResult::Type::NUM, "maxmempool", "Maximum memory usage for the mempool"},
+ {RPCResult::Type::STR_AMOUNT, "mempoolminfee", "Minimum fee rate in " + CURRENCY_UNIT + "/kvB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee"},
+ {RPCResult::Type::STR_AMOUNT, "minrelaytxfee", "Current minimum relay fee for transactions"},
+ {RPCResult::Type::NUM, "incrementalrelayfee", "minimum fee rate increment for mempool limiting or replacement in " + CURRENCY_UNIT + "/kvB"},
+ {RPCResult::Type::NUM, "unbroadcastcount", "Current number of transactions that haven't passed initial broadcast yet"},
+ {RPCResult::Type::BOOL, "permitbaremultisig", "True if the mempool accepts transactions with bare multisig outputs"},
+ {RPCResult::Type::NUM, "maxdatacarriersize", "Maximum number of bytes that can be used by OP_RETURN outputs in the mempool"},
+ {RPCResult::Type::NUM, "limitclustercount", "Maximum number of transactions that can be in a cluster (configured by -limitclustercount)"},
+ {RPCResult::Type::NUM, "limitclustersize", "Maximum size of a cluster in virtual bytes (configured by -limitclustersize)"},
+ {RPCResult::Type::BOOL, "optimal", "If the mempool is in a known-optimal transaction ordering"},
+ };
+ if (IsDeprecatedRPCEnabled("fullrbf")) {
+ list.emplace_back(RPCResult::Type::BOOL, "fullrbf", "True if the mempool accepts RBF without replaceability signaling inspection (DEPRECATED)");
+ }
+ return list;
+ }()
+ },
RPCExamples{
HelpExampleCli("getmempoolinfo", "")
+ HelpExampleRpc("getmempoolinfo", "")
diff --git a/test/functional/feature_rbf.py b/test/functional/feature_rbf.py
index a2c8cb60..5527f7a9 100755
--- a/test/functional/feature_rbf.py
+++ b/test/functional/feature_rbf.py
@@ -28,6 +28,7 @@ class ReplaceByFeeTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
self.uses_wallet = None
+ self.extra_args = [["-deprecatedrpc=fullrbf"], []]
def run_test(self):
self.wallet = MiniWallet(self.nodes[0])
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.