Conversation
|
PR author is not in the allowed authors list. |
…RecoverClient Keeper.RecoverClient routes to the subject's light client module and then calls Status and LatestHeight on that module with the substitute client identifier. If the substitute is of a different client type (for example a 07-tendermint subject with a 06-solomachine or 08-wasm substitute), the module unmarshals the substitute client state and panics on the concrete type assertion instead of returning an error. Compare the client types parsed from both identifiers before touching the substitute store and return ErrInvalidClientType, and cover the case in TestRecoverClient. Signed-off-by: Kanan <93033289+kriss39@users.noreply.github.com>
kriss39
force-pushed
the
fix/recover-client-type-mismatch
branch
from
September 13, 2026 20:51
7fa0e82 to
79e4ecf
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9080 +/- ##
==========================================
+ Coverage 66.81% 66.82% +0.01%
==========================================
Files 329 329
Lines 17485 17491 +6
==========================================
+ Hits 11682 11688 +6
Misses 5069 5069
Partials 734 734
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Description
Keeper.RecoverClientroutes to the subject's light client module and then callsStatusandLatestHeighton that module with the substitute client identifier. If the substitute is of a different client type (for example a07-tendermintsubject with a06-solomachineor08-wasmsubstitute), the module unmarshals the substitute client state and panics on the concrete type assertion instead of returning an error.This PR compares the client types parsed from both identifiers before touching the substitute store and returns
ErrInvalidClientType.TestRecoverClientgains cases for a substitute of a different client type (panics onmain) and for an unparsable substitute identifier; the existing "substitute client does not exist" case now uses a well-formed but unknown tendermint client ID.closes: #9075
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/) if anything is changed. (n/a — no documented behaviour changes)godoccomments if relevant.Files changedin the GitHub PR explorer.