Repository navigation
test(e2e): stop the daemon before the G-NODE-07 iroh rotation - #2736
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Code coverage overviewLanguages: Rust Rust / code-coverage/cargo-llvm-cov
View coverage of the 3 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
The rotation journey rotated with the daemon running, then restarted it with SIGKILL. A step-1 voucher the hint path had not redeemed yet was then held until the restarted daemon's next full redeem interval (300 s at the fixture default), past the 90 s settlement poll. A loaded run showed it: the daemon restarted 1.7 s after start with `lanes=1` and the poll failed "vouchers signed against the pre-rotation identity never settled on-chain". The journey now sends SIGTERM before the real rotation, as the runbook's "Stop" step does. The graceful shutdown's final redeem sweep settles the voucher, and the stopped daemon sends nothing from the operator key while the CLI sends `bindNodeId`. 10 loaded batches of the g_node_0* journeys plus node_pull_topup: all pass. Closes #2727 Co-Authored-By: Claude Opus 5.5 <[email protected]>
thiras
force-pushed
the
fix/2727-rotate-key-graceful-stop
branch
from
October 28, 2026 22:38
a1eb1f1 to
e316b5d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
g_node_07_rotate_key::rotate_key_rebinds_slashability_and_preserves_in_flight_vouchersrotated the iroh key with the daemon running, then restarted it withrestart().restart()sends SIGKILL, so the graceful shutdown's final redeem sweep never ran.A step-1 voucher that the hint path had not redeemed before the kill therefore waited for the restarted daemon's next full redeem interval. That is 300 s at the fixture default, because
redeemer_loopskips its first tick. The test's 90 sserved_bytespoll expired first.A loaded local run reproduced the CI failure:
lanes=1;vouchers signed against the pre-rotation identity never settled on-chain.The fix sends SIGTERM (
node.terminate) before the real rotation. This follows step 3 ("Stop") of the operator key rotation runbook.rotate-keyis documented to work with the daemon down, and steps 3–4 read only chain state. A stopped daemon also sends nothing from the operator key while the CLI sendsbindNodeId, which removes a nonce race of the #2721 kind.Closes #2727
Verification
binary(g_node_0*) | binary(node_pull_topup)with--retries 0, run while other e2e loops shared the host:rotate_key_rebinds…passed 10/10, and so did both siblingg_node_07tests.cargo fmt -- --checkandcargo clippy -p decdn-e2e --all-targets --all-features -- -D warningsare clean.🤖 Generated with Claude Code