Skip to content
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

Use wasmparser instead of parity-wasm #1786

Merged
merged 11 commits into from
Jul 26, 2023
Merged

Use wasmparser instead of parity-wasm #1786

merged 11 commits into from
Jul 26, 2023

Conversation

chipshort
Copy link
Collaborator

closes #1735
I ported our validation code over to the wasmparser version reexported by wasmer.
Some of the errors have changed slightly because they are now thrown by wasmparser.

I am somewhat unsure about what WasmFeatures we want to have here.
I set them a little more restrictive than what wasmer has (e.g. no simd, though we catch those in the gatekeeper anyways). This might allow some cases that were previously forbidden because of parity-wasm (e.g. bulk_memory or multi_value)

@chipshort chipshort changed the base branch from release/1.4 to main July 24, 2023 08:00
Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff. I like this much more than the first iteration. Very clean and straight forward.

packages/vm/src/compatibility.rs Show resolved Hide resolved
packages/vm/src/compatibility.rs Outdated Show resolved Hide resolved
packages/vm/src/compatibility.rs Outdated Show resolved Hide resolved
multi_memory: false,
memory64: false,
..Default::default()
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. During parsing we can be a bit more open wrt. Wasm features/extensions. They will be disallowed by the middleware.

packages/vm/src/parsed_wasm.rs Show resolved Hide resolved
Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this deserves a CHANGELOG entry. But otherwise than that LGTM.

@chipshort chipshort merged commit 3cdb420 into main Jul 26, 2023
3 checks passed
@chipshort chipshort deleted the 1735-wasmparser branch July 26, 2023 08:44
loloicci added a commit to loloicci/line-cosmwasm that referenced this pull request Feb 6, 2024
This fix Finschia#338.
And, this will be replaced with wasmparser in feature version.
(CosmWasm/cosmwasm#1786)
loloicci added a commit to loloicci/line-cosmwasm that referenced this pull request Feb 6, 2024
This fix Finschia#338.
And, this will be replaced with wasmparser in feature version.
(CosmWasm/cosmwasm#1786)
loloicci added a commit to Finschia/cosmwasm that referenced this pull request Feb 7, 2024
* fix: enable sign ext

This fix #338.
And, this will be replaced with wasmparser in feature version.
(CosmWasm/cosmwasm#1786)

* Test contract compiled with Rust 1.70.0

* chore: update some contract's lock files

* chore: update some contract's lock files

---------

Co-authored-by: Simon Warta <simon@warta.it>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace parity-wasm with wasmparser for static checks
2 participants