paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.81k stars 660 forks source link

[Feature request] pruning mode: "since" #69

Open Swader opened 4 years ago

Swader commented 4 years ago

Currently, two pruning modes are available: archive and "keep X recent blocks."

I propose a third which would sync from block X onwards. Useful for dapps running their own nodes, but which know they've only existed since block X and as such only need archive data from that point on.

polkadot --pruning 120350+

The addition of a + at the end of the block number would indicate "from this block onwards".

Nexus2k commented 2 years ago

I would even extend this feature request with an ability to switch an full/archive node to a pruned node, iiuc it would be just a matter of deleting DB entries older than block X.