For the complete documentation index, see llms.txt
Set up boot node
Boot nodes serve as initial connection points for nodes joining the Midnight Network. They help new nodes discover and connect to active peers in the network. While running a boot node is optional, doing so strengthens network decentralization and improves peer discovery.
This guide provides step-by-step instructions for setting up a boot node for Midnight.
Prerequisites
Before setting up your Midnight boot node, ensure you have the following:
- Cardano-db-sync instance set up with accessible PostgreSQL port.
- Midnight node set up with the environment variables set.
Set up a boot node
Use the following command to run Midnight node in boot node mode. Choose the configuration for your target network.
Run the command from your home directory. The node reads its settings from res/cfg in the directory you start it from. CFG_PRESET loads the settings for your network. CARDANO_SECURITY_PARAMETER is 432 for Preview and 2160 for Preprod and Mainnet.
- Preview
- Preprod
- Mainnet
CFG_PRESET=preview CARDANO_SECURITY_PARAMETER=432 midnight-node \
--chain /home/midnight/res/preview/chain-spec-raw.json \
--base-path /home/midnight/data \
--listen-addr /ip4/0.0.0.0/tcp/30333 \
--bootnodes /dns/bootnode-1.preview.midnight.network/tcp/30333/ws/p2p/12D3KooWK66i7dtGVNSwDh9tTeqov1q6LSdWsRLJvTyzTCaywYgK \
--bootnodes /dns/bootnode-2.preview.midnight.network/tcp/30333/ws/p2p/12D3KooWHqFfXFwb7WW4jwR8pr4BEf562v5M6c8K3CXAJq4Wx6ym \
--no-private-ip
CFG_PRESET=preprod CARDANO_SECURITY_PARAMETER=2160 midnight-node \
--chain /home/midnight/res/preprod/chain-spec-raw.json \
--base-path /home/midnight/data \
--listen-addr /ip4/0.0.0.0/tcp/30333 \
--bootnodes /dns/bootnode-1.preprod.midnight.network/tcp/30333/ws/p2p/12D3KooWQxxUgq7ndPfAaCFNbAxtcKYxrAzTxDfRGNktF75SxdX5 \
--no-private-ip
CFG_PRESET=mainnet CARDANO_SECURITY_PARAMETER=2160 midnight-node \
--chain /home/midnight/res/mainnet/chain-spec-raw.json \
--base-path /home/midnight/data \
--listen-addr /ip4/0.0.0.0/tcp/30333 \
--bootnodes /dns4/bootnode-whippet-bengal.mainnet.midnight.network/tcp/30333/ws/p2p/12D3KooWMmfho3eEFvcnThAfzc9QfieTc91fdhvByL4a2naRjbr2 \
--no-private-ip
A Mainnet node that syncs from genesis with node 1.0.300 stops at block 1788979. Node 1.0.400 fixes this issue, so use node 1.0.400 for Mainnet.
Known network boot nodes
Use the boot nodes corresponding to your target network environment.
- Preview
- Preprod
- Mainnet
--bootnodes /dns/bootnode-1.preview.midnight.network/tcp/30333/ws/p2p/12D3KooWK66i7dtGVNSwDh9tTeqov1q6LSdWsRLJvTyzTCaywYgK \
--bootnodes /dns/bootnode-2.preview.midnight.network/tcp/30333/ws/p2p/12D3KooWHqFfXFwb7WW4jwR8pr4BEf562v5M6c8K3CXAJq4Wx6ym
--bootnodes /dns/bootnode-1.preprod.midnight.network/tcp/30333/ws/p2p/12D3KooWQxxUgq7ndPfAaCFNbAxtcKYxrAzTxDfRGNktF75SxdX5 \
--bootnodes /dns/bootnode-2.preprod.midnight.network/tcp/30333/ws/p2p/12D3KooWNrUBs22FfmgjqFMa9ZqKED2jnxwsXWw5E4q2XVwN35TJ
--bootnodes /dns4/bootnode-whippet-bengal.mainnet.midnight.network/tcp/30333/ws/p2p/12D3KooWMmfho3eEFvcnThAfzc9QfieTc91fdhvByL4a2naRjbr2 \
--bootnodes /dns4/bootnode-labrador-marten.mainnet.midnight.network/tcp/30333/ws/p2p/12D3KooWK2c9vf4UtrjGB27A8weKd6eiBnRQSfeR4TVmQv9MDdDt \
--bootnodes /dns4/bootnode-glider-spaniel.bn.midnight.network/tcp/30333/ws/p2p/12D3KooWHif7N1ZPhrB8WxTFqjWTxo2U2a2FtJuSA8XRBdFMss6i \
--bootnodes /dns4/bootnode-dog-pelican.bn.midnight.network/tcp/30333/ws/p2p/12D3KooWQ2NCZCnqkYKHKsYVUc8amBKAk4jhEMJyYDAJjmSuM4uK
Next steps
With the boot node set up, run the RPC node to interact with the Midnight blockchain.