-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose
GasData
through executor (#21244)
## Description Changed executor API to take `GasData` instead of gas payments only (`Vec<ObjectRef>`). That allows us to expose more info about gas and sponsor to the `TxContext` in execution. I wondered whether the info about sponsor and more (e.g. gas price and budget) should be computed on the client of the executor (e.g. in `authority.rs` and I had the code initially that way) but it makes for a more intrusive change. Passing the `GasData` allows the executor to compute everything is needed for execution with a more stable API. Thoughts welcome. This PR should change nothing in the current implementation and though `sponsor` and `gas_price` are exposed to the `TxContext` (the Rust side) they are unused at the moment (in this PR, later PRs will use that). `authority::dev_inspect_transaction_block` has changed a bit to make it more readable for me. I believe it is correct but please @emmazzz @amnn @jordanjennings-mysten take a look, I may have missed something. The replay data structure is changed to add the sponsor, however we are not changing the serialization at the moment and old serialized blobs should still work (thanks @tzakian for the suggestion). ## Test plan Existing tests as this changes nothing --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] gRPC: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK:
- Loading branch information
1 parent
9623f84
commit 447b0a3
Showing
21 changed files
with
182 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.