Skip to content

Vishnu2707/Post-Quantum-Blockchain-Lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Post-Quantum Blockchain Lab

A quantum-safe blockchain prototype with optimized verification and reproducible performance evaluation.

Overview

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.

Objectives

  • 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.

Features

  • 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

Architecture

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]
Loading

Repository Structure

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

Prerequisites

  • Go 1.22 or newer
  • Docker and Docker Compose
  • Prometheus v2.54 or newer
  • Grafana v11 or newer
  • liboqs (optional, for post-quantum integration)

Setup and Execution

Build the node

go build -o node ./cmd/node

Run a single node

./node -db ./data -listen :8080

Run a three-node Proof-of-Authority network

cd deploy
docker compose -f docker-compose-multi.yml up --build -d

Submit transactions

./bench -target http://localhost:8080/submitTx -rate 200

Access monitoring dashboards

Metrics

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))

Benchmarking

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 300

Post-Quantum Integration

To enable post-quantum signatures:

  1. Install and build liboqs.
  2. Replace the signer type in pkg/crypto with DilithiumSigner or FalconSigner.
  3. Rebuild and restart all nodes.
  4. Compare metrics between Ed25519 and PQ algorithms.

Results and Evaluation

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

Future Work

  • Add post-quantum key exchange for peer communication.
  • Extend the system to additional consensus algorithms.

References

Author

Vishnu Ajith Researcher – Post-Quantum Blockchain Systems

About

A research-oriented blockchain framework designed to explore the integration of post-quantum cryptographic signatures such as Dilithium and Falcon. This project implements a signature-agnostic architecture with a parallel verification pipeline, enabling performance benchmarking and reproducible evaluation of quantum-safe blockchain systems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors