-
Notifications
You must be signed in to change notification settings - Fork 147
go/oasis-node/cmd/storage: Add command for offline pruning #6341
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
Conversation
9a12d7f to
c07cc2b
Compare
29b5874 to
a38c165
Compare
c4616bb to
9c2b25b
Compare
a38c165 to
f662ffc
Compare
9c2b25b to
ac4c227
Compare
f662ffc to
8ed2677
Compare
8ed2677 to
f74deec
Compare
✅ Deploy Preview for oasisprotocol-oasis-core canceled.
|
f74deec to
08e8f6c
Compare
503b59c to
b0318c0
Compare
b0318c0 to
a2c2244
Compare
a2c2244 to
5842af8
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #6341 +/- ##
==========================================
- Coverage 64.92% 64.06% -0.86%
==========================================
Files 698 698
Lines 68065 68207 +142
==========================================
- Hits 44190 43700 -490
- Misses 18872 19479 +607
- Partials 5003 5028 +25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
5842af8 to
7e3cb2a
Compare
|
Rebased (no changes). Too see how this would fit in the big picture check the new (pending) pruning section: oasisprotocol/docs#1526 |
492bb68 to
c9e9bd7
Compare
c9e9bd7 to
fe6d85e
Compare
When enabling aggresive pruning on a previously synced node and restarting it immediately, node may start lagging behind (minutes to hours) and still believe its status is ready. We should offer validators a maintenance command that can be called offline, when increasing or possibly enabling the pruning for the first time, to ensure only healthy nodes join the network.
fe6d85e to
ce38558
Compare
Closes #6321
Motivation:
When enabling aggressive pruning node may fall behind. Whilst unlikely, the consequence may be the node breaking its commitment, which could results in lost rewards, possibly registering its availability when it is actually not ready, or worst case penalties (don't think this would happen actually).
Solution:
To prevent it, we should offer validators a maintenance command that should be called if pruning is enabled later on, before starting the node. This way freshly started node is guaranteed to be healthy.
As with compaction command, I have started with consensus databases only and suggest to add runtime databases for the follow-up. Moreover, I quickly tested that this command does not prune past the minimum reindexed height, in case of configured runtimes.
Automatically prune on the node startup?
For now this is not the case:
How to test:
Have a node with valid state, doesn't have to be synced. Configure pruning to retain less data and run:
Following that trigger compaction:
Ensure the node is able to sync correctly and that disk space has been correctly reclaimed. You can also configure a runtime and test this command does not prune past the min reindexed height.
Follow-up: