-
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
Runtime gas meter #2838
Runtime gas meter #2838
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2838 +/- ##
==========================================
+ Coverage 53.88% 53.92% +0.04%
==========================================
Files 308 308
Lines 100154 100479 +325
==========================================
+ Hits 53967 54186 +219
- Misses 46187 46293 +106 ☔ View full report in Codecov by Sentry. |
1ad1048
to
a28e64b
Compare
7dfa159
to
571dba2
Compare
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.
some comments
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.
lgtm
* origin/grarco/runtime-gas-meter: Test that native VPs correctly run out of gas Empty loop in out of gas unit tests Adds source for wasm gas costs Changelog #2838 Increases gas limits in unit tests Increases gas scale Gas metering in `PseudoExecutionContext` Updates gas costs Singlepass compiler for wasm benchmarks Iterations and improvements for wasm opcodes benchmarks Removes old comment Renames vp user benchmark Updates beatch size for benchmarks Fixes make clippy for benchmarks Higher resolution gas metering for masp Updates masp vp checks Removes testing dependency from the benchmarks crate Clippy + fmt Removes benchmark for vp validator Benchmarks for shielded actions Adds wasm opcodes benchmarks Changes docstrings for signature verification Adds unit tests for out of gas Gas for ibc tx and removes unused host fn for whitelisted gas Removes whitelisted gas and sets a constant for the runtime gas meter
* origin/grarco/runtime-gas-meter: Test that native VPs correctly run out of gas Empty loop in out of gas unit tests Adds source for wasm gas costs Changelog #2838 Increases gas limits in unit tests Increases gas scale Gas metering in `PseudoExecutionContext` Updates gas costs Singlepass compiler for wasm benchmarks Iterations and improvements for wasm opcodes benchmarks Removes old comment Renames vp user benchmark Updates beatch size for benchmarks Fixes make clippy for benchmarks Higher resolution gas metering for masp Updates masp vp checks Removes testing dependency from the benchmarks crate Clippy + fmt Removes benchmark for vp validator Benchmarks for shielded actions Adds wasm opcodes benchmarks Changes docstrings for signature verification Adds unit tests for out of gas Gas for ibc tx and removes unused host fn for whitelisted gas Removes whitelisted gas and sets a constant for the runtime gas meter # Conflicts: # crates/apps/src/lib/bench_utils.rs # crates/apps/src/lib/node/ledger/shell/finalize_block.rs # crates/benches/Cargo.toml # crates/benches/native_vps.rs # crates/benches/txs.rs # crates/core/Cargo.toml # crates/macros/src/lib.rs # crates/namada/Cargo.toml # crates/namada/src/ledger/protocol/mod.rs # crates/namada/src/vm/host_env.rs # crates/namada/src/vm/wasm/run.rs # crates/state/Cargo.toml # crates/test_utils/src/lib.rs # wasm/wasm_source/src/tx_ibc.rs # wasm_for_tests/tx_fail.wasm # wasm_for_tests/tx_memory_limit.wasm # wasm_for_tests/tx_mint_tokens.wasm # wasm_for_tests/tx_no_op.wasm # wasm_for_tests/tx_proposal_code.wasm # wasm_for_tests/tx_proposal_masp_reward.wasm # wasm_for_tests/tx_read_storage_key.wasm # wasm_for_tests/tx_write.wasm # wasm_for_tests/tx_write_storage_key.wasm # wasm_for_tests/vp_always_false.wasm # wasm_for_tests/vp_always_true.wasm # wasm_for_tests/vp_eval.wasm # wasm_for_tests/vp_memory_limit.wasm # wasm_for_tests/vp_read_storage_key.wasm # wasm_for_tests/wasm_source/Cargo.toml # wasm_for_tests/wasm_source/Makefile
Describe your changes
Closes #2816.
Closes #2674.
This PR:
vp_validator
(no longer existing)testing
feature from the benchmark crate which was pulling in some mock functions that should not be used in benchmarksConstantGasRules
with a custom one based on the benchmarksPseudoExecutionContext
SCALE
for the now increased gas costs to keep the average cost of a tx around 20_000 gas unitsThe runtime gas meter has the following drawbacks:
Indicate on which release or other PRs this topic is based on
v0.31.9
Checklist before merging to
draft