Compare commits

..

9 Commits

Author SHA1 Message Date
Omar Abdulla b6f1f6e6af Ignore the tx mine test 2025-11-01 08:21:39 +03:00
Omar Abdulla 6e8187b135 Update the commit hash of the polkadot sdk 2025-11-01 07:56:59 +03:00
Omar Abdulla 310925de07 Update tests 2025-11-01 07:53:22 +03:00
Omar Abdulla bb98c96c9d fix machete 2025-11-01 07:15:26 +03:00
Omar Abdulla 1d481b314c Update the CI 2025-11-01 06:53:19 +03:00
Omar Abdulla 36ef669341 Add the step path to the failure logs 2025-11-01 06:45:29 +03:00
Omar Abdulla e7ebd0c034 Update references to the substrate node 2025-11-01 05:26:26 +03:00
Omar Abdulla ad20b99e0a Update the ci for the revive-dev-node 2025-11-01 05:22:36 +03:00
Omar Abdulla 234e59bbea Remove references to kitchensink 2025-11-01 04:57:33 +03:00
10 changed files with 19 additions and 58 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))),
}
}
}
+6 -14
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
@@ -603,10 +598,7 @@ where
let expected = !assertion.exception;
let actual = receipt.status();
if actual != expected {
let revert_reason = tracing_result
.revert_reason
.as_ref()
.or(tracing_result.error.as_ref());
let revert_reason = tracing_result.revert_reason.as_ref();
tracing::error!(
expected,
actual,
@@ -621,8 +613,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 +625,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}",);
}
}
+5 -14
View File
@@ -1,6 +1,5 @@
use std::{collections::HashMap, fmt::Display, str::FromStr};
use alloy::hex::ToHexExt;
use alloy::primitives::{FixedBytes, utils::parse_units};
use alloy::{
eips::BlockNumberOrTag,
@@ -687,8 +686,8 @@ impl Calldata {
Calldata::Compound(items) => {
stream::iter(items.iter().zip(other.chunks(32)))
.map(|(this, other)| async move {
// The MatterLabs format supports wildcards and therefore we also need to
// support them.
// The matterlabs format supports wildcards and therefore we
// also need to support them.
if this.as_ref() == "*" {
return Ok::<_, anyhow::Error>(true);
}
@@ -706,7 +705,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 +717,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),
@@ -770,14 +768,7 @@ impl CalldataItem {
match stack.as_slice() {
// Empty stack means that we got an empty compound calldata which we resolve to zero.
[] => Ok(U256::ZERO),
[CalldataToken::Item(item)] => {
tracing::debug!(
original_item = ?self,
resolved_item = item.to_be_bytes::<32>().encode_hex(),
"Resolution Done"
);
Ok(*item)
}
[CalldataToken::Item(item)] => Ok(*item),
_ => Err(anyhow::anyhow!(
"Invalid calldata arithmetic operation - Invalid stack"
)),
@@ -907,7 +898,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);
@@ -62,10 +62,7 @@ where
) -> TransportResult<Self::Fillable> {
match self.inner.prepare(provider, tx).await {
Ok(fill) => Ok(Some(fill)),
Err(err) => {
tracing::debug!(error = ?err, "Gas Provider Estimation Failed, using fallback");
Ok(None)
}
Err(_) => Ok(None),
}
}
+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:?}");