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

wasm: switch to cranelift compiler #3183

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

tzemanovic
Copy link
Member

@tzemanovic tzemanovic commented May 7, 2024

Describe your changes

Taking advantage of tx allowlist that prohibit execution of untrusted wasm, we can switch to cranelift compiler to improve wasm performance.

TODOs:

  • use singlepass compiler for dry-run RPC (needed for gov proposals? tbc.) or disable dry-run RPC by default unless explicitly enabled in the config

Indicate on which release or other PRs this topic is based on

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

Copy link

codecov bot commented May 7, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 59.40%. Comparing base (9d4de02) to head (a37a2a5).
Report is 12 commits behind head on main.

Files Patch % Lines
...tes/namada/src/vm/wasm/compilation_cache/common.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3183      +/-   ##
==========================================
- Coverage   59.40%   59.40%   -0.01%     
==========================================
  Files         298      298              
  Lines       92326    92326              
==========================================
- Hits        54849    54848       -1     
- Misses      37477    37478       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -406,13 +406,13 @@ impl Display for WatBuilder {
}
}

// Use singlepass compiler (the same one used in protocol) to prevent
// Use Cranelift compiler (the same one used in protocol) to prevent
Copy link
Contributor

Choose a reason for hiding this comment

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

cranelift might actually do a couple of optimizations; nothing too aggressive, but probably enough to optimize things like loop {}

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.

2 participants