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

Sync with release v0.4.1-rc #220

Merged
merged 120 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
282ee8e
fix: change all `1` to `1u64` to prevent unexpected overflow (#72)
jonathanpwang Jun 3, 2023
8b9bdc2
[Fix] Panic when dealing with identity point (#71)
jonathanpwang Jun 6, 2023
05cfc1c
fix: redundant check in `ec_sub_unequal`
jonathanpwang Jun 7, 2023
0be26d4
Add SafeType (#26)
nyunyunyunyu May 23, 2023
d3ed3a9
feat(CI): switch to larger runner
jonathanpwang Jun 9, 2023
e4b956b
fix(builder): handle empty ctx with only equality constraints
jonathanpwang Jun 9, 2023
5293793
feat: add SafeAddress and SafeUint160 (#85)
PatStiles Jun 14, 2023
ca8e11c
Release 0.3.0 (#86)
jonathanpwang Jun 20, 2023
4060f2a
chore: fix halo2_proofs_axiom SHA commit
jonathanpwang Jun 20, 2023
f6b22ab
Merge release v0.3.0 into develop (#90)
jonathanpwang Jul 7, 2023
da451da
feat: `FpChip::range_check` now works with `max_bits < n * (k-1)` (#91)
jonathanpwang Jul 7, 2023
70c5cc0
fix(test): zkevm-keccak test should have `first_pass = SKIP_FIRST_PAS…
jonathanpwang Jul 20, 2023
08a16ce
Feat: test suite (#92)
jonathanpwang Jul 20, 2023
d1beb92
chore: make `bit_length` const function
jonathanpwang Jul 21, 2023
160f503
feat: add debugging functions (#99)
jonathanpwang Jul 26, 2023
081d475
chore: remove cfg(test) for debug functions
jonathanpwang Jul 26, 2023
2b3dd5d
feat(halo2-base): add `GateChip::pow_var` (#103)
jonathanpwang Aug 6, 2023
0b16812
Use halo2curves v0.4.0 and ff v0.13 (#107)
jonathanpwang Aug 15, 2023
3408b7a
Add `sub_mul` to GateInstructions (#102)
mmagician Aug 8, 2023
a62ae5d
fix(test): `select_from_idx` wasn't calling the right function (#105)
mmagician Aug 9, 2023
7100c23
chore: add back RangeCircuitBuilder::config (#111)
jonathanpwang Aug 17, 2023
49aeedd
fix: `RangeCircuitBuilder::config` remember `lookup_bits`
jonathanpwang Aug 17, 2023
a7b5433
[Feat] Add Poseidon Hasher Chip (#110)
nyunyunyunyu Aug 17, 2023
f724c9b
feat: add VariableByteArray (#88)
PatStiles Aug 18, 2023
3bacff7
chore: reduce CI real prover load
jonathanpwang Aug 18, 2023
cd9b6a4
Rename PoseidonHasherChip to PoseidonHasher (#113)
nyunyunyunyu Aug 18, 2023
25e211a
chore(safe_types): add conversion `SafeType` to/from `FixLenBytes`
jonathanpwang Aug 21, 2023
b58046c
chore(safe_type): add `unsafe_to_safe_type` unsafe conversion fn
jonathanpwang Aug 21, 2023
204a699
feat: add `select_array_by_indicator` to `GateInstructions` (#115)
jonathanpwang Aug 21, 2023
1c33fbc
cleanup: use test-utils for benching (#112)
jonathanpwang Aug 22, 2023
83ca65e
fix(safe_types): `VarLenBytes` should allow `len == MAX_LEN` (#117)
jonathanpwang Aug 22, 2023
7b23747
[feat] Add Poseidon Chip (#114)
nyunyunyunyu Aug 22, 2023
9798c85
[chore] Reorg Folder Structure of hashes/zkevm (#118)
nyunyunyunyu Aug 22, 2023
9fac2a8
[fix] CI for zkevm hashes (#119)
nyunyunyunyu Aug 23, 2023
154cd8c
[chore] Split keccak implementation into multiple files (#120)
nyunyunyunyu Aug 23, 2023
89da366
feat: keccak constant visibility changes (#121)
MonkeyKing-1 Aug 24, 2023
eb4fe65
[feat] Keccak Raw Output (#122)
nyunyunyunyu Aug 27, 2023
15bca77
Virtual region managers and dynamic lookup support (#123)
jonathanpwang Aug 27, 2023
f4c7e2a
Use `raw_assign_{advice,fixed}` in keccak (#125)
jonathanpwang Aug 28, 2023
7831b00
[feat] PoseidonHasher supports multiple inputs in compact format (#127)
nyunyunyunyu Aug 28, 2023
7bdf089
[feat] Expose Keccack Raw Inputs in Bytes instead of Input RLCs (#124)
nyunyunyunyu Aug 29, 2023
d07b0d4
Bump `zkevm-hashes` to v0.1.4
jonathanpwang Aug 29, 2023
6c80289
chore: clippy fix
jonathanpwang Aug 29, 2023
f2cf3e8
Generic vertical gate assignment (#129)
jonathanpwang Aug 29, 2023
be52d1d
Add `deep_clone` to `BaseCircuitBuilder` (#131)
jonathanpwang Sep 1, 2023
edd239f
fix: `SingleCorePhaseManager` should not create thread in constructor
jonathanpwang Sep 2, 2023
f39fef3
chore: make `new_context` public
jonathanpwang Sep 3, 2023
608b8f2
Convenience functions and fixes for multi-phase (#133)
jonathanpwang Sep 4, 2023
2b03c17
chore: add `BaseCircuitBuilder::set_k` fn
jonathanpwang Sep 5, 2023
64c8123
fix: `CopyConstraintManager::clear` was dropping
jonathanpwang Sep 5, 2023
04a40d4
feat: impl `From<SafeByte>` for `AssignedValue`
jonathanpwang Sep 5, 2023
671f0cc
chore(poseidon): add `derive` statements
jonathanpwang Sep 5, 2023
d27e46a
fix(copy_constraints): backend permutation argument depends on order
jonathanpwang Sep 6, 2023
a1fec64
feat: add `left_pad` functions for var length arrays (#137)
jonathanpwang Sep 6, 2023
72b53bf
chore: use `PrimeField` for `OptimizedPoseidonSpec` (#139)
jonathanpwang Sep 8, 2023
0acc05a
chore: add getter functions to Poseidon spec (#140)
jonathanpwang Sep 8, 2023
61fda9d
feat: use `(TypeId, usize)` instead of `usize` for lookup tag (#142)
jonathanpwang Sep 9, 2023
58155d7
chore: add `ContextTag` type alias
jonathanpwang Sep 9, 2023
3a35050
feat(base): add `GateInstructions::inner_product_left` function (#143)
jonathanpwang Sep 9, 2023
9377d90
[feat] Keccak Coprocessor Leaf Circuit (#130)
nyunyunyunyu Sep 9, 2023
54044c9
[feat] App Circuit Utils for Keccak Coprocessor (#141)
nyunyunyunyu Sep 9, 2023
14bec5a
[chore] Fix fmt (#144)
nyunyunyunyu Sep 10, 2023
c2a9341
chore: add misc utility functions (#146)
jonathanpwang Sep 10, 2023
482bed6
feat(keccak): add `ingestion` module for Rust native input formatting…
jonathanpwang Sep 10, 2023
41ea795
chore(keccak): use `snark-verifier` native Poseidon for encoding (#148)
jonathanpwang Sep 10, 2023
1ea4f84
feat: optimize leaf poseidon with `hash_compact_chunk_inputs` (#149)
jonathanpwang Sep 11, 2023
2ccfc43
[chore] cleanup code (#150)
jonathanpwang Sep 11, 2023
18057d3
chore: get halo2-pse working again
jonathanpwang Sep 11, 2023
46c5769
Merge branch 'main' into release-0.4.0-rc0
jonathanpwang Sep 11, 2023
eb5b284
chore: fix fmt
jonathanpwang Sep 11, 2023
92277ce
[Doc] Keccak Doc (#145)
nyunyunyunyu Sep 11, 2023
1bf36b1
chore: pin snark-verifier branch
jonathanpwang Sep 11, 2023
12f190a
[fix] max_rows in BaseCircuitBuilder in Keccak Leaf Circuit (#152)
nyunyunyunyu Sep 12, 2023
9a2fc70
[chore] Remove Unnecessary Lookup in Keccak Coprocessor Leaf Circuit …
nyunyunyunyu Sep 18, 2023
17d297b
Revert "chore: pin snark-verifier branch"
jonathanpwang Sep 11, 2023
26b81a3
[rename] (coprocessor, leaf) -> (component, shard) (#161)
jonathanpwang Sep 18, 2023
712d889
[rename] (coprocessor, leaf) -> (component, shard) (#161)
jonathanpwang Sep 18, 2023
e36c45b
[fix] Multiple Phase Lookup (#162)
nyunyunyunyu Sep 19, 2023
d3828a4
[fix] Multiple Phase Lookup (#162)
nyunyunyunyu Sep 19, 2023
215fe1c
[chore] add conversion `SafePrimitive` to `QuantumCell::Existing` (#169)
jonathanpwang Sep 26, 2023
524c818
fix: bad import on halo2-pse
jonathanpwang Sep 26, 2023
7acbe4d
[chore] add conversion `SafePrimitive` to `QuantumCell::Existing` (#169)
jonathanpwang Sep 26, 2023
5a43f96
fix: bad import on halo2-pse
jonathanpwang Sep 26, 2023
4cd0844
chore: make `{Fixed,Var}LenBytes*` constructor public
jonathanpwang Sep 26, 2023
3f84ec2
chore: make `{Fixed,Var}LenBytes*` constructor public
jonathanpwang Sep 26, 2023
16fa9e5
chore(keccak): `format_requests` always returns true capacity (#171)
jonathanpwang Sep 28, 2023
dff0e63
[chore] derive `Hash` for `BaseCircuitParams` (#172)
jonathanpwang Sep 29, 2023
8a5d469
[chore] impl `AsRef, AsMut` for `BaseCircuitBuilder` to self (#173)
jonathanpwang Oct 1, 2023
addfbec
[chore] impl `AsRef, AsMut` for `BaseConfig` to self (#174)
jonathanpwang Oct 1, 2023
9e6c9a1
[chore] Add getters to `KeccakComponentShardCircuit` (#178)
jonathanpwang Oct 7, 2023
fef7316
[chore] Expose Keccak Packing (#180)
nyunyunyunyu Oct 10, 2023
5411321
[chore] Expose Keccak Format (#181)
nyunyunyunyu Oct 11, 2023
bf71f0e
[feat] basic dynamic lookup table gadget (#182)
jonathanpwang Oct 11, 2023
9ff8994
[chore] expose `spec` in `PoseidonHasher` (#183)
jonathanpwang Oct 16, 2023
ff0cadf
[chore] fix halo2-pse build error (#184)
jonathanpwang Oct 18, 2023
582f671
[feat] expose keccak table loading/packing functions for external cra…
jonathanpwang Oct 20, 2023
eef553c
[chore] add getters to `PoseidonCompactChunkInput` (#196)
jonathanpwang Oct 20, 2023
ca498e5
[chore] fix deref after using CopyGetters (#197)
jonathanpwang Oct 21, 2023
2e996ae
[feat] implement `CircuitExt` for `KeccakComponentShardCircuit` (#198)
jonathanpwang Oct 22, 2023
ee822b9
Merge branch 'release-0.4.0-rc' into develop
jonathanpwang Oct 23, 2023
267123f
chore: fix `snark-verifier-sdk` version
jonathanpwang Oct 23, 2023
4ba2efc
[chore] add `cargo audit` to CI (#207)
jonathanpwang Nov 2, 2023
d4bf2fa
[fix] `FieldChip::range_check` should take `FieldPoint` instead of `U…
jonathanpwang Nov 2, 2023
4bc9f0a
[feat] update docs (#211)
jonathanpwang Nov 3, 2023
4e78e40
[chore] fix dev graph tests (#212)
jonathanpwang Nov 3, 2023
a30e3b1
[fix] `BasicDynLookupConfig` needs selector on advice table to preven…
jonathanpwang Nov 3, 2023
6cc92c6
[feat] add keccak circuit tests against Known Answer Test vectors (#213)
jonathanpwang Nov 3, 2023
cba20ed
[chore] fix documentation (#215)
jonathanpwang Nov 3, 2023
67e3a0e
[chore] fix doc comment (#216)
jonathanpwang Nov 3, 2023
5e2706f
chore: fix halo2-pse compile
jonathanpwang Nov 12, 2023
70d6d8a
fix: `TypeId` in `ContextTag` not stable across builds (#217)
jonathanpwang Nov 13, 2023
dacb885
Merge branch 'release-0.4.0-rc' into release-0.4.1-rc
jonathanpwang Nov 13, 2023
b880af1
chore: fix RAM test to use `&str` type id
jonathanpwang Nov 13, 2023
adb9694
[chore] add crate prefix to `type_id`s (#218)
jonathanpwang Nov 14, 2023
b6a5750
chore: use halo2-axiom from crates.io
jonathanpwang Nov 16, 2023
d45800d
chore: use poseidon-primitives from crates.io
jonathanpwang Nov 16, 2023
26a4504
chore: Bump halo2-axiom to v0.4
jonathanpwang Nov 20, 2023
12e07e1
chore: add `get_mut` for keccak circuit params
jonathanpwang Nov 20, 2023
42a9ed6
Merge branch 'develop' into ce-merge-develop
jonathanpwang Nov 22, 2023
e3f2522
chore: bring back readme
jonathanpwang Nov 22, 2023
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
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: ["main"]
pull_request:
branches: ["main", "develop", "community-edition"]
branches: ["main", "develop", "community-edition", "release-*"]

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -40,6 +40,7 @@ jobs:
working-directory: "hashes/zkevm"
run: |
cargo test packed_multi_keccak_prover::k_14
cargo t test_vanilla_keccak_kat_vectors

lint:
name: Lint
Expand All @@ -62,4 +63,12 @@ jobs:
run: cargo fmt --all -- --check

- name: Run clippy
run: cargo clippy --all -- -D warnings
run: cargo clippy --all --all-targets -- -D warnings

- name: Generate Cargo.lock
run: cargo generate-lockfile

- name: Run cargo audit
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
83 changes: 41 additions & 42 deletions halo2-base/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,49 +1,48 @@
[package]
name="halo2-base"
version="0.4.0"
edition="2021"
name = "halo2-base"
version = "0.4.0"
edition = "2021"

[dependencies]
itertools="0.11"
num-bigint={ version="0.4", features=["rand"] }
num-integer="0.1"
num-traits="0.2"
rand_chacha="0.3"
rustc-hash="1.1"
rayon="1.7"
serde={ version="1.0", features=["derive"] }
serde_json="1.0"
log="0.4"
getset="0.1.2"
ark-std={ version="0.3.0", features=["print-trace"], optional=true }
itertools = "0.11"
num-bigint = { version = "0.4", features = ["rand"] }
num-integer = "0.1"
num-traits = "0.2"
rand_chacha = "0.3"
rustc-hash = "1.1"
rayon = "1.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
log = "0.4"
getset = "0.1.2"
ark-std = { version = "0.3.0", features = ["print-trace"], optional = true }

# Use Axiom's custom halo2 monorepo for faster proving when feature = "halo2-axiom" is on
halo2_proofs_axiom={ git="https://github.com/axiom-crypto/halo2.git", package="halo2-axiom", optional=true }
halo2_proofs_axiom = { version = "0.4", package = "halo2-axiom", optional = true }
# Use PSE halo2 and halo2curves for compatibility when feature = "halo2-pse" is on
halo2_proofs={ git="https://github.com/privacy-scaling-explorations/halo2.git", rev="7a21656", optional=true }
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", rev = "7a21656", optional = true }

# This is Scroll's audited poseidon circuit. We only use it for the Native Poseidon spec. We do not use the halo2 circuit at all (and it wouldn't even work because the halo2_proofs tag is not compatbile).
# We forked it to upgrade to ff v0.13 and removed the circuit module
poseidon-rs={ git="https://github.com/axiom-crypto/poseidon-circuit.git", rev="1aee4a1" }
poseidon-rs = { package = "poseidon-primitives", version = "=0.1.1" }
# plotting circuit layout
plotters={ version="0.3.0", optional=true }
tabbycat={ version="0.1", features=["attributes"], optional=true }
plotters = { version = "0.3.0", optional = true }

# test-utils
rand={ version="0.8", optional=true }

[dev-dependencies]
ark-std={ version="0.3.0", features=["print-trace"] }
rand="0.8"
pprof={ version="0.11", features=["criterion", "flamegraph"] }
criterion="0.4"
criterion-macro="0.4"
test-case="3.1.0"
test-log="0.2.12"
env_logger="0.10.0"
proptest="1.1.0"
ark-std = { version = "0.3.0", features = ["print-trace"] }
rand = "0.8"
pprof = { version = "0.13", features = ["criterion", "flamegraph"] }
criterion = "0.5.1"
criterion-macro = "0.4"
test-case = "3.1.0"
test-log = "0.2.12"
env_logger = "0.10.0"
proptest = "1.1.0"
# native poseidon for testing
pse-poseidon={ git="https://github.com/axiom-crypto/pse-poseidon.git" }
pse-poseidon = { git = "https://github.com/axiom-crypto/pse-poseidon.git" }

# memory allocation
[target.'cfg(not(target_env = "msvc"))'.dependencies]
Expand All @@ -52,23 +51,23 @@ jemallocator={ version="=0.5", optional=true }
mimalloc={ version="=0.1", default-features=false, optional=true }

[features]
default=["halo2-axiom", "display", "test-utils"]
asm=["halo2_proofs_axiom?/asm"]
dev-graph=["halo2_proofs?/dev-graph", "halo2_proofs_axiom?/dev-graph", "plotters"]
halo2-pse=["halo2_proofs/circuit-params"]
halo2-axiom=["halo2_proofs_axiom"]
display=[]
profile=["halo2_proofs_axiom?/profile"]
test-utils=["dep:rand", "ark-std"]
default = ["halo2-axiom", "display", "test-utils"]
asm = ["halo2_proofs_axiom?/asm"]
dev-graph = ["halo2_proofs/dev-graph", "plotters"] # only works with halo2-pse for now
halo2-pse = ["halo2_proofs/circuit-params"]
halo2-axiom = ["halo2_proofs_axiom"]
display = []
profile = ["halo2_proofs_axiom?/profile"]
test-utils = ["dep:rand", "ark-std"]

[[bench]]
name="mul"
harness=false

[[bench]]
name="inner_product"
harness=false
name = "inner_product"
harness = false

[[example]]
name="inner_product"
required-features=["test-utils"]
name = "inner_product"
required-features = ["test-utils"]
Loading
Loading