Skip to content

feat: explicitly reject blob txs in txpool - #1276

Merged
Thegaram merged 1 commit into
developfrom
feat-explicitly-reject-blob-txs-in-txpool
Mar 5, 2026
Merged

feat: explicitly reject blob txs in txpool#1276
Thegaram merged 1 commit into
developfrom
feat-explicitly-reject-blob-txs-in-txpool

Conversation

@Thegaram

@Thegaram Thegaram commented Mar 5, 2026

Copy link
Copy Markdown

1. Purpose or design rationale of this PR

Scroll does not allow blob transactions. Currently the node txpool rejects these via the IsValidBlockSizeForMining check. 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:

  • feat: A new feature

3. Deployment tag versioning

Has the version in params/version.go been updated?

  • This PR doesn't involve a new deployment, git tag, docker image tag, and it doesn't affect traces
  • Yes

4. Breaking change label

Does this PR have the breaking-change label?

  • This PR is not a breaking change
  • Yes

Summary by CodeRabbit

  • Bug Fixes

    • Blob transactions are now explicitly rejected during validation, returning an error indicating the transaction type is not supported.
  • Chores

    • Version patch number incremented.

@Thegaram
Thegaram requested a review from yiweichi March 5, 2026 10:38
@coderabbitai

coderabbitai Bot commented Mar 5, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Two straightforward updates: adds explicit rejection for blob transactions in the transaction validation path and increments the patch version constant.

Changes

Cohort / File(s) Summary
Transaction Validation
core/tx_pool.go
Adds early rejection for blob transactions in validateTx by checking tx.Type() == BlobTxType and returning ErrTxTypeNotSupported.
Version Bump
params/version.go
Increments VersionPatch constant from 3 to 4.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

bump-version

Suggested reviewers

  • yiweichi
  • colinlyguo
  • georgehao

Poem

🐰 A blob comes a-hopping, but no—we say nay!
Version bumps up in the simplest of ways,
Four little changes, so tidy and clean,
The tidiest patch that we've ever seen! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: explicitly reject blob txs in txpool' clearly and specifically describes the main change—adding explicit rejection of blob transactions in the transaction pool validation logic.
Description check ✅ Passed The description includes the required sections: purpose/design rationale, PR title with conventional commits format, version update confirmation, and breaking change assessment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-explicitly-reject-blob-txs-in-txpool

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

┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

�[1m Loading rules from local config...�[0m

params/version.go

┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

�[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).
Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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 ErrTxTypeNotSupported for types.BlobTxType so 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3d0604b and dcf06c3.

📒 Files selected for processing (2)
  • core/tx_pool.go
  • params/version.go

@Thegaram
Thegaram merged commit 7363921 into develop Mar 5, 2026
14 checks passed
@Thegaram
Thegaram deleted the feat-explicitly-reject-blob-txs-in-txpool branch March 5, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants