Skip to content

Commit

Permalink
Bump revm to 19.2.0 and fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
sergerad committed Jan 14, 2025
1 parent e7bfe4d commit 0c128f9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 28 deletions.
33 changes: 11 additions & 22 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ serde_json = { version = "1.0.135", default-features = false }

# Ethereum
unsigned-varint = "0.8.0"
revm = { version = "16.0.0", default-features = false }
revm = { version = "19.2.0", default-features = false }

# K/V database
rocksdb = { version = "0.22.0", default-features = false }
2 changes: 1 addition & 1 deletion crates/executor/src/executor/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ where
let blob_excess_gas_and_price = parent_header
.next_block_excess_blob_gas(BlobParams::cancun())
.or_else(|| spec_id.is_enabled_in(SpecId::ECOTONE).then_some(0))
.map(BlobExcessGasAndPrice::new);
.map(|n| BlobExcessGasAndPrice::new(n, false));
let next_block_base_fee =
parent_header.next_block_base_fee(*base_fee_params).unwrap_or_default();

Expand Down
9 changes: 5 additions & 4 deletions crates/executor/src/executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ where
// The sum of the transaction’s gas limit, Tg, and the gas utilized in this block prior,
// must be no greater than the block’s gasLimit.
let block_available_gas = (gas_limit - cumulative_gas_used) as u128;
if (transaction.gas_limit() as u128) > block_available_gas &&
(is_regolith || !transaction.is_system_transaction())
if (transaction.gas_limit() as u128) > block_available_gas
&& (is_regolith || !transaction.is_system_transaction())
{
return Err(ExecutorError::BlockGasLimitExceeded);
}
Expand Down Expand Up @@ -296,10 +296,11 @@ where
let excess_blob_gas = if self.config.is_ecotone_active(parent_header.timestamp) {
let parent_excess_blob_gas = parent_header.excess_blob_gas.unwrap_or_default();
let parent_blob_gas_used = parent_header.blob_gas_used.unwrap_or_default();
calc_excess_blob_gas(parent_excess_blob_gas, parent_blob_gas_used)
// TODO: Calculate actual target
calc_excess_blob_gas(parent_excess_blob_gas, parent_blob_gas_used, 0)
} else {
// For the first post-fork block, both blob gas fields are evaluated to 0.
calc_excess_blob_gas(0, 0)
calc_excess_blob_gas(0, 0, 0)
};

(Some(0), Some(excess_blob_gas as u128))
Expand Down

0 comments on commit 0c128f9

Please sign in to comment.