Skip to content

dill-lk/Lattice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

86 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⛏️ Lattice β€” Quantum-Resistant Blockchain

Lattice Logo License Rust GitHub Release

CPU-Friendly Mining Β· Post-Quantum Cryptography Β· Fair Launch

Quick Start β€’ Mining β€’ Tokenomics β€’ Documentation


🌟 What is Lattice?

Lattice is a quantum-resistant blockchain built for the future. While other cryptocurrencies will become vulnerable when quantum computers arrive, Lattice is secured by CRYSTALS-Dilithium3 signatures β€” the same algorithm chosen by NIST for post-quantum security.

Key Features

Feature Description
πŸ” Quantum-Resistant CRYSTALS-Dilithium3 signatures, Kyber768 key exchange
⛏️ CPU-Friendly Mining Argon2 memory-hard PoW β€” no ASICs, no GPUs needed
πŸš€ Fast Blocks 2-15 second block times depending on network
πŸ’° Fair Launch 95% of supply goes to miners, only 5% genesis allocation
πŸ”“ Open Source MIT/Apache-2.0 dual license

πŸͺ™ Tokenomics

Parameter Value
Symbol LAT
Total Supply 50,000,000 LAT
Decimals 8 (1 LAT = 100,000,000 Latt)
Block Reward 10 LAT
Genesis Allocation 5% (2.5M LAT with vesting)
Mining Allocation 95% (47.5M LAT)

Block Times & Difficulty

Network Block Time Initial Difficulty PoW Memory
Devnet ~2 seconds 1 512 KB
Testnet ~5 seconds 5 4 MB
Mainnet ~15 seconds 10 64 MB

πŸ’‘ Lower difficulty = faster block finding. Use devnet for development!

Genesis Allocation

The 5% founder allocation ensures sustainable development:

  • 500,000 LAT β€” Immediately available (exchange listings, infrastructure)
  • 2,000,000 LAT β€” 24-month linear vesting (long-term commitment)

πŸ‘‰ See TOKENOMICS.md for full details.


πŸš€ Quick Start

Install (60 seconds)

Linux / macOS:

curl -fsSL https://raw.githubusercontent.com/dill-lk/Lattice/main/install.sh | bash

Windows (PowerShell):

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://raw.githubusercontent.com/dill-lk/Lattice/main/install.ps1 | iex

This installs three binaries:

Binary Purpose
lattice-node Full node (syncs blockchain, serves RPC)
lattice-miner Standalone CPU miner
lattice-cli Wallet & command-line tools

Create Wallet

lattice-cli wallet create
# Output: Address: 13jXqXbCSghDF2KgyFQdtw8SvbJvpEyhft

Start Mining

# Terminal 1 β€” Start node
lattice-node --network devnet

# Terminal 2 β€” Start miner
lattice-miner --coinbase <your-address> --network devnet

That's it! You're now mining LAT. πŸŽ‰


⛏️ Mining

Network Selection

Choose your network based on your needs:

# Development (instant blocks, ~2 sec)
lattice-node --network devnet
lattice-miner --coinbase <addr> --network devnet

# Testing (moderate speed, ~5 sec)
lattice-node --network testnet
lattice-miner --coinbase <addr> --network testnet

# Production (full security, ~15 sec)
lattice-node --network mainnet
lattice-miner --coinbase <addr> --network mainnet

Thread Recommendations

CPU Cores Recommended Threads
2 2
4 3-4
8 6-8
16+ 12-16
lattice-miner --coinbase <addr> --threads 8 --network devnet

Mining Display

The miner shows real-time stats:

╔═══════════════════════════════════════════════════════════╗
β•‘                 ⛏  LATTICE MINER  v0.1.0                  β•‘
╠═══════════════════════════════════════════════════════════╣
β•‘  Network : DEVNET                                         β•‘
β•‘  Threads : 8                                              β•‘
β•‘  Coinbase: 13jXqXbCSghDF2KgyFQdtw8SvbJvpEyhft             β•‘
β•‘  Node RPC: http://127.0.0.1:8545                          β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

 ⛏  #42  β”‚  125.3 H/s  (avg 118.7 H/s)  β”‚  1,247 hashes  β”‚  3 found  β”‚  up 2m

πŸ’΅ Wallet Commands

# Create new wallet
lattice-cli wallet create

# Show your address
lattice-cli wallet address

# Check balance
lattice-cli wallet balance

# Send LAT
lattice-cli tx send --to <address> --amount 10.5

# Export private key (⚠️ keep safe!)
lattice-cli wallet export

πŸ–₯️ System Requirements

Tier CPU RAM Disk Expected Hash Rate
Minimum 2 cores 4 GB 20 GB ~10 H/s
Recommended 4+ cores 8 GB 50 GB SSD ~50 H/s
Optimal 8+ cores 16 GB 100 GB SSD ~150+ H/s

πŸ’‘ Lattice uses Argon2 memory-hard PoW. More RAM = better performance.


πŸ” Security

Backup Your Wallet

# Your wallet is at ~/.lattice/wallet.json (or ./wallet.json)
cp wallet.json ~/backup/wallet-$(date +%Y%m%d).json

⚠️ WARNING: If you lose your wallet file and password, your LAT is gone forever.

Post-Quantum Cryptography

Lattice uses algorithms selected by NIST for post-quantum security:

Component Algorithm Security Level
Signatures CRYSTALS-Dilithium3 NIST Level 3
Key Exchange Kyber768 NIST Level 3
Hashing SHA3-256 256-bit
PoW Argon2id Memory-hard

πŸ†˜ Troubleshooting

Problem Solution
Node won't start Check port 30303 isn't in use
Miner shows 0.00 H/s Use --network devnet for faster hashes
RPC connection error Make sure lattice-node is running
Invalid coinbase address Use address from lattice-cli wallet address
Low hashrate Increase --threads, close background apps
Old chain data Delete data directory and restart (see below)

Reset Chain Data

If you need to start fresh (e.g., after updating difficulty settings):

Windows:

Remove-Item -Recurse $env:LOCALAPPDATA\Lattice

Linux/macOS:

rm -rf ~/.local/share/lattice

Node Commands

# Check node status
lattice-cli node status

# View peers
lattice-cli node peers

# Open firewall (Linux)
sudo ufw allow 30303/tcp

πŸ“š Documentation

Document Description
TOKENOMICS.md Token supply, genesis allocation, vesting
MINING_GUIDE.md In-depth mining optimization
ADMIN.md Full operator guide, systemd setup
DEPLOYMENT.md Docker & production deployment
CONTRIBUTING.md Build from source, contribute
docs/api-reference.md JSON-RPC API reference

πŸ› οΈ Build from Source

# Requirements: Rust 1.75+, C++ compiler (for RocksDB)

git clone https://github.com/dill-lk/Lattice.git
cd Lattice

# Build
cargo build --release

# Test
cargo test --workspace

# Install locally
cargo install --path bins/lattice-node
cargo install --path bins/lattice-miner
cargo install --path bins/lattice-cli

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   lattice-node  β”‚ ← Full node binary
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚         β”‚             β”‚
    β–Ό         β–Ό             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Networkβ”‚ β”‚  RPC  β”‚ β”‚ Consensus β”‚
β””β”€β”€β”€β”¬β”€β”€β”€β”˜ β””β”€β”€β”€β”¬β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
    β”‚         β”‚           β”‚
    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
    β”‚ Storage β”‚ ← RocksDB
    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
    β”‚  Core   β”‚ ← Blocks, Transactions, State
    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
    β”‚ Crypto  β”‚ ← Dilithium, Kyber, SHA3
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ’¬ Community


πŸ“„ License

Dual-licensed under MIT or Apache-2.0 at your option.


Built with ❀️ for the post-quantum future

⭐ Star this repo if you find it useful!

About

Lattice is a quantum-resistant blockchain built for the future. While other cryptocurrencies will become vulnerable when quantum computers arrive, Lattice is secured by CRYSTALS-Dilithium3 signatures

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors