Skip to content

docs(adr): split nodeIdOf, add isActive, spec setFeeRouter (#450 §B.1+§B.2+§B.5) - #455

Merged
alpergundogdu merged 2 commits into
mainfrom
adr/450-pr1-staking-payment
May 7, 2026
Merged

alpergundogdu merged 2 commits into
mainfrom
adr/450-pr1-staking-payment

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Summary

First slice of #450. Resolves three §B items, all in IStakingRegistry / StablePaymentChannel:

  • §B.1 — isActive(operator) added to the IStakingRegistry surface in ADR 003. Pure single-contract storage read; returns true iff operator is registered with active (non-unbonding) stake at or above minStake.
  • §B.2 — nodeIdOf return type kept as the bundled (bytes32 nodeId, bool active) tuple per the original ADR 003 design (saves an RPC when callers need both signals). The standalone isActive lives alongside it for OriginAssignment callers and others who only need the activity bit and don't want to read the binding slot.
  • §B.5 — setFeeRouter(addr) properly spec'd. New subsection in ADR 003 with authority (GOVERNANCE_ROLE), timelock (standard 48h), event (FeeRouterUpdated), validation (rejects address(0) and same-address), and the EIP-712 carve-out reference to ADR 016 § No proxy deployment patterns.

Decisions made (per planning conversation)

  • isActive semantics: false for unregistered, in-unbonding, below-minStake, and auto-ejected operators. Operator blacklist (ContentBlacklist.isOriginBlacklisted) is intentionally not consulted — isActive is a pure single-contract storage read; callers that need the combined "authorized origin" predicate filter against ContentBlacklist themselves per ADR 011 § Interaction with ContentBlacklist.
  • nodeIdOf return shape: kept as tuple per original ADR 003 design (saves an RPC; design comment block in ADR 003 already documents the rationale). isActive is the lighter standalone alternative when only the bit is needed.

Cross-file alignment

  • ADR 016 § Off-Chain Read API: split the single nodeIdOf row into two entries — bundled nodeIdOf and standalone isActive — with their respective consumers documented.
  • ADR 022 §1.6 Origin discovery: prose clarified that the requester filters by active == true after reading the tuple; framing is unchanged.

Out of scope

Test plan

  • pre-commit run --files <touched files> clean (markdownlint, EOF, trailing whitespace)
  • Render the ADR 003 § Governance setter: setFeeRouter subsection on GitHub and verify the embedded Solidity block is fenced correctly
  • Spot-check the isActive and nodeIdOf consumer references — every site that says "StakingRegistry.isActive(operator)" or "StakingRegistry.nodeIdOf(operator)" in ADRs 011 / 016 / 022 still reads coherently after the split

Related

🤖 Generated with Claude Code

)

Resolves three §B items in #450:

§B.1 + §B.2: StakingRegistry surface — keep nodeIdOf returning the
bundled (bytes32 nodeId, bool active) tuple per the original ADR 003
design (saves an RPC for callers that need both signals); add a
single-purpose isActive(operator) → bool view alongside it for callers
that work with operator addresses and only need the activity bit.
isActive is a pure single-contract storage read — operator-level
blacklist status (per ADR 011) is intentionally NOT consulted; clients
filter against ContentBlacklist.isOriginBlacklisted themselves when the
combined "authorized origin" predicate is needed.

The "active" semantics are pinned: false for unregistered, in-unbonding,
below-minStake, and auto-ejected operators.

§B.5: Spec StablePaymentChannel.setFeeRouter(addr) properly — GOVERNANCE_ROLE,
standard 48h timelock, FeeRouterUpdated event, address(0) and same-address
rejection. Open channels are unaffected because the EIP-712 domain
separator hashes the contract's own address, not the FeeRouter (carve-out
in ADR 016 § No proxy deployment patterns). New § Governance setter:
setFeeRouter subsection in ADR 003.

Cross-file alignment:
- ADR 016 § Off-Chain Read API: split the nodeIdOf row into nodeIdOf +
  isActive entries.
- ADR 022 §1.6 Origin discovery: clarified that the requester filters by
  active == true after reading nodeIdOf; tuple framing kept.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

@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 updates several Architecture Decision Records (ADRs) to provide more technical detail on governance setters and registry view functions. Specifically, it expands the documentation for setFeeRouter in ADR 003, including its authority, validation logic, and impact on settlements. It also introduces the isActive view function in the StakingRegistry across ADR 003 and ADR 016, and refines the origin discovery process in ADR 022. Feedback was provided to use markdown links for internal ADR section references within comments to ensure better navigability and consistency with GFM anchor slug conventions.

Comment thread adr/003-payments.md Resolved
…mment

Address Gemini review on PR #455: convert plain "(per ADR 011 § X)"
references inside the isActive NatSpec comment into proper Markdown
links with GFM-generated anchors so they render as navigable links in
the rendered ADR.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@alpergundogdu
alpergundogdu merged commit 6da1898 into main May 7, 2026
9 checks passed
@alpergundogdu
alpergundogdu deleted the adr/450-pr1-staking-payment branch May 7, 2026 14:46
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.

1 participant