Skip to content

Add new command to oasis-node that flattens all badger DB instances #6309

@martintomazic

Description

@martintomazic

Motivation:
We should flatten BadgerDB instances before exporting them for the snapshots, to prevent needless storage, download bandwidth, and replicated pending compaction on all the nodes using it (credit @peternose).

Moreover, it would be useful as general purpose maintenance command and should as such be added under appropriate doc section.

Solution space:
Add a new command to oasis node e.g. oasis-node compact databases that would flatten all the databases.

This would be a long running operation so cannot be triggered on the node shutdown. As from the Flatten documentation, ideally there should be no writes happening, so this should be called once the node is stopped or syncing is paused.

Follow-up:

It would be useful to have a separate command for pruning consensus blocks, and another for consensus and runtime state, without starting the full-node.

Not sure this is even possible, given that ABCI Commit with lastRetainedHeight defines what can be pruned and what not (prune handlers).

Metadata

Metadata

Assignees

Labels

c:cliCategory: command line interface

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions