fix(builder): bound Flashbots relay requests with a 30s client timeout - #1340
Open
hermiondev wants to merge 1 commit into
Open
hermiondev wants to merge 1 commit into
hermiondev wants to merge 1 commit into
Conversation
FlashbotsClient used reqwest Client::new(), whose default is no timeout. A stalled Flashbots relay hangs send_private_transaction / cancel_private_transaction forever, pinning the sender task and stalling the transaction pipeline. Every other outbound path in the repo is already bounded (provider tower timeout alchemyplatform#1297, rpc_timeout, tracer 10s); this was the last unbounded client. Use Client::builder().timeout(30s), matching the repo's pattern of concrete bounds on outbound HTTP.
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.
Problem
FlashbotsClient::newbuilds its HTTP client withreqwest::Client::new(), whose default is no timeout on requests. If the Flashbots relay (or a configured builder relay) accepts the TCP connection but stalls — overloaded relay, middlebox blackhole, hung LB —send_private_transactionandcancel_private_transactionnever settle:Every other outbound HTTP path in this repo is already bounded — the provider uses a tower timeout layer (#1297,
client_timeout_seconds), the healthcheck RPC calls userpc_timeout(#1173), the tracer uses 10s (#730). The Flashbots sender was the last unboundedClient::new()in production code (grep -rn "Client::new()" crates/→ this line only).Fix
Client::builder().timeout(Duration::from_secs(30))on the Flashbots relay client. 30s matches the order of the other concrete bounds in the repo and is generous foreth_sendPrivateTransaction/ cancel round-trips. On timeout reqwest returns aRequestTimedOuttransport error, which the existingFlashbotsError::Transportarm already maps → normal retry/cancel semantics resume instead of a hang.Verification
cargo check -p rundler-builder— Finished, 0 errors (rustc 1.92.0, repo pinned toolchain, request resolved from Cargo.lock reqwest 0.12.9).cargo fmt -p rundler-builder -- --check— clean.