feat(check): add chunk-stream check - #623
Open
martinconic wants to merge 1 commit into
Open
martinconic wants to merge 1 commit into
martinconic wants to merge 1 commit into
Conversation
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.
Adds a
chunk-streamcheck exercising bee's new/chunks/streamdownload mode (ethersphere/bee#TBD), plus the websocket client it needs.What it does
Streams chunks up to one node over a single websocket, then streams them back from a different node over another, asserting the guarantee that matters: exactly one delivery per requested address, matched by address rather than arrival order, no duplicates, no unrequested deliveries, and byte-for-byte identical data.
It also asserts that an address never uploaded comes back as
0x01not-found — which exercises retrieval exhausting every peer, a path unit tests can't reach.Changes
pkg/bee/api/chunkstream.go—ChunkStreamServiceon the API client. Upload and download streams,ChunkDelivery{Status, Address, Data}, exported status constants. Derivesws/wssfrom the client's scheme rather than hardcodingws://aspkg/wslistenerdoes, and fails the handshake if the node doesn't echo the negotiated subprotocol — which alone catches a node without the feature.pkg/check/chunkstream/— the check and its metrics, modelled onretrieval.chunk-stream; config inconfig.yamlandlocal.yaml(ci-chunk-stream).