Compare commits

..

3 Commits

Author SHA1 Message Date
Omar Abdulla b8a71b40e2 Merge remote-tracking branch 'origin/main' into chore/update-version-of-tests2 2025-11-03 02:47:53 +03:00
Omar Abdulla 6df00f567c Update the version of tests 2025-11-03 02:45:47 +03:00
Omar Abdulla 9b75a4f236 Update the commit hash of resolc compiler tests 2025-11-03 00:25:56 +03:00
9 changed files with 14 additions and 39 deletions
+1 -5
View File
@@ -12,8 +12,4 @@ profile.json.gz
workdir
!/schema.json
!/dev-genesis.json
# Ignore all shell scripts except for the `run_tests.sh` script
*.sh
!run_tests.sh
!/dev-genesis.json
+1 -5
View File
@@ -16,7 +16,6 @@ use alloy::{
primitives::{B256, FixedBytes, U256},
signers::local::PrivateKeySigner,
};
use anyhow::Context as _;
use clap::{Parser, ValueEnum, ValueHint};
use revive_dt_common::types::{ParsedTestSpecifier, PlatformIdentifier};
use semver::Version;
@@ -1080,10 +1079,7 @@ impl FromStr for WorkingDirectoryConfiguration {
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"" => Ok(Default::default()),
_ => PathBuf::from(s)
.canonicalize()
.context("Failed to canonicalize the working directory path")
.map(Self::Path),
_ => Ok(Self::Path(PathBuf::from(s))),
}
}
}
+5 -10
View File
@@ -359,11 +359,7 @@ where
Ok(())
}
#[instrument(
level = "info",
skip_all,
fields(block_number = tracing::field::Empty)
)]
#[instrument(level = "info", skip_all)]
pub async fn execute_function_call(
&mut self,
_: &StepPath,
@@ -377,7 +373,6 @@ where
.handle_function_call_execution(step, deployment_receipts)
.await
.context("Failed to handle the function call execution")?;
tracing::Span::current().record("block_number", execution_receipt.block_number);
let tracing_result = self
.handle_function_call_call_frame_tracing(execution_receipt.transaction_hash)
.await
@@ -621,8 +616,8 @@ where
}
// Handling the calldata assertion
if let Some(ref expected_output) = assertion.return_data {
let expected = expected_output;
if let Some(ref expected_calldata) = assertion.return_data {
let expected = expected_calldata;
let actual = &tracing_result.output.as_ref().unwrap_or_default();
if !expected
.is_equivalent(actual, resolver.as_ref(), resolution_context)
@@ -633,9 +628,9 @@ where
?receipt,
?expected,
%actual,
"Output assertion failed"
"Calldata assertion failed"
);
anyhow::bail!("Output assertion failed - Expected {expected:?} but got {actual}",);
anyhow::bail!("Calldata assertion failed - Expected {expected:?} but got {actual}",);
}
}
+2 -3
View File
@@ -706,7 +706,6 @@ impl Calldata {
.await
.context("Failed to resolve calldata item during equivalence check")?;
let other = U256::from_be_slice(&other);
Ok(this == other)
})
.buffered(0xFF)
@@ -719,7 +718,7 @@ impl Calldata {
}
impl CalldataItem {
#[instrument(level = "info", skip_all, err(Debug))]
#[instrument(level = "info", skip_all, err)]
async fn resolve(
&self,
resolver: &(impl ResolverApi + ?Sized),
@@ -907,7 +906,7 @@ impl<T: AsRef<str>> CalldataToken<T> {
let block_hash = resolver
.block_hash(desired_block_number.into())
.await
.context(format!("Failed to resolve the block hash of block number {desired_block_number}"))?;
.context("Failed to resolve block hash for desired block number")?;
Ok(U256::from_be_bytes(block_hash.0))
} else if item == Self::BLOCK_NUMBER_VARIABLE {
@@ -251,10 +251,6 @@ impl SubstrateNode {
.arg(format!("ws://127.0.0.1:{substrate_rpc_port}"))
.arg("--rpc-max-connections")
.arg(u32::MAX.to_string())
.arg("--index-last-n-blocks")
.arg(1_000u32.to_string())
.arg("--cache-size")
.arg(1_000u32.to_string())
.env("RUST_LOG", Self::PROXY_LOG_ENV)
.stdout(stdout_file)
.stderr(stderr_file);
+1 -1
View File
@@ -104,7 +104,7 @@ where
};
debug!(%tx_hash, "Submitted Transaction");
pending_transaction.set_timeout(Some(Duration::from_secs(120)));
pending_transaction.set_timeout(Some(Duration::from_secs(240)));
let tx_hash = pending_transaction.watch().await.context(format!(
"Transaction inclusion watching timeout for {tx_hash}"
))?;
+2 -9
View File
@@ -2,13 +2,12 @@
use std::{
collections::HashMap,
str::FromStr,
sync::{LazyLock, Mutex},
};
use revive_dt_common::types::VersionOrRequirement;
use semver::{Version, VersionReq};
use semver::Version;
use sha2::{Digest, Sha256};
use crate::list::List;
@@ -66,9 +65,6 @@ impl SolcDownloader {
target: &'static str,
list: &'static str,
) -> 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();
match version_or_requirement {
VersionOrRequirement::Version(version) => Ok(Self {
@@ -83,10 +79,7 @@ impl SolcDownloader {
.builds
.into_iter()
.map(|build| build.version)
.filter(|version| {
MAXIMUM_COMPILER_VERSION_REQUIREMENT.matches(version)
&& requirement.matches(version)
})
.filter(|version| requirement.matches(version))
.max()
else {
anyhow::bail!("Failed to find a version that satisfies {requirement:?}");