Skip to content

Commit

Permalink
feat: upgrade revm dependencies (#546)
Browse files Browse the repository at this point in the history
* feat: upgrade revm dependencies

* Create wild-phones-drum.md
  • Loading branch information
fvictorio authored Jul 9, 2024
1 parent 048c0c0 commit e650c9e
Show file tree
Hide file tree
Showing 19 changed files with 146 additions and 171 deletions.
5 changes: 5 additions & 0 deletions .changeset/wild-phones-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nomicfoundation/edr": patch
---

Upgraded revm to v37
87 changes: 46 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/edr_eth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
anyhow = "1.0.75"
alloy-rlp = { version = "0.3", default-features = false, features = ["derive"] }
c-kzg = { version = "1.0.0", default-features = false }
c-kzg = { version = "1.0.2", default-features = false }
hash-db = { version = "0.15.2", default-features = false }
hash256-std-hasher = { version = "0.15.2", default-features = false }
hashbrown = { version = "0.14.3", default-features = false, features = ["ahash", "allocator-api2", "inline-more"] }
Expand All @@ -15,7 +15,7 @@ itertools = { version = "0.10.5", default-features = false, features = ["use_all
k256 = { version = "0.13.1", default-features = false, features = ["arithmetic", "ecdsa", "pkcs8", ] }
log = { version = "0.4.17", default-features = false }
once_cell = { version = "1.18.0", default-features = false, features = ["alloc", "race", "std"] }
revm-primitives = { git = "https://github.com/NomicFoundation/revm", rev = "aceb093", version = "3.1", default-features = false, features = ["c-kzg", "hashbrown"] }
revm-primitives = { version = "5.0", default-features = false, features = ["c-kzg", "hashbrown"] }
serde = { version = "1.0.147", default-features = false, features = ["derive"], optional = true }
sha2 = { version = "0.10.8", default-features = false }
sha3 = { version = "0.10.8", default-features = false }
Expand Down
3 changes: 0 additions & 3 deletions crates/edr_eth/src/transaction/signed/eip155.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::sync::OnceLock;

use alloy_rlp::RlpEncodable;
use hashbrown::HashMap;
use revm_primitives::{keccak256, TxEnv};

use super::kind_to_transact_to;
Expand Down Expand Up @@ -79,8 +78,6 @@ impl From<Eip155> for TxEnv {
gas_priority_fee: None,
blob_hashes: Vec::new(),
max_fee_per_blob_gas: None,
eof_initcodes: Vec::new(),
eof_initcodes_hashed: HashMap::new(),
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions crates/edr_eth/src/transaction/signed/eip1559.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::sync::OnceLock;

use alloy_rlp::{RlpDecodable, RlpEncodable};
use hashbrown::HashMap;
use revm_primitives::{keccak256, TxEnv};

use super::kind_to_transact_to;
Expand Down Expand Up @@ -69,8 +68,6 @@ impl From<Eip1559> for TxEnv {
gas_priority_fee: Some(value.max_priority_fee_per_gas),
blob_hashes: Vec::new(),
max_fee_per_blob_gas: None,
eof_initcodes: Vec::new(),
eof_initcodes_hashed: HashMap::new(),
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions crates/edr_eth/src/transaction/signed/eip2930.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::sync::OnceLock;

use alloy_rlp::{RlpDecodable, RlpEncodable};
use hashbrown::HashMap;
use revm_primitives::{keccak256, TxEnv};

use super::kind_to_transact_to;
Expand Down Expand Up @@ -68,8 +67,6 @@ impl From<Eip2930> for TxEnv {
gas_priority_fee: None,
blob_hashes: Vec::new(),
max_fee_per_blob_gas: None,
eof_initcodes: Vec::new(),
eof_initcodes_hashed: HashMap::new(),
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions crates/edr_eth/src/transaction/signed/eip4844.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::sync::OnceLock;

use alloy_rlp::{RlpDecodable, RlpEncodable};
use hashbrown::HashMap;
use revm_primitives::{keccak256, TransactTo, TxEnv, GAS_PER_BLOB};

use crate::{
Expand Down Expand Up @@ -79,8 +78,6 @@ impl From<Eip4844> for TxEnv {
gas_priority_fee: Some(value.max_priority_fee_per_gas),
blob_hashes: value.blob_hashes,
max_fee_per_blob_gas: Some(value.max_fee_per_blob_gas),
eof_initcodes: Vec::new(),
eof_initcodes_hashed: HashMap::new(),
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions crates/edr_eth/src/transaction/signed/legacy.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::sync::OnceLock;

use alloy_rlp::{RlpDecodable, RlpEncodable};
use hashbrown::HashMap;
use revm_primitives::{keccak256, TxEnv};

use super::kind_to_transact_to;
Expand Down Expand Up @@ -58,8 +57,6 @@ impl From<Legacy> for TxEnv {
gas_priority_fee: None,
blob_hashes: Vec::new(),
max_fee_per_blob_gas: None,
eof_initcodes: Vec::new(),
eof_initcodes_hashed: HashMap::new(),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/edr_evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ parking_lot = { version = "0.12.1", default-features = false }
edr_defaults = { version = "0.3.5", path = "../edr_defaults" }
edr_eth = { version = "0.3.5", path = "../edr_eth", features = ["rand", "serde"] }
edr_rpc_eth = { version = "0.3.5", path = "../edr_rpc_eth" }
revm = { git = "https://github.com/NomicFoundation/revm", rev = "aceb093", version = "8.0", default-features = false, features = ["c-kzg", "dev", "serde"] }
revm = { version = "10.0", default-features = false, features = ["c-kzg", "dev", "serde"] }
rpds = { version = "1.1.0", default-features = false, features = ["std"] }
serde = { version = "1.0.158", default-features = false, features = ["std"] }
serde_json = { version = "1.0.94", default-features = false, features = ["std"] }
Expand Down
4 changes: 4 additions & 0 deletions crates/edr_evm/src/block/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ pub enum BlockTransactionError<BE, SE> {
/// Corrupt transaction data
#[error("Invalid transaction: {0:?}")]
InvalidTransaction(InvalidTransaction),
/// Precompile errors
#[error("{0}")]
Precompile(String),
/// State errors
#[error(transparent)]
State(SE),
Expand Down Expand Up @@ -99,6 +102,7 @@ where
error @ (InvalidHeader::ExcessBlobGasNotSet | InvalidHeader::PrevrandaoNotSet),
) => Self::Custom(error.to_string()),
EVMError::Custom(error) => Self::Custom(error),
EVMError::Precompile(error) => Self::Precompile(error),
}
}
}
Expand Down
Loading

0 comments on commit e650c9e

Please sign in to comment.