Skip to content

fix(kona): use correct precompile versions for Jovian and post-Jovian specs#20003

Open
sebastianst wants to merge 1 commit intodevelopfrom
seb/fix-precompile-versions
Open

fix(kona): use correct precompile versions for Jovian and post-Jovian specs#20003
sebastianst wants to merge 1 commit intodevelopfrom
seb/fix-precompile-versions

Conversation

@sebastianst
Copy link
Copy Markdown
Member

Summary

  • Non-accelerated precompiles: JOVIAN was incorrectly mapped to isthmus() — now correctly maps to jovian() (which includes input size restrictions on 4 variable-input precompiles)
  • Accelerated precompiles: INTEROP and OSAKA (post-Jovian forks) were mapped to accelerated_isthmus() — now correctly map to accelerated_jovian(), matching the reference impl in op_revm::OpPrecompiles
  • Adds test asserting all specs resolve to their correct precompile set via core::ptr::eq

Fixes ethereum-optimism/optimism-private#470

Test plan

  • test_post_jovian_specs_use_jovian_precompiles — verifies JOVIAN/INTEROP/OSAKA all point to jovian() precompiles and ISTHMUS points to isthmus()
  • All existing kona-client tests pass
  • Formatted with just f, clean compile with no warnings

🤖 Generated with Claude Code

… specs

The FPVM precompile provider had two bugs in spec-to-precompile mapping:

1. Non-accelerated precompiles: JOVIAN was grouped with ISTHMUS, returning
   isthmus() instead of jovian(). The jovian() set includes input size
   restrictions on 4 variable-input precompiles.

2. Accelerated precompiles: INTEROP and OSAKA (post-Jovian forks) were
   grouped with ISTHMUS, returning accelerated_isthmus() instead of
   accelerated_jovian(). This would cause wrong gas costs once those
   forks activate.

Both match blocks now correctly map ISTHMUS to its own precompile set
and JOVIAN/INTEROP/OSAKA to the Jovian set, matching the reference
implementation in op_revm::OpPrecompiles.

Fixes ethereum-optimism/optimism-private#470

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sebastianst sebastianst requested a review from a team as a code owner April 9, 2026 20:11
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.6%. Comparing base (689dbb2) to head (b077695).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #20003      +/-   ##
===========================================
+ Coverage     11.6%    76.6%   +65.0%     
===========================================
  Files          677      505     -172     
  Lines        71141    64101    -7040     
===========================================
+ Hits          8277    49130   +40853     
+ Misses       62720    14971   -47749     
+ Partials       144        0     -144     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests ?
unit 76.6% <100.0%> (+76.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...na/bin/client/src/fpvm_evm/precompiles/provider.rs 93.9% <100.0%> (+93.9%) ⬆️

... and 565 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants