Compare commits

...

10 Commits

Author SHA1 Message Date
Omar Abdulla f97f44bc25 Merge remote-tracking branch 'origin/main' into feature/bump-resolc-compiler-tests 2025-11-06 07:24:20 +03:00
Omar Abdulla fb1d5469c3 Bump resolc compiler tests 2025-11-06 07:23:44 +03:00
Omar fb009f65c1 Bump resolc compiler tests (#208)
* Bump the version of resolc compiler tests

* Bump the version of resolc compiler tests

* Reduce the timeout for transactions to 2 minutes
2025-11-06 03:42:20 +00:00
Omar Abdulla 9a9999fb1f Merge remote-tracking branch 'origin/main' into feature/bump-resolc-compiler-tests 2025-11-06 06:41:39 +03:00
Omar Abdulla ab9164e873 Reduce the timeout for transactions to 2 minutes 2025-11-06 06:40:20 +03:00
Omar Abdulla 32a433eb0a Bump the version of resolc compiler tests 2025-11-06 06:39:10 +03:00
Omar dff4c25e24 Bump the version of resolc compiler tests (#207) 2025-11-06 02:56:38 +00:00
Omar Abdulla 94026b61f4 Bump the version of resolc compiler tests 2025-11-06 05:56:08 +03:00
Omar e433d93cbf Limit the solc version to a max of 0.8.30 (#206) 2025-11-04 18:58:14 +00:00
Omar 408754e8fb Remove the cwd setting from the export-chainspec command (#205) 2025-11-04 03:30:39 +00:00
6 changed files with 14 additions and 22 deletions
+2 -14
View File
@@ -234,15 +234,9 @@ impl Platform for ReviveDevNodePolkavmResolcPlatform {
.path .path
.as_path(); .as_path();
let wallet = AsRef::<WalletConfiguration>::as_ref(&context).wallet(); let wallet = AsRef::<WalletConfiguration>::as_ref(&context).wallet();
let working_directory = AsRef::<WorkingDirectoryConfiguration>::as_ref(&context).as_path();
let export_chainspec_command = SubstrateNode::REVIVE_DEV_NODE_EXPORT_CHAINSPEC_COMMAND; let export_chainspec_command = SubstrateNode::REVIVE_DEV_NODE_EXPORT_CHAINSPEC_COMMAND;
SubstrateNode::node_genesis( SubstrateNode::node_genesis(revive_dev_node_path, export_chainspec_command, &wallet)
revive_dev_node_path,
export_chainspec_command,
&wallet,
working_directory,
)
} }
} }
@@ -308,15 +302,9 @@ impl Platform for ReviveDevNodeRevmSolcPlatform {
.path .path
.as_path(); .as_path();
let wallet = AsRef::<WalletConfiguration>::as_ref(&context).wallet(); let wallet = AsRef::<WalletConfiguration>::as_ref(&context).wallet();
let working_directory = AsRef::<WorkingDirectoryConfiguration>::as_ref(&context).as_path();
let export_chainspec_command = SubstrateNode::REVIVE_DEV_NODE_EXPORT_CHAINSPEC_COMMAND; let export_chainspec_command = SubstrateNode::REVIVE_DEV_NODE_EXPORT_CHAINSPEC_COMMAND;
SubstrateNode::node_genesis( SubstrateNode::node_genesis(revive_dev_node_path, export_chainspec_command, &wallet)
revive_dev_node_path,
export_chainspec_command,
&wallet,
working_directory,
)
} }
} }
@@ -160,7 +160,6 @@ impl SubstrateNode {
&self.node_binary, &self.node_binary,
&self.export_chainspec_command, &self.export_chainspec_command,
&self.wallet, &self.wallet,
self.base_directory.as_path(),
) )
.context("Failed to prepare the chainspec command")?; .context("Failed to prepare the chainspec command")?;
@@ -320,7 +319,6 @@ impl SubstrateNode {
node_path: &Path, node_path: &Path,
export_chainspec_command: &str, export_chainspec_command: &str,
wallet: &EthereumWallet, wallet: &EthereumWallet,
base_directory: impl AsRef<Path>,
) -> anyhow::Result<serde_json::Value> { ) -> anyhow::Result<serde_json::Value> {
trace!("Exporting the chainspec"); trace!("Exporting the chainspec");
let output = Command::new(node_path) let output = Command::new(node_path)
@@ -328,7 +326,6 @@ impl SubstrateNode {
.arg("--chain") .arg("--chain")
.arg("dev") .arg("dev")
.env_remove("RUST_LOG") .env_remove("RUST_LOG")
.current_dir(base_directory)
.output() .output()
.context("Failed to export the chain-spec")?; .context("Failed to export the chain-spec")?;
+1 -1
View File
@@ -104,7 +104,7 @@ where
}; };
debug!(%tx_hash, "Submitted Transaction"); debug!(%tx_hash, "Submitted Transaction");
pending_transaction.set_timeout(Some(Duration::from_secs(240))); pending_transaction.set_timeout(Some(Duration::from_secs(120)));
let tx_hash = pending_transaction.watch().await.context(format!( let tx_hash = pending_transaction.watch().await.context(format!(
"Transaction inclusion watching timeout for {tx_hash}" "Transaction inclusion watching timeout for {tx_hash}"
))?; ))?;
+9 -2
View File
@@ -2,12 +2,13 @@
use std::{ use std::{
collections::HashMap, collections::HashMap,
str::FromStr,
sync::{LazyLock, Mutex}, sync::{LazyLock, Mutex},
}; };
use revive_dt_common::types::VersionOrRequirement; use revive_dt_common::types::VersionOrRequirement;
use semver::Version; use semver::{Version, VersionReq};
use sha2::{Digest, Sha256}; use sha2::{Digest, Sha256};
use crate::list::List; use crate::list::List;
@@ -65,6 +66,9 @@ impl SolcDownloader {
target: &'static str, target: &'static str,
list: &'static str, list: &'static str,
) -> anyhow::Result<Self> { ) -> anyhow::Result<Self> {
static MAXIMUM_COMPILER_VERSION_REQUIREMENT: LazyLock<VersionReq> =
LazyLock::new(|| VersionReq::from_str("<=0.8.30").unwrap());
let version_or_requirement = version.into(); let version_or_requirement = version.into();
match version_or_requirement { match version_or_requirement {
VersionOrRequirement::Version(version) => Ok(Self { VersionOrRequirement::Version(version) => Ok(Self {
@@ -79,7 +83,10 @@ impl SolcDownloader {
.builds .builds
.into_iter() .into_iter()
.map(|build| build.version) .map(|build| build.version)
.filter(|version| requirement.matches(version)) .filter(|version| {
MAXIMUM_COMPILER_VERSION_REQUIREMENT.matches(version)
&& requirement.matches(version)
})
.max() .max()
else { else {
anyhow::bail!("Failed to find a version that satisfies {requirement:?}"); anyhow::bail!("Failed to find a version that satisfies {requirement:?}");