[Pushers L02] Linea Pusher msg.value mismatch#79
Conversation
📝 WalkthroughWalkthroughThis PR refines the LineaPusher contract's fee validation logic by extracting the fee into a local variable and adding explicit msg.value verification against the expected fee, with corresponding test updates to validate both underpayment and overpayment scenarios. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Issue:
The LineaPusher.pushHashes function forwards the full msg.value to the Linea messenger while only decoding _fee from the transaction data. In Linea's L1 message service, the Linea bridge forwards msg.value - _fee to the destination contract. On L2, a postman or user calls claimMessage on the L2MessageService with the same _value and _calldata. Since LineaBuffer.receiveHashes is -payable (per the IBuffer interface), any call where msg.value > _fee creates a message that permanently reverts on claim. This burns the paid fees, leaves the block hashes unapplied, and contradicts documentation stating that msg.value must be "at least" the fee.
This PR validates
msg.value == _feeinLineaPusher.pushHashesand reverting with IncorrectMsgValue on a mismatch.Summary by CodeRabbit
Bug Fixes