diff --git a/contrib/kaitai-struct-files/files/alpha__constants.ksy b/contrib/kaitai-struct-files/files/alpha__constants.ksy index df425343fc0e4777eabd965bd207e9ad96ff9002..51c655a4580b4cc3fdd8881a5461d58975dd2c90 100644 --- a/contrib/kaitai-struct-files/files/alpha__constants.ksy +++ b/contrib/kaitai-struct-files/files/alpha__constants.ksy @@ -49,8 +49,6 @@ types: type: s2 - id: attestation_threshold type: s2 - - id: blocks_per_epoch - type: s4 - id: redundancy_factor type: u1 - id: page_size diff --git a/contrib/kaitai-struct-files/files/alpha__constants__parametric.ksy b/contrib/kaitai-struct-files/files/alpha__constants__parametric.ksy index bd992556c3fe8183a2b2858ae65ff96937904fe4..fa867fa56722f5582b5e672bd4945eae4460fd19 100644 --- a/contrib/kaitai-struct-files/files/alpha__constants__parametric.ksy +++ b/contrib/kaitai-struct-files/files/alpha__constants__parametric.ksy @@ -49,8 +49,6 @@ types: type: s2 - id: attestation_threshold type: s2 - - id: blocks_per_epoch - type: s4 - id: redundancy_factor type: u1 - id: page_size diff --git a/contrib/kaitai-struct-files/files/alpha__parameters.ksy b/contrib/kaitai-struct-files/files/alpha__parameters.ksy index acdd2515c22f99e852ecdf0927e94c913cda36e4..e6801545055dcca9dbe0889cbfd8be4d8fee3efe 100644 --- a/contrib/kaitai-struct-files/files/alpha__parameters.ksy +++ b/contrib/kaitai-struct-files/files/alpha__parameters.ksy @@ -183,8 +183,6 @@ types: type: s2 - id: attestation_threshold type: s2 - - id: blocks_per_epoch - type: s4 - id: redundancy_factor type: u1 - id: page_size diff --git a/src/lib_dal_node/dal_plugin.ml b/src/lib_dal_node/dal_plugin.ml index 1ab059ffb79c31447e4b3ea9321bddc869504dc9..91d51bde6a9dff24fe259a425ac18bc5550043d9 100644 --- a/src/lib_dal_node/dal_plugin.ml +++ b/src/lib_dal_node/dal_plugin.ml @@ -40,7 +40,6 @@ type proto_parameters = { attestation_lag : int; attestation_threshold : int; cryptobox_parameters : Tezos_crypto_dal.Cryptobox.Verifier.parameters; - blocks_per_epoch : int32; } module type T = sig diff --git a/src/lib_dal_node/dal_plugin.mli b/src/lib_dal_node/dal_plugin.mli index 6d829a1855ffca48075f58343f74de3802a9449a..56419401d6e035797c31ba72bf3cee8008b75260 100644 --- a/src/lib_dal_node/dal_plugin.mli +++ b/src/lib_dal_node/dal_plugin.mli @@ -49,7 +49,6 @@ type proto_parameters = { attestation_lag : int; attestation_threshold : int; cryptobox_parameters : Tezos_crypto_dal.Cryptobox.Verifier.parameters; - blocks_per_epoch : int32; } module type T = sig diff --git a/src/proto_017_PtNairob/lib_dal/dal_plugin_registration.ml b/src/proto_017_PtNairob/lib_dal/dal_plugin_registration.ml index 21dea0d9d84e85da804cfc765dae2adb1cbc5b31..1b02684140359b41053543c4c8cb49db7d52dbf4 100644 --- a/src/proto_017_PtNairob/lib_dal/dal_plugin_registration.ml +++ b/src/proto_017_PtNairob/lib_dal/dal_plugin_registration.ml @@ -44,7 +44,7 @@ module Plugin = struct attestation_lag; attestation_threshold; cryptobox_parameters; - blocks_per_epoch; + blocks_per_epoch = _; } = parametric.dal in @@ -56,7 +56,6 @@ module Plugin = struct attestation_lag; attestation_threshold; cryptobox_parameters; - blocks_per_epoch; } let block_info ?chain ?block ~metadata ctxt = diff --git a/src/proto_018_Proxford/lib_dal/dal_plugin_registration.ml b/src/proto_018_Proxford/lib_dal/dal_plugin_registration.ml index 37dbff2cf5c7b0aa6dd1ecc6df244fac3a0bd186..8bb2e8072fcfbc3283334d754b468dedecf5a03b 100644 --- a/src/proto_018_Proxford/lib_dal/dal_plugin_registration.ml +++ b/src/proto_018_Proxford/lib_dal/dal_plugin_registration.ml @@ -44,7 +44,7 @@ module Plugin = struct attestation_lag; attestation_threshold; cryptobox_parameters; - blocks_per_epoch; + blocks_per_epoch = _; } = parametric.dal in @@ -56,7 +56,6 @@ module Plugin = struct attestation_lag; attestation_threshold; cryptobox_parameters; - blocks_per_epoch; } let block_info ?chain ?block ~metadata ctxt = diff --git a/src/proto_alpha/lib_benchmarks_proto/dal_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/dal_benchmarks.ml index 93aa79b053378e803ad21be5b4dbc80abf363699..f7e9400881827ed122bf87ac79a65b3724ce15e4 100644 --- a/src/proto_alpha/lib_benchmarks_proto/dal_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/dal_benchmarks.ml @@ -77,11 +77,7 @@ module Publish_slot_header : Benchmark.S = struct let open Lwt_result_wrap_syntax in let bench_promise = let dal = - { - Default_parameters.constants_mainnet.dal with - blocks_per_epoch = 1l; - feature_enable = true; - } + {Default_parameters.constants_mainnet.dal with feature_enable = true} in let* ctxt, _ = Execution_context.make ~dal ~rng_state () in let* cryptobox = diff --git a/src/proto_alpha/lib_dal/dal_plugin_registration.ml b/src/proto_alpha/lib_dal/dal_plugin_registration.ml index c49299b0b457a5d3f55d4ba76b62219b7a4ff964..a8458d1c1104f3c4039f5c6f316181361a78d6db 100644 --- a/src/proto_alpha/lib_dal/dal_plugin_registration.ml +++ b/src/proto_alpha/lib_dal/dal_plugin_registration.ml @@ -45,7 +45,6 @@ module Plugin = struct attestation_lag; attestation_threshold; cryptobox_parameters; - blocks_per_epoch; } = parametric.dal in @@ -57,7 +56,6 @@ module Plugin = struct attestation_lag; attestation_threshold; cryptobox_parameters; - blocks_per_epoch; } let block_info ?chain ?block ~metadata ctxt = diff --git a/src/proto_alpha/lib_parameters/default_parameters.ml b/src/proto_alpha/lib_parameters/default_parameters.ml index 370083240de9b0252d1c82b61b8760e5aa9d7aba..aed7a63bb99f6980d19936c63db118f8cd6ffbad 100644 --- a/src/proto_alpha/lib_parameters/default_parameters.ml +++ b/src/proto_alpha/lib_parameters/default_parameters.ml @@ -144,7 +144,6 @@ let default_dal = number_of_slots = 256; attestation_lag = 4; attestation_threshold = 50; - blocks_per_epoch = 1l; cryptobox_parameters = default_cryptobox_parameters; } @@ -331,7 +330,6 @@ let constants_sandbox = { constants_mainnet.dal with number_of_slots = 16; - blocks_per_epoch = 1l; cryptobox_parameters = derive_cryptobox_parameters ~redundancy_factor:8 @@ -369,7 +367,6 @@ let constants_test = { constants_mainnet.dal with number_of_slots = 8; - blocks_per_epoch = 1l; cryptobox_parameters = derive_cryptobox_parameters ~redundancy_factor:4 diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index a8bf747061d083299c73751ad2541e361d759244..a0c614317b05ee62cdc73b79434ce1bbfec20c68 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -816,7 +816,6 @@ module Constants : sig number_of_slots : int; attestation_lag : int; attestation_threshold : int; - blocks_per_epoch : int32; cryptobox_parameters : Dal.parameters; } diff --git a/src/proto_alpha/lib_protocol/constants_parametric_repr.ml b/src/proto_alpha/lib_protocol/constants_parametric_repr.ml index a85621d4f7a6d53e294a6f8a721e59160f184fb5..05aba5cf22c4dc099e0fb64f28eb3364d2a51ffc 100644 --- a/src/proto_alpha/lib_protocol/constants_parametric_repr.ml +++ b/src/proto_alpha/lib_protocol/constants_parametric_repr.ml @@ -31,7 +31,6 @@ type dal = { number_of_slots : int; attestation_lag : int; attestation_threshold : int; - blocks_per_epoch : int32; cryptobox_parameters : Dal.parameters; } @@ -45,21 +44,18 @@ let dal_encoding = attestation_lag; attestation_threshold; cryptobox_parameters; - blocks_per_epoch; } -> ( ( feature_enable, incentives_enable, number_of_slots, attestation_lag, - attestation_threshold, - blocks_per_epoch ), + attestation_threshold ), cryptobox_parameters )) (fun ( ( feature_enable, incentives_enable, number_of_slots, attestation_lag, - attestation_threshold, - blocks_per_epoch ), + attestation_threshold ), cryptobox_parameters ) -> { feature_enable; @@ -67,17 +63,15 @@ let dal_encoding = number_of_slots; attestation_lag; attestation_threshold; - blocks_per_epoch; cryptobox_parameters; }) (merge_objs - (obj6 + (obj5 (req "feature_enable" bool) (req "incentives_enable" bool) (req "number_of_slots" int16) (req "attestation_lag" int16) - (req "attestation_threshold" int16) - (req "blocks_per_epoch" int32)) + (req "attestation_threshold" int16)) Dal.parameters_encoding) (* The encoded representation of this type is stored in the context as diff --git a/src/proto_alpha/lib_protocol/constants_parametric_repr.mli b/src/proto_alpha/lib_protocol/constants_parametric_repr.mli index 27d87927420ede1404f97a28702645936055c5e5..ee3247a84cfa6e41b3efe3160345d2d71a310f13 100644 --- a/src/proto_alpha/lib_protocol/constants_parametric_repr.mli +++ b/src/proto_alpha/lib_protocol/constants_parametric_repr.mli @@ -31,7 +31,6 @@ type dal = { number_of_slots : int; attestation_lag : int; attestation_threshold : int; - blocks_per_epoch : int32; cryptobox_parameters : Dal.parameters; } diff --git a/src/proto_alpha/lib_protocol/constants_repr.ml b/src/proto_alpha/lib_protocol/constants_repr.ml index 5e3949f9fe7fd5e7204741e55c47da20233364d5..f8259a29c8aa135c6d56b65bdefa1e7e8740d033 100644 --- a/src/proto_alpha/lib_protocol/constants_repr.ml +++ b/src/proto_alpha/lib_protocol/constants_repr.ml @@ -331,17 +331,6 @@ let check_constants constants = (Invalid_protocol_constants "The number of data availability slot must be between 1 and 256") in - let* () = - error_unless - Compare.Int32.( - constants.dal.blocks_per_epoch > 0l - && constants.dal.blocks_per_epoch <= constants.blocks_per_cycle - && Int32.rem constants.blocks_per_cycle constants.dal.blocks_per_epoch - = 0l) - (Invalid_protocol_constants - "The epoch length must be between 1 and blocks_per_cycle, and \ - blocks_per_epoch must divide blocks_per_cycle.") - in let* () = error_unless Compare.Int.(constants.dal.attestation_lag > 1) diff --git a/src/proto_alpha/lib_protocol/dal_apply.ml b/src/proto_alpha/lib_protocol/dal_apply.ml index d9387a71ba3113d319000a93e25dabd929b9f5e2..074be3f0ac7a59d26855adbe0c650c4fd1768e20 100644 --- a/src/proto_alpha/lib_protocol/dal_apply.ml +++ b/src/proto_alpha/lib_protocol/dal_apply.ml @@ -196,24 +196,8 @@ let finalisation ctxt = let compute_committee ctxt level = let open Lwt_result_syntax in let*? () = assert_dal_feature_enabled ctxt in - let blocks_per_epoch = (Constants.parametric ctxt).dal.blocks_per_epoch in - let first_level_in_epoch = - match - Level.sub - ctxt - level - (Int32.to_int @@ Int32.rem level.Level.cycle_position blocks_per_epoch) - with - | Some v -> v - | None -> - (* unreachable, because level.level >= level.cycle_position >= - (level.cycle_position mod blocks_per_epoch) *) - assert false - in let pkh_from_tenderbake_slot slot = - let+ ctxt, consensus_key = - Stake_distribution.slot_owner ctxt first_level_in_epoch slot - in + let+ ctxt, consensus_key = Stake_distribution.slot_owner ctxt level slot in (ctxt, pkh_of_consensus_key consensus_key) in (* This committee is cached because it is the one we will use diff --git a/src/proto_alpha/lib_protocol/raw_context.ml b/src/proto_alpha/lib_protocol/raw_context.ml index 6ae22b069247d4bab51bf9f45a0170118364ea78..9231712e39f48399a893ce893fc325f765b87210 100644 --- a/src/proto_alpha/lib_protocol/raw_context.ml +++ b/src/proto_alpha/lib_protocol/raw_context.ml @@ -1044,7 +1044,6 @@ let prepare_first_block ~level ~timestamp _chain_id ctxt = number_of_slots = c.dal.number_of_slots; attestation_lag = c.dal.attestation_lag; attestation_threshold = c.dal.attestation_threshold; - blocks_per_epoch = c.dal.blocks_per_epoch; cryptobox_parameters; } in diff --git a/tezt/lib_tezos/dal_common.ml b/tezt/lib_tezos/dal_common.ml index 691d7bc5560577e359abd873239972a0b846e709..f7f5661c7eae54efc2e9fbf45adb62b427ee216f 100644 --- a/tezt/lib_tezos/dal_common.ml +++ b/tezt/lib_tezos/dal_common.ml @@ -35,6 +35,8 @@ module Parameters = struct attestation_lag : int; attestation_threshold : int; blocks_per_epoch : int; + (* TODO: https://gitlab.com/tezos/tezos/-/issues/6923 + To be removed when [Protocol.previous_protocol Alpha >= P]. *) } let parameter_file protocol = @@ -52,7 +54,10 @@ module Parameters = struct let attestation_threshold = JSON.(json |-> "attestation_threshold" |> as_int) in - let blocks_per_epoch = JSON.(json |-> "blocks_per_epoch" |> as_int) in + let blocks_per_epoch = + JSON.(json |-> "blocks_per_epoch" |> as_int_opt) + |> Option.value ~default:1 + in let feature_enabled = JSON.(json |-> "feature_enable" |> as_bool) in let incentives_enabled = JSON.(json |-> "incentives_enable" |> as_bool_opt) diff --git a/tezt/tests/dal.ml b/tezt/tests/dal.ml index 34fae2ca65f4971b4525d427cb2a86e0f98d5afa..d47ffea6175d304c5fe7289ed86d5798936188a2 100644 --- a/tezt/tests/dal.ml +++ b/tezt/tests/dal.ml @@ -549,44 +549,23 @@ let test_feature_flag _protocol _parameters _cryptobox node client Test.fail "Unexpected entry dal in the context when DAL is disabled" ; unit -let test_one_committee_per_epoch _protocol parameters _cryptobox node _client +let test_one_committee_per_level _protocol _parameters _cryptobox node _client _bootstrap_key = - let blocks_per_epoch = parameters.Dal.Parameters.blocks_per_epoch in let* current_level = Node.RPC.(call node @@ get_chain_block_helper_current_level ()) in (* The test assumes we are at a level when an epoch starts. And that is indeed the case. *) assert (current_level.cycle_position = 0) ; - let* first_committee = + let* current_committee = Dal.Committee.at_level node ~level:current_level.level in - (* We iterate through (the committees at) levels [current_level + - offset], with [offset] from 1 to [blocks_per_epoch]. At offset 0 - we have the [first_committee] (first in the current epoch). The - committees at offsets 1 to [blocks_per_epoch - 1] should be the - same as the one at offset 0, the one at [blocks_per_epoch] (first - in the next epoch) should be different. *) - let rec iter offset = - if offset > blocks_per_epoch then unit - else - let level = current_level.level + offset in - let* committee = Dal.Committee.at_level node ~level in - if offset < blocks_per_epoch then ( - Check.((first_committee = committee) Dal.Committee.typ) - ~error_msg: - "Unexpected different DAL committees at first level: %L, versus \ - current level: %R" ; - iter (offset + 1)) - else if offset = blocks_per_epoch then ( - Check.((first_committee <> committee) Dal.Committee.typ) - ~error_msg: - "Unexpected equal DAL committees at first levels in subsequent \ - epochs: %L and %R" ; - unit) - else iter (offset + 1) + let* next_committee = + Dal.Committee.at_level node ~level:(current_level.level + 1) in - iter 1 + Check.((current_committee <> next_committee) Dal.Committee.typ) + ~error_msg:"Unexpected equal DAL committees at subsequent levels: %L and %R" ; + unit let publish_dummy_slot ~source ?error ?fee ~index ~message cryptobox = let commitment, proof = Dal.(Commitment.dummy_commitment cryptobox message) in @@ -987,7 +966,6 @@ let test_slots_attestation_operation_dal_committee_membership_check _protocol in let preserved_cycles = JSON.(proto_params |-> "preserved_cycles" |> as_int) in let blocks_per_cycle = JSON.(proto_params |-> "blocks_per_cycle" |> as_int) in - let blocks_per_epoch = parameters.Dal.Parameters.blocks_per_epoch in (* With [consensus_committee_size = 1024] slots in total, the new baker should get roughly n / 64 = 16 TB slots on average. So the probability that it is on TB committee is high. With [number_of_shards = 16] (which is the minimum @@ -1034,10 +1012,8 @@ let test_slots_attestation_operation_dal_committee_membership_check _protocol [get_chain_block_context_dal_shards] RPC") in if List.mem new_account.public_key_hash committee then ( - Log.info - "Bake another %d blocks to change the DAL committee" - blocks_per_epoch ; - let* () = bake_for ~count:blocks_per_epoch client in + Log.info "Bake another block to change the DAL committee" ; + let* () = bake_for client in iter ()) else let* (`OpHash _oph) = @@ -4459,8 +4435,8 @@ let register ~protocols = test_feature_flag protocols ; scenario_with_layer1_node - "one_committee_per_epoch" - test_one_committee_per_epoch + "one_committee_per_level" + test_one_committee_per_level protocols ; (* Tests with layer1 and dal nodes *) 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 4e025bbfd74b88524df7d73dd381f87474dc6ca9..795b91fce55134a2e69ae8e7c301fe2552fe5c4c 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 @@ -39,9 +39,9 @@ "dal_parametric": { "feature_enable": false, "incentives_enable": false, "number_of_slots": 16, "attestation_lag": 4, - "attestation_threshold": 50, "blocks_per_epoch": 1, - "redundancy_factor": 8, "page_size": 128, "slot_size": 32768, - "number_of_shards": 64 }, "smart_rollup_arith_pvm_enable": false, + "attestation_threshold": 50, "redundancy_factor": 8, "page_size": 128, + "slot_size": 32768, "number_of_shards": 64 }, + "smart_rollup_arith_pvm_enable": false, "smart_rollup_origination_size": 6314, "smart_rollup_challenge_window_in_blocks": 120960, "smart_rollup_stake_amount": "10000000000", 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 86dbcd70f339589bb3a20e835e9f4f1ec2b8ddd1..60dde986afeece866e3136e493ddd20a38187f6d 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 @@ -39,9 +39,9 @@ "dal_parametric": { "feature_enable": false, "incentives_enable": false, "number_of_slots": 16, "attestation_lag": 4, - "attestation_threshold": 50, "blocks_per_epoch": 1, - "redundancy_factor": 8, "page_size": 128, "slot_size": 32768, - "number_of_shards": 64 }, "smart_rollup_arith_pvm_enable": false, + "attestation_threshold": 50, "redundancy_factor": 8, "page_size": 128, + "slot_size": 32768, "number_of_shards": 64 }, + "smart_rollup_arith_pvm_enable": false, "smart_rollup_origination_size": 6314, "smart_rollup_challenge_window_in_blocks": 120960, "smart_rollup_stake_amount": "10000000000", 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 030a2166951fb79d33341dd6f0dab34acec65861..1127ebd4ca805139cf04bc91617c9d203882acad 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 @@ -39,9 +39,9 @@ "dal_parametric": { "feature_enable": false, "incentives_enable": false, "number_of_slots": 16, "attestation_lag": 4, - "attestation_threshold": 50, "blocks_per_epoch": 1, - "redundancy_factor": 8, "page_size": 128, "slot_size": 32768, - "number_of_shards": 64 }, "smart_rollup_arith_pvm_enable": false, + "attestation_threshold": 50, "redundancy_factor": 8, "page_size": 128, + "slot_size": 32768, "number_of_shards": 64 }, + "smart_rollup_arith_pvm_enable": false, "smart_rollup_origination_size": 6314, "smart_rollup_challenge_window_in_blocks": 120960, "smart_rollup_stake_amount": "10000000000", diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out index f5b22f2e4e3cd8bba0c427402d3db7440abdb9a4..ee4e6e65150fc06d6229793561cdc182e6b38b4b 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out @@ -39,9 +39,9 @@ "dal_parametric": { "feature_enable": false, "incentives_enable": false, "number_of_slots": 16, "attestation_lag": 4, - "attestation_threshold": 50, "blocks_per_epoch": 1, - "redundancy_factor": 8, "page_size": 128, "slot_size": 32768, - "number_of_shards": 64 }, "smart_rollup_arith_pvm_enable": false, + "attestation_threshold": 50, "redundancy_factor": 8, "page_size": 128, + "slot_size": 32768, "number_of_shards": 64 }, + "smart_rollup_arith_pvm_enable": false, "smart_rollup_origination_size": 6314, "smart_rollup_challenge_window_in_blocks": 120960, "smart_rollup_stake_amount": "10000000000", diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out index f5b22f2e4e3cd8bba0c427402d3db7440abdb9a4..ee4e6e65150fc06d6229793561cdc182e6b38b4b 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out @@ -39,9 +39,9 @@ "dal_parametric": { "feature_enable": false, "incentives_enable": false, "number_of_slots": 16, "attestation_lag": 4, - "attestation_threshold": 50, "blocks_per_epoch": 1, - "redundancy_factor": 8, "page_size": 128, "slot_size": 32768, - "number_of_shards": 64 }, "smart_rollup_arith_pvm_enable": false, + "attestation_threshold": 50, "redundancy_factor": 8, "page_size": 128, + "slot_size": 32768, "number_of_shards": 64 }, + "smart_rollup_arith_pvm_enable": false, "smart_rollup_origination_size": 6314, "smart_rollup_challenge_window_in_blocks": 120960, "smart_rollup_stake_amount": "10000000000", diff --git a/tezt/tests/mockup.ml b/tezt/tests/mockup.ml index 7c1e6f5a7dd74d1568b75ea54f6badf5a8c86a2b..68dc0fca78d93d3715ead1041ddc01893ce99df5 100644 --- a/tezt/tests/mockup.ml +++ b/tezt/tests/mockup.ml @@ -1189,9 +1189,9 @@ let test_create_mockup_config_show_init_roundtrip protocols = ("consensus_threshold", `Float 0.0); ] in - (* To fulfill the requirement that [blocks_per_epoch] divides - [blocks_per_cycle], we set [blocks_per_cycle] to 1, for simplicity (even - if the default value is also 1). *) + (* To fulfill the requirement that [blocks_per_epoch], present in protocols + up to O, divides [blocks_per_cycle], we set [blocks_per_cycle] to 1, for + simplicity (even if the default value is also 1). *) let updated_dal_parametric = let dal_parametric_constants_succ = JSON.(parametric_constants_succ |-> "dal_parametric") @@ -1260,12 +1260,18 @@ let test_create_mockup_config_show_init_roundtrip protocols = JSON.unannotate new_adaptive_rewards_params ); ] in + (* TODO: https://gitlab.com/tezos/tezos/-/issues/6923 + remove when `blocks_per_epoch` is not used anymore in tests *) + let parametric_constants_succ = + if Protocol.number protocol > 018 then parametric_constants_succ + else JSON.merge_objects parametric_constants_succ updated_dal_parametric + in return JSON.( merge_objects (merge_objects (merge_objects - (merge_objects parametric_constants_succ updated_dal_parametric) + parametric_constants_succ constant_parametric_constants) mockup_constants) co_primed_adaptive_rewards)