Skip to content
Open
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
5 changes: 0 additions & 5 deletions crates/vm/backends/levm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,12 @@ impl LEVM {
base_fee_per_gas: block_header.base_fee_per_gas.unwrap_or_default().into(),
gas_price,
block_excess_blob_gas: block_header.excess_blob_gas.map(U256::from),
block_blob_gas_used: block_header.blob_gas_used.map(U256::from),
tx_blob_hashes: tx.blob_versioned_hashes(),
tx_max_priority_fee_per_gas: tx.max_priority_fee().map(U256::from),
tx_max_fee_per_gas: tx.max_fee_per_gas().map(U256::from),
tx_max_fee_per_blob_gas: tx.max_fee_per_blob_gas(),
tx_nonce: tx.nonce(),
block_gas_limit: block_header.gas_limit,
difficulty: block_header.difficulty,
is_privileged: matches!(tx, Transaction::PrivilegedL2Transaction(_)),
};

Expand Down Expand Up @@ -476,7 +474,6 @@ pub fn generic_system_contract_levm(
base_fee_per_gas: U256::zero(),
gas_price: U256::zero(),
block_excess_blob_gas: block_header.excess_blob_gas.map(U256::from),
block_blob_gas_used: block_header.blob_gas_used.map(U256::from),
block_gas_limit: i64::MAX as u64, // System calls, have no constraint on the block's gas limit.
config,
..Default::default()
Expand Down Expand Up @@ -699,14 +696,12 @@ fn env_from_generic(
base_fee_per_gas: header.base_fee_per_gas.unwrap_or_default().into(),
gas_price,
block_excess_blob_gas: header.excess_blob_gas.map(U256::from),
block_blob_gas_used: header.blob_gas_used.map(U256::from),
tx_blob_hashes: tx.blob_versioned_hashes.clone(),
tx_max_priority_fee_per_gas: tx.max_priority_fee_per_gas.map(U256::from),
tx_max_fee_per_gas: tx.max_fee_per_gas.map(U256::from),
tx_max_fee_per_blob_gas: tx.max_fee_per_blob_gas,
tx_nonce: tx.nonce.unwrap_or_default(),
block_gas_limit: header.gas_limit,
difficulty: header.difficulty,
is_privileged: false,
})
}
Expand Down
2 changes: 0 additions & 2 deletions crates/vm/levm/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ pub struct Environment {
pub coinbase: Address,
pub timestamp: U256,
pub prev_randao: Option<H256>,
pub difficulty: U256,
pub chain_id: U256,
pub base_fee_per_gas: U256,
pub gas_price: U256, // Effective gas price
pub block_excess_blob_gas: Option<U256>,
pub block_blob_gas_used: Option<U256>,
pub tx_blob_hashes: Vec<H256>,
pub tx_max_priority_fee_per_gas: Option<U256>,
pub tx_max_fee_per_gas: Option<U256>,
Expand Down
2 changes: 0 additions & 2 deletions tooling/ef_tests/state/runner/levm_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,10 @@ pub fn prepare_vm_for_tx<'a>(
coinbase: test.env.current_coinbase,
timestamp: test.env.current_timestamp,
prev_randao: test.env.current_random,
difficulty: test.env.current_difficulty,
chain_id: U256::from(1),
base_fee_per_gas: test.env.current_base_fee.unwrap_or_default(),
gas_price: effective_gas_price(test, &test_tx)?,
block_excess_blob_gas: test.env.current_excess_blob_gas,
block_blob_gas_used: None,
tx_blob_hashes: test_tx.blob_versioned_hashes.clone(),
tx_max_priority_fee_per_gas: test_tx.max_priority_fee_per_gas,
tx_max_fee_per_gas: test_tx.max_fee_per_gas,
Expand Down
2 changes: 0 additions & 2 deletions tooling/ef_tests/state_v2/src/modules/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,10 @@ pub fn get_vm_env_for_test(
coinbase: test_env.current_coinbase,
timestamp: test_env.current_timestamp,
prev_randao: test_env.current_random,
difficulty: test_env.current_difficulty,
chain_id: U256::from(1),
base_fee_per_gas: test_env.current_base_fee.unwrap_or_default(),
gas_price,
block_excess_blob_gas: test_env.current_excess_blob_gas,
block_blob_gas_used: None,
tx_blob_hashes: test_case.blob_versioned_hashes.clone(),
tx_max_priority_fee_per_gas: test_case.max_priority_fee_per_gas,
tx_max_fee_per_gas: test_case.max_fee_per_gas,
Expand Down
Loading