Sequencer: Respect messages order in seq_batcher
Context
Previous MR !9447 (closed)
This MR basically makes use of the previous optimistic simulation module in the sequencer batcher. Currently, strategy of the sequencer batcher is to form a sequence like that:
- let's say Seq_batcher receives a new L1 blockhead
- form unfinished sequences which starts as
[SoL, IpL, ... current block messages but EoL..., which is supplied to the Optimistic simulation - append newly arrived operations from RPC to both: simulation & current sequence
- new block arrives: finalize the previous sequence and start new with
[SoL, IpL, ... new block messages but EoL...
This is the simplest possible strategy and it doesn't work in case of reorg. So the batcher works under the assumption of finalization 0 blocks (instance finalization), it will be rewritten to work in case of finalization of 2 blocks in next MRs.
Also, this MR adds a new tezt which inspects that /local/durable/wasm_2_0_0/inspect spit out advanced state after new messages & new block head. Basically, I added a new kernel which just concatenates all the supplied messages to it in order to witness what messages the kernel was supplied with.
Strictly speaking, I should've added one more test which also checks that the simulation state converges with batched/injected Sequence messages eventually, however, this one is quite big already so it will be done in follow-up MR.
Manually testing the MR
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