Skip to content
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

portfolio keys migration and redundant data deletion #772

Merged
merged 6 commits into from
Sep 9, 2024

Conversation

avkr003
Copy link
Contributor

@avkr003 avkr003 commented Sep 4, 2024

No description provided.

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 47.87234% with 49 lines in your changes missing coverage. Please review.

Project coverage is 42.28%. Comparing base (2a452cd) to head (b58f854).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #772      +/-   ##
==========================================
- Coverage   42.38%   42.28%   -0.10%     
==========================================
  Files         628      628              
  Lines       20500    20537      +37     
==========================================
- Hits         8688     8685       -3     
- Misses      10802    10840      +38     
- Partials     1010     1012       +2     
Components Coverage Δ
leveragelp_transactions 82.84% <ø> (ø)
leveragelp_lifecycle 88.29% <ø> (ø)
leveragelp_keeper 48.35% <ø> (ø)
leveragelp_queries 19.28% <ø> (ø)
accountedpool_transactions 100.00% <ø> (ø)
accountedpool_lifecycle ∅ <ø> (∅)
accountedpool_queries 68.42% <ø> (ø)
amm_transactions 57.93% <ø> (ø)
amm_lifecycle 79.16% <ø> (ø)
amm_keeper 61.13% <ø> (ø)
amm_queries 29.94% <ø> (ø)
assetprofile_transactions 78.82% <ø> (ø)
assetprofile_lifecycle ∅ <ø> (∅)
assetprofile_keeper 83.33% <ø> (ø)
assetprofile_queries 47.41% <ø> (ø)
burner_transactions 0.00% <ø> (ø)
burner_lifecycle ∅ <ø> (∅)
burner_keeper 100.00% <ø> (ø)
burner_queries 63.54% <ø> (ø)
clock_transactions 30.00% <ø> (ø)
clock_lifecycle ∅ <ø> (∅)
clock_keeper 76.92% <ø> (ø)
clock_queries ∅ <ø> (∅)
commitment_transactions 48.95% <ø> (ø)
commitment_lifecycle ∅ <ø> (∅)
commitment_keeper 19.60% <ø> (ø)
commitment_queries 9.33% <ø> (ø)
epochs_transactions ∅ <ø> (∅)
epochs_lifecycle 100.00% <ø> (ø)
epochs_keeper 81.81% <ø> (ø)
epochs_queries 85.71% <ø> (ø)
estaking_transactions 48.64% <ø> (ø)
estaking_lifecycle 71.23% <ø> (ø)
estaking_keeper 63.05% <ø> (ø)
estaking_queries 55.31% <ø> (ø)
incentive_transactions 0.00% <ø> (ø)
incentive_lifecycle ∅ <ø> (∅)
incentive_keeper 0.00% <ø> (ø)
incentive_queries ∅ <ø> (∅)
masterchef_transactions 63.63% <ø> (ø)
masterchef_lifecycle 73.75% <ø> (ø)
masterchef_keeper 89.47% <ø> (ø)
masterchef_queries 45.97% <ø> (ø)
oracle_transactions 30.00% <ø> (ø)
oracle_lifecycle 0.00% <ø> (ø)
oracle_keeper 63.88% <ø> (ø)
oracle_queries 34.95% <ø> (ø)
parameter_transactions 15.11% <ø> (ø)
parameter_lifecycle ∅ <ø> (∅)
parameter_keeper 75.00% <ø> (ø)
parameter_queries 60.00% <ø> (ø)
stablestake_transactions 73.91% <ø> (ø)
stablestake_lifecycle 75.00% <ø> (ø)
stablestake_keeper 71.42% <ø> (ø)
stablestake_queries 13.04% <ø> (ø)
tier_transactions 28.57% <ø> (ø)
tier_lifecycle 100.00% <100.00%> (ø)
tier_keeper 90.47% <ø> (ø)
tier_queries 19.67% <33.33%> (-2.83%) ⬇️
tokenomics_transactions 72.32% <ø> (ø)
tokenomics_lifecycle ∅ <ø> (∅)
tokenomics_keeper 83.33% <ø> (ø)
tokenomics_queries 70.96% <ø> (ø)
transferhook_transactions ∅ <ø> (∅)
transferhook_lifecycle ∅ <ø> (∅)
transferhook_keeper 100.00% <ø> (ø)
transferhook_queries 60.00% <ø> (ø)

// Remove last 100 values at each block
k.RemovePortfolioLast(ctx, deleteDate.String(), 100)
k.RemovePortfolioLast(ctx, deleteDate, 100)
// migration does not delete all older entries as we don't know whats last date is there, deleting from past 105 days
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can put this logic in migration. will that not work ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Older entries might take a lot of time to finish deleting leading to workflow failure. So deleting in abci.

@cosmic-vagabond cosmic-vagabond merged commit 8d1470d into main Sep 9, 2024
69 of 71 checks passed
@cosmic-vagabond cosmic-vagabond deleted the avkr003/portfolioKeys branch September 9, 2024 06:28
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.

3 participants