# Sterope's data

Sterope (https://www.netria.dev/sterope/) draws the public Lightning Network from one file: https://www.netria.dev/sterope/data.json. You can download it for your own analysis, from a script or from any site (it is served with `Access-Control-Allow-Origin: *`). It is about 2.4 MB of JSON.

## Where it comes from

Every deploy of the site, and every day at 07:30 and 19:30 UTC, fetches the latest full snapshot from LDK's Rapid Gossip Sync server (https://rapidsync.lightningdevkit.org/snapshot/v2/0), decodes it and lays it out. The file is replaced only by a newer snapshot, and kept as it is if anything fails. `meta.time` says when the snapshot was taken. There is no history: each new file replaces the last.

The snapshot holds what Lightning nodes announce to each other (gossip): channels, their capacity and their fees. It has no balances and no payments, so it can't tell whether a payment would get through or how much flows where. Channels with neither direction enabled are left out, as nearly all of them are closed on-chain but still in gossip (`meta.disabledLeftOut` counts them). A channel closed recently whose other side still says enabled can remain.

## How it is laid out

Nodes are numbered by their place in `ids`. Every per-node field is an array in that order: `cap[i]` is the capacity of node `ids[i]`. Channels are in `ch`, a set of arrays in channel order: channel `m` joins nodes `ch.a[m]` and `ch.b[m]`. A missing value is -1.

### `meta`

- `time`: when the snapshot was taken, UTC, as `2026-11-27 12:00:00`
- `ts`: the same, as a Unix timestamp in seconds
- `nodes`: how many nodes `ids` lists, with or without channels
- `channels`: how many channels `ch` lists
- `capacityBtc`: the total capacity of those channels, in BTC
- `disabledLeftOut`: how many channels were left out because neither direction was enabled
- `maxCore`: the largest `core` value
- `namesFetched`: the date the names in `name` were fetched
- `suns`, `hole`: settings of the map's layout

### Per node

- `ids`: the node's public key, in hex
- `name`: its alias on mempool.space, at most 32 characters, fetched on the date in `meta.namesFetched` for the 100 nodes that had the most channels then (a few have none); null for the rest
- `addr`: the addresses it announces, as `host:port` (IPv4, IPv6 or Tor); empty if none
- `cap`: the total capacity of its channels, in sats. That is what both ends of each channel put in together; how it splits between them is not public.
- `deg`: how many channels it has (two channels with the same peer count twice)
- `core`: its k-core number: the largest k for which it belongs to a group where each node has channels with at least k others of the group (a peer counts once, however many channels they share)
- `oldest`: the block height of its oldest channel's funding transaction
- `fee`: the median fee rate it charges on the channels where its side is enabled, in parts per million
- `feat`: the index in `fsets` of the features it announces; -1 if the snapshot has no details for it
- `rad`, `flat`: for the drawing only: its disc's radius, and its x, y position at `flat[2*i]`, `flat[2*i+1]`

Names and addresses are chosen by node operators: treat them as untrusted text. Nodes with `deg` 0 have no channel in `ch` (all of theirs were left out), and the map hides them.

### `fsets`

The distinct feature sets nodes announce, each a list of the feature bits that are set, numbered as in BOLT 9 (https://github.com/lightning/bolts/blob/master/09-features.md).

### `ch`: channels

Each direction of a channel has its own policy, set by the node the payment leaves from. Fields ending in 1 are for `a` to `b` (set by `a`), fields ending in 2 for `b` to `a` (set by `b`).

- `a`, `b`: the two nodes, as indexes in `ids`
- `cap`: the channel's capacity, in sats
- `blk`: the block height of its funding transaction (from its short channel id)
- `en`: the enabled directions: 1 for `a` to `b`, 2 for `b` to `a`, 3 for both
- `p1`, `p2`: the fee rate, in parts per million
- `f1`, `f2`: the base fee, in millisats
- `c1`, `c2`: the CLTV expiry delta, in blocks
- `m1`, `m2`: the smallest payment it forwards (HTLC minimum), in millisats
- `x1`, `x2`: the largest payment it forwards (HTLC maximum), in millisats

Forwarding `amt` millisats from `a` to `b` over channel `m` costs `f1[m] + amt * p1[m] / 1000000` millisats.

### `rings`, `hubs`

For the drawing only: the map's orbits, as pairs of a node index and a radius.

## Example

ACINQ's channels and their total capacity, in Python:

```python
import json, urllib.request
D = json.load(urllib.request.urlopen("https://www.netria.dev/sterope/data.json"))
C, i = D["ch"], D["name"].index("ACINQ")
mine = [m for m in range(len(C["a"])) if i in (C["a"][m], C["b"][m])]
print(len(mine), "channels,", sum(C["cap"][m] for m in mine) / 1e8, "BTC")
```

## Asking the map

In a browser with WebMCP, the page itself answers questions through tools: `find_node`, `node_facts`, `node_reach`, `route` and `network_facts`. `network_facts` points back to this file and to the data.
