1. 26 Oct, 2020 1 commit
  2. 23 Oct, 2020 6 commits
  3. 21 Oct, 2020 3 commits
  4. 20 Oct, 2020 4 commits
  5. 16 Oct, 2020 1 commit
  6. 15 Oct, 2020 2 commits
  7. 14 Oct, 2020 3 commits
  8. 13 Oct, 2020 9 commits
    • Marius van der Wijden's avatar
      accounts/keystore: fix flaky test (#21703) · 1fed2234
      Marius van der Wijden authored
      * accounts/keystore: add timeout to test to prevent failure on travis
      
      The TestWalletNotifications test sporadically fails on travis.
      This is because we shutdown the event collection before all events are received.
      Adding a small timeout (10 milliseconds) allows the collector to be scheduled
      and to consume all pending events before we shut it down.
      
      * accounts/keystore: added newlines back in
      
      * accounts/keystore: properly fix the walletNotifications test
      1fed2234
    • Martin Holst Swende's avatar
      miner: don't interrupt mining after successful sync (#21701) · 1e104891
      Martin Holst Swende authored
      * miner: exit loop when downloader Done or Failed
      
      Following the logic of the comment at the method,
      this fixes a regression introduced at 7cf56d6f
      , which would allow external parties to DoS with
      blocks, preventing mining progress.
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: remove ineff assign (lint)
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: update test re downloader events
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * Revert "miner: remove ineff assign (lint)"
      
      This reverts commit eaefcd34ab4862ebc936fb8a07578aa2744bc058.
      
      * Revert "miner: exit loop when downloader Done or Failed"
      
      This reverts commit 23abd34265aa246c38fc390bb72572ad6ae9fe3b.
      
      * miner: add test showing imprecise TestMiner
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: fix waitForMiningState precision
      
      This helper function would return an affirmation
      on the first positive match on a desired bool.
      
      This was imprecise; it return false positives
      by not waiting initially for an 'updated' value.
      
      This fix causes TestMiner_2 to fail, which is
      expected.
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: remove TestMiner_2 demonstrating broken test
      
      This test demonstrated the imprecision of the test
      helper function waitForMiningState. This function
      has been fixed with 6d365c2851, and this test test
      may now be removed.
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: fix test regarding downloader event/mining expectations
      
      See comment for logic.
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: add test describing expectations for downloader/mining events
      
      We expect that once the downloader emits a DoneEvent,
      signaling a successful sync, that subsequent StartEvents
      are not longer permitted to stop the miner.
      
      This prevents a security vulnerability where forced syncs via
      fake high blocks would stall mining operation.
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: use 'canStop' state to fix downloader event handling
      
      - Break downloader event handling into event
      separating Done and Failed events. We need to
      treat these cases differently since a DoneEvent
      should prevent the miner from being stopped on
      subsequent downloader Start events.
      
      - Use canStop state to handle the one-off
      case when a downloader first succeeds.
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: improve comment wording
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: start mining on downloader events iff not already mining
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: refactor miner update logic w/r/t downloader events
      
      This makes mining pause/start logic regarding downloader
      events more explicit. Instead of eternally handling downloader
      events after the first done event, the subscription is closed
      when downloader events are no longer actionable.
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: fix handling downloader events on subcription closed
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: (lint:gosimple) use range over chan instead of for/select
      Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
      
      * miner: refactor update loop to remove race condition
      
      The go routine handling the downloader events handling
      vars in parallel with the parent routine, causing a
      race condition.
      
      This change, though ugly, remove the condition while
      still allowing the downloader event subscription to be
      closed when the miner has no further use for it (ie DoneEvent).
      
      * miner: alternate fix for miner-flaw
      Co-authored-by: 's avatarmeows <b5c6@protonmail.com>
      1e104891
    • Giuseppe Bertone's avatar
      2a9ea6be
    • Martin Holst Swende's avatar
      eth, p2p: use truncated names (#21698) · 7a5a8229
      Martin Holst Swende authored
      * peer: return localAddr instead of name to prevent spam
      
      We currently use the name (which can be freely set by the peer) in several log messages.
      This enables malicious actors to write spam into your geth log.
      This commit returns the localAddr instead of the freely settable name.
      
      * p2p: reduce usage of peer.Name in warn messages
      
      * eth, p2p: use truncated names
      
      * Update peer.go
      Co-authored-by: 's avatarMarius van der Wijden <m.vanderwijden@live.de>
      Co-authored-by: 's avatarFelix Lange <fjl@twurst.com>
      7a5a8229
    • mr_franklin's avatar
      internal/web3ext: improve some web3 apis (#21639) · 5c6155f9
      mr_franklin authored
      * imporve some web3-ext apis
      
      * Update web3ext.go
      Co-authored-by: 's avatarFelix Lange <fjl@twurst.com>
      5c6155f9
    • Martin Holst Swende's avatar
      348c3bc4
    • mr_franklin's avatar
    • mr_franklin's avatar
    • Hanjiang Yu's avatar
      console: fix admin.sleepBlocks (#21629) · 32341f88
      Hanjiang Yu authored
      32341f88
  9. 12 Oct, 2020 2 commits
  10. 09 Oct, 2020 3 commits
  11. 08 Oct, 2020 3 commits
  12. 07 Oct, 2020 2 commits
  13. 06 Oct, 2020 1 commit