Skip to content

JohanLiebert363/MineByte-crypto-simulator

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ฐ MineByte (MB) โ€” CLI Cryptocurrency Wallet & Blockchain MineByte (MB) is a lightweight, educational cryptocurrency project implemented in Python. It demonstrates core blockchain concepts such as wallets, cryptographically signed transactions, mining, and a persistent blockchain, all through a user-friendly command-line interface.

MineByte converter: https://bright-elf-2fde17.netlify.app/ Discord server: https://discord.gg/tz3JMEhj

๐Ÿš€ Features ๐Ÿ” Wallet Management: Generate and load wallets using public/private key cryptography.

๐Ÿ” Secure Transactions: Send MB coins with cryptographic signatures ensuring authenticity.

โ›“๏ธ Immutable Blockchain: Persistent JSON-based blockchain ensures transaction history integrity.

โš’๏ธ Proof-of-Work Mining: Adjustable difficulty mining validates transactions and secures the network.

๐Ÿงพ Mempool: Transaction pool holding pending transactions before inclusion in blocks.

โฑ๏ธ Multiple Mining Modes: Supports fast mining (instant nonce) and realistic time-limited mining.

๐Ÿ’ต Balance Queries: View wallet balances reflecting blockchain-confirmed transactions.

๐Ÿ–ฅ๏ธ Intuitive CLI: Interactive menus simplify wallet, transaction, and blockchain management.

๐ŸŒ Distributed P2P Network: Multiple MineByte nodes can connect to form a decentralized network supporting cross-node transactions.

๐Ÿ†• Whatโ€™s New โ€” Distributed Network Node (node.py) MineByte now includes a P2P network node implemented with a Flask REST API, enabling multiple instances to connect over HTTP and synchronize blockchain data and transactions.

Key Enhancements: ๐ŸŒ Decentralized Network: Nodes communicate to maintain a consistent blockchain.

๐Ÿ”„ Automatic Synchronization: Chains and mempools stay updated across nodes.

๐Ÿ“ก Broadcasting: Transactions and mined blocks propagate to all connected peers.

โš™๏ธ Automated Mining: Nodes can mine transactions from their mempool automatically.

๐Ÿ› ๏ธ REST API: Inspect blockchain status, mempool, connected peers, and submit transactions or blocks.

๐Ÿ”— Cross-node Transactions: Send MB coins securely from wallets on one node to wallets on another seamlessly.

๐Ÿงฐ Usage Guide โ€” Running and Using Nodes

  1. Start a Node bash Copy Edit python core/node.py [port] [miner_wallet_name] Example:

bash Copy Edit python core/node.py 5000 miner_wallet This starts a MineByte node listening on port 5000, using miner_wallet for mining rewards.

  1. Connect Nodes (Add Peers) To form a network, nodes must be connected as peers.

Use the /add_peer endpoint to connect nodes:

bash Copy Edit curl -X POST http://localhost:5000/add_peer -H "Content-Type: application/json" -d '{"peer":"localhost:5001"}' Repeat on other nodes with appropriate addresses to build a mesh network.

  1. Create or Load Wallets Manage wallets on any node through the CLI (app/main.py) or via API endpoints.

  2. Sending MB Coins Across the Network Via CLI: Choose Send Coins and input:

Sender wallet name

Recipient wallet address (can be from any node)

Amount of MB to send

Via API: Submit transaction data as JSON to the /transaction endpoint on any node.

Transactions are broadcasted to all peers and pooled for mining.

  1. Mining Transactions Mine blocks manually via CLI or enable automated mining on nodes with a miner wallet.

Mining confirms transactions network-wide by adding them to the blockchain.

  1. Checking Balances Query any node to check wallet balances, which reflect the networkโ€™s confirmed blockchain state.

๐Ÿ” What You Can Do Now Deploy multiple MineByte nodes on different machines or ports to create a decentralized blockchain network.

Securely transfer MB coins between wallets anywhere within the connected network.

Enjoy automatic transaction validation, mempool sharing, and synchronized mining.

Use REST APIs to monitor blockchain data, mempool contents, and peer connections.

๐Ÿ“… Future Plans ๐Ÿ”„ Automatic peer discovery for easy network scaling.

๐Ÿ” Secure, encrypted communications between nodes.

๐Ÿ“ฑ User-friendly frontends (web/desktop) for easier wallet and node management.

โ›“๏ธ Advanced consensus algorithms for increased security.

๐Ÿ”— Cross-chain interoperability and external integrations.

๐Ÿงช Testnets and network simulators for development.

๐Ÿงฐ Getting Started Prerequisites Python 3.7+

(Recommended) Virtual environment

Installation bash Copy Edit git clone https://github.com/Zypher0903/minebyte.git cd minebyte python -m venv venv

Activate environment

source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows pip install -r requirements.txt โ–ถ๏ธ Running the CLI Wallet Launch the wallet interface:

bash Copy Edit python app/main.py Interact with the menu to:

Create/load wallets

Send MB coins

View the blockchain

Mine blocks

Check balances

Exit

โš ๏ธ Important Disclaimer MineByte is an educational project for learning blockchain fundamentals.

Not connected to public blockchains or exchanges.

MB coins have no real-world market value or guaranteed liquidity.

Any real-money exchanges are outside this system and subject to personal agreement.

Not financial advice โ€” use responsibly and for education only.

๐Ÿค Contributing Contributions, bug reports, and feature requests are welcome! Please open issues or pull requests.

๐Ÿ“œ License Licensed under the MIT License. See LICENSE for details.

๐Ÿ™ Acknowledgements Inspired by Bitcoin and educational blockchain projects. Created by [Zypher0903].

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%