Skip to content

Comments

refactor(handler): remove Default for EthPrecompiles and EthInstructions#3434

Merged
rakita merged 2 commits intomainfrom
rm-default-eth-precompiles-instructions
Feb 23, 2026
Merged

refactor(handler): remove Default for EthPrecompiles and EthInstructions#3434
rakita merged 2 commits intomainfrom
rm-default-eth-precompiles-instructions

Conversation

@rakita
Copy link
Member

@rakita rakita commented Feb 23, 2026

Summary

  • Remove impl Default for EthPrecompiles — require explicit EthPrecompiles::new(spec) construction
  • Remove impl Default for EthInstructions — require explicit EthInstructions::new_mainnet() construction
  • Update all examples to use explicit constructors
  • Simplify cheatcode_inspector example by removing unnecessary InstructionProviderT/PrecompileT generic parameters (they only existed to satisfy Default bounds)

Test plan

  • cargo check --workspace passes
  • cargo clippy --workspace --all-targets --all-features passes clean
  • cargo fmt --all applied

…ructions

These types require explicit initialization with a spec/configuration,
making Default misleading. Replace all usages with explicit constructors
(EthPrecompiles::new, EthInstructions::new_mainnet).
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 23, 2026

Merging this PR will not alter performance

✅ 176 untouched benchmarks


Comparing rm-default-eth-precompiles-instructions (08e532a) with main (39564c9)

Open in CodSpeed

@rakita rakita merged commit 910d545 into main Feb 23, 2026
31 checks passed
@rakita rakita deleted the rm-default-eth-precompiles-instructions branch February 23, 2026 17:34
@github-actions github-actions bot mentioned this pull request Feb 23, 2026
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.

2 participants