A quantum-safe blockchain prototype with optimized verification and reproducible performance evaluation.
This repository contains a blockchain prototype designed to study the integration of post-quantum cryptographic signatures such as Dilithium and Falcon within a working blockchain environment.
The design supports a signature-agnostic structure, a parallel verification system, and performance benchmarking with real-time monitoring through Prometheus and Grafana.
- Build a blockchain system that supports both classical (Ed25519) and post-quantum signatures.
- Implement a parallel verification process for efficient transaction validation.
- Integrate Open Quantum Safe (liboqs) for Dilithium and Falcon signatures.
- Deploy a small multi-node Proof-of-Authority network with persistent storage.
- Collect, monitor, and analyze performance metrics in real time.
- Signature-agnostic transaction layer (Ed25519 / Dilithium / Falcon)
- Parallel verification using worker threads
- Leader-based block production (Proof-of-Authority)
- Persistent storage using LevelDB
- REST APIs for transaction submission, block status, and metrics
- Prometheus and Grafana integration
- Docker Compose deployment for three-node network
graph TD
A[Client or Bench Tool] -->|submitTx| B[Leader Node]
B -->|broadcastBlock| C[Follower Node 1]
B -->|broadcastBlock| D[Follower Node 2]
subgraph Node Components
E[Mempool] --> F[Block Builder]
F --> G[Verification Workers]
G --> H[LevelDB Store]
end
H --> I[Prometheus Metrics]
I --> J[Grafana Dashboard]
post-quantum-blockchain-lab/
│
├── cmd/
│ └── node/ # Main node logic
│
├── pkg/
│ ├── block/ # Block definition and hashing
│ ├── crypto/ # Signature implementations (Ed25519 + PQ)
│ ├── store/ # LevelDB database
│ ├── tx/ # Transaction structure and signing
│ ├── metrics/ # Prometheus metrics registration
│ └── verify/ # Parallel verification worker pool
│
├── deploy/
│ ├── docker-compose-multi.yml # Multi-node deployment configuration
│ └── prometheus/
│ └── prometheus-multi.yml # Prometheus scrape configuration
│
└── bench/ # Load generator for performance testing
- Go 1.22 or newer
- Docker and Docker Compose
- Prometheus v2.54 or newer
- Grafana v11 or newer
- liboqs (optional, for post-quantum integration)
go build -o node ./cmd/node./node -db ./data -listen :8080cd deploy
docker compose -f docker-compose-multi.yml up --build -d./bench -target http://localhost:8080/submitTx -rate 200-
Prometheus: http://localhost:9090
-
Grafana: http://localhost:3000
- Username: admin
- Password: admin
Key metrics exposed:
- tx_received_total – number of transactions received
- blocks_built_total – number of blocks produced
- verify_ops_total – total verification operations performed
- verify_duration_seconds – duration of signature verification
- block_verify_failed_total – failed block verifications
Example PromQL queries:
rate(tx_received_total[30s])
rate(blocks_built_total[1m])
rate(verify_ops_total[1m])
histogram_quantile(0.95, sum(rate(verify_duration_seconds_bucket[1m])) by (le))
The bench tool can be used to measure performance. Metrics such as transaction throughput, block interval stability, and CPU utilization can be collected through Prometheus and visualized in Grafana.
Example:
./bench -target http://localhost:8080/submitTx -rate 300To enable post-quantum signatures:
- Install and build liboqs.
- Replace the signer type in
pkg/cryptowithDilithiumSignerorFalconSigner. - Rebuild and restart all nodes.
- Compare metrics between Ed25519 and PQ algorithms.
Performance can be compared based on:
- Verification time (Ed25519 vs PQ)
- Throughput and latency under constant load
- CPU and memory usage across nodes
- Scalability of the worker pool
- Add post-quantum key exchange for peer communication.
- Extend the system to additional consensus algorithms.
- Open Quantum Safe Project – https://openquantumsafe.org
- NIST PQC Standardization – https://csrc.nist.gov/projects/post-quantum-cryptography
- Go – https://go.dev
- Prometheus – https://prometheus.io
- Grafana – https://grafana.com
Vishnu Ajith Researcher – Post-Quantum Blockchain Systems