Skip to content

docs: specify on-chain node registry contract interface - #35

Merged
thiras merged 3 commits into
mainfrom
adr/node-registry-contract-interface
Mar 29, 2026
Merged

thiras merged 3 commits into
mainfrom
adr/node-registry-contract-interface

Conversation

@thiras

@thiras thiras commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add NodeInfo struct and full StakingRegistry node registry interface (registration, views, events) to ADR 001, covering all items in ADR 001: Specify on-chain node registry contract interface #5: contract interface, multiaddr update policy, gas costs, and client query patterns
  • Add registry governable parameters (multiaddr update cooldown, max multiaddr size) to ADR 004
  • Add cross-references in ADR 003 and architecture.md for consistency

Test plan

  • Review NodeInfo struct fields align with ADR 001's existing NodeId → QUIC multiaddrs + Ethereum address requirement
  • Verify gas cost table is consistent with ADR 004's existing estimates
  • Confirm governable parameter bounds don't conflict with existing ADR 004 bounds
  • Check cross-references in ADR 003 and architecture.md are accurate

Closes #5

🤖 Generated with Claude Code

Add NodeInfo struct, StakingRegistry extensions (registerNode,
updateMultiaddrs, deregisterNode, views, events), multiaddr update
policy, gas cost estimates, client query patterns, and NodeId ownership
verification strategy to ADR 001. Add registry governable parameters
to ADR 004 and cross-references in ADR 003 and architecture.md.

Closes #5

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings March 29, 2026 17:09

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the Node Registry interface within the StakingRegistry contract, detailing the data structures, functions, and events required for node registration and management. Feedback focuses on ensuring consistency between ADRs regarding governable parameters, improving the flexibility of the interface by allowing region hint updates, and enhancing event logs for better off-chain indexing.

Comment thread adr/001-network.md Resolved
Comment thread adr/001-network.md Resolved
Comment thread adr/001-network.md Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the design documentation to fully specify the on-chain node registry interface (as part of StakingRegistry) and aligns ADR cross-references and governance parameter tables across the architecture + ADR set, addressing Issue #5.

Changes:

  • Define NodeInfo and a full StakingRegistry node registry interface (functions, events, constraints, gas estimates, and client query patterns) in ADR 001.
  • Add governance safety bounds for multiaddr update cooldown and max multiaddr size in ADR 004.
  • Add cross-references in ADR 003 and architecture overview to point readers to the canonical node registry spec in ADR 001.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
adr/architecture.md Adds a brief architectural note that node registry lives in StakingRegistry and summarizes the NodeInfo mapping.
adr/004-tokenomics.md Adds governable safety bounds for multiaddr cooldown and max multiaddr size under StakingRegistry.
adr/003-payments.md Updates payment ADR to reference ADR 001 for the node registry interface; keeps only payment-specific extensions here.
adr/001-network.md Introduces the full node registry contract interface + policies (multiaddr encoding/update policy, gas costs, query patterns, ownership verification notes).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread adr/001-network.md Resolved
Comment thread adr/001-network.md Resolved
Comment thread adr/004-tokenomics.md Resolved
Comment thread adr/001-network.md Resolved
Comment thread adr/001-network.md Resolved
Comment thread adr/001-network.md Resolved
Comment thread adr/001-network.md Resolved
Comment thread adr/001-network.md Resolved
Comment thread adr/001-network.md Resolved
thiras and others added 2 commits March 29, 2026 20:16
- Fix hardcoded vs governable contradiction for maxMultiaddrSize
- Add regionHint to NodeRegistered event for off-chain indexing
- Fix incorrect RIP-7212 reference (secp256r1, not ed25519)
- Acknowledge nodeId griefing risk in PoC simplification section
- Add bytes32(0) sentinel guard requirement for registerNode
- Reference governable unbonding period instead of hardcoding 7 days

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Fix maxMultiaddrSize description: 1024 is safety ceiling, not default
- Add registrationNonce to ed25519 signature to prevent replay
- Remove double blank line in ADR 003
- Align gas table header with ADR 004 format
- Add horizontal rule before Contract Interface section
- Normalize event parameter naming (multiaddrs, not newMultiaddrs)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@thiras
thiras merged commit 334cfc4 into main Mar 29, 2026
@thiras
thiras deleted the adr/node-registry-contract-interface branch March 29, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADR 001: Specify on-chain node registry contract interface

2 participants