SCORU: Maintain inbox in smart-contract rollup node
Owner: @ole.kruger
Context
The smart-contract rollup node must closely follow layer 1 to maintain the rollup inbox.
This requires:
- monitoring layer 1 heads and reorganizations ;
- fetching new messages ;
- computing the Merkelized inbox.
The state of the rollup node must be persistent to minimize the amount of data needed to catch up with the inbox evolution when the node is shut down.
This MR introduces a basic store (based on IRMIN) as well as an abstraction of layer 1 chain events.
Maintaining the rollup node inbox is done by reacting to these events and by executing the same code as the protocol to construct the same Merkelized inbox.
This MR does not construct the Merkle proof for the inbox as we wait for the integration of Irmin Merkle Proofs in the environment. The maintenance simply follows the protocol behavior for the moment, that is computing a dummy hash.
Fixes #2098 (closed) #2269 (closed) #2277 (closed)
Manually testing the MR
dune exec tezt/tests/main.exe -- -c sc_rollup inbox node --verbose
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.rst
for the protocol and the environment, theDevelopment Version
section ofCHANGES.md
for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR