百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

nebula

> DevOps
开源

一个不确定网络爬虫,可显示全面的对等信息和网络拓扑信息。

381 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个不确定网络爬虫,可显示全面的对等信息和网络拓扑信息。

Nebula

Nebula is an agnostic network crawler. It starts with a set of bootstrap peers, asks them for other peers in the network and recursively repeats the process until all peers in the network have been contacted.

Currently, Nebula supports the following networks:

  • IPFS - Amino DHT
  • Ethereum - Consensus Layer (discv5) | Execution Layer (discv4)
  • Optimism compatible chains
  • Portal - (alpha - wire protocol not implemented)
  • Filecoin
  • Polkadot - Kusama | Rococo | Westend
  • Avail - Mainnet | Turing | Light Client + Full Node versions
  • Celestia - Mainnet | Mocha | Arabica
  • Pactus
  • Dria
  • Gnosis
  • ... your network? Get in touch [email protected].

You can run nebula networks to get a list of all supported networks.

Nebula supports the JSON, Postgres and ClickHouse storage backends. It powers many graphs on probelab.io for most of the supported networks above. Check out the "Topology" sections for any of the networks to get an idea. Gnosis uses Nebula to source its Network metrics here.

Commercial Offering

In addition to the open-source version, ProbeLab maintains a commercial offering of Nebula which includes:

  • GossipSub Topic Tracking — detailed tracking of GossipSub topic subscriptions across the network.
  • Ethereum Handshake Analysis — in-depth Ethereum protocol handshake data collection. (discv4 and discv5)
  • Extended Ethereum Execution Visibility - The EL is participating in discv5 and we are collecting handshake data there
  • Monero Network Crawling — specialized peer discovery for the Monero network.
  • Algorand Network Crawling — specialized peer discovery for the Algorand network.
  • Bitcoin | Litecoin | Dogecoin | Bitcoin Cash
  • Optimism | Base | Unichain | BNB | Any Optimism-based chain

Going forward, new feature development will continue exclusively as part of the commercial offering. The open-source version will remain available and maintained for existing functionality, but all new capabilities will be part of the commercial offering.

For pricing and access, please reach out to [email protected].

Awards

The crawler was:

  • awarded a prize in the DI2F Workshop hackathon.
  • used for the ACM SigCOMM'22 paper Design and Evaluation of IPFS: A Storage Layer for the Decentralized Web

You can find a demo on YouTube: Nebula: A Network Agnostic DHT Crawler

Grafana Dashboard is not part of this repository

Table of Contents

  • Table of Contents
  • Project Status
  • Usage
  • Install
    • From source
  • How does it work?
    • crawl
    • monitor
    • resolve
  • Development
    • Database
    • Tests
  • Report
  • Related Efforts
  • Demo
  • Maintainers
  • Contributing
  • Support
  • Other Projects
  • License

Project Status

The crawler is powering critical IPFS Amino DHT KPIs, used for Weekly IPFS Reports as well as for many metrics on probelab.io. The main branch will contain the latest changes and should not be considered stable. The latest stable release that is production ready is version 2.4.0.

Install

Precompile Binaries

Head over to the release section and download binaries from the latest stable release.

From source

bash
git clone https://github.com/dennis-tra/nebula
cd nebula
just build

Now you should find the nebula executable in the dist subfolder.

Usage

Nebula is a command line tool and provides the crawl sub-command.

Dry-Run

To simply crawl the IPFS Amino DHT network run:

bash
nebula --dry-run crawl

[!NOTE] For backwards compatibility reasons IPFS is the default if no network is specified

The crawler can store its results as JSON documents, in a Postgres, or in a Clickhouse database - the --dry-run flag prevents it from doing any of it. Nebula will just print a summary of the crawl at the end instead. For the IPFS network, a crawl takes ~5-10 min depending on your internet connection. You can also specify the network you want to crawl by appending, e.g., --network FILECOIN and limit the number of peers to crawl by providing the --limit flag with the value of, e.g., 1000. Example:

bash
nebula --dry-run crawl --network FILECOIN --limit 1000

To find out which other network values are supported, you can run:

bash
nebula networks

JSON Output

To store crawl results as JSON files provide the --json-out command line flag like so:

bash
nebula --json-out ./results/ crawl

After the crawl has finished, you will find the JSON files in the ./results/ subdirectory.

When providing only the --json-out command line flag you will see that the *_neighbors.json document is empty. This document would contain the full routing table information of each peer in the network which is quite a bit of data (~250MB for the Amino DHT as of April '23) and is therefore disabled by default

Track Routing Table Information

To populate the document, you'll need to pass the --neighbors flag to the crawl subcommand.

bash
nebula --json-out ./results/ crawl --neighbors

The routing table information forms a graph and graph visualization tools often operate with adjacency lists. To convert the *_neighbors.json document to an adjacency list, you can use jq and the following command:

bash
jq -r '.NeighborIDs[] as $neighbor | [.PeerID, $neighbor] | @csv' ./results/2025-02-16T14:32_neighbors.json > ./results/2025-02-16T14:32_neighbors.csv

Postgres

If you want to store the information in a proper database, you could run just start-postgres to start a local postgres instance via docker in the background and run Nebula like:

bash
nebula --db-user nebula_local --db-name nebula_local crawl --neighbors

At this point, you can also start Nebula's monitoring process, which would periodically probe the discovered peers to track their uptime. Run in another terminal:

bash
nebula --db-user nebula_local --db-name nebula_local monitor

When Nebula is configured to store its results in a postgres database, then it also tracks session information of remote peers. A session is one continuous streak of uptime (see below).

However, this is not implemented for all supported networks. The ProbeLab team is using the monitoring feature for the IPFS, Celestia, Filecoin, and Avail networks. Most notably, the Ethereum discv4/discv5 and Bitcoin monitoring implementations still need work.


There are a few more command line flags that are documented when you runnebula --help and nebula crawl --help:

How does it work?

crawl

The crawl sub-command starts by connecting to a set of bootstrap nodes and then requesting the information of other peers in the network using the network-native discovery protocol. For most supported networks these are several Kademlia FIND_NODE RPCs. For Bitcoin-related networks it's a getaddr RPC.

For Kademlia-based networks Nebula constructs the routing tables (kademlia k-buckets) of the remote peer based on its PeerID. Then nebula builds random PeerIDs with common prefix lengths (CPL) that fall in each of the peers' buckets, and asks if it knows any peers that are closer (XOR distance) to the ones nebula just generated. This will effectively yield a list of all PeerIDs that a peer has in its routing table. The process repeats for all found peers until nebula does not find any new PeerIDs.

[!TIP] You can use the crawl sub-command with the global --dry-run option that skips any database operations.

Command line help page:

…

monitor

The monitor sub-command is only implemented for libp2p based networks and with the postgres database backend. It polls every 10 seconds all sessions from the database (see above) that are due to be dialed in the next 10 seconds (based on the next_visit_due_at timestamp). It attempts to dial all peers using previously saved multi-addresses and updates their session instances accordingly if they're dialable or not.

The next_visit_due_at timestamp is calculated based on the uptime that nebula has observed for that given peer. If the peer is up for a long time nebula assumes that it stays up and thus decreases the dial frequency aka. sets the next_visit_due_at timestamp to a time further in the future.

Command line help page:

NAME:
   nebula monitor - Monitors the network by periodically dialing previously crawled peers.

USAGE:
   nebula monitor [command options]

OPTIONS:
   --workers value  How many concurrent workers should dial peers. (default: 1000) [$NEBULA_MONITOR_WORKER_COUNT]
   --network value  Which network belong the database sessions to. Relevant for parsing peer IDs and muti addresses. (default: "IPFS") [$NEBULA_MONITOR_NETWORK]
   --help, -h       show help

resolve

The resolve sub-command is only available when using the postgres datbaase backend. It goes through all multi addresses that are present in the database and resolves them to their respective IP-addresses. Behind one multi address can be multiple IP addresses due to, e.g., the dnsaddr protocol. Further, it queries the GeoLite2 database from Maxmind to extract country information about the IP addresses and UdgerDB to detect datacenters. The command saves all information alongside the resolved addresses.

Command line help page:

NAME:
   nebula resolve - Resolves all multi addresses to their IP

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gocidcrawlerfilecoingolang

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理