-
Notifications
You must be signed in to change notification settings - Fork 4.1k
feat: allow query validator-historical-rewards for distribution #25650
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25650 +/- ##
==========================================
+ Coverage 70.42% 70.46% +0.03%
==========================================
Files 830 830
Lines 54052 54134 +82
==========================================
+ Hits 38068 38146 +78
- Misses 15984 15988 +4
🚀 New features to boost your workflow:
|
| replace github.com/cosmos/cosmos-sdk => ../ | ||
| replace ( | ||
| cosmossdk.io/api => ../api | ||
| cosmossdk.io/x/tx => ../x/tx |
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.
why is this needed?
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.
need replace api in systemtest, and we need to avoid dep like
systemtests git:(distr_cli) go mod why cosmossdk.io/api/cosmos/group/v1
# cosmossdk.io/api/cosmos/group/v1
cosmossdk.io/systemtests
github.com/cosmos/cosmos-sdk/codec/types
cosmossdk.io/x/tx/signing
cosmossdk.io/x/tx/signing.test
cosmossdk.io/api/cosmos/group/v1
| // Below are the long-lived replace of the SimApp | ||
| replace ( | ||
| cosmossdk.io/api => ../api | ||
| cosmossdk.io/x/tx => ../x/tx |
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.
why is this needed
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.
autocli need latest api to work
| } | ||
|
|
||
| // ValidatorHistoricalRewards queries historical rewards for a validator at a specific period | ||
| func (k Querier) ValidatorHistoricalRewards(ctx context.Context, req *types.QueryValidatorHistoricalRewardsRequest) (*types.QueryValidatorHistoricalRewardsResponse, 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.
all of these functions should be tested 🙏
Description
These queries enable debugging reward calculations by allowing user to inspect internal distribution state without exporting genesis at specific heights. User can query
delegator-starting-infoto get the previous period and stake, then usevalidator-historical-rewardswith that period to retrieve cumulative reward ratios for accurate reward verification.