From a848510cb80bce7f1e2fe5587ed925e0d02a820c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Cauderlier?= Date: Mon, 10 Oct 2022 16:21:23 +0200 Subject: [PATCH 1/4] Tests/Python: always run `octez-client run script` with `--trace-stack` This commit activates trace logging for all calls to the emulation of the Michelson interpreter in the test_contract_opcodes.py test. This allows to detect more gas regressions. --- tests_python/tests_alpha/test_contract_opcodes.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests_python/tests_alpha/test_contract_opcodes.py b/tests_python/tests_alpha/test_contract_opcodes.py index 7b35f161b042..b4864f6e99a2 100644 --- a/tests_python/tests_alpha/test_contract_opcodes.py +++ b/tests_python/tests_alpha/test_contract_opcodes.py @@ -1863,12 +1863,14 @@ class TestContractOpcodes: hash_contract, '0x00', '(Pair 22220000000 (Pair "2017-12-13T04:49:00Z" 034))', + trace_stack=True, ) assert run_script_res.storage == hash_result run_script_res = client.run_script( hash_contract, '0x00', '(Pair 22220000000 (Pair "2017-12-13T04:49:00Z" 034))', + trace_stack=True, ) assert run_script_res.storage == hash_result @@ -1895,7 +1897,7 @@ class TestContractOpcodes: contract = path.join(OPCODES_CONTRACT_PATH, contract) with assert_run_failure(r'unexpected arithmetic overflow'): - client.run_script(contract, param, storage) + client.run_script(contract, param, storage, trace_stack=True) @pytest.mark.skip(reason="Bug in annotation system") def test_fails_annotated_set_car_cdr( @@ -1909,6 +1911,7 @@ class TestContractOpcodes: path.join(OPCODES_CONTRACT_PATH, 'set_car.tz'), '(Pair %wrong %field "hello" 0)', '""', + trace_stack=True, ) @pytest.mark.parametrize( @@ -1940,5 +1943,7 @@ class TestContractOpcodes: ): client = client_regtest contract = path.join(OPCODES_CONTRACT_PATH, contract) - run_script_res = client.run_script(contract, storage, param) + run_script_res = client.run_script( + contract, storage, param, trace_stack=True + ) assert run_script_res.storage == expected -- GitLab From 5b167f8bb8208fde35fb9e4bf3b1fb5e4adfaad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Cauderlier?= Date: Mon, 10 Oct 2022 16:38:29 +0200 Subject: [PATCH 2/4] Tests/Python: regenerate regression traces --- ...erflow[mul_overflow.tz-Unit-Left Unit].out | 14 ++ ...rflow[mul_overflow.tz-Unit-Right Unit].out | 14 ++ ...ow[shifts.tz-None-(Left (Pair 1 257))].out | 10 ++ ...[shifts.tz-None-(Left (Pair 123 257))].out | 10 ++ ...w[shifts.tz-None-(Right (Pair 1 257))].out | 10 ++ ...shifts.tz-None-(Right (Pair 123 257))].out | 10 ++ ...s::test_hash_consistency_michelson_cli.out | 28 ++++ ...bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" | 146 ++++++++++++++++++ ...\"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" | 96 ++++++++++++ ...eeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out | 46 ++++++ 10 files changed, 384 insertions(+) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Left Unit].out b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Left Unit].out index 21aa10045fe1..d8a81e29bbd0 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Left Unit].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Left Unit].out @@ -22,5 +22,19 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 8 characters 11 to 14, unexpected arithmetic overflow +trace + - location: 9 (remaining gas: 1039988.754 units remaining) + [ (Pair (Left Unit) Unit) ] + - location: 9 (remaining gas: 1039988.744 units remaining) + [ (Left Unit) ] + - location: 10 (remaining gas: 1039988.744 units remaining) + [ Unit ] + - location: 12 (remaining gas: 1039988.734 units remaining) + [ 922337203685477580700 + Unit ] + - location: 15 (remaining gas: 1039988.724 units remaining) + [ 10 + 922337203685477580700 + Unit ] Fatal error: error running script diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Right Unit].out b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Right Unit].out index c303c69798a9..0235bfdde906 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Right Unit].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Right Unit].out @@ -22,5 +22,19 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 14 characters 11 to 14, unexpected arithmetic overflow +trace + - location: 9 (remaining gas: 1039988.754 units remaining) + [ (Pair (Right Unit) Unit) ] + - location: 9 (remaining gas: 1039988.744 units remaining) + [ (Right Unit) ] + - location: 10 (remaining gas: 1039988.744 units remaining) + [ Unit ] + - location: 21 (remaining gas: 1039988.734 units remaining) + [ 10 + Unit ] + - location: 24 (remaining gas: 1039988.724 units remaining) + [ 922337203685477580700 + 10 + Unit ] Fatal error: error running script diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 1 257))].out b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 1 257))].out index 9b603a2c03b1..711cbc578330 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 1 257))].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 1 257))].out @@ -22,5 +22,15 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 10 characters 25 to 28, unexpected arithmetic overflow +trace + - location: 14 (remaining gas: 1039991.189 units remaining) + [ (Pair (Left (Pair 1 257)) None) ] + - location: 14 (remaining gas: 1039991.179 units remaining) + [ (Left (Pair 1 257)) ] + - location: 15 (remaining gas: 1039991.179 units remaining) + [ (Pair 1 257) ] + - location: 17 (remaining gas: 1039991.169 units remaining) + [ 1 + 257 ] Fatal error: error running script diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 123 257))].out b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 123 257))].out index 5d17645926e2..d818d78bde3a 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 123 257))].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 123 257))].out @@ -22,5 +22,15 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 10 characters 25 to 28, unexpected arithmetic overflow +trace + - location: 14 (remaining gas: 1039991.189 units remaining) + [ (Pair (Left (Pair 123 257)) None) ] + - location: 14 (remaining gas: 1039991.179 units remaining) + [ (Left (Pair 123 257)) ] + - location: 15 (remaining gas: 1039991.179 units remaining) + [ (Pair 123 257) ] + - location: 17 (remaining gas: 1039991.169 units remaining) + [ 123 + 257 ] Fatal error: error running script diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 1 257))].out b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 1 257))].out index aa5d8727677b..01871dc127fc 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 1 257))].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 1 257))].out @@ -22,5 +22,15 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 13 characters 25 to 28, unexpected arithmetic overflow +trace + - location: 14 (remaining gas: 1039991.189 units remaining) + [ (Pair (Right (Pair 1 257)) None) ] + - location: 14 (remaining gas: 1039991.179 units remaining) + [ (Right (Pair 1 257)) ] + - location: 15 (remaining gas: 1039991.179 units remaining) + [ (Pair 1 257) ] + - location: 20 (remaining gas: 1039991.169 units remaining) + [ 1 + 257 ] Fatal error: error running script diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 123 257))].out b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 123 257))].out index 9a98e4716557..4bdbdf85afc6 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 123 257))].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 123 257))].out @@ -22,5 +22,15 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 13 characters 25 to 28, unexpected arithmetic overflow +trace + - location: 14 (remaining gas: 1039991.189 units remaining) + [ (Pair (Right (Pair 123 257)) None) ] + - location: 14 (remaining gas: 1039991.179 units remaining) + [ (Right (Pair 123 257)) ] + - location: 15 (remaining gas: 1039991.179 units remaining) + [ (Pair 123 257) ] + - location: 20 (remaining gas: 1039991.169 units remaining) + [ 123 + 257 ] Fatal error: error running script diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_hash_consistency_michelson_cli.out b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_hash_consistency_michelson_cli.out index 7db1308a067b..f1bc7e15e208 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_hash_consistency_michelson_cli.out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_hash_consistency_michelson_cli.out @@ -13,6 +13,20 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039993.856 units remaining) + [ (Pair (Pair 22220000000 "2017-12-13T04:49:00Z" 34) 0x00) ] + - location: 11 (remaining gas: 1039993.846 units remaining) + [ (Pair 22220000000 "2017-12-13T04:49:00Z" 34) ] + - location: 12 (remaining gas: 1039992.516 units remaining) + [ 0x0507070080acd2c6a501070700bcc485a30b0022 ] + - location: 13 (remaining gas: 1039992.064 units remaining) + [ 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc ] + - location: 14 (remaining gas: 1039992.054 units remaining) + [ {} + 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc ] + - location: 16 (remaining gas: 1039992.044 units remaining) + [ (Pair {} 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc) ] storage 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc @@ -20,4 +34,18 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039993.856 units remaining) + [ (Pair (Pair 22220000000 "2017-12-13T04:49:00Z" 34) 0x00) ] + - location: 11 (remaining gas: 1039993.846 units remaining) + [ (Pair 22220000000 "2017-12-13T04:49:00Z" 34) ] + - location: 12 (remaining gas: 1039992.516 units remaining) + [ 0x0507070080acd2c6a501070700bcc485a30b0022 ] + - location: 13 (remaining gas: 1039992.064 units remaining) + [ 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc ] + - location: 14 (remaining gas: 1039992.054 units remaining) + [ {} + 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc ] + - location: 16 (remaining gas: 1039992.044 units remaining) + [ (Pair {} 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc) ] diff --git "a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" "b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" index d69284a78e78..d5275ad1baa6 100644 --- "a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" +++ "b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" @@ -6,4 +6,150 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039982.728 units remaining) + [ (Pair 15 { Elt "bar" 5 ; Elt "foo" 1 } 6) ] + - location: 11 (remaining gas: 1039982.718 units remaining) + [ 15 + (Pair { Elt "bar" 5 ; Elt "foo" 1 } 6) ] + - location: 12 (remaining gas: 1039982.708 units remaining) + [ (Pair { Elt "bar" 5 ; Elt "foo" 1 } 6) + 15 ] + - location: 13 (remaining gas: 1039982.698 units remaining) + [ { Elt "bar" 5 ; Elt "foo" 1 } + 15 ] + - location: 14 (remaining gas: 1039982.698 units remaining) + [ ] + - location: 17 (remaining gas: 1039982.688 units remaining) + [ 0 ] + - location: 14 (remaining gas: 1039982.663 units remaining) + [ 15 + 0 ] + - location: 14 (remaining gas: 1039982.653 units remaining) + [ { Elt "bar" 5 ; Elt "foo" 1 } + 15 + 0 ] + - location: 14 (remaining gas: 1039982.653 units remaining) + [ { Elt "bar" 5 ; Elt "foo" 1 } + 15 + 0 ] + - location: 20 (remaining gas: 1039982.653 units remaining) + [ (Pair "bar" 5) + 15 + 0 ] + - location: 22 (remaining gas: 1039982.643 units remaining) + [ 5 + 15 + 0 ] + - location: 23 (remaining gas: 1039982.643 units remaining) + [ 15 + 0 ] + - location: 25 (remaining gas: 1039982.633 units remaining) + [ 15 + 15 + 0 ] + - location: 23 (remaining gas: 1039982.608 units remaining) + [ 5 + 15 + 15 + 0 ] + - location: 26 (remaining gas: 1039982.573 units remaining) + [ 20 + 15 + 0 ] + - location: 27 (remaining gas: 1039982.563 units remaining) + [ 20 + 20 + 15 + 0 ] + - location: 28 (remaining gas: 1039982.515 units remaining) + [ 20 + 15 + 20 + 0 ] + - location: 30 (remaining gas: 1039982.515 units remaining) + [ 20 + 0 ] + - location: 33 (remaining gas: 1039982.480 units remaining) + [ 20 ] + - location: 30 (remaining gas: 1039982.455 units remaining) + [ 15 + 20 ] + - location: 30 (remaining gas: 1039982.445 units remaining) + [ 20 + 15 + 20 ] + - location: 30 (remaining gas: 1039982.445 units remaining) + [ 20 + 15 + 20 ] + - location: 20 (remaining gas: 1039982.430 units remaining) + [ (Pair "foo" 1) + 15 + 20 ] + - location: 22 (remaining gas: 1039982.420 units remaining) + [ 1 + 15 + 20 ] + - location: 23 (remaining gas: 1039982.420 units remaining) + [ 15 + 20 ] + - location: 25 (remaining gas: 1039982.410 units remaining) + [ 15 + 15 + 20 ] + - location: 23 (remaining gas: 1039982.385 units remaining) + [ 1 + 15 + 15 + 20 ] + - location: 26 (remaining gas: 1039982.350 units remaining) + [ 16 + 15 + 20 ] + - location: 27 (remaining gas: 1039982.340 units remaining) + [ 16 + 16 + 15 + 20 ] + - location: 28 (remaining gas: 1039982.292 units remaining) + [ 16 + 15 + 16 + 20 ] + - location: 30 (remaining gas: 1039982.292 units remaining) + [ 16 + 20 ] + - location: 33 (remaining gas: 1039982.257 units remaining) + [ 36 ] + - location: 30 (remaining gas: 1039982.232 units remaining) + [ 15 + 36 ] + - location: 30 (remaining gas: 1039982.222 units remaining) + [ 16 + 15 + 36 ] + - location: 30 (remaining gas: 1039982.222 units remaining) + [ 16 + 15 + 36 ] + - location: 20 (remaining gas: 1039982.207 units remaining) + [ { Elt "bar" 20 ; Elt "foo" 16 } + 15 + 36 ] + - location: 34 (remaining gas: 1039982.207 units remaining) + [ 15 + 36 ] + - location: 36 (remaining gas: 1039982.197 units remaining) + [ 36 ] + - location: 34 (remaining gas: 1039982.172 units remaining) + [ { Elt "bar" 20 ; Elt "foo" 16 } + 36 ] + - location: 37 (remaining gas: 1039982.162 units remaining) + [ (Pair { Elt "bar" 20 ; Elt "foo" 16 } 36) ] + - location: 38 (remaining gas: 1039982.152 units remaining) + [ {} + (Pair { Elt "bar" 20 ; Elt "foo" 16 } 36) ] + - location: 40 (remaining gas: 1039982.142 units remaining) + [ (Pair {} { Elt "bar" 20 ; Elt "foo" 16 } 36) ] diff --git "a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" "b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" index 552369f88901..07c8fdd630b6 100644 --- "a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" +++ "b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" @@ -6,4 +6,100 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039983.099 units remaining) + [ (Pair 10 { Elt "foo" 1 } 1) ] + - location: 11 (remaining gas: 1039983.089 units remaining) + [ 10 + (Pair { Elt "foo" 1 } 1) ] + - location: 12 (remaining gas: 1039983.079 units remaining) + [ (Pair { Elt "foo" 1 } 1) + 10 ] + - location: 13 (remaining gas: 1039983.069 units remaining) + [ { Elt "foo" 1 } + 10 ] + - location: 14 (remaining gas: 1039983.069 units remaining) + [ ] + - location: 17 (remaining gas: 1039983.059 units remaining) + [ 0 ] + - location: 14 (remaining gas: 1039983.034 units remaining) + [ 10 + 0 ] + - location: 14 (remaining gas: 1039983.024 units remaining) + [ { Elt "foo" 1 } + 10 + 0 ] + - location: 14 (remaining gas: 1039983.024 units remaining) + [ { Elt "foo" 1 } + 10 + 0 ] + - location: 20 (remaining gas: 1039983.024 units remaining) + [ (Pair "foo" 1) + 10 + 0 ] + - location: 22 (remaining gas: 1039983.014 units remaining) + [ 1 + 10 + 0 ] + - location: 23 (remaining gas: 1039983.014 units remaining) + [ 10 + 0 ] + - location: 25 (remaining gas: 1039983.004 units remaining) + [ 10 + 10 + 0 ] + - location: 23 (remaining gas: 1039982.979 units remaining) + [ 1 + 10 + 10 + 0 ] + - location: 26 (remaining gas: 1039982.944 units remaining) + [ 11 + 10 + 0 ] + - location: 27 (remaining gas: 1039982.934 units remaining) + [ 11 + 11 + 10 + 0 ] + - location: 28 (remaining gas: 1039982.886 units remaining) + [ 11 + 10 + 11 + 0 ] + - location: 30 (remaining gas: 1039982.886 units remaining) + [ 11 + 0 ] + - location: 33 (remaining gas: 1039982.851 units remaining) + [ 11 ] + - location: 30 (remaining gas: 1039982.826 units remaining) + [ 10 + 11 ] + - location: 30 (remaining gas: 1039982.816 units remaining) + [ 11 + 10 + 11 ] + - location: 30 (remaining gas: 1039982.816 units remaining) + [ 11 + 10 + 11 ] + - location: 20 (remaining gas: 1039982.801 units remaining) + [ { Elt "foo" 11 } + 10 + 11 ] + - location: 34 (remaining gas: 1039982.801 units remaining) + [ 10 + 11 ] + - location: 36 (remaining gas: 1039982.791 units remaining) + [ 11 ] + - location: 34 (remaining gas: 1039982.766 units remaining) + [ { Elt "foo" 11 } + 11 ] + - location: 37 (remaining gas: 1039982.756 units remaining) + [ (Pair { Elt "foo" 11 } 11) ] + - location: 38 (remaining gas: 1039982.746 units remaining) + [ {} + (Pair { Elt "foo" 11 } 11) ] + - location: 40 (remaining gas: 1039982.736 units remaining) + [ (Pair {} { Elt "foo" 11 } 11) ] diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out index 590ebc41cd68..7b31a83abe22 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out @@ -6,4 +6,50 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039983.429 units remaining) + [ (Pair 10 {} 0) ] + - location: 11 (remaining gas: 1039983.419 units remaining) + [ 10 + (Pair {} 0) ] + - location: 12 (remaining gas: 1039983.409 units remaining) + [ (Pair {} 0) + 10 ] + - location: 13 (remaining gas: 1039983.399 units remaining) + [ {} + 10 ] + - location: 14 (remaining gas: 1039983.399 units remaining) + [ ] + - location: 17 (remaining gas: 1039983.389 units remaining) + [ 0 ] + - location: 14 (remaining gas: 1039983.364 units remaining) + [ 10 + 0 ] + - location: 14 (remaining gas: 1039983.354 units remaining) + [ {} + 10 + 0 ] + - location: 14 (remaining gas: 1039983.354 units remaining) + [ {} + 10 + 0 ] + - location: 20 (remaining gas: 1039983.354 units remaining) + [ {} + 10 + 0 ] + - location: 34 (remaining gas: 1039983.354 units remaining) + [ 10 + 0 ] + - location: 36 (remaining gas: 1039983.344 units remaining) + [ 0 ] + - location: 34 (remaining gas: 1039983.319 units remaining) + [ {} + 0 ] + - location: 37 (remaining gas: 1039983.309 units remaining) + [ (Pair {} 0) ] + - location: 38 (remaining gas: 1039983.299 units remaining) + [ {} + (Pair {} 0) ] + - location: 40 (remaining gas: 1039983.289 units remaining) + [ (Pair {} {} 0) ] -- GitLab From b866f8539fdb1f8ffc594657fa0904d8c2084a25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Cauderlier?= Date: Wed, 12 Oct 2022 12:58:29 +0200 Subject: [PATCH 3/4] Tests/Python: Backport changes to non-alpha protocols --- tests_python/tests_014/test_contract_opcodes.py | 9 +++++++-- tests_python/tests_015/test_contract_opcodes.py | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests_python/tests_014/test_contract_opcodes.py b/tests_python/tests_014/test_contract_opcodes.py index 7b35f161b042..b4864f6e99a2 100644 --- a/tests_python/tests_014/test_contract_opcodes.py +++ b/tests_python/tests_014/test_contract_opcodes.py @@ -1863,12 +1863,14 @@ class TestContractOpcodes: hash_contract, '0x00', '(Pair 22220000000 (Pair "2017-12-13T04:49:00Z" 034))', + trace_stack=True, ) assert run_script_res.storage == hash_result run_script_res = client.run_script( hash_contract, '0x00', '(Pair 22220000000 (Pair "2017-12-13T04:49:00Z" 034))', + trace_stack=True, ) assert run_script_res.storage == hash_result @@ -1895,7 +1897,7 @@ class TestContractOpcodes: contract = path.join(OPCODES_CONTRACT_PATH, contract) with assert_run_failure(r'unexpected arithmetic overflow'): - client.run_script(contract, param, storage) + client.run_script(contract, param, storage, trace_stack=True) @pytest.mark.skip(reason="Bug in annotation system") def test_fails_annotated_set_car_cdr( @@ -1909,6 +1911,7 @@ class TestContractOpcodes: path.join(OPCODES_CONTRACT_PATH, 'set_car.tz'), '(Pair %wrong %field "hello" 0)', '""', + trace_stack=True, ) @pytest.mark.parametrize( @@ -1940,5 +1943,7 @@ class TestContractOpcodes: ): client = client_regtest contract = path.join(OPCODES_CONTRACT_PATH, contract) - run_script_res = client.run_script(contract, storage, param) + run_script_res = client.run_script( + contract, storage, param, trace_stack=True + ) assert run_script_res.storage == expected diff --git a/tests_python/tests_015/test_contract_opcodes.py b/tests_python/tests_015/test_contract_opcodes.py index 7b35f161b042..b4864f6e99a2 100644 --- a/tests_python/tests_015/test_contract_opcodes.py +++ b/tests_python/tests_015/test_contract_opcodes.py @@ -1863,12 +1863,14 @@ class TestContractOpcodes: hash_contract, '0x00', '(Pair 22220000000 (Pair "2017-12-13T04:49:00Z" 034))', + trace_stack=True, ) assert run_script_res.storage == hash_result run_script_res = client.run_script( hash_contract, '0x00', '(Pair 22220000000 (Pair "2017-12-13T04:49:00Z" 034))', + trace_stack=True, ) assert run_script_res.storage == hash_result @@ -1895,7 +1897,7 @@ class TestContractOpcodes: contract = path.join(OPCODES_CONTRACT_PATH, contract) with assert_run_failure(r'unexpected arithmetic overflow'): - client.run_script(contract, param, storage) + client.run_script(contract, param, storage, trace_stack=True) @pytest.mark.skip(reason="Bug in annotation system") def test_fails_annotated_set_car_cdr( @@ -1909,6 +1911,7 @@ class TestContractOpcodes: path.join(OPCODES_CONTRACT_PATH, 'set_car.tz'), '(Pair %wrong %field "hello" 0)', '""', + trace_stack=True, ) @pytest.mark.parametrize( @@ -1940,5 +1943,7 @@ class TestContractOpcodes: ): client = client_regtest contract = path.join(OPCODES_CONTRACT_PATH, contract) - run_script_res = client.run_script(contract, storage, param) + run_script_res = client.run_script( + contract, storage, param, trace_stack=True + ) assert run_script_res.storage == expected -- GitLab From 34f087f6d353a1af1840e6d95290cb8c5be96a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Cauderlier?= Date: Wed, 12 Oct 2022 12:59:00 +0200 Subject: [PATCH 4/4] Tests/Python: regenerate non-alpha regression traces --- ...erflow[mul_overflow.tz-Unit-Left Unit].out | 14 ++ ...rflow[mul_overflow.tz-Unit-Right Unit].out | 14 ++ ...ow[shifts.tz-None-(Left (Pair 1 257))].out | 10 ++ ...[shifts.tz-None-(Left (Pair 123 257))].out | 10 ++ ...w[shifts.tz-None-(Right (Pair 1 257))].out | 10 ++ ...shifts.tz-None-(Right (Pair 123 257))].out | 10 ++ ...s::test_hash_consistency_michelson_cli.out | 28 ++++ ...bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" | 146 ++++++++++++++++++ ...\"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" | 96 ++++++++++++ ...eeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out | 46 ++++++ ...erflow[mul_overflow.tz-Unit-Left Unit].out | 14 ++ ...rflow[mul_overflow.tz-Unit-Right Unit].out | 14 ++ ...ow[shifts.tz-None-(Left (Pair 1 257))].out | 10 ++ ...[shifts.tz-None-(Left (Pair 123 257))].out | 10 ++ ...w[shifts.tz-None-(Right (Pair 1 257))].out | 10 ++ ...shifts.tz-None-(Right (Pair 123 257))].out | 10 ++ ...s::test_hash_consistency_michelson_cli.out | 28 ++++ ...bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" | 146 ++++++++++++++++++ ...\"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" | 96 ++++++++++++ ...eeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out | 46 ++++++ 20 files changed, 768 insertions(+) diff --git a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Left Unit].out b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Left Unit].out index b494dfb81bab..8e6d0ad0fe01 100644 --- a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Left Unit].out +++ b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Left Unit].out @@ -22,5 +22,19 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 8 characters 11 to 14, unexpected arithmetic overflow +trace + - location: 9 (remaining gas: 1039988.754 units remaining) + [ (Pair (Left Unit) Unit) ] + - location: 9 (remaining gas: 1039988.744 units remaining) + [ (Left Unit) ] + - location: 10 (remaining gas: 1039988.744 units remaining) + [ Unit ] + - location: 12 (remaining gas: 1039988.734 units remaining) + [ 922337203685477580700 + Unit ] + - location: 15 (remaining gas: 1039988.724 units remaining) + [ 10 + 922337203685477580700 + Unit ] Fatal error: error running script diff --git a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Right Unit].out b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Right Unit].out index 49c78780d1cc..693e7282601b 100644 --- a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Right Unit].out +++ b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Right Unit].out @@ -22,5 +22,19 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 14 characters 11 to 14, unexpected arithmetic overflow +trace + - location: 9 (remaining gas: 1039988.754 units remaining) + [ (Pair (Right Unit) Unit) ] + - location: 9 (remaining gas: 1039988.744 units remaining) + [ (Right Unit) ] + - location: 10 (remaining gas: 1039988.744 units remaining) + [ Unit ] + - location: 21 (remaining gas: 1039988.734 units remaining) + [ 10 + Unit ] + - location: 24 (remaining gas: 1039988.724 units remaining) + [ 922337203685477580700 + 10 + Unit ] Fatal error: error running script diff --git a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 1 257))].out b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 1 257))].out index 2e4b324e34a6..9c93a35c65bd 100644 --- a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 1 257))].out +++ b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 1 257))].out @@ -22,5 +22,15 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 10 characters 25 to 28, unexpected arithmetic overflow +trace + - location: 14 (remaining gas: 1039991.189 units remaining) + [ (Pair (Left (Pair 1 257)) None) ] + - location: 14 (remaining gas: 1039991.179 units remaining) + [ (Left (Pair 1 257)) ] + - location: 15 (remaining gas: 1039991.179 units remaining) + [ (Pair 1 257) ] + - location: 17 (remaining gas: 1039991.169 units remaining) + [ 1 + 257 ] Fatal error: error running script diff --git a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 123 257))].out b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 123 257))].out index b0606b50c7fe..fa5b37a53c90 100644 --- a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 123 257))].out +++ b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 123 257))].out @@ -22,5 +22,15 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 10 characters 25 to 28, unexpected arithmetic overflow +trace + - location: 14 (remaining gas: 1039991.189 units remaining) + [ (Pair (Left (Pair 123 257)) None) ] + - location: 14 (remaining gas: 1039991.179 units remaining) + [ (Left (Pair 123 257)) ] + - location: 15 (remaining gas: 1039991.179 units remaining) + [ (Pair 123 257) ] + - location: 17 (remaining gas: 1039991.169 units remaining) + [ 123 + 257 ] Fatal error: error running script diff --git a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 1 257))].out b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 1 257))].out index 9a9d61ab0cb0..37f13e450a06 100644 --- a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 1 257))].out +++ b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 1 257))].out @@ -22,5 +22,15 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 13 characters 25 to 28, unexpected arithmetic overflow +trace + - location: 14 (remaining gas: 1039991.189 units remaining) + [ (Pair (Right (Pair 1 257)) None) ] + - location: 14 (remaining gas: 1039991.179 units remaining) + [ (Right (Pair 1 257)) ] + - location: 15 (remaining gas: 1039991.179 units remaining) + [ (Pair 1 257) ] + - location: 20 (remaining gas: 1039991.169 units remaining) + [ 1 + 257 ] Fatal error: error running script diff --git a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 123 257))].out b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 123 257))].out index 11e8185fb9a0..a5ce702dabec 100644 --- a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 123 257))].out +++ b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 123 257))].out @@ -22,5 +22,15 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 13 characters 25 to 28, unexpected arithmetic overflow +trace + - location: 14 (remaining gas: 1039991.189 units remaining) + [ (Pair (Right (Pair 123 257)) None) ] + - location: 14 (remaining gas: 1039991.179 units remaining) + [ (Right (Pair 123 257)) ] + - location: 15 (remaining gas: 1039991.179 units remaining) + [ (Pair 123 257) ] + - location: 20 (remaining gas: 1039991.169 units remaining) + [ 123 + 257 ] Fatal error: error running script diff --git a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_hash_consistency_michelson_cli.out b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_hash_consistency_michelson_cli.out index a4436f112ed2..b863c99720b4 100644 --- a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_hash_consistency_michelson_cli.out +++ b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_hash_consistency_michelson_cli.out @@ -13,6 +13,20 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039993.856 units remaining) + [ (Pair (Pair 22220000000 "2017-12-13T04:49:00Z" 34) 0x00) ] + - location: 11 (remaining gas: 1039993.846 units remaining) + [ (Pair 22220000000 "2017-12-13T04:49:00Z" 34) ] + - location: 12 (remaining gas: 1039992.673 units remaining) + [ 0x0507070080acd2c6a501070700bcc485a30b0022 ] + - location: 13 (remaining gas: 1039992.221 units remaining) + [ 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc ] + - location: 14 (remaining gas: 1039992.211 units remaining) + [ {} + 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc ] + - location: 16 (remaining gas: 1039992.201 units remaining) + [ (Pair {} 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc) ] storage 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc @@ -20,4 +34,18 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039993.856 units remaining) + [ (Pair (Pair 22220000000 "2017-12-13T04:49:00Z" 34) 0x00) ] + - location: 11 (remaining gas: 1039993.846 units remaining) + [ (Pair 22220000000 "2017-12-13T04:49:00Z" 34) ] + - location: 12 (remaining gas: 1039992.673 units remaining) + [ 0x0507070080acd2c6a501070700bcc485a30b0022 ] + - location: 13 (remaining gas: 1039992.221 units remaining) + [ 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc ] + - location: 14 (remaining gas: 1039992.211 units remaining) + [ {} + 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc ] + - location: 16 (remaining gas: 1039992.201 units remaining) + [ (Pair {} 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc) ] diff --git "a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" "b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" index b7a7b8c7e4e9..cac7f9a094b2 100644 --- "a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" +++ "b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" @@ -6,4 +6,150 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039982.413 units remaining) + [ (Pair 15 { Elt "bar" 5 ; Elt "foo" 1 } 6) ] + - location: 11 (remaining gas: 1039982.403 units remaining) + [ 15 + (Pair { Elt "bar" 5 ; Elt "foo" 1 } 6) ] + - location: 12 (remaining gas: 1039982.393 units remaining) + [ (Pair { Elt "bar" 5 ; Elt "foo" 1 } 6) + 15 ] + - location: 13 (remaining gas: 1039982.383 units remaining) + [ { Elt "bar" 5 ; Elt "foo" 1 } + 15 ] + - location: 14 (remaining gas: 1039982.383 units remaining) + [ ] + - location: 17 (remaining gas: 1039982.373 units remaining) + [ 0 ] + - location: 14 (remaining gas: 1039982.353 units remaining) + [ 15 + 0 ] + - location: 14 (remaining gas: 1039982.343 units remaining) + [ { Elt "bar" 5 ; Elt "foo" 1 } + 15 + 0 ] + - location: 14 (remaining gas: 1039982.343 units remaining) + [ { Elt "bar" 5 ; Elt "foo" 1 } + 15 + 0 ] + - location: 20 (remaining gas: 1039982.343 units remaining) + [ (Pair "bar" 5) + 15 + 0 ] + - location: 22 (remaining gas: 1039982.333 units remaining) + [ 5 + 15 + 0 ] + - location: 23 (remaining gas: 1039982.333 units remaining) + [ 15 + 0 ] + - location: 25 (remaining gas: 1039982.323 units remaining) + [ 15 + 15 + 0 ] + - location: 23 (remaining gas: 1039982.303 units remaining) + [ 5 + 15 + 15 + 0 ] + - location: 26 (remaining gas: 1039982.268 units remaining) + [ 20 + 15 + 0 ] + - location: 27 (remaining gas: 1039982.258 units remaining) + [ 20 + 20 + 15 + 0 ] + - location: 28 (remaining gas: 1039982.210 units remaining) + [ 20 + 15 + 20 + 0 ] + - location: 30 (remaining gas: 1039982.210 units remaining) + [ 20 + 0 ] + - location: 33 (remaining gas: 1039982.175 units remaining) + [ 20 ] + - location: 30 (remaining gas: 1039982.155 units remaining) + [ 15 + 20 ] + - location: 30 (remaining gas: 1039982.145 units remaining) + [ 20 + 15 + 20 ] + - location: 30 (remaining gas: 1039982.145 units remaining) + [ 20 + 15 + 20 ] + - location: 20 (remaining gas: 1039982.135 units remaining) + [ (Pair "foo" 1) + 15 + 20 ] + - location: 22 (remaining gas: 1039982.125 units remaining) + [ 1 + 15 + 20 ] + - location: 23 (remaining gas: 1039982.125 units remaining) + [ 15 + 20 ] + - location: 25 (remaining gas: 1039982.115 units remaining) + [ 15 + 15 + 20 ] + - location: 23 (remaining gas: 1039982.095 units remaining) + [ 1 + 15 + 15 + 20 ] + - location: 26 (remaining gas: 1039982.060 units remaining) + [ 16 + 15 + 20 ] + - location: 27 (remaining gas: 1039982.050 units remaining) + [ 16 + 16 + 15 + 20 ] + - location: 28 (remaining gas: 1039982.002 units remaining) + [ 16 + 15 + 16 + 20 ] + - location: 30 (remaining gas: 1039982.002 units remaining) + [ 16 + 20 ] + - location: 33 (remaining gas: 1039981.967 units remaining) + [ 36 ] + - location: 30 (remaining gas: 1039981.947 units remaining) + [ 15 + 36 ] + - location: 30 (remaining gas: 1039981.937 units remaining) + [ 16 + 15 + 36 ] + - location: 30 (remaining gas: 1039981.937 units remaining) + [ 16 + 15 + 36 ] + - location: 20 (remaining gas: 1039981.927 units remaining) + [ { Elt "bar" 20 ; Elt "foo" 16 } + 15 + 36 ] + - location: 34 (remaining gas: 1039981.927 units remaining) + [ 15 + 36 ] + - location: 36 (remaining gas: 1039981.917 units remaining) + [ 36 ] + - location: 34 (remaining gas: 1039981.897 units remaining) + [ { Elt "bar" 20 ; Elt "foo" 16 } + 36 ] + - location: 37 (remaining gas: 1039981.887 units remaining) + [ (Pair { Elt "bar" 20 ; Elt "foo" 16 } 36) ] + - location: 38 (remaining gas: 1039981.877 units remaining) + [ {} + (Pair { Elt "bar" 20 ; Elt "foo" 16 } 36) ] + - location: 40 (remaining gas: 1039981.867 units remaining) + [ (Pair {} { Elt "bar" 20 ; Elt "foo" 16 } 36) ] diff --git "a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" "b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" index bf3f5933330c..4a4a1585bcdf 100644 --- "a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" +++ "b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" @@ -6,4 +6,100 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039982.784 units remaining) + [ (Pair 10 { Elt "foo" 1 } 1) ] + - location: 11 (remaining gas: 1039982.774 units remaining) + [ 10 + (Pair { Elt "foo" 1 } 1) ] + - location: 12 (remaining gas: 1039982.764 units remaining) + [ (Pair { Elt "foo" 1 } 1) + 10 ] + - location: 13 (remaining gas: 1039982.754 units remaining) + [ { Elt "foo" 1 } + 10 ] + - location: 14 (remaining gas: 1039982.754 units remaining) + [ ] + - location: 17 (remaining gas: 1039982.744 units remaining) + [ 0 ] + - location: 14 (remaining gas: 1039982.724 units remaining) + [ 10 + 0 ] + - location: 14 (remaining gas: 1039982.714 units remaining) + [ { Elt "foo" 1 } + 10 + 0 ] + - location: 14 (remaining gas: 1039982.714 units remaining) + [ { Elt "foo" 1 } + 10 + 0 ] + - location: 20 (remaining gas: 1039982.714 units remaining) + [ (Pair "foo" 1) + 10 + 0 ] + - location: 22 (remaining gas: 1039982.704 units remaining) + [ 1 + 10 + 0 ] + - location: 23 (remaining gas: 1039982.704 units remaining) + [ 10 + 0 ] + - location: 25 (remaining gas: 1039982.694 units remaining) + [ 10 + 10 + 0 ] + - location: 23 (remaining gas: 1039982.674 units remaining) + [ 1 + 10 + 10 + 0 ] + - location: 26 (remaining gas: 1039982.639 units remaining) + [ 11 + 10 + 0 ] + - location: 27 (remaining gas: 1039982.629 units remaining) + [ 11 + 11 + 10 + 0 ] + - location: 28 (remaining gas: 1039982.581 units remaining) + [ 11 + 10 + 11 + 0 ] + - location: 30 (remaining gas: 1039982.581 units remaining) + [ 11 + 0 ] + - location: 33 (remaining gas: 1039982.546 units remaining) + [ 11 ] + - location: 30 (remaining gas: 1039982.526 units remaining) + [ 10 + 11 ] + - location: 30 (remaining gas: 1039982.516 units remaining) + [ 11 + 10 + 11 ] + - location: 30 (remaining gas: 1039982.516 units remaining) + [ 11 + 10 + 11 ] + - location: 20 (remaining gas: 1039982.506 units remaining) + [ { Elt "foo" 11 } + 10 + 11 ] + - location: 34 (remaining gas: 1039982.506 units remaining) + [ 10 + 11 ] + - location: 36 (remaining gas: 1039982.496 units remaining) + [ 11 ] + - location: 34 (remaining gas: 1039982.476 units remaining) + [ { Elt "foo" 11 } + 11 ] + - location: 37 (remaining gas: 1039982.466 units remaining) + [ (Pair { Elt "foo" 11 } 11) ] + - location: 38 (remaining gas: 1039982.456 units remaining) + [ {} + (Pair { Elt "foo" 11 } 11) ] + - location: 40 (remaining gas: 1039982.446 units remaining) + [ (Pair {} { Elt "foo" 11 } 11) ] diff --git a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out index 371708baa64a..0b751129cbe9 100644 --- a/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out +++ b/tests_python/tests_014/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out @@ -6,4 +6,50 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039983.114 units remaining) + [ (Pair 10 {} 0) ] + - location: 11 (remaining gas: 1039983.104 units remaining) + [ 10 + (Pair {} 0) ] + - location: 12 (remaining gas: 1039983.094 units remaining) + [ (Pair {} 0) + 10 ] + - location: 13 (remaining gas: 1039983.084 units remaining) + [ {} + 10 ] + - location: 14 (remaining gas: 1039983.084 units remaining) + [ ] + - location: 17 (remaining gas: 1039983.074 units remaining) + [ 0 ] + - location: 14 (remaining gas: 1039983.054 units remaining) + [ 10 + 0 ] + - location: 14 (remaining gas: 1039983.044 units remaining) + [ {} + 10 + 0 ] + - location: 14 (remaining gas: 1039983.044 units remaining) + [ {} + 10 + 0 ] + - location: 20 (remaining gas: 1039983.044 units remaining) + [ {} + 10 + 0 ] + - location: 34 (remaining gas: 1039983.044 units remaining) + [ 10 + 0 ] + - location: 36 (remaining gas: 1039983.034 units remaining) + [ 0 ] + - location: 34 (remaining gas: 1039983.014 units remaining) + [ {} + 0 ] + - location: 37 (remaining gas: 1039983.004 units remaining) + [ (Pair {} 0) ] + - location: 38 (remaining gas: 1039982.994 units remaining) + [ {} + (Pair {} 0) ] + - location: 40 (remaining gas: 1039982.984 units remaining) + [ (Pair {} {} 0) ] diff --git a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Left Unit].out b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Left Unit].out index b6055d91984e..94695c4d8e26 100644 --- a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Left Unit].out +++ b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Left Unit].out @@ -22,5 +22,19 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 8 characters 11 to 14, unexpected arithmetic overflow +trace + - location: 9 (remaining gas: 1039988.754 units remaining) + [ (Pair (Left Unit) Unit) ] + - location: 9 (remaining gas: 1039988.744 units remaining) + [ (Left Unit) ] + - location: 10 (remaining gas: 1039988.744 units remaining) + [ Unit ] + - location: 12 (remaining gas: 1039988.734 units remaining) + [ 922337203685477580700 + Unit ] + - location: 15 (remaining gas: 1039988.724 units remaining) + [ 10 + 922337203685477580700 + Unit ] Fatal error: error running script diff --git a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Right Unit].out b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Right Unit].out index 125a88498612..f7c118381e2d 100644 --- a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Right Unit].out +++ b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[mul_overflow.tz-Unit-Right Unit].out @@ -22,5 +22,19 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 14 characters 11 to 14, unexpected arithmetic overflow +trace + - location: 9 (remaining gas: 1039988.754 units remaining) + [ (Pair (Right Unit) Unit) ] + - location: 9 (remaining gas: 1039988.744 units remaining) + [ (Right Unit) ] + - location: 10 (remaining gas: 1039988.744 units remaining) + [ Unit ] + - location: 21 (remaining gas: 1039988.734 units remaining) + [ 10 + Unit ] + - location: 24 (remaining gas: 1039988.724 units remaining) + [ 922337203685477580700 + 10 + Unit ] Fatal error: error running script diff --git a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 1 257))].out b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 1 257))].out index b476bb56b5e0..439b9f1f2c18 100644 --- a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 1 257))].out +++ b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 1 257))].out @@ -22,5 +22,15 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 10 characters 25 to 28, unexpected arithmetic overflow +trace + - location: 14 (remaining gas: 1039991.189 units remaining) + [ (Pair (Left (Pair 1 257)) None) ] + - location: 14 (remaining gas: 1039991.179 units remaining) + [ (Left (Pair 1 257)) ] + - location: 15 (remaining gas: 1039991.179 units remaining) + [ (Pair 1 257) ] + - location: 17 (remaining gas: 1039991.169 units remaining) + [ 1 + 257 ] Fatal error: error running script diff --git a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 123 257))].out b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 123 257))].out index 46807f6a1a28..836751cef784 100644 --- a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 123 257))].out +++ b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Left (Pair 123 257))].out @@ -22,5 +22,15 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 10 characters 25 to 28, unexpected arithmetic overflow +trace + - location: 14 (remaining gas: 1039991.189 units remaining) + [ (Pair (Left (Pair 123 257)) None) ] + - location: 14 (remaining gas: 1039991.179 units remaining) + [ (Left (Pair 123 257)) ] + - location: 15 (remaining gas: 1039991.179 units remaining) + [ (Pair 123 257) ] + - location: 17 (remaining gas: 1039991.169 units remaining) + [ 123 + 257 ] Fatal error: error running script diff --git a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 1 257))].out b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 1 257))].out index 2b5c25dca59c..bcd141c3d4f4 100644 --- a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 1 257))].out +++ b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 1 257))].out @@ -22,5 +22,15 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 13 characters 25 to 28, unexpected arithmetic overflow +trace + - location: 14 (remaining gas: 1039991.189 units remaining) + [ (Pair (Right (Pair 1 257)) None) ] + - location: 14 (remaining gas: 1039991.179 units remaining) + [ (Right (Pair 1 257)) ] + - location: 15 (remaining gas: 1039991.179 units remaining) + [ (Pair 1 257) ] + - location: 20 (remaining gas: 1039991.169 units remaining) + [ 1 + 257 ] Fatal error: error running script diff --git a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 123 257))].out b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 123 257))].out index 86154619c89f..a1309cf0c7b3 100644 --- a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 123 257))].out +++ b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_arithmetic_overflow[shifts.tz-None-(Right (Pair 123 257))].out @@ -22,5 +22,15 @@ Runtime error in contract [CONTRACT_HASH]: 19: At line 13 characters 25 to 28, unexpected arithmetic overflow +trace + - location: 14 (remaining gas: 1039991.189 units remaining) + [ (Pair (Right (Pair 123 257)) None) ] + - location: 14 (remaining gas: 1039991.179 units remaining) + [ (Right (Pair 123 257)) ] + - location: 15 (remaining gas: 1039991.179 units remaining) + [ (Pair 123 257) ] + - location: 20 (remaining gas: 1039991.169 units remaining) + [ 123 + 257 ] Fatal error: error running script diff --git a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_hash_consistency_michelson_cli.out b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_hash_consistency_michelson_cli.out index 058e6e9129f7..30811d44c630 100644 --- a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_hash_consistency_michelson_cli.out +++ b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_hash_consistency_michelson_cli.out @@ -13,6 +13,20 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039993.856 units remaining) + [ (Pair (Pair 22220000000 "2017-12-13T04:49:00Z" 34) 0x00) ] + - location: 11 (remaining gas: 1039993.846 units remaining) + [ (Pair 22220000000 "2017-12-13T04:49:00Z" 34) ] + - location: 12 (remaining gas: 1039992.516 units remaining) + [ 0x0507070080acd2c6a501070700bcc485a30b0022 ] + - location: 13 (remaining gas: 1039992.064 units remaining) + [ 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc ] + - location: 14 (remaining gas: 1039992.054 units remaining) + [ {} + 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc ] + - location: 16 (remaining gas: 1039992.044 units remaining) + [ (Pair {} 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc) ] storage 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc @@ -20,4 +34,18 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039993.856 units remaining) + [ (Pair (Pair 22220000000 "2017-12-13T04:49:00Z" 34) 0x00) ] + - location: 11 (remaining gas: 1039993.846 units remaining) + [ (Pair 22220000000 "2017-12-13T04:49:00Z" 34) ] + - location: 12 (remaining gas: 1039992.516 units remaining) + [ 0x0507070080acd2c6a501070700bcc485a30b0022 ] + - location: 13 (remaining gas: 1039992.064 units remaining) + [ 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc ] + - location: 14 (remaining gas: 1039992.054 units remaining) + [ {} + 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc ] + - location: 16 (remaining gas: 1039992.044 units remaining) + [ (Pair {} 0x95a69fcbbf773989333dc9b31e246575812dbea19d25089f83a2aeeea16ab4bc) ] diff --git "a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" "b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" index f98883fd6981..29b23edf5863 100644 --- "a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" +++ "b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"bar\" 5 ; Elt \"foo\" 1 } .480b9afc63.out" @@ -6,4 +6,150 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039982.728 units remaining) + [ (Pair 15 { Elt "bar" 5 ; Elt "foo" 1 } 6) ] + - location: 11 (remaining gas: 1039982.718 units remaining) + [ 15 + (Pair { Elt "bar" 5 ; Elt "foo" 1 } 6) ] + - location: 12 (remaining gas: 1039982.708 units remaining) + [ (Pair { Elt "bar" 5 ; Elt "foo" 1 } 6) + 15 ] + - location: 13 (remaining gas: 1039982.698 units remaining) + [ { Elt "bar" 5 ; Elt "foo" 1 } + 15 ] + - location: 14 (remaining gas: 1039982.698 units remaining) + [ ] + - location: 17 (remaining gas: 1039982.688 units remaining) + [ 0 ] + - location: 14 (remaining gas: 1039982.663 units remaining) + [ 15 + 0 ] + - location: 14 (remaining gas: 1039982.653 units remaining) + [ { Elt "bar" 5 ; Elt "foo" 1 } + 15 + 0 ] + - location: 14 (remaining gas: 1039982.653 units remaining) + [ { Elt "bar" 5 ; Elt "foo" 1 } + 15 + 0 ] + - location: 20 (remaining gas: 1039982.653 units remaining) + [ (Pair "bar" 5) + 15 + 0 ] + - location: 22 (remaining gas: 1039982.643 units remaining) + [ 5 + 15 + 0 ] + - location: 23 (remaining gas: 1039982.643 units remaining) + [ 15 + 0 ] + - location: 25 (remaining gas: 1039982.633 units remaining) + [ 15 + 15 + 0 ] + - location: 23 (remaining gas: 1039982.608 units remaining) + [ 5 + 15 + 15 + 0 ] + - location: 26 (remaining gas: 1039982.573 units remaining) + [ 20 + 15 + 0 ] + - location: 27 (remaining gas: 1039982.563 units remaining) + [ 20 + 20 + 15 + 0 ] + - location: 28 (remaining gas: 1039982.515 units remaining) + [ 20 + 15 + 20 + 0 ] + - location: 30 (remaining gas: 1039982.515 units remaining) + [ 20 + 0 ] + - location: 33 (remaining gas: 1039982.480 units remaining) + [ 20 ] + - location: 30 (remaining gas: 1039982.455 units remaining) + [ 15 + 20 ] + - location: 30 (remaining gas: 1039982.445 units remaining) + [ 20 + 15 + 20 ] + - location: 30 (remaining gas: 1039982.445 units remaining) + [ 20 + 15 + 20 ] + - location: 20 (remaining gas: 1039982.430 units remaining) + [ (Pair "foo" 1) + 15 + 20 ] + - location: 22 (remaining gas: 1039982.420 units remaining) + [ 1 + 15 + 20 ] + - location: 23 (remaining gas: 1039982.420 units remaining) + [ 15 + 20 ] + - location: 25 (remaining gas: 1039982.410 units remaining) + [ 15 + 15 + 20 ] + - location: 23 (remaining gas: 1039982.385 units remaining) + [ 1 + 15 + 15 + 20 ] + - location: 26 (remaining gas: 1039982.350 units remaining) + [ 16 + 15 + 20 ] + - location: 27 (remaining gas: 1039982.340 units remaining) + [ 16 + 16 + 15 + 20 ] + - location: 28 (remaining gas: 1039982.292 units remaining) + [ 16 + 15 + 16 + 20 ] + - location: 30 (remaining gas: 1039982.292 units remaining) + [ 16 + 20 ] + - location: 33 (remaining gas: 1039982.257 units remaining) + [ 36 ] + - location: 30 (remaining gas: 1039982.232 units remaining) + [ 15 + 36 ] + - location: 30 (remaining gas: 1039982.222 units remaining) + [ 16 + 15 + 36 ] + - location: 30 (remaining gas: 1039982.222 units remaining) + [ 16 + 15 + 36 ] + - location: 20 (remaining gas: 1039982.207 units remaining) + [ { Elt "bar" 20 ; Elt "foo" 16 } + 15 + 36 ] + - location: 34 (remaining gas: 1039982.207 units remaining) + [ 15 + 36 ] + - location: 36 (remaining gas: 1039982.197 units remaining) + [ 36 ] + - location: 34 (remaining gas: 1039982.172 units remaining) + [ { Elt "bar" 20 ; Elt "foo" 16 } + 36 ] + - location: 37 (remaining gas: 1039982.162 units remaining) + [ (Pair { Elt "bar" 20 ; Elt "foo" 16 } 36) ] + - location: 38 (remaining gas: 1039982.152 units remaining) + [ {} + (Pair { Elt "bar" 20 ; Elt "foo" 16 } 36) ] + - location: 40 (remaining gas: 1039982.142 units remaining) + [ (Pair {} { Elt "bar" 20 ; Elt "foo" 16 } 36) ] diff --git "a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" "b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" index 418959e3c01d..76118bd9d9e0 100644 --- "a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" +++ "b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair { Elt \"foo\" 1 } 1)-10-(Pair { .811573b5a7.out" @@ -6,4 +6,100 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039983.099 units remaining) + [ (Pair 10 { Elt "foo" 1 } 1) ] + - location: 11 (remaining gas: 1039983.089 units remaining) + [ 10 + (Pair { Elt "foo" 1 } 1) ] + - location: 12 (remaining gas: 1039983.079 units remaining) + [ (Pair { Elt "foo" 1 } 1) + 10 ] + - location: 13 (remaining gas: 1039983.069 units remaining) + [ { Elt "foo" 1 } + 10 ] + - location: 14 (remaining gas: 1039983.069 units remaining) + [ ] + - location: 17 (remaining gas: 1039983.059 units remaining) + [ 0 ] + - location: 14 (remaining gas: 1039983.034 units remaining) + [ 10 + 0 ] + - location: 14 (remaining gas: 1039983.024 units remaining) + [ { Elt "foo" 1 } + 10 + 0 ] + - location: 14 (remaining gas: 1039983.024 units remaining) + [ { Elt "foo" 1 } + 10 + 0 ] + - location: 20 (remaining gas: 1039983.024 units remaining) + [ (Pair "foo" 1) + 10 + 0 ] + - location: 22 (remaining gas: 1039983.014 units remaining) + [ 1 + 10 + 0 ] + - location: 23 (remaining gas: 1039983.014 units remaining) + [ 10 + 0 ] + - location: 25 (remaining gas: 1039983.004 units remaining) + [ 10 + 10 + 0 ] + - location: 23 (remaining gas: 1039982.979 units remaining) + [ 1 + 10 + 10 + 0 ] + - location: 26 (remaining gas: 1039982.944 units remaining) + [ 11 + 10 + 0 ] + - location: 27 (remaining gas: 1039982.934 units remaining) + [ 11 + 11 + 10 + 0 ] + - location: 28 (remaining gas: 1039982.886 units remaining) + [ 11 + 10 + 11 + 0 ] + - location: 30 (remaining gas: 1039982.886 units remaining) + [ 11 + 0 ] + - location: 33 (remaining gas: 1039982.851 units remaining) + [ 11 ] + - location: 30 (remaining gas: 1039982.826 units remaining) + [ 10 + 11 ] + - location: 30 (remaining gas: 1039982.816 units remaining) + [ 11 + 10 + 11 ] + - location: 30 (remaining gas: 1039982.816 units remaining) + [ 11 + 10 + 11 ] + - location: 20 (remaining gas: 1039982.801 units remaining) + [ { Elt "foo" 11 } + 10 + 11 ] + - location: 34 (remaining gas: 1039982.801 units remaining) + [ 10 + 11 ] + - location: 36 (remaining gas: 1039982.791 units remaining) + [ 11 ] + - location: 34 (remaining gas: 1039982.766 units remaining) + [ { Elt "foo" 11 } + 11 ] + - location: 37 (remaining gas: 1039982.756 units remaining) + [ (Pair { Elt "foo" 11 } 11) ] + - location: 38 (remaining gas: 1039982.746 units remaining) + [ {} + (Pair { Elt "foo" 11 } 11) ] + - location: 40 (remaining gas: 1039982.736 units remaining) + [ (Pair {} { Elt "foo" 11 } 11) ] diff --git a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out index 3e22eae20fd4..1db2cc5711f9 100644 --- a/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out +++ b/tests_python/tests_015/_regtest_outputs/test_contract_opcodes.TestContractOpcodes::test_map_map_sideeffect[map_map_sideeffect.tz-(Pair {} 0)-10-(Pair {} 0)].out @@ -6,4 +6,50 @@ emitted operations big_map diff +trace + - location: 11 (remaining gas: 1039983.429 units remaining) + [ (Pair 10 {} 0) ] + - location: 11 (remaining gas: 1039983.419 units remaining) + [ 10 + (Pair {} 0) ] + - location: 12 (remaining gas: 1039983.409 units remaining) + [ (Pair {} 0) + 10 ] + - location: 13 (remaining gas: 1039983.399 units remaining) + [ {} + 10 ] + - location: 14 (remaining gas: 1039983.399 units remaining) + [ ] + - location: 17 (remaining gas: 1039983.389 units remaining) + [ 0 ] + - location: 14 (remaining gas: 1039983.364 units remaining) + [ 10 + 0 ] + - location: 14 (remaining gas: 1039983.354 units remaining) + [ {} + 10 + 0 ] + - location: 14 (remaining gas: 1039983.354 units remaining) + [ {} + 10 + 0 ] + - location: 20 (remaining gas: 1039983.354 units remaining) + [ {} + 10 + 0 ] + - location: 34 (remaining gas: 1039983.354 units remaining) + [ 10 + 0 ] + - location: 36 (remaining gas: 1039983.344 units remaining) + [ 0 ] + - location: 34 (remaining gas: 1039983.319 units remaining) + [ {} + 0 ] + - location: 37 (remaining gas: 1039983.309 units remaining) + [ (Pair {} 0) ] + - location: 38 (remaining gas: 1039983.299 units remaining) + [ {} + (Pair {} 0) ] + - location: 40 (remaining gas: 1039983.289 units remaining) + [ (Pair {} {} 0) ] -- GitLab