From e433d93cbf52396dc3fcfc1e69a7b5f4282ebda0 Mon Sep 17 00:00:00 2001 From: Omar Date: Tue, 4 Nov 2025 21:58:14 +0300 Subject: [PATCH 1/2] Limit the solc version to a max of 0.8.30 (#206) --- crates/solc-binaries/src/download.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/solc-binaries/src/download.rs b/crates/solc-binaries/src/download.rs index 19f7aa1..748f1ce 100644 --- a/crates/solc-binaries/src/download.rs +++ b/crates/solc-binaries/src/download.rs @@ -2,12 +2,13 @@ use std::{ collections::HashMap, + str::FromStr, sync::{LazyLock, Mutex}, }; use revive_dt_common::types::VersionOrRequirement; -use semver::Version; +use semver::{Version, VersionReq}; use sha2::{Digest, Sha256}; use crate::list::List; @@ -65,6 +66,9 @@ impl SolcDownloader { target: &'static str, list: &'static str, ) -> anyhow::Result { + static MAXIMUM_COMPILER_VERSION_REQUIREMENT: LazyLock = + LazyLock::new(|| VersionReq::from_str("<=0.8.30").unwrap()); + let version_or_requirement = version.into(); match version_or_requirement { VersionOrRequirement::Version(version) => Ok(Self { @@ -79,7 +83,10 @@ impl SolcDownloader { .builds .into_iter() .map(|build| build.version) - .filter(|version| requirement.matches(version)) + .filter(|version| { + MAXIMUM_COMPILER_VERSION_REQUIREMENT.matches(version) + && requirement.matches(version) + }) .max() else { anyhow::bail!("Failed to find a version that satisfies {requirement:?}"); From dff4c25e24c62f4f2c5558a5997eee81d9dc66d8 Mon Sep 17 00:00:00 2001 From: Omar Date: Thu, 6 Nov 2025 05:56:38 +0300 Subject: [PATCH 2/2] Bump the version of resolc compiler tests (#207) --- polkadot-sdk | 2 +- resolc-compiler-tests | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/polkadot-sdk b/polkadot-sdk index 6ffecaa..45a0ea7 160000 --- a/polkadot-sdk +++ b/polkadot-sdk @@ -1 +1 @@ -Subproject commit 6ffecaaab2a3039b8055da047a432fa1ad3c8b25 +Subproject commit 45a0ea734fed1ed2b323e4b1bd8f44d53f4db598 diff --git a/resolc-compiler-tests b/resolc-compiler-tests index bb3b0c1..702e264 160000 --- a/resolc-compiler-tests +++ b/resolc-compiler-tests @@ -1 +1 @@ -Subproject commit bb3b0c131982440437de0f0d748eaf37f765ef93 +Subproject commit 702e26462786d8445161e0a56535670a0f7e1bcc