You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin/bitcoin#34568: mining: Break compatibility with existing IPC mining clients
f700609 doc: Release notes for mining IPC interface bump (Ryan Ofsky)
9453c15 ipc mining: break compatibility with existing clients (version bump) (Sjors Provoost)
70de5cc ipc mining: pass missing context to BlockTemplate methods (incompatible schema change) (Sjors Provoost)
2278f01 ipc mining: remove deprecated methods (incompatible schema change) (Ryan Ofsky)
c6638fa ipc mining: provide default option values (incompatible schema change) (Ryan Ofsky)
a4603ac ipc mining: declare constants for default field values (Ryan Ofsky)
ff995b5 ipc test: add workaround to block_reserved_weight exception test (Ryan Ofsky)
b970cdf test framework: expand expected_stderr, expected_ret_code options (Ryan Ofsky)
df53a3e rpc refactor: stop using deprecated getCoinbaseCommitment method (Ryan Ofsky)
Pull request description:
This PR increments the field number of the `Init.makeMining` method and makes the old `makeMining` method return an error, so IPC mining clients not using the latest schema file will get an error and not be able to access the Mining interface.
Normally, there shouldn't be a need to break compatibility this way, but the mining interface has evolved a lot since it was first introduced, with old clients using the original methods less stable and performant than newer clients. So now is a good time to introduce a cutoff, drop deprecated methods, and stop supporting old clients which can't function as well.
Bumping the field number is also an opportunity to make other improvements that would be awkward to implement compatibly:
- Making Cap'n Proto default parameter and field values match default values of corresponding C++ methods and structs.
- Adding missing Context parameters to Mining.createNewBlock and checkBlock methods so these methods will be executed on separate execution threads and not block the Cap'n Proto event loop thread.
More details about these changes are in the commit messages.
ACKs for top commit:
Sjors:
ACK f700609
enirox001:
ACK f700609
ismaelsadeeq:
ACK f700609
sedited:
ACK f700609
Tree-SHA512: 0901886af00214c138643b33cec21647de5671dfff2021afe06d78dfd970664a844cde9a1e28f685bb27edccaf6e0c3f2d1e6bb4164bde6b84f42955946e366d
The IPC mining interface now requires mining clients to use the latest `mining.capnp` schema. Clients built against older schemas will fail when calling `Init.makeMining` and receive an RPC error indicating the old mining interface is no longer supported. Mining clients must update to the latest schema and regenerate bindings to continue working. (#34568)
5
+
6
+
Notable IPC mining interface changes since the last release:
7
+
-`Mining.createNewBlock` and `Mining.checkBlock` now require a `context` parameter.
8
+
-`Mining.waitTipChanged` now has a default `timeout` (effectively infinite / `maxDouble`) if the client omits it.
9
+
-`BlockTemplate.getCoinbaseTx()` now returns a structured `CoinbaseTx` instead of raw bytes.
10
+
- Removed `BlockTemplate.getCoinbaseCommitment()` and `BlockTemplate.getWitnessCommitmentIndex()`.
11
+
- Cap’n Proto default values were updated to match the corresponding C++ defaults for mining-related option structs (e.g. `BlockCreateOptions`, `BlockWaitOptions`, `BlockCheckOptions`).
0 commit comments