Skip to content

Zk-trie implemented#515

Open
illuzen wants to merge 2 commits intomainfrom
illuzen/zk-trie-pallet
Open

Zk-trie implemented#515
illuzen wants to merge 2 commits intomainfrom
illuzen/zk-trie-pallet

Conversation

@illuzen
Copy link
Copy Markdown
Contributor

@illuzen illuzen commented Apr 11, 2026

Summary

Introduces pallet-zk-trie, a 4-ary Poseidon Merkle tree for storing ZK transfer proofs, replacing the redundant TransferProof storage in pallet-wormhole.

Key changes:

New pallets/zk-trie/ with cumulative Merkle tree using injective Poseidon (4 bytes/felt) for leaves and non-injective (8 bytes/felt) for internal nodes
ZkTrieRecorder trait for external pallets to insert leaves
Runtime API (ZkTrieApi) and RPC methods (zkTrie_getState, zkTrie_getMerkleProof) returning raw bytes for direct ZK circuit consumption
Tree root stored in block digest via DigestItem::Other
Removed TransferProof, TransferProofKey, TransferProofData, and LeafInputsHash from wormhole pallet

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.

1 participant