Blockchain & Crypto
Private

Rust PoW Blockchain Node & Smart Contract Engine

RustTokioRocksDBSHA-256SerdeTCP Sockets

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

RustTokioRocksDBSHA-256SerdeTCP Sockets

System 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 Did I Build This?

"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

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