[go: up one dir, main page]

EVM/Node: check out of sync in apply_evm_events

Checks the out of sync of rollup node blocks in Evm_context.apply_evm_events instead of the evm events follower.

The current implementation does:

  1. Open a stream with the rollup node
  2. Get a block
  3. Sends the block to Evm_events_follower, Signals_publisher etc, etc.
  4. Go back to 2

(3.) is not blocking, we have observed that we move to (4.) without finishing (3.) if there are a lot of events. However, the last known L1 level is updated at the end of apply_evm_events. Therefore, it fails on Out_of_sync because in Evm_events_followers the block arrives too soon.

We have (at least) 2 ways to fix this problem:

  1. The obvious one is to wait on (3.) completion, but it's risky as it can be long as it relies on HTTP requests.
  2. Let Evm_context deal with this logic. As requests on the worker are processed sequentially we can ask the Rollup_node_follower to push the blocks one by one from the stream, without waiting on completion, and we are sure that the Evm_context worker will process them sequentially.
Edited by Valentin Chaboche

Merge request reports

Loading