Conversation
WalkthroughAdd EIP-7939 CLZ (count leading zeros) support for the Osaka hard fork: new opcode, execution implementation and tests, gas metering conditional on runtime flag, runtime Config flag and Osaka preset, precompile set and test dependency adjustments, and workspace version bump. Changes
Sequence DiagramsequenceDiagram
participant Runtime as Runtime Config
participant Engine as EVM Engine
participant Dispatch as Opcode Dispatch
participant Gas as Gas Metering
participant Exec as Bitwise Executor
Runtime->>Runtime: Initialize (has_clz = true for Osaka)
Engine->>Dispatch: Encounter opcode 0x1e (CLZ)
Dispatch->>Gas: Query dynamic opcode cost for CLZ
Gas->>Runtime: Check config.has_clz
alt has_clz enabled
Gas->>Dispatch: Return GasCost::Low
Dispatch->>Exec: Call clz(op1)
Exec->>Exec: Compute leading_zeros(U256)
Exec->>Engine: Push result to stack
else has_clz disabled
Gas->>Dispatch: Return GasCost::Invalid
Dispatch->>Engine: Reject/invalid opcode
end
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (7)📓 Common learnings📚 Learning: 2025-12-19T00:45:15.604ZApplied to files:
📚 Learning: 2025-12-19T01:14:58.120ZApplied to files:
📚 Learning: 2025-12-19T00:47:31.731ZApplied to files:
📚 Learning: 2025-12-19T01:09:14.674ZApplied to files:
📚 Learning: 2025-12-19T00:45:08.192ZApplied to files:
📚 Learning: 2025-12-19T00:59:18.510ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (3)
✏️ Tip: You can disable this entire section by setting Comment |
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.