lightning-censorship-simulator

Simulation of censorship in the Lightning network

https://github.com/tud-dud/lightning-censorship-simulator

Science Score: 52.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
    Organization tud-dud has institutional domain (tu-dresden.de)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary

Keywords

censorship lightning-network simulation
Last synced: 6 months ago · JSON representation ·

Repository

Simulation of censorship in the Lightning network

Basic Info
  • Host: GitHub
  • Owner: tud-dud
  • License: mit
  • Language: Rust
  • Default Branch: main
  • Homepage:
  • Size: 15.5 MB
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
censorship lightning-network simulation
Created almost 2 years ago · Last pushed 10 months ago
Metadata Files
Readme License Citation

README.md

simulator

MIT CI codecov dependency status

This is a set of binaries to simulate payment delivery in the Lightning network under various attack scenarios or analyse the network-level topology.

Build

Compile all members of the project:

cargo build --release

Run all unit tests:

cargo test --release

simulator

The binary reconstructs the network topology using an input graph, maps nodes to ASNs and uses the lightning-simulator to simulate payment delivery in the network. The tool simulates payment failure under different attack scenarios. We provide the snapshot of the LN in the snapshots/ directory that was used to run our simulations.

usage

   target/release/simulator [OPTIONS] <GRAPH_FILE> [VERBOSE]

   Arguments:
     <GRAPH_FILE>  Path to JSON ile describing topology
     [VERBOSE]

   Options:
     -l, --log <LOG_LEVEL>                [default: info]
     -o, --out <OUTPUT_DIR>               Path to directory in which the results will be stored
     -a, --amount <AMOUNT>                The payment volume (in sat) we are trying to route
     -r, --run <RUN>                      Set the seed for the simulation [default: 19]
     -g, --graph-source <GRAPH_TYPE>      [default: lnd] [possible values: lnd, lnr]
     -p, --payments <NUM_PAIRS>           Number of src/dest pairs to use in the simulation [default: 1000]
     -n, --num-as <NUM_ADV_AS>            The number of adversarial ASs to simulate (top-n) [default: 5]
     -s, --as-strategy <AS_SEL_STRATEGY>  AS selection strategy. 0 for number of nodes and 1 for number of channels [default: 1]
     -h, --help                           Print help
     -V, --version                        Print version 

asnodedegree

The binary reads the channel graph and maps each to node with a public address to its ASN. The output is a CSV file with two columns per node -- its ASN and degree (number of channels).

NB: Nodes with only a Tor address are assigned ASN 0.

usage

    target/release/as_node_degree [OPTIONS] <GRAPH_FILE> [VERBOSE]

    Arguments:
      <GRAPH_FILE>  Path to JSON file describing topology
      [VERBOSE]

    Options:
      -l, --log <LOG_LEVEL>            [default: info]
      -o, --out <OUTPUT_PATH>          Path to directory where the results will be stored
      -g, --graph-source <GRAPH_TYPE>  [default: lnd] [possible values: lnd, lnr]
      -u, --overwrite
      -h, --help                       Print help
      -V, --version                    Print version

intraaschannels

The binary reads the channel graph, maps each to node with a public address to its ASN and counts the number of channels the node has to other nodes in its ASN. The output is a CSV file with three columns per AS -- its ASN, the total number of intra-AS channels and the total number of inter-AS channels.

NB: Nodes with only a Tor address are assigned ASN 0.

usage

    Usage: target/release/intra_channels [OPTIONS] <GRAPH_FILE> [VERBOSE]

    Arguments:
      <GRAPH_FILE>  Path to JSON file describing topology
      [VERBOSE]

    Options:
      -l, --log <LOG_LEVEL>            [default: info]
      -o, --out <OUTPUT_PATH>          Path to CSV file where the results should be written to
      -g, --graph-source <GRAPH_TYPE>  [default: lnd] [possible values: lnd, lnr]
      -u, --overwrite
      -h, --help                       Print help
      -V, --version                    Print version

Owner

  • Name: Chair Privacy & Security - TU Dresden
  • Login: tud-dud
  • Kind: organization
  • Location: Germany

Repositories associated with some of our research on privacy and security in distributed systems..

Citation (CITATION.cff)

cff-version: 1.2.0
message: >-
  If you use this software, please cite it using the
  metadata from this file.
title: "Payment Censorship in the Lightning Network Despite Encrypted Communication"
repository-code: 'https://github.com/tud-dud/lightning-censorship-simulator'
type: inproceedings
authors:
  - given-names: Charmaine
    family-names: Ndolo
    affiliation: Dresden University of Technology
  - given-names: Florian
    family-names: Tschorsch
    affiliation: Dresden University of Technology
booktitle: "6th Conference on Advances in Financial Technologies (AFT 2024)"
year: 2024
publisher: "Schloss Dagstuhl -- Leibniz-Zentrum für Informatik"
doi: 10.4230/LIPIcs.AFT.2024.12

GitHub Events

Total
  • Watch event: 2
  • Delete event: 5
  • Issue comment event: 4
  • Push event: 4
  • Pull request event: 10
  • Create event: 4
Last Year
  • Watch event: 2
  • Delete event: 5
  • Issue comment event: 4
  • Push event: 4
  • Pull request event: 10
  • Create event: 4

Dependencies

.github/workflows/build.yml actions
  • actions/checkout v4 composite
  • dtolnay/rust-toolchain stable composite
.github/workflows/coverage.yml actions
  • actions/checkout v4 composite
  • codecov/codecov-action v4 composite
.github/workflows/lint.yml actions
  • actions/checkout v4 composite
  • dtolnay/rust-toolchain stable composite
.github/workflows/test.yml actions
  • actions/checkout v4 composite
  • dtolnay/rust-toolchain stable composite
Cargo.toml cargo
  • tempfile 3.10.1 development
  • clap 4.0.22
  • csv 1.3.0
  • env_logger 0.10.1
  • log 0.4.20
  • maxminddb 0.24.0
  • rand 0.8.5
  • rayon 1.8.1
  • serde 1.0.195
  • serde_json 1.0.111