Skip to content

refactor(x/rewards): move state to use collections#475

Merged
fdymylja merged 30 commits into
mainfrom
fd/rewards/contract_metadata_collections
Nov 7, 2023
Merged

refactor(x/rewards): move state to use collections#475
fdymylja merged 30 commits into
mainfrom
fd/rewards/contract_metadata_collections

Conversation

@fdymylja

Copy link
Copy Markdown
Contributor

No description provided.

@fdymylja fdymylja marked this pull request as ready for review November 2, 2023 10:20
@fdymylja fdymylja requested review from a team and spoo-bar November 2, 2023 10:20
@codecov

codecov Bot commented Nov 2, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 97 lines in your changes are missing coverage. Please review.

Comparison is base (3b382eb) 69.38% compared to head (f7c1923) 66.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #475      +/-   ##
==========================================
- Coverage   69.38%   66.00%   -3.39%     
==========================================
  Files          70       63       -7     
  Lines        4139     3901     -238     
==========================================
- Hits         2872     2575     -297     
- Misses       1163     1199      +36     
- Partials      104      127      +23     
Files Coverage Δ
x/rewards/keeper/msg_server.go 93.54% <100.00%> (ø)
x/rewards/keeper/params.go 100.00% <100.00%> (+25.00%) ⬆️
x/rewards/migrations/v2/migrate.go 60.00% <100.00%> (ø)
x/rewards/keeper/migrations.go 66.66% <0.00%> (ø)
x/rewards/keeper/metadata.go 89.65% <66.66%> (-5.27%) ⬇️
x/rewards/keeper/min_cons_fee.go 67.27% <40.00%> (-2.54%) ⬇️
x/rewards/keeper/tracking.go 80.95% <71.42%> (-19.05%) ⬇️
x/rewards/keeper/invariants.go 76.00% <44.44%> (-24.00%) ⬇️
x/rewards/keeper/grpc_query.go 89.51% <50.00%> (-1.67%) ⬇️
x/rewards/keeper/flat_fee.go 65.11% <30.76%> (-12.67%) ⬇️
... and 4 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread x/rewards/keeper/distribution.go
Comment thread x/rewards/keeper/grpc_query.go

@zanicar zanicar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nitpick comments about cases where we have err == nil:
Other than that LGTM!

@fdymylja fdymylja merged commit 7bc526a into main Nov 7, 2023
@fdymylja fdymylja deleted the fd/rewards/contract_metadata_collections branch November 7, 2023 13:43
spoo-bar pushed a commit that referenced this pull request Jan 22, 2024
* state works in a backwards compatible manner

* migrate contract metadata to use collections

* move params in a backwards compatible way

* move params to use collections

* flat fees moved in backwards compatible way

* move flat fees fully to use collections

* flat fee keys cleanup

* move min cons fee in a non state breaking way

* move min cons fee to use collections fully

* cleanup keys.go

* move blockrewards to collections in a state compatible way

* move genesis to use collections

* move more code to use collections

* remove more code

* move DeleteBLockRewardsCascade from State to Keeper

* move tx rewards to collections in a safe way

* more of TxRewards state moved to collections

* fully migrate TxRewards to collections

* checkpoint

* remove GetRewardsByRewardAddr in state_rewards_record.go

* remove CreateRewardsRecord in state_rewards_record.go

* remove more from state_rewards_record.go

* tmp commit

* remove all unneeded things

* finalise fast removal

* fix prefix and cleanup

* lint fully + CHANGELOG.md

* address nits
spoo-bar added a commit that referenced this pull request Jan 23, 2024
* refactor(x/rewards): move state to use collections (#475)

* state works in a backwards compatible manner

* migrate contract metadata to use collections

* move params in a backwards compatible way

* move params to use collections

* flat fees moved in backwards compatible way

* move flat fees fully to use collections

* flat fee keys cleanup

* move min cons fee in a non state breaking way

* move min cons fee to use collections fully

* cleanup keys.go

* move blockrewards to collections in a state compatible way

* move genesis to use collections

* move more code to use collections

* remove more code

* move DeleteBLockRewardsCascade from State to Keeper

* move tx rewards to collections in a safe way

* more of TxRewards state moved to collections

* fully migrate TxRewards to collections

* checkpoint

* remove GetRewardsByRewardAddr in state_rewards_record.go

* remove CreateRewardsRecord in state_rewards_record.go

* remove more from state_rewards_record.go

* tmp commit

* remove all unneeded things

* finalise fast removal

* fix prefix and cleanup

* lint fully + CHANGELOG.md

* address nits

* feat(rewards): enhance withdrawal of rewards developer experience (#502)

* add proto files and backwards compat test

* add changes + tests to distribution

* lint

* CHANGELOG.md

---------

Signed-off-by: Frojdi Dymylja <33157909+fdymylja@users.noreply.github.com>

* docs: ADR-008 – Improvements on rewards withdrawal experience. (#462)

* add withdrawal ux improvements adr

* Update ADR-008-withdrawal-ux-improvements.md

Signed-off-by: Frojdi Dymylja <33157909+fdymylja@users.noreply.github.com>

* Update CHANGELOG.md

---------

Signed-off-by: Frojdi Dymylja <33157909+fdymylja@users.noreply.github.com>
Co-authored-by: Spoorthi Satheesha <9302666+spoo-bar@users.noreply.github.com>

* running swagger gen

---------

Signed-off-by: Frojdi Dymylja <33157909+fdymylja@users.noreply.github.com>
Co-authored-by: Frojdi Dymylja <33157909+fdymylja@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants