go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

eth/fetcher: add metadata validation in tx announcement

Open healthykim opened this issue 2 days ago • 0 comments

This PR fixes the bug reported in #33365.

The impact of the bug is not catastrophic. After a transaction is ultimately fetched, validation and propagation will be performed based on the fetched body, and any response with a mismatched type is treated as a protocol violation. An attacker could only waste the limited portion of victim’s bandwidth at most.

However, the reasons for submitting this PR are as follows

  1. Fetching a transaction announced with an arbitrary type is a weird behavior.
  2. It aligns with efforts such as EIP-8077 and #33119 to make the fetcher smarter and reduce bandwidth waste.

Regarding the FilterType function, it could potentially be implemented by modifying the Filter function's parameteer itself, but I wasn’t sure whether changing that function is acceptable, so I left it as is.

healthykim avatar Dec 09 '25 07:12 healthykim