Skip to content

[feat] add aggregate_snarks function#34

Merged
jonathanpwang merged 3 commits into
developfrom
feat/aggregate_function
Sep 21, 2023
Merged

[feat] add aggregate_snarks function#34
jonathanpwang merged 3 commits into
developfrom
feat/aggregate_function

Conversation

@jonathanpwang

Copy link
Copy Markdown
  • Previously you could only create a new builder pre-populated with
    the witnesses for snark aggregation.
  • This is a bad design pattern if you want to make a circuit that
    aggregates and also does other stuff.
  • This function will use whatever SinglePhaseCoreManager and
    RangeChip you provide to prove the snark aggregation.

- Previously you could only create a new `builder` pre-populated with
  the witnesses for snark aggregation.
- This is a bad design pattern if you want to make a circuit that
  aggregates and also does other stuff.
- This function will use whatever `SinglePhaseCoreManager` and
  `RangeChip` you provide to prove the snark aggregation.
@jonathanpwang jonathanpwang enabled auto-merge (squash) September 20, 2023 23:49
@jonathanpwang jonathanpwang merged commit 223fbd7 into develop Sep 21, 2023
@jonathanpwang jonathanpwang deleted the feat/aggregate_function branch September 21, 2023 00:52
jonathanpwang added a commit that referenced this pull request Sep 21, 2023
* chore: update dependencies

* Minor: merge v0.1.1 to develop (#21)

Just cargo fixes

* feat: remove use of env vars for circuit configuration (#22)

* feat: remove use of env vars for circuit configuration

This is a companion to axiom-crypto/halo2-lib#92

* chore: remove rustfmt CI check

PSE upstream uses different rustfmt configuration than us, so some files
disagree in formatting

* chore: fix dependencies

* Feat/read pk buffer capacity (#24)

* feat: change default `read_pk` buffer capacity to 1MB

* feat: add bench for read_pk

* [Update] use ff v0.13 (#28)

* feat(snark-verifier): update to ff v0.13

* feat(snark-verifier): update examples

* feat(snark-verifier-sdk): update to ff v0.13

* fix: conversion from BaseConfigParams to AggregationConfigParams

* chore: pin poseidon rev

* refactor(sdk): add `AggregationCtxBuilder` for aggregation

Contains the populated builder after aggregating, without creating the
`AggregationCircuit`. Doesn't need config parameters and break points.

* chore: update cargo

* [Feat] Universal verifier circuit (#26)

* feat: add example with different vkey as private witness

Same aggregation circuit, verifies different snarks with different vkeys
(same standard plonk gate, but different selectors / copy constraints)

* fix: save break points when generating agg circuit for first time (#23)

* fix: save break points when generating agg circuit for first time

* chore: add circuit files to gitignore

* feat: halo2-lib universal verifier example

* chore: cargo fix

* feat: allow circuit size (number of rows) to be loaded as witness

* chore: clippy fix

* fix(n_as_witness): computation of shifts depends on `omega`

`omega` which changes when `k` changes, so all shift computations need
to be done as witness. Current implementation is likely not the most
optimal. Instead of storing `shift` as `omega^i`, we store just
`Rotation(i)`. We de-duplicate when possible using `BTreeMap` of
`Rotation`. Note you must use `Rotation` instead of `F` for `BTreeMap`
because the ordering of `omega^i` may change depending on `omega`.

* fix: temp remove pow_var

* add universal verifier range check test

* chore: do not serialize domain_as_witness if none

* Revert "fix: temp remove pow_var"

This reverts commit 69f648e.

* fix: halo2_lib example

* test: halo2_lib with variable lookup table passes

* Bump version to 0.1.3

---------

Co-authored-by: Roshan <roshan.palakkal@gmail.com>

* chore: derive Default for VerifierUniversality

* feat: upgrade `revm` to support lastest hardfork (#40)

* Update: use `halo2-lib` v0.4.0 (#29)

* feat: update snark-verifier

* update: use `halo2-lib` v0.4.0

* feat: load `k` as witness and compute `n = 2^k` and `omega` from `k` (#30)

* feat: load `k` as witness and compute `n = 2^k` and `omega` from `k`

Removes need to make `omega` a public output in universal verifier.

* fix: bit_length

* Move `OptimizedPoseidonSpec` to `halo2-base` (#31)

* chore: move `OptimizedPoseidonSpec` to `halo2-base`

* Bump version to 0.1.5 and remove poseidon-rs dep

* chore: util::hash available without loader_halo2 feature

* chore: nit

* [feat] change yul code into Solidity assembly (#32)

feat: change yul code into Solidity assembly

Just changes to wrapping yul in solidity assembly block

* chore: try pragma solidity 0.8.20 with CI

* chore: make `transcript_initial_state` public

So we can read transcript initial state from `VerifyingKey`

* test: edit range_check example to trigger selector compression

* [feat] add `aggregate_snarks` function (#34)

* feat: add `aggregate_snarks` function

- Previously you could only create a new `builder` pre-populated with
  the witnesses for snark aggregation.
- This is a bad design pattern if you want to make a circuit that
  aggregates and also does other stuff.
- This function will use whatever `SinglePhaseCoreManager` and
  `RangeChip` you provide to prove the snark aggregation.

* chore: add comment

* chore: fix comment

---------

Co-authored-by: Roshan <roshan.palakkal@gmail.com>
Co-authored-by: Han <tinghan0110@gmail.com>
jonathanpwang added a commit that referenced this pull request Oct 16, 2023
* chore: try pragma solidity 0.8.20 with CI

* chore: make `transcript_initial_state` public

So we can read transcript initial state from `VerifyingKey`

* test: edit range_check example to trigger selector compression

* [feat] add `aggregate_snarks` function (#34)

* feat: add `aggregate_snarks` function

- Previously you could only create a new `builder` pre-populated with
  the witnesses for snark aggregation.
- This is a bad design pattern if you want to make a circuit that
  aggregates and also does other stuff.
- This function will use whatever `SinglePhaseCoreManager` and
  `RangeChip` you provide to prove the snark aggregation.

* chore: add comment

* chore: fix comment

* [feat(sdk)] `aggregate_snarks` returns loaded proof witnesses (#36)

* feat(sdk): `aggregate_snarks` returns loaded proof witnesses

* feat: add `TranscriptObject` to track assigned proof transcript

* chore: Bump version to 0.1.7
jonathanpwang added a commit that referenced this pull request Nov 4, 2023
* chore: try pragma solidity 0.8.20 with CI

* chore: make `transcript_initial_state` public

So we can read transcript initial state from `VerifyingKey`

* test: edit range_check example to trigger selector compression

* [feat] add `aggregate_snarks` function (#34)

* feat: add `aggregate_snarks` function

- Previously you could only create a new `builder` pre-populated with
  the witnesses for snark aggregation.
- This is a bad design pattern if you want to make a circuit that
  aggregates and also does other stuff.
- This function will use whatever `SinglePhaseCoreManager` and
  `RangeChip` you provide to prove the snark aggregation.

* chore: add comment

* chore: fix comment

* [feat(sdk)] `aggregate_snarks` returns loaded proof witnesses (#36)

* feat(sdk): `aggregate_snarks` returns loaded proof witnesses

* feat: add `TranscriptObject` to track assigned proof transcript

* chore: Bump version to 0.1.7
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.

1 participant