Rollup node: correctly overwrite outbox messages in the DB on reorg
What
This MR contains a fix for how the rollup node registers outbox messages in its DB in case of reorg.
Why
This issue created a problem on ghostnet for some operators, which triggered an assert false in the code. This makes the rollup node enter degraded mode repeatedly (every 10s) but it can still progress (by hiccups).
How
- Properly delete messages if the new block in the reorg does not have any.
- Emit an error log but don't crash if the issue reproduces.
- Don't try to execute outboxes if the config filters everything out.
Testing
dune exec tezt/tests/main.exe -- -f sc_rollup.ml reorg
You can run the test
dune exec tezt/tests/main.exe -- -f sc_rollup.ml -t 'Alpha: wasm_2_0_0 - Outbox execution when reorg without message should not crash' -v
before the commit Rollup node: emit error event when outbox message is missing from PVM and verify it fails.
Edited by Alain Mebsout