From da962b6f8dd9abaef28964407d7498bfee1e194c Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Mon, 5 Feb 2024 14:54:48 +0100 Subject: [PATCH] Proto: clear Pending_denunciations table for migration protocol --- src/proto_alpha/lib_protocol/init_storage.ml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/proto_alpha/lib_protocol/init_storage.ml b/src/proto_alpha/lib_protocol/init_storage.ml index 8d5ad4dff4f4..aa7c14e0dfe0 100644 --- a/src/proto_alpha/lib_protocol/init_storage.ml +++ b/src/proto_alpha/lib_protocol/init_storage.ml @@ -200,6 +200,12 @@ let prepare_first_block chain_id ctxt ~typecheck_smart_contract let* ctxt = Sc_rollup_refutation_storage.migrate_clean_refutation_games ctxt in + (* We usually clear the table at the end of the cycle but the migration + can happen in the middle of the cycle, so we clear it here. + Possible consequence: the slashing history could be inconsistent with + the pending denunciations, i.e., there could be unstaked_frozen_deposits + that are not slashed whereas unstake_requests are slashed. *) + let*! ctxt = Storage.Pending_denunciations.clear ctxt in return (ctxt, []) in let* ctxt = -- GitLab