Skip to content

Fix retired node's signature test#7909

Open
maxtropets wants to merge 4 commits into
microsoft:mainfrom
maxtropets:f/fix-retired-signing-assertion
Open

Fix retired node's signature test#7909
maxtropets wants to merge 4 commits into
microsoft:mainfrom
maxtropets:f/fix-retired-signing-assertion

Conversation

@maxtropets
Copy link
Copy Markdown
Collaborator

@maxtropets maxtropets commented May 26, 2026

Unblock #7904.

The test is incorrect due to missing nid.decode() and fails in CI when corrected, as spotted during #7904.

I've decided to make it a standalone fix for the sake of better visibility.

Retired node can sign until it's retired_committed.

@maxtropets maxtropets self-assigned this May 26, 2026
@maxtropets maxtropets marked this pull request as ready for review May 26, 2026 15:43
@maxtropets maxtropets requested a review from a team as a code owner May 26, 2026 15:43
Copilot AI review requested due to automatic review settings May 26, 2026 15:43
@maxtropets maxtropets changed the title Fix retired sign test Fix retired node signature test May 26, 2026
@maxtropets maxtropets changed the title Fix retired node signature test Fix retired node's signature test May 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates an end-to-end reconfiguration test to correctly reason about when a retired node should stop emitting signatures, using the retired_committed field from the ledger and fixing node ID decoding while iterating ledger tables.

Changes:

  • Renames and rewords the retired-node signature test to assert signatures stop after retired_committed is observed in the ledger.
  • Fixes node ID handling when reading public:ccf.gov.nodes.info from the ledger by decoding node IDs from bytes before comparing with signature records.
  • Updates the run_all() sequence to call the renamed test.

Custom instructions used:

  • .github/copilot-instructions.md

Comment thread tests/reconfiguration.py Outdated
Comment thread tests/reconfiguration.py
Comment thread tests/reconfiguration.py
# Once that chain-closer has been seen, the node's
# retired_committed hook must have fired, so any further
# signature from that node is a violation.
assert not rc_globally_committed.get(signing_node, False), (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert not rc_globally_committed.get(signing_node, False), (
assert signing_node not in rc_globally_committed or not rc_globally_committed.get(signing_node), (

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.

3 participants