build(deps): bump wasm-instrument from 0.2.0 to 0.4.0#6526
Open
dependabot[bot] wants to merge 1 commit intomasterfrom
Open
build(deps): bump wasm-instrument from 0.2.0 to 0.4.0#6526dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot[bot] wants to merge 1 commit intomasterfrom
Conversation
61cafaa to
86baa99
Compare
lutter
approved these changes
Apr 22, 2026
Bumps [wasm-instrument](https://github.com/paritytech/wasm-instrument) from 0.2.0 to 0.4.0. - [Changelog](https://github.com/paritytech/wasm-instrument/blob/master/CHANGELOG.md) - [Commits](paritytech/wasm-instrument@0.2.0...v0.4.0) The new version switches the per-block gas counter and the `memory.grow` charge helper from 32-bit to 64-bit arithmetic. Our call sites were adjusted accordingly: - `runtime/wasm/src/mapping.rs`: use the new `host_function::Injector` backend API for `gas_metering::inject`. - `runtime/wasm/src/gas_rules.rs`: implement the new `call_per_local_cost()` method, returning 0 so locals initialization remains free. - `runtime/wasm/src/module/instance.rs`: the injected `gas` host function now receives an `i64` cost argument instead of `i32`; update the Rust handler signature from `u32` to `u64`. The 64-bit arithmetic in the grow-counter helper also fixes an overflow that was previously under-charging gas for large `memory.grow` calls. In 0.2.0 the helper multiplied the page count by `gas_per_page` (~50.8M in our rules) using `I32Mul`, which wrapped mod 2^32 for any grow larger than ~84 pages (~5.25 MiB). 0.4.0 extends the page count to `i64` before the multiplication, so the full cost is charged. The two `yaml_parsing_v0_0_*` tests in `runtime/test/src/test.rs` pin exact `gas_used` totals. The YAML input `"x".repeat(10_000_001)` causes three large grow events, so each test reports exactly `3 * 2^32 = 12,884,901,888` more gas than before. Update the expected values to match the now-correct totals. Note for downstream: this is a semantic change in gas accounting for subgraph handlers that grow memory past ~5.25 MiB in a single call. Such handlers will consume more gas than they did on 0.2.0; this may warrant a release note or API-version gating, which is out of scope for this dependency bump. Signed-off-by: dependabot[bot] <support@github.com>
86baa99 to
d6725e9
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bumps wasm-instrument from 0.2.0 to 0.4.0.
Changelog
Sourced from wasm-instrument's changelog.
Commits
6a79d1dCharge gas for local variables on the callee side (#38)b517010Update wasmparser requirement from 0.94 to 0.95 (#37)a4dde28Add new gas metering method: mutable global + localgasfunction (#34)90cb67dUpdate wasmparser requirement from 0.92 to 0.94 (#36)4c1d47aUpdate wasmparser requirement from 0.90 to 0.92 (#33)840af19Update criterion requirement from 0.3 to 0.4 (#31)0229f86Useu64for gas counter (#30)c2db4b8Update wasmparser requirement from 0.89 to 0.90 (#28)1ade161Update wasmparser requirement from 0.88 to 0.89 (#27)25ff883Update wasmparser requirement from 0.87 to 0.88 (#26)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)