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

Add efc circuits and gnark lib #67

Closed
wants to merge 25 commits into from
Closed

Add efc circuits and gnark lib #67

wants to merge 25 commits into from

Conversation

hczphn
Copy link

@hczphn hczphn commented Jan 13, 2025

1. Add gnark lib (circuit-std-rs/src/gnark)

  • support bls12381 field, element
  • support E2, E6, E12 (field_bls12381 directory)
  • support G1 (just add), G2 (just neg), pairingcheck (sw_bls12381 directory)

2. Add sha256_m31 (consider m31 field is less than 2^31)

3. Add poseidon hash

4. Add more logup apis

  • Add query api, now users can query in the circuit (need to provide the key and value)
  • Support arbitrary "key". Previous version assumes keys are in the range of [0, N). Check query_count_by_key_hint.
  • Support rangeproof. Rangeproof is simpler than normal query, so I add some optimizations, making it faster. If the number to be tested is less than the predefined range, it will go through a fast path (rangeproof_onechunk).

5. Add EthFullConsensus Circuits

  • Add bls_verifier circuit, basically, calling pairingcheck api.
  • Add shuffle circuit.
  • Add hashtable circuit.
  • Add permutation_hash circuit.
  • Add parallel solver to generate witnesses of above circuits.
  • Add end2end api, check readme to use.

@hczphn hczphn closed this Jan 13, 2025
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.

2 participants