Repository navigation
docs: specify on-chain node registry contract interface - #35
Conversation
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]>
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
NodeInfoand a fullStakingRegistrynode 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.
- 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]>
Summary
NodeInfostruct and fullStakingRegistrynode 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 patternsTest plan
NodeInfostruct fields align with ADR 001's existingNodeId → QUIC multiaddrs + Ethereum addressrequirementCloses #5
🤖 Generated with Claude Code