Module Tezos_dal_node_lib.History_check

check_history_mode config profile_ctxt proto_parameters verifies that the configured history mode for the DAL node is sufficient to store the required number of past levels. This depends on the active profile and whether refutation support is enabled. It raises Not_enough_history if the configuration is insufficient.

val check_l1_history_mode : Profile_manager.t -> Rpc_context.t -> Tezos_dal_node_services.Types.proto_parameters -> head_level:int32 -> first_seen_level:int32 option -> unit Tezos_base.TzPervasives.tzresult Lwt.t

check_l1_history_mode profile_ctxt cctxt proto_parameters ~head_level ~first_seen_level verifies that the L1 node retains enough past levels for the DAL node to function correctly, based on the storage period determined from the profile. It computes the minimal number of L1 cycles needed and compares it to what the L1 node provides. Raises Not_enough_l1_history if insufficient.

skip_list_offset proto_parameters returns the number of extra levels required when storing skip list cells, defined as attestation_lag + 1.