Skip to content

bitcoin-dev-project/warnet

Repository files navigation

Python Version from PEP 621 TOML

Warnet

Monitor and analyze the emergent behaviors of Bitcoin networks.

Major Features

  • Launch a bitcoin network with a specified number of nodes connected to each other according to a network topology.
  • Run scenarios of network behavior across the network which can be programmed using the Bitcoin Core functional test_framework language.
  • Collect and search data from nodes including log files and p2p messages.
  • Monitor and visualize performance data from Bitcoin nodes.
  • Connect to a large network running in a remote cluster, or a smaller network running locally.
  • Add a Lightning Network with its own channel topology and payment activity.

Documentation

Quick Start

1. Create a python virtual environment

python3 -m venv .venv
source ./venv/bin/activate

2. Install Warnet

pip install warnet

3. Set up dependencies

Warnet will ask which back end you want to use, check that it is working, and install additional client tools into the virtual environment.

warnet setup

4. Create a project and network

Warnet will create a new folder structure containing standard scenario and plugin files, and prompt for details about a network topology to create. Topology details include number of Bitcoin nodes, which release versions or custom images to deploy and how many random graph connections to start each node with.

warnet new /my/work/stuff/projectname

5. Deploy the network

warnet deploy /my/work/stuff/projectname/networks/networkname

6. Run experiments

For example, you can start mining blocks...

warnet run /my/work/stuff/projectname/scenarios/miner_std.py

... and then observe network connectivity and statistics in your browser:

warnet dashboard

7. Shut down the network

warnet down

8. Customize

Read the docs and learn how to write your own scenarios or add plugins to your network. Configure individual nodes in the network by editing the network.yaml file or configure defaults for all nodes in the network by editing node-defaults.yaml. Once your network is running use Warnet CLI commands to interact with it.

warnet-art

About

Monitor and analyze the emergent behaviors of Bitcoin networks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 25