Rollup node: SQLite store
What
This MR replaces the file base store of the rollup node by a database implementation based on SQLite.
Note: The migration code from the old file based store to the new SQLite store is not implemented yet.
Why
The current index and file based store is simple in structure but some implementation details make it tricky. In particular the GC relies on splitting the data in fresh and stale to allow adding information during the GC. Also the GC is implemented by copying data is fresh stale stores and moving files around which can be problematic on network drives.
This SQL implementation is supposed to make the rollup node store (and the rollup node itself) more reliable.
How
We use sqlite3 and the SQLite wrapper library that was extracted from the EVM node in !15053 (merged).
Each index and indexed file is translated to a SQL table.
Manually testing the MR
The use of the new store should be covered by the CI.
Unit tests:
dune exec src/lib_smart_rollup_node/test/main.exe
Tezt tests:
dune exec tezt/tests/main.exe -- -f sc_rollup.ml