1. 10 Aug, 2023 1 commit
    • rjl493456442's avatar
      all: activate pbss as experimental feature (#26274) · 503f1f7a
      rjl493456442 authored
      * all: activate pbss
      
      * core/rawdb: fix compilation error
      
      * cma, core, eth, les, trie: address comments
      
      * cmd, core, eth, trie: polish code
      
      * core, cmd, eth: address comments
      
      * cmd, core, eth, les, light, tests: address comment
      
      * cmd/utils: shorten log message
      
      * trie/triedb/pathdb: limit node buffer size to 1gb
      
      * cmd/utils: fix opening non-existing db
      
      * cmd/utils: rename flag name
      
      * cmd, core: group chain history flags and fix tests
      
      * core, eth, trie: fix memory leak in snapshot generation
      
      * cmd, eth, internal: deprecate flags
      
      * all: enable state tests for pathdb, fixes
      
      * cmd, core: polish code
      
      * trie/triedb/pathdb: limit the node buffer size to 256mb
      
      ---------
      Co-authored-by: 's avatarMartin Holst Swende <martin@swende.se>
      Co-authored-by: 's avatarPéter Szilágyi <peterke@gmail.com>
      503f1f7a
  2. 06 Jul, 2023 1 commit
  3. 16 Jun, 2023 1 commit
  4. 06 Jun, 2023 1 commit
  5. 11 May, 2023 1 commit
  6. 02 Mar, 2023 1 commit
  7. 20 Jan, 2023 1 commit
    • rjl493456442's avatar
      miner, cmd, eth: require explicit etherbase address (#26413) · 2b44ef5f
      rjl493456442 authored
      This change introduces a breaking change to miner.etherbase is configured.
      
      Previously, users did not need to explicitly set the  etherbase address via flag, since 'first' local account was used as etherbase automatically. This change removes the  "default first account" feature.
      
      In Proof-of-stake world, the fee recipient address is provided by CL, and not configured in Geth any more - meaning that miner.etherbase is mostly for legacy networks(pow, clique networks etc).
      2b44ef5f
  8. 28 Nov, 2022 1 commit
    • rjl493456442's avatar
      core, eth, les, tests, trie: abstract node scheme (#25532) · 743e4049
      rjl493456442 authored
      This PR introduces a node scheme abstraction. The interface is only implemented by `hashScheme` at the moment, but will be extended by `pathScheme` very soon.
      
      Apart from that, a few changes are also included which is worth mentioning:
      
      -  port the changes in the stacktrie, tracking the path prefix of nodes during commit
      -  use ethdb.Database for constructing trie.Database. This is not necessary right now, but it is required for path-based used to open reverse diff freezer
      743e4049
  9. 24 Oct, 2022 1 commit
  10. 30 Aug, 2022 1 commit
  11. 25 Jul, 2022 1 commit
  12. 24 Jan, 2022 1 commit
    • rjl493456442's avatar
      eth, miner: use miner for post-merge block production (#23256) · 78636ee5
      rjl493456442 authored
      * eth, miner: remove duplicated code
      
      * eth/catalyst: remove unneeded code
      
      * miner: keep update pending state even the Merge is happened
      
      * eth, miner: rebase
      
      * miner: fix tests
      
      * eth, miner: address comments from marius
      
      * miner: use empty zero randomness for pending blocks after the merge
      
      * eth/catalyst: gofmt
      
      * miner: add warning log for state recovery
      
      * miner: ignore uncles for post-merge blocks
      Co-authored-by: 's avatarPéter Szilágyi <peterke@gmail.com>
      78636ee5
  13. 21 Jan, 2022 1 commit
  14. 26 Nov, 2021 1 commit
    • Marius van der Wijden's avatar
      all: core rework for the merge transition (#23761) · 3038e480
      Marius van der Wijden authored
      * all: work for eth1/2 transtition
      
      * consensus/beacon, eth: change beacon difficulty to 0
      
      * eth: updates
      
      * all: add terminalBlockDifficulty config, fix rebasing issues
      
      * eth: implemented merge interop spec
      
      * internal/ethapi: update to v1.0.0.alpha.2
      
                                                                       This commit updates the code to the new spec, moving payloadId into
                                                                       it's own object. It also fixes an issue with finalizing an empty blockhash.
                                                                       It also properly sets the basefee
      
      * all: sync polishes, other fixes + refactors
      
      * core, eth: correct semantics for LeavePoW, EnterPoS
      
      * core: fixed rebasing artifacts
      
      * core: light: performance improvements
      
      * core: use keyed field (f)
      
      * core: eth: fix compilation issues + tests
      
      * eth/catalyst: dbetter error codes
      
      * all: move Merger to consensus/, remove reliance on it in bc
      
      * all: renamed EnterPoS and LeavePoW to ReachTDD and FinalizePoS
      
      * core: make mergelogs a function
      
      * core: use InsertChain instead of InsertBlock
      
      * les: drop merger from lightchain object
      
      * consensus: add merger
      
      * core: recoverAncestors in catalyst mode
      
      * core: fix nitpick
      
      * all: removed merger from beacon, use TTD, nitpicks
      
      * consensus: eth: add docstring, removed unnecessary code duplication
      
      * consensus/beacon: better comment
      
      * all: easy to fix nitpicks by karalabe
      
      * consensus/beacon: verify known headers to be sure
      
      * core: comments
      
      * core: eth: don't drop peers who advertise blocks, nitpicks
      
      * core: never add beacon blocks to the future queue
      
      * core: fixed nitpicks
      
      * consensus/beacon: simplify IsTTDReached check
      
      * consensus/beacon: correct IsTTDReached check
      Co-authored-by: 's avatarrjl493456442 <garyrong0905@gmail.com>
      Co-authored-by: 's avatarPéter Szilágyi <peterke@gmail.com>
      3038e480
  15. 16 Nov, 2021 1 commit
  16. 02 Feb, 2021 1 commit
  17. 20 Oct, 2020 1 commit
  18. 14 Oct, 2020 1 commit
  19. 13 Oct, 2020 1 commit
    • 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
  20. 11 Sep, 2020 1 commit
  21. 10 Sep, 2020 1 commit