Skip to content

Conversation

@Galoretka
Copy link

Removed unused fields difficulty and block_blob_gas_used from Environment in crates/vm/levm/src/environment.rs , and stopped populating them in:

  • crates/vm/backends/levm/mod.rs::{setup_env, env_from_generic, generic_system_contract_levm}
  • tooling/ef_tests/state/runner/levm_runner.rs::prepare_vm_for_tx
  • tooling/ef_tests/state_v2/src/modules/runner.rs::get_vm_env_for_test

Reason: These fields are never read in opcode handlers or hooks. Post-merge execution uses prev_randao (EIP-4399) instead of difficulty. Blob fee logic relies on block_excess_blob_gas and per-tx fields; blob_gas_used is only relevant at block validation, not EVM runtime. This reduces cognitive load and avoids unnecessary environment initialization without changing execution semantics.

@Galoretka Galoretka requested a review from a team as a code owner November 6, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant