BitLab 0.1.0
BitLab: A Browser for the Bitcoin P2P Network and Blockchain
|
BitLab is an interactive command-line tool for exploring and interacting with the Bitcoin P2P network and blockchain. Inspired by SockLab, BitLab provides a user-friendly interface for learning and working with Bitcoin's peer-to-peer networking protocols without needing to write low-level C code. The tool allows users to perform a wide range of operations on the Bitcoin network, such as peer discovery, connecting to peers, sending messages, and retrieving blockchain data.
BitLab acts as a powerful educational resource and debugging tool for understanding how Bitcoin nodes communicate, synchronize blocks, and process transactions by interacting with the Bitcoin network in real-time. The tool is designed to be user-friendly, intuitive, and informative, providing users with a comprehensive view of the Bitcoin network's inner workings using the Bitcoin protocol.
Please run following:
[!NOTE] Default installation directory is
/usr/local/bin
To install BitLab, simply run the following command in your terminal:
To uninstall BitLab, simply run the following command in your terminal:
To build BitLab from source, follow these steps:
Clone the repository:
Change to the project directory:
Build the project:
Use the main
executable:
Run help
to display available commands and help [command]
to view detailed information about specific one.
The default configuration directory is ~/.bitlab
. The configuration directory contains the following files:
logs/bitlab.log
: BitLab main log filehistory/cli_history.txt
: BitLab CLI command history filePlease feel free to link logs and history to your current working directory:
[!NOTE] Running as root will create the configuration directory in
/root/.bitlab
.
Easily find and connect with peers using various methods:
getaddr
message to request an addr
message containing active peers.addr
messages will provide a list of IP addresses and ports.Seamlessly establish and maintain connections with peers:
version
messages to introduce versions.verack
messages to confirm the connection is successful.Stay connected with active peers and monitor peer availability:
ping
messages to check peer responsiveness and connection health.alert
messages to notify peers of important network events.alert
has been deprecated because of security risks so it won't be implemented in this app. documentation threadHandle errors gracefully and communicate network events transparently:
reject
messages to report any client-side errors.message
messages to log diagnostics and troubleshooting information.Efficiently share and request blocks and transactions with peers:
inv
messages to announce available blocks or transactions.getdata
message: Request specific blocks or transactions by their hash.getblocks
message: Request an inventory list for blocks within a specified range.getheaders
message: Request headers of blocks in a specific range for easy synchronization.tx
message: Announce new transactions.block
message: Send or advertise a specific block.headers
message: Share up to 2,000 block headers for faster synchronization.This project is licensed under the MIT License - see the LICENSE file for details.