Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default CLI values for blocks and state pruning to and make in valid value for state pruning non-representable #2502

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

nazar-pc
Copy link
Member

@nazar-pc nazar-pc commented Feb 4, 2024

Subspace doesn't support state pruning the same way as many other Substrate chains because of the need to query state of older blocks for archiving, hence default state pruning of Substrate of 256 blocks is broken for Subspace (impossible to restart node after this).

Once user rightfully pointed this out and I decided to change the defaults accordingly. Instead of archive-canonical/256 for blocks and state pruning we now have 256/archive-canonical instead. Also state pruning in blocks is no longer specifiable.

This will be improved once we can prune things programmatically (see paritytech/polkadot-sdk#1570).

As the result of these changes, some CLI options no longer need to be specified explicitly by farmers.

Code contributor checklist:

…valid value for state pruning non-representable
/// - archive-canonical Keep only finalized blocks.
/// - number: Keep the last `number` of finalized blocks.
#[arg(long, default_value_t = BlocksPruningMode::Number(256))]
blocks_pruning: BlocksPruningMode,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we also include a check to not let user specify < 256 for some reason or is that not a requirement ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not a requirement, it is a somewhat arbitrary number

Base automatically changed from require-force-authoring-for-genesis-farmer to main February 5, 2024 06:18
@nazar-pc nazar-pc added this pull request to the merge queue Feb 5, 2024
Merged via the queue into main with commit a413a06 Feb 5, 2024
9 checks passed
@nazar-pc nazar-pc deleted the improve-node-cli-defaults branch February 5, 2024 08:16
@vedhavyas vedhavyas mentioned this pull request Feb 6, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants