Skip to content

topazcoder/blockchain-infrastructure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦€πŸš€ Blockchain Infrastructure

Rust Blockchain Badge

Simple, educational blockchain implementation in Rust

πŸ”—πŸ’‘ Learn the basics of blockchain and P2P networking!


✨ Features

  • ⚑️ Peer-to-peer networking
  • ⛓️ Simple blockchain logic
  • πŸ—οΈ Block creation (mining)
  • πŸ“‘ Block broadcasting
  • πŸ¦€ Written in Rust

πŸš€ Getting Started

RUST_LOG=info cargo run

This starts a local blockchain client.
Note: The blockchain is not persisted (in-memory only).

You can open multiple terminals to run several connected P2P clients.


πŸ’» Commands

Command Description
ls p πŸ‘₯ List connected peers
ls c πŸ“œ Print the local blockchain
create b $data ⛏️ Mine a new block with $data and broadcast

πŸ”„ How It Works

  • When a block is created, it is broadcast to all peers. πŸ“¨
  • Each node updates its blockchain if the new block is valid. πŸ”„
  • On startup, a node requests the blockchain from peers and adopts the longest valid chain. πŸ†

⚠️ Disclaimer

This project is for educational purposes only!

  • πŸ§ͺ Overly simplified, offline, inefficient, and insecure
  • ❌ Not suitable for production
  • πŸ› οΈ Great for learning and experimenting

Have fun and happy hacking! πŸ˜„πŸ¦€

About

Rust + P2PNetwork

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages