Expand description
Operator-terms acceptance at registration (ADR 019 § Terms Acceptance).
The canonical operator terms ship embedded in the binary (TERMS_TEXT);
their keccak256 is the exact preimage the on-chain currentTermsHash
commits to. Before signing registerNode, the CLI shows the operator the
terms and records an explicit affirmative acknowledgement — interactively on
a terminal, or via --accept-terms for headless/automated provisioning.
Enforcement is deliberately split: decide is the pure policy (unit
tested), and ensure_accepted is the thin IO wrapper that displays the
terms and prompts.
Enums§
- Decision
- Outcome of the acceptance policy given the invocation context.
Constants§
- TERMS_
TEXT - The canonical operator terms, embedded from this crate’s
TERMS.mdso the displayed text is the exact preimage of the recorded hash — there is no external document to fetch or substitute (ADR 019 § Terms Acceptance).
Functions§
- decide
- Pure acceptance policy.
localisterms_hash;chainis the network’scurrentTermsHash. The staleness check takes precedence over everything — we never sign a hash the operator was not shown, even with--accept-terms. - ensure_
accepted - Enforce operator-terms acceptance before registration signs
registerNode. - ensure_
accepted_ async - Async wrapper over
ensure_accepted. The interactive branch does blockingstdin/stderrIO, so run the whole gate on a blocking thread rather than parking a tokio runtime worker while it waits for the operator. - terms_
hash keccak256of the embedded terms — the value the operator’s signature commits to and which must equal the network’s on-chaincurrentTermsHash.- terms_
version - Human-readable version pulled from the
**Version:**line ofTERMS.md(display only — the hash is the authoritative identifier).