From 253cb29bda2e6cf8040b9a77ed8a712b5d18ef19 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Tue, 7 Jun 2022 09:31:36 +0200 Subject: [PATCH 1/4] Proto/Ticket_operations_diff: split Transaction_to_contract case --- .../lib_protocol/ticket_operations_diff.ml | 91 ++++++++----------- 1 file changed, 40 insertions(+), 51 deletions(-) diff --git a/src/proto_alpha/lib_protocol/ticket_operations_diff.ml b/src/proto_alpha/lib_protocol/ticket_operations_diff.ml index 86a470bbbd3c..b8e0f3286c93 100644 --- a/src/proto_alpha/lib_protocol/ticket_operations_diff.ml +++ b/src/proto_alpha/lib_protocol/ticket_operations_diff.ml @@ -174,56 +174,44 @@ let cast_transaction_parameter (type a ac b bc) ctxt location >>?= fun (res, ctxt) -> res >>?= fun Script_ir_translator.Eq -> return ((parameters : a), ctxt) -let tickets_of_transaction ctxt ~(destination : Contract.t) ~entrypoint - ~location ~parameters_ty ~parameters = - match destination with - | Implicit _ -> return (None, ctxt) - | Originated contract_hash -> - (* TODO: #2653 - Avoid having to load the script from the cache. - This is currently in place to avoid regressions for type-checking - errors. We should be able to remove it. - *) - parse_and_cache_script - ctxt - ~destination:contract_hash - ~get_non_cached_script:(fun ctxt -> - (* Look up the script from the context. *) - Contract.get_script ctxt destination >>=? fun (ctxt, script_opt) -> - match script_opt with - | None -> fail (Failed_to_get_script destination) - | Some script -> return (script, ctxt)) - >>=? fun ( Script_ir_translator.Ex_script - (Script {arg_type; entrypoints; _}), - ctxt ) -> - (* Find the entrypoint type for the given entrypoint. *) - Gas_monad.run - ctxt - (Script_ir_translator.find_entrypoint - ~error_details:(Informative ()) - arg_type - entrypoints - entrypoint) - >>?= fun (res, ctxt) -> - res >>?= fun (Ex_ty_cstr {ty = entry_arg_ty; _}) -> - Ticket_scanner.type_has_tickets ctxt entry_arg_ty - >>?= fun (has_tickets, ctxt) -> - (* Check that the parameter's type matches that of the entry-point, and - cast the parameter if this is the case. *) - cast_transaction_parameter - ctxt - location - entry_arg_ty - parameters_ty - parameters - >>=? fun (parameters, ctxt) -> - Ticket_scanner.tickets_of_value - ~include_lazy:true - ctxt - has_tickets - parameters - >>=? fun (tickets, ctxt) -> - return (Some {destination = Contract destination; tickets}, ctxt) +let tickets_of_transaction ctxt ~destination:(contract_hash : Contract_hash.t) + ~entrypoint ~location ~parameters_ty ~parameters = + let destination = Contract.Originated contract_hash in + (* TODO: #2653 + Avoid having to load the script from the cache. + This is currently in place to avoid regressions for type-checking + errors. We should be able to remove it. + *) + parse_and_cache_script + ctxt + ~destination:contract_hash + ~get_non_cached_script:(fun ctxt -> + (* Look up the script from the context. *) + Contract.get_script ctxt destination >>=? fun (ctxt, script_opt) -> + match script_opt with + | None -> fail (Failed_to_get_script destination) + | Some script -> return (script, ctxt)) + >>=? fun ( Script_ir_translator.Ex_script (Script {arg_type; entrypoints; _}), + ctxt ) -> + (* Find the entrypoint type for the given entrypoint. *) + Gas_monad.run + ctxt + (Script_ir_translator.find_entrypoint + ~error_details:(Informative ()) + arg_type + entrypoints + entrypoint) + >>?= fun (res, ctxt) -> + res >>?= fun (Ex_ty_cstr {ty = entry_arg_ty; _}) -> + Ticket_scanner.type_has_tickets ctxt entry_arg_ty + >>?= fun (has_tickets, ctxt) -> + (* Check that the parameter's type matches that of the entry-point, and + cast the parameter if this is the case. *) + cast_transaction_parameter ctxt location entry_arg_ty parameters_ty parameters + >>=? fun (parameters, ctxt) -> + Ticket_scanner.tickets_of_value ~include_lazy:true ctxt has_tickets parameters + >>=? fun (tickets, ctxt) -> + return (Some {destination = Contract destination; tickets}, ctxt) (** Extract tickets of an origination operation by scanning the storage. *) let tickets_of_origination ctxt ~preorigination ~storage_type ~storage = @@ -239,12 +227,13 @@ let tickets_of_origination ctxt ~preorigination ~storage_type ~storage = let tickets_of_operation ctxt (Script_typed_ir.Internal_operation {source = _; operation; nonce = _}) = match operation with + | Transaction_to_contract {destination = Implicit _; _} -> return (None, ctxt) | Transaction_to_contract { amount = _; unparsed_parameters = _; entrypoint; - destination; + destination = Originated destination; location; parameters_ty; parameters; -- GitLab From 230647ba115a7c9721cbf3f29cc19757fa8f614d Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Tue, 7 Jun 2022 09:34:26 +0200 Subject: [PATCH 2/4] Proto/Ticket_operations_diff: no need to check entrypoint type Fix #2351, #2653 --- .../lib_protocol/ticket_operations_diff.ml | 66 +------------------ 1 file changed, 2 insertions(+), 64 deletions(-) diff --git a/src/proto_alpha/lib_protocol/ticket_operations_diff.ml b/src/proto_alpha/lib_protocol/ticket_operations_diff.ml index b8e0f3286c93..2715e11df175 100644 --- a/src/proto_alpha/lib_protocol/ticket_operations_diff.ml +++ b/src/proto_alpha/lib_protocol/ticket_operations_diff.ml @@ -142,73 +142,11 @@ module Ticket_token_map = struct map end -let parse_and_cache_script ctxt ~destination ~get_non_cached_script = - Script_cache.find ctxt destination >>=? fun (ctxt, _cache_key, cached) -> - match cached with - | Some (_script, ex_script) -> return (ex_script, ctxt) - | None -> - get_non_cached_script ctxt >>=? fun (script, ctxt) -> - Script_ir_translator.parse_script - ctxt - ~legacy:true - ~allow_forged_in_storage:true - script - >>=? fun (ex_script, ctxt) -> - (* Add the parsed script to the script-cache in order to avoid having to - re-parse when applying the operation at a later stage. *) - let size, cost = Script_ir_translator.script_size ex_script in - Gas.consume ctxt cost >>?= fun ctxt -> - Script_cache.insert ctxt destination (script, ex_script) size - >>?= fun ctxt -> return (ex_script, ctxt) - -let cast_transaction_parameter (type a ac b bc) ctxt location - (entry_arg_ty : (a, ac) Script_typed_ir.ty) - (parameters_ty : (b, bc) Script_typed_ir.ty) (parameters : b) : - (a * context) tzresult Lwt.t = - Gas_monad.run - ctxt - (Script_ir_translator.ty_eq - ~error_details:(Informative location) - entry_arg_ty - parameters_ty) - >>?= fun (res, ctxt) -> - res >>?= fun Script_ir_translator.Eq -> return ((parameters : a), ctxt) - let tickets_of_transaction ctxt ~destination:(contract_hash : Contract_hash.t) - ~entrypoint ~location ~parameters_ty ~parameters = + ~entrypoint:_ ~location:_ ~parameters_ty ~parameters = let destination = Contract.Originated contract_hash in - (* TODO: #2653 - Avoid having to load the script from the cache. - This is currently in place to avoid regressions for type-checking - errors. We should be able to remove it. - *) - parse_and_cache_script - ctxt - ~destination:contract_hash - ~get_non_cached_script:(fun ctxt -> - (* Look up the script from the context. *) - Contract.get_script ctxt destination >>=? fun (ctxt, script_opt) -> - match script_opt with - | None -> fail (Failed_to_get_script destination) - | Some script -> return (script, ctxt)) - >>=? fun ( Script_ir_translator.Ex_script (Script {arg_type; entrypoints; _}), - ctxt ) -> - (* Find the entrypoint type for the given entrypoint. *) - Gas_monad.run - ctxt - (Script_ir_translator.find_entrypoint - ~error_details:(Informative ()) - arg_type - entrypoints - entrypoint) - >>?= fun (res, ctxt) -> - res >>?= fun (Ex_ty_cstr {ty = entry_arg_ty; _}) -> - Ticket_scanner.type_has_tickets ctxt entry_arg_ty + Ticket_scanner.type_has_tickets ctxt parameters_ty >>?= fun (has_tickets, ctxt) -> - (* Check that the parameter's type matches that of the entry-point, and - cast the parameter if this is the case. *) - cast_transaction_parameter ctxt location entry_arg_ty parameters_ty parameters - >>=? fun (parameters, ctxt) -> Ticket_scanner.tickets_of_value ~include_lazy:true ctxt has_tickets parameters >>=? fun (tickets, ctxt) -> return (Some {destination = Contract destination; tickets}, ctxt) -- GitLab From 0122be77fbbf8e65ef3a47507f3f80135e0b7457 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Tue, 7 Jun 2022 09:35:39 +0200 Subject: [PATCH 3/4] Proto/Ticket_operations_diff: simplify tickets_of_transaction --- .../lib_protocol/ticket_operations_diff.ml | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/proto_alpha/lib_protocol/ticket_operations_diff.ml b/src/proto_alpha/lib_protocol/ticket_operations_diff.ml index 2715e11df175..eaab5557d06b 100644 --- a/src/proto_alpha/lib_protocol/ticket_operations_diff.ml +++ b/src/proto_alpha/lib_protocol/ticket_operations_diff.ml @@ -142,14 +142,12 @@ module Ticket_token_map = struct map end -let tickets_of_transaction ctxt ~destination:(contract_hash : Contract_hash.t) - ~entrypoint:_ ~location:_ ~parameters_ty ~parameters = - let destination = Contract.Originated contract_hash in +let tickets_of_transaction ctxt ~destination ~parameters_ty ~parameters = + let destination = Destination.Contract (Originated destination) in Ticket_scanner.type_has_tickets ctxt parameters_ty >>?= fun (has_tickets, ctxt) -> Ticket_scanner.tickets_of_value ~include_lazy:true ctxt has_tickets parameters - >>=? fun (tickets, ctxt) -> - return (Some {destination = Contract destination; tickets}, ctxt) + >>=? fun (tickets, ctxt) -> return (Some {destination; tickets}, ctxt) (** Extract tickets of an origination operation by scanning the storage. *) let tickets_of_origination ctxt ~preorigination ~storage_type ~storage = @@ -170,19 +168,13 @@ let tickets_of_operation ctxt { amount = _; unparsed_parameters = _; - entrypoint; + entrypoint = _; destination = Originated destination; - location; + location = _; parameters_ty; parameters; } -> - tickets_of_transaction - ctxt - ~destination - ~entrypoint - ~location - ~parameters_ty - ~parameters + tickets_of_transaction ctxt ~destination ~parameters_ty ~parameters | Transaction_to_tx_rollup {destination; unparsed_parameters = _; parameters_ty; parameters} -> Tx_rollup_parameters.get_deposit_parameters parameters_ty parameters -- GitLab From c1b2dc7d699257a965b1f5ef5b2cad2e9612a243 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Wed, 8 Jun 2022 00:11:31 +0200 Subject: [PATCH 4/4] Tests/Python: update gas in regression traces --- ...stSelfAddressTransfer::test_send_self_address.out | 6 +++--- ...codes.TestContractOnchainOpcodes::test_source.out | 4 ++-- ...tContractOnchainOpcodes::test_transfer_tokens.out | 12 ++++++------ ...tAddApproveTransferRemove::test_add_liquidity.out | 8 ++++---- ...dApproveTransferRemove::test_remove_liquidity.out | 12 ++++++------ ...quidity_baking.TestTrades::test_add_liquidity.out | 8 ++++---- ...est_liquidity_baking.TestTrades::test_buy_tok.out | 6 +++--- ...st_liquidity_baking.TestTrades::test_sell_tok.out | 6 +++--- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSelfAddressTransfer::test_send_self_address.out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSelfAddressTransfer::test_send_self_address.out index f6612dd12883..c89dfcbd3781 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSelfAddressTransfer::test_send_self_address.out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSelfAddressTransfer::test_send_self_address.out @@ -1,7 +1,7 @@ tests_alpha/test_contract.py::TestSelfAddressTransfer::test_send_self_address Node is bootstrapped. -Estimated gas: 4693.662 units (will add 100 for safety) +Estimated gas: 4693.447 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[BLOCK_HASH]' @@ -27,7 +27,7 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: Unit Storage size: 82 bytes - Consumed gas: 3490.572 + Consumed gas: 2575.930 Internal operations: Internal Transaction: Amount: ꜩ0 @@ -37,6 +37,6 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: Unit Storage size: 83 bytes - Consumed gas: 1203.090 + Consumed gas: 2117.517 Injected block at minimal timestamp diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract_onchain_opcodes.TestContractOnchainOpcodes::test_source.out b/tests_python/tests_alpha/_regtest_outputs/test_contract_onchain_opcodes.TestContractOnchainOpcodes::test_source.out index ddf5e0f5f28f..207c815022df 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract_onchain_opcodes.TestContractOnchainOpcodes::test_source.out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract_onchain_opcodes.TestContractOnchainOpcodes::test_source.out @@ -78,7 +78,7 @@ Injected block at minimal timestamp [CONTRACT_HASH] Node is bootstrapped. -Estimated gas: 3772.624 units (will add 100 for safety) +Estimated gas: 3772.529 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[BLOCK_HASH]' @@ -104,7 +104,7 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: Unit Storage size: 55 bytes - Consumed gas: 2569.422 + Consumed gas: 2569.327 Internal operations: Internal Transaction: Amount: ꜩ0 diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract_onchain_opcodes.TestContractOnchainOpcodes::test_transfer_tokens.out b/tests_python/tests_alpha/_regtest_outputs/test_contract_onchain_opcodes.TestContractOnchainOpcodes::test_transfer_tokens.out index 6fbadc4fd870..be8806bb9645 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract_onchain_opcodes.TestContractOnchainOpcodes::test_transfer_tokens.out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract_onchain_opcodes.TestContractOnchainOpcodes::test_transfer_tokens.out @@ -143,7 +143,7 @@ Injected block at minimal timestamp [CONTRACT_HASH] Node is bootstrapped. -Estimated gas: 4679.987 units (will add 100 for safety) +Estimated gas: 4679.892 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[BLOCK_HASH]' @@ -169,7 +169,7 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: Unit Storage size: 66 bytes - Consumed gas: 3477.185 + Consumed gas: 2571.326 Balance updates: [CONTRACT_HASH] ... -ꜩ100 [CONTRACT_HASH] ... +ꜩ100 @@ -181,7 +181,7 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: Unit Storage size: 38 bytes - Consumed gas: 1202.802 + Consumed gas: 2108.566 Balance updates: [CONTRACT_HASH] ... -ꜩ100 [CONTRACT_HASH] ... +ꜩ100 @@ -191,7 +191,7 @@ Injected block at minimal timestamp [CONTRACT_HASH] Node is bootstrapped. -Estimated gas: 3767.920 units (will add 100 for safety) +Estimated gas: 3767.825 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[BLOCK_HASH]' @@ -217,7 +217,7 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: Unit Storage size: 66 bytes - Consumed gas: 2565.118 + Consumed gas: 1659.259 Balance updates: [CONTRACT_HASH] ... -ꜩ100 [CONTRACT_HASH] ... +ꜩ100 @@ -229,7 +229,7 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: Unit Storage size: 38 bytes - Consumed gas: 1202.802 + Consumed gas: 2108.566 Balance updates: [CONTRACT_HASH] ... -ꜩ100 [CONTRACT_HASH] ... +ꜩ100 diff --git a/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestAddApproveTransferRemove::test_add_liquidity.out b/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestAddApproveTransferRemove::test_add_liquidity.out index f29a346d8f8e..69e8f29edb90 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestAddApproveTransferRemove::test_add_liquidity.out +++ b/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestAddApproveTransferRemove::test_add_liquidity.out @@ -1,7 +1,7 @@ tests_alpha/test_liquidity_baking.py::TestAddApproveTransferRemove::test_add_liquidity Node is bootstrapped. -Estimated gas: 8522.321 units (will add 100 for safety) +Estimated gas: 8521.106 units (will add 100 for safety) Estimated storage: 141 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[BLOCK_HASH]' @@ -14,7 +14,7 @@ This sequence of operations was run: From: [CONTRACT_HASH] Fee to the baker: ꜩ0.001218 Expected counter: [EXPECTED_COUNTER] - Gas limit: 8623 + Gas limit: 8622 Storage limit: 161 bytes Balance updates: [CONTRACT_HASH] ... -ꜩ0.001218 @@ -34,7 +34,7 @@ This sequence of operations was run: 0x0115eb0104481a6d7921160bc982c5e0a561cd8a3a00 } Storage size: 4633 bytes Paid storage size diff: 3 bytes - Consumed gas: 3783.339 + Consumed gas: 2275.556 Balance updates: [CONTRACT_HASH] ... -ꜩ0.00075 storage fees ........................... +ꜩ0.00075 @@ -75,7 +75,7 @@ This sequence of operations was run: Set map(2)[0x000002298c03ed7d454a101eb7022bc95f7e5f41ac78] to 72007 Storage size: 2048 bytes Paid storage size diff: 70 bytes - Consumed gas: 1673.293 + Consumed gas: 3179.861 Balance updates: [CONTRACT_HASH] ... -ꜩ0.0175 storage fees ........................... +ꜩ0.0175 diff --git a/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestAddApproveTransferRemove::test_remove_liquidity.out b/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestAddApproveTransferRemove::test_remove_liquidity.out index 3759a9abf71f..207d522bdc3a 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestAddApproveTransferRemove::test_remove_liquidity.out +++ b/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestAddApproveTransferRemove::test_remove_liquidity.out @@ -1,7 +1,7 @@ tests_alpha/test_liquidity_baking.py::TestAddApproveTransferRemove::test_remove_liquidity Node is bootstrapped. -Estimated gas: 7520.262 units (will add 100 for safety) +Estimated gas: 7519.047 units (will add 100 for safety) Estimated storage: 67 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[BLOCK_HASH]' @@ -12,13 +12,13 @@ and/or an external block explorer to make sure that it has been included. This sequence of operations was run: Manager signed operations: From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.001115 + Fee to the baker: ꜩ0.001114 Expected counter: [EXPECTED_COUNTER] - Gas limit: 7621 + Gas limit: 7620 Storage limit: 87 bytes Balance updates: - [CONTRACT_HASH] ... -ꜩ0.001115 - payload fees(the block proposer) ....... +ꜩ0.001115 + [CONTRACT_HASH] ... -ꜩ0.001114 + payload fees(the block proposer) ....... +ꜩ0.001114 Transaction: Amount: ꜩ0 From: [CONTRACT_HASH] @@ -33,7 +33,7 @@ This sequence of operations was run: 0x01e927f00ef734dfc85919635e9afc9166c83ef9fc00 ; 0x0115eb0104481a6d7921160bc982c5e0a561cd8a3a00 } Storage size: 4633 bytes - Consumed gas: 2278.921 + Consumed gas: 2277.706 Internal operations: Internal Transaction: Amount: ꜩ0 diff --git a/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestTrades::test_add_liquidity.out b/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestTrades::test_add_liquidity.out index b0f8fa476302..e2738e165f07 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestTrades::test_add_liquidity.out +++ b/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestTrades::test_add_liquidity.out @@ -1,7 +1,7 @@ tests_alpha/test_liquidity_baking.py::TestTrades::test_add_liquidity Node is bootstrapped. -Estimated gas: 8522.321 units (will add 100 for safety) +Estimated gas: 8521.106 units (will add 100 for safety) Estimated storage: 141 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[BLOCK_HASH]' @@ -14,7 +14,7 @@ This sequence of operations was run: From: [CONTRACT_HASH] Fee to the baker: ꜩ0.001218 Expected counter: [EXPECTED_COUNTER] - Gas limit: 8623 + Gas limit: 8622 Storage limit: 161 bytes Balance updates: [CONTRACT_HASH] ... -ꜩ0.001218 @@ -34,7 +34,7 @@ This sequence of operations was run: 0x0115eb0104481a6d7921160bc982c5e0a561cd8a3a00 } Storage size: 4633 bytes Paid storage size diff: 3 bytes - Consumed gas: 3783.339 + Consumed gas: 2275.556 Balance updates: [CONTRACT_HASH] ... -ꜩ0.00075 storage fees ........................... +ꜩ0.00075 @@ -75,7 +75,7 @@ This sequence of operations was run: Set map(2)[0x000002298c03ed7d454a101eb7022bc95f7e5f41ac78] to 72007 Storage size: 2048 bytes Paid storage size diff: 70 bytes - Consumed gas: 1673.293 + Consumed gas: 3179.861 Balance updates: [CONTRACT_HASH] ... -ꜩ0.0175 storage fees ........................... +ꜩ0.0175 diff --git a/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestTrades::test_buy_tok.out b/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestTrades::test_buy_tok.out index 58d78a9381d4..9adda170f74d 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestTrades::test_buy_tok.out +++ b/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestTrades::test_buy_tok.out @@ -1,7 +1,7 @@ tests_alpha/test_liquidity_baking.py::TestTrades::test_buy_tok Node is bootstrapped. -Estimated gas: 5115.243 units (will add 100 for safety) +Estimated gas: 5114.558 units (will add 100 for safety) Estimated storage: 326 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[BLOCK_HASH]' @@ -14,7 +14,7 @@ This sequence of operations was run: From: [CONTRACT_HASH] Fee to the baker: ꜩ0.000869 Expected counter: [EXPECTED_COUNTER] - Gas limit: 5216 + Gas limit: 5215 Storage limit: 346 bytes Balance updates: [CONTRACT_HASH] ... -ꜩ0.000869 @@ -34,7 +34,7 @@ This sequence of operations was run: 0x0115eb0104481a6d7921160bc982c5e0a561cd8a3a00 } Storage size: 4634 bytes Paid storage size diff: 1 bytes - Consumed gas: 1747.265 + Consumed gas: 1746.580 Balance updates: [CONTRACT_HASH] ... -ꜩ0.00025 storage fees ........................... +ꜩ0.00025 diff --git a/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestTrades::test_sell_tok.out b/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestTrades::test_sell_tok.out index da9a8b0e15ef..2771ad0c0efd 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestTrades::test_sell_tok.out +++ b/tests_python/tests_alpha/_regtest_outputs/test_liquidity_baking.TestTrades::test_sell_tok.out @@ -1,7 +1,7 @@ tests_alpha/test_liquidity_baking.py::TestTrades::test_sell_tok Node is bootstrapped. -Estimated gas: 7014.174 units (will add 100 for safety) +Estimated gas: 7013.489 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[BLOCK_HASH]' @@ -14,7 +14,7 @@ This sequence of operations was run: From: [CONTRACT_HASH] Fee to the baker: ꜩ0.001057 Expected counter: [EXPECTED_COUNTER] - Gas limit: 7115 + Gas limit: 7114 Storage limit: 0 bytes Balance updates: [CONTRACT_HASH] ... -ꜩ0.001057 @@ -33,7 +33,7 @@ This sequence of operations was run: 0x01e927f00ef734dfc85919635e9afc9166c83ef9fc00 ; 0x0115eb0104481a6d7921160bc982c5e0a561cd8a3a00 } Storage size: 4633 bytes - Consumed gas: 1748.449 + Consumed gas: 1747.764 Internal operations: Internal Transaction: Amount: ꜩ0 -- GitLab