Cardano Relay Configuration
Let's create a simple configuration for your core/relay node (for core node you will need to register keys/certificates which we will touch later)
Let's start by creating a folder structure for our nodes:
1
cd
2
mkdir -p cnode
3
cd cnode
4
mkdir -p config db sockets keys logs scripts
5
cd config
6
Copied!
We will be download the latest default configuration and genesis files from here: https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/index.html
cardano alonzo configuration files
Let's download them from our server's console (currently we are using 7370192 MainNet configuration files)
1
#checking the latest built for configs
2
export LAST_BUILD=$(curl -s https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/index.html | grep -e "This item has moved" | sed -e 's/.*build\/\(.*\)\/download.*/\1/')
3
#downloading configs
4
wget -q -O mainnet-config.json https://hydra.iohk.io/build/${LAST_BUILD}/download/1/mainnet-config.json
5
wget -q -O mainnet-alonzo-genesis.json https://hydra.iohk.io/build/${LAST_BUILD}/download/1/mainnet-alonzo-genesis.json
6
wget -q -O mainnet-byron-genesis.json https://hydra.iohk.io/build/${LAST_BUILD}/download/1/mainnet-byron-genesis.json
7
wget -q -O mainnet-shelley-genesis.json https://hydra.iohk.io/build/${LAST_BUILD}/download/1/mainnet-shelley-genesis.json
8
wget -q -O mainnet-topology.json https://hydra.iohk.io/build/${LAST_BUILD}/download/1/mainnet-topology.json
9
10
#list downloaded files
11
ls -al mainnet*
12
Copied!
you should have now 5 files in the config folder:
OPTIONAL: By default you have IOG (relays-new.cardano-mainnet.iohk.io) relay in your topology file, let's add one more: relays.stakepool247.eu
1
cat > mainnet-topology.json << EOF
2
{
3
"Producers": [
4
{
5
"addr": "relays-new.cardano-mainnet.iohk.io",
6
"port": 3001,
7
"valency": 2
8
},
9
{
10
"addr": "relays.stakepool247.eu",
11
"port": 3001,
12
"valency": 1
13
}
14
]
15
}
16
EOF
Copied!
We are almost done - I know that you are eager to test what we have done so far :) So let's test and run our Node on port 3000
Let's start with the core node:
1
cardano-node run --database-path /home/cardano/cnode/db --socket-path /home/cardano/cnode/sockets/node.socket --port 3000 --config /home/cardano/cnode/config/mainnet-config.json --topology /home/cardano/cnode/config/mainnet-topology.json
Copied!
Starting from version 1.23.0 the "LiveView" screen has been removed - now we have only text-based output. For more graphical output check the RTView application.
If you followed the guide, you should see this:
carano node syncing blocks
Last modified 1mo ago
Copy link