matter-labs / era-test-node

In-memory node that can be used for integration testing and debugging.
https://matter-labs.github.io/era-test-node
Apache License 2.0
313 stars 76 forks source link

refactor: separate block sealing logic from executing txs #389

Closed itegulov closed 1 week ago

itegulov commented 1 week ago

What :computer:

Hefty refactoring of block sealing into its own logical layer on top of tx execution. This opens up a way to support several txs per block and dynamic block sealing in general. This PR also gets rid of all the ad-hoc empty block logic and instead replaces them with seal_block([]). Making us have a centralized place where all the blocks are created and thus this PR closes #358

The code is still pretty messy but I want to gradually improve it as I suspect many things here will go into separate subcomponents (e.g. BlockSealer, BatchSealer etc)

Why :hand:

Entangled sealing logic made it very hard to make it customizable for #362