Skip to content

Rollup node: fix possible GC data loss when reorganisation happens

Alain Mebsout requested to merge alain@functori@gc-iter into master

Context

Fixes #6745 (closed).

This MR makes the GC iterate over all elements of the store instead of following the chain. This allows to keep data for alternative heads that may be required in the future.

Running a full node on etherlink does not reveal any performance penalty (15s on average for a store GC). The only downside is that we have to load in memory temporarily the elements (which are on disk but not in the index log) for a refutation window when initiating the GC.

Manually testing the MR

dune exec src/lib_layer2_store/test/main.exe -- --file test_indexed_store.ml
Edited by Alain Mebsout

Merge request reports