Skip to content

fix(network)!: refuse to send a blob transaction in Transactions - #5454

Merged
tcoratger merged 3 commits into
masterfrom
review/session-no-blob-broadcast
Dec 4, 2026
Merged

tcoratger merged 3 commits into
masterfrom
review/session-no-blob-broadcast

Conversation

@tcoratger

Copy link
Copy Markdown
Collaborator

An eth session refuses to send a Transactions message that holds a blob transaction, as the Networking section of EIP-4844 requires.
This supersedes #5445 by @ilitteri: it carries the two commits of that pull request, plus one review commit, because the branch of #5445 does not accept pushes from maintainers.

The problem

The Networking section of EIP-4844 says: "Nodes MUST NOT automatically broadcast blob transactions to their peers."
Such a transaction is only announced with NewPooledTransactionHashes, and a peer requests it with GetPooledTransactions.
sendEth checked the rules of caps/eth.md for Transactions (0x02), but not this one, so a session could send a blob transaction whole.

The idea

A typed transaction crosses the wire as TransactionType || TransactionPayload (EIP-2976), so its type is the first byte, and the session reads it without a decode.

  • mayBroadcastType (Execution/Network/Transactions.lean) holds the rule once: a type other than 3 may go whole.
  • mayBroadcastWire applies it to the wire form: a legacy list may go, a byte string goes when its first byte passes.
  • mayBroadcastWhole (Execution/Network/Pool.lean) applies it to a decoded transaction.
  • sendEth refuses a Transactions message with any transaction that fails mayBroadcastWire.

Example

After the two Status messages, the node tries three sends; 0x03c0 and 0x02c0 are typed transactions of type 3 and 2 with an empty payload list.

  • [0x03c0]: refused.
  • [legacy, 0x03c0]: refused as a whole, so the legacy transaction does not count as sent.
  • [0x02c0]: sent.

test_blob_transactions_refused runs these sends through execution.network.session.

For reviewers

  • sendEth_blob states the refusal for one send, and run_no_blob along any run.
  • mayBroadcastWire_of_encodeTransaction states that the wire check agrees with mayBroadcastWhole on the bytes of an encoded transaction.
  • Only the type byte is read, so a type-3 byte string with a malformed payload is also refused.
  • A received Transactions message with a blob transaction is still accepted: neither EIP-4844 nor caps/eth.md fixes a reaction, and SOUNDNESS.md lists it as an open point.
  • caps/eth.md itself does not state the EIP-4844 rule in Transaction Exchange.

Checks

  • lake build --wfail (whole library), before the last rebase: passed; after it, the network, session, pool and inclusion-list modules: passed.
  • lake exe check-decls: 0 findings; lake exe proof-coverage --check: passed.
  • check_layers.py, check_lean_layout.py, check_comment_code.py, soundness_facts.py --check: passed; check_writing.py: S1 and D1 suggestions only.
  • pytest bindings/python/tests/eth: 512 passed, 1 skipped; ruff, check_python_comments.py, check_docstrings.py: passed.

BREAKING CHANGE: execution.network.session reports a sent Transactions message that holds a blob transaction as refused, where it reported sent.

🤖 Generated with Claude Code

ilitteri and others added 3 commits December 4, 2026 11:57
EIP-4844 says that nodes must not broadcast blob transactions to their
peers. The eth session checked the rules of Transactions (0x02) in
caps/eth.md, but not this one, so it sent a type-3 transaction in a
Transactions message.

sendEth now refuses a Transactions message that holds a blob
transaction. isBlobWire reads the type byte of a transaction in its wire
form, and sendEth_blob states the refusal.

BREAKING CHANGE: execution.network.session reports a sent Transactions
message that holds a blob transaction as refused, where it reported
sent.
EIP-4844 states its broadcast rule for the sender and fixes no reaction
for the receiver, so the session accepts a Transactions message from
the peer that holds a blob transaction. SOUNDNESS.md and the module
header now list that case with the other open points. The comments of
isBlobWire use the notation of EIP-2976.
The ban of EIP-4844 on broadcasting a blob transaction now lives in one
primitive, `mayBroadcastType`, that both `mayBroadcastWhole` (decoded
transaction) and `mayBroadcastWire` (wire form, replacing `isBlobWire`) use.

`mayBroadcastWire_of_encodeTransaction` states that the two agree, and
`run_no_blob` lifts the refusal to every run of a session.

The docs quote EIP-4844 with "automatically", the session header links
the EIP, and the case summary of Transactions lists the new condition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tcoratger
tcoratger merged commit 569efe6 into master Dec 4, 2026
7 checks passed
@tcoratger
tcoratger deleted the review/session-no-blob-broadcast branch December 4, 2026 10:58
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