-
Notifications
You must be signed in to change notification settings - Fork 215
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
[Merged by Bors] - prune data and compact state #4998
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4998 +/- ##
=========================================
- Coverage 77.1% 77.1% -0.1%
=========================================
Files 254 257 +3
Lines 30113 30242 +129
=========================================
+ Hits 23241 23318 +77
- Misses 5363 5398 +35
- Partials 1509 1526 +17
|
sql/migrations/0004_next.sql
Outdated
DELETE FROM proposals WHERE layer < 19000; | ||
DELETE FROM proposal_transactions WHERE layer < 19000; | ||
UPDATE certificates SET cert = NULL WHERE layer < 19000; | ||
UPDATE ballots SET ballot = prune_actives(ballot); |
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.
considering #5002 and the fact that right now the ref ballot is still saved with activeset.
ActiveSetFromEpochFirstBlock
also still retrieve activeset directly from ref ballot.
is there a safe range i should apply to remove the activeset from ballots?
at layer 17800, the state size changed from 8.2GB to 470MB with this migration. the migration took 1.5 min.
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.
my proposal was to save active sets into activeset table while pruning. and then we either have an option to sql-join them on activesethash field (requires extending ballots table so maybe not optimal) or do another query to get activeset hash when we need it.
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.
we should also stop writing active sets encoded together with ballot, after this migration is done. not necessarily within same change, but would be better to release them together
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.
changed to extract active set from ballots and save the prune blob.
please consider #4984 (comment)
i'll continue with the other code change accordingly.
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.
please see notes about pruner/extract code
5031a73
to
5a20c04
Compare
bors try |
tryBuild succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
5a20c04
to
35b94e0
Compare
bors try |
tryBuild succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
bors merge |
## Motivation Closes #3049 Closes #3588 ## Changes - prune data consistently with tortoise hdist distance. - proposals - certificates - proposal id<->tid mapping certificate is needed for consensus within hdist. the same distance is used for all for simplicity. - extract active set data from ballots and save them in activesets table. - vacuum and checkpoint database after migration 4 is complete this PR concludes the first update described #4984 (comment)
Build failed: |
bors merge |
## Motivation Closes #3049 Closes #3588 ## Changes - prune data consistently with tortoise hdist distance. - proposals - certificates - proposal id<->tid mapping certificate is needed for consensus within hdist. the same distance is used for all for simplicity. - extract active set data from ballots and save them in activesets table. - vacuum and checkpoint database after migration 4 is complete this PR concludes the first update described #4984 (comment)
Build failed: |
bors merge |
## Motivation Closes #3049 Closes #3588 ## Changes - prune data consistently with tortoise hdist distance. - proposals - certificates - proposal id<->tid mapping certificate is needed for consensus within hdist. the same distance is used for all for simplicity. - extract active set data from ballots and save them in activesets table. - vacuum and checkpoint database after migration 4 is complete this PR concludes the first update described #4984 (comment)
Build failed: |
bors merge |
## Motivation Closes #3049 Closes #3588 ## Changes - prune data consistently with tortoise hdist distance. - proposals - certificates - proposal id<->tid mapping certificate is needed for consensus within hdist. the same distance is used for all for simplicity. - extract active set data from ballots and save them in activesets table. - vacuum and checkpoint database after migration 4 is complete this PR concludes the first update described #4984 (comment)
Build failed: |
bors merge |
## Motivation Closes #3049 Closes #3588 ## Changes - prune data consistently with tortoise hdist distance. - proposals - certificates - proposal id<->tid mapping certificate is needed for consensus within hdist. the same distance is used for all for simplicity. - extract active set data from ballots and save them in activesets table. - vacuum and checkpoint database after migration 4 is complete this PR concludes the first update described #4984 (comment)
Pull request successfully merged into develop. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Motivation
Closes #3049
Closes #3588
Changes
prune data consistently with tortoise hdist distance.
certificate is needed for consensus within hdist.
the same distance is used for all for simplicity.
extract active set data from ballots and save them in activesets table.
vacuum and checkpoint database after migration 4 is complete
this PR concludes the first update described #4984 (comment)