Lower gas limit for failed estimates

This commit is contained in:
Omar Abdulla
2025-08-15 14:59:06 +03:00
parent 64d0a7f995
commit a04a4a88cd
3 changed files with 17 additions and 12 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ pub struct Solc {
impl SolidityCompiler for Solc {
type Options = ();
#[tracing::instrument(level = "debug", ret)]
#[tracing::instrument(level = "info", ret)]
async fn build(
&self,
CompilerInput {
+5 -5
View File
@@ -329,7 +329,7 @@ async fn start_reporter_task(mut report_rx: mpsc::UnboundedReceiver<(Test, CaseR
const GREEN: &str = "\x1B[32m";
const RED: &str = "\x1B[31m";
const COLOUR_RESET: &str = "\x1B[0m";
const COLOR_RESET: &str = "\x1B[0m";
const BOLD: &str = "\x1B[1m";
const BOLD_RESET: &str = "\x1B[22m";
@@ -348,13 +348,13 @@ async fn start_reporter_task(mut report_rx: mpsc::UnboundedReceiver<(Test, CaseR
Ok(_inputs) => {
number_of_successes += 1;
eprintln!(
"{GREEN}Case Succeeded:{COLOUR_RESET} {test_path} -> {case_name}:{case_idx} (mode: {test_mode})"
"{GREEN}Case Succeeded:{COLOR_RESET} {test_path} -> {case_name}:{case_idx} (mode: {test_mode})"
);
}
Err(err) => {
number_of_failures += 1;
eprintln!(
"{RED}Case Failed:{COLOUR_RESET} {test_path} -> {case_name}:{case_idx} (mode: {test_mode})"
"{RED}Case Failed:{COLOR_RESET} {test_path} -> {case_name}:{case_idx} (mode: {test_mode})"
);
failures.push((test, err));
}
@@ -377,14 +377,14 @@ async fn start_reporter_task(mut report_rx: mpsc::UnboundedReceiver<(Test, CaseR
let test_mode = test.mode.clone();
eprintln!(
"---- {RED}Case Failed:{COLOUR_RESET} {test_path} -> {case_name}:{case_idx} (mode: {test_mode:?}) ----\n\n{err}\n"
"---- {RED}Case Failed:{COLOR_RESET} {test_path} -> {case_name}:{case_idx} (mode: {test_mode}) ----\n\n{err}\n"
);
}
}
// Summary at the end.
eprintln!(
"{} cases: {GREEN}{number_of_successes}{COLOUR_RESET} cases succeeded, {RED}{number_of_failures}{COLOUR_RESET} cases failed in {} seconds",
"{} cases: {GREEN}{number_of_successes}{COLOR_RESET} cases succeeded, {RED}{number_of_failures}{COLOR_RESET} cases failed in {} seconds",
number_of_successes + number_of_failures,
elapsed.as_secs()
);
+11 -6
View File
@@ -33,7 +33,7 @@ use alloy::{
};
use anyhow::Context;
use revive_common::EVMVersion;
use tracing::{Instrument, Level};
use tracing::Instrument;
use revive_dt_common::{fs::clear_directory, futures::poll};
use revive_dt_config::Arguments;
@@ -48,7 +48,7 @@ static NODE_COUNT: AtomicU32 = AtomicU32::new(0);
///
/// Implements helpers to initialize, spawn and wait the node.
///
/// Assumes dev mode and IPC only (`P2P`, `http`` etc. are kept disabled).
/// Assumes dev mode and IPC only (`P2P`, `http` etc. are kept disabled).
///
/// Prunes the child process and the base directory on drop.
#[derive(Debug)]
@@ -228,12 +228,12 @@ impl GethNode {
}
}
#[tracing::instrument(skip_all, fields(geth_node_id = self.id), level = Level::TRACE)]
#[tracing::instrument(skip_all, fields(geth_node_id = self.id), level = "trace")]
fn geth_stdout_log_file_path(&self) -> PathBuf {
self.logs_directory.join(Self::GETH_STDOUT_LOG_FILE_NAME)
}
#[tracing::instrument(skip_all, fields(geth_node_id = self.id), level = Level::TRACE)]
#[tracing::instrument(skip_all, fields(geth_node_id = self.id), level = "trace")]
fn geth_stderr_log_file_path(&self) -> PathBuf {
self.logs_directory.join(Self::GETH_STDERR_LOG_FILE_NAME)
}
@@ -257,7 +257,11 @@ impl GethNode {
Box::pin(async move {
ProviderBuilder::new()
.disable_recommended_fillers()
.filler(FallbackGasFiller::new(500_000_000, 500_000_000, 1))
.filler(FallbackGasFiller::new(
25_000_000,
100_000_000_000,
1_000_000_000,
))
.filler(ChainIdFiller::default())
.filler(NonceFiller::new(nonce_manager))
.wallet(wallet)
@@ -278,7 +282,7 @@ impl EthereumNode for GethNode {
let span = tracing::debug_span!("Submitting transaction", ?transaction);
let _guard = span.enter();
let provider = Arc::new(self.provider().await?);
let provider = self.provider().await.map(Arc::new)?;
let transaction_hash = *provider.send_transaction(transaction).await?.tx_hash();
// The following is a fix for the "transaction indexing is in progress" error that we used
@@ -323,6 +327,7 @@ impl EthereumNode for GethNode {
?transaction_hash
))
.await
.inspect(|receipt| tracing::info!(gas_used = receipt.gas_used, "Gas used on transaction"))
}
#[tracing::instrument(level = "info", skip_all, fields(geth_node_id = self.id), err)]