-
Notifications
You must be signed in to change notification settings - Fork 607
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: genesis bug in pool incentives linking NoLock gauges and PoolIDs #6644
Conversation
// Validate that only one link for internal gauges is created | ||
s.Require().Equal(1, len(export.AnyPoolToInternalGauges.PoolToGauge)) | ||
|
||
// Validate that 2 links, one for external and one for internal gauge, are created |
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.
Modified the comment to this as the last comment threw me off
message AnyPoolToInternalGauges { | ||
repeated PoolToGauge pool_to_gauge = 2 [ (gogoproto.nullable) = false ]; | ||
} | ||
|
||
message ConcentratedPoolToNoLockGauges { | ||
repeated PoolToGauge pool_to_gauge = 1 [ (gogoproto.nullable) = false ]; |
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.
Not quite sure why these need their own message types when the underlying is the same, and the name can be changed in the actual message, but will not block on this and will not change this myself in the event this was intentional and its more of a nit.,
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.
Good find / change
Important Notice This PR modifies an in-repo Go module. It is one of:
The dependent Go modules, especially the root one, will have to be Please follow the instructions below:
Please let us know if you need any help. |
This reverts commit a0ed7a0.
…#6644) * fix: genesis bug in pool incentives * changelog * lint * add clarifying comment * merge main * Revert "merge main" This reverts commit a0ed7a0. --------- Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]> (cherry picked from commit ab93bb2) # Conflicts: # CHANGELOG.md # x/pool-incentives/keeper/genesis_test.go # x/pool-incentives/types/genesis.pb.go # x/pool-incentives/types/incentives.pb.go
…#6644) * fix: genesis bug in pool incentives * changelog * lint * add clarifying comment * merge main * Revert "merge main" This reverts commit a0ed7a0. --------- Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]> (cherry picked from commit ab93bb2) # Conflicts: # CHANGELOG.md # x/pool-incentives/keeper/genesis_test.go # x/pool-incentives/types/genesis.pb.go # x/pool-incentives/types/incentives.pb.go
…#6644) * fix: genesis bug in pool incentives * changelog * lint * add clarifying comment * merge main * Revert "merge main" This reverts commit a0ed7a0. --------- Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]> (cherry picked from commit ab93bb2) # Conflicts: # CHANGELOG.md # x/pool-incentives/keeper/genesis_test.go # x/pool-incentives/types/genesis.pb.go # x/pool-incentives/types/incentives.pb.go
…#6644) * fix: genesis bug in pool incentives * changelog * lint * add clarifying comment * merge main * Revert "merge main" This reverts commit a0ed7a0. --------- Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]> (cherry picked from commit ab93bb2) # Conflicts: # CHANGELOG.md
… (backport #6644) (#6649) * fix: genesis bug in pool incentives linking NoLock gauges and PoolIDs (#6644) * fix: genesis bug in pool incentives * changelog * lint * add clarifying comment * merge main * Revert "merge main" This reverts commit a0ed7a0. --------- Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]> (cherry picked from commit ab93bb2) # Conflicts: # CHANGELOG.md * Update CHANGELOG.md * add default coins --------- Co-authored-by: Roman <[email protected]> Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]>
… (backport #6644) (#6646) * fix: genesis bug in pool incentives linking NoLock gauges and PoolIDs (#6644) * fix: genesis bug in pool incentives * changelog * lint * add clarifying comment * merge main * Revert "merge main" This reverts commit a0ed7a0. --------- Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]> (cherry picked from commit ab93bb2) # Conflicts: # CHANGELOG.md # x/pool-incentives/keeper/genesis_test.go # x/pool-incentives/types/genesis.pb.go # x/pool-incentives/types/incentives.pb.go * fix backport * regen protos * attempt to fix e2e --------- Co-authored-by: Roman <[email protected]> Co-authored-by: Adam Tucker <[email protected]>
… (backport #6644) (#6647) * fix: genesis bug in pool incentives linking NoLock gauges and PoolIDs (#6644) * fix: genesis bug in pool incentives * changelog * lint * add clarifying comment * merge main * Revert "merge main" This reverts commit a0ed7a0. --------- Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]> (cherry picked from commit ab93bb2) # Conflicts: # CHANGELOG.md # x/pool-incentives/keeper/genesis_test.go # x/pool-incentives/types/genesis.pb.go # x/pool-incentives/types/incentives.pb.go * Generated protofile changes * backport fixes --------- Co-authored-by: Roman <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Adam Tucker <[email protected]>
… (backport #6644) (#6648) * fix: genesis bug in pool incentives linking NoLock gauges and PoolIDs (#6644) * fix: genesis bug in pool incentives * changelog * lint * add clarifying comment * merge main * Revert "merge main" This reverts commit a0ed7a0. --------- Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]> (cherry picked from commit ab93bb2) # Conflicts: # CHANGELOG.md # x/pool-incentives/keeper/genesis_test.go # x/pool-incentives/types/genesis.pb.go # x/pool-incentives/types/incentives.pb.go * Generated protofile changes * Update CHANGELOG.md * Update genesis_test.go * sdk math and unused import --------- Co-authored-by: Roman <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]>
Closes: #XXX
What is the purpose of the change
Caught this bug while testing incentive distributions from the mainnet state exported edge net.
Observed the following in the logs:
After investigations, realized that pool incentive store indexes are not exported correctly. Currently, we only export enough pool ID and gauge links for the internal gauges.
However, all NoLock gauges have additional store indexes to connect to a pool. These are particularly necessary for the external NoLockGauges
Solution
The solution was to:
AnyPoolToInternalGauges
genesis fieldConcentratedPoolToNoLockGauges
that focuses on connecting CL pool IDs and their respective gauges where gauges can be both external and internalTesting and Verifying
TestImportExportGenesis_ExternalNoLock
that validates NoLock pool incentives store export and reimport in more detailDocumentation and Release Note
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/{module}/README.md
)