fix(dev): prune blockstore on devnet nodes 3 and 4 - #426
Merged
Conversation
Nodes 3 and 4 never set OPENAUDIO_RETAIN_HEIGHT, so they inherited the 604800-block default and retained every devnet block while non-archive compaction ran every block. Each grew to 47GB (23GB blockstore.db + 22GB state.db) in ./tmp on the host disk — 94GB between them. The sizes were inverted, which is what makes this a config gap rather than tuning: node 1 runs with OPENAUDIO_ARCHIVE=true and never prunes at all, yet sits at 4.2GB, while node 2 — same non-archive settings as 3 and 4 but with RETAIN_HEIGHT=10 — sits at 2.7GB. Match node 2. Note that OPENAUDIO_PRUNING_ENABLED, OPENAUDIO_PRUNING_AMOUNT and OPENAUDIO_PRUNING_EARLIEST_HEIGHT, which node 2 also sets, are read by no Go code; they are not copied here. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Devnet nodes 3 and 4 never set
OPENAUDIO_RETAIN_HEIGHT, so they inherited the 604800-block default and retained every devnet block while non-archive compaction ran every block. Each grew to 47GB in./tmpon the host disk — 94GB between them, which is what filled my boot volume.Why this is a config gap, not tuning
The sizes are inverted:
ARCHIVE=true— never prunes at allRETAIN_HEIGHT=10The node that keeps every block forever is the small one, so the 43GB excess isn't unpruned blocks — it's Pebble retaining everything because
calculateLowestRetainHeightnever advances the retain height (data_companion.go). This change matches node 2.Note
OPENAUDIO_PRUNING_ENABLED,OPENAUDIO_PRUNING_AMOUNTandOPENAUDIO_PRUNING_EARLIEST_HEIGHT— which node 2 also sets — are read by no Go code. They're deliberately not copied here; onlyOPENAUDIO_RETAIN_HEIGHThas any effect. Worth removing from node 2 separately.make downalready doesrm -rf tmp/oap*, so existing oversized data is reclaimed on the next teardown.🤖 Generated with Claude Code