SCORU/Node: faster computation of large reorganizations
Context
Computing missing blocks for large reorganizations may be slow depending on the connection because we only fetch 8 predecessors at a time. This patch allows to fetch 65k blocks at a time when we know it is necessary (i.e. when we know the distance we want to browse). This makes fetching and computing reorganizations a lot faster.
Manually testing the MR
When running an observer rollup node on a rollup that was originated more than 150000 blocks ago, with
./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.
A new iteration of process_heads has been triggered: processing 167015 heads
from level 348754 to level 515768
Processing new head BLr1N88nQE88PZ2kfadhrhZdYDsmGWrpiyPtSEvY1sSKEozFJXt at
level 348754