feat: warn when a new auto-renewed validator is not connected - #39
Open
owenwahlgren wants to merge 1 commit into
Open
feat: warn when a new auto-renewed validator is not connected#39owenwahlgren wants to merge 1 commit into
owenwahlgren wants to merge 1 commit into
Conversation
Auto-renewal is conditioned on reward eligibility, so a node the network cannot reach is removed at the first cycle boundary and forfeits that cycle's rewards instead of renewing. Nothing in the flow surfaced this: add-auto-renewed printed a TX ID and exited even when the validator was never visible to the network. After the transaction is accepted, look the validator up with platform.getCurrentValidators and warn when it is not connected. The transaction has already landed at that point, so every failure here is advisory and never changes the exit status.
owenwahlgren
force-pushed
the
feat/warn-auto-renewed-validator-not-connected
branch
from
July 28, 2026 21:26
2260db5 to
6f8eea4
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.
Auto-renewal is conditioned on reward eligibility, so a node the network cannot reach is removed at the first cycle boundary and forfeits that cycle's rewards instead of renewing. Nothing in the flow surfaced this:
add-auto-renewedprinted a TX ID and exited successfully even when the validator was never visible to the network.This is not hypothetical. Registering a validator whose node was unreachable produced a committed transaction, a validator in the set with
connected: falseanduptime: 0.0000, and no indication anything was wrong.What changed
pchain.GetValidatorHealthreads theconnectedanduptimefields thatplatform.getCurrentValidatorsreports for a node on the primary network.add-auto-renewedcalls it after the transaction is accepted and warns when the validator is not connected, pointing at the usual causes (node not running,--public-ipunset, inbound 9651 blocked).The transaction has already landed by then, so every failure in the check is advisory: it never changes the exit status, and a lookup error or a validator not yet visible prints a note rather than an error.
Verification
go build ./...,gofmt -l .clean, fullgo test ./...green. Six new table-driven tests cover connected, disconnected, missing uptime, absent validator, an unrelated node ID, and an unparseable uptime, reusing the existingnewCurrentValidatorsServerstub. The response shape was confirmed against a live Fuji auto-renewed validator.Notes
Scoped to
add-auto-renewed, where the consequence is losing the position.add-permissionlesscould reuse the same helper, where the consequence is only a missed reward. Left out to keep this to one concern.