What is the purpose of addr_from and addr_recv in version message? I understand from this answer the semantics of addr_from and addr_recv. It is not clear to me though what is their purpose. Don't we assume that the transport layer protocol takes care of, well, transport?

What happens if I send a version message where the information addr_from or addr_recv is missing or incorrect? E.g., in this answer the example code includes the following:

addr_recv = struct.pack("Q", 0)
addr_recv += struct.pack("&gt;16s", "127.0.0.1")
addr_recv += struct.pack("&gt;H", 8333)
addr_from = struct.pack("Q", 0)
addr_from += struct.pack("&gt;16s", "127.0.0.1")
addr_from += struct.pack("&gt;H", 8333)


If that works, why include anything meaningful in those fields?
Answered in this comment:


  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.