From 09ce39be3872939c18a21f034619509f2cdd3d4c Mon Sep 17 00:00:00 2001 From: Eugen Zalinescu Date: Fri, 21 Nov 2025 14:57:53 +0100 Subject: [PATCH 1/6] Alpha/DAL: introduce new constant attestation_lags --- src/proto_alpha/lib_dal/dal_plugin_registration.ml | 1 + src/proto_alpha/lib_parameters/default_parameters.ml | 1 + src/proto_alpha/lib_protocol/alpha_context.mli | 5 +++++ src/proto_alpha/lib_protocol/constants_parametric_repr.ml | 8 +++++++- .../lib_protocol/constants_parametric_repr.mli | 1 + src/proto_alpha/lib_protocol/constants_storage.ml | 8 ++++++++ src/proto_alpha/lib_protocol/constants_storage.mli | 4 ++++ src/proto_alpha/lib_protocol/dal_storage.ml | 1 + src/proto_alpha/lib_protocol/raw_context.ml | 3 +++ .../test/unit/test_dal_past_parameters_storage.ml | 1 + 10 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/proto_alpha/lib_dal/dal_plugin_registration.ml b/src/proto_alpha/lib_dal/dal_plugin_registration.ml index e8744f502391..470abecf8a09 100644 --- a/src/proto_alpha/lib_dal/dal_plugin_registration.ml +++ b/src/proto_alpha/lib_dal/dal_plugin_registration.ml @@ -108,6 +108,7 @@ module Plugin = struct dynamic_lag_enable; number_of_slots; attestation_lag; + attestation_lags = _; attestation_threshold; minimal_participation_ratio = _; rewards_ratio = _; diff --git a/src/proto_alpha/lib_parameters/default_parameters.ml b/src/proto_alpha/lib_parameters/default_parameters.ml index 8b96483ff79e..042c0b444387 100644 --- a/src/proto_alpha/lib_parameters/default_parameters.ml +++ b/src/proto_alpha/lib_parameters/default_parameters.ml @@ -160,6 +160,7 @@ let default_dal = dynamic_lag_enable = false; number_of_slots = 32; attestation_lag = 5; + attestation_lags = [5]; attestation_threshold = 66; cryptobox_parameters = default_cryptobox_parameters; minimal_participation_ratio = Q.(64 // 100); diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 4d3a8bc2213a..dfe19e682630 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -863,6 +863,7 @@ module Constants : sig dynamic_lag_enable : bool; number_of_slots : int; attestation_lag : int; + attestation_lags : int list; attestation_threshold : int; cryptobox_parameters : Dal.parameters; minimal_participation_ratio : Q.t; @@ -1096,6 +1097,10 @@ module Constants : sig val dal_attestation_lag : context -> int + val dal_attestation_lags : context -> int list + + val dal_number_of_lags : context -> int + val sc_rollup_arith_pvm_enable : context -> bool val sc_rollup_riscv_pvm_enable : context -> bool diff --git a/src/proto_alpha/lib_protocol/constants_parametric_repr.ml b/src/proto_alpha/lib_protocol/constants_parametric_repr.ml index 20903d1dca22..73d79d97910b 100644 --- a/src/proto_alpha/lib_protocol/constants_parametric_repr.ml +++ b/src/proto_alpha/lib_protocol/constants_parametric_repr.ml @@ -51,6 +51,7 @@ type dal = { dynamic_lag_enable : bool; number_of_slots : int; attestation_lag : int; + attestation_lags : int list; attestation_threshold : int; cryptobox_parameters : Dal.parameters; minimal_participation_ratio : Q.t; @@ -86,6 +87,7 @@ let dal_encoding = dynamic_lag_enable; number_of_slots; attestation_lag; + attestation_lags; attestation_threshold; cryptobox_parameters; minimal_participation_ratio; @@ -98,6 +100,7 @@ let dal_encoding = dynamic_lag_enable, number_of_slots, attestation_lag, + attestation_lags, attestation_threshold, minimal_participation_ratio, rewards_ratio, @@ -108,6 +111,7 @@ let dal_encoding = dynamic_lag_enable, number_of_slots, attestation_lag, + attestation_lags, attestation_threshold, minimal_participation_ratio, rewards_ratio, @@ -120,6 +124,7 @@ let dal_encoding = dynamic_lag_enable; number_of_slots; attestation_lag; + attestation_lags; attestation_threshold; cryptobox_parameters; minimal_participation_ratio; @@ -127,12 +132,13 @@ let dal_encoding = traps_fraction; }) (merge_objs - (obj9 + (obj10 (req "feature_enable" bool) (req "incentives_enable" bool) (req "dynamic_lag_enable" bool) (req "number_of_slots" uint16) (req "attestation_lag" uint8) + (req "attestation_lags" (list uint8)) (req "attestation_threshold" uint8) (req "minimal_participation_ratio" diff --git a/src/proto_alpha/lib_protocol/constants_parametric_repr.mli b/src/proto_alpha/lib_protocol/constants_parametric_repr.mli index 3d5fd7b8a132..2d44cffef908 100644 --- a/src/proto_alpha/lib_protocol/constants_parametric_repr.mli +++ b/src/proto_alpha/lib_protocol/constants_parametric_repr.mli @@ -76,6 +76,7 @@ type dal = { dynamic_lag_enable : bool; number_of_slots : int; attestation_lag : int; + attestation_lags : int list; attestation_threshold : int; cryptobox_parameters : Dal.parameters; minimal_participation_ratio : Q.t; diff --git a/src/proto_alpha/lib_protocol/constants_storage.ml b/src/proto_alpha/lib_protocol/constants_storage.ml index 7ecc17586ab3..a3fb00818a1d 100644 --- a/src/proto_alpha/lib_protocol/constants_storage.ml +++ b/src/proto_alpha/lib_protocol/constants_storage.ml @@ -236,6 +236,14 @@ let dal_number_of_shards c = let constants = Raw_context.constants c in constants.dal.cryptobox_parameters.number_of_shards +let dal_attestation_lags c = + let constants = Raw_context.constants c in + constants.dal.attestation_lags + +let dal_number_of_lags c = + let constants = Raw_context.constants c in + List.length constants.dal.attestation_lags + let dal_enable c = let constants = Raw_context.constants c in constants.dal.feature_enable diff --git a/src/proto_alpha/lib_protocol/constants_storage.mli b/src/proto_alpha/lib_protocol/constants_storage.mli index 35bd388b6406..e2474f00d26d 100644 --- a/src/proto_alpha/lib_protocol/constants_storage.mli +++ b/src/proto_alpha/lib_protocol/constants_storage.mli @@ -132,6 +132,10 @@ val dal_number_of_shards : Raw_context.t -> int val dal_attestation_lag : Raw_context.t -> int +val dal_attestation_lags : Raw_context.t -> int list + +val dal_number_of_lags : Raw_context.t -> int + val dal_enable : Raw_context.t -> bool val zk_rollup_enable : Raw_context.t -> bool diff --git a/src/proto_alpha/lib_protocol/dal_storage.ml b/src/proto_alpha/lib_protocol/dal_storage.ml index 465db955f198..e0f60859e2c5 100644 --- a/src/proto_alpha/lib_protocol/dal_storage.ml +++ b/src/proto_alpha/lib_protocol/dal_storage.ml @@ -38,6 +38,7 @@ let save_parameters ctxt dynamic_lag_enable = false; number_of_slots; attestation_lag; + attestation_lags = [attestation_lag]; attestation_threshold; cryptobox_parameters; minimal_participation_ratio; diff --git a/src/proto_alpha/lib_protocol/raw_context.ml b/src/proto_alpha/lib_protocol/raw_context.ml index 0aecf4f5c47d..a567971a7059 100644 --- a/src/proto_alpha/lib_protocol/raw_context.ml +++ b/src/proto_alpha/lib_protocol/raw_context.ml @@ -1055,6 +1055,7 @@ let prepare_first_block ~level ~timestamp chain_id ctxt = dynamic_lag_enable; number_of_slots; attestation_lag; + attestation_lags; attestation_threshold; cryptobox_parameters; minimal_participation_ratio; @@ -1070,6 +1071,7 @@ let prepare_first_block ~level ~timestamp chain_id ctxt = dynamic_lag_enable; number_of_slots; attestation_lag; + attestation_lags; attestation_threshold; cryptobox_parameters; minimal_participation_ratio; @@ -1370,6 +1372,7 @@ let prepare_first_block ~level ~timestamp chain_id ctxt = dynamic_lag_enable = false; number_of_slots; attestation_lag = 5; + attestation_lags = [5]; attestation_threshold; cryptobox_parameters; minimal_participation_ratio; diff --git a/src/proto_alpha/lib_protocol/test/unit/test_dal_past_parameters_storage.ml b/src/proto_alpha/lib_protocol/test/unit/test_dal_past_parameters_storage.ml index 7604f068dfd7..4ae5b7cb0c78 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_dal_past_parameters_storage.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_dal_past_parameters_storage.ml @@ -72,6 +72,7 @@ let parameters_for_a_level () = dynamic_lag_enable = false; number_of_slots; attestation_lag; + attestation_lags = [attestation_lag]; attestation_threshold; cryptobox_parameters; minimal_participation_ratio; -- GitLab From 7323374d4b48ba655760a987239f190b9a46c279 Mon Sep 17 00:00:00 2001 From: Eugen Zalinescu Date: Thu, 4 Dec 2025 17:02:27 +0100 Subject: [PATCH 2/6] Alpha/DAL: add restrictions on attestation_lags --- .../lib_protocol/constants_repr.ml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/proto_alpha/lib_protocol/constants_repr.ml b/src/proto_alpha/lib_protocol/constants_repr.ml index 4ddfd87d1e5a..cdddf4f53e39 100644 --- a/src/proto_alpha/lib_protocol/constants_repr.ml +++ b/src/proto_alpha/lib_protocol/constants_repr.ml @@ -353,6 +353,33 @@ let check_constants constants = "The attestation_lag must be strictly greater than 1, because only \ slot headers in finalized blocks are attested.") in + let* () = + error_unless + Compare.Int.( + List.compare_length_with constants.dal.attestation_lags 1 >= 0) + (Invalid_protocol_constants + "The attestation_lags must contain at least one element.") + in + let* () = + let last_lag = + Option.value ~default:0 @@ List.hd + @@ List.rev constants.dal.attestation_lags + in + error_unless + Compare.Int.(last_lag = constants.dal.attestation_lag) + (Invalid_protocol_constants + "The last element of attestation_lags must equal attestation_lag.") + in + let* () = + let rec is_sorted = function + | [] | [_] -> true + | h1 :: h2 :: tl -> Compare.Int.(h1 < h2) && is_sorted (h2 :: tl) + in + error_unless + (is_sorted constants.dal.attestation_lags) + (Invalid_protocol_constants + "The attestation_lags list must be ordered increasingly.") + in let* () = error_unless Compare.Int.( -- GitLab From edc8f3d61e57df90a7e9a66f80c930663dfe8e87 Mon Sep 17 00:00:00 2001 From: Eugen Zalinescu Date: Thu, 4 Dec 2025 16:02:40 +0100 Subject: [PATCH 3/6] DAL: add attestation_lags to the list of DAL constants --- src/lib_dal_node_services/types.ml | 8 +++++++- src/lib_dal_node_services/types.mli | 1 + src/proto_021_PsQuebec/lib_dal/dal_plugin_registration.ml | 1 + src/proto_022_PsRiotum/lib_dal/dal_plugin_registration.ml | 1 + src/proto_023_PtSeouLo/lib_dal/dal_plugin_registration.ml | 1 + src/proto_024_PtTALLiN/lib_dal/dal_plugin_registration.ml | 1 + src/proto_alpha/lib_dal/dal_plugin_registration.ml | 3 ++- 7 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/lib_dal_node_services/types.ml b/src/lib_dal_node_services/types.ml index 6cf9c377d4b3..03967f358810 100644 --- a/src/lib_dal_node_services/types.ml +++ b/src/lib_dal_node_services/types.ml @@ -371,6 +371,7 @@ type proto_parameters = { dynamic_lag_enable : bool; number_of_slots : int; attestation_lag : int; + attestation_lags : int list; attestation_threshold : int; traps_fraction : Q.t; cryptobox_parameters : Cryptobox.Verifier.parameters; @@ -529,6 +530,7 @@ let proto_parameters_encoding : proto_parameters Data_encoding.t = dynamic_lag_enable; number_of_slots; attestation_lag; + attestation_lags; attestation_threshold; traps_fraction; cryptobox_parameters; @@ -544,6 +546,7 @@ let proto_parameters_encoding : proto_parameters Data_encoding.t = dynamic_lag_enable, number_of_slots, attestation_lag, + attestation_lags, attestation_threshold, traps_fraction ), ( cryptobox_parameters, @@ -557,6 +560,7 @@ let proto_parameters_encoding : proto_parameters Data_encoding.t = dynamic_lag_enable, number_of_slots, attestation_lag, + attestation_lags, attestation_threshold, traps_fraction ), ( cryptobox_parameters, @@ -572,6 +576,7 @@ let proto_parameters_encoding : proto_parameters Data_encoding.t = dynamic_lag_enable; number_of_slots; attestation_lag; + attestation_lags; attestation_threshold; traps_fraction; cryptobox_parameters; @@ -582,12 +587,13 @@ let proto_parameters_encoding : proto_parameters Data_encoding.t = minimal_block_delay; }) (merge_objs - (obj7 + (obj8 (req "feature_enable" bool) (req "incentives_enable" bool) (req "dynamic_lag_enable" bool) (req "number_of_slots" int31) (req "attestation_lag" int31) + (req "attestation_lags" (list int31)) (req "attestation_threshold" int31) (req "traps_fraction" q_encoding)) (obj6 diff --git a/src/lib_dal_node_services/types.mli b/src/lib_dal_node_services/types.mli index dc5839f51fab..747871c417ff 100644 --- a/src/lib_dal_node_services/types.mli +++ b/src/lib_dal_node_services/types.mli @@ -274,6 +274,7 @@ type proto_parameters = { dynamic_lag_enable : bool; number_of_slots : int; attestation_lag : int; + attestation_lags : int list; attestation_threshold : int; traps_fraction : Q.t; cryptobox_parameters : Cryptobox.Verifier.parameters; diff --git a/src/proto_021_PsQuebec/lib_dal/dal_plugin_registration.ml b/src/proto_021_PsQuebec/lib_dal/dal_plugin_registration.ml index 184eaf58f19c..9a961e134d55 100644 --- a/src/proto_021_PsQuebec/lib_dal/dal_plugin_registration.ml +++ b/src/proto_021_PsQuebec/lib_dal/dal_plugin_registration.ml @@ -65,6 +65,7 @@ module Plugin = struct dynamic_lag_enable = false; number_of_slots; attestation_lag; + attestation_lags = [attestation_lag]; attestation_threshold; traps_fraction = Q.(1 // 1000); (* not used in proto_021 *) diff --git a/src/proto_022_PsRiotum/lib_dal/dal_plugin_registration.ml b/src/proto_022_PsRiotum/lib_dal/dal_plugin_registration.ml index 5ea2b9d48ea7..25dbe72ae2bc 100644 --- a/src/proto_022_PsRiotum/lib_dal/dal_plugin_registration.ml +++ b/src/proto_022_PsRiotum/lib_dal/dal_plugin_registration.ml @@ -68,6 +68,7 @@ module Plugin = struct dynamic_lag_enable = false; number_of_slots; attestation_lag; + attestation_lags = [attestation_lag]; attestation_threshold; traps_fraction; cryptobox_parameters; diff --git a/src/proto_023_PtSeouLo/lib_dal/dal_plugin_registration.ml b/src/proto_023_PtSeouLo/lib_dal/dal_plugin_registration.ml index 48353cc7e1e4..cdf0b9e9fd37 100644 --- a/src/proto_023_PtSeouLo/lib_dal/dal_plugin_registration.ml +++ b/src/proto_023_PtSeouLo/lib_dal/dal_plugin_registration.ml @@ -69,6 +69,7 @@ module Plugin = struct dynamic_lag_enable = false; number_of_slots; attestation_lag; + attestation_lags = [attestation_lag]; attestation_threshold; traps_fraction; cryptobox_parameters; diff --git a/src/proto_024_PtTALLiN/lib_dal/dal_plugin_registration.ml b/src/proto_024_PtTALLiN/lib_dal/dal_plugin_registration.ml index c4f17a950374..1add99f4757c 100644 --- a/src/proto_024_PtTALLiN/lib_dal/dal_plugin_registration.ml +++ b/src/proto_024_PtTALLiN/lib_dal/dal_plugin_registration.ml @@ -86,6 +86,7 @@ module Plugin = struct dynamic_lag_enable = false; number_of_slots; attestation_lag; + attestation_lags = [attestation_lag]; attestation_threshold; traps_fraction; cryptobox_parameters; diff --git a/src/proto_alpha/lib_dal/dal_plugin_registration.ml b/src/proto_alpha/lib_dal/dal_plugin_registration.ml index 470abecf8a09..42e0194dbb23 100644 --- a/src/proto_alpha/lib_dal/dal_plugin_registration.ml +++ b/src/proto_alpha/lib_dal/dal_plugin_registration.ml @@ -108,7 +108,7 @@ module Plugin = struct dynamic_lag_enable; number_of_slots; attestation_lag; - attestation_lags = _; + attestation_lags; attestation_threshold; minimal_participation_ratio = _; rewards_ratio = _; @@ -124,6 +124,7 @@ module Plugin = struct dynamic_lag_enable; number_of_slots; attestation_lag; + attestation_lags; attestation_threshold; traps_fraction; cryptobox_parameters; -- GitLab From b8f6352b3fc4aafa59f17aec3664f91d476aa456 Mon Sep 17 00:00:00 2001 From: Eugen Zalinescu Date: Sat, 22 Nov 2025 05:44:54 +0100 Subject: [PATCH 4/6] Tezt/Tests: implement Mockup.distinct_sample for non-empty arrays --- tezt/tests/mockup.ml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tezt/tests/mockup.ml b/tezt/tests/mockup.ml index 8d6d3bf9affe..6bb92e081104 100644 --- a/tezt/tests/mockup.ml +++ b/tezt/tests/mockup.ml @@ -1154,6 +1154,18 @@ let test_create_mockup_config_show_init_roundtrip protocols = JSON.(value |> as_string_opt) in `String value' + | "array" -> ( + let array_items = JSON.(value |> as_list) in + match array_items with + | [] -> + Test.fail + "[distinct_sample] is not implemented for empty arrays (value: \ + %s)" + (JSON.encode value) + | first :: rest -> + let items_schema = JSON.(schema |-> "items") in + let modified_first = distinct_sample first items_schema in + `A (modified_first :: List.map JSON.unannotate rest)) | typ -> Test.fail "[distinct_sample] is not implemented for types [%s] (value: %s)" -- GitLab From 9149259ceacc09d6da4104dc6b2cebfa562ae19a Mon Sep 17 00:00:00 2001 From: Eugen Zalinescu Date: Thu, 4 Dec 2025 16:50:29 +0100 Subject: [PATCH 5/6] Tests: reset regression outputs --- ...n test for the FA deposit and withdrawal events.out | 10 +++++----- ...egression test for the claimed FA deposit event.out | 4 ++-- ...ode client) RPC regression tests- misc_protocol.out | 3 ++- ...ient) RPC regression tests- misc_protocol_abaab.out | 3 ++- ...mode light) RPC regression tests- misc_protocol.out | 3 ++- ...ight) RPC regression tests- misc_protocol_abaab.out | 3 ++- ...mode proxy) RPC regression tests- misc_protocol.out | 3 ++- ...roxy) RPC regression tests- misc_protocol_abaab.out | 3 ++- .../weeklynet.ml/Alpha- weeklynet regression test.out | 3 ++- tezt/tests/weeklynet_configs/alpha.json | 1 + 10 files changed, 22 insertions(+), 14 deletions(-) diff --git a/etherlink/tezt/tests/expected/evm_sequencer.ml/Alpha- Regression test for the FA deposit and withdrawal events.out b/etherlink/tezt/tests/expected/evm_sequencer.ml/Alpha- Regression test for the FA deposit and withdrawal events.out index 8babebe3fadb..4c585c653a0a 100644 --- a/etherlink/tezt/tests/expected/evm_sequencer.ml/Alpha- Regression test for the FA deposit and withdrawal events.out +++ b/etherlink/tezt/tests/expected/evm_sequencer.ml/Alpha- Regression test for the FA deposit and withdrawal events.out @@ -3,19 +3,19 @@ Address: 0xff00000000000000000000000000000000000002 Topics: - 0x7ee7a1de9c18ce695c95b8b19fbdf26cce3544e3ca9e08c9f487776783d7599f -- 0x83fa75cb8976a0a19a558662f9a23b43ee119469ca5d1b1c25ab81b822280b27 +- 0x0a7f08b28bfb0812b548025f87d603a2323750a725cf8d61c777756f33f69b0a Data: 0x0000000000000000000000006ce4d79d4e77402e1ef3417fdda433aa744c6e1c0000000000000000000000006ce4d79d4e77402e1ef3417fdda433aa744c6e1c000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000002 # FA Withdrawal ## Log 0 Address: 0xff00000000000000000000000000000000000002 Topics: - 0xab68450c9e546f6062a861eebf8ec5bbd41b4425e26b20199c91227c7f9038ca -- 0x83fa75cb8976a0a19a558662f9a23b43ee119469ca5d1b1c25ab81b822280b27 -Data: 0x0000000000000000000000006ce4d79d4e77402e1ef3417fdda433aa744c6e1c0000000000000000000000006ce4d79d4e77402e1ef3417fdda433aa744c6e1c000000000000000000000000000000000000000000000000000000000000000001a1bb750903c3e419b322ee388e74e3f97e00f09e000000000000000000000000000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000000 +- 0x0a7f08b28bfb0812b548025f87d603a2323750a725cf8d61c777756f33f69b0a +Data: 0x0000000000000000000000006ce4d79d4e77402e1ef3417fdda433aa744c6e1c0000000000000000000000006ce4d79d4e77402e1ef3417fdda433aa744c6e1c000000000000000000000000000000000000000000000000000000000000000001869fa13f83d506a4fc71122a7a1fd07a68081006000000000000000000000000000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000000 # FA Fast Withdrawal ## Log 0 Address: 0xff00000000000000000000000000000000000002 Topics: - 0x7e40c982e82bccb5e8bbd29f38bcfa3996f341ef9f51e2a9cffe086ec87a11c7 -- 0x83fa75cb8976a0a19a558662f9a23b43ee119469ca5d1b1c25ab81b822280b27 -Data: 0x0000000000000000000000006ce4d79d4e77402e1ef3417fdda433aa744c6e1c0000000000000000000000006ce4d79d4e77402e1ef3417fdda433aa744c6e1c0000c55cf02dbeecc978d9c84625dcae72bb77ea4fbd0000000000000000000001a1bb750903c3e419b322ee388e74e3f97e00f09e000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000005e0be103000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001 +- 0x0a7f08b28bfb0812b548025f87d603a2323750a725cf8d61c777756f33f69b0a +Data: 0x0000000000000000000000006ce4d79d4e77402e1ef3417fdda433aa744c6e1c0000000000000000000000006ce4d79d4e77402e1ef3417fdda433aa744c6e1c0000c55cf02dbeecc978d9c84625dcae72bb77ea4fbd0000000000000000000001869fa13f83d506a4fc71122a7a1fd07a68081006000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000005e0be103000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001 diff --git a/etherlink/tezt/tests/expected/evm_sequencer.ml/Alpha- Regression test for the claimed FA deposit event.out b/etherlink/tezt/tests/expected/evm_sequencer.ml/Alpha- Regression test for the claimed FA deposit event.out index e5dd1b372d5c..6716c9f0f4b3 100644 --- a/etherlink/tezt/tests/expected/evm_sequencer.ml/Alpha- Regression test for the claimed FA deposit event.out +++ b/etherlink/tezt/tests/expected/evm_sequencer.ml/Alpha- Regression test for the claimed FA deposit event.out @@ -3,7 +3,7 @@ Address: 0xff00000000000000000000000000000000000002 Topics: - 0xb02d79c5657e344e23d91529b954c3087c60a974d598939583904a4f0b959614 -- 0x13d1ace30beaa763d08656e720bee6c9fbda87c1e78a5d8e400e904aa1a2529b +- 0x106ef28b733794add0506347b61933862ac856fc0c28b75f36afe923f3032e0a - 0x000000000000000000000000d77420f73b4612a7a99dba8c2afd30a1886b0344 Data: 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d77420f73b4612a7a99dba8c2afd30a1886b0344000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000003 # Claimed deposit @@ -11,5 +11,5 @@ Data: 0x000000000000000000000000000000000000000000000000000000000000000000000000 Address: 0xff00000000000000000000000000000000000002 Topics: - 0x7ee7a1de9c18ce695c95b8b19fbdf26cce3544e3ca9e08c9f487776783d7599f -- 0x13d1ace30beaa763d08656e720bee6c9fbda87c1e78a5d8e400e904aa1a2529b +- 0x106ef28b733794add0506347b61933862ac856fc0c28b75f36afe923f3032e0a Data: 0x000000000000000000000000d77420f73b4612a7a99dba8c2afd30a1886b0344000000000000000000000000d77420f73b4612a7a99dba8c2afd30a1886b0344000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000003 diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol.out index 2420a7c6ba94..af9ce682b130 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol.out @@ -41,7 +41,8 @@ "dal_parametric": { "feature_enable": true, "incentives_enable": true, "dynamic_lag_enable": false, "number_of_slots": 16, - "attestation_lag": 5, "attestation_threshold": 66, + "attestation_lag": 5, "attestation_lags": [ 5 ], + "attestation_threshold": 66, "minimal_participation_ratio": { "numerator": "16", "denominator": "25" }, "rewards_ratio": { "numerator": "1", "denominator": "10" }, diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol_abaab.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol_abaab.out index 787beb645e2f..b776c8532d5b 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol_abaab.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol_abaab.out @@ -41,7 +41,8 @@ "dal_parametric": { "feature_enable": true, "incentives_enable": true, "dynamic_lag_enable": false, "number_of_slots": 16, - "attestation_lag": 5, "attestation_threshold": 66, + "attestation_lag": 5, "attestation_lags": [ 5 ], + "attestation_threshold": 66, "minimal_participation_ratio": { "numerator": "16", "denominator": "25" }, "rewards_ratio": { "numerator": "1", "denominator": "10" }, diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol.out index 0b503d16958b..1ab11e9c5ffd 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol.out @@ -41,7 +41,8 @@ "dal_parametric": { "feature_enable": true, "incentives_enable": true, "dynamic_lag_enable": false, "number_of_slots": 16, - "attestation_lag": 5, "attestation_threshold": 66, + "attestation_lag": 5, "attestation_lags": [ 5 ], + "attestation_threshold": 66, "minimal_participation_ratio": { "numerator": "16", "denominator": "25" }, "rewards_ratio": { "numerator": "1", "denominator": "10" }, diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol_abaab.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol_abaab.out index 1af73250ae9d..1d495efa209f 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol_abaab.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol_abaab.out @@ -41,7 +41,8 @@ "dal_parametric": { "feature_enable": true, "incentives_enable": true, "dynamic_lag_enable": false, "number_of_slots": 16, - "attestation_lag": 5, "attestation_threshold": 66, + "attestation_lag": 5, "attestation_lags": [ 5 ], + "attestation_threshold": 66, "minimal_participation_ratio": { "numerator": "16", "denominator": "25" }, "rewards_ratio": { "numerator": "1", "denominator": "10" }, diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol.out index 81775501881d..bea2f960d4dd 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol.out @@ -41,7 +41,8 @@ "dal_parametric": { "feature_enable": true, "incentives_enable": true, "dynamic_lag_enable": false, "number_of_slots": 16, - "attestation_lag": 5, "attestation_threshold": 66, + "attestation_lag": 5, "attestation_lags": [ 5 ], + "attestation_threshold": 66, "minimal_participation_ratio": { "numerator": "16", "denominator": "25" }, "rewards_ratio": { "numerator": "1", "denominator": "10" }, diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol_abaab.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol_abaab.out index 0d06f14ca1bc..024cde2ab0da 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol_abaab.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol_abaab.out @@ -41,7 +41,8 @@ "dal_parametric": { "feature_enable": true, "incentives_enable": true, "dynamic_lag_enable": false, "number_of_slots": 16, - "attestation_lag": 5, "attestation_threshold": 66, + "attestation_lag": 5, "attestation_lags": [ 5 ], + "attestation_threshold": 66, "minimal_participation_ratio": { "numerator": "16", "denominator": "25" }, "rewards_ratio": { "numerator": "1", "denominator": "10" }, diff --git a/tezt/tests/expected/weeklynet.ml/Alpha- weeklynet regression test.out b/tezt/tests/expected/weeklynet.ml/Alpha- weeklynet regression test.out index c1046c07bbbe..d649e3ab710f 100644 --- a/tezt/tests/expected/weeklynet.ml/Alpha- weeklynet regression test.out +++ b/tezt/tests/expected/weeklynet.ml/Alpha- weeklynet regression test.out @@ -31,7 +31,8 @@ "dal_parametric": { "feature_enable": true, "incentives_enable": false, "dynamic_lag_enable": false, "number_of_slots": 32, - "attestation_lag": 5, "attestation_threshold": 66, + "attestation_lag": 5, "attestation_lags": [ 5 ], + "attestation_threshold": 66, "minimal_participation_ratio": { "numerator": "16", "denominator": "25" }, "rewards_ratio": { "numerator": "0", "denominator": "1" }, diff --git a/tezt/tests/weeklynet_configs/alpha.json b/tezt/tests/weeklynet_configs/alpha.json index 53e0668e760a..09db3a505db4 100644 --- a/tezt/tests/weeklynet_configs/alpha.json +++ b/tezt/tests/weeklynet_configs/alpha.json @@ -77,6 +77,7 @@ "dynamic_lag_enable": false, "number_of_slots": 32, "attestation_lag": 8, + "attestation_lags": [ 8 ], "attestation_threshold": 66, "minimal_participation_ratio": { "numerator": "16", -- GitLab From c7386fdfe2fb011fc59d319884e495062df650f9 Mon Sep 17 00:00:00 2001 From: Eugen Zalinescu Date: Sat, 6 Dec 2025 06:23:58 +0100 Subject: [PATCH 6/6] Tests/DAL: set attestation_lags based on attestation_lag --- tezt/tests/dal.ml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tezt/tests/dal.ml b/tezt/tests/dal.ml index 3a8f1b58bac9..465cbcb82338 100644 --- a/tezt/tests/dal.ml +++ b/tezt/tests/dal.ml @@ -511,6 +511,15 @@ let with_layer1 ?custom_constants ?additional_bootstrap_accounts ?all_bakers_attest_activation_threshold f ~protocol = let parameter_overrides = make_int_parameter ["dal_parametric"; "attestation_lag"] attestation_lag + @ (match attestation_lag with + | None -> [] + | Some lag -> + if Protocol.number protocol < 025 then [] + else + [ + ( ["dal_parametric"; "attestation_lags"], + `A [`Float (float_of_int lag)] ); + ]) @ make_int_parameter ["dal_parametric"; "number_of_shards"] number_of_shards @ make_int_parameter ["dal_parametric"; "redundancy_factor"] -- GitLab