diff --git a/src/proto_alpha/lib_protocol/sc_rollup_costs.ml b/src/proto_alpha/lib_protocol/sc_rollup_costs.ml index b8730fe59aa43edbb99f180e282af7a10b6f0fec..01c60b0c6e863fd21b61843f49955b12edd4db65 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_costs.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_costs.ml @@ -82,6 +82,10 @@ module Constants = struct (* Cost of serializing a nonce. The cost of serializing the index (an int32) is negligible. *) let cost_serialize_nonce = cost_serialize_operation_hash + + (* Set to [proof_size_coeff] in {!Tx_rollup_l2_verifier.verify_proof_model}. + This is an estimate to be updated when benchmarking is completed. *) + let cost_verify_output_proof_per_byte = S.safe_int 152 end (* We assume that the gas cost of adding messages [[ m_1; ... ; m_n]] at level @@ -155,3 +159,7 @@ let cost_check_dissection ~number_of_states ~tick_size ~hash_size = let open S_syntax in cost_search_in_tick_list number_of_states tick_size + (S.safe_int 2 * cost_compare hash_size hash_size) + +let cost_verify_output_proof ~bytes_len = + let open Saturation_repr in + S_syntax.(Constants.cost_verify_output_proof_per_byte * safe_int bytes_len) diff --git a/src/proto_alpha/lib_protocol/sc_rollup_costs.mli b/src/proto_alpha/lib_protocol/sc_rollup_costs.mli index f4c05fe05e46c4387efeda7c1d6c1237d4ec7693..69cdf0414bfef32873b6c18ec4f3fe913336b16b 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_costs.mli +++ b/src/proto_alpha/lib_protocol/sc_rollup_costs.mli @@ -88,3 +88,7 @@ val cost_hash_bytes : bytes_len:int -> Gas_limit_repr.cost [hash_size]. *) val cost_check_dissection : number_of_states:int -> tick_size:int -> hash_size:int -> Gas_limit_repr.cost + +(** [cost_verify_output_proof ~bytes_len] is the cost of verifying an output + proof of length [bytes_len]. *) +val cost_verify_output_proof : bytes_len:int -> Gas_limit_repr.cost diff --git a/src/proto_alpha/lib_protocol/sc_rollup_operations.ml b/src/proto_alpha/lib_protocol/sc_rollup_operations.ml index e1974fca88d4d3cd904317fd7dff9654b6c56301..317cb13503d5cec2ef7459384ab471639d30e16a 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_operations.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_operations.ml @@ -299,11 +299,12 @@ let validate_and_decode_output_proof ctxt ~cemented_commitment rollup let+ ctxt, kind = Sc_rollup.kind ctxt rollup in (ctxt, Sc_rollup.Kind.pvm_of kind) in + let output_proof_length = String.length output_proof in let*? ctxt = Gas.consume ctxt (Sc_rollup_costs.cost_deserialize_output_proof - ~bytes_len:(String.length output_proof)) + ~bytes_len:output_proof_length) in let*? output_proof = match @@ -323,6 +324,12 @@ let validate_and_decode_output_proof ctxt ~cemented_commitment rollup Sc_rollup.State_hash.(output_proof_state = compressed_state) Sc_rollup_invalid_output_proof in + (* Consume cost of output proof verification. *) + let*? ctxt = + Gas.consume + ctxt + (Sc_rollup_costs.cost_verify_output_proof ~bytes_len:output_proof_length) + in (* Verify that the proof is valid. *) let* () = let*! proof_is_valid = PVM.verify_output_proof output_proof in diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -aux- earliness- 0- external).out b/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -aux- earliness- 0- external).out index cc5c982703af229221d3f271e24e0260689112e9..02934d89c4493702b0167cdfc74b1dc9851f32b5 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -aux- earliness- 0- external).out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -aux- earliness- 0- external).out @@ -57,3 +57,45 @@ This sequence of operations was run: This smart contract rollup messages submission was successfully applied Consumed gas: 1000.086 + +./octez-client --wait none execute outbox message of sc rollup '[SC_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' for commitment hash '[SC_ROLLUP_COMMITMENT_HASH]' and output proof 0x030000b2d0a9d5f4403e869bc2c15974516c33a60fab97ba3221b6eded8c13665f81e1b2d0a9d5f4403e869bc2c15974516c33a60fab97ba3221b6eded8c13665f81e1900b626f6f745f736563746f72c8baff5f78423676a25d9cd27a412dd932327b9b3e1cc26e754a36410a5efbf7b404636f6465d0d3ba29c544461a2288af2c689a1e460b2194b7ca43d9119fd860a99ef9526c2f0d63757272656e745f6c6576656cc87c712a98763ef0f7dc84b32ccd664529f8870febc2cf5ebd08c9d8c53cd921eb116576616c756174696f6e5f726573756c74c8eda4dcfc891aa48bb021d3ed729b7efc072bfccb367c623f60ed227bc4de490518696e7465726e616c5f6d6573736167655f636f756e746572c863c8a7d7c1e23bed545e7630f6f7e90acb8530d993e5d2c2897fa63ac2f90aee0c6c657865725f627566666572c83d74bfd402a0ddcbb4191936d06a813faf4bb78074d99edea947dad189aeaacd0f6d6573736167655f636f756e746572c8fdba9c9eaf85805b298818a3a591547ee7ab9f0e8cb55dd8b535e20498fe1880086d65746164617461c8281aa0d07cc2e6d0380db2abd7a5d06b9d4a370e633cd45444bbd6a626d6c8c50c6e6578745f6d657373616765c8bf64cb3e98695617de52722a0f83ea006d66011d689999ce49cc1de2aeb57775066f7574707574810130c805639510aee988ab3152135cb7851c3eb7d8e19f3b0b5d61a761107951ded1dd0e6f75747075745f636f756e746572c8407f958990678e2e9fb06758bc6520dae46d838d39948a4c51a5b19bd079293d0c7061727365725f7374617465c8407f958990678e2e9fb06758bc6520dae46d838d39948a4c51a5b19bd079293d0e70617273696e675f726573756c74c8eda4dcfc891aa48bb021d3ed729b7efc072bfccb367c623f60ed227bc4de490505737461636bd0ea0b71581cf3b3263274851515fd06b757312f45494fc5ca9900bd8577e20fc306737461747573c8407f958990678e2e9fb06758bc6520dae46d838d39948a4c51a5b19bd079293d047469636bc8fe219ea929e0fea29ed62a0bf169f24116c16c2380a05e24ab744694a2104b46b2d0a9d5f4403e869bc2c15974516c33a60fab97ba3221b6eded8c13665f81e10000000500000000001f002501c00c5e4e94a48a49e267873112bbe3cf3373be5b0000000003617578 --burn-cap 10 +Node is bootstrapped. +Estimated gas: 5969.758 units (will add 100 for safety) +Estimated storage: 5 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + octez-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.001773 + Expected counter: 2 + Gas limit: 6070 + Storage limit: 25 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.001773 + payload fees(the block proposer) ....... +ꜩ0.001773 + Smart contract output message execution: + Address: [SC_ROLLUP_HASH] + Cemented commitment: [SC_ROLLUP_COMMITMENT_HASH] + This smart contract output message execution was successfully applied + Paid storage size diff: 5 bytes + Consumed gas: 4766.619 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.00125 + storage fees ........................... +ꜩ0.00125 + Internal operations: + Internal Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: aux + Parameter: 37 + This transaction was successfully applied + Updated storage: 37 + Storage size: 92 bytes + Consumed gas: 1203.139 + diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -aux- earliness- 0- internal).out b/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -aux- earliness- 0- internal).out index b87702ade564fc9c3bc1e81324f35333d8bd506b..9c017ccb7594560de69832321c1bfa23c8a85bbd 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -aux- earliness- 0- internal).out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -aux- earliness- 0- internal).out @@ -32,3 +32,45 @@ This sequence of operations was run: [PUBLIC_KEY_HASH] ... -ꜩ1.63 storage fees ........................... +ꜩ1.63 + +./octez-client --wait none execute outbox message of sc rollup '[SC_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' for commitment hash '[SC_ROLLUP_COMMITMENT_HASH]' and output proof 0x0300006f95ea5b3e9f70013edb89d9a39ee9666a8b8388d733f8ea1f7e3a119eb8c8de6f95ea5b3e9f70013edb89d9a39ee9666a8b8388d733f8ea1f7e3a119eb8c8de900b626f6f745f736563746f72c8baff5f78423676a25d9cd27a412dd932327b9b3e1cc26e754a36410a5efbf7b404636f6465d0d3ba29c544461a2288af2c689a1e460b2194b7ca43d9119fd860a99ef9526c2f0d63757272656e745f6c6576656cc8410f4b37e654840462790217e1c16d8e58eb3d00359ecf0354401d8c8235f187116576616c756174696f6e5f726573756c74c8eda4dcfc891aa48bb021d3ed729b7efc072bfccb367c623f60ed227bc4de490518696e7465726e616c5f6d6573736167655f636f756e746572c8a7ab892baf0a78f9dd880bfbc8dadfcc9aeef9dd1a96652f38678f48391698b00c6c657865725f627566666572c83d74bfd402a0ddcbb4191936d06a813faf4bb78074d99edea947dad189aeaacd0f6d6573736167655f636f756e746572c8fdba9c9eaf85805b298818a3a591547ee7ab9f0e8cb55dd8b535e20498fe1880086d65746164617461c8281aa0d07cc2e6d0380db2abd7a5d06b9d4a370e633cd45444bbd6a626d6c8c50c6e6578745f6d657373616765c8bf64cb3e98695617de52722a0f83ea006d66011d689999ce49cc1de2aeb57775066f7574707574810130c805639510aee988ab3152135cb7851c3eb7d8e19f3b0b5d61a761107951ded1dd0e6f75747075745f636f756e746572c8407f958990678e2e9fb06758bc6520dae46d838d39948a4c51a5b19bd079293d0c7061727365725f7374617465c8407f958990678e2e9fb06758bc6520dae46d838d39948a4c51a5b19bd079293d0e70617273696e675f726573756c74c8eda4dcfc891aa48bb021d3ed729b7efc072bfccb367c623f60ed227bc4de490505737461636bd0ea0b71581cf3b3263274851515fd06b757312f45494fc5ca9900bd8577e20fc306737461747573c8407f958990678e2e9fb06758bc6520dae46d838d39948a4c51a5b19bd079293d047469636bc871d82235ddfbecfdab79788934de4f5aa160db3449fec881b1b46f1c49e94aea6f95ea5b3e9f70013edb89d9a39ee9666a8b8388d733f8ea1f7e3a119eb8c8de0000000500000000001f002501c00c5e4e94a48a49e267873112bbe3cf3373be5b0000000003617578 --burn-cap 10 +Node is bootstrapped. +Estimated gas: 5969.758 units (will add 100 for safety) +Estimated storage: 5 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + octez-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.001773 + Expected counter: 1 + Gas limit: 6070 + Storage limit: 25 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.001773 + payload fees(the block proposer) ....... +ꜩ0.001773 + Smart contract output message execution: + Address: [SC_ROLLUP_HASH] + Cemented commitment: [SC_ROLLUP_COMMITMENT_HASH] + This smart contract output message execution was successfully applied + Paid storage size diff: 5 bytes + Consumed gas: 4766.619 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.00125 + storage fees ........................... +ꜩ0.00125 + Internal operations: + Internal Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: aux + Parameter: 37 + This transaction was successfully applied + Updated storage: 37 + Storage size: 92 bytes + Consumed gas: 1203.139 + diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -default- earliness- 0- external.out b/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -default- earliness- 0- external.out index c6c578bf19dc639f153f9d07f53ea84c8eaf71ce..ff5b8df80227147d6389b2fcac0f39e777e2c504 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -default- earliness- 0- external.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -default- earliness- 0- external.out @@ -57,3 +57,44 @@ This sequence of operations was run: This smart contract rollup messages submission was successfully applied Consumed gas: 1000.078 + +./octez-client --wait none execute outbox message of sc rollup '[SC_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' for commitment hash '[SC_ROLLUP_COMMITMENT_HASH]' and output proof 0x0300009344398412ac09ac71d5fc170c73d11224c00dc0f6ae32ec2d3258226e6ed7699344398412ac09ac71d5fc170c73d11224c00dc0f6ae32ec2d3258226e6ed769900b626f6f745f736563746f72c8baff5f78423676a25d9cd27a412dd932327b9b3e1cc26e754a36410a5efbf7b404636f6465d0d3ba29c544461a2288af2c689a1e460b2194b7ca43d9119fd860a99ef9526c2f0d63757272656e745f6c6576656cc87c712a98763ef0f7dc84b32ccd664529f8870febc2cf5ebd08c9d8c53cd921eb116576616c756174696f6e5f726573756c74c8eda4dcfc891aa48bb021d3ed729b7efc072bfccb367c623f60ed227bc4de490518696e7465726e616c5f6d6573736167655f636f756e746572c863c8a7d7c1e23bed545e7630f6f7e90acb8530d993e5d2c2897fa63ac2f90aee0c6c657865725f627566666572c8ebcbe14f4bd1a623638082a7369fb9c24714c53e015d73a5fdd522ee5693b2a60f6d6573736167655f636f756e746572c8fdba9c9eaf85805b298818a3a591547ee7ab9f0e8cb55dd8b535e20498fe1880086d65746164617461c8281aa0d07cc2e6d0380db2abd7a5d06b9d4a370e633cd45444bbd6a626d6c8c50c6e6578745f6d657373616765c819cbb1ddf1a55131aa082968983a53a26a420156102756154baa4617d937403c066f7574707574810130c8b3be8e119db56ecbdb098e21636b1e0d6f7429a633db34b47445364df8c39c0c0e6f75747075745f636f756e746572c8407f958990678e2e9fb06758bc6520dae46d838d39948a4c51a5b19bd079293d0c7061727365725f7374617465c8407f958990678e2e9fb06758bc6520dae46d838d39948a4c51a5b19bd079293d0e70617273696e675f726573756c74c8eda4dcfc891aa48bb021d3ed729b7efc072bfccb367c623f60ed227bc4de490505737461636bd0ea0b71581cf3b3263274851515fd06b757312f45494fc5ca9900bd8577e20fc306737461747573c8407f958990678e2e9fb06758bc6520dae46d838d39948a4c51a5b19bd079293d047469636bc86f98099c0f0a2145ae4e656e27896027066b88a4e4b9788b98eb4b8a87900f9e9344398412ac09ac71d5fc170c73d11224c00dc0f6ae32ec2d3258226e6ed76900000005000000000023002501c00c5e4e94a48a49e267873112bbe3cf3373be5b000000000764656661756c74 --burn-cap 10 +Node is bootstrapped. +Estimated gas: 5970.376 units (will add 100 for safety) +Estimated storage: 5 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + octez-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.001778 + Expected counter: 2 + Gas limit: 6071 + Storage limit: 25 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.001778 + payload fees(the block proposer) ....... +ꜩ0.001778 + Smart contract output message execution: + Address: [SC_ROLLUP_HASH] + Cemented commitment: [SC_ROLLUP_COMMITMENT_HASH] + This smart contract output message execution was successfully applied + Paid storage size diff: 5 bytes + Consumed gas: 4767.272 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.00125 + storage fees ........................... +ꜩ0.00125 + Internal operations: + Internal Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Parameter: 37 + This transaction was successfully applied + Updated storage: 37 + Storage size: 92 bytes + Consumed gas: 1203.104 + diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -default- earliness- 0- internal.out b/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -default- earliness- 0- internal.out index b87702ade564fc9c3bc1e81324f35333d8bd506b..9dbcb90f4ce354c87ef6b7e37b4911523bad62ff 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -default- earliness- 0- internal.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- arith - trigger exec output (entrypoint- -default- earliness- 0- internal.out @@ -32,3 +32,44 @@ This sequence of operations was run: [PUBLIC_KEY_HASH] ... -ꜩ1.63 storage fees ........................... +ꜩ1.63 + +./octez-client --wait none execute outbox message of sc rollup '[SC_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' for commitment hash '[SC_ROLLUP_COMMITMENT_HASH]' and output proof 0x030000b55f5b4da89a86f80fd80b7e165a257ae8b3e8f37532b4ade2f4e65301198beab55f5b4da89a86f80fd80b7e165a257ae8b3e8f37532b4ade2f4e65301198bea900b626f6f745f736563746f72c8baff5f78423676a25d9cd27a412dd932327b9b3e1cc26e754a36410a5efbf7b404636f6465d0d3ba29c544461a2288af2c689a1e460b2194b7ca43d9119fd860a99ef9526c2f0d63757272656e745f6c6576656cc8410f4b37e654840462790217e1c16d8e58eb3d00359ecf0354401d8c8235f187116576616c756174696f6e5f726573756c74c8eda4dcfc891aa48bb021d3ed729b7efc072bfccb367c623f60ed227bc4de490518696e7465726e616c5f6d6573736167655f636f756e746572c8a7ab892baf0a78f9dd880bfbc8dadfcc9aeef9dd1a96652f38678f48391698b00c6c657865725f627566666572c8ebcbe14f4bd1a623638082a7369fb9c24714c53e015d73a5fdd522ee5693b2a60f6d6573736167655f636f756e746572c8fdba9c9eaf85805b298818a3a591547ee7ab9f0e8cb55dd8b535e20498fe1880086d65746164617461c8281aa0d07cc2e6d0380db2abd7a5d06b9d4a370e633cd45444bbd6a626d6c8c50c6e6578745f6d657373616765c819cbb1ddf1a55131aa082968983a53a26a420156102756154baa4617d937403c066f7574707574810130c8b3be8e119db56ecbdb098e21636b1e0d6f7429a633db34b47445364df8c39c0c0e6f75747075745f636f756e746572c8407f958990678e2e9fb06758bc6520dae46d838d39948a4c51a5b19bd079293d0c7061727365725f7374617465c8407f958990678e2e9fb06758bc6520dae46d838d39948a4c51a5b19bd079293d0e70617273696e675f726573756c74c8eda4dcfc891aa48bb021d3ed729b7efc072bfccb367c623f60ed227bc4de490505737461636bd0ea0b71581cf3b3263274851515fd06b757312f45494fc5ca9900bd8577e20fc306737461747573c8407f958990678e2e9fb06758bc6520dae46d838d39948a4c51a5b19bd079293d047469636bc84da71fef29734064c1c1cd85c351d1d7773ac9b436eb6a1711b46c51604c81f0b55f5b4da89a86f80fd80b7e165a257ae8b3e8f37532b4ade2f4e65301198bea00000005000000000023002501c00c5e4e94a48a49e267873112bbe3cf3373be5b000000000764656661756c74 --burn-cap 10 +Node is bootstrapped. +Estimated gas: 5970.376 units (will add 100 for safety) +Estimated storage: 5 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + octez-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.001778 + Expected counter: 1 + Gas limit: 6071 + Storage limit: 25 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.001778 + payload fees(the block proposer) ....... +ꜩ0.001778 + Smart contract output message execution: + Address: [SC_ROLLUP_HASH] + Cemented commitment: [SC_ROLLUP_COMMITMENT_HASH] + This smart contract output message execution was successfully applied + Paid storage size diff: 5 bytes + Consumed gas: 4767.272 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.00125 + storage fees ........................... +ꜩ0.00125 + Internal operations: + Internal Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Parameter: 37 + This transaction was successfully applied + Updated storage: 37 + Storage size: 92 bytes + Consumed gas: 1203.104 + diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -aux- earliness- 0- externa.out b/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -aux- earliness- 0- externa.out index 004fbdb49f8a77d7404ee24c969f8adc3140c843..f95b149f68e656cbb58d1d30d642ea248bee42c0 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -aux- earliness- 0- externa.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -aux- earliness- 0- externa.out @@ -57,3 +57,45 @@ This sequence of operations was run: This smart contract rollup messages submission was successfully applied Consumed gas: 1000.072 + +./octez-client --wait none execute outbox message of sc rollup '[SC_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' for commitment hash '[SC_ROLLUP_COMMITMENT_HASH]' and output proof 0x030000df7a0dc733d77a423e511e487f85e4bfe75c5a3e267ef50aebfa1436ccbe4c14df7a0dc733d77a423e511e487f85e4bfe75c5a3e267ef50aebfa1436ccbe4c14860764757261626c65d06a45fd83f11d79731ea11e298fb020b68bbb5b770c1b991cd03e72d64e18eb220370766dd0cbd48d020fa6649223c1596e09675166c7725ed3a72f755a73fb4209d83d214c03746167c00800000004536f6d650576616c7565810370766d8107627566666572738205696e707574820468656164c00100066c656e677468c00100066f75747075748308636f6e74656e7473890130820468656164c00100066c656e677468c001000131820468656164c00100066c656e677468c001000132820468656164c00100066c656e677468c001000133820468656164c00100066c656e677468c001000134820468656164c00100066c656e677468c0010001358308636f6e74656e7473810130c02800000024000000001f002501c00c5e4e94a48a49e267873112bbe3cf3373be5b00000000036175780468656164c00100066c656e677468c001010136820468656164c00100066c656e677468c001000137820468656164c00100066c656e677468c001000138820468656164c00100066c656e677468c001000468656164c00400000000066c656e677468c00400000009047761736dd0411548aca38800ec15c66c2821e0b870407e83da9552b9555bfa84ac5e473ebf0c7761736d2d76657273696f6ec81cf6aea5145d63f931339b1cfae95f1a749637f32dcdfbf2464f417076dfc63bdf7a0dc733d77a423e511e487f85e4bfe75c5a3e267ef50aebfa1436ccbe4c140000000500000000001f002501c00c5e4e94a48a49e267873112bbe3cf3373be5b0000000003617578 --burn-cap 10 +Node is bootstrapped. +Estimated gas: 5932.434 units (will add 100 for safety) +Estimated storage: 5 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + octez-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.001553 + Expected counter: 2 + Gas limit: 6033 + Storage limit: 25 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.001553 + payload fees(the block proposer) ....... +ꜩ0.001553 + Smart contract output message execution: + Address: [SC_ROLLUP_HASH] + Cemented commitment: [SC_ROLLUP_COMMITMENT_HASH] + This smart contract output message execution was successfully applied + Paid storage size diff: 5 bytes + Consumed gas: 4729.295 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.00125 + storage fees ........................... +ꜩ0.00125 + Internal operations: + Internal Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: aux + Parameter: 37 + This transaction was successfully applied + Updated storage: 37 + Storage size: 92 bytes + Consumed gas: 1203.139 + diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -aux- earliness- 0- interna.out b/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -aux- earliness- 0- interna.out index 40d794fb5990a994668b693a47d2775651238feb..6d20a2c23ec662cdcb1037e2057533e20d16dcee 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -aux- earliness- 0- interna.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -aux- earliness- 0- interna.out @@ -32,3 +32,45 @@ This sequence of operations was run: [PUBLIC_KEY_HASH] ... -ꜩ1.63 storage fees ........................... +ꜩ1.63 + +./octez-client --wait none execute outbox message of sc rollup '[SC_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' for commitment hash '[SC_ROLLUP_COMMITMENT_HASH]' and output proof 0x030000321a1c4c5dcf30ee1d23b35f7bede279045b219b58fc0a5ff4b412eb1d56c8fd321a1c4c5dcf30ee1d23b35f7bede279045b219b58fc0a5ff4b412eb1d56c8fd860764757261626c65d06a45fd83f11d79731ea11e298fb020b68bbb5b770c1b991cd03e72d64e18eb220370766dd0ca81d5c12f8150b6fd0e7f020e95b4b92d5abc7807b4ea68b3c7238dd957d7c303746167c00800000004536f6d650576616c7565810370766d8107627566666572738205696e707574820468656164c00100066c656e677468c00100066f75747075748308636f6e74656e7473870130820468656164c00100066c656e677468c001000131820468656164c00100066c656e677468c001000132820468656164c00100066c656e677468c001000133820468656164c00100066c656e677468c001000134820468656164c00100066c656e677468c0010001358308636f6e74656e7473810130c02800000024000000001f002501c00c5e4e94a48a49e267873112bbe3cf3373be5b00000000036175780468656164c00100066c656e677468c001010136820468656164c00100066c656e677468c001000468656164c00400000000066c656e677468c00400000007047761736dd0c62e2a9d04a0b33c0e8db451fa7c474569e030ce8f74dab83742fd6672d2c6960c7761736d2d76657273696f6ec81cf6aea5145d63f931339b1cfae95f1a749637f32dcdfbf2464f417076dfc63b321a1c4c5dcf30ee1d23b35f7bede279045b219b58fc0a5ff4b412eb1d56c8fd0000000500000000001f002501c00c5e4e94a48a49e267873112bbe3cf3373be5b0000000003617578 --burn-cap 10 +Node is bootstrapped. +Estimated gas: 5925.210 units (will add 100 for safety) +Estimated storage: 5 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + octez-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.00151 + Expected counter: 1 + Gas limit: 6026 + Storage limit: 25 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.00151 + payload fees(the block proposer) ....... +ꜩ0.00151 + Smart contract output message execution: + Address: [SC_ROLLUP_HASH] + Cemented commitment: [SC_ROLLUP_COMMITMENT_HASH] + This smart contract output message execution was successfully applied + Paid storage size diff: 5 bytes + Consumed gas: 4722.071 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.00125 + storage fees ........................... +ꜩ0.00125 + Internal operations: + Internal Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: aux + Parameter: 37 + This transaction was successfully applied + Updated storage: 37 + Storage size: 92 bytes + Consumed gas: 1203.139 + diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -default- earliness- 0- ext.out b/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -default- earliness- 0- ext.out index bcea7c841741dde91ec84bf2402a34c8c4ebcf92..6075e24d5f2de48d23d0387302734008a4cda76e 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -default- earliness- 0- ext.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -default- earliness- 0- ext.out @@ -57,3 +57,44 @@ This sequence of operations was run: This smart contract rollup messages submission was successfully applied Consumed gas: 1000.080 + +./octez-client --wait none execute outbox message of sc rollup '[SC_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' for commitment hash '[SC_ROLLUP_COMMITMENT_HASH]' and output proof 0x030000c0279af67a2e622e11e1e0b8f2ae49969945b976bda1bfe9b4f21ef670679484c0279af67a2e622e11e1e0b8f2ae49969945b976bda1bfe9b4f21ef670679484860764757261626c65d06a45fd83f11d79731ea11e298fb020b68bbb5b770c1b991cd03e72d64e18eb220370766dd0cbd48d020fa6649223c1596e09675166c7725ed3a72f755a73fb4209d83d214c03746167c00800000004536f6d650576616c7565810370766d8107627566666572738205696e707574820468656164c00100066c656e677468c00100066f75747075748308636f6e74656e7473890130820468656164c00100066c656e677468c001000131820468656164c00100066c656e677468c001000132820468656164c00100066c656e677468c001000133820468656164c00100066c656e677468c001000134820468656164c00100066c656e677468c0010001358308636f6e74656e7473810130c02c000000280000000023002501c00c5e4e94a48a49e267873112bbe3cf3373be5b000000000764656661756c740468656164c00100066c656e677468c001010136820468656164c00100066c656e677468c001000137820468656164c00100066c656e677468c001000138820468656164c00100066c656e677468c001000468656164c00400000000066c656e677468c00400000009047761736dd0411548aca38800ec15c66c2821e0b870407e83da9552b9555bfa84ac5e473ebf0c7761736d2d76657273696f6ec81cf6aea5145d63f931339b1cfae95f1a749637f32dcdfbf2464f417076dfc63bc0279af67a2e622e11e1e0b8f2ae49969945b976bda1bfe9b4f21ef67067948400000005000000000023002501c00c5e4e94a48a49e267873112bbe3cf3373be5b000000000764656661756c74 --burn-cap 10 +Node is bootstrapped. +Estimated gas: 5933.740 units (will add 100 for safety) +Estimated storage: 5 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + octez-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.001561 + Expected counter: 2 + Gas limit: 6034 + Storage limit: 25 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.001561 + payload fees(the block proposer) ....... +ꜩ0.001561 + Smart contract output message execution: + Address: [SC_ROLLUP_HASH] + Cemented commitment: [SC_ROLLUP_COMMITMENT_HASH] + This smart contract output message execution was successfully applied + Paid storage size diff: 5 bytes + Consumed gas: 4730.636 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.00125 + storage fees ........................... +ꜩ0.00125 + Internal operations: + Internal Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Parameter: 37 + This transaction was successfully applied + Updated storage: 37 + Storage size: 92 bytes + Consumed gas: 1203.104 + diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -default- earliness- 0- int.out b/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -default- earliness- 0- int.out index 40d794fb5990a994668b693a47d2775651238feb..2e2f6e7eb72fb75a82e8937788cf532f4088d730 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -default- earliness- 0- int.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - trigger exec output (entrypoint- -default- earliness- 0- int.out @@ -32,3 +32,44 @@ This sequence of operations was run: [PUBLIC_KEY_HASH] ... -ꜩ1.63 storage fees ........................... +ꜩ1.63 + +./octez-client --wait none execute outbox message of sc rollup '[SC_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' for commitment hash '[SC_ROLLUP_COMMITMENT_HASH]' and output proof 0x030000f79b67b2930e5aeee7ded7b17538803b173c5d59b9465a8b4b04b3f0924d8bb3f79b67b2930e5aeee7ded7b17538803b173c5d59b9465a8b4b04b3f0924d8bb3860764757261626c65d06a45fd83f11d79731ea11e298fb020b68bbb5b770c1b991cd03e72d64e18eb220370766dd0ca81d5c12f8150b6fd0e7f020e95b4b92d5abc7807b4ea68b3c7238dd957d7c303746167c00800000004536f6d650576616c7565810370766d8107627566666572738205696e707574820468656164c00100066c656e677468c00100066f75747075748308636f6e74656e7473870130820468656164c00100066c656e677468c001000131820468656164c00100066c656e677468c001000132820468656164c00100066c656e677468c001000133820468656164c00100066c656e677468c001000134820468656164c00100066c656e677468c0010001358308636f6e74656e7473810130c02c000000280000000023002501c00c5e4e94a48a49e267873112bbe3cf3373be5b000000000764656661756c740468656164c00100066c656e677468c001010136820468656164c00100066c656e677468c001000468656164c00400000000066c656e677468c00400000007047761736dd0c62e2a9d04a0b33c0e8db451fa7c474569e030ce8f74dab83742fd6672d2c6960c7761736d2d76657273696f6ec81cf6aea5145d63f931339b1cfae95f1a749637f32dcdfbf2464f417076dfc63bf79b67b2930e5aeee7ded7b17538803b173c5d59b9465a8b4b04b3f0924d8bb300000005000000000023002501c00c5e4e94a48a49e267873112bbe3cf3373be5b000000000764656661756c74 --burn-cap 10 +Node is bootstrapped. +Estimated gas: 5926.516 units (will add 100 for safety) +Estimated storage: 5 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + octez-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.001518 + Expected counter: 1 + Gas limit: 6027 + Storage limit: 25 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.001518 + payload fees(the block proposer) ....... +ꜩ0.001518 + Smart contract output message execution: + Address: [SC_ROLLUP_HASH] + Cemented commitment: [SC_ROLLUP_COMMITMENT_HASH] + This smart contract output message execution was successfully applied + Paid storage size diff: 5 bytes + Consumed gas: 4723.412 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.00125 + storage fees ........................... +ꜩ0.00125 + Internal operations: + Internal Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Parameter: 37 + This transaction was successfully applied + Updated storage: 37 + Storage size: 92 bytes + Consumed gas: 1203.104 + diff --git a/tezt/tests/sc_rollup.ml b/tezt/tests/sc_rollup.ml index 87c2492da7690bd0d6e8799ee3ffb27289dfb4fe..45868e8c37a000f050183b4175b5a5325246bae7 100644 --- a/tezt/tests/sc_rollup.ml +++ b/tezt/tests/sc_rollup.ml @@ -3392,6 +3392,7 @@ let test_outbox_message_generic ?regression ?expected_error ~earliness | Some {commitment_hash; proof}, None -> let*! () = Client.Sc_rollup.execute_outbox_message + ~hooks ~burn_cap:(Tez.of_int 10) ~rollup:sc_rollup ~src:src2