-
Notifications
You must be signed in to change notification settings - Fork 609
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
x/incentives: cli updates #1985
Conversation
Still having the issue mentioned here For some addresses the rewards estimation is fine and others it panics. Here is a random one I found on mintscan as a panic example: Using this branch will give you a panic (using main wont work at all since this query has been broken, I modified the query in this PR to try to get it to work as intended. When presented with just an address and no explicit lock-ids this command was supposed to utilize all locks the user has that are active, but that is not the behavior on main) You can use This address though, with multiple locks, gives a valid response: EDIT: Fixed as far as I can without implementing accumulation store fix |
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 don't have a clear suggestion but I'm wondering if it is possible to decouple the command logic from the flags provided. In my opinion, having so many edge cases makes it likely for something wrong to happen
Co-authored-by: Roman <[email protected]>
Co-authored-by: Roman <[email protected]>
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 suggest we not merge this until we fix the bug in GetCmdUpcomingGaugesPerDenom
Can you try running binary with --debug to see the specific error / panic message? |
@mattverse running with debug logs still provides the same panic message:
I wish we didn't have this panic message, it makes debugging so difficult -_- |
Which bug are you referring to? |
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.
comment updates LGTM, and the GetRewardsEst logic. (beyond the comment I left)
Lets capture the remaining mystery problem there into an issue that we add to a backlog?
Didn't review cli_test changes in detail, but I'm also generally not concerned with the cli_tests
According to Dev, pools that existed prior to v4 or v5 have an incorrect/negative accumulation store value. After porting the redacted error fix from the sdk, I was able to see that the accumulation store was in fact returning a negative number which was causing the error. Looking into either fixing this or merging this as is and fixing this problem in a future PR |
Awesome, thanks! |
Backport this |
* incentives cli updates * linter fix * Update x/incentives/client/cli/query.go Co-authored-by: Roman <[email protected]> * Update x/incentives/client/cli/query.go Co-authored-by: Roman <[email protected]> * make Roman suggestions * make review suggestions * revert suggestion * address roman comment error verbiage * linter * address review comments * get est rewards fix * fix comment Co-authored-by: Roman <[email protected]> (cherry picked from commit 079bdd4) # Conflicts: # x/incentives/client/cli/cli_test.go # x/incentives/client/cli/query.go
* x/incentives: cli updates (#1985) * incentives cli updates * linter fix * Update x/incentives/client/cli/query.go Co-authored-by: Roman <[email protected]> * Update x/incentives/client/cli/query.go Co-authored-by: Roman <[email protected]> * make Roman suggestions * make review suggestions * revert suggestion * address roman comment error verbiage * linter * address review comments * get est rewards fix * fix comment Co-authored-by: Roman <[email protected]> (cherry picked from commit 079bdd4) # Conflicts: # x/incentives/client/cli/cli_test.go # x/incentives/client/cli/query.go * fix conflicts Co-authored-by: Adam Tucker <[email protected]>
Part of: #1837
What is the purpose of the change
Audit, clean up, and test modifications for the incentives module
This is part 2 of 4:
Brief Changelog
Testing and Verifying
This change is already covered by existing tests, such as cli_test.go within the incentives module
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? no