Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Rename --pruning and --keep-blocks to be more similar to one another. #11907

Closed
kianenigma opened this issue Jul 25, 2022 · 5 comments · Fixed by #11934
Closed

Rename --pruning and --keep-blocks to be more similar to one another. #11907

kianenigma opened this issue Jul 25, 2022 · 5 comments · Fixed by #11934
Assignees
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Comments

@kianenigma
Copy link
Contributor

kianenigma commented Jul 25, 2022

I actually very recently learned that we have a flag called --keep-blocks. We where also teaching students about Polkadot recently in Polkadot academy and they are somewhat confused about the concept of "block state" and "blocks" themselves, and how keeping one is optional, and the name of these two flags being totally unrelated does not help.

I think these two flags are very similar, and should be named accordingly:

  • --keep-blocks and --keep-state
  • --state-pruning and --blocks-pruning
@kianenigma kianenigma added Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder J2-unconfirmed Issue might be valid, but it’s not yet known. Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be. labels Jul 25, 2022
@bkchr
Copy link
Member

bkchr commented Jul 25, 2022

--keep-blocks is about pruning block bodies. This is currently disabled by default, aka we keep all block bodies. So, you rename would be wrong. --state-pruning is actually about the state and how much state we keep before we prune it.

@arkpar
Copy link
Member

arkpar commented Jul 25, 2022

--keep-blocks only accepts a number. --pruning also accepts "archive" and potentially other values for pruning modes.

@kianenigma
Copy link
Contributor Author

the fact that pruning has different possible values doesn't justify its confusing name to. I think at the minimum, we should rename --pruning to --state-pruning, with the exact same semantics, to distinguish it with keeping block bodies.

@bkchr
Copy link
Member

bkchr commented Jul 25, 2022

Okay fuck, sorry. I did read your first comment wrongly.

Reading it again, I like:

--state-pruning and --blocks-pruning

@wirednkod
Copy link
Contributor

@kianenigma I will take this issue if you are ok with that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Projects
Status: done
Development

Successfully merging a pull request may close this issue.

4 participants