Skip to content

Reject inclusion lists containing an empty transaction - #11192

Merged
mehdi-aouadi merged 2 commits into
Consensys:focil-devnet-0from
barnabasbusa:fix/heze-il-serialized-size
Aug 31, 2026
Merged

Reject inclusion lists containing an empty transaction#11192
mehdi-aouadi merged 2 commits into
Consensys:focil-devnet-0from
barnabasbusa:fix/heze-il-serialized-size

Conversation

@barnabasbusa

@barnabasbusa barnabasbusa commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

PR Description

Follow-up for ethereum/consensus-specs#5576 (issue ethereum/consensus-specs#5575). The spec keeps the raw transaction byte bound (MAX_TRANSACTIONS_BYTES_PER_INCLUSION_LIST) and derives the inclusion_list gossip message bound from it as the size of a list of one-byte transactions (MAX_SIGNED_INCLUSION_LIST_SIZE = 41112); that derivation is only finite if every transaction is non-empty, so the gossip rules gain [REJECT] every transaction in message.transactions is non-empty.

This adds that check to SignedInclusionListValidator (with a test). Teku has no topic-specific gossip size constant for inclusion lists, so nothing else changes. Lodestar counterpart: ChainSafe/lodestar#9936.

Fixed Issue(s)

ethereum/consensus-specs#5575

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

https://claude.ai/code/session_01YHCg1Q6QaZn8rPjB7za3UB


Note

Low Risk
Localized Heze inclusion-list validation with no auth or persistence changes; behavior is additive rejection of invalid gossip.

Overview
Implements the new consensus-specs gossip rule that every transaction in a Heze inclusion list must be non-empty, matching ethereum/consensus-specs#5576 (needed so derived MAX_SIGNED_INCLUSION_LIST_SIZE stays well-defined).

Gossip validation: SignedInclusionListValidator now **[REJECT]**s any SignedInclusionList whose transactions contain a zero-byte entry.

Fork-choice import: ForkChoice.onInclusionList applies the same rule before timeliness/store handling, returning InclusionListImportResult with EMPTY_TRANSACTION via a new failedEmptyTransaction() factory on InclusionListImportResult.

Unit tests cover both the validator reject path and fork-choice import (list is not stored).

Reviewed by Cursor Bugbot for commit b496ce0. Bugbot is set up for automated code reviews on this repo. Configure here.

@barnabasbusa
barnabasbusa force-pushed the fix/heze-il-serialized-size branch 2 times, most recently from 41a4903 to f05d934 Compare August 28, 2026 13:34
@barnabasbusa barnabasbusa changed the title Bound inclusion list transactions by their SSZ-serialized size Reject inclusion lists containing an empty transaction Aug 28, 2026
consensus-specs#5576 keeps the raw transaction byte bound for inclusion
lists and derives the gossip message bound from it as the size of a list of
one-byte transactions; that derivation requires every transaction to be
non-empty, so gossip validation rejects empty ones.

Claude-Session: https://claude.ai/code/session_01YHCg1Q6QaZn8rPjB7za3UB
@barnabasbusa
barnabasbusa force-pushed the fix/heze-il-serialized-size branch from f05d934 to 9f6c3e0 Compare August 28, 2026 14:11

@mehdi-aouadi mehdi-aouadi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you please add this check too: https://github.com/ethereum/consensus-specs/pull/5576/changes#diff-2bd43b6a1876bf339bd0464c2ee6557f41c72eca7e57b8383aeeab962cd8b9ecR276
It must be performed in ForkChoice::onInclusionList

@mehdi-aouadi mehdi-aouadi mentioned this pull request Aug 28, 2026
2 tasks
@mehdi-aouadi mehdi-aouadi self-assigned this Aug 31, 2026
@mehdi-aouadi
mehdi-aouadi merged commit 2090f4b into Consensys:focil-devnet-0 Aug 31, 2026
73 of 75 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants