From 1e6a4b966e1cee57e7541c6bbb144197ed847e62 Mon Sep 17 00:00:00 2001 From: Nicolas Ayache Date: Fri, 24 Feb 2023 10:42:35 +0100 Subject: [PATCH] Proto: update the gas cost of Sapling_verify_update. Follow-up of https://gitlab.com/tezos/tezos/-/merge_requests/7618. --- src/proto_alpha/lib_protocol/michelson_v1_gas_costs.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/proto_alpha/lib_protocol/michelson_v1_gas_costs.ml b/src/proto_alpha/lib_protocol/michelson_v1_gas_costs.ml index fde9a3ab4fa6..eeeaa93335bb 100644 --- a/src/proto_alpha/lib_protocol/michelson_v1_gas_costs.ml +++ b/src/proto_alpha/lib_protocol/michelson_v1_gas_costs.ml @@ -55,13 +55,15 @@ let cost_N_IEdiv_teznat = S.safe_int 70 Such code can't be generated by the current Snoop. *) (* model N_ISapling_verify_update *) +(* Inferred cost (without cost_N_IBlake2b) is: + fun size1 -> fun size2 -> ((432200.469784 + (5738377.05148 * size1)) + (4634026.28586 * size2)) *) let cost_N_ISapling_verify_update size1 size2 bound_data = let open S.Syntax in let v1 = S.safe_int size1 in let v2 = S.safe_int size2 in - cost_N_IBlake2b bound_data + S.safe_int 310_000 - + (S.safe_int 5_575_000 * v1) - + (S.safe_int 5_075_000 * v2) + cost_N_IBlake2b bound_data + S.safe_int 432_500 + + (S.safe_int 5_740_000 * v1) + + (S.safe_int 4_635_000 * v2) (* N_IApply The current generated model receives int as a flag, -- GitLab