fix(dendrite): skip axon on is_validator RPC failure instead of silently including (#168)#300
Open
RUNECTZ33 wants to merge 1 commit into
Open
fix(dendrite): skip axon on is_validator RPC failure instead of silently including (#168)#300RUNECTZ33 wants to merge 1 commit into
RUNECTZ33 wants to merge 1 commit into
Conversation
…tly including (entrius#168) dendrite_lite.discover_validators wrapped contract_client.is_validator in 'try / except Exception: pass'. The pass falls through to axons.append(axon), so any RPC failure during validator-permit checking silently includes the unverified hotkey in the broadcast list. Issue entrius#73 / PR entrius#92 already addressed the same pattern on the validator-side dendrite. CLI dendrite needs parity. Fix: bind the exception, log a debug message naming the uid + hotkey prefix + RPC error, and 'continue' so unverified hotkeys are dropped from the axon list. Matches the existing 'continue' branches above for 'no validator_permit' and 'not is_serving'. Closes entrius#168
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.
Summary
Closes #168.
dendrite_lite.discover_validators(allways/cli/dendrite_lite.py:60-66) wrapscontract_client.is_validator(...)intry / except Exception: pass. Thepassfalls through toaxons.append(axon), so any RPC failure during validator-permit checking silently includes the unverified hotkey in the CLI broadcast list. Issue #73 / PR #92 already addressed the same pattern on the validator-side dendrite — CLI parity here.Change
Bind the exception, log a debug message naming the uid + hotkey prefix + RPC error, and
continue. Matches the existingcontinuebranches above fornot validator_permitandnot is_serving.Why this is safe
discover_validatorsrejects responses from non-validators — surfacing viaconfusing rejectionrather thanquietly skipping that hotkey upstream. Better to drop early.--logging.debugwithout polluting the normal CLI experience.Scope
allways/cli/dendrite_lite.py: +11 / -2. No new imports (bt.logging already imported).Test plan
python3 -c "import ast; ast.parse(open('allways/cli/dendrite_lite.py').read())"bt.loggingis imported at top of file (line 5).