From 15a48017a93bd11b01398c4b26de9781708ddbd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Cauderlier?= Date: Tue, 8 Apr 2025 15:02:16 +0200 Subject: [PATCH 1/5] Fix mainnet constants (Oxford) --- .../lib_parameters/default_parameters.ml | 59 +++++++++++++++---- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/src/proto_018_Proxford/lib_parameters/default_parameters.ml b/src/proto_018_Proxford/lib_parameters/default_parameters.ml index 500b85a9318f..e1236857ae5b 100644 --- a/src/proto_018_Proxford/lib_parameters/default_parameters.ml +++ b/src/proto_018_Proxford/lib_parameters/default_parameters.ml @@ -115,18 +115,7 @@ let constants_mainnet = } = Constants.Generated.generate ~consensus_committee_size in - let dal_activation_level = - if default_dal.feature_enable then Raw_level.root - else - (* Deactivate the reveal if the dal is not enabled. *) - (* https://gitlab.com/tezos/tezos/-/issues/5968 - Encoding error with Raw_level - - We set the activation level to [pred max_int] to deactivate - the feature. The [pred] is needed to not trigger an encoding - exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) - Raw_level.of_int32_exn Int32.(pred max_int) - in + let dal_activation_level = Raw_level.of_int32_exn 5726209l in { Constants.Parametric.preserved_cycles = 5; blocks_per_cycle = 16384l; @@ -286,6 +275,18 @@ let constants_sandbox = let Constants.Generated.{consensus_threshold = _; issuance_weights} = Constants.Generated.generate ~consensus_committee_size in + let dal_activation_level = + if default_dal.feature_enable then Raw_level.root + else + (* Deactivate the reveal if the dal is not enabled. *) + (* https://gitlab.com/tezos/tezos/-/issues/5968 + Encoding error with Raw_level + + We set the activation level to [pred max_int] to deactivate + the feature. The [pred] is needed to not trigger an encoding + exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) + Raw_level.of_int32_exn Int32.(pred max_int) + in { constants_mainnet with dal = @@ -302,6 +303,17 @@ let constants_sandbox = slot_size = 1 lsl 16; }; }; + sc_rollup = + Constants.Parametric. + { + constants_mainnet.sc_rollup with + reveal_activation_level = + { + constants_mainnet.sc_rollup.reveal_activation_level with + dal_page = dal_activation_level; + dal_parameters = dal_activation_level; + }; + }; issuance_weights; Constants.Parametric.preserved_cycles = 2; blocks_per_cycle = 8l; @@ -324,6 +336,18 @@ let constants_test = let Constants.Generated.{consensus_threshold; issuance_weights} = Constants.Generated.generate ~consensus_committee_size in + let dal_activation_level = + if default_dal.feature_enable then Raw_level.root + else + (* Deactivate the reveal if the dal is not enabled. *) + (* https://gitlab.com/tezos/tezos/-/issues/5968 + Encoding error with Raw_level + + We set the activation level to [pred max_int] to deactivate + the feature. The [pred] is needed to not trigger an encoding + exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) + Raw_level.of_int32_exn Int32.(pred max_int) + in { constants_mainnet with dal = @@ -340,6 +364,17 @@ let constants_test = slot_size = 1 lsl 16; }; }; + sc_rollup = + Constants.Parametric. + { + constants_mainnet.sc_rollup with + reveal_activation_level = + { + constants_mainnet.sc_rollup.reveal_activation_level with + dal_page = dal_activation_level; + dal_parameters = dal_activation_level; + }; + }; issuance_weights; Constants.Parametric.preserved_cycles = 3; blocks_per_cycle = 12l; -- GitLab From 6231982d2f0af6be179f0a32bef5add8ea090b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Cauderlier?= Date: Tue, 8 Apr 2025 15:00:02 +0200 Subject: [PATCH 2/5] Fix mainnet constants (Paris) --- .../lib_parameters/default_parameters.ml | 59 +++++++++++++++---- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/src/proto_020_PsParisC/lib_parameters/default_parameters.ml b/src/proto_020_PsParisC/lib_parameters/default_parameters.ml index a5afdaa30d69..b5eb17e673d1 100644 --- a/src/proto_020_PsParisC/lib_parameters/default_parameters.ml +++ b/src/proto_020_PsParisC/lib_parameters/default_parameters.ml @@ -165,18 +165,7 @@ let constants_mainnet : Constants.Parametric.t = } = Constants.Generated.generate ~consensus_committee_size in - let dal_activation_level = - if default_dal.feature_enable then Raw_level.succ Raw_level.root - else - (* Deactivate the reveal if the dal is not enabled. *) - (* https://gitlab.com/tezos/tezos/-/issues/5968 - Encoding error with Raw_level - - We set the activation level to [pred max_int] to deactivate - the feature. The [pred] is needed to not trigger an encoding - exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) - Raw_level.of_int32_exn Int32.(pred max_int) - in + let dal_activation_level = Raw_level.of_int32_exn 5726209l in let dal_attested_slots_validity_lag = (* A rollup node shouldn't import a page of an attested slot whose attested level is too far in the past w.r.t. the current level. Importation window @@ -321,6 +310,18 @@ let constants_sandbox = {max_slashing_threshold; consensus_threshold = _; issuance_weights} = Constants.Generated.generate ~consensus_committee_size in + let dal_activation_level = + if default_dal.feature_enable then Raw_level.succ Raw_level.root + else + (* Deactivate the reveal if the dal is not enabled. *) + (* https://gitlab.com/tezos/tezos/-/issues/5968 + Encoding error with Raw_level + + We set the activation level to [pred max_int] to deactivate + the feature. The [pred] is needed to not trigger an encoding + exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) + Raw_level.of_int32_exn Int32.(pred max_int) + in { constants_mainnet with dal = @@ -331,6 +332,17 @@ let constants_sandbox = cryptobox_parameters = {default_cryptobox_parameters with number_of_shards = 256}; }; + sc_rollup = + Constants.Parametric. + { + constants_mainnet.sc_rollup with + reveal_activation_level = + { + constants_mainnet.sc_rollup.reveal_activation_level with + dal_page = dal_activation_level; + dal_parameters = dal_activation_level; + }; + }; issuance_weights; blocks_preservation_cycles = 1; consensus_rights_delay = 2; @@ -356,6 +368,18 @@ let constants_test = {max_slashing_threshold = _; consensus_threshold; issuance_weights} = Constants.Generated.generate ~consensus_committee_size in + let dal_activation_level = + if default_dal.feature_enable then Raw_level.succ Raw_level.root + else + (* Deactivate the reveal if the dal is not enabled. *) + (* https://gitlab.com/tezos/tezos/-/issues/5968 + Encoding error with Raw_level + + We set the activation level to [pred max_int] to deactivate + the feature. The [pred] is needed to not trigger an encoding + exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) + Raw_level.of_int32_exn Int32.(pred max_int) + in { constants_mainnet with dal = @@ -370,6 +394,17 @@ let constants_test = number_of_shards = 64; }; }; + sc_rollup = + Constants.Parametric. + { + constants_mainnet.sc_rollup with + reveal_activation_level = + { + constants_mainnet.sc_rollup.reveal_activation_level with + dal_page = dal_activation_level; + dal_parameters = dal_activation_level; + }; + }; issuance_weights; consensus_rights_delay = 2; delegate_parameters_activation_delay = 3; -- GitLab From 12538e041e2425070e3541d4ddb5bdab49a63457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Cauderlier?= Date: Tue, 8 Apr 2025 14:18:58 +0200 Subject: [PATCH 3/5] Fix mainnet constants (Quebec) --- .../lib_parameters/default_parameters.ml | 59 +++++++++++++++---- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/src/proto_021_PsQuebec/lib_parameters/default_parameters.ml b/src/proto_021_PsQuebec/lib_parameters/default_parameters.ml index 99240f0d928a..f6ef1b1ee230 100644 --- a/src/proto_021_PsQuebec/lib_parameters/default_parameters.ml +++ b/src/proto_021_PsQuebec/lib_parameters/default_parameters.ml @@ -166,18 +166,7 @@ let constants_mainnet : Constants.Parametric.t = } = Constants.Generated.generate ~consensus_committee_size in - let dal_activation_level = - if default_dal.feature_enable then Raw_level.succ Raw_level.root - else - (* Deactivate the reveal if the dal is not enabled. *) - (* https://gitlab.com/tezos/tezos/-/issues/5968 - Encoding error with Raw_level - - We set the activation level to [pred max_int] to deactivate - the feature. The [pred] is needed to not trigger an encoding - exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) - Raw_level.of_int32_exn Int32.(pred max_int) - in + let dal_activation_level = Raw_level.of_int32_exn 5726209l in let dal_attested_slots_validity_lag = (* A rollup node shouldn't import a page of an attested slot whose attested level is too far in the past w.r.t. the current level. Importation window @@ -322,6 +311,18 @@ let constants_sandbox = {max_slashing_threshold; consensus_threshold = _; issuance_weights} = Constants.Generated.generate ~consensus_committee_size in + let dal_activation_level = + if default_dal.feature_enable then Raw_level.succ Raw_level.root + else + (* Deactivate the reveal if the dal is not enabled. *) + (* https://gitlab.com/tezos/tezos/-/issues/5968 + Encoding error with Raw_level + + We set the activation level to [pred max_int] to deactivate + the feature. The [pred] is needed to not trigger an encoding + exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) + Raw_level.of_int32_exn Int32.(pred max_int) + in { constants_mainnet with dal = @@ -332,6 +333,17 @@ let constants_sandbox = cryptobox_parameters = {default_cryptobox_parameters with number_of_shards = 256}; }; + sc_rollup = + Constants.Parametric. + { + constants_mainnet.sc_rollup with + reveal_activation_level = + { + constants_mainnet.sc_rollup.reveal_activation_level with + dal_page = dal_activation_level; + dal_parameters = dal_activation_level; + }; + }; issuance_weights; blocks_preservation_cycles = 1; consensus_rights_delay = 2; @@ -357,6 +369,18 @@ let constants_test = {max_slashing_threshold = _; consensus_threshold; issuance_weights} = Constants.Generated.generate ~consensus_committee_size in + let dal_activation_level = + if default_dal.feature_enable then Raw_level.succ Raw_level.root + else + (* Deactivate the reveal if the dal is not enabled. *) + (* https://gitlab.com/tezos/tezos/-/issues/5968 + Encoding error with Raw_level + + We set the activation level to [pred max_int] to deactivate + the feature. The [pred] is needed to not trigger an encoding + exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) + Raw_level.of_int32_exn Int32.(pred max_int) + in { constants_mainnet with dal = @@ -371,6 +395,17 @@ let constants_test = redundancy_factor = 2; }; }; + sc_rollup = + Constants.Parametric. + { + constants_mainnet.sc_rollup with + reveal_activation_level = + { + constants_mainnet.sc_rollup.reveal_activation_level with + dal_page = dal_activation_level; + dal_parameters = dal_activation_level; + }; + }; issuance_weights; consensus_rights_delay = 2; delegate_parameters_activation_delay = 3; -- GitLab From f87b5817e81eaf4e4b90e616263a603d3d73c449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Cauderlier?= Date: Tue, 8 Apr 2025 14:54:45 +0200 Subject: [PATCH 4/5] Fix mainnet constants (Rio) --- .../lib_parameters/default_parameters.ml | 59 +++++++++++++++---- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/src/proto_022_PsRiotum/lib_parameters/default_parameters.ml b/src/proto_022_PsRiotum/lib_parameters/default_parameters.ml index d50b752d3a71..4aaba96dd364 100644 --- a/src/proto_022_PsRiotum/lib_parameters/default_parameters.ml +++ b/src/proto_022_PsRiotum/lib_parameters/default_parameters.ml @@ -196,18 +196,7 @@ let constants_mainnet : Constants.Parametric.t = ~consensus_committee_size ~dal_rewards_ratio:default_dal.rewards_ratio in - let dal_activation_level = - if default_dal.feature_enable then Raw_level.succ Raw_level.root - else - (* Deactivate the reveal if the dal is not enabled. *) - (* https://gitlab.com/tezos/tezos/-/issues/5968 - Encoding error with Raw_level - - We set the activation level to [pred max_int] to deactivate - the feature. The [pred] is needed to not trigger an encoding - exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) - Raw_level.of_int32_exn Int32.(pred max_int) - in + let dal_activation_level = Raw_level.of_int32_exn 5726209l in let dal_attested_slots_validity_lag = (* A rollup node shouldn't import a page of an attested slot whose attested level is too far in the past w.r.t. the current level. Importation window @@ -414,6 +403,18 @@ let constants_sandbox = ~consensus_committee_size ~dal_rewards_ratio:default_dal.rewards_ratio in + let dal_activation_level = + if default_dal.feature_enable then Raw_level.succ Raw_level.root + else + (* Deactivate the reveal if the dal is not enabled. *) + (* https://gitlab.com/tezos/tezos/-/issues/5968 + Encoding error with Raw_level + + We set the activation level to [pred max_int] to deactivate + the feature. The [pred] is needed to not trigger an encoding + exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) + Raw_level.of_int32_exn Int32.(pred max_int) + in { constants_mainnet with dal = @@ -424,6 +425,17 @@ let constants_sandbox = cryptobox_parameters = {default_cryptobox_parameters with number_of_shards = 256}; }; + sc_rollup = + Constants.Parametric. + { + constants_mainnet.sc_rollup with + reveal_activation_level = + { + constants_mainnet.sc_rollup.reveal_activation_level with + dal_page = dal_activation_level; + dal_parameters = dal_activation_level; + }; + }; issuance_weights; blocks_preservation_cycles = 1; consensus_rights_delay = 2; @@ -450,6 +462,18 @@ let constants_test = ~consensus_committee_size ~dal_rewards_ratio:default_dal.rewards_ratio in + let dal_activation_level = + if default_dal.feature_enable then Raw_level.succ Raw_level.root + else + (* Deactivate the reveal if the dal is not enabled. *) + (* https://gitlab.com/tezos/tezos/-/issues/5968 + Encoding error with Raw_level + + We set the activation level to [pred max_int] to deactivate + the feature. The [pred] is needed to not trigger an encoding + exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) + Raw_level.of_int32_exn Int32.(pred max_int) + in { constants_mainnet with dal = @@ -464,6 +488,17 @@ let constants_test = redundancy_factor = 2; }; }; + sc_rollup = + Constants.Parametric. + { + constants_mainnet.sc_rollup with + reveal_activation_level = + { + constants_mainnet.sc_rollup.reveal_activation_level with + dal_page = dal_activation_level; + dal_parameters = dal_activation_level; + }; + }; issuance_weights; consensus_rights_delay = 2; delegate_parameters_activation_delay = 3; -- GitLab From 0a6118799be45d1c647067310dedce504ea4bd31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Cauderlier?= Date: Tue, 8 Apr 2025 14:57:13 +0200 Subject: [PATCH 5/5] Fix mainnet constants (Alpha) --- .../lib_parameters/default_parameters.ml | 59 +++++++++++++++---- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/src/proto_alpha/lib_parameters/default_parameters.ml b/src/proto_alpha/lib_parameters/default_parameters.ml index b9f81a01cd16..835c70375357 100644 --- a/src/proto_alpha/lib_parameters/default_parameters.ml +++ b/src/proto_alpha/lib_parameters/default_parameters.ml @@ -202,18 +202,7 @@ let constants_mainnet : Constants.Parametric.t = ~consensus_committee_size ~dal_rewards_ratio:default_dal.rewards_ratio in - let dal_activation_level = - if default_dal.feature_enable then Raw_level.succ Raw_level.root - else - (* Deactivate the reveal if the dal is not enabled. *) - (* https://gitlab.com/tezos/tezos/-/issues/5968 - Encoding error with Raw_level - - We set the activation level to [pred max_int] to deactivate - the feature. The [pred] is needed to not trigger an encoding - exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) - Raw_level.of_int32_exn Int32.(pred max_int) - in + let dal_activation_level = Raw_level.of_int32_exn 5726209l in let dal_attested_slots_validity_lag = (* A rollup node shouldn't import a page of an attested slot whose attested level is too far in the past w.r.t. the current level. Importation window @@ -420,6 +409,18 @@ let constants_sandbox = ~consensus_committee_size ~dal_rewards_ratio:default_dal.rewards_ratio in + let dal_activation_level = + if default_dal.feature_enable then Raw_level.succ Raw_level.root + else + (* Deactivate the reveal if the dal is not enabled. *) + (* https://gitlab.com/tezos/tezos/-/issues/5968 + Encoding error with Raw_level + + We set the activation level to [pred max_int] to deactivate + the feature. The [pred] is needed to not trigger an encoding + exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) + Raw_level.of_int32_exn Int32.(pred max_int) + in { constants_mainnet with dal = @@ -430,6 +431,17 @@ let constants_sandbox = cryptobox_parameters = {default_cryptobox_parameters with number_of_shards = 256}; }; + sc_rollup = + Constants.Parametric. + { + constants_mainnet.sc_rollup with + reveal_activation_level = + { + constants_mainnet.sc_rollup.reveal_activation_level with + dal_page = dal_activation_level; + dal_parameters = dal_activation_level; + }; + }; issuance_weights; blocks_preservation_cycles = 1; consensus_rights_delay = 2; @@ -456,6 +468,18 @@ let constants_test = ~consensus_committee_size ~dal_rewards_ratio:default_dal.rewards_ratio in + let dal_activation_level = + if default_dal.feature_enable then Raw_level.succ Raw_level.root + else + (* Deactivate the reveal if the dal is not enabled. *) + (* https://gitlab.com/tezos/tezos/-/issues/5968 + Encoding error with Raw_level + + We set the activation level to [pred max_int] to deactivate + the feature. The [pred] is needed to not trigger an encoding + exception with the value [Int32.int_min] (see tezt/tests/mockup.ml). *) + Raw_level.of_int32_exn Int32.(pred max_int) + in { constants_mainnet with dal = @@ -470,6 +494,17 @@ let constants_test = redundancy_factor = 2; }; }; + sc_rollup = + Constants.Parametric. + { + constants_mainnet.sc_rollup with + reveal_activation_level = + { + constants_mainnet.sc_rollup.reveal_activation_level with + dal_page = dal_activation_level; + dal_parameters = dal_activation_level; + }; + }; issuance_weights; consensus_rights_delay = 2; delegate_parameters_activation_delay = 3; -- GitLab