Skip to main content

Crate witness_unl

Crate witness_unl 

Source
Expand description

Collector of signed UNL lists.

The quorum check needs the trust policy as of the ledger’s date, but list publishers (vl.ripple.com, unl.xrplf.org) only serve the current version. Past versions cannot be obtained anywhere, so, as with validations, we build up the list history ourselves, starting from day one.

What it does:

  • polls each publisher every --interval-secs;
  • stores each new response byte for byte: it contains the publisher’s signature and manifest, so authenticity can be checked later, without us;
  • writes every poll, successful or not, as a line in observations.jsonl: when we looked, what the server answered, which list sequences were in the response. This is our evidence of when a list was in effect; the list itself does not say;
  • if a publisher’s list sequence jumped by more than one, the observation marks it: we never saw the intermediate versions.

Layout: <data-dir>/<publisher>/<sequence>-<hash>.json for raw responses, <data-dir>/observations.jsonl for the poll log.

StructsΒ§

Args πŸ”’
Fetched πŸ”’
ListInfo πŸ”’
Seen πŸ”’
State kept between polls: the last list sequence per publisher key, so that skipped versions can be noticed.
Site πŸ”’
Summary πŸ”’
What is inside a publisher response: the key and the list sequences. The parse is only for the log; the response is stored whole, not the parsed form.

ConstantsΒ§

MAX_BODY πŸ”’
A publisher response is tens of kilobytes; anything over a megabyte is not a list.

FunctionsΒ§

append_line πŸ”’
fetch πŸ”’
main πŸ”’
parse_site πŸ”’
poll πŸ”’
run πŸ”’
summarize πŸ”’