mc-crawler

A MobileCoin network crawler. Corresponding preprint available on arXiv (https://arxiv.org/pdf/2111.12364.pdf).

https://github.com/trudi-group/mc-crawler

Science Score: 54.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
  • Committers with academic emails
    2 of 3 committers (66.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords

crawler mobilecoin rust

Keywords from Contributors

mesh sequences interactive hacking network-simulation
Last synced: 6 months ago · JSON representation ·

Repository

A MobileCoin network crawler. Corresponding preprint available on arXiv (https://arxiv.org/pdf/2111.12364.pdf).

Basic Info
  • Host: GitHub
  • Owner: trudi-group
  • License: mit
  • Language: Rust
  • Default Branch: main
  • Homepage:
  • Size: 10.8 MB
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • Open Issues: 5
  • Releases: 0
Topics
crawler mobilecoin rust
Created over 4 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

mc-crawler - A MobileCoin Network Crawler

Rust MIT CI codecov dependency status

This binary crawls the MobileCoin network and optionally provides 2 JSONs in stellarbeat.io format.

The crawler communicates with the validator nodes using RPCs provided by the mc-consensus-api, and asks each new node for the last consensus message it broadcast to the other validators. The response of the gRPC contains, among other information, the queried node's quorum set which in turn contains other validators that the crawler may have not yet seen.

The crawler, therefore, only finds validators (no watcher nodes), and will not find nodes that are not included in any validator's quorum set.

The Nodes-JSON contains the following data about every found node:

- Hostname
- Port
- Quorum Set
- Public Key
- Connectivity status
- (When available) IP-based Geolocation data, i.e. country and ISP

The Crawl Report contains the same data as the Nodes-JSON in addition to metadata about the crawl such as the duration and a timestamp.

We maintain an HTTP API at https://api.crawler.mc.trudi.group/v1 with crawl data dating back to 23rd August 2021.

The API returns a single JSON file of the crawl recorded at the requested timestamp which must be provided as an RFC 3339 and ISO 8601 date and time string.

The most recent data can be retrieved by not passing a timestamp; the oldest with https://api.crawler.mc.trudi.group/v1/2021-08-23T20:00:00.007Z.

1. Required tools

  • Rust - Install: https://www.rust-lang.org/tools/install
  • Rust's nightly-2022-04-29 compiler which will be downloaded and installed automatically
  • Protobuf compiler protoc which can be built from source or installed using a package manager or , e.g.

    ``` apt install -y protobuf-compiler ``` on Ubuntu
    

2. Environment Variables

Some of the crates used in this library need the Intel SGX environment variables SGX_MODE and IAS_MODE.

You can set them in your terminal like below or pass them when building the binary.

export SGX_MODE=SW IAS_MODE=DEV

Having set the environment variables, the SGX variables do not need to be passed whenever a call to a cargo subcommand is made.

Continue to the section on running the crawler.

3. Crawling the Network

Build

SGX_MODE=SW IAS_MODE=DEV cargo build --release

- The environment variables are only necessary if you skipped step 2.
- The initial compilation will take several minutes due to some of the dependencies used in this project.

Run

SGX_MODE=SW IAS_MODE=DEV cargo run --release [-- path_to_bootstrap_file --output output_directory --debug --fbas --complete]

- The environment variables are only necessary if you skipped step 2.
- Nodes that should be used to bootstrap the crawler are read from text file in which each node's URI is stored on a separate line. The default is "bootstrap.txt".
- The default output directory is set to "crawl_data".
- The crawler optionally writes a JSON with the FBAS discovered during the crawl when "fbas" is passed.
- The crawler optionally writes a JSON with additional data about the crawl when "complete" is passed.
- Debug level messages are suppressed by default.
  Passing --debug results in more verbose terminal output during the crawl.

4. Analysing the crawl data using the fbas_analyzer

The results presented in the paper can all be reproduced using the data obtained from the crawler and the fbas_analyzer.

Refer to its documentation for installation instructions before proceeding.

Below are some example commands: (see target/release/fbas_analyzer -h for more analysis options)

Find all minimal quorums, minimal blocking sets and minimal splitting sets and output metrics about the sizes of the node sets.

target/release/fbas_analyzer -adp mobilecoin_nodes_completed_manually_2021-08-02.json

Find the same sets as above, but merge by organisations

target/release/fbas_analyzer -adp mobilecoin_nodes_completed_manually_2021-08-02.json --merge-by-org mobilecoin_organisations_2021-08-02_created_manually.json

Find the same sets as above, but merge by ISPs

target/release/fbas_analyzer -adp mobilecoin_nodes_completed_manually_2021-08-02.json --merge-by-isp

Find the same sets as above, but merge by countries and output lists of node lists (instead of metrics)

target/release/fbas_analyzer -ap mobilecoin_nodes_completed_manually_2021-08-02.json --merge-by-country

Owner

  • Name: Trust in Distributed Environments
  • Login: trudi-group
  • Kind: organization

Citation (CITATION.cff)

cff-version: "1.2.0"
message: "If you use this software, please cite it as below."

authors:
- given-names: Charmaine
  family-names: Ndolo
  affiliation: >-
    Humboldt University of Berlin / Weizenbaum
    Institute
- given-names: Sebastian
  family-names: Henningsen
  affiliation: >-
    Humboldt University of Berlin / Weizenbaum
    Institute
- given-names: Martin
  family-names: Florian
  affiliation: >-
    Humboldt University of Berlin / Weizenbaum
    Institute
title: "Crawling the MobileCoin Quorum System"

preferred-citation:
  type: generic
  title: "Crawling the MobileCoin Quorum System"
  url: 'https://arxiv.org/abs/2111.12364'
  date-released: '2021-11-24'
  authors:
    - given-names: Charmaine
      family-names: Ndolo
      affiliation: >-
        Humboldt University of Berlin / Weizenbaum
        Institute
    - given-names: Sebastian
      family-names: Henningsen
      affiliation: >-
        Humboldt University of Berlin / Weizenbaum
        Institute
    - given-names: Martin
      family-names: Florian
      affiliation: >-
        Humboldt University of Berlin / Weizenbaum
        Institute

GitHub Events

Total
Last Year

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 98
  • Total Committers: 3
  • Avg Commits per committer: 32.667
  • Development Distribution Score (DDS): 0.204
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Charmaine Ndolo C****o@h****e 78
dependabot[bot] 4****] 18
Charmaine Nyambura Ndolo c****o@i****e 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 65
  • Average time to close issues: N/A
  • Average time to close pull requests: 23 days
  • Total issue authors: 0
  • Total pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.88
  • Merged pull requests: 24
  • Bot issues: 0
  • Bot pull requests: 54
Past Year
  • Issues: 0
  • Pull requests: 8
  • Average time to close issues: N/A
  • Average time to close pull requests: 19 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 8
Top Authors
Issue Authors
Pull Request Authors
  • dependabot[bot] (64)
  • cndolo (10)
  • felixvonberlin (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (64) rust (23) github_actions (11)

Dependencies

Cargo.lock cargo
  • 340 dependencies
Cargo.toml cargo
  • base64 0.13
  • chrono 0.4
  • env_logger 0.9
  • grpcio 0.9
  • log 0.4
  • maxminddb 0.21
  • serde 1.0
  • serde_json 1.0
  • structopt 0.3
  • url 2.2
.github/workflows/coverage.yml actions
  • actions-rs/tarpaulin v0.1 composite
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • codecov/codecov-action v3 composite
.github/workflows/lint.yml actions
  • actions-rs/cargo v1 composite
  • actions/cache v3 composite
  • actions/checkout v3 composite
.github/workflows/test.yml actions
  • actions-rs/cargo v1 composite
  • actions/cache v3 composite
  • actions/checkout v3 composite