Skip to content

feat(check): add corrupt chunk check - #629

Draft
akrem-chabchoub wants to merge 2 commits into
masterfrom
feat/corrupt-chunk-check
Draft

akrem-chabchoub wants to merge 2 commits into
masterfrom
feat/corrupt-chunk-check

Conversation

@akrem-chabchoub

@akrem-chabchoub akrem-chabchoub commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Adds a corrupt-chunk check that puts an invalid chunk (neither CAC nor SOC) into a node's reserve, restarts the node, and verifies whether the chunk is kept or removed.

Steps

  1. Pick a full node. Its data must be on a persistent volume (persistence-enabled: true).
  2. Build an invalid chunk: random bytes under a random address, stamped with a real postage batch.
  3. Switch the node's StatefulSet to import-image, a Bee build at 7515c4c5 (the commit before #5640, whose reserve does not validate chunk types). It runs bee db import reserve to write the chunk.
  4. Restart the node with restart-image (the original image if empty).
  5. GET /chunks/: served means the chunk was kept, not found means it was removed. Compare with expect-removed.
  6. Always restore the original StatefulSet.

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.

1 participant