aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/discover/v4_udp_test.go
Commit message (Collapse)AuthorAgeFilesLines
* core/state, p2p/discover, trie, whisper: avoid unnecessary conversions (#19870)Christian Muehlhaeuser2019-07-221-1/+1
| | | No need to convert these types.
* p2p/enode: improve IPv6 support, add ENR text representation (#19663)Felix Lange2019-06-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | * p2p/enr: add entries for for IPv4/IPv6 separation This adds entry types for "ip6", "udp6", "tcp6" keys. The IP type stays around because removing it would break a lot of code and force everyone to care about the distinction. * p2p/enode: track IPv4 and IPv6 address separately LocalNode predicts the local node's UDP endpoint and updates the record. This change makes it predict IPv4 and IPv6 endpoints separately since they can now be in the record at the same time. * p2p/enode: implement base64 text format * all: switch to enode.Parse(...) This allows passing base64-encoded node records to all the places that previously accepted enode:// URLs. The URL format is still supported. * cmd/bootnode, p2p: log node URL instead of ENR ...and return the base64 record in NodeInfo.
* p2p/discover: add support for EIP-868 (v4 ENR extension) (#19540)Felix Lange2019-05-151-23/+75
| | | | | | | | This change implements EIP-868. The UDPv4 transport announces support for the extension in ping/pong and handles enrRequest messages. There are two uses of the extension: If a remote node announces support for EIP-868 in their pong, node revalidation pulls the node's record. The Resolve method requests the record unconditionally.
* p2p/discover: split out discv4 codeFelix Lange2019-04-301-0/+635
This change restructures the internals of p2p/discover to make room for the discv5 code which will soon be added to this package. - packet type names now have a "V4" suffix. - ListenUDP returns *UDPv4 instead of *Table. This technically breaks the API but the only caller in go-ethereum is package p2p, which uses a compatible interface and doesn't need changes. - The internal transport interface is changed to make Table reusable for v5. - The 'lookup' code moves from table to transport. This required updating the lookup unit test to use udpTest instead of a custom transport.