pod2/book
arnaucube b04560c362
merkletree: reduce gate amount (-23%) by custom poseidon to use flag as initial state (#472)
* merkletree: custom poseidon to use flag as initial state.

This allows to do the merkletree related hashing in 1 gate instead of 2,
reducing ~23% of gates per merkle proof.

| tree levels   | 10 | 16 | 32  | 40  | 64  | 128 | 130 | 250  | 256  |
|---------------|----|----|-----|-----|-----|-----|-----|------|------|
| old num gates | 50 | 76 | 144 | 178 | 280 | 554 | 564 | 1076 | 1102 |
| new num gates | 39 | 59 | 111 | 137 | 215 | 425 | 433 | 825  | 845  |

* update docs with new tree hashing approach

* add inline comment stating clear how the flag is used in the state permutation
2026-02-04 12:31:56 +01:00
..
src merkletree: reduce gate amount (-23%) by custom poseidon to use flag as initial state (#472) 2026-02-04 12:31:56 +01:00
.gitignore feat: move code here (#11) 2025-01-31 16:20:57 +01:00
book.toml sync spec & code (#107) 2025-03-05 11:35:23 -08:00