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

[EIP-4844] Blobs pruning #6628

Merged
merged 6 commits into from
Dec 20, 2022
Merged

Conversation

tbenr
Copy link
Contributor

@tbenr tbenr commented Dec 19, 2022

Blocks and Blobs pruning work slightly different.

Blocks jobs run every 1h and always prune all "prunable" blocks (that's why the first time you switch MINIMAL on, takes a while to complete).

Blobs pruning are designed to run frequently and with an hard cap on the BlobsSidecars that can be pruned. Currently configured to run every minute and prune maximum of 32 blobs. Under finalization, with mainnet config, we are supposed to create 5 BlobsSidecar each minute, so 32 is able to catch up relatively quickly.

The idea is to avoid those pruning jobs to overlap, so we limit the CPU\Disk pressure while node is doing its main work that's why I configured storagePrunerAsyncRunner to be single-threaded.

I also lowered down the thread priority.

I added the unconfirmed blobs pruning, which make sure that unconfirmed blobs (blobs its block has been received but never imported (remaining in FutureItems or in PendingPool)) are removed from DB once we finalize those slots. It shares the same prune limit (32)

Improved pruning by adding the ability to stream keys only from the KV store, so value doesn't need to be read\deserialized.

related to #6629

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

@@ -110,6 +124,11 @@
__ ->
blockPruner
.map(BlockPruner::start)
.orElseGet(() -> SafeFuture.completedFuture(null)))
.thenCompose(
__ ->

Check notice

Code scanning / CodeQL

Useless parameter

The parameter '__' is never used.
@tbenr tbenr changed the title blobs pruning [EIP-4844] Blobs pruning Dec 19, 2022
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM but we should make sure we have some test coverage of iterating keys in the database somewhere.

@tbenr
Copy link
Contributor Author

tbenr commented Dec 20, 2022

It is currently tested via pruneOldestBlobsSidecar testing in DatabaseTest, but I generally see we don't have unit tests for the KvStoreAccessor layer. Something for backlog...

@tbenr tbenr merged commit a95d524 into Consensys:master Dec 20, 2022
@tbenr tbenr deleted the block_and_blob_pruner branch December 20, 2022 08:35
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