Conversation
🤖 Kimi Code ReviewThis is a substantial and well-architected refactoring that introduces a clean abstraction layer ( Critical Issues:
Security/Consensus Considerations:
Performance Issues:
Code Quality:
Documentation:
Positive Notes:
Recommendation: Address the error swallowing in Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
Lines of code reportTotal lines added: Detailed view |
🤖 Claude Code ReviewNow I have enough information to write a thorough review. Let me compile it. PR Review:
|
🤖 Codex Code Review
I couldn’t run the Rust tests in this environment because Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
1c2396c to
2c412a4
Compare
6761248 to
e870154
Compare
0ce1702 to
e6061f8
Compare
Benchmark Results ComparisonNo significant difference was registered for any benchmark run. Detailed ResultsBenchmark Results: BubbleSort
Benchmark Results: ERC20Approval
Benchmark Results: ERC20Mint
Benchmark Results: ERC20Transfer
Benchmark Results: Factorial
Benchmark Results: FactorialRecursive
Benchmark Results: Fibonacci
Benchmark Results: FibonacciRecursive
Benchmark Results: ManyHashes
Benchmark Results: MstoreBench
Benchmark Results: Push
Benchmark Results: SstoreBench_no_opt
|
…6486) ## Summary - The Hive consume-engine Amsterdam tests for EIP-7778 and EIP-8037 were failing because ethrex's per-tx gas limit checks were incompatible with Amsterdam's new gas accounting rules. - **EIP-7778** uses pre-refund gas for block accounting, so cumulative pre-refund gas can exceed the block gas limit even when a block builder correctly included all transactions. - **EIP-8037** introduces 2D gas accounting (`block_gas = max(regular, state)`), meaning cumulative total gas (regular + state) can legally exceed the block gas limit. - The fix skips the per-tx cumulative gas check for Amsterdam and adds a **post-execution** block-level overflow check using `max(sum_regular, sum_state)` in all three execution paths (sequential, pipeline, parallel). ## Local test results - **200/201** EIP-7778 + EIP-8037 Hive consume-engine tests pass - **105/105** EIP-7778 + EIP-8037 EF blockchain tests pass (4 + 101) - The single remaining Hive failure (`test_block_regular_gas_limit[exceed=True]`) expects `TransactionException.GAS_ALLOWANCE_EXCEEDED` but we return `BlockException.GAS_USED_OVERFLOW` — the block is correctly rejected, just with a different error classification. ## Test plan - [x] All EIP-7778 EF blockchain tests pass locally - [x] All EIP-8037 EF blockchain tests pass locally - [x] 200/201 Hive consume-engine Amsterdam tests pass locally - [ ] Full CI Amsterdam Hive suite passes --------- Co-authored-by: Claude Sonnet 4.5 <[email protected]>
5657628 to
7acb4ac
Compare
Trie-agnostic abstraction layer so ethrex can support both MPT and a future binary trie (EIP-7864) without backend-specific types leaking across crate boundaries. Enum dispatch, not dyn. Adding a new backend: implement traits, add enum arms, add wiring module, zero changes to shared code. MptBackend::update_accounts with account=None drops storage_tries and storage_root_cache entries, preventing flush_storage_roots and commit from resurrecting removed accounts with a default AccountState on SELFDESTRUCT. flush_storage_roots and commit debug_assert the invariant.
Summary
Introduces a trie-agnostic abstraction layer so ethrex can support both MPT and a future binary trie (EIP-7864) without backend-specific types leaking across crate boundaries.
Spec and plan
What changed
New crates/modules:
Key architectural changes:
Adding a new backend requires:
Checklist
TODOs (follow-up PRs)