arec1b0/nim-blockchain-node
A high-performance, scalable blockchain node implementation in Nim, designed with advanced cryptography, modular consensus (PoS/BFT), zero-knowledge proofs, and optimized P2P networking.
Nim Blockchain Node
๐ Introduction
The Nim Blockchain Node is a modular, high-performance blockchain node implementation written in the Nim programming language, designed for security, scalability, and maintainability. It provides a clear separation of concerns through distinct layers and leverages advanced cryptographic techniques.
๐งฑ Key Components
- Core Engine Layer: Handles consensus mechanisms, virtual machine execution, and state management.
- Cryptography Layer: Provides key management, signature verification, and zero-knowledge proofs.
- Network Layer: Manages peer-to-peer communication, mempool handling, and block propagation.
- Storage Layer: Offers efficient and reliable blockchain, index, and state data storage.
๐ Quick Start
Prerequisites
- Nim 2.2.2+: Download from nim-lang.org
- Git: For cloning the repository
Installation
git clone https://github.com/dkrizhanovskyi/nim-blockchain-node.git
cd nim-blockchain-node
nimble installBuild Options
# Build the node daemon
nimble build
# Build the CLI tool
nimble cli
# Build everything
nimble buildAllRunning the Node
# Run the blockchain node daemon
.\main.exe
# Or use the interactive CLI
.\blockchain_cli.exe --help๐ฅ๏ธ Command Line Interface
The project includes a comprehensive CLI for easy blockchain interaction:
# Start and check node status
.\blockchain_cli.exe node start
.\blockchain_cli.exe node status
# Create accounts and transfer funds
.\blockchain_cli.exe account create
.\blockchain_cli.exe account transfer genesis [address] 1000
# View blockchain data
.\blockchain_cli.exe block latest
.\blockchain_cli.exe transaction listSee CLI_README.md for complete CLI documentation.
๐ฏ Demo
Run the interactive demo to see the CLI in action:
# Windows PowerShell
.\demo_cli.ps1
# Linux/macOS
./demo_cli.sh๐งช Testing
Run tests to ensure reliability:
nimble test๐ Documentation
Explore more detailed documentation in the docs folder:
๐ Security
Follow security best practices outlined in the documentation and regularly update cryptographic dependencies.
๐ Contributing
We welcome contributions! See Contributing Guide for more details.