Bootstrap using a Public Relay
Boostrapping Dolos from a public relay node is the natural way of syncing the history of the chain but also a very slow option. It involves connecting to a single, public relay node using Ouroboros node-to-node mini-protocols and syncing the chain from origin.
If you're looking for a faster way of bootstrapping Dolos, please refer to the alternative Mithril option.
In essence, this bootstrapping procedure is just about starting Dolos and let it do its thing. From Dolos' perspective, the procedure involves the following:
- Read the genesis files to load initial data
- Connect to the configure upstream node using Ouroboros
- Start the chain-sync mini-protocol from origin
- Keep syncing until reaching the tip of the chain
Configuration
To bootstrap using a public relay node, the only required configuration is the one inside the upstream
section. You will probably have this configuration already since it's mandatory for almost every Dolos operation.
property | type | example |
---|---|---|
peer_address | string | "preprod-node.world.dev.cardano.org:30000" |
network_magic | integer | 1 |
is_testnet | boolean | true |
peer_address
: network address of peer node using{host}:{port}
syntax.network_magic
: the magic number of the network we're connecting to.is_tesnet
: flag to indicate if this network is a testent or not.
This is how the configuration fragment would look like inside a dolos.toml
file:
[upstream]
peer_address = "preprod-node.world.dev.cardano.org:30000"
network_magic = 1
is_testnet = true
If you use the dolos init
command to initialize your configuration, these values will be already populated with their defaults for each of the known networks.
Execution
To start the bootstrap procedure, you need to run the following command line:
dolos sync
The process will take from few hours to several days depending on the network. You'll see different log outputs, some lines will indicate the slot of the latest block pulled from the relay node. Compare this value to the tip of the chain as shown in a public explorer to track the overall progress.
The process support resuming from previous runs. You can safely interrupt the process and continue again from where you left off by just running the command again.