Skip to content

test(e2e): cover authorized-origin revocation and staker deactivation #1373

Closed

Description

@yigitdot

Follow-up from the review of #1366. G-NODE-08 covers the gate opening; nothing covers it closing again.

ChainOriginDirectory handles AssignmentRevoked, BlacklistedAssignmentPruned and DefaultOpenOperatorRemoved (crates/node/src/dht/chain_origin_directory.rs:506-560), and active_node_for (:161) filters candidates against StakerSet::is_active. None of that is exercised end to end.

Three behaviors worth pinning, roughly in value order:

  1. Already-held content survives revocation. ADR 037 §85 is explicit that the gate covers pull initiation only, never a range the node already holds — refusing already-held content is ContentBlacklist's job. So after revoking, a blob already in the store must still serve. This is the dual of G-NODE-08's cached-blob control and the invariant most likely to regress if someone later 'tightens' the gate.
  2. The gate re-closes on revoke. After revokeAssignment(namespace, operator), a fresh backend-only hash in that namespace must go back to refusing. It needs to be a fresh hash — the ones G-NODE-08 uses are cached by then. OriginAssignment.revokeAssignment is at contracts/src/OriginAssignment.sol:232; ChainFixture has no wrapper yet, so one is needed alongside propose_assignment.
  3. Staker deactivation re-closes the gate with no OriginAssignment event at all — if the assigned operator unbonds, active_node_for drops it. g_node_06_unbond.rs already has the mechanics to borrow.

Note there is no expiry case to test: OriginAssignment has no time-bounded assignments.

Activity

  1. added
    kind:test
    rust
    prio:medium
    on Jul 22, 2026
  2. self-assigned this
    on Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:testprio:mediumrust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions