-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(testing): use the correct revision height when querying trusted validator set #4483
Conversation
} | ||
|
||
histInfo, ok := chain.App.GetStakingKeeper().GetHistoricalInfo(chain.GetContext(), height) | ||
func (chain *TestChain) GetValsAtHeight(trustedHeight int64) (*cmttypes.ValidatorSet, bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a followup pr I will change this api:
func (chain *TestChain) GetTrustedValidators(trustedHeight clienttypes.Height) (*cmttypes.ValidatorSet, error) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if validator sets in historical info at height n
are consistent with whats returned from the consensus service grpc. It may be worth checking that, but I'm not sure how exactly we would access this consensus service from our testing lib without doing a bit of digging.
The sdk team have been discussing making changes to historical info, potentially removing the validator set info. It would be good to make sure there is a backup option for our testing library if that happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for going down this rabbit hole and fixing the issue in a clean way, @colin-axner!
My vote would be to keep a map in the TestChain struct which goes from clienttypes.Height -> validator set, can be updated for each block committed, already thought about making the change just for readability |
…alidator set (backport #4483) (#4505) * fix: use the correct revision height when querying trusted validator set in testingpkg (#4483) (cherry picked from commit 4e0bea7) # Conflicts: # testing/chain.go * fix conflicts * fix import types --------- Co-authored-by: colin axnér <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]>
…alidator set (backport #4483) (#4506) * fix: use the correct revision height when querying trusted validator set in testingpkg (#4483) (cherry picked from commit 4e0bea7) # Conflicts: # testing/chain.go * fix conflicts --------- Co-authored-by: colin axnér <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]>
Description
see ref comment
ref: #4484
Commit Message / Changelog Entry
see the guidelines for commit messages. (view raw markdown for examples)
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/
) or specification (x/<module>/spec/
).godoc
comments.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.