Remove discarded blocks and states from database by default
Fixes #11912
1.Add state_pruning's sub-param archive-canonical in sc-cli.
2.Change blocks_pruning to be like state_pruning : use the string archive for BlocksPruning::KeepAll and archive-canonical(and default) for BlocksPruning::KeepFinalized and then a number of BlocksPruning::Some(x).
polkadot companion: https://github.com/paritytech/polkadot/pull/5992 cumulus companion: https://github.com/paritytech/cumulus/pull/1613
There's no need to change the defult pruning mode. It should remain at 256 block history.
Regarding https://github.com/paritytech/substrate/issues/11912, adding a CLI for ArchiveCanonical only fixes it half way. The major piece of work required here is to remove block bodies, and not just state. This part is a bit more involved.
Regarding #11912, adding a CLI for
ArchiveCanonicalonly fixes it half way. The major piece of work required here is to remove block bodies, and not just state. This part is a bit more involved.
Well , I'll rethink where to start...
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.
Looks good with some minor comments. One addition that's also required here, is that prune_block function also deletes justification data.
utils::remove_from_db(
transaction,
&*self.storage.db,
columns::KEY_LOOKUP,
columns::JUSTIFICATIONS,
id,
)?;
Looks good with some minor comments. One addition that's also required here, is that
prune_blockfunction also deletes justification data.
Done.
Looks good. Could also use a companion PR to the polkadot repo. See here: https://github.com/paritytech/substrate/blob/master/docs/CONTRIBUTING.adoc#updating-polkadot-as-well
Looks good. Could also use a companion PR to the polkadot repo. See here: https://github.com/paritytech/substrate/blob/master/docs/CONTRIBUTING.adoc#updating-polkadot-as-well
yeah, I added before. :D
Ty @hzy1919
bot merge
Error: "Check reviews" status is not passing for https://github.com/paritytech/cumulus/pull/1613
bot merge
Ty @hzy1919
You're welcome. @bkchr
This pull request has been mentioned on Polkadot Forum. There might be relevant details there:
https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-39/2277/1