skip to content
Skill Issue Dev | Dax the Dev
search
↑ github.com ← all notes

Tree-state client: fetch the Merkle tree from chain

The wallet needs the Merkle root to generate proofs, and ideally the full tree to scan for owned notes. Added TreeStateClient that pulls compressed-account state from a Photon RPC, reconstructs the depth-32 Poseidon tree client-side, and verifies the on-chain root matches.

Performance: 50K notes reconstructs in ~400ms. Above ~1M and the wallet should switch to lazy path-fetching (only request the path for the leaf you’re spending). That’s a future commit.