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

Upgrade to wasmer 4.3 #64

Merged
merged 24 commits into from
Jul 6, 2024
Merged

Upgrade to wasmer 4.3 #64

merged 24 commits into from
Jul 6, 2024

Conversation

martyall
Copy link
Contributor

@martyall martyall commented Jul 4, 2024

What Changed

This looks worse than it is, and most of the lines are coming from the Cargo.lock file. The main changes are:

  • upgrade wasmer dep from 2.3 to 4.3
  • upgrade min rustc version to 1.74
  • added WitnessCalculator::new_from_wasm constructor

These changes only affect witness generation using the wasm solver.

Details

The public interface is the same as before. The wasmer upgrades necessitated boilerplate changes. The high level is that any wasm module function call now takes the Store as it's first argument, so there are a lot of changes to thread that value everywhere. Also there's a slightly different way to read a wasm instance's memory which gets rid of the

        let buf = unsafe { self.memory.data_unchecked() };

pattern that was used everywhere.

Additionally I added a constructor WitnessCalculator::new_from_wasm that allows you to pass in an existing wasm instance and reuse it for multiple calls to witness generation. This is particularly useful for folding schemes where you would otherwise waste a lot of resources creating and destroying wasm instances -- something I have already experienced.

@Pratyush Pratyush merged commit 967add4 into arkworks-rs:master Jul 6, 2024
2 checks passed
@martyall martyall mentioned this pull request Jul 7, 2024
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