From 05a61b1c26ba4f6e18637fd3b58b5a9c717bb028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:46:15 +0200 Subject: [PATCH 01/15] Protocol/DAL: Fix parametric parameters values --- .../lib_parameters/default_parameters.ml | 17 +++++++++++++++-- src/proto_alpha/lib_protocol/raw_context.ml | 2 +- ...ode client) RPC regression tests- others.out | 4 ++-- ...mode light) RPC regression tests- others.out | 4 ++-- ...mode proxy) RPC regression tests- others.out | 4 ++-- ...r_data_dir) RPC regression tests- others.out | 4 ++-- ...server_rpc) RPC regression tests- others.out | 4 ++-- ... commitments in the rollup node (no_comm.out | 8 ++++---- 8 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/proto_alpha/lib_parameters/default_parameters.ml b/src/proto_alpha/lib_parameters/default_parameters.ml index 36ce5101dabd..2ed4df78331e 100644 --- a/src/proto_alpha/lib_parameters/default_parameters.ml +++ b/src/proto_alpha/lib_parameters/default_parameters.ml @@ -48,14 +48,16 @@ let sc_rollup_max_active_outbox_levels = pay for at origination time. *) let sc_rollup_max_outbox_messages_per_level = 100 -(* DAL/FIXME: Think harder about those values. *) +(* DAL/FIXME https://gitlab.com/tezos/tezos/-/issues/3177 + + Think harder about those values. *) let default_dal = Constants.Parametric. { feature_enable = false; number_of_slots = 256; number_of_shards = 2048; - endorsement_lag = 2; + endorsement_lag = 1; availability_threshold = 50; } @@ -201,6 +203,16 @@ let constants_mainnet = }; } +let default_dal_sandbox = + Constants.Parametric. + { + feature_enable = false; + number_of_slots = 16; + number_of_shards = 256; + endorsement_lag = 1; + availability_threshold = 50; + } + let constants_sandbox = let consensus_committee_size = 256 in let block_time = 1 in @@ -217,6 +229,7 @@ let constants_sandbox = in { constants_mainnet with + dal = default_dal_sandbox; Constants.Parametric.preserved_cycles = 2; blocks_per_cycle = 8l; blocks_per_commitment = 4l; diff --git a/src/proto_alpha/lib_protocol/raw_context.ml b/src/proto_alpha/lib_protocol/raw_context.ml index f14d37096401..c1c7d648aa36 100644 --- a/src/proto_alpha/lib_protocol/raw_context.ml +++ b/src/proto_alpha/lib_protocol/raw_context.ml @@ -916,7 +916,7 @@ let prepare_first_block ~level ~timestamp ctxt = feature_enable = false; number_of_slots = 256; number_of_shards = 2048; - endorsement_lag = 2; + endorsement_lag = 1; availability_threshold = 50; } in diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- others.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- others.out index 2dcff7529047..390aabb512a2 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- others.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- others.out @@ -43,8 +43,8 @@ "tx_rollup_rejection_max_proof_size": 30000, "tx_rollup_sunset_level": 3473409, "dal_parametric": - { "feature_enable": false, "number_of_slots": 256, - "number_of_shards": 2048, "endorsement_lag": 2, + { "feature_enable": false, "number_of_slots": 16, + "number_of_shards": 256, "endorsement_lag": 1, "availability_threshold": 50 }, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314, "sc_rollup_challenge_window_in_blocks": 20160, diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- others.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- others.out index 56f90a3571b6..91d7cfb45c1d 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- others.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- others.out @@ -43,8 +43,8 @@ "tx_rollup_rejection_max_proof_size": 30000, "tx_rollup_sunset_level": 3473409, "dal_parametric": - { "feature_enable": false, "number_of_slots": 256, - "number_of_shards": 2048, "endorsement_lag": 2, + { "feature_enable": false, "number_of_slots": 16, + "number_of_shards": 256, "endorsement_lag": 1, "availability_threshold": 50 }, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314, "sc_rollup_challenge_window_in_blocks": 20160, diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- others.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- others.out index 4be9e6a5203f..642d8368c71e 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- others.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- others.out @@ -43,8 +43,8 @@ "tx_rollup_rejection_max_proof_size": 30000, "tx_rollup_sunset_level": 3473409, "dal_parametric": - { "feature_enable": false, "number_of_slots": 256, - "number_of_shards": 2048, "endorsement_lag": 2, + { "feature_enable": false, "number_of_slots": 16, + "number_of_shards": 256, "endorsement_lag": 1, "availability_threshold": 50 }, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314, "sc_rollup_challenge_window_in_blocks": 20160, diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- others.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- others.out index e977b651c850..2a549b3dbd76 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- others.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- others.out @@ -43,8 +43,8 @@ "tx_rollup_rejection_max_proof_size": 30000, "tx_rollup_sunset_level": 3473409, "dal_parametric": - { "feature_enable": false, "number_of_slots": 256, - "number_of_shards": 2048, "endorsement_lag": 2, + { "feature_enable": false, "number_of_slots": 16, + "number_of_shards": 256, "endorsement_lag": 1, "availability_threshold": 50 }, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314, "sc_rollup_challenge_window_in_blocks": 20160, diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- others.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- others.out index e977b651c850..2a549b3dbd76 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- others.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- others.out @@ -43,8 +43,8 @@ "tx_rollup_rejection_max_proof_size": 30000, "tx_rollup_sunset_level": 3473409, "dal_parametric": - { "feature_enable": false, "number_of_slots": 256, - "number_of_shards": 2048, "endorsement_lag": 2, + { "feature_enable": false, "number_of_slots": 16, + "number_of_shards": 256, "endorsement_lag": 1, "availability_threshold": 50 }, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314, "sc_rollup_challenge_window_in_blocks": 20160, diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (no_comm.out b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (no_comm.out index 3589436a2fd2..2af46c6f84f4 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (no_comm.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- observing the correct handling of commitments in the rollup node (no_comm.out @@ -95,8 +95,8 @@ This sequence of operations was run: "tx_rollup_rejection_max_proof_size": 30000, "tx_rollup_sunset_level": 3473409, "dal_parametric": - { "feature_enable": false, "number_of_slots": 256, - "number_of_shards": 2048, "endorsement_lag": 2, + { "feature_enable": false, "number_of_slots": 16, + "number_of_shards": 256, "endorsement_lag": 1, "availability_threshold": 50 }, "sc_rollup_enable": true, "sc_rollup_origination_size": 6314, "sc_rollup_challenge_window_in_blocks": 1, @@ -195,8 +195,8 @@ This sequence of operations was run: "tx_rollup_rejection_max_proof_size": 30000, "tx_rollup_sunset_level": 3473409, "dal_parametric": - { "feature_enable": false, "number_of_slots": 256, - "number_of_shards": 2048, "endorsement_lag": 2, + { "feature_enable": false, "number_of_slots": 16, + "number_of_shards": 256, "endorsement_lag": 1, "availability_threshold": 50 }, "sc_rollup_enable": true, "sc_rollup_origination_size": 6314, "sc_rollup_challenge_window_in_blocks": 1, -- GitLab From c81cf9d20cfbe7a8b451c8ebaa9224d2b9754be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:47:01 +0200 Subject: [PATCH 02/15] Protocol/DAL: If not slots are posted, don't store anything --- src/proto_alpha/lib_protocol/dal_slot_storage.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/proto_alpha/lib_protocol/dal_slot_storage.ml b/src/proto_alpha/lib_protocol/dal_slot_storage.ml index 5736bfa01ea5..e2883ffd8be2 100644 --- a/src/proto_alpha/lib_protocol/dal_slot_storage.ml +++ b/src/proto_alpha/lib_protocol/dal_slot_storage.ml @@ -28,7 +28,9 @@ let find ctxt level = Storage.Dal.Slot_headers.find ctxt level let finalize_current_slots ctxt = let current_level = Raw_context.current_level ctxt in let slots = Raw_context.Dal.candidates ctxt in - Storage.Dal.Slot_headers.add ctxt current_level.level slots + match slots with + | [] -> Lwt.return ctxt + | _ :: _ -> Storage.Dal.Slot_headers.add ctxt current_level.level slots let compute_available_slots ctxt slots = let fold_available_slots available_slots slot = -- GitLab From 6ff0a592daaed42a378b08bd509b4b73cc74a51e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:47:33 +0200 Subject: [PATCH 03/15] Protocol/DAL: Fix slot availability watermark --- src/proto_alpha/lib_protocol/operation_repr.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/proto_alpha/lib_protocol/operation_repr.ml b/src/proto_alpha/lib_protocol/operation_repr.ml index b148ca65b029..82c822477d13 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.ml +++ b/src/proto_alpha/lib_protocol/operation_repr.ml @@ -199,10 +199,13 @@ type consensus_watermark = let bytes_of_consensus_watermark = function | Preendorsement chain_id -> Bytes.cat (Bytes.of_string "\x12") (Chain_id.to_bytes chain_id) + | Dal_slot_availability chain_id + (* We reuse the watermark of an endorsement. This is because this + operation is temporary and aims to be merged with an endorsement + later on. Moreover, there is a leak of abstraction with the shell + which makes adding a new watermark a bit awkward. *) | Endorsement chain_id -> Bytes.cat (Bytes.of_string "\x13") (Chain_id.to_bytes chain_id) - | Dal_slot_availability chain_id -> - Bytes.cat (Bytes.of_string "\x14") (Chain_id.to_bytes chain_id) let to_watermark w = Signature.Custom (bytes_of_consensus_watermark w) -- GitLab From beceef0cae7f50c28182e16ead19cfb54fdcf2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:47:50 +0200 Subject: [PATCH 04/15] Protocol/DAL: Fix shards computation --- src/proto_alpha/lib_protocol/raw_context.ml | 25 ++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/proto_alpha/lib_protocol/raw_context.ml b/src/proto_alpha/lib_protocol/raw_context.ml index c1c7d648aa36..0d4b3a1ba51f 100644 --- a/src/proto_alpha/lib_protocol/raw_context.ml +++ b/src/proto_alpha/lib_protocol/raw_context.ml @@ -1503,18 +1503,27 @@ module Dal = struct the consensus which is hackish and probably not what we want at the end. However, it should be enough for a prototype. This has a very bad complexity too. *) - let shards ctxt ~endorser = + let rec compute_shards ?(index = 0) ctxt ~endorser = let max_shards = ctxt.back.constants.dal.number_of_shards in Slot_repr.Map.fold_e - (fun slot (_, public_key_hash, _) shards -> - (* Early fail because 2048 < 7000 *) - if Compare.Int.(Slot_repr.to_int slot >= max_shards) then Error shards + (fun _ (_, public_key_hash, power) (index, shards) -> + let limit = Compare.Int.min (index + power) max_shards in + (* Early fail when we have reached the desired number of shards *) + if Compare.Int.(index >= max_shards) then Error shards else if Signature.Public_key_hash.(public_key_hash = endorser) then - Ok (Slot_repr.to_int slot :: shards) - else Ok shards) + let shards = Misc.(index --> (limit - 1)) in + Ok (index + power, shards) + else Ok (index + power, shards)) ctxt.back.consensus.allowed_endorsements - [] + (index, []) |> function - | Ok shards -> shards + | Ok (index, []) -> + (* This happens if the number of Tenderbake slots is below the + number of shards. Therefore, we reuse the committee using a + shift (index being the size of the committee). *) + compute_shards ~index ctxt ~endorser + | Ok (_index, shards) -> shards | Error shards -> shards + + let shards ctxt ~endorser = compute_shards ~index:0 ctxt ~endorser end -- GitLab From e453f403795be3490b9016ad52e30550553d38c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:48:14 +0200 Subject: [PATCH 05/15] Protocol/DAL: Fix slot publication --- src/proto_alpha/lib_protocol/dal_slot_repr.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/proto_alpha/lib_protocol/dal_slot_repr.ml b/src/proto_alpha/lib_protocol/dal_slot_repr.ml index 44539286a8a9..4d2bf475410d 100644 --- a/src/proto_alpha/lib_protocol/dal_slot_repr.ml +++ b/src/proto_alpha/lib_protocol/dal_slot_repr.ml @@ -99,7 +99,9 @@ module Slot_market = struct | Some ((_slot : slot), current_fees) when Tez_repr.(current_fees >= fees) -> current_candidate - | _ -> Some (slot, fees) + | _ -> + has_changed := true ; + Some (slot, fees) in let candidates = List.mapi -- GitLab From 8d05455f2095542a756f36807f57bf49acf5a3ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:48:53 +0200 Subject: [PATCH 06/15] Protocol/DAL: Fix decidability of the availability of a slot --- src/proto_alpha/lib_protocol/dal_endorsement_repr.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/proto_alpha/lib_protocol/dal_endorsement_repr.ml b/src/proto_alpha/lib_protocol/dal_endorsement_repr.ml index 86855111bcab..bea9aa634abd 100644 --- a/src/proto_alpha/lib_protocol/dal_endorsement_repr.ml +++ b/src/proto_alpha/lib_protocol/dal_endorsement_repr.ml @@ -119,12 +119,12 @@ module Accountability = struct | None -> false | Some bitset -> let acc = ref 0 in - let max = Bitset.occupied_size_in_bits bitset in + let nb_shards = Bitset.occupied_size_in_bits bitset in List.iter (fun x -> match Bitset.mem bitset x with | Error _ | Ok false -> () | Ok true -> incr acc) - Misc.(0 --> max) ; - Compare.Int.(!acc >= threshold) + Misc.(0 --> (nb_shards - 1)) ; + Compare.Int.(!acc >= threshold * nb_shards / 100) end -- GitLab From f6c6b8eafdec07c09d23ce12e8f7169bf8c0f6fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:49:19 +0200 Subject: [PATCH 07/15] Protocol/DAL: Fix error kind when they are competing slot headers --- src/proto_alpha/lib_protocol/dal_apply.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto_alpha/lib_protocol/dal_apply.ml b/src/proto_alpha/lib_protocol/dal_apply.ml index 4d88a9db8126..118d1f7741b1 100644 --- a/src/proto_alpha/lib_protocol/dal_apply.ml +++ b/src/proto_alpha/lib_protocol/dal_apply.ml @@ -131,7 +131,7 @@ let () = let open Data_encoding in let description = "Slot header with too low fees" in register_error_kind - `Permanent + `Branch ~id:"dal_publish_slot_header_with_low_fees" ~title:"DAL slot header with low fees" ~description -- GitLab From 64da1f36a47d21ce36a890086e801c0da5a8a093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:50:00 +0200 Subject: [PATCH 08/15] Protocol/DAL: Fix size comparison for slots --- src/proto_alpha/lib_protocol/dal_apply.ml | 34 +++++++++++++---------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/proto_alpha/lib_protocol/dal_apply.ml b/src/proto_alpha/lib_protocol/dal_apply.ml index 118d1f7741b1..2d7508bf7ca7 100644 --- a/src/proto_alpha/lib_protocol/dal_apply.ml +++ b/src/proto_alpha/lib_protocol/dal_apply.ml @@ -53,37 +53,43 @@ let only_if_dal_feature_enabled ctxt ~default f = let Parametric.{dal = {feature_enable; _}; _} = parametric ctxt in if feature_enable then f ctxt else default ctxt -type error += Dal_endorsement_unexpected_size of {expected : int; got : int} +type error += + | Dal_endorsement_size_limit_exceeded of {maximum_size : int; got : int} let () = let open Data_encoding in - let description = - "The endorsement for data availability has a different size" - in + let description = "The endorsement for data availability is a too big" in register_error_kind `Permanent - ~id:"dal_endorsement_unexpected_size" - ~title:"DAL endorsement unexpected size" + ~id:"dal_endorsement_size_limit_exceeded" + ~title:"DAL endorsement exceeded the limit" ~description - ~pp:(fun ppf (expected, got) -> - Format.fprintf ppf "%s: Expected %d. Got %d." description expected got) - (obj2 (req "expected_size" int31) (req "got" int31)) + ~pp:(fun ppf (maximum_size, got) -> + Format.fprintf + ppf + "%s: Maximum is %d. Got %d." + description + maximum_size + got) + (obj2 (req "maximum_size" int31) (req "got" int31)) (function - | Dal_endorsement_unexpected_size {expected; got} -> Some (expected, got) + | Dal_endorsement_size_limit_exceeded {maximum_size; got} -> + Some (maximum_size, got) | _ -> None) - (fun (expected, got) -> Dal_endorsement_unexpected_size {expected; got}) + (fun (maximum_size, got) -> + Dal_endorsement_size_limit_exceeded {maximum_size; got}) let validate_data_availability ctxt data_availability = assert_dal_feature_enabled ctxt >>? fun () -> let open Constants in let Parametric.{dal = {number_of_slots; _}; _} = parametric ctxt in - let expected_size = + let maximum_size = Dal.Endorsement.expected_size_in_bits ~max_index:(number_of_slots - 1) in let size = Dal.Endorsement.occupied_size_in_bits data_availability in error_unless - Compare.Int.(size = expected_size) - (Dal_endorsement_unexpected_size {expected = expected_size; got = size}) + Compare.Int.(size <= maximum_size) + (Dal_endorsement_size_limit_exceeded {maximum_size; got = size}) let apply_data_availability ctxt data_availability ~endorser = assert_dal_feature_enabled ctxt >>?= fun () -> -- GitLab From bf2a2df3d128989d842c1be3f3762774ff31f133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:50:53 +0200 Subject: [PATCH 09/15] Protocol/DAL: Fix result encodings for DAL operations --- src/proto_alpha/lib_protocol/apply_results.ml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/proto_alpha/lib_protocol/apply_results.ml b/src/proto_alpha/lib_protocol/apply_results.ml index f6436fba40d8..830fdb3c8636 100644 --- a/src/proto_alpha/lib_protocol/apply_results.ml +++ b/src/proto_alpha/lib_protocol/apply_results.ml @@ -2204,6 +2204,7 @@ let contents_and_result_encoding = make seed_nonce_revelation_case; make endorsement_case; make preendorsement_case; + make dal_slot_availability_case; make double_preendorsement_evidence_case; make double_endorsement_evidence_case; make double_baking_evidence_case; @@ -2224,6 +2225,7 @@ let contents_and_result_encoding = make tx_rollup_remove_commitment_case; make tx_rollup_rejection_case; make transfer_ticket_case; + make dal_publish_slot_header_case; make tx_rollup_dispatch_tickets_case; make sc_rollup_originate_case; make sc_rollup_add_messages_case; @@ -2785,6 +2787,17 @@ let kind_equal : } ) -> Some Eq | Manager_operation {operation = Transfer_ticket _; _}, _ -> None + | ( Manager_operation {operation = Dal_publish_slot_header _; _}, + Manager_operation_result + {operation_result = Applied (Dal_publish_slot_header_result _); _} ) -> + Some Eq + | ( Manager_operation {operation = Dal_publish_slot_header _; _}, + Manager_operation_result + { + operation_result = Backtracked (Dal_publish_slot_header_result _, _); + _; + } ) -> + Some Eq | ( Manager_operation {operation = Dal_publish_slot_header _; _}, Manager_operation_result { -- GitLab From 8309f4dcf16c6da5e49d7f3f55136f6ad3113f8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Mon, 13 Jun 2022 12:51:07 +0200 Subject: [PATCH 10/15] Protocol/DAL: The total number of shards is correctly computed --- .../lib_protocol/dal_endorsement_repr.ml | 8 ++++---- .../lib_protocol/dal_endorsement_repr.mli | 14 ++++++++------ src/proto_alpha/lib_protocol/raw_context.ml | 4 ++++ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/proto_alpha/lib_protocol/dal_endorsement_repr.ml b/src/proto_alpha/lib_protocol/dal_endorsement_repr.ml index bea9aa634abd..64c55aaa845f 100644 --- a/src/proto_alpha/lib_protocol/dal_endorsement_repr.ml +++ b/src/proto_alpha/lib_protocol/dal_endorsement_repr.ml @@ -114,17 +114,17 @@ module Accountability = struct else bitset) shard_bitset_per_slot - let is_slot_available shard_bitset_per_slot ~threshold index = + let is_slot_available shard_bitset_per_slot ~threshold ~number_of_shards index + = match List.nth shard_bitset_per_slot index with | None -> false | Some bitset -> let acc = ref 0 in - let nb_shards = Bitset.occupied_size_in_bits bitset in List.iter (fun x -> match Bitset.mem bitset x with | Error _ | Ok false -> () | Ok true -> incr acc) - Misc.(0 --> (nb_shards - 1)) ; - Compare.Int.(!acc >= threshold * nb_shards / 100) + Misc.(0 --> (number_of_shards - 1)) ; + Compare.Int.(!acc >= threshold * number_of_shards / 100) end diff --git a/src/proto_alpha/lib_protocol/dal_endorsement_repr.mli b/src/proto_alpha/lib_protocol/dal_endorsement_repr.mli index 828f18599389..9cb42a8d7391 100644 --- a/src/proto_alpha/lib_protocol/dal_endorsement_repr.mli +++ b/src/proto_alpha/lib_protocol/dal_endorsement_repr.mli @@ -100,10 +100,12 @@ module Accountability : sig ignored. *) val record_shards_availability : t -> available_slots -> shard list -> t - (** [is_slot_available t ~threshold slot] returns [true] if the - number of shards recorded in [t] for the [slot] is above the - [threshold]. Returns [false] otherwise or if the [index] is out - of the interval [0;length] where [length] is the value provided - to the [init] function. *) - val is_slot_available : t -> threshold:int -> Dal_slot_repr.index -> bool + (** [is_slot_available t ~threshold ~number_of_shards slot] returns + [true] if the number of shards recorded in [t] for the [slot] is + above the [threshold] with respect to the total number of shards + specified by [number_of_shards]. Returns [false] otherwise or if + the [index] is out of the interval [0;length] where [length] is + the value provided to the [init] function. *) + val is_slot_available : + t -> threshold:int -> number_of_shards:int -> Dal_slot_repr.index -> bool end diff --git a/src/proto_alpha/lib_protocol/raw_context.ml b/src/proto_alpha/lib_protocol/raw_context.ml index 0d4b3a1ba51f..a813c244c3c8 100644 --- a/src/proto_alpha/lib_protocol/raw_context.ml +++ b/src/proto_alpha/lib_protocol/raw_context.ml @@ -1493,9 +1493,13 @@ module Dal = struct let threshold = ctxt.back.constants.Constants_parametric_repr.dal.availability_threshold in + let number_of_shards = + ctxt.back.constants.Constants_parametric_repr.dal.number_of_shards + in Dal_endorsement_repr.Accountability.is_slot_available ctxt.back.dal_endorsement_slot_accountability ~threshold + ~number_of_shards (* DAL/FIXME https://gitlab.com/tezos/tezos/-/issues/3110 -- GitLab From d5646172eb3d926dd7769ad36f543343b4e78e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:51:47 +0200 Subject: [PATCH 11/15] Tezt/RPC: Implment an output type for block metadata --- tezt/lib_tezos/RPC.ml | 31 +++++++++++++++++++++++++++- tezt/lib_tezos/RPC.mli | 11 +++++++++- tezt/tests/dal.ml | 9 ++------ tezt/tests/multinode_snapshot.ml | 4 ++-- tezt/tests/protocol_migration.ml | 12 +++++------ tezt/tests/protocol_table_update.ml | 6 ++---- tezt/tests/user_activated_upgrade.ml | 22 ++++++-------------- tezt/tests/voting.ml | 16 +++----------- 8 files changed, 60 insertions(+), 51 deletions(-) diff --git a/tezt/lib_tezos/RPC.ml b/tezt/lib_tezos/RPC.ml index 02ff6c1d668c..53e2b800e325 100644 --- a/tezt/lib_tezos/RPC.ml +++ b/tezt/lib_tezos/RPC.ml @@ -127,8 +127,37 @@ let get_chain_chain_id ?(chain = "main") () = let get_chain_block ?(chain = "main") ?(block = "head") () = make GET ["chains"; chain; "blocks"; block] Fun.id +type block_metadata = { + protocol : string; + next_protocol : string; + proposer : string; + max_operations_ttl : int; + dal_slot_availability : bool Array.t option; +} + let get_chain_block_metadata ?(chain = "main") ?(block = "head") () = - make GET ["chains"; chain; "blocks"; block; "metadata"] Fun.id + make GET ["chains"; chain; "blocks"; block; "metadata"] @@ fun json -> + let dal_slot_availability = + match JSON.(json |-> "dal_slot_availability" |> as_string_opt) with + | None -> None + | Some slots -> + let slot_availability = Z.of_string slots in + let length = Z.numbits slot_availability in + let array = Array.make length false in + List.iter + (fun i -> if Z.testbit slot_availability i then array.(i) <- true) + (range 0 (length - 1)) ; + Some array + in + let protocol = JSON.(json |-> "protocol" |> as_string) in + let next_protocol = JSON.(json |-> "next_protocol" |> as_string) in + let proposer = + match JSON.(json |-> "proposer" |> as_string_opt) with + | None -> (* This should be only for tests protocols *) "" + | Some proposer -> proposer + in + let max_operations_ttl = JSON.(json |-> "max_operations_ttl" |> as_int) in + {dal_slot_availability; protocol; next_protocol; proposer; max_operations_ttl} let get_chain_block_hash ?(chain = "main") ?(block = "head") () = make GET ["chains"; chain; "blocks"; block; "hash"] JSON.as_string diff --git a/tezt/lib_tezos/RPC.mli b/tezt/lib_tezos/RPC.mli index cd5b2426dca8..fa399cd232b3 100644 --- a/tezt/lib_tezos/RPC.mli +++ b/tezt/lib_tezos/RPC.mli @@ -162,12 +162,21 @@ val get_chain_chain_id : ?chain:string -> unit -> string t [block] defaults to ["head"]. *) val get_chain_block : ?chain:string -> ?block:string -> unit -> JSON.t t +type block_metadata = { + protocol : string; + next_protocol : string; + proposer : string; + max_operations_ttl : int; + dal_slot_availability : bool Array.t option; + (** This field is [None] if and only if the [DAL] feature flag is disabled. *) +} + (** RPC: [GET /chains/[chain]/blocks/[block]/metadata] [chain] defaults to ["main"]. [block] defaults to ["head"]. *) val get_chain_block_metadata : - ?chain:string -> ?block:string -> unit -> JSON.t t + ?chain:string -> ?block:string -> unit -> block_metadata t (** RPC: [GET /chains/[chain]/blocks/[block]/hash] diff --git a/tezt/tests/dal.ml b/tezt/tests/dal.ml index 7da8ef3f02bb..b6b6fee098cd 100644 --- a/tezt/tests/dal.ml +++ b/tezt/tests/dal.ml @@ -78,13 +78,8 @@ let test_feature_flag = ~error_msg:"Expected mempool: %R. Got: %L. (Order does not matter)") ; let* () = Client.bake_for_and_wait client in let* block_metadata = RPC.(call node @@ get_chain_block_metadata ()) in - let slot_availability = - JSON.(block_metadata |-> "dal_slot_availability" |> is_null) - in - Check.( - (slot_availability = true) - bool - ~error_msg:"Did not expect to find \"dal_slot_availibility\"") ; + if block_metadata.dal_slot_availability <> None then + Test.fail "Did not expect to find \"dal_slot_availibility\"" ; unit let register ~protocols = test_feature_flag protocols diff --git a/tezt/tests/multinode_snapshot.ml b/tezt/tests/multinode_snapshot.ml index 13a690f58cc8..a41301ad824c 100644 --- a/tezt/tests/multinode_snapshot.ml +++ b/tezt/tests/multinode_snapshot.ml @@ -48,7 +48,7 @@ let node_arguments = Node.[Synchronisation_threshold 0] let get_head_max_op_ttl node = let* head = RPC.call node @@ RPC.get_chain_block_metadata () in - return JSON.(head |-> "max_operations_ttl" |> as_int) + return head.max_operations_ttl (* @@ -227,7 +227,7 @@ let test_storage_snapshot = unit in iter_block_range_s savepoint head_level @@ fun block -> - let* (_ : JSON.t) = + let* (_ : RPC.block_metadata) = RPC.call node @@ RPC.get_chain_block_metadata ~block () in unit diff --git a/tezt/tests/protocol_migration.ml b/tezt/tests/protocol_migration.ml index 0122e4762545..6224ad01bf53 100644 --- a/tezt/tests/protocol_migration.ml +++ b/tezt/tests/protocol_migration.ml @@ -58,15 +58,13 @@ let test_protocol_migration ~blocks_per_cycle ~migration_level ~migrate_from let* migration_block = RPC.Client.call client @@ RPC.get_chain_block_metadata ~block:"2" () in - let protocol = JSON.(migration_block |-> "protocol" |> as_string) in Log.info "Checking migration block consistency" ; Check.( - (protocol = Protocol.hash migrate_from) + (migration_block.protocol = Protocol.hash migrate_from) string ~error_msg:"expected protocol = %R, got %L") ; - let next_protocol = JSON.(migration_block |-> "next_protocol" |> as_string) in Check.( - (next_protocol = Protocol.hash migrate_from) + (migration_block.next_protocol = Protocol.hash migrate_from) string ~error_msg:"expected next_protocol = %R, got %L") ; (* Test that we can still bake after migration *) @@ -107,8 +105,8 @@ let block_check ?level ~expected_block_type ~migrate_to ~migrate_from client = let* metadata = RPC.Client.call client @@ RPC.get_chain_block_metadata ?block () in - let protocol = JSON.(metadata |-> "protocol" |> as_string) in - let next_protocol = JSON.(metadata |-> "next_protocol" |> as_string) in + let protocol = metadata.protocol in + let next_protocol = metadata.next_protocol in (match expected_block_type with | `Migration -> Check.( @@ -348,7 +346,7 @@ let get_proposer ~level client = let* metadata = RPC.Client.call client @@ RPC.get_chain_block_metadata ~block () in - Lwt.return JSON.(metadata |-> "proposer" |> as_string) + Lwt.return metadata.proposer let all_account_keys = List.map (fun b -> b.Account.alias) (Array.to_list Account.Bootstrap.keys) diff --git a/tezt/tests/protocol_table_update.ml b/tezt/tests/protocol_table_update.ml index ba7e4f23e62c..61a2dbcd0fc8 100644 --- a/tezt/tests/protocol_table_update.ml +++ b/tezt/tests/protocol_table_update.ml @@ -34,14 +34,12 @@ let check_protocol_activation ~migrate_from ~migrate_to ~block client = let* migration_block = RPC.Client.call client @@ RPC.get_chain_block_metadata ~block () in - let protocol = JSON.(migration_block |-> "protocol" |> as_string) in Check.( - (protocol = Protocol.hash migrate_from) + (migration_block.protocol = Protocol.hash migrate_from) string ~error_msg:"expected protocol = %R, got %L") ; - let next_protocol = JSON.(migration_block |-> "next_protocol" |> as_string) in Check.( - (next_protocol = Protocol.hash migrate_to) + (migration_block.next_protocol = Protocol.hash migrate_to) string ~error_msg:"expected next_protocol = %R, got %L") ; Lwt.return_unit diff --git a/tezt/tests/user_activated_upgrade.ml b/tezt/tests/user_activated_upgrade.ml index 6f6ceaa29a5b..31afd5b491a9 100644 --- a/tezt/tests/user_activated_upgrade.ml +++ b/tezt/tests/user_activated_upgrade.ml @@ -55,17 +55,13 @@ let test_metadata_consistency ~migrate_from ~migrate_to = ~block:(string_of_int (migration_level - 1)) () in - let protocol = JSON.(non_migration_block |-> "protocol" |> as_string) in Log.info "checking consistency of block at level %d" (migration_level - 1) ; Check.( - (protocol = Protocol.hash migrate_from) + (non_migration_block.protocol = Protocol.hash migrate_from) string ~error_msg:"expected protocol = %R, got %L") ; - let next_protocol = - JSON.(non_migration_block |-> "next_protocol" |> as_string) - in Check.( - (next_protocol = Protocol.hash migrate_from) + (non_migration_block.next_protocol = Protocol.hash migrate_from) string ~error_msg:"expected next_protocol = %R, got %L") ; Log.info "checking consistency of block at level %d" migration_level ; @@ -73,14 +69,12 @@ let test_metadata_consistency ~migrate_from ~migrate_to = RPC.Client.call client @@ RPC.get_chain_block_metadata ~block:(string_of_int migration_level) () in - let protocol = JSON.(migration_block |-> "protocol" |> as_string) in Check.( - (protocol = Protocol.hash migrate_from) + (migration_block.protocol = Protocol.hash migrate_from) string ~error_msg:"expected protocol = %R, got %L") ; - let next_protocol = JSON.(migration_block |-> "next_protocol" |> as_string) in Check.( - (next_protocol = Protocol.hash migrate_to) + (migration_block.next_protocol = Protocol.hash migrate_to) string ~error_msg:"expected next_protocol = %R, got %L") ; (* We call the RPC again to make sure that no side-effect occured @@ -94,16 +88,12 @@ let test_metadata_consistency ~migrate_from ~migrate_to = ~block:(string_of_int (migration_level - 1)) () in - let protocol = JSON.(non_migration_block |-> "protocol" |> as_string) in Check.( - (protocol = Protocol.hash migrate_from) + (non_migration_block.protocol = Protocol.hash migrate_from) string ~error_msg:"expected protocol = %R, got %L") ; - let next_protocol = - JSON.(non_migration_block |-> "next_protocol" |> as_string) - in Check.( - (next_protocol = Protocol.hash migrate_from) + (non_migration_block.next_protocol = Protocol.hash migrate_from) string ~error_msg:"expected next_protocol = %R, got %L") ; unit diff --git a/tezt/tests/voting.ml b/tezt/tests/voting.ml index e2fcea323fd6..aa37bbe286b5 100644 --- a/tezt/tests/voting.ml +++ b/tezt/tests/voting.ml @@ -199,23 +199,13 @@ let check_current_proposal ?level client expected_proposal_hash = ~error_msg:"expected current_proposal = %R, got %L" ; unit -type block_metadata = {protocol : string; next_protocol : string} - -let parse_block_metadata block_metadata = - { - protocol = JSON.(block_metadata |-> "protocol" |> as_string); - next_protocol = JSON.(block_metadata |-> "next_protocol" |> as_string); - } - let check_protocols ?level client expected_protocols = - let open Lwt.Infix in - let* {protocol; next_protocol} = + let* block_metadata = RPC.Client.call client @@ RPC.get_chain_block_metadata ?block:(Option.map string_of_int level) () - >|= parse_block_metadata in - Check.( - ((protocol, next_protocol) = expected_protocols) (tuple2 string string)) + let protocols_got = (block_metadata.protocol, block_metadata.next_protocol) in + Check.((protocols_got = expected_protocols) (tuple2 string string)) ~error_msg:"expected (protocol, next_protocol) = %R, got %L" ; unit -- GitLab From 4c4c49e5b6debd17b43b5472dee4c74b7cefebe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:52:03 +0200 Subject: [PATCH 12/15] Tezt/DAL: Allow to set the feature flag --- tezt/lib_tezos/rollup.ml | 8 ++++++++ tezt/lib_tezos/rollup.mli | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/tezt/lib_tezos/rollup.ml b/tezt/lib_tezos/rollup.ml index 450fb61d0c34..9fb2c79f3e59 100644 --- a/tezt/lib_tezos/rollup.ml +++ b/tezt/lib_tezos/rollup.ml @@ -503,3 +503,11 @@ module Tx_rollup = struct Protocol.write_parameter_file ~base:(Either.right (protocol, None)) args end end + +module Dal = struct + module Parameters = struct + let parameter_file protocol = + let args = [(["dal_parametric"; "feature_enable"], Some "true")] in + Protocol.write_parameter_file ~base:(Either.right (protocol, None)) args + end +end diff --git a/tezt/lib_tezos/rollup.mli b/tezt/lib_tezos/rollup.mli index c0646b0203bc..31972dbb855b 100644 --- a/tezt/lib_tezos/rollup.mli +++ b/tezt/lib_tezos/rollup.mli @@ -213,3 +213,9 @@ module Tx_rollup : sig val parameter_file : ?parameters:t -> Protocol.t -> string Lwt.t end end + +module Dal : sig + module Parameters : sig + val parameter_file : Protocol.t -> string Lwt.t + end +end -- GitLab From 8b5340ba24cc752d0578caac27d962946aae58aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:52:25 +0200 Subject: [PATCH 13/15] Tezt/Mempool: Fix typo --- tezt/lib_tezos/mempool.mli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tezt/lib_tezos/mempool.mli b/tezt/lib_tezos/mempool.mli index 864b87653ec9..d0e8cdc139e8 100644 --- a/tezt/lib_tezos/mempool.mli +++ b/tezt/lib_tezos/mempool.mli @@ -37,7 +37,7 @@ type t = { does not matter. *) val typ : t Check.typ -(* A comparable type for mempool where ordering does not matter. *) +(** A comparable type for mempool where ordering does not matter. *) val classified_typ : t Check.typ val empty : t -- GitLab From ffd4e7caaa5fdd14811f3183cd935477e9bc3db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Wed, 8 Jun 2022 12:52:34 +0200 Subject: [PATCH 14/15] Tezt/DAL: Implement a new test to check the logic --- tezt/tests/dal.ml | 143 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 141 insertions(+), 2 deletions(-) diff --git a/tezt/tests/dal.ml b/tezt/tests/dal.ml index b6b6fee098cd..786746f183f0 100644 --- a/tezt/tests/dal.ml +++ b/tezt/tests/dal.ml @@ -39,7 +39,11 @@ let test_feature_flag = cannot be propagated by checking their classification in the mempool. *) let open Tezt_tezos in - Protocol.register_test ~__FILE__ ~title:"dal feature flag" ~tags:["dal"] + Protocol.register_test + ~__FILE__ + ~title:"dal feature flag" + ~tags:["dal"] + ~supports:Protocol.(From_protocol (Protocol.number Alpha)) @@ fun protocol -> let* node, client = Client.init_with_protocol `Client ~protocol () in let* protocol_parameters = RPC_legacy.get_constants client in @@ -82,4 +86,139 @@ let test_feature_flag = Test.fail "Did not expect to find \"dal_slot_availibility\"" ; unit -let register ~protocols = test_feature_flag protocols +open Tezt_tezos.Rollup.Dal + +let publish_slot ~source ?fee ~index node client = + let level = Node.get_level node in + let header = 0 in + Operation.Manager.( + inject + [make ~source ?fee @@ dal_publish_slot_header ~index ~level ~header] + client) + +let slot_availability ~signer availability client = + let default_size = 256 in + let endorsement = Array.make default_size false in + List.iter (fun i -> endorsement.(i) <- true) availability ; + Operation.Consensus.(inject ~signer (slot_availability ~endorsement) client) + +type status = Applied | Failed of {error_id : string} + +let pp fmt = function + | Applied -> Format.fprintf fmt "applied" + | Failed {error_id} -> Format.fprintf fmt "failed: %s" error_id + +let status_typ = Check.equalable pp ( = ) + +let check_manager_operation_status result expected_status oph = + let manager_operations = JSON.(result |=> 3 |> as_list) in + let op = + try + List.find + (fun op -> JSON.(op |-> "hash" |> as_string) = oph) + manager_operations + with Not_found -> + Test.fail + "Test expecting operation %s to be included into the last block." + oph + in + let op_result = + JSON.(op |-> "contents" |=> 0 |-> "metadata" |-> "operation_result") + in + let status_kind = JSON.(op_result |-> "status" |> as_string) in + let status = + match status_kind with + | "applied" -> Applied + | "failed" -> + let error_id = + JSON.(op_result |-> "errors" |=> 0 |-> "id" |> as_string) + in + Failed {error_id} + | s -> Test.fail "Unexpected status: %s" s + in + let prefix_msg = sf "Unexpected operation result for %s." oph in + Check.(expected_status = status) + status_typ + ~error_msg:(prefix_msg ^ " Expected: %L. Got: %R.") + +let test_slot_management_logic = + Protocol.register_test + ~__FILE__ + ~title:"dal basic logic" + ~tags:["dal"] + ~supports:Protocol.(From_protocol (Protocol.number Alpha)) + @@ fun protocol -> + let* parameter_file = Parameters.parameter_file protocol in + let* node, client = + Client.init_with_protocol ~parameter_file `Client ~protocol () + in + let* (`OpHash oph1) = + publish_slot ~source:Constant.bootstrap1 ~fee:1_000 ~index:0 node client + in + let* (`OpHash oph2) = + publish_slot ~source:Constant.bootstrap2 ~fee:1_500 ~index:1 node client + in + let* (`OpHash oph3) = + publish_slot ~source:Constant.bootstrap3 ~fee:2_000 ~index:0 node client + in + let* (`OpHash oph4) = + publish_slot ~source:Constant.bootstrap4 ~fee:1_200 ~index:1 node client + in + let* mempool = Mempool.get_mempool client in + let expected_mempool = + Mempool.{empty with applied = [oph1; oph2; oph3; oph4]} + in + Check.( + (mempool = expected_mempool) + Mempool.classified_typ + ~error_msg:"Expected all the operations to be applied. Got %L") ; + let* () = Client.bake_for_and_wait client in + let* bytes = RPC_legacy.raw_bytes client in + if JSON.(bytes |-> "dal" |> is_null) then + Test.fail "Expected the context to contain some information about the DAL" ; + let* operations_result = RPC_legacy.get_operations client in + let fees_error = + Failed {error_id = "proto.alpha.dal_publish_slot_header_with_low_fees"} + in + (* The baker sorts operations fee wise. Consequently order of + application for the operations will be: oph3 > oph2 > oph4 > oph1 + + For slot 0, oph3 is applied first. + + Flor slot1, oph2 is applied first. *) + check_manager_operation_status operations_result fees_error oph1 ; + check_manager_operation_status operations_result fees_error oph4 ; + check_manager_operation_status operations_result Applied oph3 ; + check_manager_operation_status operations_result Applied oph2 ; + let* _ = slot_availability ~signer:Constant.bootstrap1 [1; 0] client in + let* _ = slot_availability ~signer:Constant.bootstrap2 [1; 0] client in + let* _ = slot_availability ~signer:Constant.bootstrap3 [1] client in + let* _ = slot_availability ~signer:Constant.bootstrap4 [1] client in + let* _ = slot_availability ~signer:Constant.bootstrap5 [1] client in + let* () = Client.bake_for_and_wait client in + let* metadata = RPC.call node (RPC.get_chain_block_metadata ()) in + let dal_slot_availability = + match metadata.dal_slot_availability with + | None -> + assert false + (* Field is part of the encoding when the feature flag is true *) + | Some x -> x + in + Check.( + (dal_slot_availability.(0) = false) + bool + ~error_msg:"Expected slot 0 to be unavailable") ; + Check.( + (dal_slot_availability.(1) = true) + bool + ~error_msg:"Expected slot 1 to be available") ; + let* bytes = RPC_legacy.raw_bytes client in + if not JSON.(bytes |-> "dal" |> is_null) then + Test.fail + "Expected the context to contain no more information about the DAL \ + anymore." ; + unit + +let register ~protocols = + test_feature_flag protocols ; + test_slot_management_logic protocols -- GitLab From 05dd56a2ad6c5e2f2533ed370f9d6e8247967762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Tue, 14 Jun 2022 14:35:34 +0200 Subject: [PATCH 15/15] Protocol/Tests: Fix integration tests from the pipelining project --- .../operations/manager_operation_helpers.ml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/manager_operation_helpers.ml b/src/proto_alpha/lib_protocol/test/integration/operations/manager_operation_helpers.ml index 2b20bee48b5f..07286f020c53 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/manager_operation_helpers.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/manager_operation_helpers.ml @@ -896,14 +896,21 @@ let except_self_delegated_and_revelation_subjects = let revealed_except_set_deposits_limit_and_submit_batch_subjects = List.filter (function - | K_Set_deposits_limit | K_Tx_rollup_submit_batch | K_Reveal -> false + | K_Set_deposits_limit | K_Tx_rollup_submit_batch | K_Reveal + (* FIXME https://gitlab.com/tezos/tezos/-/issues/3210 *) + | K_Dal_publish_slot_header -> + false | _ -> true) subjects let revealed_only_set_deposits_limit_and_submit_batch_subjects = List.filter (function - | K_Set_deposits_limit | K_Tx_rollup_submit_batch -> true | _ -> false) + | K_Set_deposits_limit | K_Tx_rollup_submit_batch + (* FIXME https://gitlab.com/tezos/tezos/-/issues/3210 *) + | K_Dal_publish_slot_header -> + true + | _ -> false) subjects let revealed_subjects = -- GitLab