Skip to content

Conversation

@Tabaie
Copy link
Contributor

@Tabaie Tabaie commented Jun 10, 2025

  • Implements full hash functions for Poseidon2 and MiMC.
  • Updates the Merkle Damgard hasher to implement the StateStorer interface.

Benchmark: For 27M constraints for 52K permutations on BLS12-377, using degree 17 gates. Attempts to use degree 2 and 4 gates proved counterproductive, resulting in 32M and 31M constraints, respectively.


Note

Implements hashers built on GKR compressors and adds state management for Merkle–Damgård, with broad test/bench coverage and a small generated-code fix.

  • Add GKR compressors for mimc and poseidon2 with gate registration per curve; cache compiled circuits via kvstore
  • New std/hash/mimc/gkr-mimc and std/hash/poseidon2/gkr-poseidon2 providing full hashers (Merkle–Damgård) and end-to-end tests/benchmarks
  • Update MerkleDamgardHasher: constructor returns StateStorer; add State()/SetState() with safety checks
  • Refactor Poseidon2: export Parameters, add GetDefaultParameters, change New and registration to use StateStorer; update tests (including state restore)
  • Minor fixes: correct gateAPI.Println type handling in generated GKR backends; comment typo in MiMC internals

Written by Cursor Bugbot for commit fad4369. This will update automatically on new commits. Configure here.

@ivokub ivokub added the feat: gkr PRs related to GKR label Sep 11, 2025
cursor[bot]

This comment was marked as outdated.

@Tabaie Tabaie changed the base branch from feat/gkr/add-instance to master January 7, 2026 16:27
@Tabaie Tabaie merged commit 37fc880 into master Jan 12, 2026
13 checks passed
@Tabaie Tabaie deleted the feat/gkr/hashes branch January 12, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: gkr PRs related to GKR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants