Deamon provides the run function that tracks the head of Tezos nodes to compute the state of a rollup asynchronously.

run daemon ~data_dir cctxt starts the main daemon loop. The goal of this loop is to track the head of the Tezos node behind cctxt, in order to keep the daemon state up-to-date with what happens on layer 1.

If the connection with layer 1 is lost, the function will regularly try to reconnect to it. The initial delay between two attempts can be specified using the reconnection_delay field in the configuration file.

When the daemon needs to send Tezos operations, it does so by assuming the identity in the state.