Commit 11fa9af1 authored by ZhiYong's avatar ZhiYong Committed by GitHub
Browse files

Remove discarded blocks and states from database by default (#11983)



* 1.Add pruning param "canonical" in sc-cli.
2.Make PruningMode's default value to ArchiveCanonical.

* Update tests in sc-state-db.

* Update tests in sc-state-db.

* 1.Add a new value `AllWithNonFinalized` in `enum BlocksPruning` which Corresponds to `blocks_pruning 0` in CLI .
2.Change value `All` to `AllFinalized` in `enum BlocksPruning` and make it to keep full finalized block history.

* Make some corresponding adjustments based on the content in the conversation.

* Update client/db/src/lib.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Apply suggestions from code review.

* 1.Change `blocks_pruning` to be like `state_pruning` .

* Fmt and add some doc.

* Update client/cli/src/params/pruning_params.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/cli/src/params/pruning_params.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update doc.

* Change `new_test_with_tx_storage` to take `BlocksPruning`.

* Fmt

Co-authored-by: default avatarBastian Köcher <[email protected]>
parent 6fee4cb3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment