diff --git a/src/Nethermind/Nethermind.Network.Discovery/NettyDiscoveryBaseHandler.cs b/src/Nethermind/Nethermind.Network.Discovery/NettyDiscoveryBaseHandler.cs index cef1f12b6f5..41b7f0de984 100644 --- a/src/Nethermind/Nethermind.Network.Discovery/NettyDiscoveryBaseHandler.cs +++ b/src/Nethermind/Nethermind.Network.Discovery/NettyDiscoveryBaseHandler.cs @@ -30,9 +30,11 @@ public override void ChannelRead(IChannelHandlerContext ctx, object msg) protected bool ValidatePacket(DatagramPacket packet) { + // Potential cases where this can happen: + // - Neighbors response containing 16+ nodes in a single packet if (packet.Content.ReadableBytes is 0 or > MaxPacketSize) { - if (_logger.IsWarn) _logger.Warn($"Skipping discovery packet of invalid size: {packet.Content.ReadableBytes}"); + if (_logger.IsDebug) _logger.Debug($"Skipping discovery packet of invalid size: {packet.Content.ReadableBytes}"); return false; } diff --git a/src/Nethermind/Nethermind.Network.Discovery/NettyDiscoveryHandler.cs b/src/Nethermind/Nethermind.Network.Discovery/NettyDiscoveryHandler.cs index 0df65c97928..0e41e8ccf0f 100644 --- a/src/Nethermind/Nethermind.Network.Discovery/NettyDiscoveryHandler.cs +++ b/src/Nethermind/Nethermind.Network.Discovery/NettyDiscoveryHandler.cs @@ -83,7 +83,7 @@ public async Task SendMsg(DiscoveryMsg discoveryMsg) int size = msgBuffer.ReadableBytes; if (size > MaxPacketSize) { - if (_logger.IsWarn) _logger.Warn($"Attempting to send message larger than 1280 bytes. This is out of spec and may not work for all client. Msg: ${discoveryMsg}"); + if (_logger.IsWarn) _logger.Warn($"Attempting to send message larger than 1280 bytes. This is out of spec and may not work for all clients. Msg: ${discoveryMsg}"); } if (discoveryMsg is PingMsg pingMessage)