Skip to content

Conversation

@martintomazic
Copy link
Contributor

@martintomazic martintomazic commented Nov 4, 2025

Closes #1469.

Motivation

Today's thread shows pruning has corner cases that are confusing and we should warn about them.

Considerations

  • We should be careful to not trigger data availability issues of the whole network, with new pruning suggestions.
  • Encouraging validators to only keep minimal state may allow us to also encourage them to enable checkpoints for consensus and runtime state (possibly making this default), solving another availability issue :).

Possible follow-up

#1506.

@netlify
Copy link

netlify bot commented Nov 4, 2025

Deploy Preview for oasisprotocol-docs ready!

Name Link
🔨 Latest commit f4fe4e5
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-docs/deploys/691ddf67e573b70007891101
😎 Deploy Preview https://deploy-preview-1526--oasisprotocol-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines +75 to +77
To configure pruning it is recommended to set `n=250_000`. The maximum value is
`n=400_000`. If you need to preserve more data (e.g. nodes serving historical
state) you will have to keep the entire state from the genesis.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately if you preserve runtime state, to serve historical queries, you are also forced to preserve all the consensus data, as consensus light block are computed ad-hoc (see). A requirement that should probably be documented somewhere.

We could open an issue, so that consensus light blocks are not computed ad-hoc and are instead stored in the separate DB, with different pruning config. This would allow to run Observer node with much lower hardware requirements, assuming most of the consensus data could be dropped.

Not sure this is a critical priority right now, but issue definitely cannot hurt...

},
items: [
'node/run-your-node/advanced/sync-node-using-state-sync',
'node/run-your-node/advanced/pruning',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As already mentioned there is nothing "advanced" about pruning, in fact pruning should probably enabled via sane defaults (so possibly no need to even configure it)....

When documentation is reorganized (out of scope of this PR), this could probably be "How to guide"

@martintomazic martintomazic force-pushed the martin/task/update-pruning-documentation branch from af27d24 to f4fe4e5 Compare November 19, 2025 15:16
To change pruning configuration operators must follow this steps:
1. Gracefuly shutdown the node (validators should take [special care][graceful shutdown]).
2. Configure pruning as described in [Consensus Pruning](#consensus-pruning).
3. Run offline pruning (TODO insert link).
Copy link
Contributor Author

@martintomazic martintomazic Nov 19, 2025

Choose a reason for hiding this comment

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

We can ad whole Late Pruning section as a follow-up once offline pruning command is merged.

@martintomazic martintomazic marked this pull request as ready for review November 19, 2025 15:32
Comment on lines +75 to +76
To configure pruning it is recommended to set `n=250_000`. The maximum value is
`n=400_000`. If you need to preserve more data (e.g. nodes serving historical
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should preserve enough data so that there is sufficiently old state for 2 latest checkpoints, taking creation time into account as well. I believe 250_000 versions is suitable for the current parameters.

With so little state, creating runtime checkpoint is very fast. If I remember correctly cca 20min and also much less IO intensive than what I believe devops have observed on the Observer nodes (with all historical state)... Consensus checkpoint creation compared to runtime checkpoint creation is instant (seconds).

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.

docs/Run your node: Add dedicated section about pruning

2 participants