咨询network-bootstrapper.jar的正确执行结构及Corda节点启动问题
Correct Execution Structure for Corda Network Bootstrapper
Let's walk through the exact directory setup and execution steps you need to get the network-bootstrapper.jar working properly:
1. Directory Structure Requirements
First, your target <nodes-root-dir> needs to be a dedicated folder that holds individual .conf configuration files for every node in your network—including notaries. There's no need for nested subfolders here; just place all the .conf files directly in this root directory.
Here's a concrete example of what this looks like:
nodes-root-dir/ ├── notary.conf ├── partyA.conf ├── partyB.conf └── partyC.conf
2. Node Configuration File Basics
Each .conf file must include core settings that define the node's identity and connectivity. At minimum, you'll need:
myLegalName: The X500 identifier for the node (e.g.,O=Notary, L=New York, C=US)p2pAddress: The peer-to-peer communication address (e.g.,localhost:10002)rpcSettings.address: The RPC endpoint for client connections (e.g.,localhost:10003)rpcSettings.adminAddress: The admin RPC endpoint (e.g.,localhost:10004)- For notaries: Add the
notaryblock, e.g.,notary { validating = true }(usefalsefor non-validating notaries)
3. Execution Steps
Once your directory and configs are ready, follow these steps to run the bootstrapper:
- First, ensure you have the
network-bootstrapper.jarfile accessible (you can keep it in the same parent folder as your<nodes-root-dir>, or use its full file path in the command). - Open your terminal/command prompt, then run:
Replacejava -jar network-bootstrapper.jar <path-to-nodes-root-dir><path-to-nodes-root-dir>with either the absolute path (like/home/me/corda/nodes-root-dir) or relative path (likenodes-root-dirif the jar is in the same parent folder) to your config directory.
4. What the Bootstrapper Does
After running the command, the bootstrapper will generate all the necessary files to run your Corda network:
- A shared
network-parametersfile that defines network-wide rules (like minimum platform version) - A dedicated folder for each node inside your
<nodes-root-dir>(or anodessubfolder, depending on your Corda version) - Each node folder will contain the full runtime setup: the node jar, cordapps, keystores, a finalized
node.conf, and all required dependencies to start the node.
内容的提问来源于stack exchange,提问作者evh69

