Skip to content

fix(contracts,e2e): make deregistration a real bond exit; settle the unbond gate question (#1351, #1352, #1354) - #1360

Merged
thiras merged 2 commits into
mainfrom
fix/unbond-followups-1351-1352-1354
Jul 21, 2026
Merged

thiras merged 2 commits into
mainfrom
fix/unbond-followups-1351-1352-1354

Conversation

@thiras

@thiras thiras commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1351, closes #1352, closes #1354 — the three surviving follow-ups from #1033/#1353, all on one surface: CapacityBond unbonding semantics, ADR 026/003, and the G-NODE-06 journey.

#1351 — an operator that ever declared a tier could never fully unbond

requestUnbond enforces activeBond >= bondRequired(declaredMbps); declareMbps is the only writer of declaredMbps and cannot set it back to 0 (the band floor MIN_CAPACITY_FLOOR_MBPS = 10 is not governance-lowerable); deregisterNode left the tier standing. The curve floor was therefore permanent — an operator who declared 10 Mbps was locked out of bondRequired(10) worth of TOKEN forever, whether or not they still ran a node.

This turned out not to be an open design question. ADR 003 § Node Registry already asserts the intended behaviour — "a full exit is just deregisterNode followed by unbond()" and "an operator who changes their mind can re-register without re-funding". The contract contradicted its own source of truth. deregisterNode now clears declaredMbps, making the documented sequence work:

deregisterNode() -> requestUnbond(activeBond) -> [14-day window] -> unbond()

The clear is announced via MbpsDeclared(operator, old, 0) rather than written silently — that event is the only tier signal an indexer has, so a second quiet writer would desync it. It is skipped when no tier was ever declared, so a never-declared operator pays no SSTORE and logs no 0 -> 0 no-op.

  • Size gate: +105 bytes of runtime (23,257 → 23,362), leaving 1,214 bytes of EIP-170 headroom.
  • Interface: no new event or selector, so InterfaceFreeze is untouched.
  • .gas-snapshot regenerated.

#1352 — no slash/appeal gate on requestUnbond, deliberately

#1033 listed "unbond blocked while a slash/appeal is pending" as a negative case. That text was wrong; the contract is right.

ADR 026 § Unbonding window already argues the 14-day window outlasts SlashJudge's 5-day evidence window by 9 days and that slashing during unbonding is permitted — so a gate adds nothing an honest challenger needs, while handing a griefing challenger an indefinite freeze on an honest operator's exit (a challenge that is never revealed has no expiry to unstick it). Recorded in ADR 026 in place.

Note the spec anchor #1352 cites (internal/Product/gaps-and-e2e-test-specs.md#g-node-06) does not exist — no file in the workspace contains the string G-NODE-06 — so the wrong text lived only in the body of the closed #1033. The G-NODE-06 module docs now state that the missing assertion is deliberate, so a future contributor does not "fix" the gap by asserting a gate that must not exist.

#1354 — four decdn node unbond behaviours only the real binary can reach

--dry-run and the headless confirmation refusal go in before step 1, while the state is still clean; both cost zero chain time. A below-crossover --to-mbps 10 and a real --all release are appended after step 6.

The --all leg is the one that had never run end to end — step 3 only reached its already-in-flight error — and it is where --all's bare curve floor visibly diverges from --to-mbps's max(minBond, curve): at the same tier one retains 199.696… TOKEN and the other 50,000. Every expected amount is re-derived from chain state, so a governance retune of the curve fails loudly instead of passing vacuously.

Verification

Every new e2e leg and three of the four new Solidity tests are mutation-verified, not merely green:

Mutation Caught by
drop the dry_run short-circuit leg 0a
turn the headless refusal into a bypass leg 0b
--to-mbps drops its minBond floor leg 8 (199696542250100298769 vs 50000000000000000000000)
--all retains minBond, or one base unit above the curve leg 9
remove the declaredMbps clear 3 of 4 Solidity tests
remove the oldMbps != 0 skip test_deregisterNode_emitsNoMbpsEventWhenNeverDeclared
  • forge test — 757 passed
  • FOUNDRY_PROFILE=ci forge build --sizes --deny warnings, forge fmt --check, solhint — clean
  • slither (fail-on medium) exit 0; aderyn — 0 high findings
  • cargo nextest run --workspace — 2574 passed
  • cargo nextest run -p decdn-e2e --features anvil-e2e --test g_node_06_unbond — passes in ~18 s against the 780 s OVERALL_TIMEOUT, so the constant is unchanged
  • pre-commit run --all-files — clean

Note the e2e drives the prebuilt target/debug/decdn, so cargo build -p decdn-cli is required before the journey picks up a CLI change — the first mutation run passed misleadingly until that was accounted for.

Follow-up

#1359 — deregisterNode still has no CLI surface, so a full exit is expressible on-chain but not from decdn. Until it lands, unbond's module docs name the raw contract call, matching the precedent in setup.rs's already-registered error.

Out of scope

#1346, #1348 and #1349 target code that only exists on the still-open #1341 and must be stacked on that branch.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Full node exit now follows a clear deregistration-then-unbond flow.
    • Deregistering a node clears its declared capacity tier while preserving the existing bond.
    • Re-registering preserves the bond but requires declaring capacity again.
    • CLI guidance now clarifies partial releases, full exits, confirmations, and dry-run behavior.
  • Bug Fixes

    • Improved handling of capacity-tier resets and unbonding scenarios, including below-floor bond retention.
  • Tests

    • Expanded lifecycle, withdrawal, CLI, and unbonding coverage.

…unbond gate question (#1351, #1352, #1354)

The three surviving follow-ups from #1033/#1353, all on one surface.

**#1351 — an operator that ever declared a tier could never fully unbond.**
`requestUnbond` enforces `activeBond >= bondRequired(declaredMbps)`, `declareMbps`
is the only writer of `declaredMbps` and cannot set it back to 0 (the band floor
`MIN_CAPACITY_FLOOR_MBPS = 10` is not governance-lowerable), and `deregisterNode`
left the tier standing. So the curve floor was permanent: an operator who declared
10 Mbps was locked out of `bondRequired(10)` worth of TOKEN forever, whether or not
they still ran a node.

This is not a design question — ADR 003 § Node Registry already asserts the intended
behaviour ("a full exit is just `deregisterNode` followed by `unbond()`", "an operator
who changes their mind can re-register without re-funding"). The contract contradicted
its own source of truth. `deregisterNode` now clears `declaredMbps`, so the documented
sequence works: `deregisterNode()` -> `requestUnbond(activeBond)` -> window -> `unbond()`.

The clear is announced via `MbpsDeclared(operator, old, 0)` rather than written
silently — that event is the only tier signal an indexer has, and a second quiet
writer would desync it. It is skipped entirely when no tier was ever declared, so a
never-declared operator pays no SSTORE and logs no 0 -> 0 no-op. No new event or
selector, so the frozen interface is untouched; +105 bytes of runtime, leaving 1,214
of EIP-170 headroom.

**#1352 — no slash/appeal gate on `requestUnbond`, deliberately.** #1033 listed
"unbond blocked while a slash/appeal is pending" as a negative case. That was wrong,
and the contract is right. ADR 026 § Unbonding window already argues the 14-day
window outlasts SlashJudge's 5-day evidence window by 9 days and that slashing during
unbonding is permitted, so a gate adds nothing an honest challenger needs — while
handing a griefing challenger an indefinite freeze on an honest operator's exit, with
no expiry to unstick a challenge that is never revealed. Recorded in ADR 026 in place;
the spec anchor #1352 cites does not exist (no file in the workspace contains the
string G-NODE-06), so the wrong text lived only in the closed #1033. The G-NODE-06
module docs now say the missing assertion is deliberate, so nobody "fixes" it later.

**#1354 — four `decdn node unbond` behaviours only the real binary can reach.**
`--dry-run` and the headless confirmation refusal go in before step 1 while the state
is clean and cost no chain time; a below-crossover `--to-mbps 10` and a real `--all`
release are appended after step 6. The `--all` leg is the one that had never run end
to end — step 3 only reached its already-in-flight error — and it is where `--all`'s
bare curve floor visibly differs from `--to-mbps`'s `max(minBond, curve)`: the same
tier retains 199.696… TOKEN under one and 50,000 under the other. Every expected
amount is re-derived from chain state, so a governance retune of the curve fails
loudly rather than passing vacuously.

Tests: all four new e2e legs and three of the four new Solidity tests were
mutation-verified (drop the dry-run short-circuit; make `--all` retain `minBond`, or
one base unit above the curve; drop `--to-mbps`'s `minBond` floor; turn the headless
refusal into a bypass; remove the `declaredMbps` clear). The fourth Solidity test
guards the `oldMbps != 0` skip and was verified by removing that guard. The journey
runs in ~18 s locally against a 780 s ceiling, so `OVERALL_TIMEOUT` is unchanged.
`.gas-snapshot` regenerated.

Follow-up: #1359 — `deregisterNode` still has no CLI surface, so the exit path is
named in `unbond`'s docs as a raw contract call.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 21, 2026 19:08
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@thiras, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Free

Run ID: aa8e7ab9-572b-43da-8fc4-442f38e64393

📥 Commits

Reviewing files that changed from the base of the PR and between ef43cbb and 9c9d261.

📒 Files selected for processing (9)
  • adr/003-payments.md
  • adr/019-node-onboarding.md
  • adr/026-tokenomics.md
  • adr/appendix-operator-key-rotation.md
  • contracts/.gas-snapshot
  • contracts/src/CapacityBond.sol
  • contracts/test/CapacityBond.t.sol
  • crates/cli/src/commands/unbond.rs
  • crates/e2e/tests/g_node_06_unbond.rs

Walkthrough

Deregistration now clears a node operator’s declared capacity tier without moving the bond. The contract tests cover event behavior, full exit, and re-registration. ADRs, operator procedures, CLI documentation, gas snapshots, and end-to-end tests describe and validate the updated unbonding lifecycle.

Changes

Node exit lifecycle

Layer / File(s) Summary
Deregistration tier reset and full exit
contracts/src/CapacityBond.sol, contracts/test/CapacityBond.t.sol, contracts/.gas-snapshot
deregisterNode clears non-zero declaredMbps values and emits the corresponding event; tests cover no-op events, full exit, bond preservation, and fresh declaration after re-registration.
Lifecycle specifications and rotation procedures
adr/003-payments.md, adr/019-node-onboarding.md, adr/026-tokenomics.md, adr/appendix-operator-key-rotation.md
ADR and rotation procedures describe tier clearing, separate deregistration and unbonding, re-declaration, and the unbonding-window sequence.
CLI unbond behavior and end-to-end coverage
crates/cli/src/commands/unbond.rs, crates/e2e/tests/g_node_06_unbond.rs
CLI documentation and end-to-end tests cover dry runs, confirmation failures, below-crossover unbonding, full release, receipt fields, and resulting node inactivity.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant CLI
  participant CapacityBond
  participant UnbondingWindow
  Operator->>CLI: request unbond or full exit
  CLI->>CapacityBond: deregisterNode()
  CapacityBond->>CapacityBond: clear declaredMbps
  CLI->>CapacityBond: requestUnbond(amount)
  CapacityBond->>UnbondingWindow: start unlock period
  Operator->>CLI: unbond after unlock
  CLI->>CapacityBond: unbond()
  CapacityBond-->>Operator: release permitted bond
Loading

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Contracts coverage

Line coverage: 89.16% (2509/2814 lines)
▲ +0.23pp vs base (88.94% → 89.16%)
Run: 29861880566

@github-actions

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

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 aligns CapacityBond’s unbonding/exit semantics with the ADRs by making deregistration clear the declared-capacity tier (enabling full bond exit), documenting the intentional absence of a slash/appeal gate on requestUnbond, and extending the G-NODE-06 e2e journey to cover real-binary-only unbond behaviors.

Changes:

  • Contracts: deregisterNode now clears declaredMbps (with an explicit MbpsDeclared(old, 0) signal) so a full exit can proceed via deregisterNode() -> requestUnbond(activeBond) -> unbond().
  • Tests: add Solidity coverage for deregistration tier-clearing, full exit, and re-registration behavior; extend e2e coverage for --dry-run, headless confirmation refusal, below-crossover --to-mbps, and a real --all release.
  • Docs/ADRs: update ADR 003/019/026 and operator key-rotation appendix to reflect the clarified exit sequence and the deliberate “no slash/appeal gate” decision.

Reviewed changes

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

Show a summary per file
File Description
crates/e2e/tests/g_node_06_unbond.rs Adds additional G-NODE-06 legs to exercise dry-run, headless refusal, below-crossover --to-mbps, and a real --all unbond path.
crates/cli/src/commands/unbond.rs Updates command documentation to clarify that --all is not a full exit while registered; exit requires on-chain deregisterNode.
contracts/src/CapacityBond.sol Clears declaredMbps on deregisterNode, emitting MbpsDeclared(old, 0) to keep indexers consistent.
contracts/test/CapacityBond.t.sol Adds tests covering tier clearing on deregistration, “never declared” emission behavior, full exit flow, and re-registration requirements.
contracts/.gas-snapshot Regenerates gas snapshot to reflect bytecode and test-suite changes.
adr/appendix-operator-key-rotation.md Updates key-rotation procedure to use requestUnbond(activeBond) and clarifies declaredMbps clearing implications.
adr/026-tokenomics.md Documents full-exit semantics via deregistration and records that requestUnbond has no slash/appeal-pending gate by design.
adr/019-node-onboarding.md Notes that deregistration clears declaredMbps and that re-registration requires re-declaring capacity.
adr/003-payments.md Updates the node-registry section to reflect tier-clearing on deregistration and the correct unbonding sequence.

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

@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Coverage report

Total: 81.54% (was 81.52%, ▲ +0.02%) — 52824/64785 lines

File Coverage Lines Δ
crates/cli/src/commands/unbond.rs 71.45% 483/676 ● 0.00%
History
Commit Total Δ vs base
ef43cbb 81.52% ● 0.00%
9c9d261 (HEAD) 81.54% ▲ +0.02%

… can actually reach

Review follow-ups on #1360. Three independent reviews converged on the same
defect: the ADR text I added asserted an invariant the contract does not have.

`deregisterNode` requires an active node, but `declareMbps` carries no such
gate. So a tier can be declared in states from which it can never be cleared,
and in each the operator stays pinned at `bondRequired(declaredMbps)`:

- bonded and declared but never registered — the state `decdn node bond --mbps N`
  leaves behind on its own;
- auto-ejected on slashing, blacklist-ejected, or displaced by `reclaimNodeId`.

Measured on an operator onboarded at 1000 Mbps and slashed to auto-ejection:
10,126 TOKEN remains, the standing floor is 50,161, `deregisterNode` reverts
`NodeNotActive` and `requestUnbond(1)` reverts `BondBelowCurve` — not one wei is
withdrawable, and freeing it costs ~4x the trapped amount in fresh capital.

That is not a regression (before this branch the floor was permanent for every
operator), and it is not fixed here: clearing the tier on the involuntary paths
would let a just-slashed operator immediately begin withdrawing their entire
remaining bond, which is a slashing-economics decision for ADR 026 rather than a
mechanical fix. It is now stated accurately in ADR 026, pinned by a test, and
tracked in #1361.

`test_ejectedOperator_keepsTheTierAndCannotUnbond` fences the boundary so
closing the gap is a deliberate, visible change.
`test_deregisterNode_preservesUnbondingSlashStampAndFirstBonded` fences the
other direction — this commit's predecessor turned `deregisterNode` from a pure
deactivator into a state-clearing function, which invites a later "finish the
cleanup" refactor. Deleting `unbondingOf` there would orphan escrowed TOKEN with
no withdrawal path; clearing `_slashedAtEpoch` would let an operator launder a
slash out of their ADR 036 voting weight by cycling deregister/re-register.
Mutation-verified by adding `delete unbondingOf[msg.sender]` to `deregisterNode`.

Doc corrections, all verified against the contract rather than carried over:

- ADR 019 § Re-Onboarding said "two differences" while listing three, and its
  new item 3 was false for the auto-ejection cohort the section exists to serve.
- The key-rotation appendix still claimed "only `deregisterNode` triggers
  unbonding" fifty lines below the steps that were fixed for saying exactly that.
- ADR 003's `reclaimNodeId` paragraph said it behaves "exactly as
  `deregisterNode`" (no longer true — reclaim does not clear the tier) and
  repeated the `unbond()`-starts-the-window error corrected earlier in the file.
- Three sites quoted ADR 003's pre-rewrite sentence verbatim, preserving inside
  quotation marks the very wording this branch replaced.
- The appendix's new `declaredMbps` row sat in the "does not carry over" table
  while its own text conceded the tier survives that path; moved to "survives"
  alongside its `firstBondedAt` precedent.
- `MbpsDeclared` is the only *log-based* tier signal, not the only signal —
  `declaredMbps` is a public mapping and ADR 016 documents indexers polling it.
- The e2e note cited "ADR 026 § Unbonding window", which is not a section.

Also: the `declaredMbps` NatSpec now states the invariant (every write emits
`MbpsDeclared`) rather than counting writers, which would go stale silently the
moment #1361 adds a third; e2e legs 7-9 assert `phase` on their withdrawals so a
surprise reports by name instead of cascading into a bare non-zero exit two legs
later; and `_onboardAtTier` reads `minBond` off the contract like its
`_bondForMbps` neighbour.

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

thiras commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Review round: three agents (correctness, test coverage, comment/ADR accuracy)

All three converged on the same defect, and it was mine — not in the contract change, but in the ADR text I wrote around it. Fixed in 9c9d2610.

The finding

ADR 026 asserted "leaving the active set is the only thing that releases [the curve floor]". False. deregisterNode requires an active node; declareMbps has no such gate. So a tier can be declared in states from which it can never be cleared:

  1. Bonded and declared, never registered — the state decdn node bond --mbps N leaves behind on its own.
  2. Auto-ejected, blacklist-ejected, or displaced by reclaimNodeId — all deactivate without touching the tier.

Measured rather than reasoned (throwaway Foundry probe, since removed): an operator onboarded at 1000 Mbps and slashed to auto-ejection keeps 10,126 TOKEN against a standing floor of 50,161. deregisterNode reverts NodeNotActive, requestUnbond(1) reverts BondBelowCurve — not one wei is withdrawable, and freeing it costs ~4x the trapped amount in fresh capital.

Why it is not fixed here

Clearing the tier inside _ejectNodeEffects is a one-liner that would make every ADR statement uniformly true. It would also let a just-slashed operator immediately start withdrawing their entire remaining bond. That is a slashing-economics decision for ADR 026, not a mechanical fix, so it is now stated accurately, pinned by a test, and tracked in #1361 with the options and the EIP-170 budget written up.

Note this is not a regression — before this branch the floor was permanent for every operator, not just ejected ones.

Changes

Tests (both mutation-verified):

  • test_ejectedOperator_keepsTheTierAndCannotUnbond — fences the boundary of the fix so closing it later is deliberate and visible.
  • test_deregisterNode_preservesUnbondingSlashStampAndFirstBonded — fences the other direction. This PR turned deregisterNode from a pure deactivator into a state-clearing function, which invites a later "finish the cleanup" refactor: deleting unbondingOf would orphan escrowed TOKEN with no withdrawal path, and clearing _slashedAtEpoch would let an operator launder a slash out of their ADR 036 voting weight by cycling deregister/re-register.

Doc corrections — each verified against the contract, not carried over:

  • ADR 019 said "two differences" while listing three, and its new item 3 was false for the auto-ejection cohort that section exists to serve.
  • The key-rotation appendix still claimed "only deregisterNode triggers unbonding" fifty lines below the steps this PR fixed for saying exactly that.
  • ADR 003's reclaimNodeId paragraph claimed it behaves "exactly as deregisterNode" (no longer true) and repeated the unbond()-starts-the-window error corrected earlier in the same file.
  • Three sites quoted ADR 003's pre-rewrite sentence verbatim — preserving in quotation marks the very wording this PR replaced.
  • The new appendix table row sat in "does not carry over" while its own text conceded the tier survives that path.
  • MbpsDeclared is the only log-based tier signal, not the only signal (declaredMbps is public and ADR 016 documents indexers polling it).
  • The e2e note cited "ADR 026 § Unbonding window", which is not a section.

Robustness: the declaredMbps NatSpec now states the invariant (every write emits MbpsDeclared) instead of counting writers, which would go stale silently the moment #1361 adds a third; e2e legs 7–9 assert phase on their withdrawals so a surprise reports by name instead of cascading two legs later.

Not taken

  • --all/--to-mbps e2e legs are partly redundant with the mocked unit tests. True for the arithmetic; the legs' unique value is the on-chain consequence (is_active flipping, real TOKEN movement) that the mocked provider cannot reach. Kept.
  • Splitting the negative assertion out of test_fullExit_deregisterThenUnbondEverything. The pre-deregister BondBelowCurve revert is redundant with test_requestUnbond_revertsWhenItDropsBelowCurve, but it reads as the narrative precondition for the exit. Kept.

Re-verified: forge test 759 passed, --sizes --deny warnings clean at 1,214 bytes of headroom, slither exit 0, aderyn 0 high, .gas-snapshot regenerated, clippy/doc/deny clean, e2e journey green in ~18 s.

@thiras
thiras merged commit 98b2ebf into main Jul 21, 2026
23 checks passed
@thiras
thiras deleted the fix/unbond-followups-1351-1352-1354 branch July 21, 2026 19:43
thiras added a commit that referenced this pull request Jul 21, 2026
…1361) (#1362)

Six filed review follow-ups from the #1360 and #1341 reviews, plus the residual half of #1347.

- #1361 — `CapacityBond.declareMbps(0)` accepted from an inactive operator, releasing a tier four deactivation paths could otherwise never clear. Active operators still revert. +49 bytes.
- #1359 — new `decdn node deregister`; `unbond --all` issues `declareMbps(0)` for unregistered operators, without which #1361 had no CLI path.
- #1348 — `decdn_protocol::Region` newtype; `region_hint` `String` -> `Option<Region>`; `PEER_CACHE_VERSION` 1->2.
- #1349 — registry retry budget made aggregate across pages; `--timeout-ms` bounds the registry read.
- #1347 — `tx::run_then_cleanup` extracted and tested; deferral note corrected.
- #1346 — `[cache] peer_cache_path` dropped from ADR 012.

A five-agent review before opening the PR found and fixed: the discovery timeout cancelling the ADR-012 peer-cache fallback; a "trapped bond" justification overstated ~100x (a tier-down declaration always released all but `bondRequired(minCapacityMbps)` — 199.7 of 20,252.7 TOKEN was actually trapped); two vacuous tests that passed with their feature mutated out; `--region usa` silently ignored; and stale claims in ADR 003 and the contract NatSpec.

Copilot review: fixed `Region`'s deserializer echoing rejected input into operator-facing errors. Pushed back on a claimed missing `Future` import — it is in the Rust 2024 prelude and the crate compiles.

Closes #1346, #1347, #1348, #1349, #1359, #1361.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants