good morning!!!!

Skip to content
Snippets Groups Projects
  1. May 18, 2021
  2. May 04, 2021
    • Felix Lange's avatar
      cmd/utils: use eth DNS tree for snap discovery (#22808) · b8040a43
      Felix Lange authored
      This removes auto-configuration of the snap.*.ethdisco.net DNS discovery tree.
      Since measurements have shown that > 75% of nodes in all.*.ethdisco.net support
      snap, we have decided to retire the dedicated index for snap and just use the eth
      tree instead.
      
      The dial iterators of eth and snap now use the same DNS tree in the default configuration,
      so both iterators should use the same DNS discovery client instance. This ensures that
      the record cache and rate limit are shared. Records will not be requested multiple times.
      
      While testing the change, I noticed that duplicate DNS requests do happen even
      when the client instance is shared. This is because the two iterators request the tree
      root, link tree root, and first levels of the tree in lockstep. To avoid this problem, the
      change also adds a singleflight.Group instance in the client. When one iterator
      attempts to resolve an entry which is already being resolved, the singleflight object
      waits for the existing resolve call to finish and returns the entry to both places.
      b8040a43
  3. Apr 27, 2021
  4. Apr 23, 2021
  5. Apr 22, 2021
  6. Apr 06, 2021
    • Zsolt Felföldi's avatar
      les: move client pool to les/vflux/server (#22495) · 2d89fe08
      Zsolt Felföldi authored
      
      * les: move client pool to les/vflux/server
      
      * les/vflux/server: un-expose NodeBalance, remove unused fn, fix bugs
      
      * tests/fuzzers/vflux: add ClientPool fuzzer
      
      * les/vflux/server: fixed balance tests
      
      * les: rebase fix
      
      * les/vflux/server: fixed more bugs
      
      * les/vflux/server: unexported NodeStateMachine fields and flags
      
      * les/vflux/server: unexport all internal components and functions
      
      * les/vflux/server: fixed priorityPool test
      
      * les/vflux/server: polish balance
      
      * les/vflux/server: fixed mutex locking error
      
      * les/vflux/server: priorityPool bug fixed
      
      * common/prque: make Prque wrap-around priority handling optional
      
      * les/vflux/server: rename funcs, small optimizations
      
      * les/vflux/server: fixed timeUntil
      
      * les/vflux/server: separated balance.posValue and negValue
      
      * les/vflux/server: polish setup
      
      * les/vflux/server: enforce capacity curve monotonicity
      
      * les/vflux/server: simplified requestCapacity
      
      * les/vflux/server: requestCapacity with target range, no iterations in SetCapacity
      
      * les/vflux/server: minor changes
      
      * les/vflux/server: moved default factors to balanceTracker
      
      * les/vflux/server: set inactiveFlag in priorityPool
      
      * les/vflux/server: moved related metrics to vfs package
      
      * les/vflux/client: make priorityPool temp state logic cleaner
      
      * les/vflux/server: changed log.Crit to log.Error
      
      * add vflux fuzzer to oss-fuzz
      
      Co-authored-by: default avatarrjl493456442 <garyrong0905@gmail.com>
      2d89fe08
  7. Mar 26, 2021
  8. Mar 24, 2021
  9. Mar 19, 2021
  10. Mar 11, 2021
  11. Mar 01, 2021
    • Zsolt Felföldi's avatar
      les: UDP pre-negotiation of available server capacity (#22183) · d9687042
      Zsolt Felföldi authored
      This PR implements the first one of the "lespay" UDP queries which
      is already useful in itself: the capacity query. The server pool is making
      use of this query by doing a cheap UDP query to determine whether it is
      worth starting the more expensive TCP connection process.
      d9687042
  12. Feb 19, 2021
    • Felix Lange's avatar
      p2p/dnsdisc: fix hot-spin when all trees are empty (#22313) · d36276d8
      Felix Lange authored
      In the random sync algorithm used by the DNS node iterator, we first pick a random
      tree and then perform one sync action on that tree. This happens in a loop until any
      node is found. If no trees contain any nodes, the iterator will enter a hot loop spinning
      at 100% CPU.
      
      The fix is complicated. The iterator now checks if a meaningful sync action can
      be performed on any tree. If there is nothing to do, it waits for the next root record
      recheck time to arrive and then tries again.
      
      Fixes #22306
      d36276d8
  13. Feb 18, 2021
    • Martin Holst Swende's avatar
      eth: implement eth66 (#22241) · 6ec15610
      Martin Holst Swende authored
      * eth/protocols/eth: split up the eth protocol handlers
      
      * eth/protocols/eth: define eth-66 protocol messages
      
      * eth/protocols/eth: poc implement getblockheaders on eth/66
      
      * eth/protocols/eth: implement remaining eth-66 handlers
      
      * eth/protocols: define handler map for eth 66
      
      * eth/downloader: use protocol constants from eth package
      
      * eth/protocols/eth: add ETH66 capability
      
      * eth/downloader: tests for eth66
      
      * eth/downloader: fix error in tests
      
      * eth/protocols/eth: use eth66 for outgoing requests
      
      * eth/protocols/eth: remove unused error type
      
      * eth/protocols/eth: define protocol length
      
      * eth/protocols/eth: fix pooled tx over eth66
      
      * protocols/eth/handlers: revert behavioural change which caused tests to fail
      
      * eth/downloader: fix failing test
      
      * eth/protocols/eth: add testcases + fix flaw with header requests
      
      * eth/protocols: change comments
      
      * eth/protocols/eth: review fixes + fixed flaw in RequestOneHeader
      
      * eth/protocols: documentation
      
      * eth/protocols/eth: review concerns about types
      6ec15610
  14. Feb 05, 2021
  15. Feb 02, 2021
  16. Jan 26, 2021
    • Zsolt Felföldi's avatar
      les: switch to new discv5 (#21940) · a72fa88a
      Zsolt Felföldi authored
      
      This PR enables running the new discv5 protocol in both LES client
      and server mode. In client mode it mixes discv5 and dnsdisc iterators
      (if both are enabled) and filters incoming ENRs for "les" tag and fork ID.
      The old p2p/discv5 package and all references to it are removed.
      
      Co-authored-by: default avatarFelix Lange <fjl@twurst.com>
      a72fa88a
  17. Jan 25, 2021
  18. Jan 13, 2021
  19. Dec 09, 2020
    • Felix Lange's avatar
      p2p/enode: avoid crashing for invalid IP (#21981) · 817a3fb5
      Felix Lange authored
      The database panicked for invalid IPs. This is usually no problem
      because all code paths leading to node DB access verify the IP, but it's
      dangerous because improper validation can turn this panic into a DoS
      vulnerability. The quick fix here is to just turn database accesses
      using invalid IP into a noop. This isn't great, but I'm planning to
      remove the node DB for discv5 long-term, so it should be fine to have
      this quick fix for half a year.
      
      Fixes #21849
      817a3fb5
  20. Nov 30, 2020
  21. Nov 25, 2020
  22. Nov 20, 2020
  23. Nov 10, 2020
    • Gary Rong's avatar
      p2p/simulations/adapters/exec: fix some issues (#21801) · c52dfd55
      Gary Rong authored
      - Remove the ws:// prefix from the status endpoint since
        the ws:// is already included in the stack.WSEndpoint().
      - Don't register the services again in the node start.
        Registration is already done in the initialization stage.
      - Expose admin namespace via websocket.
        This namespace is necessary for connecting the peers via websocket.
      - Offer logging relevant options for exec adapter.
        It's really painful to mix all log output in the single console. So
        this PR offers two additional options for exec adapter in this case
        testers can config the log output(e.g. file output) and log level
        for each p2p node.
      c52dfd55
  24. Oct 30, 2020
    • Gary Rong's avatar
      les, p2p/simulations/adapters: fix issues found while simulating les (#21761) · b63bffe8
      Gary Rong authored
      This adds a few tiny fixes for les and the p2p simulation framework:
      
      LES Parts
      
      - Keep the LES-SERVER connection even it's non-synced
      
        We had this idea to reject the connections in LES protocol if the les-server itself is
        not synced. However, in LES protocol we will also receive the connection from another
        les-server. In this case even the local node is not synced yet, we should keep the tcp
        connection for other protocols(e.g. eth protocol).
      
      - Don't count "invalid message" for non-existing GetBlockHeadersMsg request
      
        In the eth syncing mechanism (full sync, fast sync, light sync), it will try to fetch
        some non-existent blocks or headers(to ensure we indeed download all the missing chain).
        In this case, it's possible that the les-server will receive the request for
        non-existent headers. So don't count it as the "invalid message" for scheduling
        dropping.
      
      - Copy the announce object in the closure
      
        Before the les-server pushes the latest headers to all connected clients, it will create
        a closure and queue it in the underlying request scheduler. In some scenarios it's
        problematic. E.g, in private networks, the block can be mined very fast. So before the
        first closure is executed, we may already update the latest_announce object. So actually
        the "announce" object we want to send is replaced.
      
        The downsize is the client will receive two announces with the same td and then drop the
        server.
      
      P2P Simulation Framework
      
      - Don't double register the protocol services in p2p-simulation "Start".
      
        The protocols upon the devp2p are registered in the "New node stage". So don't reigster
        them again when starting a node in the p2p simulation framework
      
      - Add one more new config field "ExternalSigner", in order to use clef service in the
        framework.
      b63bffe8
  25. Oct 14, 2020
  26. Oct 13, 2020
  27. Oct 08, 2020
    • Felix Lange's avatar
      p2p/discover: remove use of shared hash instance for key derivation (#21673) · 5e86e4ed
      Felix Lange authored
      For some reason, using the shared hash causes a cryptographic incompatibility
      when using Go 1.15. I noticed this during the development of Discovery v5.1
      when I added test vector verification.
      
      The go library commit that broke this is golang/go@97240d5, but the
      way we used HKDF is slightly dodgy anyway and it's not a regression.
      5e86e4ed
  28. Sep 28, 2020
  29. Sep 22, 2020
  30. Sep 14, 2020
    • Zsolt Felföldi's avatar
      p2p/nodestate: ensure correct callback order (#21436) · 4eb92969
      Zsolt Felföldi authored
      This PR adds an extra guarantee to NodeStateMachine: it ensures that all
      immediate effects of a certain change are processed before any subsequent
      effects of any of the immediate effects on the same node. In the original
      version, if a cascaded change caused a subscription callback to be called
      multiple times for the same node then these calls might have happened in a
      wrong chronological order.
      
      For example:
      
      - a subscription to flag0 changes flag1 and flag2
      - a subscription to flag1 changes flag3
      - a subscription to flag1, flag2 and flag3 was called in the following order:
      
         [flag1] -> [flag1, flag3]
         [] -> [flag1]
         [flag1, flag3] -> [flag1, flag2, flag3]
      
      This happened because the tree of changes was traversed in a "depth-first
      order". Now it is traversed in a "breadth-first order"; each node has a
      FIFO queue for pending callbacks and each triggered subscription callback
      is added to the end of the list. The already existing guarantees are
      retained; no SetState or SetField returns until the callback queue of the
      node is empty again. Just like before, it is the responsibility of the
      state machine design to ensure that infinite state loops are not possible.
      Multiple changes affecting the same node can still happen simultaneously;
      in this case the changes can be interleaved in the FIFO of the node but the
      correct order is still guaranteed.
      
      A new unit test is also added to verify callback order in the above scenario.
      4eb92969
  31. Sep 11, 2020
  32. Aug 24, 2020
    • timcooijmans's avatar
      p2p/discover: avoid dropping unverified nodes when table is almost empty (#21396) · 7b5107b7
      timcooijmans authored
      
      This change improves discovery behavior in small networks. Very small
      networks would often fail to bootstrap because all member nodes were
      dropping table content due to findnode failure. The check is now changed
      to avoid dropping nodes on findnode failure when their bucket is almost
      empty. It also relaxes the liveness check requirement for FINDNODE/v4
      response nodes, returning unverified nodes as results when there aren't
      any verified nodes yet.
      
      The "findnode failed" log now reports whether the node was dropped
      instead of the number of results. The value of the "results" was
      always zero by definition.
      
      Co-authored-by: default avatarFelix Lange <fjl@twurst.com>
      7b5107b7
  33. Aug 05, 2020
    • Felix Lange's avatar
      p2p/nat: limit UPNP request concurrency (#21390) · 1d25039f
      Felix Lange authored
      This adds a lock around requests because some routers can't handle
      concurrent requests. Requests are also rate-limited.
       
      The Map function request a new mapping exactly when the map timeout
      occurs instead of 5 minutes earlier. This should prevent duplicate mappings.
      1d25039f
  34. Aug 03, 2020
    • rene's avatar
      node: refactor package node (#21105) · c0c01612
      rene authored
      This PR significantly changes the APIs for instantiating Ethereum nodes in
      a Go program. The new APIs are not backwards-compatible, but we feel that
      this is made up for by the much simpler way of registering services on
      node.Node. You can find more information and rationale in the design
      document: https://gist.github.com/renaynay/5bec2de19fde66f4d04c535fd24f0775.
      
      There is also a new feature in Node's Go API: it is now possible to
      register arbitrary handlers on the user-facing HTTP server. In geth, this
      facility is used to enable GraphQL.
      
      There is a single minor change relevant for geth users in this PR: The
      GraphQL API is no longer available separately from the JSON-RPC HTTP
      server. If you want GraphQL, you need to enable it using the
      ./geth --http --graphql flag combination.
      
      The --graphql.port and --graphql.addr flags are no longer available.
      c0c01612
  35. Jul 13, 2020
Loading