diff --git a/src/bin_dal_node/profile_manager.ml b/src/bin_dal_node/profile_manager.ml index e60d6530592ed20b4e2d2ed983ce7449337a7e39..c02fda1be493043b79afc7a81584740dffaee054 100644 --- a/src/bin_dal_node/profile_manager.ml +++ b/src/bin_dal_node/profile_manager.ml @@ -213,17 +213,23 @@ let get_attested_data_default_store_period t proto_parameters = let refutation_game_period = 2 * get_refutation_game_period proto_parameters in - let attestation_period = 2 * proto_parameters.attestation_lag in + (* TODO: https://gitlab.com/tezos/tezos/-/issues/7772 + This period should be zero. *) + let bootstrap_node_period = 2 * proto_parameters.attestation_lag in + (* For observability purpose, we aim for a non-slot producer profile + to keep shards for about 10 minutes. + 150 blocks is 10 minutes on Ghostnet, 20 minutes on Mainnet. *) + let default_period = 150 in let supports_refutations_bis, period = match get_profiles t with - | Random_observer -> (false, attestation_period) + | Random_observer -> (false, default_period) | Operator op -> let has_producer = Operator_profile.(has_producer op) in let period = - if has_producer then refutation_game_period else attestation_period + if has_producer then refutation_game_period else default_period in (has_producer, period) - | Bootstrap -> (false, attestation_period) + | Bootstrap -> (false, bootstrap_node_period) in (* This is just to keep this function synced with {!supports_refutations}. *) assert (supports_refutations_bis = supports_refutations t) ; diff --git a/tezt/lib_tezos/dal_common.ml b/tezt/lib_tezos/dal_common.ml index e74d777e077e6bdabc76ea6d08aab0aafc0d2323..65697d48b31cd68061d0be2c759b6088ee028234 100644 --- a/tezt/lib_tezos/dal_common.ml +++ b/tezt/lib_tezos/dal_common.ml @@ -122,25 +122,19 @@ module Parameters = struct let blocks_per_cycle = JSON.(proto_parameters |-> "blocks_per_cycle" |> as_int) in - let attestation_lag = - JSON.( - proto_parameters |-> "dal_parametric" |-> "attestation_lag" |> as_int) - in - let blocks = (3 * attestation_lag) + 1 in - if blocks mod blocks_per_cycle = 0 then blocks / blocks_per_cycle - else 1 + (blocks / blocks_per_cycle) + let default_block_storage = 150 in + if default_block_storage mod blocks_per_cycle = 0 then + default_block_storage / blocks_per_cycle + else 1 + (default_block_storage / blocks_per_cycle) let storage_period_without_refutation_in_cycles ~proto_parameters = let blocks_per_cycle = JSON.(proto_parameters |-> "blocks_per_cycle" |> as_int) in - let attestation_lag = - JSON.( - proto_parameters |-> "dal_parametric" |-> "attestation_lag" |> as_int) - in - let blocks = 2 * attestation_lag in - if blocks mod blocks_per_cycle = 0 then blocks / blocks_per_cycle - else 1 + (blocks / blocks_per_cycle) + let default_block_storage = 150 in + if default_block_storage mod blocks_per_cycle = 0 then + default_block_storage / blocks_per_cycle + else 1 + (default_block_storage / blocks_per_cycle) end module Committee = struct diff --git a/tezt/tests/dal.ml b/tezt/tests/dal.ml index ce5b49a6e4c974bc0bae9f39d3118937ae8fc4ec..11f8682789690eb2f95e7c0f01dbd6fb1ddef254 100644 --- a/tezt/tests/dal.ml +++ b/tezt/tests/dal.ml @@ -6358,7 +6358,7 @@ module Garbage_collection = struct let* () = Lwt.join wait_block_p in bake_loop (n - 1) in - let* () = bake_loop 25 in + let* () = bake_loop 180 in Log.info "Blocks baked !" ; Log.info "Checking that the slot was attested" ; @@ -6620,7 +6620,7 @@ module Garbage_collection = struct let* () = Lwt.join wait_block_p in bake_loop (n - 1) in - let* () = bake_loop 25 in + let* () = bake_loop 180 in Log.info "Blocks baked !" ; Log.info "Checking that the slot was attested" ;