6acec6b9ff multiprocess: Add type conversion code for UniValue types (Ryan Ofsky)
0cc74fce72 multiprocess: Add type conversion code for serializable types (Ryan Ofsky)
4aaee23921 test: add ipc test to test multiprocess type conversion code (Ryan Ofsky)
Pull request description:
Add type conversion hooks to allow `UniValue` objects, and objects that have `CDataStream` `Serialize` and `Unserialize` methods to be used as arguments and return values in Cap'nProto interface methods. Also add unit test to verify the hooks are working and data can be round-tripped correctly.
The non-test code in this PR was previously part of #10102 and has been split off for easier review, but the test code is new.
---
This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/issues/28722).
ACKs for top commit:
achow101:
ACK 6acec6b9ff
dergoegge:
reACK 6acec6b9ff
Tree-SHA512: 5d2cbc5215d488b876d34420adf91205dabf09b736183dcc85aa86255e3804c2bac5bab6792dacd585ef99a1d92cf29c8afb3eb65e4d953abc7ffe41994340c6
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.
No change in behavior. This just moves some code from the ListCoins test
setup to a reusable util function, so it can be reused in a new test in
the next commit.
3c84deebaa Updated appveyor config: - Update build image from Visual Studio 2017 to Visual Studio 2019. - Updated Qt static library from Qt5.9.7 to Qt5.9.8. - Added commands to update vcpkg port files (this does not update already installed packages). - Updated vcpkg package list as per #17309. - Removed commands setting common project file options. Now done via common.init.vcxproj include. - Changed msbuild verbosity from normal to quiet. Normal rights a LOT of logs and impacts appveyor job duration. Updated msvc project configs: - Updated platform toolset from v141 to v142. - Updated Qt static library from Qt5.9.7 to Qt5.9.8. - Added ignore for linker warning building bitcoin-qt program. - Added missing util/str.cpp class file to test_bitcoin project file. (Aaron Clauson)
Pull request description:
Updates to appveyor config:
- Update build image from Visual Studio 2017 to Visual Studio 2019.
- Updated Qt static library from Qt5.9.7 to Qt5.9.8.
- Added commands to update vcpkg port files (this does not update already installed packages).
- Updated vcpkg package list as per #17309.
- Removed commands setting common project file options. Now done via common.init.vcxproj include.
- Changed msbuild verbosity from normal to quiet. Normal writes a LOT of logs and impacts appveyor job duration.
Updates to msvc project configs:
- Updated platform toolset from v141 to v142.
- Updated Qt static library from Qt5.9.7 to Qt5.9.8.
- Added ignore for linker warning building bitcoin-qt program.
- Added missing util/str.cpp class file to test_bitcoin project file.
In order for an existing appveyor job based on the new config to work the cache must be purged. The steps to do this are shown below. The specific appveyor project path will need to be adjusted.
````
export APPVEYOR_TOKEN="<your-api-token>"
curl -H "Authorization: Bearer $APPVEYOR_TOKEN" -X DELETE https://ci.appveyor.com/api/projects/bitcoin/bitcoin-9ql6k/buildcache
````
ACKs for top commit:
ryanofsky:
Non-expert code review ACK 3c84deebaa.
Tree-SHA512: 77063d4588c3499de78b0bcc4d8b638f36c70284485ae94ce5c718a3dacb6d28cc34f9443c54c4e98c07b446d26b59589259671c2f6bcc952344042b4a3baf8f
- Update build image from Visual Studio 2017 to Visual Studio 2019.
- Updated Qt static library from Qt5.9.7 to Qt5.9.8.
- Added commands to update vcpkg port files (this does not update already installed packages).
- Updated vcpkg package list as per #17309.
- Removed commands setting common project file options. Now done via common.init.vcxproj include.
- Changed msbuild verbosity from normal to quiet. Normal rights a LOT of logs and impacts appveyor job duration.
Updated msvc project configs:
- Updated platform toolset from v141 to v142.
- Updated Qt static library from Qt5.9.7 to Qt5.9.8.
- Added ignore for linker warning building bitcoin-qt program.
- Added missing util/str.cpp class file to test_bitcoin project file.
prototypes used in src/test/script_tests.cpp:
- CMutableTransaction BuildCreditingTransaction(const CScript& scriptPubKey, int nValue = 0);
- CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CScriptWitness& scriptWitness, const CTransaction& txCredit);
prototypes used in bench/verify_script.cpp:
- CMutableTransaction BuildCreditingTransaction(const CScript& scriptPubKey);
- CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CMutableTransaction& txCredit);
The more generic versions from the script tests are moved into a new file pair
transaction_utils.cpp/h and the calls are adapted accordingly in the
verify_script benchmark (passing the nValue of 1 explicitely for
BuildCreditingTransaction(), passing empty scriptWitness explicitely and
converting txCredit parameter to CTransaction in BuildSpendingTransaction()).