go-ethereum/eth/fetcher
Bosul Mun 56d201b0fe
eth/fetcher: add metadata validation in tx announcement (#33378)
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 parameter itself, but I wasn’t sure
whether changing that function is acceptable, so I left it as is.
2025-12-11 12:11:52 +08:00
..
metrics.go eth/fetcher: add metrics for tracking slow peers (#32964) 2025-10-20 10:10:58 +08:00
tx_fetcher.go eth/fetcher: add metadata validation in tx announcement (#33378) 2025-12-11 12:11:52 +08:00
tx_fetcher_test.go eth/fetcher: add metadata validation in tx announcement (#33378) 2025-12-11 12:11:52 +08:00