You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #684 added regionPrev / regionLastChanged / updateRegion on CapacityBond per ADR 030, with a smoke test covering the cooldown branch. The full e2e — register a node with a real EIP-712 + ed25519 signature, then attest a region change — is deferred because the test harness needs the registerNode signing path, which depends on the production IEd25519Verifier (#669).
Scope
Build a Foundry test harness that produces valid EIP-712 + ed25519 signatures over the registerNode digest.
Replace the unit-level cooldown smoke test with an end-to-end flow: keygen → registerNode (signed) → updateRegion (within cooldown reverts; after cooldown succeeds; replay rejected).
Cover the cross-contract ejectNode path triggered when regionLastChanged falls outside the attestation window.
This is a well-scoped follow-up test task from PR #684, tracking the deferred full e2e coverage for CapacityBond.updateRegion per ADR 030. It requires building a Foundry EIP-712 + ed25519 signing harness once the production IEd25519Verifier (blocked on #669) lands, then wiring it into keygen → registerNode → updateRegion flow with cooldown, replay, and ejectNode cross-contract path coverage. Hard blocker is clearly identified; the issue will become actionable as soon as #669 closes.
📊 Assessment
Dimension
Value
Reasoning
Type
Task
Pure test-authoring work with no production contract changes
Labels
unchanged (technical, blocked, testing)
Existing labels are accurate; no additions needed
Coding agent
Needs more info
Scope is clear but cannot start until #669 delivers the production IEd25519Verifier; once unblocked this becomes straightforward Foundry test work suitable for an agent
Implement a Foundry test helper (Ed25519TestHelper or inline FFI) that generates a valid EIP-712 + ed25519 signature over the registerNode digest using a test ed25519 keypair (Rust FFI via --ffi is the standard approach here — dalek vectors can be generated in a small Rust binary and output hex for vm.ffi).
Replace the existing cooldown smoke test with a keygen → registerNode (signed) → updateRegion flow.
Assert: updateRegion within cooldown reverts.
Assert: updateRegion after cooldown succeeds and updates regionPrev / regionLastChanged.
Assert: replay of the same region update is rejected.
Cover the ejectNode cross-contract path when regionLastChanged falls outside the attestation window.
Implementation notes:
The registerNode digest follows the pattern in StakingRegistry: keccak256(abi.encodePacked(nodeId, msg.sender, block.chainid, registrationNonce[nodeId])). Make sure the Foundry harness constructs this digest identically before signing.
Use vm.warp or skip() to advance time past the cooldown for the positive branch.
FOUNDRY_PROFILE=ci forge build --sizes --deny warnings must stay clean — pay attention to the W5740 (unreachable code) trap if any test stub always reverts with a nonReentrant modifier.
Scope item 3 ("cover the cross-contract ejectNode path triggered when regionLastChanged falls outside the attestation window") has no production implementation in the current revision. ADR 030's region-ripening predicate that reads regionPrev/regionLastChanged is not yet wired into any contract — per contracts/src/CapacityBond.sol:264-272, "no contract reads it in this revision … the ripening leg lands with the ADR 030 enforcement PR." The only cross-contract ejectNode caller that exists today is the blacklist-driven ContentBlacklist.addOperator → CapacityBond.ejectNode.
PR #760 therefore covers that existing blacklist-driven path (and documents the deferral inline). The region-window-triggered eligibility/eject is tracked in #761 (ADR 030 enforcement); the e2e suite should be extended with the ripening-predicate assertions once that lands.
Activity
github-actions commentedon May 28, 2026
🎯 Triage report
This is a well-scoped follow-up test task from PR #684, tracking the deferred full e2e coverage for
CapacityBond.updateRegionper ADR 030. It requires building a Foundry EIP-712 + ed25519 signing harness once the productionIEd25519Verifier(blocked on #669) lands, then wiring it into keygen →registerNode→updateRegionflow with cooldown, replay, andejectNodecross-contract path coverage. Hard blocker is clearly identified; the issue will become actionable as soon as #669 closes.📊 Assessment
technical,blocked,testing)IEd25519Verifier; once unblocked this becomes straightforward Foundry test work suitable for an agent🔗 Similar issues
IEd25519Verifierimplementation. This issue becomes actionable the moment feat(contracts): production IEd25519Verifier for on-chain NodeId ownership proof #669 is merged.StakingRegistry.registerNodeis part of that scope and shares the same EIP-712 + ed25519 signing infrastructure.💡 Notes and suggestions
Sub-task checklist (once #669 unblocks):
Ed25519TestHelperor inline FFI) that generates a valid EIP-712 + ed25519 signature over theregisterNodedigest using a test ed25519 keypair (Rust FFI via--ffiis the standard approach here — dalek vectors can be generated in a small Rust binary and output hex forvm.ffi).registerNode(signed) →updateRegionflow.updateRegionwithin cooldown reverts.updateRegionafter cooldown succeeds and updatesregionPrev/regionLastChanged.ejectNodecross-contract path whenregionLastChangedfalls outside the attestation window.Implementation notes:
registerNodedigest follows the pattern inStakingRegistry:keccak256(abi.encodePacked(nodeId, msg.sender, block.chainid, registrationNonce[nodeId])). Make sure the Foundry harness constructs this digest identically before signing.vm.warporskip()to advance time past the cooldown for the positive branch.FOUNDRY_PROFILE=ci forge build --sizes --deny warningsmust stay clean — pay attention to the W5740 (unreachable code) trap if any test stub always reverts with anonReentrantmodifier.Add this agentic workflows to your repo
To install this agentic workflow, run
yigitdot commentedon Jun 1, 2026
Scope item 3 — deferral note.
Scope item 3 ("cover the cross-contract
ejectNodepath triggered whenregionLastChangedfalls outside the attestation window") has no production implementation in the current revision. ADR 030's region-ripening predicate that readsregionPrev/regionLastChangedis not yet wired into any contract — percontracts/src/CapacityBond.sol:264-272, "no contract reads it in this revision … the ripening leg lands with the ADR 030 enforcement PR." The only cross-contractejectNodecaller that exists today is the blacklist-drivenContentBlacklist.addOperator → CapacityBond.ejectNode.PR #760 therefore covers that existing blacklist-driven path (and documents the deferral inline). The region-window-triggered eligibility/eject is tracked in #761 (ADR 030 enforcement); the e2e suite should be extended with the ripening-predicate assertions once that lands.
test(contracts): full ADR 030 updateRegion e2e — EIP-712 + ed25519 re…
feat(contracts): enforce ADR 030 region-ripening predicate in blackli…