fix(l1): align SIGPARAM copy operands with CALLDATACOPY - #7089
Conversation
|
🤖 Kimi Code ReviewThe PR correctly fixes the operand order for EIP-8141's Review:
No issues found. The fix is minimal, well-tested, and maintains consistency with existing EVM opcode patterns. Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
🤖 Claude Code ReviewNo other stale operand-order references found — those are just opcode table/gas constant/comment mentions, unrelated to operand order. The fix is fully self-contained and consistent. Review: fix(l1): align SIGPARAM copy operands with CALLDATACOPYThis is a clean, well-scoped consensus bug fix. Findings: Correctness
Test coverage
Documentation
Scope
Minor note (not blocking)
Overall: correct, well-tested, appropriately scoped fix for a real consensus-affecting bug. No changes requested. Automated review by Claude (Anthropic) · sonnet · custom prompt |
🤖 Codex Code ReviewNo findings. The fix in frame_tx.rs now matches the existing Testing gap: I couldn’t run the Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
Greptile SummaryThis PR aligns EIP-8141
Confidence Score: 5/5The PR appears safe to merge; the implementation, documentation, and regression coverage consistently apply the corrected SIGPARAM operand order. The stack implementation consumes values top-first, the revised handler therefore binds the operands as intended, and the new test uses distinct values that expose swapped memory offset, data offset, or length interpretations.
|
| Filename | Overview |
|---|---|
| crates/vm/levm/src/opcode_handlers/frame_tx.rs | Correctly rebinds SIGPARAM copy operands in top-first stack order and updates the handler documentation. |
| docs/eip-8141.md | Updates the documented copy-form operand order to match the corrected implementation. |
| test/tests/levm/eip8141_tests.rs | Updates bytecode construction for the corrected order and adds a regression test using distinct offsets and length. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Push["Push length, dataOffset, memOffset, param, signatureIndex"] --> Stack["Stack top: signatureIndex, param, memOffset, dataOffset, length"]
Stack --> PopMeta["Pop signatureIndex and param"]
PopMeta --> PopCopy["Pop memOffset, dataOffset, length"]
PopCopy --> Copy["Copy signature[dataOffset..] to memory[memOffset..]"]
Reviews (1): Last reviewed commit: "fix(l1): align SIGPARAM copy operands wi..." | Re-trigger Greptile
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
|
ElFantasma
left a comment
There was a problem hiding this comment.
Two doc nits, both non-blocking.
EIP-8141 changed the
SIGPARAMcopy form's operand order so it matchesCALLDATACOPY: the three operands belowsignatureIndexandparamare nowmemOffset,dataOffset,length(ethereum/EIPs@4a9ad32c, "align SIGPARAM copy operand order with CALLDATACOPY"). We still popped them in the oldlength,dataOffset,memOffsetorder, so an ARBITRARY-signature verifier copying its own bytes read the wrong three words — consensus-visible, sinceSIGPARAM 0x04is the only way to reach those bytes from the EVM.OpSigParamHandlerpops[mem_offset, data_offset, length].docs/eip-8141.mdstate the operand order top-first, likeFRAMEDATACOPY.sigparam_copy_codepushes in the new order, and a new test pins it with three distinct operands and a destination past the first word, so a reversed read lands the bytes elsewhere instead of coincidentally passing.The two existing copy tests use
memOffset = 0; they now exercise the new order too.Note for the frame-tx satellite branches:
eip-7906,eip-8250andeip-8272all touchOpSigParamHandlerand will need this one-line rebase.