1. 31 May, 2023 1 commit
    • Felix Lange's avatar
      p2p/discover: add Table configuration and Nodes method (#27387) · ac86547b
      Felix Lange authored
      * p2p/discover: remove ReadRandomNodes
      
      Even though it's public, this method is not callable by code outside of
      package p2p/discover because one can't get a valid instance of Table.
      
      * p2p/discover: add Table.Nodes
      
      * p2p/discover: make Table settings configurable
      
      In unit tests and externally developed cmd/devp2p test runs, it can be
      useful to tune the timer intervals used by Table.
      ac86547b
  2. 30 Nov, 2022 1 commit
  3. 29 Jul, 2021 1 commit
  4. 08 Apr, 2020 1 commit
    • Felix Lange's avatar
      p2p/discover: add initial discovery v5 implementation (#20750) · b7394d79
      Felix Lange authored
      This adds an implementation of the current discovery v5 spec.
      
      There is full integration with cmd/devp2p and enode.Iterator in this
      version. In theory we could enable the new protocol as a replacement of
      discovery v4 at any time. In practice, there will likely be a few more
      changes to the spec and implementation before this can happen.
      b7394d79
  5. 29 Oct, 2019 1 commit
    • Felix Lange's avatar
      cmd/devp2p, p2p: dial using node iterator, discovery crawler (#20132) · 2c37142d
      Felix Lange authored
      * p2p/enode: add Iterator and associated utilities
      
      * p2p/discover: add RandomNodes iterator
      
      * p2p: dial using iterator
      
      * cmd/devp2p: add discv4 crawler
      
      * cmd/devp2p: WIP nodeset filter
      
      * cmd/devp2p: fixup lesFilter
      
      * core/forkid: add NewStaticFilter
      
      * cmd/devp2p: make -eth-network filter actually work
      
      * cmd/devp2p: improve crawl timestamp handling
      
      * cmd/devp2p: fix typo
      
      * p2p/enode: fix comment typos
      
      * p2p/discover: fix comment typos
      
      * p2p/discover: rename lookup.next to 'advance'
      
      * p2p: lower discovery mixer timeout
      
      * p2p/enode: implement dynamic FairMix timeouts
      
      * cmd/devp2p: add ropsten support in -eth-network filter
      
      * cmd/devp2p: tweak crawler log message
      2c37142d
  6. 30 Apr, 2019 1 commit
    • Felix Lange's avatar
      p2p/discover: split out discv4 code · dba1750e
      Felix Lange authored
      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.
      dba1750e