diff --git a/src/proto_alpha/lib_protocol/init_storage.ml b/src/proto_alpha/lib_protocol/init_storage.ml index 8d5ad4dff4f4801b9a9bacf2ef80f29f78e4d8fa..aa7c14e0dfe0e96b958f9eaa54613c5fe8a3e1ed 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 =