Skip to content

Commit

Permalink
changes needed for snark verifier (scroll-tech#454)
Browse files Browse the repository at this point in the history
* towards goerli

* the failed test

* fix: pass chain_id as parameter to tx table

* + bump poseidon-circuit
+ update bytecode hash spec(with 31 bytes in a field)

* add batch chain id

* fix EndInnerBlock

* add poseidon rows

* default keccak row changed to 20

* [fix] update ecdsa circuit w.r.t. latest halo2-lib stable version

* [chore] update cargo.toml

* [fix] bug in two phase ecdsa circuit

* [fix] update k=19 so it matches scroll-zkevm setting

* [minor] allow max num tx = 100

* this is fine

* this is buggy

* clean up

* [fix] temp set MAX_SIG=32 for v0.2

* [feat] Remove main gate dependency for ecdsa's keccak lookup

* fix conflicts

* revert useless changes

* disable jemalloc

---------

Co-authored-by: kunxian xia <[email protected]>
Co-authored-by: Ho Vei <[email protected]>
Co-authored-by: zhenfei <[email protected]>
  • Loading branch information
4 people authored Apr 9, 2023
1 parent ad03460 commit 89a382c
Showing 9 changed files with 527 additions and 373 deletions.
167 changes: 91 additions & 76 deletions Cargo.lock

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

8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -15,7 +15,13 @@ members = [
]

[patch."https://github.com/privacy-scaling-explorations/halo2.git"]
halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "v0.3" }
halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "v0.4" }
[patch."https://github.com/privacy-scaling-explorations/poseidon.git"]
poseidon = { git = "https://github.com/scroll-tech/poseidon.git", branch = "scroll-dev-0220" }
[patch."https://github.com/privacy-scaling-explorations/halo2curves.git"]
halo2curves = { git = "https://github.com/scroll-tech/halo2curves.git", branch = "0.3.1-derive-serde" }
[patch."https://github.com/privacy-scaling-explorations/halo2wrong.git"]
maingate = { git = "https://github.com/scroll-tech/halo2wrong", branch = "halo2-ecc-snark-verifier-0323" }

# Definition of benchmarks profile to use.
[profile.bench]
4 changes: 2 additions & 2 deletions zkevm-circuits/Cargo.toml
Original file line number Diff line number Diff line change
@@ -29,8 +29,8 @@ keccak256 = { path = "../keccak256"}
log = "0.4"
env_logger = "0.9"

halo2_base = { git = "https://github.com/scroll-tech/halo2-lib", branch = "halo2-ecc-ecdsa-0129", default-features = false }
halo2_ecc = { git = "https://github.com/scroll-tech/halo2-lib", branch = "halo2-ecc-ecdsa-0129", default-features = false }
halo2-base = { git = "https://github.com/scroll-tech/halo2-lib", branch = "halo2-ecc-snark-verifier-0323", default-features=false, features=["halo2-pse","display"] }
halo2-ecc = { git = "https://github.com/scroll-tech/halo2-lib", branch = "halo2-ecc-snark-verifier-0323", default-features=false, features=["halo2-pse","display"] }

maingate = { git = "https://github.com/privacy-scaling-explorations/halo2wrong", tag = "v2023_02_02" }

2 changes: 1 addition & 1 deletion zkevm-circuits/src/state_circuit/test.rs
Original file line number Diff line number Diff line change
@@ -1076,7 +1076,7 @@ fn bad_initial_tx_receipt_value() {
);
}

fn prover(rows: Vec<Rw>, overrides: HashMap<(AdviceColumn, isize), Fr>) -> MockProver<Fr> {
fn prover(rows: Vec<Rw>, overrides: HashMap<(AdviceColumn, isize), Fr>) -> MockProver<'static, Fr> {
let updates = MptUpdates::mock_from(&rows);
let circuit = StateCircuit::<Fr> {
rows,
Loading

0 comments on commit 89a382c

Please sign in to comment.