Question: Merkle root generation

Hello. The JS/TS packages are indeed quite outdated, we’re working on them as we speak so we shouldn’t have to wait much longer.

The simple shield is a good example, but you can find another one in the noir-starter if you check the “ec” branch (not yet merged but it’s a working example).

Just keep in mind that the Pedersen implementation, used in merkle trees, changed between 0.4.1 and 0.5 (ultraplonk). Since the latest JS/TS packages are not up-to-date with ultraplonk, their implementation of Pedersen is still the “old one”. In practice this means you should use 0.4.1 if you’re comparing the merkle trees generated by barretenberg/aztec_backend and those generated/verified by Noir 0.5+.

Again, we’re working on it and soon you’ll be able to create merkle trees in JS/TS using the upcoming new packages, and verify them in-circuit using Noir 0.5+

TL;DR use Noir 0.4.1

50 Likes