good morning!!!!

Skip to content
Snippets Groups Projects
  1. 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>
      Unverified
      a72fa88a
  2. Jan 25, 2021
    • Gary Rong's avatar
      eth/tracers: move tracing APIs into eth/tracers (#22161) · adf130de
      Gary Rong authored
      This moves the tracing RPC API implementation to package eth/tracers.
      By doing so, package eth no longer depends on tracing and the duktape JS engine.
      
      The change also enables tracing using the light client. All tracing methods work with the
      light client, but it's a lot slower compared to using a full node.
      Unverified
      adf130de
  3. Jan 21, 2021
  4. Jan 19, 2021
    • Gary Rong's avatar
      eth, les: add new config field SyncFromCheckpoint (#22123) · 45cb1a58
      Gary Rong authored
      This PR introduces a new config field SyncFromCheckpoint for light client.
      
      In some special scenarios, it's required to start synchronization from some
      arbitrary checkpoint or even from the scratch. So this PR offers this
      flexibility to users so that the synchronization start point can be configured.
      
      There are two relevant configs: SyncFromCheckpoint and Checkpoint.
      
      - If the SyncFromCheckpoint is true, the light client will try to sync from the
        specified checkpoint.
      
      - If the Checkpoint is not configured, then the light client will sync from the
        scratch(from the latest header if the database is not empty)
      
      Additional notes: these two configs are not visible in the CLI flags but only
      accessable in the config file.
      
      Example Usage:
      
      [Eth]
      SyncFromCheckpoint = true
      
      [Eth.Checkpoint]
      SectionIndex = 100
      SectionHead = "0xabc"
      CHTRoot = "0xabc"
      BloomRoot = "0xabc"
      
      PS. Historical checkpoint can be retrieved from the synced full node or light
      client via les_getCheckpoint API.
      Unverified
      45cb1a58
  5. Jan 16, 2021
    • Gary Rong's avatar
      les: remove useless protocol defines (#22115) · 034ecc32
      Gary Rong authored
      This PR has two changes in the les protocol:
      
      - the auxRoot is not supported. See ethereum/devp2p#171 for more information
      - the empty response will be returned in GetHelperTrieProofsMsg request if the merkle
         proving is failed. note, for backward compatibility, the empty merkle proof as well as
         the request auxiliary data will still be returned in  les2/3 protocol no matter the proving
         is successful or not. the proving failure can happen e.g. request the proving for a
         non-included entry in helper trie (unstable header).
      Unverified
      034ecc32
  6. Jan 15, 2021
  7. Jan 07, 2021
  8. Dec 23, 2020
  9. Dec 15, 2020
  10. Dec 14, 2020
  11. Dec 11, 2020
  12. Dec 10, 2020
  13. Dec 08, 2020
  14. Dec 07, 2020
  15. Dec 01, 2020
  16. Nov 25, 2020
  17. Nov 24, 2020
  18. Nov 23, 2020
  19. Nov 13, 2020
  20. 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.
      Unverified
      b63bffe8
  21. Oct 21, 2020
    • Zsolt Felföldi's avatar
      les: remove clientPeerSet and serverSet (#21566) · 85d81b2c
      Zsolt Felföldi authored
      * les: move NodeStateMachine from clientPool to LesServer
      
      * les: new header broadcaster
      
      * les: peerCommons.headInfo always contains last announced head
      
      * les: remove clientPeerSet and serverSet
      
      * les: fixed panic
      
      * les: fixed --nodiscover option
      
      * les: disconnect all peers at ns.Stop()
      
      * les: added comments and fixed signed broadcasts
      
      * les: removed unused parameter, fixed tests
      Unverified
      85d81b2c
  22. Oct 13, 2020
  23. Sep 16, 2020
  24. Sep 14, 2020
    • Zsolt Felföldi's avatar
      les, les/lespay/server: refactor client pool (#21236) · 4996fce2
      Zsolt Felföldi authored
      
      * les, les/lespay/server: refactor client pool
      
      * les: use ns.Operation and sub calls where needed
      
      * les: fixed tests
      
      * les: removed active/inactive logic from peerSet
      
      * les: removed active/inactive peer logic
      
      * les: fixed linter warnings
      
      * les: fixed more linter errors and added missing metrics
      
      * les: addressed comments
      
      * cmd/geth: fixed TestPriorityClient
      
      * les: simplified clientPool state machine
      
      * les/lespay/server: do not use goroutine for balance callbacks
      
      * internal/web3ext: fix addBalance required parameters
      
      * les: removed freeCapacity, always connect at minCapacity initially
      
      * les: only allow capacity change with priority status
      
      Co-authored-by: default avatarrjl493456442 <garyrong0905@gmail.com>
      Unverified
      4996fce2
    • 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.
      Unverified
      4eb92969
  25. Aug 21, 2020
  26. Aug 07, 2020
  27. 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.
      Unverified
      c0c01612
  28. Jul 29, 2020
  29. Jul 28, 2020
    • Gary Rong's avatar
      les: implement new les fetcher (#20692) · 28c5a8a5
      Gary Rong authored
      * cmd, consensus, eth, les: implement light fetcher
      
      * les: address comment
      
      * les: address comment
      
      * les: address comments
      
      * les: check td after delivery
      
      * les: add linearExpiredValue for error counter
      
      * les: fix import
      
      * les: fix dead lock
      
      * les: order announces by td
      
      * les: encapsulate invalid counter
      
      * les: address comment
      
      * les: add more checks during the delivery
      
      * les: fix log
      
      * eth, les: fix lint
      
      * eth/fetcher: address comment
      Unverified
      28c5a8a5
  30. Jul 21, 2020
  31. Jul 13, 2020
  32. Jul 02, 2020
  33. Jul 01, 2020
  34. Jun 17, 2020
  35. May 25, 2020
  36. May 22, 2020
    • Zsolt Felföldi's avatar
      les, les/lespay: implement new server pool (#20758) · b4a26811
      Zsolt Felföldi authored
      This PR reimplements the light client server pool. It is also a first step
      to move certain logic into a new lespay package. This package will contain
      the implementation of the lespay token sale functions, the token buying and
      selling logic and other components related to peer selection/prioritization
      and service quality evaluation. Over the long term this package will be
      reusable for incentivizing future protocols.
      
      Since the LES peer logic is now based on enode.Iterator, it can now use
      DNS-based fallback discovery to find servers.
      
      This document describes the function of the new components:
      https://gist.github.com/zsfelfoldi/3c7ace895234b7b345ab4f71dab102d4
      Unverified
      b4a26811
Loading