feat: add WebSocket transaction streamer service#5
Open
gitteri wants to merge 1 commit into
Open
Conversation
New binary that streams transaction events over WebSocket connections. Polls accountsdb and indexer databases, broadcasts escrow and withdraw events to connected clients. Adds axum and tower-http workspace deps.
gitteri
pushed a commit
that referenced
this pull request
May 21, 2026
* fix(gateway): add 64KB request body size limit Gateway read unbounded POST bodies into memory, risking OOM under large payloads. Two-layer defense: - Content-Length pre-check: reject >64KB with 413 before reading bytes - Limited wrapper: enforces cap for chunked/missing Content-Length Error downcast distinguishes LengthLimitError (413) from genuine IO errors (400) so error semantics stay correct. Unparseable Content-Length headers are logged as warnings. 413 responses include a JSON-RPC error body with the limit for client debuggability. Includes five tests: oversized Content-Length, oversized chunked body, exact 64KB boundary, lying Content-Length bypass, and normal request passthrough. Refs: PRO-890 * refactor(gateway): move start_test_gateway into mod tests --------- Co-authored-by: Jo D <dev-jodee@users.noreply.github.com>
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.
Summary
streamerbinary incore/src/bin/streamer.rsthat provides real-time WebSocket streaming of escrow and withdrawal transaction events.axum(withwsfeature) andtower-http(withcorsfeature) as workspace dependencies.Changed files
Cargo.toml-- workspace deps foraxumandtower-httpCargo.lock-- dependency resolutioncore/Cargo.toml-- addaxumandtower-httpcore/src/bin/streamer.rs-- 759-line streamer serviceTest plan
cargo build -p contra-core --bin streamercompilesMade with Cursor