Adding a context parameter ensures that these methods are run in their own thread and don’t block other calls.
For createNewBlock() this is not expected to have much impact, because block template creation is fast.
For checkBlock() this ensures that if we receive a slow to validate block from an untrusted origin (the IPC connection itself is assumed to trusted), it will not block the IPC server. But since validation itself blocks cs_main this is also not a huge performance win.
This is a breaking change both ways:
- clients must use the updated capnp file
- updated clients can’t call these methods on an unupgraded node
Because it’s a breaking change, but not really important, this PR is marked pending some other more important breaking change. See #33777.