Skip to content
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

Bump revm to 19.3.0 #901

Closed
wants to merge 3 commits into from
Closed
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
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.3.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
11 changes: 9 additions & 2 deletions crates/executor/src/executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,17 @@ 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)
const TARGET_BLOB_NUMBER_PER_BLOCK: u64 = 3;
const TARGET_BLOB_GAS_PER_BLOCK: u64 =
TARGET_BLOB_NUMBER_PER_BLOCK * revm::primitives::GAS_PER_BLOB;
calc_excess_blob_gas(
parent_excess_blob_gas,
parent_blob_gas_used,
TARGET_BLOB_GAS_PER_BLOCK,
)
} 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
Loading