Skip to content

feat(check): add chunk-stream check - #623

Open
martinconic wants to merge 1 commit into
masterfrom
feat/chunk-stream-check
Open

martinconic wants to merge 1 commit into
masterfrom
feat/chunk-stream-check

Conversation

@martinconic

Copy link
Copy Markdown
Contributor

Adds a chunk-stream check exercising bee's new /chunks/stream download 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 0x01 not-found — which exercises retrieval exhausting every peer, a path unit tests can't reach.

Changes

  • pkg/bee/api/chunkstream.goChunkStreamService on the API client. Upload and download streams, ChunkDelivery{Status, Address, Data}, exported status constants. Derives ws/wss from the client's scheme rather than hardcoding ws:// as pkg/wslistener does, 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 on retrieval.
  • Registered as chunk-stream; config in config.yaml and local.yaml (ci-chunk-stream).

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