Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bc5ba8e
1.Add pruning param "canonical" in sc-cli.
hzy1919 Aug 5, 2022
d762b63
Merge branch 'master' into Remove-discarded-blocks-and-states-from-da…
hzy1919 Aug 5, 2022
e425634
Update tests in sc-state-db.
hzy1919 Aug 8, 2022
70b21b8
Merge branch 'master' into Remove-discarded-blocks-and-states-from-da…
hzy1919 Aug 8, 2022
124f586
Merge branch 'master' into Remove-discarded-blocks-and-states-from-da…
hzy1919 Aug 8, 2022
e2c5674
Update tests in sc-state-db.
hzy1919 Aug 8, 2022
7bff3cb
Merge branch 'master' into Remove-discarded-blocks-and-states-from-da…
hzy1919 Aug 19, 2022
da0c426
Merge branch 'master' into Remove-discarded-blocks-and-states-from-da…
hzy1919 Sep 1, 2022
c519937
Merge branch 'master' into Remove-discarded-blocks-and-states-from-da…
hzy1919 Sep 8, 2022
3f03c82
1.Add a new value `AllWithNonFinalized` in `enum BlocksPruning` which…
hzy1919 Sep 9, 2022
940d9db
Merge branch 'master' into Remove-discarded-blocks-and-states-from-da…
hzy1919 Sep 9, 2022
458e078
Make some corresponding adjustments based on the content in the conve…
hzy1919 Sep 10, 2022
a228701
Update client/db/src/lib.rs
hzy1919 Sep 14, 2022
6ae25a1
Apply suggestions from code review.
hzy1919 Sep 14, 2022
54a5a2b
Merge branch 'master' into Remove-discarded-blocks-and-states-from-da…
hzy1919 Sep 15, 2022
9e3e8eb
1.Change `blocks_pruning` to be like `state_pruning` .
hzy1919 Sep 21, 2022
ac58113
Merge branch 'master' into Remove-discarded-blocks-and-states-from-da…
hzy1919 Sep 22, 2022
4c3810c
Fmt and add some doc.
hzy1919 Sep 24, 2022
f4ea09b
Merge branch 'master' into Remove-discarded-blocks-and-states-from-da…
hzy1919 Sep 24, 2022
2b0c25c
Update client/cli/src/params/pruning_params.rs
hzy1919 Sep 25, 2022
6cbc62e
Update client/cli/src/params/pruning_params.rs
hzy1919 Sep 25, 2022
df5ffec
Update doc.
hzy1919 Sep 25, 2022
cb62c23
Change `new_test_with_tx_storage` to take `BlocksPruning`.
hzy1919 Sep 25, 2022
79afe8b
Merge branch 'master' into Remove-discarded-blocks-and-states-from-da…
hzy1919 Sep 25, 2022
3dff0f0
Fmt
hzy1919 Sep 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/cli/src/params/pruning_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl PruningParams {
.as_ref()
.map(|s| match s.as_str() {
"archive" => Ok(PruningMode::ArchiveAll),
"canonical" => Ok(PruningMode::ArchiveCanonical),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"canonical" is more of an internal concept, and not a user friendly term. Let's call it "final" or "finalized"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok , Let's set it "final".

bc => bc
.parse()
.map_err(|_| error::Error::Input("Invalid pruning mode specified".to_string()))
Expand Down
12 changes: 6 additions & 6 deletions client/state-db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ impl PruningMode {

impl Default for PruningMode {
fn default() -> Self {
PruningMode::Constrained(Default::default())
PruningMode::ArchiveCanonical
}
}

Expand Down Expand Up @@ -835,12 +835,12 @@ mod tests {
#[test]
fn pruning_mode_compatibility() {
for (created, reopened, expected) in [
(None, None, Ok(PruningMode::blocks_pruning(256))),
(None, Some(PruningMode::blocks_pruning(256)), Ok(PruningMode::blocks_pruning(256))),
(None, Some(PruningMode::blocks_pruning(128)), Ok(PruningMode::blocks_pruning(128))),
(None, Some(PruningMode::blocks_pruning(512)), Ok(PruningMode::blocks_pruning(512))),
(None, None, Ok(PruningMode::ArchiveCanonical)),
(None, Some(PruningMode::blocks_pruning(256)), Err(())),
(None, Some(PruningMode::blocks_pruning(128)), Err(())),
(None, Some(PruningMode::blocks_pruning(512)), Err(())),
(None, Some(PruningMode::ArchiveAll), Err(())),
(None, Some(PruningMode::ArchiveCanonical), Err(())),
(None, Some(PruningMode::ArchiveCanonical), Ok(PruningMode::ArchiveCanonical)),
(Some(PruningMode::blocks_pruning(256)), None, Ok(PruningMode::blocks_pruning(256))),
(
Some(PruningMode::blocks_pruning(256)),
Expand Down