Skip to content

Commit 1a26aeb

Browse files
authored
chore(deps): bump breaking deps (#2093)
* chore(deps): bump breaking deps * chore: cargo update ``` Updating crates.io index Locking 73 packages to latest compatible versions Updating alloy-chains v0.1.56 -> v0.1.62 Updating alloy-json-abi v0.8.19 -> v0.8.21 Updating alloy-primitives v0.8.19 -> v0.8.21 Updating alloy-sol-macro v0.8.19 -> v0.8.21 Updating alloy-sol-macro-expander v0.8.19 -> v0.8.21 Updating alloy-sol-macro-input v0.8.19 -> v0.8.21 Updating alloy-sol-type-parser v0.8.19 -> v0.8.21 Updating alloy-sol-types v0.8.19 -> v0.8.21 Updating alloy-trie v0.7.8 -> v0.7.9 Updating async-trait v0.1.85 -> v0.1.86 Updating aurora-engine-modexp v1.1.0 -> v1.2.0 Updating bit-set v0.5.3 -> v0.8.0 Updating bit-vec v0.6.3 -> v0.8.0 Updating blst v0.3.13 -> v0.3.14 Updating bumpalo v3.16.0 -> v3.17.0 Updating bytes v1.9.0 -> v1.10.0 Updating cc v1.2.10 -> v1.2.14 Updating clap v4.5.26 -> v4.5.30 Updating clap_builder v4.5.26 -> v4.5.30 Updating clap_derive v4.5.24 -> v4.5.28 Updating codspeed v2.7.2 -> v2.8.0 Updating codspeed-criterion-compat v2.7.2 -> v2.8.0 Adding const_format v0.2.34 Adding const_format_proc_macros v0.2.34 Updating cpufeatures v0.2.16 -> v0.2.17 Updating crunchy v0.2.2 -> v0.2.3 Updating equivalent v1.0.1 -> v1.0.2 Adding getrandom v0.3.1 Updating httparse v1.9.5 -> v1.10.0 Updating hyper v1.5.2 -> v1.6.0 Updating indexmap v2.7.0 -> v2.7.1 Updating indicatif v0.17.9 -> v0.17.11 Updating ipnet v2.10.1 -> v2.11.0 Updating is-terminal v0.4.13 -> v0.4.15 Updating itertools v0.13.0 -> v0.14.0 Updating kzg-rs v0.2.4 -> v0.2.5 Updating miniz_oxide v0.8.3 -> v0.8.4 Updating native-tls v0.2.12 -> v0.2.13 Updating once_cell v1.20.2 -> v1.20.3 Updating openssl v0.10.68 -> v0.10.71 Updating openssl-probe v0.1.5 -> v0.1.6 Updating openssl-sys v0.9.104 -> v0.9.106 Updating parity-scale-codec v3.6.12 -> v3.7.4 Updating parity-scale-codec-derive v3.6.12 -> v3.7.4 Updating pin-project v1.1.8 -> v1.1.9 Updating pin-project-internal v1.1.8 -> v1.1.9 Updating proptest v1.5.0 -> v1.6.0 Updating ring v0.17.8 -> v0.17.9 Updating ruint v1.12.4 -> v1.13.0 Updating rustc-hash v2.1.0 -> v2.1.1 Updating rustix v0.38.43 -> v0.38.44 Updating rustls v0.23.21 -> v0.23.23 Updating rustls-pki-types v1.10.1 -> v1.11.0 Updating ryu v1.0.18 -> v1.0.19 Updating semver v1.0.24 -> v1.0.25 Updating serde_json v1.0.135 -> v1.0.138 Updating smallvec v1.13.2 -> v1.14.0 Updating sp1-lib v4.0.1 -> v4.1.1 Updating sp1-primitives v4.0.1 -> v4.1.1 Updating sp1_bls12_381 v0.8.0-sp1-4.0.0 -> v0.8.0-sp1-4.0.0-v2 (available: v0.8.0) Updating strum v0.26.3 -> v0.27.1 Updating strum_macros v0.26.4 -> v0.27.1 Updating syn v2.0.96 -> v2.0.98 Updating syn-solidity v0.8.19 -> v0.8.21 Updating tempfile v3.15.0 -> v3.17.1 Updating toml_edit v0.22.22 -> v0.22.24 Updating typenum v1.17.0 -> v1.18.0 Updating unicode-ident v1.0.14 -> v1.0.16 Adding uuid v1.13.2 Updating wait-timeout v0.2.0 -> v0.2.1 Adding wasi v0.13.3+wasi-0.2.2 Updating winnow v0.6.24 -> v0.7.2 Adding wit-bindgen-rt v0.33.0 ```
1 parent 3e7009b commit 1a26aeb

File tree

13 files changed

+396
-355
lines changed

13 files changed

+396
-355
lines changed

Cargo.lock

+352-293
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+11-13
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ alloy-sol-types = { version = "0.8.2", default-features = false }
6262
alloy-eip2930 = { version = "0.1.0", default-features = false }
6363
alloy-eip7702 = { version = "0.5.0", default-features = false }
6464

65-
alloy-consensus = { version = "0.9.2", default-features = false }
66-
alloy-eips = { version = "0.9.2", default-features = false }
67-
alloy-provider = { version = "0.9.2", default-features = false }
68-
alloy-signer = { version = "0.9.2", default-features = false }
69-
alloy-signer-local = { version = "0.9.2", default-features = false }
70-
alloy-transport = { version = "0.9.2", default-features = false }
71-
alloy-transport-http = { version = "0.9.2", default-features = false }
65+
alloy-consensus = { version = "0.11.1", default-features = false }
66+
alloy-eips = { version = "0.11.1", default-features = false }
67+
alloy-provider = { version = "0.11.1", default-features = false }
68+
alloy-signer = { version = "0.11.1", default-features = false }
69+
alloy-signer-local = { version = "0.11.1", default-features = false }
70+
alloy-transport = { version = "0.11.1", default-features = false }
71+
alloy-transport-http = { version = "0.11.1", default-features = false }
7272

7373
# misc
7474
aurora-engine-modexp = { version = "1.1", default-features = false }
@@ -77,11 +77,10 @@ bitflags = { version = "2.6.0", default-features = false }
7777
bitvec = { version = "1", default-features = false }
7878
blst = "0.3.13"
7979
bn = { package = "substrate-bn", version = "0.6", default-features = false }
80-
c-kzg = { version = "1.0.3", default-features = false }
80+
c-kzg = { version = "1.0.0", default-features = false }
8181
cfg-if = { version = "1.0", default-features = false }
8282
clap = "4"
8383
criterion = { package = "codspeed-criterion-compat", version = "2.7" }
84-
derive_more = { version = "1.0.0", default-features = false }
8584
derive-where = { version = "1.2.7", default-features = false }
8685
enumn = "0.1"
8786
k256 = { version = "0.13.3", default-features = false }
@@ -94,7 +93,7 @@ phf = { version = "0.11", default-features = false }
9493
rand = "0.8"
9594
reqwest = "0.12"
9695
ripemd = { version = "0.1", default-features = false }
97-
secp256k1 = { version = "0.29", default-features = false }
96+
secp256k1 = { version = "0.30", default-features = false }
9897
serde = { version = "1.0", default-features = false }
9998
serde_json = { version = "1.0", default-features = false }
10099
sha2 = { version = "0.10", default-features = false }
@@ -105,13 +104,12 @@ anyhow = "1.0.89"
105104
bincode = "1.3"
106105
eyre = "0.6.12"
107106
hash-db = "0.15"
108-
hashbrown = "0.14"
109107
indicatif = "0.17"
110108
microbench = "0.5"
111109
plain_hasher = "0.2"
112-
rstest = "0.23.0"
110+
rstest = "0.24.0"
113111
serde_derive = "1.0"
114-
thiserror = "1.0"
112+
thiserror = "2.0"
115113
triehash = "0.8"
116114
walkdir = "2.5"
117115

bins/revme/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ alloy-sol-types.workspace = true
2929

3030
# misc
3131
hash-db.workspace = true
32-
hashbrown.workspace = true
3332
indicatif.workspace = true
3433
microbench.workspace = true
3534
plain_hasher.workspace = true

crates/database/src/alloydb.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use alloy_provider::{
66
},
77
Network, Provider,
88
};
9-
use alloy_transport::{Transport, TransportError};
9+
use alloy_transport::TransportError;
1010
use core::error::Error;
1111
use database_interface::{async_db::DatabaseAsyncRef, DBErrorMarker};
1212
use primitives::{Address, B256, U256};
@@ -36,15 +36,15 @@ impl From<TransportError> for DBTransportError {
3636
///
3737
/// When accessing the database, it'll use the given provider to fetch the corresponding account's data.
3838
#[derive(Debug)]
39-
pub struct AlloyDB<T: Transport + Clone, N: Network, P: Provider<T, N>> {
39+
pub struct AlloyDB<N: Network, P: Provider<N>> {
4040
/// The provider to fetch the data from.
4141
provider: P,
4242
/// The block number on which the queries will be based on.
4343
block_number: BlockId,
44-
_marker: core::marker::PhantomData<fn() -> (T, N)>,
44+
_marker: core::marker::PhantomData<fn() -> N>,
4545
}
4646

47-
impl<T: Transport + Clone, N: Network, P: Provider<T, N>> AlloyDB<T, N, P> {
47+
impl<N: Network, P: Provider<N>> AlloyDB<N, P> {
4848
/// Creates a new AlloyDB instance, with a [Provider] and a block.
4949
pub fn new(provider: P, block_number: BlockId) -> Self {
5050
Self {
@@ -60,7 +60,7 @@ impl<T: Transport + Clone, N: Network, P: Provider<T, N>> AlloyDB<T, N, P> {
6060
}
6161
}
6262

63-
impl<T: Transport + Clone, N: Network, P: Provider<T, N>> DatabaseAsyncRef for AlloyDB<T, N, P> {
63+
impl<N: Network, P: Provider<N>> DatabaseAsyncRef for AlloyDB<N, P> {
6464
type Error = DBTransportError;
6565

6666
async fn basic_async_ref(&self, address: Address) -> Result<Option<AccountInfo>, Self::Error> {

crates/precompile/benches/bench.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub fn benchmark_crypto_precompiles(c: &mut Criterion) {
7676
let message = Message::from_digest_slice(&hash[..]).unwrap();
7777
let s = SECP256K1.sign_ecdsa_recoverable(&message, &secret_key);
7878
let (rec_id, data) = s.serialize_compact();
79-
let rec_id = rec_id.to_i32() as u8 + 27;
79+
let rec_id = i32::from(rec_id) as u8 + 27;
8080

8181
let mut message_and_signature = [0u8; 128];
8282
message_and_signature[0..32].copy_from_slice(&hash[..]);

crates/precompile/src/secp256k1/bitcoin_secp256k1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use secp256k1::{
88
use k256 as _;
99

1010
pub fn ecrecover(sig: &B512, recid: u8, msg: &B256) -> Result<B256, secp256k1::Error> {
11-
let recid = RecoveryId::from_i32(recid as i32).expect("recovery ID is valid");
11+
let recid = RecoveryId::try_from(recid as i32).expect("recovery ID is valid");
1212
let sig = RecoverableSignature::from_compact(sig.as_slice(), recid)?;
1313

1414
let msg = Message::from_digest(msg.0);

examples/database_components/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ revm.workspace = true
2727

2828
# misc
2929
auto_impl.workspace = true
30-
derive_more.workspace = true
30+
thiserror.workspace = true

examples/database_components/src/lib.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ pub mod state;
88
pub use block_hash::{BlockHash, BlockHashRef};
99
pub use state::{State, StateRef};
1010

11-
use core::{error::Error as StdError, fmt::Debug};
12-
use derive_more::Display;
1311
use revm::{
1412
database_interface::{DBErrorMarker, Database, DatabaseCommit, DatabaseRef},
1513
primitives::{Address, HashMap, B256, U256},
@@ -22,14 +20,14 @@ pub struct DatabaseComponents<S, BH> {
2220
pub block_hash: BH,
2321
}
2422

25-
#[derive(Debug, Display)]
23+
#[derive(Debug, thiserror::Error)]
2624
pub enum DatabaseComponentError<SE, BHE> {
25+
#[error(transparent)]
2726
State(SE),
27+
#[error(transparent)]
2828
BlockHash(BHE),
2929
}
3030

31-
impl<SE: Debug + Display, BHE: Debug + Display> StdError for DatabaseComponentError<SE, BHE> {}
32-
3331
impl<SE, BHE> DBErrorMarker for DatabaseComponentError<SE, BHE> {}
3432

3533
impl<S: State, BH: BlockHash> Database for DatabaseComponents<S, BH> {

examples/erc20_gas/Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,5 @@ tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
3030

3131
# alloy
3232
alloy-sol-types = { workspace = true, features = ["std"] }
33-
alloy-transport-http.workspace = true
3433
alloy-provider = { workspace = true, default-features = true }
35-
reqwest.workspace = true
3634
anyhow.workspace = true

examples/erc20_gas/src/main.rs

+7-11
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
55
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
66

7-
use alloy_provider::{network::Ethereum, ProviderBuilder, RootProvider};
7+
use alloy_provider::{network::Ethereum, DynProvider, ProviderBuilder};
88
use alloy_sol_types::SolValue;
9-
use alloy_transport_http::Http;
109
use anyhow::Result;
1110
use database::{AlloyDB, BlockId, CacheDB};
1211
use exec::transact_erc20evm_commit;
13-
use reqwest::{Client, Url};
1412
use revm::{
1513
context_interface::{
1614
result::{InvalidHeader, InvalidTransaction},
@@ -27,22 +25,20 @@ use revm::{
2725
pub mod exec;
2826
pub mod handler;
2927

30-
type AlloyCacheDB =
31-
CacheDB<WrapDatabaseAsync<AlloyDB<Http<Client>, Ethereum, RootProvider<Http<Client>>>>>;
28+
type AlloyCacheDB = CacheDB<WrapDatabaseAsync<AlloyDB<Ethereum, DynProvider>>>;
3229

3330
// Constants
3431
pub const TOKEN: Address = address!("a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48");
3532
pub const TREASURY: Address = address!("0000000000000000000000000000000000000001");
3633

3734
#[tokio::main]
3835
async fn main() -> Result<()> {
39-
// Set up the HTTP transport which is consumed by the RPC client.
40-
let rpc_url: Url = "https://mainnet.infura.io/v3/c60b0bb42f8a4c6481ecd229eddaca27".parse()?;
36+
// Initialize the Alloy provider and database
37+
let rpc_url = "https://mainnet.infura.io/v3/c60b0bb42f8a4c6481ecd229eddaca27";
38+
let provider = DynProvider::new(ProviderBuilder::new().on_builtin(rpc_url).await?);
4139

42-
let client = ProviderBuilder::new().on_http(rpc_url);
43-
44-
let alloy = WrapDatabaseAsync::new(AlloyDB::new(client, BlockId::latest())).unwrap();
45-
let mut cache_db = CacheDB::new(alloy);
40+
let alloy_db = WrapDatabaseAsync::new(AlloyDB::new(provider, BlockId::latest())).unwrap();
41+
let mut cache_db = CacheDB::new(alloy_db);
4642

4743
// Random empty account: From
4844
let account = address!("18B06aaF27d44B756FCF16Ca20C1f183EB49111f");

examples/uniswap_get_reserves/src/main.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
33

44
use alloy_eips::BlockId;
5-
use alloy_provider::ProviderBuilder;
5+
use alloy_provider::{DynProvider, ProviderBuilder};
66
use alloy_sol_types::{sol, SolCall};
77
use database::{AlloyDB, CacheDB};
88
use revm::{
@@ -14,12 +14,12 @@ use revm::{
1414

1515
#[tokio::main]
1616
async fn main() -> anyhow::Result<()> {
17-
// Set up the HTTP transport which is consumed by the RPC client.
18-
let rpc_url = "https://mainnet.infura.io/v3/c60b0bb42f8a4c6481ecd229eddaca27".parse()?;
17+
// Initialize the Alloy provider and database
18+
let rpc_url = "https://mainnet.infura.io/v3/c60b0bb42f8a4c6481ecd229eddaca27";
19+
let provider = DynProvider::new(ProviderBuilder::new().on_builtin(rpc_url).await?);
1920

20-
// Create a provider
21-
let client = ProviderBuilder::new().on_http(rpc_url);
22-
let client = WrapDatabaseAsync::new(AlloyDB::new(client, BlockId::latest())).unwrap();
21+
let alloy_db = WrapDatabaseAsync::new(AlloyDB::new(provider, BlockId::latest())).unwrap();
22+
let cache_db = CacheDB::new(alloy_db);
2323

2424
// ----------------------------------------------------------- //
2525
// Storage slots of UniV2Pair contract //
@@ -48,10 +48,10 @@ async fn main() -> anyhow::Result<()> {
4848
let encoded = getReservesCall::new(()).abi_encode();
4949

5050
// Query basic properties of an account incl bytecode
51-
let acc_info = client.basic_ref(pool_address).unwrap().unwrap();
51+
let acc_info = cache_db.basic_ref(pool_address).unwrap().unwrap();
5252

5353
// Query value of storage slot at account address
54-
let value = client.storage_ref(pool_address, slot).unwrap();
54+
let value = cache_db.storage_ref(pool_address, slot).unwrap();
5555

5656
// Initialise empty in-memory-db
5757
let mut cache_db = CacheDB::new(EmptyDB::default());

examples/uniswap_v2_usdc_swap/Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,5 @@ tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
3131
# alloy
3232
alloy-sol-types = { workspace = true, features = ["std"] }
3333
alloy-eips.workspace = true
34-
alloy-transport-http.workspace = true
3534
alloy-provider = { workspace = true, default-features = true }
36-
reqwest.workspace = true
3735
anyhow.workspace = true

examples/uniswap_v2_usdc_swap/src/main.rs

+7-12
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
33

44
use alloy_eips::BlockId;
5-
use alloy_provider::{network::Ethereum, ProviderBuilder, RootProvider};
5+
use alloy_provider::{network::Ethereum, DynProvider, ProviderBuilder};
66
use alloy_sol_types::{sol, SolCall, SolValue};
7-
use alloy_transport_http::Http;
87
use anyhow::{anyhow, Result};
98
use database::{AlloyDB, CacheDB};
10-
use reqwest::Client;
119
use revm::{
1210
context_interface::result::{ExecutionResult, Output},
1311
database_interface::WrapDatabaseAsync,
@@ -17,19 +15,16 @@ use revm::{
1715
};
1816
use std::ops::Div;
1917

20-
type AlloyCacheDB =
21-
CacheDB<WrapDatabaseAsync<AlloyDB<Http<Client>, Ethereum, RootProvider<Http<Client>>>>>;
18+
type AlloyCacheDB = CacheDB<WrapDatabaseAsync<AlloyDB<Ethereum, DynProvider>>>;
2219

2320
#[tokio::main]
2421
async fn main() -> Result<()> {
25-
// Set up the HTTP transport which is consumed by the RPC client.
26-
let rpc_url = "https://mainnet.infura.io/v3/c60b0bb42f8a4c6481ecd229eddaca27".parse()?;
22+
// Initialize the Alloy provider and database
23+
let rpc_url = "https://mainnet.infura.io/v3/c60b0bb42f8a4c6481ecd229eddaca27";
24+
let provider = DynProvider::new(ProviderBuilder::new().on_builtin(rpc_url).await?);
2725

28-
// Create a provider
29-
let client = ProviderBuilder::new().on_http(rpc_url);
30-
31-
let alloy = WrapDatabaseAsync::new(AlloyDB::new(client, BlockId::latest())).unwrap();
32-
let mut cache_db = CacheDB::new(alloy);
26+
let alloy_db = WrapDatabaseAsync::new(AlloyDB::new(provider, BlockId::latest())).unwrap();
27+
let mut cache_db = CacheDB::new(alloy_db);
3328

3429
// Random empty account
3530
let account = address!("18B06aaF27d44B756FCF16Ca20C1f183EB49111f");

0 commit comments

Comments
 (0)