cairo-contracts icon indicating copy to clipboard operation
cairo-contracts copied to clipboard

Reduce the number of permutations in merkle tree leave hashing

Open ericnordelo opened this issue 1 year ago • 4 comments

In the poseidon hasher we can use h(x,y)=hades(x,y,2), which is 1 permutation less compared to state.update(x).update(y).finalize(), since the latter adds a permutation whenever we transition from odd --> even # of arguments (so only one so far) + another one for finalization.

ericnordelo avatar Dec 19 '24 14:12 ericnordelo

Hi, can I work on this issue? @ericnordelo

0x471 avatar Dec 28 '24 21:12 0x471

Hi, can I work on this issue? @ericnordelo

Hi, sure! Feel free to open a PR.

ericnordelo avatar Dec 28 '24 23:12 ericnordelo

Hey @ericnordelo. Please review the PR in your free time. I would be happy to adjust and work on it further accordingly

0x471 avatar Jan 01 '25 18:01 0x471

ad

Jamq2 avatar Nov 12 '25 22:11 Jamq2