-
Notifications
You must be signed in to change notification settings - Fork 3
Description
In #343 we discovered a few issues.
the Docker compose test is configured with Anvil as L1 with a block time of 1s and 4 slots per epoch. this means that blocks are finalized after ~8s. however, during testing I ran into a problem that l2geth didn't know some L1 messages (and banned RN peers). this is due to a hardcoded fixed request interval of L1 messages of 10s in l2geth. so this is only an issue for testing but still needs to be fixed. I'll open a PR to add a flag so that we can configure it in the test to 1 or 2 seconds.
This can not only happen with l2geth but also with other rollup node followers, especially in the case where we relay L1 messages after a few block confirmations instead of L1 finalization. Every time we hit the inclusion threshold there is a chance that some nodes have not yet seen L1 messages for at least the
rollup-node/crates/watcher/src/lib.rs
Line 42 in 6b1a715
pub const SLOW_SYNC_INTERVAL: Duration = Duration::from_secs(2); |
With block times of lower hundreds ms this could be dozens of L2 blocks where a "unlucky" follower node can't process the blocks because it simply hasn't queried the L1 yet.
To address this we should add a safety margin of at least SLOW_SYNC_INTERVAL+X
where X
is some constant, to allow in sync nodes to receive the necessary information from L1.