diff --git a/src/bin_client/test/test_contracts.sh b/src/bin_client/test/test_contracts.sh index 1b56419e4..ea715dac6 100755 --- a/src/bin_client/test/test_contracts.sh +++ b/src/bin_client/test/test_contracts.sh @@ -212,6 +212,13 @@ assert_storage $contract_dir/exec_concat.tz '"?"' '"test"' '"test_abc"' # Get current steps to quota assert_storage $contract_dir/steps_to_quota.tz 111 Unit 399815 +# Gas bounds checks +assert_fails $client -l originate contract first_explosion for bootstrap1 \ + transferring 0 from bootstrap1 \ + running '{parameter unit;\ + storage unit;\ + code{DROP;PUSH nat 0;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;DUP;PAIR;}}' -G 8000 + # Get the current balance of the contract assert_storage $contract_dir/balance.tz '111' Unit '4000000000000' diff --git a/src/proto_alpha/lib_client/michelson_v1_error_reporter.ml b/src/proto_alpha/lib_client/michelson_v1_error_reporter.ml index 97d1a7a9a..433ae5135 100644 --- a/src/proto_alpha/lib_client/michelson_v1_error_reporter.ml +++ b/src/proto_alpha/lib_client/michelson_v1_error_reporter.ml @@ -189,7 +189,12 @@ let report_errors ~details ~show_source ?parsed ppf errs = print_trace locations rest | Alpha_environment.Ecoproto_error Cannot_serialize_error :: rest -> Format.fprintf ppf - "Error too big to serialize using the provided gas bounds." ; + "Error too big to serialize within the provided gas bounds." ; + if rest <> [] then Format.fprintf ppf "@," ; + print_trace locations rest + | Alpha_environment.Ecoproto_error Cannot_serialize_storage :: rest -> + Format.fprintf ppf + "Cannot serialize the resulting storage value within the provided gas bounds." ; if rest <> [] then Format.fprintf ppf "@," ; print_trace locations rest | Alpha_environment.Ecoproto_error (Missing_field prim) :: rest ->