Skip to content

nihalnihalani/BitCoin_Networks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BitCoin Networks

Blockchain Transactional System

Welcome to BitCoin Networks, a project that implements a blockchain-based transactional system, enabling two full nodes (F1 and F2) and two clients (A and B) to transfer funds seamlessly while ensuring all transactions remain valid and secure.

🛠️ Features

  • Initial Balances:
    • Each client (A and B) starts with 1000 BC (BitCoin).
    • Each full node (F1 and F2) starts with 0 BC.
  • Transaction Process:
    • Clients can record transactions and send them to their respective full node.
  • Block Mining:
    • Full nodes mine blocks once they accumulate 4 transactions.
    • F1 mines odd-numbered blocks; F2 mines even-numbered blocks.
  • Blockchain Update:
    • After mining, the mined block is stored and shared between the full nodes.
    • Transactions are confirmed and sent to clients.
  • Balance Update:
    • Clients append confirmed transactions and update their balances accordingly.

📋 Requirements

  • Python 3.7+

🚀 Installation

  1. Clone the repository:
    git clone https://github.com/nihalnihalani/BitCoin_Networks
    
  2. Install the requirements:
    pip install -r requirements.txt

⚙Usage

  • Start Full Node F1:

    python full_node_f1.py
  • Start Full Node F2:

    python full_node_f2.py
  • Start Client A:

    python client_a.py
  • Start Client B:

    python client_b.py

🤝 Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss the changes you'd like to make.

Make sure to update tests where necessary.

📄 License

This project is licensed under the MIT License.

About

Blockchain-based transactional system with full nodes and clients for mining, validating, and transferring funds

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages