chore: bump revm (#4884)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: rakita <rakita@users.noreply.github.com>
This commit is contained in:
Dan Cline
2023-10-03 09:45:53 -04:00
committed by GitHub
parent 2cddd0f63e
commit b1a7a871cd
8 changed files with 23 additions and 21 deletions

20
Cargo.lock generated
View File

@ -6431,8 +6431,9 @@ dependencies = [
[[package]] [[package]]
name = "revm" name = "revm"
version = "3.3.0" version = "3.5.0"
source = "git+https://github.com/Evalir/revm/?branch=reintroduce-alloy-rebased#988e0d7920ab20c3d0a12dd5582654a58e7f9f2c" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68f4ca8ae0345104523b4af1a8a7ea97cfa1865cdb7a7c25d23c1a18d9b48598"
dependencies = [ dependencies = [
"auto_impl", "auto_impl",
"revm-interpreter", "revm-interpreter",
@ -6441,16 +6442,18 @@ dependencies = [
[[package]] [[package]]
name = "revm-interpreter" name = "revm-interpreter"
version = "1.1.2" version = "1.3.0"
source = "git+https://github.com/Evalir/revm/?branch=reintroduce-alloy-rebased#988e0d7920ab20c3d0a12dd5582654a58e7f9f2c" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f959cafdf64a7f89b014fa73dc2325001cf654b3d9400260b212d19a2ebe3da0"
dependencies = [ dependencies = [
"revm-primitives", "revm-primitives",
] ]
[[package]] [[package]]
name = "revm-precompile" name = "revm-precompile"
version = "2.0.3" version = "2.2.0"
source = "git+https://github.com/Evalir/revm/?branch=reintroduce-alloy-rebased#988e0d7920ab20c3d0a12dd5582654a58e7f9f2c" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d360a88223d85709d2e95d4609eb1e19c649c47e28954bfabae5e92bb37e83e"
dependencies = [ dependencies = [
"c-kzg", "c-kzg",
"k256", "k256",
@ -6465,8 +6468,9 @@ dependencies = [
[[package]] [[package]]
name = "revm-primitives" name = "revm-primitives"
version = "1.1.2" version = "1.3.0"
source = "git+https://github.com/Evalir/revm/?branch=reintroduce-alloy-rebased#988e0d7920ab20c3d0a12dd5582654a58e7f9f2c" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51187b852d9e458816a2e19c81f1dd6c924077e1a8fccd16e4f044f865f299d7"
dependencies = [ dependencies = [
"alloy-primitives", "alloy-primitives",
"alloy-rlp", "alloy-rlp",

View File

@ -107,9 +107,8 @@ reth-eth-wire = { path = "./crates/net/eth-wire" }
reth-ecies = { path = "./crates/net/ecies" } reth-ecies = { path = "./crates/net/ecies" }
# revm # revm
# TODO: Switch back to bluealloy/revm once #724 lands revm = "3.5.0"
revm = { git = "https://github.com/Evalir/revm/", branch = "reintroduce-alloy-rebased" } revm-primitives = "1.3.0"
revm-primitives = { git = "https://github.com/Evalir/revm/", branch = "reintroduce-alloy-rebased" }
## eth ## eth
alloy-primitives = "0.4" alloy-primitives = "0.4"

View File

@ -184,7 +184,7 @@ impl PayloadBuilderAttributes {
// if the parent block did not have excess blob gas (i.e. it was pre-cancun), but it is // if the parent block did not have excess blob gas (i.e. it was pre-cancun), but it is
// cancun now, we need to set the excess blob gas to the default value // cancun now, we need to set the excess blob gas to the default value
let blob_excess_gas_and_price = parent let blob_excess_gas_and_price = parent
.next_block_blob_fee() .next_block_excess_blob_gas()
.map_or_else( .map_or_else(
|| { || {
if cfg.spec_id == SpecId::CANCUN { if cfg.spec_id == SpecId::CANCUN {

View File

@ -29,7 +29,7 @@ pub const TARGET_BLOBS_PER_BLOCK: u64 = TARGET_DATA_GAS_PER_BLOCK / DATA_GAS_PER
pub const BLOB_GASPRICE_UPDATE_FRACTION: u64 = 3_338_477u64; // 3338477 pub const BLOB_GASPRICE_UPDATE_FRACTION: u64 = 3_338_477u64; // 3338477
/// Minimum gas price for a data blob /// Minimum gas price for a data blob
pub const BLOB_TX_MIN_BLOB_GASPRICE: u64 = 1u64; pub const BLOB_TX_MIN_BLOB_GASPRICE: u128 = 1u128;
/// Commitment version of a KZG commitment /// Commitment version of a KZG commitment
pub const VERSIONED_HASH_VERSION_KZG: u8 = 0x01; pub const VERSIONED_HASH_VERSION_KZG: u8 = 0x01;

View File

@ -185,7 +185,7 @@ impl Header {
/// Returns the blob fee for _this_ block according to the EIP-4844 spec. /// Returns the blob fee for _this_ block according to the EIP-4844 spec.
/// ///
/// Returns `None` if `excess_blob_gas` is None /// Returns `None` if `excess_blob_gas` is None
pub fn blob_fee(&self) -> Option<u64> { pub fn blob_fee(&self) -> Option<u128> {
self.excess_blob_gas.map(calc_blob_gasprice) self.excess_blob_gas.map(calc_blob_gasprice)
} }
@ -194,7 +194,7 @@ impl Header {
/// Returns `None` if `excess_blob_gas` is None. /// Returns `None` if `excess_blob_gas` is None.
/// ///
/// See also [Self::next_block_excess_blob_gas] /// See also [Self::next_block_excess_blob_gas]
pub fn next_block_blob_fee(&self) -> Option<u64> { pub fn next_block_blob_fee(&self) -> Option<u128> {
self.next_block_excess_blob_gas().map(calc_blob_gasprice) self.next_block_excess_blob_gas().map(calc_blob_gasprice)
} }

View File

@ -815,7 +815,7 @@ pub(crate) struct AllTransactions<T: PoolTransaction> {
/// Expected base fee for the pending block. /// Expected base fee for the pending block.
pending_basefee: u64, pending_basefee: u64,
/// Expected blob fee for the pending block. /// Expected blob fee for the pending block.
pending_blob_fee: u64, pending_blob_fee: u128,
/// Configured price bump settings for replacements /// Configured price bump settings for replacements
price_bumps: PriceBumpConfig, price_bumps: PriceBumpConfig,
} }
@ -1366,7 +1366,7 @@ impl<T: PoolTransaction> AllTransactions<T> {
transaction = transaction =
self.ensure_valid_blob_transaction(transaction, on_chain_balance, ancestor)?; self.ensure_valid_blob_transaction(transaction, on_chain_balance, ancestor)?;
let blob_fee_cap = transaction.transaction.max_fee_per_blob_gas().unwrap_or_default(); let blob_fee_cap = transaction.transaction.max_fee_per_blob_gas().unwrap_or_default();
if blob_fee_cap >= self.pending_blob_fee as u128 { if blob_fee_cap >= self.pending_blob_fee {
state.insert(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK); state.insert(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK);
} }
} else { } else {

View File

@ -520,7 +520,7 @@ pub struct CanonicalStateUpdate<'a> {
/// EIP-4844 blob fee of the _next_ (pending) block /// EIP-4844 blob fee of the _next_ (pending) block
/// ///
/// Only after Cancun /// Only after Cancun
pub pending_block_blob_fee: Option<u64>, pub pending_block_blob_fee: Option<u128>,
/// A set of changed accounts across a range of blocks. /// A set of changed accounts across a range of blocks.
pub changed_accounts: Vec<ChangedAccount>, pub changed_accounts: Vec<ChangedAccount>,
/// All mined transactions in the block range. /// All mined transactions in the block range.
@ -1040,7 +1040,7 @@ pub struct BlockInfo {
/// ///
/// Note: this is the derived blob fee of the _next_ block that builds on the block the pool is /// Note: this is the derived blob fee of the _next_ block that builds on the block the pool is
/// currently tracking /// currently tracking
pub pending_blob_fee: Option<u64>, pub pending_blob_fee: Option<u128>,
} }
/// The limit to enforce for [TransactionPool::get_pooled_transaction_elements]. /// The limit to enforce for [TransactionPool::get_pooled_transaction_elements].

View File

@ -96,8 +96,7 @@ unknown-registry = "warn"
unknown-git = "deny" unknown-git = "deny"
allow-git = [ allow-git = [
# TODO: remove, see ./Cargo.toml # TODO: remove, see ./Cargo.toml
"https://github.com/Evalir/revm", "https://github.com/bluealloy/revm",
# "https://github.com/bluealloy/revm",
"https://github.com/ethereum/c-kzg-4844", "https://github.com/ethereum/c-kzg-4844",
"https://github.com/sigp/discv5", "https://github.com/sigp/discv5",