ipc mining: break compatibility with existing clients (version bump)
What changed, and why it matters
This is a planned compatibility break for an experimental inter-process communication (IPC) mining feature in Bitcoin Core. The developers moved the current mining method to a new slot and made the old slot return a clear error message, so outdated clients can no longer connect. It is not a security vulnerability; it is an intentional API cleanup with a test that verifies the old interface now fails gracefully.
No security action required. Treat as a normal API compatibility change. Downstream IPC mining clients should update to the new schema where `makeMining` is field @3.
Security signals we found
No memory corruption, overflow, or injection pattern present
No privilege escalation or authentication bypass
Change is an intentional API version bump with explicit deprecation
Functional test added to verify graceful failure of old clients
No CVE, advisory, or vendor security disclosure referenced
Evidence from the diff
The commit bumps the Cap’n Proto interface version for Init.makeMining from field @2 to @3 and adds a deprecated makeMiningOld2 @2 method that throws std::runtime_error("Old mining interface (@2) not supported. Please update your client!"). A functional test confirms that calling the old method raises a capnp.KjException with the expected description. This is a deliberate backward-compatibility break for the IPC mining interface, not a fix for a memory-safety, consensus, or remote-exploitable bug.
Changed components
src/interfaces/init.hsrc/ipc/capnp/init.capnptest/functional/interface_ipc.pyInspect captured patch +19 / −1
diff --git a/src/interfaces/init.h b/src/interfaces/init.h
index b909c9e6..463d43e7 100644
--- a/src/interfaces/init.h
+++ b/src/interfaces/init.h
@@ -39,6 +39,7 @@ public:
virtual Ipc* ipc() { return nullptr; }
virtual bool canListenIpc() { return false; }
virtual const char* exeName() { return nullptr; }
+ virtual void makeMiningOld2() { throw std::runtime_error("Old mining interface (@2) not supported. Please update your client!"); }
};
//! Return implementation of Init interface for the node process. If the argv
diff --git a/src/ipc/capnp/init.capnp b/src/ipc/capnp/init.capnp
index 64a7bf9b..a20ef2fc 100644
--- a/src/ipc/capnp/init.capnp
+++ b/src/ipc/capnp/init.capnp
@@ -19,5 +19,8 @@ using Mining = import "mining.capnp";
interface Init $Proxy.wrap("interfaces::Init") {
construct @0 (threadMap: Proxy.ThreadMap) -> (threadMap :Proxy.ThreadMap);
makeEcho @1 (context :Proxy.Context) -> (result :Echo.Echo);
- makeMining @2 (context :Proxy.Context) -> (result :Mining.Mining);
+ makeMining @3 (context :Proxy.Context) -> (result :Mining.Mining);
+
+ # DEPRECATED: no longer supported; server returns an error.
+ makeMiningOld2 @2 () -> ();
}
diff --git a/test/functional/interface_ipc.py b/test/functional/interface_ipc.py
index f2c75f6e..2fc4497a 100755
--- a/test/functional/interface_ipc.py
+++ b/test/functional/interface_ipc.py
@@ -68,9 +68,23 @@ class IPCInterfaceTest(BitcoinTestFramework):
asyncio.run(capnp.run(async_routine()))
+ def run_deprecated_mining_test(self):
+ self.log.info("Running deprecated mining interface test")
+ async def async_routine():
+ ctx, init = await make_capnp_init_ctx(self)
+ self.log.debug("Calling deprecated makeMiningOld2 should raise an error")
+ try:
+ await init.makeMiningOld2()
+ raise AssertionError("makeMiningOld2 unexpectedly succeeded")
+ except capnp.KjException as e:
+ assert_equal(e.description, "remote exception: std::exception: Old mining interface (@2) not supported. Please update your client!")
+ assert_equal(e.type, "FAILED")
+ asyncio.run(capnp.run(async_routine()))
+
def run_test(self):
self.run_echo_test()
self.run_mining_test()
+ self.run_deprecated_mining_test()
if __name__ == '__main__':
IPCInterfaceTest(__file__).main()
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.