Cardano Node

From Cardano Blockchain Wiki
Jump to navigation Jump to search
Cardano Node
A white football
The core component that is used to participate in a Cardano decentralised blockchain.
DevelopersIOHK
Initial release1.0.0 17 Jan 2020
Last release1.35 25 Jun 2022
Written inHaskel, Shell
LicenseApache-2.0 license
PlatformLinux, Mac, Windows
Repositoryhttps://github.com/input-output-hk/cardano-node
Documentationhttps://input-output-hk.github.io/cardano-wallet/user-guide/cli

The cardano-node is the core component that is used to participate in a Cardano decentralized blockchain. Cardano node acts exactly how banks and authorized entities work in the centralized financial system. It’s basically a service node that authenticates the interaction within the network to impart complete transparency. Nodes further undertake the responsibility to validate transactions and produce blocks.

Node application aggregates components from other packages:

  • consensus
  • ledger
  • cli
  • configurations
  • Networking
  • logging
  • Monitoring

There are two types of nodes: Block-producing nodes, and relay nodes, which are nodes with no operational certificates.

Relay nodes do not have any keys, so they cannot produce blocks. Instead, relays act as proxies between the core network nodes and the internet, establishing a security perimeter around the core, block-producing network nodes. Since external nodes cannot communicate with block-producing nodes directly, relay nodes ensure that the integrity of the core nodes and the blockchain remains intact, even if one or more relays become compromised. If a relay node becomes compromised, you can simply switch it off and use a different one.


Block production Cardano produces individually verifiable blocks in a peer-to-peer protocol. The platform employs a robust block-producing system to develop the blockchain. Meanwhile, consensus adds security layers and decides who can participate.

Transaction validation Validation of transactions is a method in which slot leaders ascertain the needed amount for the senders. Their obligation also includes the determination of transactional parameters. Once confirmed, leaders record the data assuming it is an active block, to add it later after cross-verification.


Cardano Testnet

Starting the node on the testnet network requires 4 configuration files:

  • topology.json
  • BYRON genesis.json
  • SHELLEY genesis.json
  • config.json

Download testnet configuration files: ‎

cd $HOME
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/testnet-config.json
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/testnet-shelley-genesis.json
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/testnet-byron-genesis.json
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/testnet-topology.json

run relay node on the testnet: ‎

cardano-node run \
   --topology $HOME/testnet-topology.json \
   --database-path $HOME/db \
   --socket-path $HOME/node.socket \
   --host-addr 0.0.0.0 \
   --port 3000 \
   --config $HOME/testnet-config.json

Cardano Mainnet

Starting the node and connecting it to the mainnet network requires 5 configuration files.

  • config.json
  • byron-genesis.json
  • shelley-genesis.json
  • alonzo-genesis.json
  • topology.son

Download mainnet configuration files:‎

cd $HOME
wget https://hydra.iohk.io/build/7654130/download/1/mainnet-config.json
wget https://hydra.iohk.io/build/7654130/download/1/mainnet-byron-genesis.json
wget https://hydra.iohk.io/build/7654130/download/1/mainnet-shelley-genesis.json
wget https://hydra.iohk.io/build/7654130/download/1/mainnet-alonzo-genesis.json
wget https://hydra.iohk.io/build/7654130/download/1/mainnet-topology.json

To run relay node on the mainnet: ‎

cardano-node run \
   --topology $HOME/mainnet-topology.json \
   --database-path $HOME/db \
   --socket-path $HOME/node.socket \
   --host-addr 0.0.0.0 \
   --port 3000 \
   --config $HOME/mainnet-config.json

To run block production node on mainnet: ‎

cardano-node run \
   --topology $HOME/mainnet-topology.json \
   --database-path $HOME/db \
   --socket-path $HOME/node.socket \
   --host-addr 0.0.0.0 \
   --port 6000 \
   --config $HOME/mainnet-config.json \
   --shelley-kes-key kes.skey \
   --shelley-vrf-key vrf.skey \
   --shelley-operational-certificate node.cert


The node will start syncing its local database with the network, which on the mainnet may take up to several days. ‎

[vps-eba2:cardano.node.ChainDB:Info:5] [2022-09-01 12:16:45.62 UTC] Started opening Chain DB
[vps-eba2:cardano.node.ChainDB:Info:5] [2022-09-01 12:16:45.62 UTC] Started opening Immutable DB
[vps-eba2:cardano.node.ChainDB:Info:5] [2022-09-01 12:16:45.62 UTC] No valid last location was found. Starting from Genesis.
[vps-eba2:cardano.node.ChainDB:Info:5] [2022-09-01 12:16:45.62 UTC] Opened imm db with immutable tip at genesis (origin) and chunk 0
[vps-eba2:cardano.node.ChainDB:Info:5] [2022-09-01 12:16:45.62 UTC] Started opening Volatile DB
[vps-eba2:cardano.node.ChainDB:Info:5] [2022-09-01 12:16:45.62 UTC] Opened vol db
[vps-eba2:cardano.node.ChainDB:Info:5] [2022-09-01 12:16:45.62 UTC] Started opening Ledger DB
[vps-eba2:cardano.node.ChainDB:Info:5] [2022-09-01 12:16:45.62 UTC] Replaying ledger from genesis
[vps-eba2:cardano.node.ChainDB:Info:5] [2022-09-01 12:16:45.93 UTC] Opened lgr db
[vps-eba2:cardano.node.ChainDB:Info:5] [2022-09-01 12:16:45.93 UTC] Started initial chain selection