0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-24 12:41:41 -05:00
Commit graph

8 commits

Author SHA1 Message Date
Ryan Ofsky
90b405516f Update libmultiprocess library
Add recent changes and fixes for shutdown bugs.

https://github.com/chaincodelabs/libmultiprocess/pull/111: doc: Add internal design section
https://github.com/chaincodelabs/libmultiprocess/pull/113: Add missing include to util.h
https://github.com/chaincodelabs/libmultiprocess/pull/116: shutdown bugfix: destroy RPC system before running cleanup callbacks
https://github.com/chaincodelabs/libmultiprocess/pull/118: shutdown bugfix: Prevent segfault in server if connection is broken during long function call
https://github.com/chaincodelabs/libmultiprocess/pull/119: cmake: avoid libatomic not found error on debian
2024-10-16 12:13:27 -04:00
Ryan Ofsky
d043950ba2 multiprocess: Add serialization code for BlockValidationState
Co-authored-by: TheCharlatan <seb.kung@gmail.com>
2024-09-23 16:03:04 -04:00
Russell Yanofsky
06882f8401 multiprocess: Add serialization code for vector<char> 2024-09-23 15:03:04 -05:00
Russell Yanofsky
095286f790 multiprocess: Add serialization code for CTransaction
Add support for passing CTransaction and CTransactionRef types to IPC
functions.

These types can't be passed currently because IPC serialization code currently
only supports deserializing types that have an Unserialize() method, which
CTransaction does not, because it is supposed to represent immutable
transactions. Work around this by adding a CustomReadField overload that will
call CTransaction's deserialize_type constructor.

These types also can't be passed currently because serializing transactions
requires TransactionSerParams to be set. Fix this by setting TX_WITH_WITNESS as
default serialization parameters for IPC code.
2024-09-23 15:03:04 -05:00
Ryan Ofsky
73fe7d7230 multiprocess: Add unit tests for connect, serve, and listen functions 2024-09-06 09:08:10 -04:00
Ryan Ofsky
6acec6b9ff multiprocess: Add type conversion code for UniValue types
Extend IPC unit test to cover this and verify the serialization happens
correctly.
2023-11-28 12:35:50 -05:00
Ryan Ofsky
0cc74fce72 multiprocess: Add type conversion code for serializable types
Allow any C++ object that has Serialize and Unserialize methods and can be
serialized to a bitcoin CDataStream to be converted to a capnproto Data field
and passed as arguments or return values to capnproto methods using the Data
type.

Extend IPC unit test to cover this and verify the serialization happens
correctly.
2023-11-28 12:35:50 -05:00
Ryan Ofsky
4aaee23921 test: add ipc test to test multiprocess type conversion code
Add unit test to test IPC method calls and type conversion between bitcoin c++
types and capnproto messages.

Right now there are custom type hooks in bitcoin IPC code, so the test is
simple, but in upcoming commits, code will be added to convert bitcoin types to
capnproto messages, and the test will be expanded.
2023-11-28 12:35:50 -05:00