Last updated
Edit

Peer Crawler

The Peer Crawler is a special peer port method for reporting on the health and topology of the peer-to-peer network. This API method is available by default on a non-privileged basis through the Peer Protocol port, which is also used for rippled servers' peer-to-peer communications about consensus, ledger history, and other necessary information.

The information reported by the peer crawler is effectively public, and can be used to report on the overall XRP Ledger network, its health, and topology.

Request Format

To request the Peer Crawler information, make the following HTTP request:

  • Protocol: https
  • HTTP Method: GET
  • Host: (any rippled server, by hostname or IP address)
  • Port: (the port number where the rippled server uses the Peer Protocol, typically 51235)
  • Path: /crawl
  • Security: Most rippled servers use a self-signed certificate to respond to the request. By default, most tools (including web browsers) flag or block such responses for being untrusted. You must ignore the certificate checking (for example, if using cURL, add the --insecure flag) to display a response from those servers.

Response Format

The response has the status code 200 OK and a JSON object in the message body.

The JSON object has the following fields:

FieldValueDescription
countsObject(May be omitted) Stats about this server's health, similar to the response from the get_counts method. The default configuration does not report this field. Information reported includes: how large the ledger and transaction databases are, the cache hit rate for the in-application caches, and how many objects of various types are cached in memory. Types of objects that may be stored in memory include ledgers (Ledger), transactions (STTx), validation messages (STValidation), and more.
overlayObject(May be omitted) Information about the peer servers currently connected to this one, similar to the response from the peers method. Contains one field, active, which is an array of objects (see below).
serverObject(May be omitted) Information about this server. Contains public fields from the server_state method, including what rippled version you are running (build_version), which ledger versions your server has available (complete_ledgers), and the amount of load your server is experiencing. Updated in: rippled 1.2.1
unlObject(May be omitted) Information about the validators and validator list sites this server is configured to trust, similar to the response from the validators method and validator_list_sites method. Updated in: rippled 1.2.1
versionNumberIndicates the version of this peer crawler response format. The current peer crawler version number is 2. Updated in: rippled 1.2.1

Each member of the overlay.active array is an object with the following fields:

FieldValueDescription
complete_ledgersStringThe range of ledger versions this peer has available.
complete_shardsString(May be omitted) The range of ledger history shards this peer has available.
ipString (IPv4 Address)(May be omitted) The IP address of this connected peer. Omitted if the peer is configured as a validator or a private peer. Updated in: rippled 1.2.1
portString or Number(May be omitted) The port number on the peer server that serves RTXP. This will be a string if outbound and a number otherwise. Typically 51235. Omitted if the peer is configured as a validator or a private peer. Updated in: rippled 1.2.1
public_keyString (Base-64 Encoded)The public key of the ECDSA key pair used by this peer to sign RTXP messages. (This is the same data as the pubkey_node reported by the peer server's server_info method.)
typeStringThe value in or out, indicating whether the TCP connection to the peer is incoming or outgoing.
uptimeNumberThe number of seconds the server has been connected to this peer.
versionStringThe rippled version number the peer reports to be using.

Example

Request:

GET https://localhost:51235/crawl

Response:

200 OK

{
    "overlay": {
        "active": [
            {
                "complete_ledgers": "45498918-45500918",
                "ip": "88.99.137.170",
                "port": "51235",
                "public_key": "AkU+AY9FWh8AXMc43fAUM69SzfAMGat0d/N+qx3kD6Dg",
                "type": "out",
                "uptime": 208,
                "version": "rippled-1.2.1"
            },
            {
                "complete_ledgers": "45500790-45500918",
                "ip": "198.13.58.221",
                "port": "51235",
                "public_key": "AlQvJAlNDYtoBSaZCXM0pT5RWvdOW9QhMW5++mHswkej",
                "type": "out",
                "uptime": 208,
                "version": "rippled-1.2.0"
            },
            {
                "complete_ledgers": "45500662-45500918",
                "ip": "52.90.101.104",
                "port": "51235",
                "public_key": "AkA04ujnwMn8mRyfJg4K7vzcQSOG7FHq4wUg60OQWnCY",
                "type": "out",
                "uptime": 209,
                "version": "rippled-1.2.1"
            },
            {
                "complete_ledgers": "45500662-45500918",
                "ip": "54.202.12.93",
                "port": "51235",
                "public_key": "AxoekFvFYzELGty9cqiXZB+NsOWTZ0Qs9mFIw69CGb3d",
                "type": "out",
                "uptime": 209,
                "version": "rippled-1.2.1"
            },
            {
                "complete_ledgers": "45498918-45500918",
                "ip": "173.255.240.113",
                "port": "51235",
                "public_key": "A4lWBMIDEQrO8Eerp9Hj3rFacbV0FiID3wTIx8Aoplq2",
                "type": "out",
                "uptime": 209,
                "version": "rippled-1.1.0"
            },
            {
                "complete_ledgers": "45499894-45500918",
                "ip": "54.186.73.52",
                "port": "51235",
                "public_key": "AjikFnq0P2XybCyREr2KPiqXqJteqwPwVRVbVK+93+3o",
                "type": "out",
                "uptime": 209,
                "version": "rippled-1.2.1"
            },
            {
                "complete_ledgers": "45499894-45500918",
                "ip": "54.186.248.91",
                "port": "51235",
                "public_key": "A4A4TPA17KlUjstp7fcL0qaWd4X+fvZ5MTxG5P5AggHW",
                "type": "out",
                "uptime": 209,
                "version": "rippled-1.2.1"
            },
            {
                "complete_ledgers": "45490918-45500918",
                "ip": "162.243.114.118",
                "port": "51235",
                "public_key": "AufDkW4E1DOxjzRPj46Eu+AyJdsakUeJTz3xklv1kCfp",
                "type": "out",
                "uptime": 209,
                "version": "rippled-1.2.1"
            },
            {
                "complete_ledgers": "45498918-45500918",
                "ip": "::ffff:45.56.78.201",
                "port": "51235",
                "public_key": "AmsXz4UUqjlz6iy8HHhZdHmBHteEBwYZLOHCHA4puCwj",
                "type": "out",
                "uptime": 209,
                "version": "rippled-1.1.0"
            },
            {
                "complete_ledgers": "32570-45500918",
                "ip": "169.55.164.30",
                "port": "51235",
                "public_key": "Aw7J0CVhFKt0h6PDEpqu6t4LbPY0PsX8jCFbvSQFDOkW",
                "type": "out",
                "uptime": 209,
                "version": "rippled-1.2.1"
            }
        ]
    },
    "server": {
        "build_version": "1.2.1",
        "complete_ledgers": "45500881-45500888",
        "io_latency_ms": 1,
        "jq_trans_overflow": "0",
        "last_close": {
            "converge_time": 3002,
            "proposers": 25
        },
        "load_base": 256,
        "load_factor": 256,
        "load_factor_fee_reference": 256,
        "load_factor_server": 256,
        "peer_disconnects": "0",
        "peer_disconnects_resources": "0",
        "peers": 10,
        "pubkey_node": "n9MJZBu5HyxyEq8xPGBxXFTfT3uzdnNsvR6R1NyXxbEzt79SrZJE",
        "published_ledger": 45500888,
        "server_state": "full",
        "server_state_duration_us": "40756665",
        "state_accounting": {
            "connected": {
                "duration_us": "163459544",
                "transitions": 1
            },
            "disconnected": {
                "duration_us": "2539592",
                "transitions": 1
            },
            "full": {
                "duration_us": "40756665",
                "transitions": 1
            },
            "syncing": {
                "duration_us": "5071794",
                "transitions": 1
            },
            "tracking": {
                "duration_us": "1",
                "transitions": 1
            }
        },
        "time": "2019-Mar-02 01:48:50.912360",
        "uptime": 213,
        "validated_ledger": {
            "close_time": 604806530,
            "hash": "00415B0ECF1D31E8DC9A7DCB04CAF1FD47E61D4D9D047743C1508CDBD36576CE",
            "reserve_base": 20000000,
            "reserve_inc": 5000000,
            "seq": 45500918
        }
    },
    "unl": {
        "local_static_keys": [],
        "publisher_lists": [
            {
                "available": true,
                "expiration": "2019-Mar-06 00:00:00.000000000",
                "pubkey_publisher": "ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734",
                "seq": 47,
                "uri": "https://vl.ripple.com",
                "version": 1
            }
        ],
        "validator_list": {
            "count": 1,
            "expiration": "2019-Mar-06 00:00:00.000000000",
            "status": "active"
        },
        "validator_sites": [
            {
                "last_refresh_status": "accepted",
                "last_refresh_time": "2019-Mar-02 01:45:19.940242379",
                "next_refresh_time": "2019-Mar-02 01:50:19.568004480",
                "refresh_interval_min": 5,
                "uri": "https://vl.ripple.com"
            }
        ]
    },
    "version": 2
}

See Also