Back to Home

Documentation.

Complete guide to Quanta - the quantum-resistant blockchain built with Rust, Falcon-512, and Kyber-1024.

Installation

Quanta requires Rust 1.70+ to build from source.

System Requirements

  • Rust 1.70 or higher
  • 4GB RAM minimum
  • 10GB disk space
  • Linux, macOS, or Windows
# Clone the repository
git clone https://github.com/xaexaex/quanta.git
cd quanta

# Build with release optimizations
cargo build --release

# Run tests
cargo test

Quick Start

1. Create a Wallet

./target/release/quanta new-wallet --file miner.qua
# Enter a strong password when prompted

2. Start a Node

./target/release/quanta start --port 3000 --db ./node_data

3. Mine Blocks

# Mine a single block
./target/release/quanta mine --wallet miner.qua

# Or use the API for continuous mining
curl -X POST http://localhost:3000/api/mine/start \
  -H "Content-Type: application/json" \
  -d '{"miner_address": "YOUR_ADDRESS"}'

Wallet Operations

HD Wallets (BIP39)

Create HD wallets with 24-word mnemonic phrases:

# Create HD wallet with 3 accounts
./target/release/quanta new-hd-wallet --file hd.json --accounts 3

# View HD wallet info
./target/release/quanta hd-wallet --file hd.json

Check Balance

# CLI
./target/release/quanta wallet --file miner.qua

# API
curl -X POST http://localhost:3000/api/balance \
  -H "Content-Type: application/json" \
  -d '{"address": "YOUR_ADDRESS"}'

Send Transactions

./target/release/quanta send \
  --wallet miner.qua \
  --to RECIPIENT_ADDRESS \
  --amount 10.5

API Reference

Quanta provides a REST API on port 3000 (configurable).

GET /health

Health check and node status

curl http://localhost:3000/health
GET /api/stats

Get blockchain statistics

curl http://localhost:3000/api/stats

# Response:
{
  "chain_length": 142,
  "total_transactions": 89,
  "current_difficulty": 4,
  "mining_reward": 50000000,
  "total_supply": 7100000000,
  "pending_transactions": 3
}
POST /api/transaction

Create and submit a transaction

curl -X POST http://localhost:3000/api/transaction \
  -H "Content-Type: application/json" \
  -d '{
    "wallet_file": "miner.qua",
    "wallet_password": "YOUR_PASSWORD",
    "recipient": "RECIPIENT_ADDRESS",
    "amount_microunits": 10000000
  }'
POST /api/mine/start

Start continuous mining

curl -X POST http://localhost:3000/api/mine/start \
  -H "Content-Type: application/json" \
  -d '{"miner_address": "YOUR_ADDRESS"}'
POST /api/mine/stop

Stop continuous mining

Configuration

Create a quanta.toml file for node configuration:

[node]
api_port = 3000
network_port = 8333
db_path = "./quanta_data"
no_network = false

[network]
max_peers = 125
bootstrap_nodes = ["127.0.0.1:8333"]

[consensus]
max_block_transactions = 2000
max_block_size_bytes = 1048576
min_transaction_fee_microunits = 100
transaction_expiry_blocks = 8640
coinbase_maturity = 100

[security]
max_mempool_size = 5000

[mining]
initial_reward_microunits = 50000000
halving_interval = 210
target_block_time = 10
difficulty_adjustment_interval = 10

[metrics]
enabled = true
port = 9090

P2P Networking

Connect multiple nodes to form a network:

Node 1 (Bootstrap)

./target/release/quanta start \
  --network-port 8333 \
  --port 3000 \
  --db ./node1

Node 2 (Connect to Bootstrap)

./target/release/quanta start \
  --network-port 8334 \
  --port 3001 \
  --db ./node2 \
  --bootstrap 127.0.0.1:8333

Single Node Mode

Disable P2P for testing:

./target/release/quanta start --no-network

Technical Specifications

Cryptography

  • Signatures: Falcon-512 (NIST PQC)
  • Encryption: Kyber-1024 + ChaCha20-Poly1305
  • Hashing: SHA3-256 (Double)
  • Key Derivation: Argon2

Consensus

  • Algorithm: Proof of Work
  • Block Time: ~10 seconds
  • Initial Reward: 50 QUA
  • Halving: Every 210 blocks
  • Difficulty Adjustment: Every 10 blocks

Block Limits

  • Max Size: 1 MB
  • Max Transactions: 2,000 per block
  • Min Fee: 0.0001 QUA
  • Coinbase Maturity: 100 blocks

Database

  • Storage: Sled (embedded)
  • Model: Account-based (not UTXO)
  • Precision: 6 decimals (microunits)
  • Unit: 1 QUA = 1,000,000 microunits

Quantum Resistance

Why Quantum-Resistant?

Traditional blockchains like Bitcoin use ECDSA signatures, which are vulnerable to quantum computers using Shor's algorithm. Quanta uses NIST-standardized post-quantum cryptography.

Traditional (ECDSA)

  • Public Key: 33 bytes
  • Signature: 65 bytes
  • Quantum Safe: NO
  • Shor's Algorithm: Vulnerable

Quanta (Falcon-512)

  • Public Key: 897 bytes
  • Signature: 666 bytes
  • Quantum Safe: YES
  • NIST Standard: PQC Round 3

Protected Against:

  • Shor's Algorithm
  • Grover's Algorithm
  • Harvest Now, Decrypt Later
  • Future Quantum Attacks

Security Best Practices

Important Warnings

  • Quanta is for research/educational purposes
  • NOT audited for production use
  • Do not use for real financial transactions
  • Demo passwords are PUBLIC and INSECURE

Wallet Security

  • Use strong passwords (20+ characters)
  • Store backups offline
  • Never commit wallet files to version control
  • Write down mnemonic phrases (HD wallets)

Node Security

  • API has no authentication - use firewall
  • Regular database backups
  • Keep software updated
  • Monitor system resources

Contributing

Help Build the Future

Quanta is open source and actively seeking contributors. Whether you're interested in cryptography, blockchain, or Rust development, we'd love your help!