pub async fn fork(&mut self) -> anyhow::Result<()> {
        let mut txn = self
            .storage
            .start_transaction()
            .await
            .context("start_transaction")?;
        let Some(old) = txn
            .consensus_dal()
            .global_config()
            .await
            .context("global_config()")?
        else {
            return Ok(());
        };
        let new = GlobalConfig {
            genesis: validator::GenesisRaw {
                chain_id: old.genesis.chain_id,
                fork_number: old.genesis.fork_number.next(),
                first_block: txn
                    .consensus_dal()
                    .next_block()
                    .await
                    .context("next_block()")?,

                protocol_version: old.genesis.protocol_version,
                validators_schedule: old.genesis.validators_schedule.clone(),
            }
            .with_hash(),
            registry_address: old.registry_address,
            seed_peers: old.seed_peers,
        };
        txn.consensus_dal().try_update_global_config(&new).await?;
        txn.commit().await?;
        Ok(())
    }
[Main node only] creates a new consensus fork starting at
the last sealed L2 block. Resets the state of the consensus
by calling `try_update_genesis()`.
core/lib/dal/src/consensus_dal/mod.rs