Repository navigation
docs: ADR 019 — node onboarding and bootstrapping flow - #191
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces ADR 019, which formalizes a five-phase node onboarding and bootstrapping flow, and updates the architecture overview. The review feedback highlights a missing multiaddr consistency check in the final acceptance criteria, a logical circularity regarding NAT discovery between the setup and startup phases, and terminology inconsistencies in signature payload descriptions.
| - Verifies the EIP-712 `bindingSignature` over `BindNodeId(nodeId, bindingNonce[msg.sender])`, | ||
| establishing the `nodeId → ethAddress` mapping for slash evidence and payment attribution. | ||
| - Verifies the `ed25519Signature` over | ||
| `keccak256(abi.encodePacked(nodeId, msg.sender, block.chainid, registrationNonce[nodeId]))`, |
There was a problem hiding this comment.
The description of the ed25519Signature payload here uses Solidity-specific terms (msg.sender, block.chainid), while the corresponding pseudo-code at Line 132 uses operator-context variables (ethAddress, chainId). While they refer to the same values, using consistent terminology (matching the canonical ADR 001) would reduce the risk of implementation errors in operator tooling.
References
- Maintaining consistent terminology across all Architecture Decision Records (ADRs) is prioritized over strict technical accuracy of a term, especially if the term is already established in other ADRs.
There was a problem hiding this comment.
Fixed — replaced msg.sender/block.chainid with ethAddress/chainId in the on-chain verification description (lines 111–114) to match the signing pseudo-code. Added a parenthetical note clarifying these are msg.sender and block.chainid in the on-chain context, for readers cross-referencing the Solidity in ADR 001.
Formalizes the complete ordered procedure from bare server to accepting paid delivery. Covers five sequential phases: 1. Pre-flight: clock sync, iroh key gen, Ethereum key funding, region 2. On-chain setup: TOKEN approve, stake, registerNode (ed25519 + EIP-712) 3. Node startup: rate bounds fetch, blacklist sync, registry peer bootstrap 4. Gossip: subscribe to cdn/global/v1 + regional topic, publish NodeAnnounce 5. Accepting paid delivery: six-point acceptance criteria table Also documents NAT/multiaddr handling (iroh hole-punching, when to call updateMultiaddrs), re-onboarding after deregistration/auto-ejection (nonce increment, preserved firstRegisteredAt), and PoC vs. production differences. Updates architecture.md with ADR 019 summary entry. Closes the bootstrapping gap identified in issue #190 (item 1). Co-authored-by: Copilot <[email protected]>
- Use canonical decdn_gossip_messages_rejected_total{reason=clock_skew} (ADR 020 §2.6)
- Replace Solidity-isms (msg.sender, block.chainid) with operator-context vars (ethAddress, chainId) to match pseudo-code
- Clarify Phase 2/3 NAT circularity: NAT nodes register with relay placeholder; updateMultiaddrs called after Phase 3
- Add acceptance criterion #7: multiaddrs synchronized (on-chain matches Endpoint::direct_addresses())
- Update 'six criteria' references to 'seven'
Co-authored-by: Copilot <[email protected]>
c3f8909 to
ef36b5e
Compare
Summary
Adds ADR 019, formalizing the complete ordered procedure from bare server to actively accepting paid delivery.
Background
Issue #190 identified that no single document describes the end-to-end node onboarding flow. Missing or mis-ordered steps produce silent protocol failures (e.g., gossip rejected because clock isn't synced, connections refused because blacklist wasn't fetched).
What's in this ADR
Five sequential phases, each with explicit MUST-level gates before advancing:
approve,stake,registerNode(ed25519 + EIP-712 signatures)cdn/global/v1+ regional topic, publish firstNodeAnnounceAlso covers:
updateMultiaddrsfirstRegisteredAt)Cross-ADR references
Synthesizes scattered requirements from ADRs 001, 003, 004, 008, 011, 016 into one sequential flow. No existing ADR content is changed.
Closes
Addresses item 1 (Node onboarding & bootstrapping flow) from issue #190.