From f0d5dc7b773d82220d275690c73ef1ea46d6026f Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Wed, 6 Apr 2022 10:32:21 +0200 Subject: [PATCH 1/2] Proto,tx_rollup: Fix [check_path] errors During a rejection, in case of incorrect paths related to commitments, the protocol would wrongfully declare the issue is related to the inbox. --- src/proto_alpha/lib_protocol/apply.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index 99bd8cd1bcf3..f3ff86ed51f9 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -1955,12 +1955,12 @@ let precheck_manager_contents (type kind) ctxt (op : kind Kind.manager contents) ~count_limit:tx_rollup_max_messages_per_inbox >>?= fun () -> Tx_rollup_errors.check_path_depth - `Inbox + `Commitment (Tx_rollup_commitment.Merkle.path_depth message_result_path) ~count_limit:tx_rollup_max_messages_per_inbox >>?= fun () -> Tx_rollup_errors.check_path_depth - `Inbox + `Commitment (Tx_rollup_commitment.Merkle.path_depth previous_message_result_path) ~count_limit:tx_rollup_max_messages_per_inbox >>?= fun () -> return ctxt -- GitLab From 1b49c8c0cb084ccce1b85df47b80c7dfc1e33d4f Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Wed, 6 Apr 2022 11:11:36 +0200 Subject: [PATCH 2/2] Proto,tx_rollup: Fix an error constructor encoding --- src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml index 3b6d1b0aa0a8..274c7924180d 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml @@ -394,7 +394,7 @@ let () = depth that can be witnessed." (obj3 (req - "kind" + "target" (union [ case -- GitLab