Skip to content

SCORU/Node: faster catching up on long histories

Context

When connected to a remote L1 tezos node over http(s), the majority (98%) of the time spent for processing blocks in the rollup node is in two RPC calls:

  1. fetching the full tezos blocks
  2. ensuring the inbox is the same on L1 and L2.

To remediate (1), this MR makes the rollup node prefetch blocks (64 by 64 by default, to fill the cache), when catching up on a chain.

For (2), the inbox conformity check is only performed when we save a commitment when catching up (it is always performed in the normal regime). This does not hamper confidence too much as the inbox structure retrieved through L1 contains the skip list structure with the backpointers in the inbox history.

Depends on !8618 (merged).

Manually testing the MR

octez-smart-rollup-node-PtMumbai -E https://rpc.mumbainet.teztnets.xyz run observer for sr1NN58fxju9nj48r11Pdhc7kQDeCKydmX53 with operators --data-dir /tmp/somewhere

should take around 40 minutes to process 20345 blocks, i.e. 0.12s per block on average as opposed to more than 1s per block before this patch.

Edited by Alain Mebsout

Merge request reports

Loading