forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin#30510: multiprocess: Add IPC wrapper for Mining interface
1a33281 doc: multiprocess documentation improvements (Ryan Ofsky) d043950 multiprocess: Add serialization code for BlockValidationState (Ryan Ofsky) 33c2eee multiprocess: Add IPC wrapper for Mining interface (Ryan Ofsky) 06882f8 multiprocess: Add serialization code for vector<char> (Russell Yanofsky) 095286f multiprocess: Add serialization code for CTransaction (Russell Yanofsky) 69dfeb1 multiprocess: update common-types.h to use C++20 concepts (Ryan Ofsky) 206c6e7 build: Make bitcoin_ipc_test depend on bitcoin_ipc (Ryan Ofsky) 070e6a3 depends: Update libmultiprocess library for cmake headers target (Ryan Ofsky) Pull request description: Add Cap'n Proto wrapper for the Mining interface introduced in bitcoin#30200, and its associated types. This PR combined with bitcoin#30509 will allow a separate mining process, like the one being implemented in Sjors#48, to connect to the node over IPC, and create, manage, and submit block templates. (bitcoin#30437 shows another simpler demo of a process using the Mining interface.) --- This PR is part of the [process separation project](bitcoin#28722). ACKs for top commit: achow101: ACK 1a33281 TheCharlatan: ACK 1a33281 itornaza: ACK 1a33281 Tree-SHA512: 0791078dd6885dbd81e3d14c75fffff3da8d1277873af379ea6f9633e910c11485bb324e4cde3d936d50d343b16a10b0e8fc1e0fc6d7bdca7f522211da50c01e
- Loading branch information
Showing
17 changed files
with
327 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) 2024 The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
@0xcd2c6232cb484a28; | ||
|
||
using Cxx = import "/capnp/c++.capnp"; | ||
$Cxx.namespace("ipc::capnp::messages"); | ||
|
||
using Proxy = import "/mp/proxy.capnp"; | ||
$Proxy.includeTypes("ipc/capnp/common-types.h"); | ||
|
||
struct BlockRef $Proxy.wrap("interfaces::BlockRef") { | ||
hash @0 :Data; | ||
height @1 :Int32; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) 2024 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
#ifndef BITCOIN_IPC_CAPNP_MINING_TYPES_H | ||
#define BITCOIN_IPC_CAPNP_MINING_TYPES_H | ||
|
||
#include <interfaces/mining.h> | ||
#include <ipc/capnp/common.capnp.proxy-types.h> | ||
#include <ipc/capnp/common-types.h> | ||
#include <ipc/capnp/mining.capnp.proxy.h> | ||
#include <node/miner.h> | ||
#include <node/types.h> | ||
#include <validation.h> | ||
|
||
namespace mp { | ||
// Custom serialization for BlockValidationState. | ||
void CustomBuildMessage(InvokeContext& invoke_context, | ||
const BlockValidationState& src, | ||
ipc::capnp::messages::BlockValidationState::Builder&& builder); | ||
void CustomReadMessage(InvokeContext& invoke_context, | ||
const ipc::capnp::messages::BlockValidationState::Reader& reader, | ||
BlockValidationState& dest); | ||
} // namespace mp | ||
|
||
#endif // BITCOIN_IPC_CAPNP_MINING_TYPES_H |
Oops, something went wrong.