ipc mining: provide default option values (incompatible schema change)
What changed, and why it matters
This is a Bitcoin Core internal commit that adds default values to an inter-process communication (IPC) schema used by experimental mining interfaces. The commit itself warns it is an intermediate, review-only change that should not be used in production because it makes an incompatible schema change without bumping the version number. If someone ignored that warning and ran mismatched binaries, the two sides could misunderstand each other's messages and exchange garbage data instead of clean errors. There is no direct evidence this is exploitable as a security vulnerability; the risk is primarily operational and self-disclosed by the developers.
Treat this commit as the developers label it: review-only, do not ship binaries from it, and ensure the follow-up commit that bumps Init.makeMining is included before any release or deployment. No security patch is required; normal code-review and version-bump verification is sufficient.
Security signals we found
Incompatible schema change without version bump (self-disclosed by commit message)
Risk of garbage requests/responses between mismatched IPC peers if binaries are built from this intermediate commit
No input validation, memory corruption, or cryptographic weakness introduced in the diff
Change is isolated to experimental IPC mining interfaces, not P2P or consensus code
Evidence from the diff
The patch updates src/ipc/capnp/mining.capnp to supply Cap’n Proto default values (true, .maxDouble, .defaultBlockReservedWeight, etc.) for fields in BlockCreateOptions, BlockWaitOptions, BlockCheckOptions, and the waitTipChanged timeout. It also removes explicit default assignments in the Python functional test now that the schema provides them. The commit message explicitly states this is an intermediate, incompatible schema change that does not update Init.makeMining, so mixed-version IPC peers would not detect the mismatch and could exchange malformed requests/responses. The change is not a memory-safety bug, cryptographic flaw, or consensus issue; it is a schema-versioning hazard in an opt-in/experimental IPC subsystem.
Changed components
src/ipc/capnp/mining.capnptest/functional/interface_ipc_mining.pyExperimental IPC mining interface (Cap'n Proto wrapper)Inspect captured patch +9 / −17
diff --git a/src/ipc/capnp/mining.capnp b/src/ipc/capnp/mining.capnp
index 7e5cced6..1811716f 100644
--- a/src/ipc/capnp/mining.capnp
+++ b/src/ipc/capnp/mining.capnp
@@ -21,7 +21,7 @@ interface Mining $Proxy.wrap("interfaces::Mining") {
isTestChain @0 (context :Proxy.Context) -> (result: Bool);
isInitialBlockDownload @1 (context :Proxy.Context) -> (result: Bool);
getTip @2 (context :Proxy.Context) -> (result: Common.BlockRef, hasResult: Bool);
- waitTipChanged @3 (context :Proxy.Context, currentTip: Data, timeout: Float64) -> (result: Common.BlockRef);
+ waitTipChanged @3 (context :Proxy.Context, currentTip: Data, timeout: Float64 = .maxDouble) -> (result: Common.BlockRef);
createNewBlock @4 (options: BlockCreateOptions) -> (result: BlockTemplate);
checkBlock @5 (block: Data, options: BlockCheckOptions) -> (reason: Text, debug: Text, result: Bool);
}
@@ -43,19 +43,19 @@ interface BlockTemplate $Proxy.wrap("interfaces::BlockTemplate") {
}
struct BlockCreateOptions $Proxy.wrap("node::BlockCreateOptions") {
- useMempool @0 :Bool $Proxy.name("use_mempool");
- blockReservedWeight @1 :UInt64 $Proxy.name("block_reserved_weight");
- coinbaseOutputMaxAdditionalSigops @2 :UInt64 $Proxy.name("coinbase_output_max_additional_sigops");
+ useMempool @0 :Bool = true $Proxy.name("use_mempool");
+ blockReservedWeight @1 :UInt64 = .defaultBlockReservedWeight $Proxy.name("block_reserved_weight");
+ coinbaseOutputMaxAdditionalSigops @2 :UInt64 = .defaultCoinbaseOutputMaxAdditionalSigops $Proxy.name("coinbase_output_max_additional_sigops");
}
struct BlockWaitOptions $Proxy.wrap("node::BlockWaitOptions") {
- timeout @0 : Float64 $Proxy.name("timeout");
- feeThreshold @1 : Int64 $Proxy.name("fee_threshold");
+ timeout @0 : Float64 = .maxDouble $Proxy.name("timeout");
+ feeThreshold @1 : Int64 = .maxMoney $Proxy.name("fee_threshold");
}
struct BlockCheckOptions $Proxy.wrap("node::BlockCheckOptions") {
- checkMerkleRoot @0 :Bool $Proxy.name("check_merkle_root");
- checkPow @1 :Bool $Proxy.name("check_pow");
+ checkMerkleRoot @0 :Bool = true $Proxy.name("check_merkle_root");
+ checkPow @1 :Bool = true $Proxy.name("check_pow");
}
struct CoinbaseTx $Proxy.wrap("node::CoinbaseTx") {
diff --git a/test/functional/interface_ipc_mining.py b/test/functional/interface_ipc_mining.py
index d4a0d87e..a02727bb 100755
--- a/test/functional/interface_ipc_mining.py
+++ b/test/functional/interface_ipc_mining.py
@@ -243,9 +243,6 @@ class IPCMiningTest(BitcoinTestFramework):
async with AsyncExitStack() as stack:
opts = self.capnp_modules['mining'].BlockCreateOptions()
- opts.useMempool = True
- opts.blockReservedWeight = 4000
- opts.coinbaseOutputMaxAdditionalSigops = 0
template = await mining_create_block_template(mining, stack, ctx, opts)
assert template is not None
block = await mining_get_block(template, ctx)
@@ -351,12 +348,7 @@ class IPCMiningTest(BitcoinTestFramework):
def run_test(self):
self.miniwallet = MiniWallet(self.nodes[0])
- self.default_block_create_options = self.capnp_modules['mining'].BlockCreateOptions(
- useMempool=True,
- blockReservedWeight=4000,
- coinbaseOutputMaxAdditionalSigops=0
- )
-
+ self.default_block_create_options = self.capnp_modules['mining'].BlockCreateOptions()
self.run_mining_interface_test()
self.run_block_template_test()
self.run_coinbase_and_submission_test()
Why this scored 19/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.