Sequencer: Add optimistic simulation module
Context
Previous MR: !9142 (merged)
Next MR: !9448 (closed)
Depends on !9141 (closed) sequencer kernel MR
This MR introduces Optimistic simulation module which resembles Simulation one from with Rollup Node. The only difference it's not supposed to be reset every block, as optimistic simulation should converge with the upcoming roll-up node state.
Optimistic simulation reacts to two kind of events:
-
new head: this one basically 1. supply all the delayed inbox messages from the block to the sequencer kernel, which lands to the delayed inbox; 2. consumes supplied differences instantly by the sequencer kernel, advancing PVM state
-
new sequences of messages recevied: it just feeds PVM with new messages to obtain the latest PVM state. This step currently is workarounded as it's done in quadratic time due to this issue #6020. It will be fixed and be linear as soon as this one gets merged
Manually testing the MR
This MR doesn't introduce any tests but the following one wraps up this piece of work and adds tezt.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR