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

Update halo2-lib and add SDK #3

Merged
merged 33 commits into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
aebcefe
chore: add display feature to Cargo.toml
jonathanpwang Oct 20, 2022
5e88292
fix: change test data directory to ./data and give error message
jonathanpwang Oct 20, 2022
b0d0910
feat: add succinct_verify_or_dummy to allow flag to turn off verifica…
jonathanpwang Oct 21, 2022
916b29f
Rollback to pse halo2 and halo2wrong for first release (#5)
han0110 Oct 24, 2022
0fe63f8
chore: update dependencies with latest halo2_proofs
jonathanpwang Oct 25, 2022
4e8d9c2
add `serialize` feature to turn on/off vkey/pkey write
jonathanpwang Oct 25, 2022
577f283
feat: change `name` to function instead of const in `TargetCircuit`
jonathanpwang Oct 25, 2022
ce657ff
fix: `load_verify_circuit_degree` now takes in environmental variable
jonathanpwang Oct 25, 2022
2cd8b9d
Generalized `Halo2Loader` (#12)
han0110 Oct 28, 2022
70d6b73
feat: implement `IntegerInstructions` and `EccInstructions` traits for
jonathanpwang Oct 28, 2022
cf9d717
feat: implement `EncodeNative` and working example
jonathanpwang Oct 28, 2022
fdcc55c
feat: add example `recursion`
han0110 Oct 28, 2022
3864980
chore: update for compatibility with halo2-lib
jonathanpwang Nov 1, 2022
6778bfa
poseidon: switch to rate = 2, `t = 3` for faster proving time
jonathanpwang Nov 1, 2022
a690118
Merge remote-tracking branch 'upstream/main' into sync-with-halo2lib
jonathanpwang Nov 2, 2022
0abbc07
update: remove unnecessary trait `where` clause
jonathanpwang Nov 3, 2022
179a31a
feat: add example `recursion`
han0110 Oct 28, 2022
523da28
Merge remote-tracking branch 'han0110/feature/example-recursion' into…
jonathanpwang Nov 3, 2022
25dbaf5
General refactor for further integration (#13)
han0110 Nov 8, 2022
5c31088
feat: implement ipa pcs and accumulation (#14)
han0110 Nov 9, 2022
75f7532
feat: add example `recursion`
han0110 Oct 28, 2022
a50d7a1
wip: update to halo2-lib v0.2.0
jonathanpwang Nov 21, 2022
11906e4
Merge remote-tracking branch 'han0110/feature/example-recursion' into…
jonathanpwang Nov 22, 2022
f050966
wip: recursion example currently works if circuit does not use simple
jonathanpwang Nov 27, 2022
7212283
fix: got recursion example working with halo2-lib
jonathanpwang Nov 27, 2022
5b45acd
Merge branch 'sync-with-halo2lib' into axiom-sync
jonathanpwang Nov 30, 2022
8b2daae
feat: add `sdk` module for snark aggregation toolkit
jonathanpwang Dec 2, 2022
fc1b4f3
chore: move `aggregation` under `halo2` inside `sdk`
jonathanpwang Dec 2, 2022
c5f0486
Update `EvmLoader` to generate Yul code instead of bytecode (#15)
DoHoonKim8 Nov 17, 2022
888a916
feat: add `evm` module to `sdk` with evm proof and verifier functions
jonathanpwang Dec 4, 2022
71f2b6f
chore: update Cargo.toml
jonathanpwang Dec 6, 2022
b3ad21f
reorg: rename repo to snark-verifier
jonathanpwang Dec 15, 2022
1b0fe1b
Merge remote-tracking branch 'axiom/main' into axiom-sync
jonathanpwang Dec 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 52 additions & 61 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,61 +1,52 @@
[package]
name = "plonk_verifier"
version = "0.1.0"
edition = "2021"

[dependencies]
itertools = "0.10.3"
lazy_static = "1.4.0"
num-bigint = "0.4"
num-traits = "0.2"

rand = "0.8"
rand_chacha = "0.3.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
hex = "0.4.3"
ark-std = { version = "0.3", features = ["print-trace"] }

halo2_curves = { git = "https://github.com/privacy-scaling-explorations/halo2curves", tag = "0.2.1", package = "halo2curves" }

# system_halo2
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2", tag = "v2022_09_10", optional = true }

# loader_evm
ethereum_types = { package = "ethereum-types", version = "0.13.1", default-features = false, features = ["std"], optional = true }
sha3 = { version = "0.10.1", optional = true }
foundry_evm = { git = "https://github.com/jonathanpwang/foundry", package = "foundry-evm", branch = "fix/pin-revm-to-rev", optional = true }

# loader_halo2
halo2_base = { git = "ssh://github.com/axiom-crypto/halo2-lib-working.git", package = "halo2_base", default-features = false, optional = true }
halo2_ecc = { git = "ssh://github.com/axiom-crypto/halo2-lib-working.git", package = "halo2_ecc", default-features = false, optional = true }
poseidon = { git = "https://github.com/privacy-scaling-explorations/poseidon", branch = "padding", optional = true }

[dev-dependencies]
paste = "1.0.7"

# loader_evm
crossterm = { version = "0.22.1" }
tui = { version = "0.16.0", default-features = false, features = ["crossterm"] }

# zkevm
zkevm_circuit_benchmarks = {git = "https://github.com/privacy-scaling-explorations/zkevm-circuits.git", package = "circuit-benchmarks", features = ["benches"] }
zkevm_circuits = {git = "https://github.com/privacy-scaling-explorations/zkevm-circuits.git", package = "zkevm-circuits" }

[features]
default = ["loader_evm", "loader_halo2", "system_halo2"]
loader_evm = ["dep:ethereum_types", "dep:sha3", "dep:foundry_evm"]
loader_halo2 = ["dep:halo2_proofs", "dep:halo2_base", "halo2_ecc", "dep:poseidon"]
system_halo2 = ["dep:halo2_proofs"]
sanity_check = []

[patch."https://github.com/privacy-scaling-explorations/halo2"]
halo2_proofs = { git = "https://github.com/axiom-crypto/halo2.git", branch = "axiom/add-serialization", package = "halo2_proofs" }

[[example]]
name = "evm-verifier"
required-features = ["loader_evm", "system_halo2"]

[[example]]
name = "evm-verifier-with-accumulator"
required-features = ["loader_halo2", "loader_evm", "system_halo2"]
[workspace]
members = [
"snark-verifier",
"snark-verifier-sdk",
]

[profile.dev]
opt-level = 3

# Local "release" mode, more optimized than dev but faster to compile than release
[profile.local]
inherits = "dev"
opt-level = 3
# Set this to 1 or 2 to get more useful backtraces
debug = true
debug-assertions = false
panic = 'unwind'
# better recompile times
incremental = true
lto = "thin"
codegen-units = 16

[profile.release]
opt-level = 3
debug = false
debug-assertions = false
lto = "fat"
# codegen-units = 1
panic = "abort"
incremental = false

# For performance profiling
[profile.flamegraph]
inherits = "release"
debug = true

[patch."ssh://github.com/axiom-crypto/axiom-core-working.git"]
halo2-base = { path = "../axiom-core-working/halo2-lib/halo2-base" }
halo2-ecc = { path = "../axiom-core-working/halo2-lib/halo2-ecc" }

[patch."https://github.com/axiom-crypto/halo2.git"]
halo2_proofs = { path = "../halo2/halo2_proofs" }
halo2curves = { path = "../halo2/arithmetic/curves" }
poseidon = { path = "../halo2/primitives/poseidon" }

# patch for now because PSE/halo2 has not yet updated halo2curves version, unnecessary if halo2_proofs is using latest halo2curves with Fq12 public
[patch."https://github.com/privacy-scaling-explorations/halo2curves.git"]
halo2curves = { path = "../halo2/arithmetic/curves" }

# patch just because we cannot patch the same repo with different tag: serialization is already in latest PSE/halo2 but not in v2022_10_22
[patch."https://github.com/privacy-scaling-explorations/halo2.git"]
halo2_proofs = { git = "https://github.com/axiom-crypto/halo2.git", branch = "axiom/add-serialization" }
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# PLONK Verifier

Generic PLONK verifier.

## SRS

Note that if aggregating snarks with different `K` params size, you should generate the largest srs necessarily and then `downgrade` to the smaller param sizes so that the first two points are the same for all srs files.
Loading