Description
System information
Geth version: 1.13.14
CL client & version: prysm@5.0.1
OS & Version: Ubuntu 23.04
Other: Using UFW, confirmed TCP ports (30303) are open via canyouseeme.
Expected behaviour
Discovery and listener port should be as I configured them via options, or the default (30303).
Actual behaviour
Discovery port starts out as default or configured value via options, but then changes. I see a "New local node record" shortly after a previous "New local node record" which shows the tcp/udp how I configured, and then the udp becomes an erroneous port.
Steps to reproduce the behaviour
Start geth with no options or --port
and --discovery.port
. In geth attach, run admin.nodeInfo
in the next few hours. The discovery port will eventually change and be different. The time to change ranged from nearly instantly after startup, to a few hours after configuration.
Backtrace
I've compiled a trace on stack exchange here when I thought this was a config issue. I now think it's a geth bug and am raising it here.
I also ran lsof
and see that geth is actually listening on 30303. However, my admin.nodeInfo
shows below.
mynode@mynode:~$ sudo lsof -i UDP:30303
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
geth 5494 mynode *588u IPv6 95419 0t0 UDP *:30303
ports: {
discovery: 1038,
listener: 30303
},
My enode also shows discport=1038
How does this local nodeInfo
get set? It now appears that this issue is geth relaying the wrong information to peers in its enr/enode.