Skip to main content

Module statement_issuer

Module statement_issuer 

Source
Expand description

A client’s status statement issuer, the client side of macula’s macula_statement_issuer (D22), as macula-go’s StatementIssuer. It holds the identity key, the node’s CONNECT bindings with the newest status statement for each, and the current CONNECT key. Each tick issues a statement valid for an hour for each binding whose not_after has not passed, and hands it to that binding’s subscribers, the links that connected with it. Every 5 days it rotates the CONNECT key: the new key’s binding and statement exist before StatementIssuer::connect_material hands the key out, and the rotated-out binding keeps its statements until its not_after. connect_material does work that is due itself, so a dial after missed ticks, a sleep or a clock step still carries material in force. Nothing is written to disk, so a new issuer starts with a new CONNECT key.

Structs§

ConnectMaterial
What a new dial carries: the CONNECT key, its binding, and a status statement for that binding.
StatementIssuer
A client’s statement issuer, shared by every link of one node.
StatementSubscription
A subscription to one binding’s statements, holding at most the newest.

Enums§

IssuerError
Why the issuer could not do what was asked.
SubscriptionEmpty
Why a subscription handed over no statement.

Constants§

CONNECT_BINDING_VALID_MS
How long a CONNECT binding is valid.
CONNECT_ROTATE_EVERY_MS
How often the CONNECT key rotates.
ROTATION_MARGIN_MS
How long before the current binding’s not_after a failed rotation is reported as overdue.
STATEMENT_EVERY_MS
How often statements are reissued.
STATEMENT_VALID_MS
How long a status statement is valid.

Type Aliases§

Clock
A clock in Unix milliseconds.