polymesh pr 99 + WASM host-function import diffing#101
Draft
gilescope wants to merge 12 commits into
Draft
Conversation
…hecking # Conflicts: # libs/substrate-differ/src/differs/reduced/calls/changes_comptible.rs # libs/substrate-differ/src/differs/reduced/calls/changes_require_txver_bump.rs # libs/substrate-differ/src/differs/reduced/diff_analyzer/compatible.rs
Detect runtime upgrades that add new WASM host imports — old node binaries that lack the corresponding host implementation will fail to execute the runtime. - wasm-testbed: parse the WASM ImportSection via wasmparser and expose WasmTestBed::imports() returning (module, name) pairs. - substrate-differ: new ReducedImport struct, ReducedRuntime carries a BTreeMap<String, ReducedImport> populated via with_imports(); the Comparable derive yields a ReducedRuntimeChange::Imports variant. - Diff analyzer: a new (Added) import marks the runtime incompatible (the node must support it); removed/changed are compatible and never affect tx_version or storage layout. - Display: print the import list and surface 'New host fn imports: N' in the summary alongside the existing compatibility/tx-bump/storage migration lines. Composes with PolymeshAssociation/subwasm#99 — orthogonal layer: that PR diffs metadata; this one diffs the WASM binary's import section.
|
Nice! I hadn't thought to also check host function imports. |
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.
This is the combination of polymesh's #99 + WASM host import diffing against latest main.