SCORU/Node: Compute genesis commitment instead of fetching with RPC
Context
The genesis commitment is stored on the L1 only temporarily and it will become unavailable after a while. This patch is necessary for running a rollup node for a rollup that was originated a while ago.
The check that ensures we computed the correct genesis state is also moved to where we store the genesis commitment.
Fixes #5439 (closed).
Manually testing the MR
When running on the rollup of #5439 (closed) (with the additional patch provided in !8618 (merged) for performance):
./octez-smart-rollup-node-PtMumbai -E https://rpc.mumbainet.teztnets.xyz run observer for sr1SgxtCbLJnV6KtBS3HxuKCZJvuRKCPgFdM with operators --data-dir /tmp/something
one should be able to see the following log, indicating that the rollup node is making progress and was able to process the genesis commitment.
May 2 11:15:53.496 - 016-PtMumbai.sc_rollup_node.daemon: A new iteration of process_heads has been triggered: processing 167108 heads
May 2 11:15:53.496 - 016-PtMumbai.sc_rollup_node.daemon: from level 348754 to level 515861
May 2 11:15:53.910 - 016-PtMumbai.sc_rollup_node.daemon: Processing new head BLr1N88nQE88PZ2kfadhrhZdYDsmGWrpiyPtSEvY1sSKEozFJXt at
May 2 11:15:53.910 - 016-PtMumbai.sc_rollup_node.daemon: level 348754
May 2 11:15:55.260 - 016-PtMumbai.sc_rollup_node.commitment: Computing and storing new commitment for level 348754
May 2 11:15:55.693 - 016-PtMumbai.sc_rollup_node.daemon: Finished processing layer 1 head
May 2 11:15:55.693 - 016-PtMumbai.sc_rollup_node.daemon: BLr1N88nQE88PZ2kfadhrhZdYDsmGWrpiyPtSEvY1sSKEozFJXt at level 348754
Edited by Alain Mebsout