GithubHelp home page GithubHelp logo

domajzer / whirlpool-coinjoin Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 2.0 596 KB

Project created for a bachelor thesis. I do not plan to continue with the development of this tool. More information can be found at the @crocs-muni, where the development of this simulation and another for Wasabi should take place. Big thanks goes to @dufkan and @petrs for knowledge contributions.

License: MIT License

Python 96.23% Dockerfile 2.27% Shell 1.50%
bitcoin coinjoin docker kubernetes privacy-protection whirlpool

whirlpool-coinjoin's Introduction

CoinJoin simulation setup

A container-based setup for simulating CoinJoins on Testnet network.

Usage

  1. Install Docker and Python.
  2. Clone the repository git clone https://github.com/domajzer/whirlpool-coinjoin.git.
  3. Install dependencies: pip install -r requirements.txt.
  4. Run the default scenario with the default driver: python manager.py run.
    • Scenario definition file can be specified using the --scenario option.
  5. For running the analysis script you need to download and install 'https://github.com/Samourai-Wallet/boltzmann'

Scenarios

Scenario definition files can be passed to the simulation script using the --scenario option. The scenario definition is a JSON file with the following structure:

{
    "name": "50-wallets-2utxo",
    "rounds": 10,
    "blocks": 0,
    "liquidity-wallets": [
      {"funds": [50000], "delay": 0},
      {"funds": [50000], "delay": 0},
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0}
    ],
    "wallets": [
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0},
      {"funds": [35000], "delay": 0},
      .....
    ]
}

The fields are as follows:

  • name field is the name of the scenario used for output logs.
  • blocks field is the number of mined blocks after which the simulation terminates. If set to 0, the simulation will run indefinitely.
  • wallets field is a list of wallet configurations. Each wallet configuration is a dictionary with the following fields:
    • funds is a list of funds in satoshis that the wallet will use for coinjoins.
    • delay is the number of blocks the wallet will wait before joining coinjoins.

Advanced usage

The simulation script enables advanced configuration for running on different container platforms with various networking setups. This section describes the advanced configuration and shows common examples.

Backend driver

Docker

The default driver is docker. Running docker requires Docker installed locally and running.

Kubernetes

To run the simulation on a Kubernetes cluster, use the kubernetes driver. The driver requires a running Kubernetes cluster and kubectl configured to access the cluster.

The kubernetes driver relies on used images being accessible publicly from DockerHub. For that, build the images in containers directory manually and upload them to the registry. Afterwards, specify the image prefix using --image-prefix option when starting the simulation.

In case NodePorts are not supported by your cluster, you may also need to run a proxy to access the services, e.g., Shadowsocks. Use the --proxy option to specify the address of the proxy.

If you need to specify custom namespace, use the --namespace option. If you also need to reuse existing namespace, use the --reuse-namespace option.

Example

Running the simulation on a remote cluster using pre-existing namespace and a wallet import:

python manager1.py run --driver kubernetes --namespace custom-coinjoin --wallet containers/bitcoin-testnet-node/wallets/wallet --reuse-namespace --image-prefix "domajzer99/" --scenario "scenario50.json"

Usage

Analysis script provides a new tool to deanonymize whirlpool coinjoins using data known to the coordiantor. It provides basic analysis with the use of boltzmann tools created by @MT_Lauren and SamouraiDev. It also enables basic tracking of deanonymized UTXOs.

whirlpool-coinjoin's People

Contributors

dependabot[bot] avatar domajzer avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.