ZKP-License-System/README.md

1.5 KiB

License Verification ZKP System - Test Environment

Quick Start

  1. Start the system:

    make up
    
  2. Initialize test data:

    make db-init
    
  3. Run benchmarks:

    make benchmark
    

Architecture

  • PostgreSQL: Stores licenses and Merkle tree structure
  • ZKP Engine: Handles proof generation and verification
  • Redis: Caches Merkle proofs for performance
  • Merkle Service: Manages Merkle tree updates

Performance Expectations

Based on your simple age circuit benchmarks:

  • Proof Generation: 3,500-4,500ms (browser)
  • Proof Verification: 25-40ms (server)
  • Memory Usage: 150-250MB peak during generation

Monitoring

View real-time metrics:

curl http://localhost:8081/metrics

View benchmark results:

curl http://localhost:8080/api/benchmark

Database Access

docker compose exec postgres psql -U license_admin -d license_verification

Useful queries:

-- View benchmark results
SELECT * FROM benchmark_results ORDER BY created_at DESC LIMIT 10;

-- Check Merkle tree status
SELECT * FROM merkle_tree_stats;

-- View recent verifications
SELECT * FROM verification_audit ORDER BY created_at DESC LIMIT 10;

Troubleshooting

If proof generation is too slow:

  1. Check memory allocation: docker stats
  2. Reduce tree depth in .env (affects max licenses)
  3. Consider server-side proof generation

Clean Up

make down    # Stop services
make clean   # Remove all data
make reset   # Full system reset