Skip to content

OxideChain is a lightweight, experimental blockchain implementation written in Rust. Designed for educational purposes, it explores the fundamental concepts of distributed ledger technology, including peer-to-peer networking, Proof-of-Work (PoW) consensus, and UTXO-based transaction models.

Notifications You must be signed in to change notification settings

Alkamal01/OxideChain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

OxideChain ๐Ÿฆ€

Build Status Rust License

OxideChain is a lightweight, experimental blockchain implementation written in Rust. Designed for educational purposes, it explores the fundamental concepts of distributed ledger technology, including peer-to-peer networking, Proof-of-Work (PoW) consensus, and UTXO-based transaction models.

๐Ÿš€ Features

  • Proof of Work Mining: Implements a naive PoW algorithm to secure the network.
  • UTXO Transaction Model: Secure transaction handling with input/output validation.
  • P2P Networking: Decentralized communication between nodes.
  • Wallet Management: Create wallets, generate addresses, and manage keys.
  • Persistent Storage: Uses sled (and SQLite) for persistent block storage.
  • Merkle Tree: Efficient data verification using Merkle roots.
  • CLI Interface: Easy-to-use command line tools for interaction.

๐Ÿ› ๏ธ Architecture

The project is modularized for clarity:

  • block: Core block structure and validation.
  • blockchain: Chain management and storage logic.
  • transaction: Transaction creation and signing.
  • wallet: Key pair generation and address management.
  • p2p: Networking layer for node communication.

๐Ÿ“ฆ Getting Started

Prerequisites

Installation

Clone the repository:

git clone https://github.com/Alkamal01/oxide-chain.git
cd oxide-chain

Build the project:

cargo build --release

Usage

1. Create a Wallet Generate a new wallet to receive rewards.

cargo run createwallet
# Output: address 3JGDNu6Pnuench1hoXyibBemfYjGT8RHRS

2. Initialize the Blockchain Create the genesis block and award the initial supply to your address.

cargo run create <YOUR_ADDRESS>

3. Run a Node / Mine Start the node and beginning mining blocks (check CLI for specific mining commands if separate).

cargo run startnode

4. transact Send coins to another address.

cargo run send <FROM_ADDRESS> <TO_ADDRESS> <AMOUNT>

5. Inspect Chain Print the current state of the blockchain.

cargo run printchain

๐Ÿค Contributing

Contributions are welcome! This is an educational project, so feel free to open issues or PRs to improve code quality or add new features (e.g., a better consensus algorithm, smarter mempool).

๐Ÿ“„ License

This project is open-source and available under the MIT License.

About

OxideChain is a lightweight, experimental blockchain implementation written in Rust. Designed for educational purposes, it explores the fundamental concepts of distributed ledger technology, including peer-to-peer networking, Proof-of-Work (PoW) consensus, and UTXO-based transaction models.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published