feat: explicitly reject blob txs in txpool - #1276
Conversation
📝 WalkthroughWalkthroughTwo straightforward updates: adds explicit rejection for blob transactions in the transaction validation path and increments the patch version constant. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
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)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 OpenGrep (1.16.1)core/tx_pool.go┌──────────────┐ �[32m✔�[39m �[1mOpengrep OSS�[0m �[1m Loading rules from local config...�[0m params/version.go┌──────────────┐ �[32m✔�[39m �[1mOpengrep OSS�[0m �[1m Loading rules from local config...�[0m Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
core/tx_pool.go (1)
776-779: Add a regression test for blob-type rejection.The explicit guard is good. Please add/confirm a txpool test that asserts
ErrTxTypeNotSupportedfortypes.BlobTxTypeso this policy stays protected.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@core/tx_pool.go` around lines 776 - 779, Add a regression unit test that submits a transaction with tx.Type() == types.BlobTxType into the txpool and asserts the pool returns ErrTxTypeNotSupported; specifically, create a test that constructs a minimal BlobTx (or stubs a tx whose Type() returns types.BlobTxType), calls the txpool entry point that triggers the guard (the function exercising the code containing the "Reject blob transactions" check), and verifies the returned error equals ErrTxTypeNotSupported to prevent future regressions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@core/tx_pool.go`:
- Around line 776-779: Add a regression unit test that submits a transaction
with tx.Type() == types.BlobTxType into the txpool and asserts the pool returns
ErrTxTypeNotSupported; specifically, create a test that constructs a minimal
BlobTx (or stubs a tx whose Type() returns types.BlobTxType), calls the txpool
entry point that triggers the guard (the function exercising the code containing
the "Reject blob transactions" check), and verifies the returned error equals
ErrTxTypeNotSupported to prevent future regressions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 260fb2b5-e881-42f0-9157-f91f9e390f2e
📒 Files selected for processing (2)
core/tx_pool.goparams/version.go
1. Purpose or design rationale of this PR
Scroll does not allow blob transactions. Currently the node txpool rejects these via the
IsValidBlockSizeForMiningcheck. This PR makes the check explicit -- no real change in node behavior, but easier to reason about the code.2. PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
3. Deployment tag versioning
Has the version in
params/version.gobeen updated?4. Breaking change label
Does this PR have the
breaking-changelabel?Summary by CodeRabbit
Bug Fixes
Chores