3

I need some clarification about the meaning of the addr_from and addr_recv fields in the Version Message.

addr_recv: The network address of the node receiving this message does this mean the public IP of the node I am sending to ?

addr_from:The network address of the node emitting this message does this mean my public(external) IP address or my local IP address ?

Thanks ..

1 Answers1

3

So assuming node A sends a version message to node B then the two fields have the following meaning and value:

  • addr_recv: node A says "I believe you are reachable via this IP", hence its value is B's public IP address, the IP this message was originally sent to.
  • addr_from: node A says "I believe my external IP is this", hence this is what A believes its external IP to be (but may be different if A is behind a NAT and has not learned its true external address yet).
Sergei Tikhomirov
  • 1,430
  • 7
  • 17
cdecker
  • 9,319
  • 1
  • 38
  • 61
  • What happens if the information in these fields is incorrect or missing? – Sergei Tikhomirov Mar 26 '18 at 15:42
  • 2
    Bitcoin Core actually ignores `addr_from` in received version messages. `addr_recv` is used to influence the heuristic that determines which of the receiving node's IP addresses is publicly reachable. – Pieter Wuille Mar 26 '18 at 17:15