Expand description
Signed node facts, beside capability_claim (card mesh-placement-03).
Signed node facts (ADR-099 section 2, card mesh-placement-03).
The companion of crate::capability_claim::SignedCapabilityAdvertisement:
the coarse allow-listed tokens stay there, and the open-vocabulary
NodeFacts block is signed here with the same node Ed25519 key.
The envelope carries the exact JSON bytes that were signed (payload),
so verification never depends on re-serialising floats or maps. The
signature covers a domain tag plus the payload, so facts, deltas and
capability claims can never be replayed as one another.
Verification checks, in order: key and signature sizes, payload bound,
the signature, the payload’s structure, that node_id is the id derived
from the signing key (so a node cannot speak for another), and the time
window (not expired, not issued in the future beyond MAX_CLOCK_SKEW_SECS).
Structs§
- Signed
Facts Delta - A signed
FactsDelta(busy/free update). - Signed
Node Facts - A signed
NodeFactsblock as exchanged on the mesh.
Enums§
- Node
Facts Advert Error - Why a signed facts block or delta was refused.
Constants§
- DELTA_
DOMAIN - Domain tag signed before a delta payload.
- FACTS_
DOMAIN - Domain tag signed before a facts payload.
- MAX_
CLOCK_ SKEW_ SECS - Tolerated clock skew for
issued_at, in seconds. - MAX_
PAYLOAD_ BYTES - Largest signed payload accepted, in bytes.
Functions§
- sign_
facts_ delta - Sign a delta with the node key.
- sign_
node_ facts - Sign facts with the node key. The facts must validate and their
node_idmust be the id derived fromkey. - verify_
facts_ delta - Verify a signed delta and return it with the signer’s key. Whether it
fits the cached base is checked by the cache (
NodeFacts::apply_delta). - verify_
node_ facts - Verify a signed facts block at time
now(unix seconds) and return the facts. Tampered, foreign-keyed, expired or future-dated facts are refused.