Skip to content

Commit

Permalink
chore: keep old behavior of EccInstructions::sum_with_const (#63)
Browse files Browse the repository at this point in the history
* chore: keep old behavior of `EccInstructions::sum_with_const`

After axiom-crypto/halo2-lib#244 the
`EccChip::sum` was renamed `EccChip::sum_unsafe`. We update the naming
to still use the `sum_unsafe` function so that snark verifier circuits
do not change.

* chore: fix clap version to prevent rust version issues

* ci: install `svm-rs` with its `Cargo.lock` (#48)

* chore: use solc-select instead of svm to avoid rust version issues

---------

Co-authored-by: Han <[email protected]>
  • Loading branch information
jonathanpwang and han0110 authored Apr 27, 2024
1 parent 9003c27 commit e327c46
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 9 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@ jobs:
with:
cache-on-failure: true

- name: Install solc
run: (hash svm 2>/dev/null || cargo install --version 0.2.23 svm-rs) && svm install 0.8.19 && solc --version
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install solc-select and solc
run: |
pip3 install solc-select
solc-select use 0.8.19 --always-install
- name: Run test
run: cargo test --all --features "revm" -- --nocapture
Expand Down
75 changes: 69 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions snark-verifier-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ criterion-macro = "0.4"
# loader_evm
crossterm = { version = "0.25" }
ratatui = { version = "0.24", default-features = false, features = ["crossterm"] }
clap = "=4.4" # fix clap version to prevent requiring rustc 1.74
clap_builder = "=4.4"
clap_lex = "=0.6.0"

[features]
default = ["loader_halo2", "loader_evm", "halo2-axiom", "halo2-base/jemallocator", "display"]
Expand Down
2 changes: 1 addition & 1 deletion snark-verifier/src/loader/halo2/shim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ mod halo2_lib {
let constant = EccInstructions::assign_constant(self, ctx, constant);
Some(constant)
};
self.sum::<C>(
self.sum_unsafe::<C>(
ctx.main(),
constant.into_iter().chain(values.iter().map(|v| v.deref().clone())),
)
Expand Down

0 comments on commit e327c46

Please sign in to comment.