This repository is meant to speed up the process of creating multiple nodes with peers for the same head, which can speed up the development proccess when you need to manage multiple nodes. This is not in any case a replacement for the standard process, which you should at least run through once to understand what is going on:
Scripts need these environment variables to be defined:
HYDRA_NODE_VERSION- version from hereCARDANO_NODE_SOCKET_PATHHNODEBIN- directory of binary executable for hydra node
Main script for creating the hydra node. It will fetch protocol parameters, if not provided in the data folder:
- data/protocol-parameters.json
| Parameter | Description |
|---|---|
--node-id <node-id> |
Node Id |
--testnet-magic <number> or --mainnet |
Choose the network magic |
--deposit-deadline <number> |
Deposit deadline for incemental commits |
-s, --stop-node |
Stop the service |
--zero-fees |
Set fees to zero in the head |
-d, --deploy-systemd |
Deploy as systemd |
-s, --stop-node |
Stop the service |
| all other paramters from hydra-node | You can pass parameters defined in the official documentation |
Script for publishing reference scripts on chain that are needed for the hydra node creation. To publish a script, you should have enough ADA on the address from signing key to cover the costs (~30ADA). It saves reference script tx ids into: data/reference-scripts.json
Note: This script is essential if you are creating a hydra node on the private network (yaci-devkit)
| Parameter | Description |
|---|---|
--node-id <node-id> |
Node Id |
--testnet-magic <number> or --mainnet |
Choose the network magic |
--signing-key-file <path> |
Path to the signing key |
Script for generating node, hydra credentials (adds peers if specified). It saves the keys into: data/credentials/{node-id} You can also add credentials manually to the:
- data/credentials/{node-id}/{node-id}-{hydra, node}.{sk, vk}
| Parameter | Description |
|---|---|
--node-id <node-id> |
Node Id |
--generate-wallet |
Generate wallet (funds account) for the node |
--add-peer <host>:<node-port>:<api-host>:<api-port> |
Adding credentials to peers.json |
--testnet-magic <number> or --mainnet |
Choose the network magic |
- Change env file if needed, define
CARDANO_NODE_SOCKET_PATH,HNODEBINif not defined - Run
generate-credentials.sh --node-id vlad --add-peer 127.0.0.1:5001:127.0.0.1:4001 - Fund the address in data/vlad/vlad-node.addr
- If you want to add more peers: repeat steps 2 - 3 (diffetent ports, hosts and node-ids) until you are satisfied
- Run
hydra-node.sh --node-id vlad - If you have peers specified: repeat step 5 (different node-ids) to run your peer nodes
- Change env file if needed, define
CARDANO_NODE_SOCKET_PATH,HNODEBINif not defined - Don't forget to change
--testnet-magicin the env file to your number - Run
generate-credentials.sh --node-id vlad --add-peer 127.0.0.1:5001:127.0.0.1:4001 - Fund the address in data/vlad/vlad-node.addr
- If you want to add more peers: repeat steps 3 - 4 (diffetent ports, hosts and node-ids) until you are satisfied
- Run
publish-reference-scripts.sh --node-id vlad - Run
hydra-node.sh --node-id vlad - If you have peers specified: repeat step 7 (different node-ids) to run your peer nodes
- Why peers cant be added on the fly (yet)
- Blockfrost for hydra (WIP)
- MeshJs SDK for hydra
- Why multiple heads per node are not available (yet)