feat(tieredrewards): add full genesis export/import for tieredrewards module#1248
Closed
JayT106 wants to merge 31 commits intofeat/tokenomicfrom
Closed
feat(tieredrewards): add full genesis export/import for tieredrewards module#1248JayT106 wants to merge 31 commits intofeat/tokenomicfrom
JayT106 wants to merge 31 commits intofeat/tokenomicfrom
Conversation
…Tier, MsgDeleteTier and MsgUpdateTier to update tiers + add Tier and Position persistence and indexes
… and disallow transfer if delegator has an active incoming redelegation to the validator
…ockTier and MsgCommitDelegationToTier + some refactoring
…nds are transferred fresh from the tieredrewards module acc
… address only for IsDelegated as validation already accounts for correctness
Export all primary store data (tiers, positions, sequence, validator reward ratios, unbonding mappings) and rebuild derived indexes (PositionsByOwner, PositionsByTier, PositionsByValidator, PositionCountByTier) on InitGenesis via SetPosition. Add comprehensive ValidateGenesis with cross-reference checks and full round-trip + secondary-index-rebuild keeper tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@JayT106 your pull request is missing a changelog! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feat/tokenomic #1248 +/- ##
==================================================
- Coverage 34.69% 26.71% -7.99%
==================================================
Files 130 142 +12
Lines 17387 25775 +8388
==================================================
+ Hits 6032 6885 +853
- Misses 10243 17598 +7355
- Partials 1112 1292 +180
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
closing this PR to facilitate the review |
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.
Summary
GenesisStateproto withtiers,positions,next_position_id,validator_reward_ratios, andunbonding_mappingsfields, plus newValidatorRewardRatioEntryandUnbondingMappingwrapper messagesInitGenesisto restore all primary store data and rebuild derived indexes (PositionsByOwner,PositionsByTier,PositionsByValidator,PositionCountByTier) viaSetPositionExportGenesisto walk all primary collections; derived indexes are intentionally omitted (single source of truth, smaller genesis files)ValidateGenesiswith cross-reference checks (position→tier, unbonding→position), duplicate ID detection, sequence bounds, and validator address validation