Skip to content

Repository files navigation

zap1-verify-solana

Verify ZAP1 Merkle proofs on Solana. Same trust model as the EVM verifier, different chain.

What this does

An Anchor program that verifies ZAP1 attestation proofs on-chain. BLAKE2b-256 with NordicShield_ personalization, same as the Zcash mainnet implementation.

Register Zcash anchor roots. Anyone can verify a leaf is in a registered root. Verified proofs stored as PDAs.

Instructions

Instruction Who What
initialize Admin Set up config PDA
register_anchor Admin Register a Zcash anchor root + block height
verify_proof Anyone Verify Merkle proof, create VerifiedProof PDA

PDAs

PDA Seeds Content
Config ["config"] admin pubkey, anchor count
AnchorRecord ["anchor", root] root, zcash height, timestamp
VerifiedProof ["proof", leaf_hash, verifier] leaf, root, verifier, timestamp

Build

anchor build
anchor test
anchor deploy --provider.cluster devnet

Stack

  • Anchor - Solana program framework
  • blake2b_simd - BLAKE2b (scalar mode for SBF)
  • ZAP1 - on-chain attestation protocol

License

MIT

About

ZAP1 Merkle proof verification on Solana

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages