mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-13 03:31:09 +00:00
Lower gas limit for failed estimates
This commit is contained in:
@@ -32,7 +32,7 @@ pub struct Solc {
|
|||||||
impl SolidityCompiler for Solc {
|
impl SolidityCompiler for Solc {
|
||||||
type Options = ();
|
type Options = ();
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", ret)]
|
#[tracing::instrument(level = "info", ret)]
|
||||||
async fn build(
|
async fn build(
|
||||||
&self,
|
&self,
|
||||||
CompilerInput {
|
CompilerInput {
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ async fn start_reporter_task(mut report_rx: mpsc::UnboundedReceiver<(Test, CaseR
|
|||||||
|
|
||||||
const GREEN: &str = "\x1B[32m";
|
const GREEN: &str = "\x1B[32m";
|
||||||
const RED: &str = "\x1B[31m";
|
const RED: &str = "\x1B[31m";
|
||||||
const COLOUR_RESET: &str = "\x1B[0m";
|
const COLOR_RESET: &str = "\x1B[0m";
|
||||||
const BOLD: &str = "\x1B[1m";
|
const BOLD: &str = "\x1B[1m";
|
||||||
const BOLD_RESET: &str = "\x1B[22m";
|
const BOLD_RESET: &str = "\x1B[22m";
|
||||||
|
|
||||||
@@ -348,13 +348,13 @@ async fn start_reporter_task(mut report_rx: mpsc::UnboundedReceiver<(Test, CaseR
|
|||||||
Ok(_inputs) => {
|
Ok(_inputs) => {
|
||||||
number_of_successes += 1;
|
number_of_successes += 1;
|
||||||
eprintln!(
|
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) => {
|
Err(err) => {
|
||||||
number_of_failures += 1;
|
number_of_failures += 1;
|
||||||
eprintln!(
|
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));
|
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();
|
let test_mode = test.mode.clone();
|
||||||
|
|
||||||
eprintln!(
|
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.
|
// Summary at the end.
|
||||||
eprintln!(
|
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,
|
number_of_successes + number_of_failures,
|
||||||
elapsed.as_secs()
|
elapsed.as_secs()
|
||||||
);
|
);
|
||||||
|
|||||||
+11
-6
@@ -33,7 +33,7 @@ use alloy::{
|
|||||||
};
|
};
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use revive_common::EVMVersion;
|
use revive_common::EVMVersion;
|
||||||
use tracing::{Instrument, Level};
|
use tracing::Instrument;
|
||||||
|
|
||||||
use revive_dt_common::{fs::clear_directory, futures::poll};
|
use revive_dt_common::{fs::clear_directory, futures::poll};
|
||||||
use revive_dt_config::Arguments;
|
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.
|
/// 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.
|
/// Prunes the child process and the base directory on drop.
|
||||||
#[derive(Debug)]
|
#[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 {
|
fn geth_stdout_log_file_path(&self) -> PathBuf {
|
||||||
self.logs_directory.join(Self::GETH_STDOUT_LOG_FILE_NAME)
|
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 {
|
fn geth_stderr_log_file_path(&self) -> PathBuf {
|
||||||
self.logs_directory.join(Self::GETH_STDERR_LOG_FILE_NAME)
|
self.logs_directory.join(Self::GETH_STDERR_LOG_FILE_NAME)
|
||||||
}
|
}
|
||||||
@@ -257,7 +257,11 @@ impl GethNode {
|
|||||||
Box::pin(async move {
|
Box::pin(async move {
|
||||||
ProviderBuilder::new()
|
ProviderBuilder::new()
|
||||||
.disable_recommended_fillers()
|
.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(ChainIdFiller::default())
|
||||||
.filler(NonceFiller::new(nonce_manager))
|
.filler(NonceFiller::new(nonce_manager))
|
||||||
.wallet(wallet)
|
.wallet(wallet)
|
||||||
@@ -278,7 +282,7 @@ impl EthereumNode for GethNode {
|
|||||||
let span = tracing::debug_span!("Submitting transaction", ?transaction);
|
let span = tracing::debug_span!("Submitting transaction", ?transaction);
|
||||||
let _guard = span.enter();
|
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();
|
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
|
// 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
|
?transaction_hash
|
||||||
))
|
))
|
||||||
.await
|
.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)]
|
#[tracing::instrument(level = "info", skip_all, fields(geth_node_id = self.id), err)]
|
||||||
|
|||||||
Reference in New Issue
Block a user