Skip to content
All projects
BlockchainPrivate

Rust PoW Blockchain Node & Smart Contract Engine

A highly concurrent Proof-of-Work (PoW) blockchain node built with Rust, featuring asynchronous mining, persistent RocksDB state, and a modular smart contract execution engine.

Tech stack

Languages
Frameworks & libraries

Performance & metrics

  • Eliminates synchronous I/O blocking by strictly decoupling the heavy cryptographic mining loop from the network TCP listener via Tokio asynchronous tasks
  • High-performance Key-Value state persistence using RocksDB guarantees $O(1)$ block retrieval and minimal memory overhead during chain hydration

Why I built it

I developed this to deeply understand distributed ledger mechanics, asynchronous network I/O, and cryptographic state transitions. Rather than relying on off-the-shelf frameworks, I engineered a custom PoW consensus mechanism and state machine to manually handle balance mappings, cryptographic block serialization, and non-blocking network listening.

Architecture & decisions

The core node operates on the tokio asynchronous runtime, cleanly isolating the CPU-bound mining loop from the I/O-bound P2P TCP listener. Cryptographic block hashing is strictly enforced via SHA-256. The global state—comprising the block sequence and account balances—is safely mutated using Arc<Mutex<T>> and persistently flushed to a localized RocksDB instance. Smart contracts are modeled using Rust traits, allowing polymorphic execution of JSON-serialized payloads directly against the chain's state.

Key features

  1. 01Asynchronous Proof-of-Work (PoW) mining loop with dynamic SHA-256 difficulty constraints
  2. 02Deterministic RocksDB integration for persistent, high-throughput chain state and block storage
  3. 03Polymorphic smart contract execution engine utilizing Rust traits and Serde deserialization
  4. 04Non-blocking TCP listener architecture designed for asynchronous P2P node communication

Technical review

Note: This repository is kept strictly private. While the core consensus, cryptography, and storage layers are fully operational, the distributed P2P routing protocol (gossip network) responsible for bridging and synchronizing all autonomous nodes is currently under active development. The project will reach v1.0 completion upon the finalization of this global synchronization layer.