-
Notifications
You must be signed in to change notification settings - Fork 133
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
chore: update wasmtime #1993
chore: update wasmtime #1993
Conversation
Needed to upgrade wasmtime, and now's a reasonable time to do this.
alloc_strat_cfg.total_core_instances(instance_count); | ||
alloc_strat_cfg.total_memories(instance_count); | ||
alloc_strat_cfg.max_memories_per_module(1); | ||
alloc_strat_cfg.total_tables(instance_count); |
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.
We don't yet have an explicit limit on the number of table elements. We do limit it based on the available memory, but we likely need a max table elements limit defined in a FIP (not an issue right now, but a potential issue in the future.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1993 +/- ##
==========================================
+ Coverage 75.53% 75.59% +0.06%
==========================================
Files 158 157 -1
Lines 15600 15741 +141
==========================================
+ Hits 11784 11900 +116
- Misses 3816 3841 +25
|
5b8c775
to
f46c17c
Compare
@@ -209,12 +223,17 @@ fn wasmtime_config(ec: &EngineConfig) -> anyhow::Result<wasmtime::Config> { | |||
c.cranelift_debug_verifier(false); | |||
c.native_unwind_info(false); | |||
c.wasm_backtrace(false); | |||
c.wasm_backtrace_details(WasmBacktraceDetails::Disable); |
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.
likely unnecessary, but I might as well.
This seems to sync mainnet. |
I'm currently looking at this, but dong some due diligence on how we currently configure and run it and what the delta is between wasmtime 12 and 17. |
// simd isn't supported in wasm-instrument, but if we add support there, we can probably enable | ||
// this. | ||
// Note: stack limits may need adjusting after this is enabled | ||
c.wasm_simd(false); |
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.
This is a bit sad; I haven't looked at wasm-instrument yet but this shouldn't be a big deal to enable should it? just lots of instructions and everything at 128 bits.
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.
It wouldn't be a huge deal, we just kept it disabled out of safety and haven't had the chance to test and benchmark it.
We seem to be doing explicit config in here, reiterating all of the available and relevant options and setting custom defaults. If that's the aim, there's some that are not set here that we might want to consider?
|
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.
👍 seems like the big ticket items in the update are memory related and the default enablement of proposed extensions (that all complicate things for our use case!) that have been already explicitly disabled here.
It's mostly to ensure that features we don't want remain off.
Good idea, implemented.
This shouldn't affect consensus, so I'm going to leave it at the default for now. Although we should consider 4GiB for performance.
I think we can ignore these if we force static memory. |
Tested on mainnet and it still works. |
No description provided.