Skip to content

feat: add overall timeout for quote collection - #25

Merged
jacderida merged 1 commit into
WithAutonomi:mainfrom
jacderida:feat-masque-relay-data-plane
Apr 2, 2026
Merged

feat: add overall timeout for quote collection#25
jacderida merged 1 commit into
WithAutonomi:mainfrom
jacderida:feat-masque-relay-data-plane

Conversation

@jacderida

Copy link
Copy Markdown
Member

Summary

Add a 120-second overall timeout for quote collection to prevent uploads from stalling indefinitely when a peer is unreachable.

Problem

Individual quote requests have per-peer timeouts (10s), but the connection establishment (connect_with_fallback) can take up to 80s per peer and isn't covered by the per-peer timeout. Without an overall timeout, a single unreachable peer causes the entire upload to stall indefinitely — we observed a 1-hour stall in testing.

Change

Wraps the quote collection FuturesUnordered loop in tokio::time::timeout(120s). If the timeout fires, the upload fails fast with a clear error message showing how many quotes were collected and which peers failed, allowing the client to move on to the next upload attempt.

Test plan

  • Deployed symmetric NAT testnet with 20 consecutive uploads
  • Verified quote timeout was never needed (0 fires) — uploads complete within the window
  • Verified failed uploads exit promptly instead of stalling

🤖 Generated with Claude Code

Individual quote requests have per-peer timeouts, but the connection
establishment (connect_with_fallback) can take up to 80s per peer
and isn't covered by the per-peer timeout. Without an overall timeout,
a single unreachable peer causes the entire upload to stall indefinitely.

Wraps the quote collection loop in a 120s tokio::time::timeout. If
the timeout fires, the upload fails fast with a clear error message
showing how many quotes were collected and which peers failed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jacderida
jacderida merged commit 3e6254f into WithAutonomi:main Apr 2, 2026
11 of 12 checks passed
grumbach added a commit to grumbach/ant-client that referenced this pull request Aug 26, 2026
ant-protocol#23 was reverted in ant-protocol#24, and ant-protocol#25
re-applies it. WithAutonomi#25 is the pull request this pin is waiting on, so the
comment should name it. Comment only; the pin itself is unchanged.
jacderida pushed a commit to grumbach/ant-client that referenced this pull request Aug 30, 2026
ant-protocol#23 was reverted in ant-protocol#24, and ant-protocol#25
re-applies it. WithAutonomi#25 is the pull request this pin is waiting on, so the
comment should name it. Comment only; the pin itself is unchanged.
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