Skip to content

fix(network): read the first byte of a wire transaction without a default - #5457

Merged
tcoratger merged 1 commit into
masterfrom
fix/accessor-maybroadcastwire
Dec 4, 2026
Merged

tcoratger merged 1 commit into
masterfrom
fix/accessor-maybroadcastwire

Conversation

@tcoratger

Copy link
Copy Markdown
Collaborator

Master CI fails in check-accessors since #5454: the wire check of a Transactions message reads the type byte with Option.getD, a defaulting accessor that new code may not add. This change replaces it with a match on the first byte, so the empty case gets its value explicitly and the meaning stays the same.

The problem

The build job reports new: Option.getD EthLib.Execution.Network.mayBroadcastWire 1.

The baseline of defaulting accessors may only shrink, so extending it is not a fix.

The idea

mayBroadcastWire now matches on the first byte of a typed transaction.

A first byte is a type, and the type decides. An empty byte array has no type byte, so it may go whole, as before.

The proof that the wire form agrees with the transaction drops the two Option rewrite lemmas that it no longer needs.

Checks

  • lake build --wfail EthLib EthLib.Proofs EthLib.Exports: passes.
  • lake env .lake/build/bin/check-accessors: passes, 87 entries (86 in the baseline and 1 in the sources).
  • lake env .lake/build/bin/check-decls: 0 findings, 0 new.
  • check_layers.py, check_comment_code.py, soundness_facts.py --check, check_lean_layout.py (base and --all --rule wrap): pass.
  • The Python bindings do not expose this function, so no Python test runs it.

🤖 Generated with Claude Code

…ault

The wire check of a Transactions message read the type byte with a
defaulting accessor, which check-accessors forbids in new code. A match
on the first byte now gives the empty case its value explicitly, with the
same meaning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tcoratger
tcoratger merged commit e5d4779 into master Dec 4, 2026
7 checks passed
@tcoratger
tcoratger deleted the fix/accessor-maybroadcastwire branch December 4, 2026 11:44
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.

1 participant