Skip to content

Merkle Sum Tree refactoring#8

Merged
enricobottazzi merged 25 commits intomasterfrom
mst-chip-refactor
May 30, 2023
Merged

Merkle Sum Tree refactoring#8
enricobottazzi merged 25 commits intomasterfrom
mst-chip-refactor

Conversation

@enricobottazzi
Copy link
Copy Markdown
Member

@enricobottazzi enricobottazzi commented Apr 14, 2023

The PR introduces some refactoring on the Merkle Sum Tree chip:

  • Minor refactoring of the assing_leaf_hash_and_balance function in the MST chip
  • Added support to circuit printing
  • Refactoring of the enforce_less_than function in the MST chip
  • Added more granular testing. In the previous version, the testing was only asserting for a generic error in the proof generation, now it is asserting for a specific error generation
  • Added support, and related testing, for full_prover and full_verifier utils. These functions perform a full verification, simulating a production-ready environment. This is compared to all the other tests which are performed using the MockProver
  • Moved merkle-sum-tree-rust from an external repository to an internal module a6cccb9
  • Moved tests for merkle-sum-tree in a separate file 2dafd30
  • Moved tests for circuits in a separate file 166588d
  • Add feature to merkle-sum-tree constructor to prevent creating a tree that will overflow the prime db99ee2
  • Added constants method for poseidon specifications dfc5d7e
  • Removed reference to generic Field types in the library and replaced it with the actual one that we are gonna use, namely bn256 dfc5d7e
  • Minor fixes in tests to support the slight modification of the circuit structure dfc5d7e
  • Fixed swap constraint as it was over constraining the circuit 6c7d2f8

@enricobottazzi enricobottazzi requested a review from sifnoc April 14, 2023 09:16
@enricobottazzi enricobottazzi linked an issue Apr 14, 2023 that may be closed by this pull request
3 tasks
Comment thread src/merkle_sum_tree/utils/csv_parser.rs
Comment thread src/chips/merkle_sum_tree.rs Outdated
Comment thread src/chips/poseidon/spec.rs
Comment thread src/circuits/merkle_sum_tree.rs
Copy link
Copy Markdown
Member

@sifnoc sifnoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
Please don't forget to handle https://github.com/summa-dev/merkle-sum-tree-rust after merging this.

@enricobottazzi enricobottazzi merged commit 12cf3e8 into master May 30, 2023
@enricobottazzi enricobottazzi deleted the mst-chip-refactor branch May 31, 2023 15:20
@sifnoc sifnoc mentioned this pull request Aug 2, 2023
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.

Merkle Sum Tree Chip Refactoring

2 participants