-
Notifications
You must be signed in to change notification settings - Fork 992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whitelist gas accounting #1242
Closed
Closed
Whitelist gas accounting #1242
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
685a815
Implements block gas
grarco 682d81b
Adds benchmarks
grarco 30f9590
Improves gas for native vps
grarco 0241b6f
Removes MASP shielded fees
grarco 0b906ef
Fixes gas for unit tests
grarco 964d224
Corrects gas in e2e tests
grarco 39493a5
Updates cargo lock for benchmarks
grarco 6b44bb2
Misc fixes to gas and checksum file
grarco 2384328
Misc fixes to docs and e2e tests
grarco 44cf55f
Fixes benchmarks
grarco b7bf157
Removes mock gas meter in tx execution
grarco 36d81b3
Optimizes gas accounting for tx hash
grarco 3da5e80
Optimizes vp gas metering
grarco 5b8e41d
Renames `vp_eval` parameters
grarco ec08858
Fixes unit tests and wrong error handling
grarco c2570bf
Short circuit vp evaluation on error
grarco 2165084
Refactors gas meters api into trait
grarco e1ac8d1
Moves compilation gas into `fetch_or_compile`
grarco 980ab09
Fixes e2e tests
grarco f02c6e7
Adjusts conditional compilation for fee payment
grarco 7b89045
Clippy + fmt
grarco 6478fc3
[ci] wasm checksums update
github-actions[bot] 6349f96
changelog: add #1242
grarco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- Implemented a first gas metering system based on the | ||
runtime cost of whitelisted transactions and VPs. | ||
([#1242](https://github.com/anoma/namada/pull/1242)) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ resolver = "2" | |
|
||
members = [ | ||
"apps", | ||
"benches", | ||
"core", | ||
"proof_of_stake", | ||
"shared", | ||
|
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This default for the
GasLimit
doesn't really have much sense given how different the costs for different txs will be and the lack of a refunding mechanism (at the moment). It's there to ease the tx submission process in testnets but it will probably be better to remove it in future PRs or even in this oneThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Does the client do gas estimation? A reasonable approach for now can be to estimate gas and add a little bit of a buffer on top, then set that as the gas limit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment I've added the possibility to dry-run the entire tx (wrapper + inner) to estimate the gas cost manually. Were you thinking about something that doesn't require an action from the user? Like the client automatically doing the estimation right before submitting a tx?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the latter - at least this should be possible as a default, which can be turned off by a flag manually specifying gas.