Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "trevm"
version = "0.29.0"
version = "0.30.0"
rust-version = "1.83.0"
edition = "2021"
authors = ["init4"]
Expand Down Expand Up @@ -44,8 +44,8 @@ alloy = { version = "1.0.35", default-features = false, features = [
"sol-types",
] }

revm = { version = "29.0.1", default-features = false }
revm-inspectors = { version = "0.30", optional = true }
revm = { version = "30.1.2", default-features = false }
revm-inspectors = { version = "0.31", optional = true }

dashmap = { version = "6.1.0", optional = true }
tracing = { version = "0.1.41", optional = true }
Expand All @@ -54,7 +54,7 @@ thiserror = "2.0.11"
tokio = { version = "1.44", optional = true }

[dev-dependencies]
revm = { version = "29.0.1", features = ["serde-json", "std", "alloydb"] }
revm = { version = "30.1.1", features = ["serde-json", "std", "alloydb"] }
trevm = { path = ".", features = ["test-utils"] }

alloy = { version = "1.0.35", features = ["providers", "transports"] }
Expand Down
2 changes: 1 addition & 1 deletion src/db/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ mod state;
pub use state::{Child, ConcurrentState, ConcurrentStateInfo};

use crate::db::StateAcc;
use alloy::primitives::B256;
use revm::{
database::{states::bundle_state::BundleRetention, BundleState},
primitives::B256,
DatabaseRef,
};
use std::collections::BTreeMap;
Expand Down
12 changes: 4 additions & 8 deletions src/est.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl EstimationResult {
Self::Revert { limit, reason: output.clone(), gas_used: *gas_used }
}
ExecutionResult::Halt { reason, gas_used } => {
Self::Halt { limit, reason: *reason, gas_used: *gas_used }
Self::Halt { limit, reason: reason.clone(), gas_used: *gas_used }
}
}
}
Expand Down Expand Up @@ -245,14 +245,11 @@ impl EstimationResult {
}

/// Adjust the binary search range based on the estimation outcome.
pub(crate) const fn adjust_binary_search_range(
&self,
range: &mut SearchRange,
) -> Result<(), Self> {
pub(crate) fn adjust_binary_search_range(&self, range: &mut SearchRange) -> Result<(), Self> {
match self {
Self::Success { limit, .. } => range.set_max(*limit),
Self::Revert { limit, .. } => range.set_min(*limit),
Self::Halt { limit, reason, gas_used } => {
Self::Halt { limit, reason, .. } => {
// Both `OutOfGas` and `InvalidEFOpcode` can occur dynamically
// if the gas left is too low. Treat this as an out of gas
// condition, knowing that the call succeeds with a
Expand All @@ -263,8 +260,7 @@ impl EstimationResult {
if matches!(reason, HaltReason::OutOfGas(_) | HaltReason::InvalidFEOpcode) {
range.set_min(*limit);
} else {
// NB: can't clone here as this is a const fn.
return Err(Self::Halt { limit: *limit, reason: *reason, gas_used: *gas_used });
return Err(self.clone());
}
}
}
Expand Down
Loading