Skip to content

Commit

Permalink
feat: increase solc download timeout window to 10 minutes from 2 mi…
Browse files Browse the repository at this point in the history
…nutes (#133)

From foundry-rs/foundry#8507:

Downloading the solc compiler is timing out too quickly. This makes it
impossible to use forge with slow internet speeds.

```
$ forge build -- --vvvv
Error: 
error decoding response body

Context:
- Error #0: request or response body error
- Error #1: operation timed out
```

### Cause

- The solc binary size for mac has increased from 37MB to 79MB since
v0.8.23.
- The timeout for forge to download the binary is less than 3 minutes.
- On a slow internet connection, there is not enough time for the
download to complete before timing out.

### Solution

- Increase the timeout limit for downloads to 10 minutes

Closes: foundry-rs/foundry#8507
  • Loading branch information
zerosnacks authored Jul 24, 2024
1 parent cc893b6 commit b99dd2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/svm-rs/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use std::{
#[cfg(target_family = "unix")]
use std::{fs::Permissions, os::unix::fs::PermissionsExt};

/// The timeout to use for requests to the source
const REQUEST_TIMEOUT: Duration = Duration::from_secs(120);
/// The timeout to use for requests to the source (10 minutes).
const REQUEST_TIMEOUT: Duration = Duration::from_secs(600);

/// Version beyond which solc binaries are not fully static, hence need to be patched for NixOS.
const NIXOS_MIN_PATCH_VERSION: Version = Version::new(0, 7, 6);
Expand Down

0 comments on commit b99dd2a

Please sign in to comment.