Revert "eth/fetcher: only make noise big mismatches (#28356)"

This reverts commit eb783fb381.
This commit is contained in:
devopsbo3 2023-11-10 12:27:53 -06:00 committed by GitHub
parent 096ae42d77
commit ef407a9ff0

View file

@ -593,9 +593,8 @@ func (f *TxFetcher) loop() {
log.Warn("Announced transaction type mismatch", "peer", peer, "tx", hash, "type", delivery.metas[i].kind, "ann", meta.kind) log.Warn("Announced transaction type mismatch", "peer", peer, "tx", hash, "type", delivery.metas[i].kind, "ann", meta.kind)
f.dropPeer(peer) f.dropPeer(peer)
} else if delivery.metas[i].size != meta.size { } else if delivery.metas[i].size != meta.size {
log.Warn("Announced transaction size mismatch", "peer", peer, "tx", hash, "size", delivery.metas[i].size, "ann", meta.size)
if math.Abs(float64(delivery.metas[i].size)-float64(meta.size)) > 8 { if math.Abs(float64(delivery.metas[i].size)-float64(meta.size)) > 8 {
log.Warn("Announced transaction size mismatch", "peer", peer, "tx", hash, "size", delivery.metas[i].size, "ann", meta.size)
// Normally we should drop a peer considering this is a protocol violation. // Normally we should drop a peer considering this is a protocol violation.
// However, due to the RLP vs consensus format messyness, allow a few bytes // However, due to the RLP vs consensus format messyness, allow a few bytes
// wiggle-room where we only warn, but don't drop. // wiggle-room where we only warn, but don't drop.
@ -619,9 +618,8 @@ func (f *TxFetcher) loop() {
log.Warn("Announced transaction type mismatch", "peer", peer, "tx", hash, "type", delivery.metas[i].kind, "ann", meta.kind) log.Warn("Announced transaction type mismatch", "peer", peer, "tx", hash, "type", delivery.metas[i].kind, "ann", meta.kind)
f.dropPeer(peer) f.dropPeer(peer)
} else if delivery.metas[i].size != meta.size { } else if delivery.metas[i].size != meta.size {
log.Warn("Announced transaction size mismatch", "peer", peer, "tx", hash, "size", delivery.metas[i].size, "ann", meta.size)
if math.Abs(float64(delivery.metas[i].size)-float64(meta.size)) > 8 { if math.Abs(float64(delivery.metas[i].size)-float64(meta.size)) > 8 {
log.Warn("Announced transaction size mismatch", "peer", peer, "tx", hash, "size", delivery.metas[i].size, "ann", meta.size)
// Normally we should drop a peer considering this is a protocol violation. // Normally we should drop a peer considering this is a protocol violation.
// However, due to the RLP vs consensus format messyness, allow a few bytes // However, due to the RLP vs consensus format messyness, allow a few bytes
// wiggle-room where we only warn, but don't drop. // wiggle-room where we only warn, but don't drop.