-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiprocess bitcoin #7
base: bitcoin-fresheyes-master-10102
Are you sure you want to change the base?
Multiprocess bitcoin #7
Commits on Jan 11, 2024
-
serialization: Support for multiple parameters
This commit makes a minimal change to the ParamsStream class to let it retrieve multiple parameters. Followup commits after this commit clean up code using ParamsStream and make it easier to set multiple parameters. Currently it is only possible to attach one serialization parameter to a stream at a time. For example, it is not possible to set a parameter controlling the transaction format and a parameter controlling the address format at the same time because one parameter will override the other. This limitation is inconvenient for multiprocess code since it is not possible to create just one type of stream and serialize any object to it. Instead it is necessary to create different streams for different object types, which requires extra boilerplate and makes using the new parameter fields a lot more awkward than the older version and type fields. Fix this problem by allowing an unlimited number of serialization stream parameters to be set, and allowing them to be requested by type. Later parameters will still override earlier parameters, but only if they have the same type. This change requires replacing the stream.GetParams() method with a stream.GetParams<T>() method in order for serialization code to retreive the desired parameters. This change is more verbose, but probably a good thing for readability because previously it could be difficult to know what type the GetParams() method would return, and now it is more obvious.
Configuration menu - View commit details
-
Copy full SHA for 0be3913 - Browse repository at this point
Copy the full SHA 0be3913View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 422bd2d - Browse repository at this point
Copy the full SHA 422bd2dView commit details -
serialization: Drop unnecessary ParamsStream references
Drop unnecessary ParamsStream references from CTransaction and CMutableTransaction constructors. This just couples these classes unnecessarily to the ParamsStream class, making the ParamsStream class harder to modify, and making the transaction classes in some cases (depending on parameter order) unable to work with stream classes that have multiple parameters set.
Configuration menu - View commit details
-
Copy full SHA for de13c17 - Browse repository at this point
Copy the full SHA de13c17View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for c9dad8d - Browse repository at this point
Copy the full SHA c9dad8dView commit details -
serialization: Reverse ParamsStream constructor order
Move parameter argument after stream argument so will be possible to accept multiple variadic parameter arguments in the following commit. Also reverse template parameter order for consistency.
Configuration menu - View commit details
-
Copy full SHA for 9e9dfce - Browse repository at this point
Copy the full SHA 9e9dfceView commit details -
multiprocess: Add type conversion code for UniValue types
Extend IPC unit test to cover this and verify the serialization happens correctly.
Configuration menu - View commit details
-
Copy full SHA for afce182 - Browse repository at this point
Copy the full SHA afce182View commit details -
serialization: Accept multiple parameters in ParamsStream constructor
Before this change it was possible but awkward to create ParamStream streams with multiple parameter objects. After this change it is straightforward.
Configuration menu - View commit details
-
Copy full SHA for ffc1e9f - Browse repository at this point
Copy the full SHA ffc1e9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for ca82b45 - Browse repository at this point
Copy the full SHA ca82b45View commit details -
Configuration menu - View commit details
-
Copy full SHA for d27c337 - Browse repository at this point
Copy the full SHA d27c337View commit details -
doc: multiprocess documentation improvements
All suggested by stickies-v <stickies-v@protonmail.com> bitcoin#28978 (review) Co-authored-by: stickies-v <stickies-v@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for ee4b913 - Browse repository at this point
Copy the full SHA ee4b913View commit details -
Increase feature_block.py and feature_taproot.py timeouts
Needed because BlockConnected notifications are a lot slower with the wallet running in separate process.
Configuration menu - View commit details
-
Copy full SHA for df27e30 - Browse repository at this point
Copy the full SHA df27e30View commit details -
Add util::Result workaround to be compatible with libmultiprocess
Make default constructor more generic so it doesn't only work with void types.
Configuration menu - View commit details
-
Copy full SHA for cbc5e36 - Browse repository at this point
Copy the full SHA cbc5e36View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3427e7e - Browse repository at this point
Copy the full SHA 3427e7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for b6516c4 - Browse repository at this point
Copy the full SHA b6516c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5cf30e5 - Browse repository at this point
Copy the full SHA 5cf30e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b5fd425 - Browse repository at this point
Copy the full SHA b5fd425View commit details -
Configuration menu - View commit details
-
Copy full SHA for 329b34c - Browse repository at this point
Copy the full SHA 329b34cView commit details -
Make bitcoin-gui spawn a bitcoin-node process
Spawn node subprocess instead of running node code internally
Configuration menu - View commit details
-
Copy full SHA for dde2a22 - Browse repository at this point
Copy the full SHA dde2a22View commit details -
Make bitcoin-node spawn a bitcoin-wallet process
Spawn wallet subprocess instead of running wallet code internally
Configuration menu - View commit details
-
Copy full SHA for f3349a2 - Browse repository at this point
Copy the full SHA f3349a2View commit details -
multiprocess: Add debug.log .wallet/.gui suffixes
Add .wallet/.gui suffixes to log files created by bitcoin-gui and bitcoin-wallet processes so they don't clash with bitcoin-node log file.
Configuration menu - View commit details
-
Copy full SHA for 6ea638c - Browse repository at this point
Copy the full SHA 6ea638cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 622acd0 - Browse repository at this point
Copy the full SHA 622acd0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 755ca62 - Browse repository at this point
Copy the full SHA 755ca62View commit details -
Update libmultiprocess library
Add recent changes to support C++20 and fix some build issues: chaincodelabs/libmultiprocess#89 pkgconfig: Drop -std=c++17 compile flag chaincodelabs/libmultiprocess#90 pkgconfig: Use @CMAKE_INSTALL_LIBDIR@ variable
Configuration menu - View commit details
-
Copy full SHA for 56ef459 - Browse repository at this point
Copy the full SHA 56ef459View commit details