Syncing a light node from a trusted hash
This guide goes over how to sync a DA light node from a trusted hash. The example is with Mainnet Beta. You will need to adjust the commands accordingly for Mocha, Arabica, or a custom network.
WARNING
Syncing to a trusted hash means that you will not sample the entire chain. This adds a trust assumption that you trust the history of the chain up to that point and that you trust the entity where you get the hash from. In this example, the trusted entity is a consensus endpoint or Celenium.
Get trusted height & hash from a consensus endpoint or Celenium.
Initialize the node store
shcelestia light init --p2p.network <network>
celestia light init --p2p.network <network>
Set the trusted height & hash
- Open your
config.toml
at.celestia-light/config.toml
(or.celestia-light-<other-network>/config.toml
) - Set
DASer.SampleFrom
to the trusted height (e.g.SampleFrom = 123456
)
- Open your
Run the node with the hash and flag:
celestia light start --headers.trusted-hash <hash_of_block_n> \
--p2p.network <network> --core.ip <consensus-node-rpc>
celestia light start --headers.trusted-hash <hash_of_block_n> \
--p2p.network <network> --core.ip <consensus-node-rpc>
For service operators
If you're using multiple light nodes for similar services like tracking the same rollup, it is recommended to use the same hash and height for them all services using the same starting height.