Skip to content

cli: decdn register/setup — display operator terms + carry termsHash acceptance in the registration signature (ADR 019 §241) #1077

Closed

Description

@alpergundogdu

Context

Sibling of the contract-side terms-hash extension (CapacityBond registerNode gains a termsHash param + governor-canonical currentTermsHash). ADR 019 §241 (adr/019-node-onboarding.md:241) requires that decdn node register (and decdn setup) display the operator terms and require an explicit affirmative acknowledgement before proceeding — acceptance is carried in the EIP-712 registration signature over termsHash = keccak256(termsText).

Today crates/cli/src/commands/register.rs has no terms display/acknowledgement and signs the pre-extension BindNodeId(nodeId, nonce) payload.

Scope (this issue — CLI only; depends on the contract PR landing first)

  • Embed the canonical operator-terms text in the node software (exact preimage of the on-chain hash; ADR 019 §241 "no external document to fetch").
  • decdn node register / decdn setup: display the terms, require an explicit affirmative acknowledgement (non-interactive path needs an explicit --accept-terms style flag; registration MUST NOT proceed silently).
  • Compute termsHash = keccak256(termsText); sign the new RegisterNode(nodeId, nonce, termsHash) EIP-712 payload; pass termsHash to registerNode.
  • Surface a clear error when the local terms hash ≠ on-chain currentTermsHash (stale CLI must update — ADR 019 §281).

Refs

  • ADR 019 §241-247, §281; contract sibling issue (this issue's parent PR).
  • crates/cli/src/commands/register.rs:132

Metadata

Metadata

Assignees

Labels

area:clikind:feature

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions