feat: storage radius check - #618
Draft
akrem-chabchoub wants to merge 9 commits into
Draft
Conversation
…g-storage-radius checks
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.
feat: implement storage-radius
Summary
Implements the
storage-radiuscheck for testing Bee's storage radius increase/decrease behavior. The check fills a cluster's reserves with random data until Bee raises its storage radius, then dilutes the postage batches to verify the radius decreases.This is a foundational test for Bee's reserve management and eviction logic.
Changes
New Check:
pkg/check/storageradius/Implements the complete storage-radius check with:
/debugstoreKey design choices:
WaitGroup(noterrgroup) for batch preparation to avoid 900s hangs on chain revertsAPI Enhancements
pkg/bee/api/status.goIsWarmingUp boolfield to detect nodes still in warmup phasepkg/bee/api/debugstore.gomap[string]intwith proper struct for/debugstoreresponseupload,pinning,cache,reserve,chunkStorestatsUploadStat.PendingUploadis the key metric for tracking undelivered chunkspkg/bee/api/api.goDebugStoreServicein the API client (was never wired up)Config:
config/testnet-bee-playground.yamlBee config
payment-threshold: 108000000(max Bee accepts; prevents accounting lock contention)Check definition:
pg-storage-radiusPrerequisites
1. Patched Bee Image
The check requires a custom Bee build with 4 edits (see guide for details):
Build and push:
Then update the node-group image in beekeeper config.
2. Payment Threshold (§2.2)
✅ Already added:
payment-threshold: 108000000Prevents
failed to acquire lock when preparing creditduring bulk uploads.3. Ingress Proxy (§2.3)
k3d ships Traefik (not nginx) with ~60s default timeout. Monitor logs for
HTTP 499/502errors during uploads. The check uses 10m timeout but may still hit proxy limits on very slow clusters.4. Postage Amount (§2.4)
✅ Already set:
2073600000Clears minimum validity floor:
amount > currentPrice × minimumValidityBlocksTesting
Cross-check on a node:
In Bee's logs, look for:
unreserve startfollowed byreserve radius increase→ working correctlyunreserve finished→ eviction met target, radius didn't move (chunks were evictable)Related
See
FILL_RESERVE_GUIDE.mdfor:Notes
storage-radiuscheck only