[go: up one dir, main page]

SCORU/Node: Store v2 where messages don't have metadata and inboxes and commitments are versioned

Context

This MR introduces a new format for the rollup node store by changing how messages are stored, by removing all unnecessary metadata. This makes the store/table more future proof.

The messages used to be stored in an indexed file associating payload inbox witnesses to structures of the form :

+-----------------------+
| is_first_block        | <------ header
| predecessor           |
| predecessor_timestamp |
| number of messages    |
+-----------------------+
| messages list         | <------ body
+-----------------------+

whereas messages are now stored as :

+---------------+
| block_hash    | <------ header
+---------------+
| messages list | <------ body
+---------------+

The commitments and inboxes also now use the versioned encoding.

Fixes #5689 (closed).

Depends on !8687 (merged), !8676 (merged), !8689 (merged), !8715 (merged).

Manually testing the MR

Run the migration tests for the rollup node:

git checkout HEAD~2 # so that the nairobi and mumbai rollup nodes still use version 1
make
dune exec tezt/tests/main.exe -- -f sc_rollup.ml store migration -v

The log should show (for the Nairobi->Alpha migrations):

[09:00:51.995] [sc-rollup-node2] Starting store migration
[09:00:51.995] [sc-rollup-node2] - Migrating store from v1 to v2
[09:00:52.013] [sc-rollup-node2] Store migration completed
Edited by Alain Mebsout

Merge request reports

Loading