adam2k / warnet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warnet

Monitor and analyze the emergent behaviours of Bitcoin networks

Local Deployment

  1. Requirements

Make sure to have docker and docker-compose installed

For macOS, a bridge to the docker subnet is required, such as https://github.com/chipmk/docker-mac-net-connect

# Install via Homebrew
brew install chipmk/tap/docker-mac-net-connect

# Run the service and register it to launch at boot
sudo brew services start chipmk/tap/docker-mac-net-connect
  1. Install the dependencies

It is recommended to create a virtual environment, like so:

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

and then install the dependencies with setuptools:

pip install -e .
  1. Start the docker containers

Each container is a node as described in the graph.

warnet
  1. Manually run scenarios

See /src/scenarios for examples. Scenarios are written using the Bitcoin Core test framework for functional testing with some modifications (most notably that self.nodes[] represents an array dockerized bitcoind nodes)

Example:

# Command one node to generate a wallet and fill 100 blocks with 100 txs each
python src/scenarios/tx-flood.py

Remote / Cloud Deployment

// TODO

About


Languages

Language:Python 99.8%Language:Dockerfile 0.2%