Skip to content

Stale disconnected miners can still consume startup capacity after ingress handoff backlog #243

@Fi3

Description

@Fi3

Stale disconnected miners can still consume startup capacity after ingress handoff backlog

src/ingress/sv1_ingress.rs now starts the per-socket relay in Downstream::initialize() before awaiting downstreams.send(...) into the translator handoff queue. If that send
blocks during overload and the miner disconnects meanwhile, the relay can already exit while the corresponding DownstreamConnection is still queued. Later, src/translator/
downstream/accept_connection.rs will dequeue that stale entry and still run bridge.safe_lock(|s| s.on_new_sv1_connection(...)) plus downstream initialization for a miner
that already gave up.

This is not primarily a long-lived leak, but it is wasted open/close churn in the hottest startup path. Under overload, dead queued connections can consume translator
startup slots, channel/extranonce allocation, and bootstrap work that should have gone to miners that are still actually connected.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions