Skip to content

A fun and interactive way to dive into the world of Bitcoin, simulating transactions, mining, and blockchain mechanics with your crew! 💻

Notifications You must be signed in to change notification settings

Rayato159/bitcoin-simulation-bros

Repository files navigation

Bitcoin Simulation Bros

alt text

A lightweight and interactive web-based Bitcoin blockchain simulation. This project demonstrates the core mechanics of blockchain mining, transaction processing, and hash calculation in a fun and educational way.

🌟 Features

  • Real-time Blockchain Mining: Simulate the mining process with adjustable difficulty levels.
  • Transaction Processing: Add and verify transactions in a block.
  • Dynamic Nonce Adjustment: Visualize how the nonce changes to meet the block difficulty.
  • Hashing Demonstration: Observe the SHA-256 hash generation in real-time.
  • Responsive UI: Built with modern web technologies for seamless interaction.

📦 Technologies Used

  • Rust: High-performance systems programming language.
  • Leptos: Reactive front-end framework for Rust.
  • SHA-256: Secure hashing algorithm for block and transaction validation.

🚀 Getting Started

Prerequisites

  • Install Rust
  • Install cargo-leptos:
    cargo install cargo-leptos

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/bitcoin-simulation-bros.git
    cd bitcoin-simulation-bros
  2. Build and run the project:

    cargo leptos watch
  3. Open your browser and navigate to:

    http://localhost:8080
    

🤯 Start Project with WASM

npx tailwindcss -i ./input.css -o ./tailwind.css --watch
trunk serve --open

⚒️ WASM Production Build

trunk build --release

🤯 Usage

  1. Adjust Difficulty: Set the difficulty level for mining by changing the DIFFICULTY constant in the code.
  2. Mine a Block: Click the "Let's Mining" button to start mining.
  3. View Real-Time Updates: Watch the nonce and hash update dynamically as the block is mined.
  4. Explore Transactions: Add custom transactions and observe their impact on the block’s hash.

🔗 References

About

A fun and interactive way to dive into the world of Bitcoin, simulating transactions, mining, and blockchain mechanics with your crew! 💻

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published