Repository navigation
validator_guard: do not call a working agent key a broken one - #271
Merged
Merged
Conversation
The startup authority check looked only at account_authority_object.active.key_auths. An agent key (HF15) is by design NOT there, yet it can sign validator_update, so the plugin told the operator 'Restoration will fail' about a configuration that works — measured on testnet 2026-11-09: the agent-signed update rotated the validator signing key while this warning was printed at every start. Ask the same hook the chain uses (agent_operation_allowed) with a validator_update probe for that principal and key. Delegated -> ilog naming it; neither active nor delegated -> the warning stays, and now says what is actually missing. An inconclusive probe (exception) falls through to the warning rather than to the reassuring branch: 'could not check' must not read as 'allowed'.
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.
Problem
The startup authority check (
plugin_initialize) looks only ataccount_authority_object.active.key_auths:An agent key (HF15) is by design not in
active.key_auths, yet it can signvalidator_update. Measured on testnet 2026-11-09: withfaucet3holding a null signing key and an agent granted onlyvalidator_update, that warning was printed at every start — and the agent-signed update did rotate the validator signing key.So the plugin reports "restoration will fail" about a setup it is about to make work. That is misleading exactly for the deployment this feature is aimed at (a host that holds a scoped agent key instead of the account's active key).
Change
When the configured key is not in
active.key_auths, ask the same hook the chain uses —graphene::chain::agent_operation_allowed(db, validator_update_operation{owner}, owner, key):ilog … is an AGENT key with delegated 'validator_update' — restoration will use it;An exception from the probe falls through to the warning, not to the reassuring branch: "could not check" must not read as "allowed".
Verification
-fsyntax-only: rc 0.docker-pr-build.ymland the log line can be checked live on testnet the same way the transport fix was (null key + agent grant).🤖 Generated with Claude Code