fix(txpool): enforce hardfork activation for EIP-7702 and MorphTx#59
fix(txpool): enforce hardfork activation for EIP-7702 and MorphTx#59
Conversation
Add txpool-level rejection for: - EIP-7702 transactions before Viridian hardfork (PRAGUE activation) - MorphTx (0x7F) before Emerald hardfork This aligns with go-ethereum's MakeSigner behavior which only registers these transaction types after their respective hardfork activation.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds early rejection logic in the transaction validator to mark EIP-7702 transactions as unsupported when Viridian is inactive and MorphTx transactions as unsupported when Emerald is inactive, before proceeding with standard validation. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 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)
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 |
anylots
left a comment
There was a problem hiding this comment.
For MorphTx transactions, is_morph_tx() is called twice — at line 261 and line 273. It is recommended to change let is_morph_tx = is_morph_tx(&transaction) at line 273 to reuse the result from the earlier check.
good catch |
Summary
Adds txpool-level validation to reject transaction types that are not yet active based on hardfork timestamps:
This aligns morph-reth's txpool with go-ethereum's
MakeSigner, which only registers these transaction types after their respective hardfork activation.Test plan
cargo check -p morph-txpoolpassesSummary by CodeRabbit