Start your node
Starting the node uses the command cardano-node run and a set of options.
You can get the complete list of available options with cardano-node run
1
--topology FILEPATH The path to a file describing the topology.
2
--database-path FILEPATH Directory where the state is stored.
3
--socket-path FILEPATH Path to a cardano-node socket
4
--host-addr HOST-NAME Optionally limit node to one ipv6 or ipv4 address
5
--port PORT The port number
6
--config NODE-CONFIGURATION Configuration file for the cardano-node
7
--validate-db Validate all on-disk database files
8
--shutdown-ipc FD Shut down the process when this inherited FD reaches EOF
9
--shutdown-on-slot-synced SLOT Shut down the process after ChainDB is synced up to the
10
specified slot
11
-h,--help Show this help text
Copied!
To start the node, run the following command from inside the relay directory:
1
cardano-node run \
2
--topology testnet-topology.json \
3
--database-path db \
4
--socket-path db/node.socket \
5
--host-addr x.x.x.x \
6
--port 3001 \
7
--config testnet-config.json
Copied!
The above command will create a db directory inside the relay directory
Replace x.x.x.x with your public IP
Open a new terminal or ssh session
Create the environment variable CARDANO_NODE_SOCKET_PATH
1
export CARDANO_NODE_SOCKET_PATH=~/relay/db/node.socket
Copied!
Check whether the node is syncing by fetching the current tip, a couple of times, slotNo should be increasing. --testnet-magic 1097911063 identifies the Shelley testnet
1
cardano-cli shelley query tip --testnet-magic 1097911063
2
​
3
{
4
"blockNo": 16900,
5
"headerHash": "eb964968c860a8abb1ab81bc9da54b572efc01428a5c98d15e5affb5dd9afd12",
6
"slotNo": 371284
7
}
8
​
9
​
10
​
11
cardano-cli shelley query tip --testnet-magic 1097911063
12
​
13
{
14
"blockNo": 16903,
15
"headerHash": "ca49a73331bf29808aa33361ae98b41fe797bafb922901af556b7605e386645b",
16
"slotNo": 371358
17
}
Copied!
QUESTIONS AND FEEDBACK
If you have any questions and suggestions while taking the lessons please feel free to ask in the forum and we will respond as soon as possible.
Last modified 9mo ago
Copy link