ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.65k stars 3.28k forks source link

interop: Supervisor Sync Speed is Insufficient #12903

Open axelKingsley opened 5 days ago

axelKingsley commented 5 days ago

Summary

The Supervisor is unable to backfill data into the logsdb at a sufficient rate, and needs to be improved.

Sync Speed

Across multiple measurements, the speed when backfilling logs into the supervisor is very low

Spot check while attempting to recover the MVP Devnet was about 25 blocks per minute (during an early portion of sync)

Spot checking ArgoCD logs while writing this ticket:

Estimating overall rate based on the sync start time to now:

This demonstrates that as we synchronize, we actually slow down over time. However, in all cases we are syncing so slowly that any natural network progression will outpace the Supervisor's backfill.

Theories and Hypotheses (Potential Solutions)

In investigating the FetchReceipt logic, it appears the Supervisor leverages the monorepo shared RPC Client with a Basic Receipt Fetcher. I suspect that this basic fetcher is not designed for heavy fetching like the supervisor is doing. The supervisor also has minimal heuristics around fetching techniques, and just tries to backfill block-by-block. I would guess that this naive behavior is causing backoffs and throttles

Fixes:

Testing

We'll have to try purging a local devnet DB after a long period of activity to observe the RPC behavior from the supervisor. This issue may not present in local environments due to local infrastructure making network calls cheaper.

Priority

Critical for a stable devnet. Not blocking local devnets or other testing.