Skip to content

chore(deps): bump revm 26.0.0 #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,16 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
alloy-primitives = { version = "1.0", features = ["map"] }
alloy-provider = { version = "1.0.3", default-features = false }
alloy-rpc-types = { version = "1.0.3", features = ["eth"] }
alloy-consensus = { version = "1.0.3", default-features = false }
alloy-primitives = { version = "1.2", features = ["map"] }
alloy-provider = { version = "1.0.12", default-features = false }
alloy-rpc-types = { version = "1.0.12", features = ["eth"] }

eyre = "0.6"
futures = "0.3"

parking_lot = "0.12"

revm = { version = "24.0.0", features = ["std", "serde"] }
revm = { version = "26.0.1", features = ["std", "serde"] }

serde = "1.0"
serde_json = "1.0"
Expand All @@ -47,7 +46,7 @@ tracing = "0.1"
url = "2"

[dev-dependencies]
alloy-rpc-client = "1.0.3"
alloy-rpc-client = "1.0.12"
tiny_http = "0.12"

# [patch.crates-io]
Expand Down
9 changes: 0 additions & 9 deletions src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -913,15 +913,6 @@ mod tests {

const ENDPOINT: Option<&str> = option_env!("ETH_RPC_URL");

#[tokio::test(flavor = "multi_thread")]
async fn test_builder() {
let Some(endpoint) = ENDPOINT else { return };
let provider = get_http_provider(endpoint);

let any_rpc_block = provider.get_block(BlockId::latest()).hashes().await.unwrap().unwrap();
let _meta = BlockchainDbMeta::default().with_block(&any_rpc_block.inner);
}

#[tokio::test(flavor = "multi_thread")]
async fn shared_backend() {
let Some(endpoint) = ENDPOINT else { return };
Expand Down
26 changes: 1 addition & 25 deletions src/cache.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
//! Cache related abstraction
use alloy_consensus::BlockHeader;

use alloy_primitives::{Address, B256, U256};
use alloy_provider::network::TransactionResponse;
use parking_lot::RwLock;
use revm::{
context::BlockEnv,
context_interface::block::BlobExcessGasAndPrice,
primitives::{
map::{AddressHashMap, HashMap},
KECCAK_EMPTY,
Expand Down Expand Up @@ -142,28 +140,6 @@ impl BlockchainDbMeta {
Self { block_env, hosts: BTreeSet::from([host]) }
}

/// Sets the [BlockEnv] of this instance using the provided [alloy_rpc_types::Block]
pub fn with_block<T: TransactionResponse, H: BlockHeader>(
mut self,
block: &alloy_rpc_types::Block<T, H>,
) -> Self {
self.block_env = BlockEnv {
number: block.header.number(),
beneficiary: block.header.beneficiary(),
timestamp: block.header.timestamp(),
difficulty: U256::from(block.header.difficulty()),
basefee: block.header.base_fee_per_gas().unwrap_or_default(),
gas_limit: block.header.gas_limit(),
prevrandao: block.header.mix_hash(),
blob_excess_gas_and_price: Some(BlobExcessGasAndPrice::new(
block.header.excess_blob_gas().unwrap_or_default(),
false,
)),
};

self
}

/// Infers the host from the provided url and adds it to the set of hosts
pub fn with_url(mut self, url: &str) -> Self {
let host = Url::parse(url)
Expand Down
Loading