optimism
optimism copied to clipboard
Interop: long-running ChainProcessor background task
Historical sync of events: syncing an op-supervisor, to network that has been running for a while, is challenging. The op-supervisor has to retrieve events from op-geth, without overwhelming the RPC, and while adjusting to live chain adjustments as the sync happens. To do so, receipt-retrieval by the op-supervisor needs to be an iterative background-process.
The ChainProcessor was already refactored to do this, but there's a toggle to force synchronous processing. This should be switched to asynchronous, and unit-tests for chain_processor.go need to cover it.