diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index fa8724503ab30632631130b5d0935ff8ca526da2..b20038c59801cd6cb39297b31f12f6de068118ab 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -1970,7 +1970,8 @@ module Tx_rollup_commitment : sig Tx_rollup_state.t -> Signature.public_key_hash -> Full.t -> - (context * Tx_rollup_state.t) tzresult Lwt.t + (context * Tx_rollup_state.t * Signature.public_key_hash option) tzresult + Lwt.t val find : context -> @@ -2090,6 +2091,7 @@ module Tx_rollup_errors : sig | No_uncommitted_inbox | No_commitment_to_finalize | No_commitment_to_remove + | Invalid_committer | Commitment_does_not_exist of Tx_rollup_level.t | Wrong_predecessor_hash of { provided : Tx_rollup_commitment_hash.t option; diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index 40e78a02f6faa5ae465cf11fe9bde60b37fafd32..04159696ab52d6271be8cbfad2db36392d6371e5 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -1551,13 +1551,30 @@ let apply_external_manager_operation_content : else return (ctxt, []) ) >>=? fun (ctxt, balance_updates) -> Tx_rollup_commitment.add_commitment ctxt tx_rollup state source commitment - >>=? fun (ctxt, state) -> + >>=? fun (ctxt, state, to_slash) -> + (match to_slash with + | Some pkh -> + let committer = Contract.implicit_contract pkh in + Tx_rollup_commitment.slash_bond ctxt tx_rollup pkh + >>=? fun (ctxt, slashed) -> + if slashed then + let bid = Bond_id.Tx_rollup_bond_id tx_rollup in + Token.balance ctxt (`Frozen_bonds (committer, bid)) + >>=? fun (ctxt, burn) -> + Token.transfer + ctxt + (`Frozen_bonds (committer, bid)) + `Tx_rollup_rejection_punishments + burn + else return (ctxt, []) + | None -> return (ctxt, [])) + >>=? fun (ctxt, burn_update) -> Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> let result = Tx_rollup_commit_result { consumed_gas = Gas.consumed ~since:before_operation ~until:ctxt; - balance_updates; + balance_updates = burn_update @ balance_updates; } in return (ctxt, result, []) diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_tx_rollup.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_tx_rollup.ml index d36ac8c72f81e82c7726a4431d5d4dbe7d106d2b..ff6387b20c7a160fd5b7ff78140d0998763c14a0 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_tx_rollup.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_tx_rollup.ml @@ -3244,27 +3244,30 @@ module Rejection = struct ] end -(** [test_state] tests some edge cases in state management around - rejecting commitments. *) -let test_state () = - context_init1 () >>=? fun (b, account1) -> - originate b account1 >>=? fun (b, tx_rollup) -> - (* let pkh = is_implicit_exn account1 in *) - let contents = "bogus" in - let (message, _) = Tx_rollup_message.make_batch contents in - let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in - (match Tx_rollup_inbox.Merkle.compute_path [message_hash] 0 with - | Ok message_path -> return message_path - | _ -> assert false) - >>=? fun message_path -> - let inbox_hash = Tx_rollup_inbox.Merkle.merklize_list [message_hash] in +module Single_message_inbox = struct + let contents = "bogus" - let submit b = - Op.tx_rollup_submit_batch (B b) account1 tx_rollup contents + let (message, _) = Tx_rollup_message.make_batch contents + + let message_hash = Tx_rollup_message_hash.hash_uncarbonated message + + let message_path = + match Tx_rollup_inbox.Merkle.compute_path [message_hash] 0 with + | Ok message_path -> message_path + | _ -> raise (Invalid_argument "Single_message_inbox.message_path") + + let inbox_hash = Tx_rollup_inbox.Merkle.merklize_list [message_hash] + + let submit b tx_rollup account = + Op.tx_rollup_submit_batch (B b) account tx_rollup contents >>=? fun operation -> Block.bake b ~operation - in - let reject ?expect_failure b level commitment = + let reject ?expect_failure b tx_rollup account level commitment = + Format.printf + "Rejecting level %a (%s)\n" + Tx_rollup_level.pp + level + (if Option.is_some expect_failure then "x" else "√") ; l2_parameters (B b) >>=? fun l2_parameters -> Rejection.valid_empty_proof l2_parameters >>= fun proof -> let (message_result_hash, message_result_path) = @@ -3272,7 +3275,7 @@ let test_state () = in Op.tx_rollup_reject (B b) - account1 + account tx_rollup level message @@ -3287,27 +3290,80 @@ let test_state () = Incremental.begin_construction b >>=? fun i -> Incremental.add_operation i operation ?expect_failure >>=? fun i -> Incremental.finalize_block i - in + let make_commit predecessor_commit messages = + let level = + Option.fold + ~none:Tx_rollup_level.root + ~some:(fun (x : 'a Tx_rollup_commitment.template) -> + Tx_rollup_level.succ x.level) + predecessor_commit + in + let predecessor = + Option.map + (fun x -> Tx_rollup_commitment.(Compact.hash @@ Full.compact x)) + predecessor_commit + in + Tx_rollup_commitment. + {level; messages; predecessor; inbox_merkle_root = inbox_hash} + + let wrong_commit ?predecessor_commit () = + make_commit predecessor_commit [Tx_rollup_message_result_hash.zero] + + let correct_commit ?predecessor_commit () = + make_commit + predecessor_commit + [ + Tx_rollup_message_result_hash.hash_uncarbonated + Rejection.previous_message_result; + ] + + let commit ?expect_failure b tx_rollup account commit = + Format.printf + "Commiting for level %a (%s)\n" + Tx_rollup_level.pp + commit.Tx_rollup_commitment.level + (if Option.is_some expect_failure then "x" else "√") ; + Incremental.begin_construction b >>=? fun i -> + Op.tx_rollup_commit (B b) account tx_rollup commit >>=? fun operation -> + Incremental.add_operation i operation ?expect_failure >>=? fun i -> + Incremental.finalize_block i +end + +(** [test_state] tests some edge cases in state management around + rejecting commitments. *) +let test_state () = + let open Single_message_inbox in + context_init2 () >>=? fun (b, account1, account2) -> + originate b account1 >>=? fun (b, tx_rollup) -> (* Submit bogus message three time to have three inboxes *) - submit b >>=? fun b -> - submit b >>=? fun b -> - submit b >>=? fun b -> + submit b tx_rollup account1 >>=? fun b -> + submit b tx_rollup account1 >>=? fun b -> + submit b tx_rollup account1 >>=? fun b -> + (* + Inboxes: [ ] - [ ] - [ ] + Commits: + *) Context.Tx_rollup.state (B b) tx_rollup >>=? fun initial_state -> (* Commit to the first inbox with an incorrect commitment *) - let commit1 = - Tx_rollup_commitment. - { - level = Tx_rollup_level.root; - messages = [Tx_rollup_message_result_hash.zero]; - predecessor = None; - inbox_merkle_root = inbox_hash; - } - in - Op.tx_rollup_commit (B b) account1 tx_rollup commit1 >>=? fun operation -> - Block.bake b ~operation >>=? fun b -> + let commit1 = wrong_commit () in + commit b tx_rollup account1 commit1 >>=? fun b -> + (* + Inboxes: [ ] - [ ] - [ ] + Commits: [A1] + *) + let commit2 = wrong_commit ~predecessor_commit:commit1 () in + commit b tx_rollup account2 commit2 >>=? fun b -> + (* + Inboxes: [ ] - [ ] - [ ] + Commits: [A1] [A2] + *) (* Reject the commitment *) - reject b Tx_rollup_level.root commit1 >>=? fun b -> + reject b tx_rollup account1 Tx_rollup_level.root commit1 >>=? fun b -> + (* + Inboxes: [ ] - [ ] - [ ] + Commits: + *) (* Check that we went back to the initial state *) Context.Tx_rollup.state (B b) tx_rollup >>=? fun state_after_reject -> Alcotest.( @@ -3320,24 +3376,44 @@ let test_state () = assert ( Tx_rollup_state.Internal_for_tests.get_commitments_watermark state_after_reject - = Some Tx_rollup_level.root) ; - (* Commit an incorrect commitment again *) - Op.tx_rollup_commit (B b) account1 tx_rollup commit1 >>=? fun operation -> - Block.bake b ~operation >>=? fun b -> - (* Commit a second time *) - let commit2 = - { - commit1 with - level = Tx_rollup_level.succ commit1.level; - predecessor = - Some Tx_rollup_commitment.(Compact.hash @@ Full.compact commit1); - } - in - Op.tx_rollup_commit (B b) account1 tx_rollup commit2 >>=? fun operation -> - Block.bake b ~operation >>=? fun b -> + = Some Tx_rollup_level.(succ root)) ; + (* Show that you cannot commit with [account1] again *) + commit + b + tx_rollup + account1 + commit1 + ~expect_failure:(check_proto_error Tx_rollup_errors.Invalid_committer) + >>=? fun b -> + (* Commit an incorrect commitment again. *) + commit b tx_rollup account2 commit1 >>=? fun b -> + (* + Inboxes: [ ] - [ ] - [ ] + Commits: [A2] + *) + Context.Contract.balance_and_frozen_bonds (B b) account2 + >>=? fun before_slashing -> + let commit2 = wrong_commit ~predecessor_commit:commit1 () in + commit b tx_rollup account1 commit2 >>=? fun b -> + Context.get_constants (B b) >>=? fun constants -> + Assert.balance_was_debited + ~loc:__LOC__ + (B b) + account2 + before_slashing + constants.parametric.tx_rollup_commitment_bond + >>=? fun () -> + (* + Inboxes: [ ] - [ ] - [ ] + Commits: [A2] [A1] + *) (* Reject the first commitment *) - reject b Tx_rollup_level.root commit1 >>=? fun b -> + reject b tx_rollup account2 Tx_rollup_level.root commit1 >>=? fun b -> (* Check that we went back to the initial state *) + (* + Inboxes: [ ] - [ ] - [ ] + Commits: + *) Context.Tx_rollup.state (B b) tx_rollup >>=? fun state_after_reject -> Alcotest.( check @@ -3347,25 +3423,18 @@ let test_state () = (Tx_rollup_state.Internal_for_tests.reset_commitments_watermark state_after_reject)) ; (* Commit twice *) - let commit1 = - Tx_rollup_commitment. - { - commit1 with - messages = - [ - Tx_rollup_message_result_hash.hash_uncarbonated - Rejection.previous_message_result; - ]; - } - in - let commit2 = - Tx_rollup_commitment. - {commit2 with predecessor = Some (Compact.hash @@ Full.compact commit1)} - in - Op.tx_rollup_commit (B b) account1 tx_rollup commit1 >>=? fun operation -> - Block.bake b ~operation >>=? fun b -> - Op.tx_rollup_commit (B b) account1 tx_rollup commit2 >>=? fun operation -> - Block.bake b ~operation >>=? fun b -> + let commit1 = correct_commit () in + let commit2 = wrong_commit ~predecessor_commit:commit1 () in + commit b tx_rollup account1 commit1 >>=? fun b -> + (* + Inboxes: [ ] - [ ] - [ ] + Commits: [A1] + *) + commit b tx_rollup account2 commit2 >>=? fun b -> + (* + Inboxes: [ ] - [ ] - [ ] + Commits: [A1] [A2] + *) (* committing empty blocks then finalizing *) Block.bake b ~operations:[] >>=? fun b -> Block.bake b ~operations:[] >>=? fun b -> @@ -3375,6 +3444,8 @@ let test_state () = (* Check we cannot finalize root anymore *) reject b + tx_rollup + account2 Tx_rollup_level.root commit1 ~expect_failure: @@ -3383,7 +3454,7 @@ let test_state () = | _ -> false)) >>=? fun b -> (* We can reject level 1 *) - reject b Tx_rollup_level.(succ root) commit2 >>=? fun b -> + reject b tx_rollup account2 Tx_rollup_level.(succ root) commit2 >>=? fun b -> (* There is no commitment to finalize anymore *) Block.bake b ~operations:[] >>=? fun b -> Block.bake b ~operations:[] >>=? fun b -> @@ -3403,24 +3474,13 @@ let test_state () = when rejecting commitment whose predecessor has already been deleted. *) let test_state_with_deleted () = + let open Single_message_inbox in context_init1 () >>=? fun (b, account1) -> originate b account1 >>=? fun (b, tx_rollup) -> - let contents = "bogus" in - let (message, _) = Tx_rollup_message.make_batch contents in - let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in - (match Tx_rollup_inbox.Merkle.compute_path [message_hash] 0 with - | Ok message_path -> return message_path - | _ -> assert false) - >>=? fun message_path -> - let inbox_hash = Tx_rollup_inbox.Merkle.merklize_list [message_hash] in - let submit b = - Op.tx_rollup_submit_batch (B b) account1 tx_rollup contents - >>=? fun operation -> Block.bake b ~operation - in (* Create three inboxes *) - submit b >>=? fun b -> - submit b >>=? fun b -> - submit b >>=? fun b -> + submit b tx_rollup account1 >>=? fun b -> + submit b tx_rollup account1 >>=? fun b -> + submit b tx_rollup account1 >>=? fun b -> (* Commit to level 0 *) let commit0 = Tx_rollup_commitment. @@ -3462,32 +3522,8 @@ let test_state_with_deleted () = Incremental.begin_construction b >>=? fun i -> Incremental.add_operation i operation >>=? fun i -> Incremental.finalize_block i >>=? fun b -> - (* Reject *) - let reject ?expect_failure b level commitment = - l2_parameters (B b) >>=? fun l2_parameters -> - Rejection.valid_empty_proof l2_parameters >>= fun proof -> - let (message_result_hash, message_result_path) = - Rejection.make_rejection_param commitment ~index:0 - in - Op.tx_rollup_reject - (B b) - account1 - tx_rollup - level - message - ~message_position:0 - ~message_path - ~message_result_hash - ~message_result_path - ~proof - ~previous_message_result:Rejection.previous_message_result - ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path - >>=? fun operation -> - Incremental.begin_construction b >>=? fun i -> - Incremental.add_operation i operation ?expect_failure >>=? fun i -> - Incremental.finalize_block i - in - reject b commit1.level commit1 >>=? fun b -> + (* Reject level 1, it works *) + reject b tx_rollup account1 commit1.level commit1 >>=? fun b -> ignore b ; return_unit diff --git a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml index ca12748bf2f8bd5826822aca0d9afea317d653fc..641b33cb61bb235bc44eb42dda02322e0a19f63c 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml @@ -218,6 +218,16 @@ let add_commitment ctxt tx_rollup state pkh commitment = >>=? fun (ctxt, inbox) -> check_commitment_batches_and_merkle_root ctxt state inbox commitment >>=? fun (ctxt, state) -> + (* De we need to slash someone? *) + Storage.Tx_rollup.Commitment.find (ctxt, tx_rollup) commitment.level + >>=? fun (ctxt, invalid_commitment) -> + Option.map_e + (fun x -> + let to_slash = x.Submitted_commitment.committer in + error_when Signature.Public_key_hash.(pkh = to_slash) Invalid_committer + >>? fun () -> ok to_slash) + invalid_commitment + >>?= fun to_slash -> (* Everything has been sorted out, let’s update the storage *) Tx_rollup_gas.consume_compact_commitment_cost ctxt inbox.inbox_length >>?= fun ctxt -> @@ -242,7 +252,7 @@ let add_commitment ctxt tx_rollup state pkh commitment = commitment_hash >>?= fun state -> adjust_commitments_count ctxt tx_rollup pkh ~dir:`Incr >>=? fun ctxt -> - return (ctxt, state) + return (ctxt, state, to_slash) let pending_bonded_commitments : Raw_context.t -> diff --git a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli index 87c9a5c71bb1d4afbf0e2e526cd6ba9c060a401e..d273649533974c10a6dcb5cd42ac90730e3d623b 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli @@ -38,13 +38,19 @@ val check_message_result : Raw_context.t tzresult (** [add_commitment context tx_rollup contract commitment] adds a - commitment to a rollup. It returns the new context, and the new - state. + commitment to a rollup. It returns the new context, the new state, + and the committer of the previous commitment stored for this + level if any. + + In case this committer exists, then it means its bond needs to be + slashed. This function returns the errors {ul {li [Level_already_has_commitment] iff there is already a - commitment at this level.} + valid commitment ({i i.e.}, not orphan) at this level.} + {li [Invalid_committer] iff an orphan commitment from the same + committer already is in the storage.} {li [Missing_commitment_predecessor] iff the predecessor does not match the already-stored predecessor commitment.} {li [Wrong_commitment_predecessor_level] iff there is no @@ -59,7 +65,9 @@ val add_commitment : Tx_rollup_state_repr.t -> Signature.Public_key_hash.t -> Tx_rollup_commitment_repr.Full.t -> - (Raw_context.t * Tx_rollup_state_repr.t) tzresult Lwt.t + (Raw_context.t * Tx_rollup_state_repr.t * Signature.public_key_hash option) + tzresult + Lwt.t (** [remove_bond context state tx_rollup contract] removes the bond for an implicit contract. This will fail if either the bond does not exist, diff --git a/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml index 016dbc8f0970e962e37b56f6aa4e91e2a666dd37..3b6d1b0aa0a80e9927d93914b5591b1686b60ad2 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml @@ -73,6 +73,7 @@ type error += | Withdraw_already_consumed | Withdrawals_invalid_path | Withdrawals_already_dispatched + | Invalid_committer | Commitment_bond_negative of int | Cannot_reject_level of { provided : Tx_rollup_level_repr.t; @@ -511,6 +512,18 @@ let () = Data_encoding.unit (function Withdraw_already_consumed -> Some () | _ -> None) (fun () -> Withdraw_already_consumed) ; + (* Invalid_committer *) + register_error_kind + `Temporary + ~id:"tx_rollup_invalid_committer" + ~title:"Committer cannot propose a commitment for this level" + ~description: + "The committer is trying to propose a commitment, but their bond is \ + about to be slashed because a commitment they authored will be \ + overwritten." + Data_encoding.unit + (function Invalid_committer -> Some () | _ -> None) + (fun () -> Invalid_committer) ; register_error_kind `Permanent ~id:"tx_rollup_commitment_bond_negative" diff --git a/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out b/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out index e6a15bf12303a7cb347a782d9a08fcb9f4ad1965..ca235c85e471e05592f7899df3f73e2003d74a83 100644 --- a/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out +++ b/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out @@ -58,7 +58,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup commitment 0 '[TX_ROLLUP_INBOX_HASH]' '[TX_ROLLUP_MESSAGE_RESULT_HASH]' to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 3453.146 units (will add 100 for safety) +Estimated gas: 3663.146 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -69,20 +69,20 @@ 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.000673 + Fee to the baker: ꜩ0.000694 Expected counter: 3 - Gas limit: 3554 + Gas limit: 3764 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000673 - payload fees(the block proposer) ....... +ꜩ0.000673 + [PUBLIC_KEY_HASH] ... -ꜩ0.000694 + payload fees(the block proposer) ....... +ꜩ0.000694 Tx rollup commitment:[TX_ROLLUP_HASH], commitment 0 : messages = [TX_ROLLUP_MESSAGE_RESULT_HASH] predecessor for inbox with merkle root [TX_ROLLUP_INBOX_HASH] From: [PUBLIC_KEY_HASH] This tx rollup commit operation was successfully applied Balance updates: [PUBLIC_KEY_HASH] ....................................................... -ꜩ10000 Frozen_bonds([PUBLIC_KEY_HASH],[TX_ROLLUP_HASH]) ... +ꜩ10000 - Consumed gas: 3453.146 + Consumed gas: 3663.146 ./tezos-client --wait none submit tx rollup finalize commitment to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' diff --git a/tezt/_regressions/tx_rollup_rpc_commitment.out b/tezt/_regressions/tx_rollup_rpc_commitment.out index 7409f94035cce092067dd2713d6e7963620b2112..bf2d3cdc2faf2af6e6c0c31c4433d2b8f21e81ab 100644 --- a/tezt/_regressions/tx_rollup_rpc_commitment.out +++ b/tezt/_regressions/tx_rollup_rpc_commitment.out @@ -58,7 +58,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup commitment 0 '[TX_ROLLUP_INBOX_HASH]' '[TX_ROLLUP_MESSAGE_RESULT_HASH]' to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 3453.146 units (will add 100 for safety) +Estimated gas: 3663.146 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -69,20 +69,20 @@ 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.000673 + Fee to the baker: ꜩ0.000694 Expected counter: 3 - Gas limit: 3554 + Gas limit: 3764 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000673 - payload fees(the block proposer) ....... +ꜩ0.000673 + [PUBLIC_KEY_HASH] ... -ꜩ0.000694 + payload fees(the block proposer) ....... +ꜩ0.000694 Tx rollup commitment:[TX_ROLLUP_HASH], commitment 0 : messages = [TX_ROLLUP_MESSAGE_RESULT_HASH] predecessor for inbox with merkle root [TX_ROLLUP_INBOX_HASH] From: [PUBLIC_KEY_HASH] This tx rollup commit operation was successfully applied Balance updates: [PUBLIC_KEY_HASH] ....................................................... -ꜩ10000 Frozen_bonds([PUBLIC_KEY_HASH],[TX_ROLLUP_HASH]) ... +ꜩ10000 - Consumed gas: 3453.146 + Consumed gas: 3663.146 ./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/commitment/0' diff --git a/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out b/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out index 5cdfb5ed7fbbc1f3a040e31194cfe82124e56909..9650080464f5edfd4d6ecd06262eda98acae3b66 100644 --- a/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out +++ b/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out @@ -58,7 +58,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup commitment 0 '[TX_ROLLUP_INBOX_HASH]' '[TX_ROLLUP_MESSAGE_RESULT_HASH]' to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 3453.146 units (will add 100 for safety) +Estimated gas: 3663.146 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -69,20 +69,20 @@ 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.000673 + Fee to the baker: ꜩ0.000694 Expected counter: 3 - Gas limit: 3554 + Gas limit: 3764 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000673 - payload fees(the block proposer) ....... +ꜩ0.000673 + [PUBLIC_KEY_HASH] ... -ꜩ0.000694 + payload fees(the block proposer) ....... +ꜩ0.000694 Tx rollup commitment:[TX_ROLLUP_HASH], commitment 0 : messages = [TX_ROLLUP_MESSAGE_RESULT_HASH] predecessor for inbox with merkle root [TX_ROLLUP_INBOX_HASH] From: [PUBLIC_KEY_HASH] This tx rollup commit operation was successfully applied Balance updates: [PUBLIC_KEY_HASH] ....................................................... -ꜩ10000 Frozen_bonds([PUBLIC_KEY_HASH],[TX_ROLLUP_HASH]) ... +ꜩ10000 - Consumed gas: 3453.146 + Consumed gas: 3663.146 ./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/pending_bonded_commitments/[PUBLIC_KEY_HASH]'