Skip to content

apollo_propeller: guard inbound reads on non-empty unsent_units buffer#14533

Open
sirandreww-starkware wants to merge 2 commits into
03-19-apollo_propeller_route_inbound_units_through_bounded_channelfrom
03-30-apollo_propeller_guard_inbound_reads_on_non-empty_unsent_units_buffer
Open

apollo_propeller: guard inbound reads on non-empty unsent_units buffer#14533
sirandreww-starkware wants to merge 2 commits into
03-19-apollo_propeller_route_inbound_units_through_bounded_channelfrom
03-30-apollo_propeller_guard_inbound_reads_on_non-empty_unsent_units_buffer

Conversation

@sirandreww-starkware

Copy link
Copy Markdown
Contributor

No description provided.

@cursor

cursor Bot commented Jun 17, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Small, localized change to inbound polling order in network handler code; reduces DoS risk without touching auth or persistence.

Overview
Fixes inbound back-pressure in the Propeller connection handler so behavior matches the documented “one batch at a time” model for unsent_units.

poll_inner now polls inbound substreams only when unsent_units is empty, after draining to the bounded engine channel. Previously, inbound reads could continue while decoded units were still queued, so a fast peer could keep filling unsent_units even when the engine channel was back-pressured—risking unbounded memory growth.

Outbound sends are unchanged; the guard only limits when new wire batches are read and decoded.

Reviewed by Cursor Bugbot for commit 82de509. Bugbot is set up for automated code reviews on this repo. Configure here.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

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.

2 participants