This PR follows up on #35118 and continues the IPC fuzzing work proposed in #23015.
The initial ipc fuzz target exercised normal calls through a libmultiprocess client and server. This PR extends the target with
- Server side assertions that verify arguments arrive unchanged (https://github.com/bitcoin/bitcoin/pull/35118#issuecomment-4452992198 and #35118#pullrequestreview-4539477599)
- A callback call that exercises ipc communication in both directions.
- Raw capnp requests containing arbitrary transaction and
UniValuepayloads, which are deserialized by a normal libmultiprocess server. - Raw capnp responses containing arbitrary transaction and
UniValuepayloads, which are deserialized by a normal libmultiprocess client.
The raw request and response cases allow the fuzz target to exercise deserialization with data that was not first produced by libmultiprocess serialization.
The ipc setup and callback handling closely follow the existing libmultiprocess tests, particularly their use of EventLoop, ProxyClient, ProxyServer, two-way pipes, and initThreadMap.
The transaction and UniValue payload cases exercise the serialization hooks defined in common-types.h.
These files may provide useful background when reviewing the changes.
Generated coverage report after fuzzing the IPC target for a while using the qa-assets corpus.