good morning!!!!

Skip to content
Snippets Groups Projects
  1. Feb 19, 2021
  2. Feb 05, 2021
  3. 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
  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.
      45cb1a58
  5. 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
  6. 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
      b4a26811
  7. Feb 26, 2020
  8. Jan 07, 2020
    • Gary Rong's avatar
      les/checkpointoracle: move oracle into its own package (#20508) · c6285e64
      Gary Rong authored
      * les: move the checkpoint oracle into its own package
      
      It's first step of refactor LES package. LES package
      basically can be divided into LES client and LES server.
      However both sides will use checkpoint package for
      status retrieval and verification. So this PR moves
      checkpoint oracle into a separate package
      
      * les: address comments
      c6285e64
  9. Aug 21, 2019
  10. Aug 03, 2019
  11. Jun 28, 2019
    • Gary Rong's avatar
      all: on-chain oracle checkpoint syncing (#19543) · f7cdea2b
      Gary Rong authored
      * all: implement simple checkpoint syncing
      
      cmd, les, node: remove callback mechanism
      
      cmd, node: remove callback definition
      
      les: simplify the registrar
      
      les: expose checkpoint rpc services in the light client
      
      les, light: don't store untrusted receipt
      
      cmd, contracts, les: discard stale checkpoint
      
      cmd, contracts/registrar: loose restriction of registeration
      
      cmd, contracts: add replay-protection
      
      all: off-chain multi-signature contract
      
      params: deploy checkpoint contract for rinkeby
      
      cmd/registrar: add raw signing mode for registrar
      
      cmd/registrar, contracts/registrar, les: fixed messages
      
      * cmd/registrar, contracts/registrar: fix lints
      
      * accounts/abi/bind, les: address comments
      
      * cmd, contracts, les, light, params: minor checkpoint sync cleanups
      
      * cmd, eth, les, light: move checkpoint config to config file
      
      * cmd, eth, les, params: address comments
      
      * eth, les, params: address comments
      
      * cmd: polish up the checkpoint admin CLI
      
      * cmd, contracts, params: deploy new version contract
      
      * cmd/checkpoint-admin: add another flag for clef mode signing
      
      * cmd, contracts, les: rename and regen checkpoint oracle with abigen
      f7cdea2b
  12. Apr 17, 2019
  13. Apr 08, 2019
  14. Sep 24, 2018
    • Felix Lange's avatar
      all: new p2p node representation (#17643) · 30cd5c18
      Felix Lange authored
      Package p2p/enode provides a generalized representation of p2p nodes
      which can contain arbitrary information in key/value pairs. It is also
      the new home for the node database. The "v4" identity scheme is also
      moved here from p2p/enr to remove the dependency on Ethereum crypto from
      that package.
      
      Record signature handling is changed significantly. The identity scheme
      registry is removed and acceptable schemes must be passed to any method
      that needs identity. This means records must now be validated explicitly
      after decoding.
      
      The enode API is designed to make signature handling easy and safe: most
      APIs around the codebase work with enode.Node, which is a wrapper around
      a valid record. Going from enr.Record to enode.Node requires a valid
      signature.
      
      * p2p/discover: port to p2p/enode
      
      This ports the discovery code to the new node representation in
      p2p/enode. The wire protocol is unchanged, this can be considered a
      refactoring change. The Kademlia table can now deal with nodes using an
      arbitrary identity scheme. This requires a few incompatible API changes:
      
        - Table.Lookup is not available anymore. It used to take a public key
          as argument because v4 protocol requires one. Its replacement is
          LookupRandom.
        - Table.Resolve takes *enode.Node instead of NodeID. This is also for
          v4 protocol compatibility because nodes cannot be looked up by ID
          alone.
        - Types Node and NodeID are gone. Further commits in the series will be
          fixes all over the the codebase to deal with those removals.
      
      * p2p: port to p2p/enode and discovery changes
      
      This adapts package p2p to the changes in p2p/discover. All uses of
      discover.Node and discover.NodeID are replaced by their equivalents from
      p2p/enode.
      
      New API is added to retrieve the enode.Node instance of a peer. The
      behavior of Server.Self with discovery disabled is improved. It now
      tries much harder to report a working IP address, falling back to
      127.0.0.1 if no suitable address can be determined through other means.
      These changes were needed for tests of other packages later in the
      series.
      
      * p2p/simulations, p2p/testing: port to p2p/enode
      
      No surprises here, mostly replacements of discover.Node, discover.NodeID
      with their new equivalents. The 'interesting' API changes are:
      
       - testing.ProtocolSession tracks complete nodes, not just their IDs.
       - adapters.NodeConfig has a new method to create a complete node.
      
      These changes were needed to make swarm tests work.
      
      Note that the NodeID change makes the code incompatible with old
      simulation snapshots.
      
      * whisper/whisperv5, whisper/whisperv6: port to p2p/enode
      
      This port was easy because whisper uses []byte for node IDs and
      URL strings in the API.
      
      * eth: port to p2p/enode
      
      Again, easy to port because eth uses strings for node IDs and doesn't
      care about node information in any way.
      
      * les: port to p2p/enode
      
      Apart from replacing discover.NodeID with enode.ID, most changes are in
      the server pool code. It now deals with complete nodes instead
      of (Pubkey, IP, Port) triples. The database format is unchanged for now,
      but we should probably change it to use the node database later.
      
      * node: port to p2p/enode
      
      This change simply replaces discover.Node and discover.NodeID with their
      new equivalents.
      
      * swarm/network: port to p2p/enode
      
      Swarm has its own node address representation, BzzAddr, containing both
      an overlay address (the hash of a secp256k1 public key) and an underlay
      address (enode:// URL).
      
      There are no changes to the BzzAddr format in this commit, but certain
      operations such as creating a BzzAddr from a node ID are now impossible
      because node IDs aren't public keys anymore.
      
      Most swarm-related changes in the series remove uses of
      NewAddrFromNodeID, replacing it with NewAddr which takes a complete node
      as argument. ToOverlayAddr is removed because we can just use the node
      ID directly.
      30cd5c18
  15. Sep 20, 2018
  16. Aug 28, 2018
  17. Aug 21, 2018
  18. Aug 17, 2018
    • Felix Lange's avatar
      les: fix crasher in NodeInfo when running as server (#17419) · 2695fa22
      Felix Lange authored
      * les: fix crasher in NodeInfo when running as server
      
      The ProtocolManager computes CHT and Bloom trie roots by asking the
      indexers for their current head. It tried to get the indexers from
      LesOdr, but no LesOdr instance is created in server mode.
      
      Attempt to fix this by moving the indexers, protocol creation and
      NodeInfo to a new lesCommons struct which is embedded into both server
      and client.
      
      All this setup code should really be cleaned up, but this is just a
      hotfix so we have to do that some other time.
      
      * les: fix commons protocol maker
      2695fa22
Loading