Skip to content

A minimalistic Rust blockchain with transactions, proof-of-work mining, and adjustable difficulty and rewards.

Notifications You must be signed in to change notification settings

simplysabir/tiny-blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Blockchain

Tiny Blockchain is a simple blockchain implementation written in Rust. It provides a basic framework for creating and managing a blockchain, complete with transactions, proof-of-work mining, and adjustable parameters such as difficulty and mining rewards.

Features

  • Transaction Management: Allows users to create and manage transactions between different addresses.
  • Proof-of-Work Mining: Implements a proof-of-work algorithm to mine new blocks for the blockchain.
  • Dynamic Difficulty: Users can adjust the difficulty level for mining to control the rate at which new blocks are added to the blockchain.
  • Reward System: Provides a reward to the miner for successfully mining a new block.

Getting Started

  1. Clone the Repository:
git clone https://github.com/simplysabir/tiny-blockchain.git
cd tiny-blockchain
  1. Build the Project:
cargo build
  1. Run the Application:
cargo run
  1. Follow the on-screen instructions: Input the miner address, difficulty level, and use the menu to perform various actions like creating transactions, mining blocks, adjusting difficulty, and changing rewards.

Usage

  • New Transaction (Menu Option 1): Add a new transaction to the current transaction pool.
  • Mine Block (Menu Option 2): Mine a new block by solving the proof-of-work algorithm. This includes rewarding the miner.
  • Change Difficulty (Menu Option 3): Adjust the difficulty level for mining.
  • Change Reward (Menu Option 4): Modify the reward given to the miner for successfully mining a block.
  • Exit (Menu Option 0): Quit the application.

Contributions

Contributions to enhance or expand the Tiny Blockchain are welcome. If you have suggestions or improvements, feel free to fork the repository and submit a pull request. For significant changes, please open an issue first to discuss what you would like to change.

To explore more about my projects and contributions, visit GitHub or Portfolio.

About

A minimalistic Rust blockchain with transactions, proof-of-work mining, and adjustable difficulty and rewards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages