Skip to content

Local Node

Boostrapping from a local full node is an efficient way to synchronize Dolos from a trusted source. The downside is having to run two processes (the source node + dolos) where some overlap exist. This method involves connecting via Ouroboros node-to-node mini-protocols.

In essence, this bootstrapping procedure is just about starting Dolos and let it do its thing. From Dolos’ perspective, the procedure involves the following:

  1. Read the genesis files to load initial data
  2. Connect to the configure upstream node using Ouroboros
  3. Start the chain-sync mini-protocol from origin
  4. 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.

propertytypeexample
peer_addressstring”localhost:30000”
network_magicinteger1
is_testnetbooleantrue
  • 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 = "localhost:30000"
network_magic = 1
is_testnet = true

Execution

To start the bootstrap procedure, you need to run the following command line:

Terminal window
dolos sync

The process will take several hours depending on the chain you’re synchronizing. 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.