Why Verify?
Verifying your deployed program provides:- Transparency: Users can verify what code is actually running
- Trust: Proves the deployed bytecode matches the audited source
- Security: Detects unauthorized modifications
- Compliance: Meets requirements for audited programs
The Privacy Cash mainnet program is fully verified with hash:
c6f1e5336f2068dc1c1e1c64e92e3d8495b8df79f78011e2620af60aa43090c5Verifiable Builds
Anchor supports verifiable builds that can be reproduced deterministically.Build for Verification
Always use the--verifiable flag for mainnet deployments:
What Makes a Build Verifiable?
Verifiable builds:- Use Docker for consistent build environment
- Pin all dependency versions
- Produce deterministic binary output
- Can be rebuilt by anyone with the same result
Verification Process
Verify on Solana Explorer
Solana Explorer provides built-in verification tools:Navigate to Program
Visit the program on Solana Explorer
Using Anchor Verify
Anchor provides a built-in verification command:- Downloads the deployed program
- Compares it with your local build
- Reports any differences
Successful Verification Output
Failed Verification
If verification fails:- Different source code version
- Modified dependencies
- Non-deterministic build settings
- Using non-verifiable build
Verifying Historical Deployments
To verify a specific program version:Docker-based Verification
For fully reproducible verification, use Docker directly:- Same OS and environment
- Same toolchain versions
- Same build flags
- Reproducible output
Continuous Verification
Set up automated verification in CI/CD:Publishing Verification Results
Share verification results with your community:Generate Verification Report
Verification Artifacts
Commit verification evidence:- Build hash
- Git commit hash
- Build timestamp
- Anchor version
- Rust toolchain version
Common Verification Issues
Different Hashes on Rebuild
Problem: Local build produces different hash Solutions:- Use
--verifiableflag - Check Anchor version matches (
anchor --version) - Verify Rust toolchain version
- Ensure clean build (
rm -rf target) - Check for uncommitted changes
Docker Build Fails
Problem: Verifiable build fails in Docker Solutions:- Update Docker image version
- Check Docker has sufficient resources
- Clear Docker build cache
- Verify Anchor.toml configuration
Cannot Dump Program
Problem:solana program dump fails
Solutions:
- Check RPC endpoint is responsive
- Verify program ID is correct
- Use different RPC if rate-limited
- Ensure sufficient disk space
Verification Best Practices
- Always use
--verifiablefor production deployments - Tag releases in git for reproducibility
- Document build environment (Anchor version, Rust version)
- Automate verification in CI/CD pipeline
- Publish verification results for transparency
- Re-verify after upgrades to ensure integrity
- Keep build artifacts for historical reference
Privacy Cash Verification Data
Mainnet Program
Devnet Program
Further Reading
- Anchor Verifiable Builds Documentation
- Solana Program Deployment Guide
- Reproducible Builds Best Practices
Support
If you encounter verification issues:- Check the GitHub repository for updates
- Review closed issues for similar problems
- Open a new issue with verification logs
- Join the community for assistance