good morning!!!!

Skip to content
Snippets Groups Projects
  1. Jun 24, 2020
  2. Jun 02, 2020
  3. May 25, 2020
  4. 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
  5. May 11, 2020
    • Felix Lange's avatar
      p2p: add 0 port check in dialer (#21008) · 6f54ae24
      Felix Lange authored
      * p2p: add low port check in dialer
      
      We already have a check like this for UDP ports, add a similar one in
      the dialer. This prevents dials to port zero and it's also an extra
      layer of protection against spamming HTTP servers.
      
      * p2p/discover: use errLowPort in v4 code
      
      * p2p: change port check
      
      * p2p: add comment
      
      * p2p/simulations/adapters: ensure assigned port is in all node records
      6f54ae24
  6. Apr 24, 2020
    • tgyKomgo's avatar
      p2p/enode: update code comment (#20972) · 1aa83290
      tgyKomgo authored
      It is possible to specify enode URLs using domain name since
      commit b90cdbaa, but the code comment still said that only
      IP addresses are allowed.
      
      Co-authored-by: admin@komgo.io <KomgoRocks2018!>
      1aa83290
  7. Apr 21, 2020
  8. Apr 16, 2020
    • Nishant Das's avatar
      p2p/discover: add helper methods to UDPv5 (#20918) · 7a63faf7
      Nishant Das authored
      This adds two new methods to UDPv5, AllNodes and LocalNode.
      
      AllNodes returns all the nodes stored in the local table; this is
      useful for the purposes of metrics collection and also debugging any
      potential issues with other discovery v5 implementations.
      
      LocalNode returns the local node object. The reason for exposing this
      is so that users can modify and set/delete new key-value entries in
      the local record.
      7a63faf7
  9. Apr 09, 2020
  10. Apr 08, 2020
    • Felix Lange's avatar
      build: upgrade to golangci-lint 1.24.0 (#20901) · c8e9a916
      Felix Lange authored
      * accounts/scwallet: remove unnecessary uses of fmt.Sprintf
      
      * cmd/puppeth: remove unnecessary uses of fmt.Sprintf
      
      * p2p/discv5: remove unnecessary use of fmt.Sprintf
      
      * whisper/mailserver: remove unnecessary uses of fmt.Sprintf
      
      * core: goimports -w tx_pool_test.go
      
      * eth/downloader: goimports -w downloader_test.go
      
      * build: upgrade to golangci-lint 1.24.0
      c8e9a916
    • 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
  11. Apr 02, 2020
  12. Apr 01, 2020
  13. Feb 27, 2020
  14. Feb 17, 2020
  15. Feb 13, 2020
    • Felix Lange's avatar
      p2p: new dial scheduler (#20592) · 90caa2ca
      Felix Lange authored
      * p2p: new dial scheduler
      
      This change replaces the peer-to-peer dial scheduler with a new and
      improved implementation. The new code is better than the previous
      implementation in two key aspects:
      
      - The time between discovery of a node and dialing that node is
        significantly lower in the new version. The old dialState kept
        a buffer of nodes and launched a task to refill it whenever the buffer
        became empty. This worked well with the discovery interface we used to
        have, but doesn't really work with the new iterator-based discovery
        API.
      
      - Selection of static dial candidates (created by Server.AddPeer or
        through static-nodes.json) performs much better for large amounts of
        static peers. Connections to static nodes are now limited like dynanic
        dials and can no longer overstep MaxPeers or the dial ratio.
      
      * p2p/simulations/adapters: adapt to new NodeDialer interface
      
      * p2p: re-add check for self in checkDial
      
      * p2p: remove peersetCh
      
      * p2p: allow static dials when discovery is disabled
      
      * p2p: add test for dialScheduler.removeStatic
      
      * p2p: remove blank line
      
      * p2p: fix documentation of maxDialPeers
      
      * p2p: change "ok" to "added" in static node log
      
      * p2p: improve dialTask docs
      
      Also increase log level for "Can't resolve node"
      
      * p2p: ensure dial resolver is truly nil without discovery
      
      * p2p: add "looking for peers" log message
      
      * p2p: clean up Server.run comments
      
      * p2p: fix maxDialedConns for maxpeers < dialRatio
      
      Always allocate at least one dial slot unless dialing is disabled using
      NoDial or MaxPeers == 0. Most importantly, this fixes MaxPeers == 1 to
      dedicate the sole slot to dialing instead of listening.
      
      * p2p: fix RemovePeer to disconnect the peer again
      
      Also make RemovePeer synchronous and add a test.
      
      * p2p: remove "Connection set up" log message
      
      * p2p: clean up connection logging
      
      We previously logged outgoing connection failures up to three times.
      
      - in SetupConn() as "Setting up connection failed addr=..."
      - in setupConn() with an error-specific message and "id=... addr=..."
      - in dial() as "Dial error task=..."
      
      This commit ensures a single log message is emitted per failure and adds
      "id=... addr=... conn=..." everywhere (id= omitted when the ID isn't
      known yet).
      
      Also avoid printing a log message when a static dial fails but can't be
      resolved because discv4 is disabled. The light client hit this case all
      the time, increasing the message count to four lines per failed
      connection.
      
      * p2p: document that RemovePeer blocks
      90caa2ca
  16. Feb 12, 2020
  17. Jan 17, 2020
    • Felix Lange's avatar
      p2p: ensure Server.loop is ticking even if discovery hangs (#20573) · d5acc5ed
      Felix Lange authored
      This is a temporary fix for a problem which started happening when the
      dialer was changed to read nodes from an enode.Iterator. Before the
      iterator change, discovery queries would always return within a couple
      seconds even if there was no Internet access. Since the iterator won't
      return unless a node is actually found, discoverTask can take much
      longer. This means that the 'emergency connect' logic might not execute
      in time, leading to a stuck node.
      d5acc5ed
  18. Jan 16, 2020
  19. Dec 12, 2019
    • Felix Lange's avatar
      p2p/dnsdisc: add enode.Iterator API (#20437) · 191364c3
      Felix Lange authored
      * p2p/dnsdisc: add support for enode.Iterator
      
      This changes the dnsdisc.Client API to support the enode.Iterator
      interface.
      
      * p2p/dnsdisc: rate-limit DNS requests
      
      * p2p/dnsdisc: preserve linked trees across root updates
      
      This improves the way links are handled when the link root changes.
      Previously, sync would simply remove all links from the current tree and
      garbage-collect all unreachable trees before syncing the new list of
      links.
      
      This behavior isn't great in certain cases: Consider a structure where
      trees A, B, and C reference each other and D links to A. If D's link
      root changed, the sync code would first remove trees A, B and C, only to
      re-sync them later when the link to A was found again.
      
      The fix for this problem is to track the current set of links in each
      clientTree and removing old links only AFTER all links are synced.
      
      * p2p/dnsdisc: deflake iterator test
      
      * cmd/devp2p: adapt dnsClient to new p2p/dnsdisc API
      
      * p2p/dnsdisc: tiny comment fix
      191364c3
  20. Dec 05, 2019
  21. Nov 26, 2019
  22. Nov 22, 2019
  23. Nov 19, 2019
  24. Nov 18, 2019
    • Felix Lange's avatar
      build: use golangci-lint (#20295) · 68948644
      Felix Lange authored
      * build: use golangci-lint
      
      This changes build/ci.go to download and run golangci-lint instead
      of gometalinter.
      
      * core/state: fix unnecessary conversion
      
      * p2p/simulations: fix lock copying (found by go vet)
      
      * signer/core: fix unnecessary conversions
      
      * crypto/ecies: remove unused function cmpPublic
      
      * core/rawdb: remove unused function print
      
      * core/state: remove unused function xTestFuzzCutter
      
      * core/vm: disable TestWriteExpectedValues in a different way
      
      * core/forkid: remove unused function checksum
      
      * les: remove unused type proofsData
      
      * cmd/utils: remove unused functions prefixedNames, prefixFor
      
      * crypto/bn256: run goimports
      
      * p2p/nat: fix goimports lint issue
      
      * cmd/clef: avoid using unkeyed struct fields
      
      * les: cancel context in testRequest
      
      * rlp: delete unreachable code
      
      * core: gofmt
      
      * internal/build: simplify DownloadFile for Go 1.11 compatibility
      
      * build: remove go test --short flag
      
      * .travis.yml: disable build cache
      
      * whisper/whisperv6: fix ineffectual assignment in TestWhisperIdentityManagement
      
      * .golangci.yml: enable goconst and ineffassign linters
      
      * build: print message when there are no lint issues
      
      * internal/build: refactor download a bit
      68948644
    • Felix Lange's avatar
      rpc, p2p/simulations: use github.com/gorilla/websocket (#20289) · 7c4a4eb5
      Felix Lange authored
      * rpc: improve codec abstraction
      
      rpc.ServerCodec is an opaque interface. There was only one way to get a
      codec using existing APIs: rpc.NewJSONCodec. This change exports
      newCodec (as NewFuncCodec) and NewJSONCodec (as NewCodec). It also makes
      all codec methods non-public to avoid showing internals in godoc.
      
      While here, remove codec options in tests because they are not
      supported anymore.
      
      * p2p/simulations: use github.com/gorilla/websocket
      
      This package was the last remaining user of golang.org/x/net/websocket.
      Migrating to the new library wasn't straightforward because it is no
      longer possible to treat WebSocket connections as a net.Conn.
      
      * vendor: delete golang.org/x/net/websocket
      
      * rpc: fix godoc comments and run gofmt
      7c4a4eb5
  25. Nov 13, 2019
    • Kurkó Mihály's avatar
      dashboard: send current block to the dashboard client (#19762) · 4ea9b62b
      Kurkó Mihály authored
      This adds all dashboard changes from the last couple months.
      We're about to remove the dashboard, but decided that we should
      get all the recent work in first in case anyone wants to pick up this
      project later on.
      
      * cmd, dashboard, eth, p2p: send peer info to the dashboard
      * dashboard: update npm packages, improve UI, rebase
      * dashboard, p2p: remove println, change doc
      * cmd, dashboard, eth, p2p: cleanup after review
      * dashboard: send current block to the dashboard client
      4ea9b62b
    • Rick's avatar
      p2p: fix bug in TestPeerDisconnect (#20277) · 6f1a600f
      Rick authored
      6f1a600f
  26. Nov 07, 2019
  27. Oct 29, 2019
    • 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
  28. Oct 17, 2019
  29. Oct 16, 2019
  30. Sep 27, 2019
  31. Sep 25, 2019
    • Felix Lange's avatar
      p2p/dnsdisc: add implementation of EIP-1459 (#20094) · 0568e817
      Felix Lange authored
      This adds an implementation of node discovery via DNS TXT records to the
      go-ethereum library. The implementation doesn't match EIP-1459 exactly,
      the main difference being that this implementation uses separate merkle
      trees for tree links and ENRs. The EIP will be updated to match p2p/dnsdisc.
      
      To maintain DNS trees, cmd/devp2p provides a frontend for the p2p/dnsdisc
      library. The new 'dns' subcommands can be used to create, sign and deploy DNS
      discovery trees.
      0568e817
  32. Sep 11, 2019
    • Felix Lange's avatar
      all: make unit tests work with Go 1.13 (#20053) · 39b0b1a1
      Felix Lange authored
      Most of these changes are related to the Go 1.13 changes to test binary
      flag handling. 
      
      * cmd/geth: make attach tests more reliable
      
      This makes the test wait for the endpoint to come up by polling
      it instead of waiting for two seconds.
      
      * tests: fix test binary flags for Go 1.13
      
      Calling flag.Parse during package initialization is prohibited
      as of Go 1.13 and causes test failures. Call it in TestMain instead.
      
      * crypto/ecies: remove useless -dump flag in tests
      
      * p2p/simulations: fix test binary flags for Go 1.13
      
      Calling flag.Parse during package initialization is prohibited
      as of Go 1.13 and causes test failures. Call it in TestMain instead.
      
      * build: remove workaround for ./... vendor matching
      
      This workaround was necessary for Go 1.8. The Go 1.9 release changed
      the expansion rules to exclude vendored packages.
      
      * Makefile: use relative path for GOBIN
      
      This makes the "Run ./build/bin/..." line look nicer.
      
      * les: fix test binary flags for Go 1.13
      
      Calling flag.Parse during package initialization is prohibited
      as of Go 1.13 and causes test failures. Call it in TestMain instead.
      39b0b1a1
Loading