1. 16 Mar, 2023 2 commits
    • rjl493456442's avatar
      consensus: improve consensus engine definition (#26871) · 48d1bf06
      rjl493456442 authored
      Makes clear the distinction between Finalize and FinalizedAndAssemble:
      
      - In Finalize function, a series of state operations are applied according to consensus rules. The statedb is mutated and the root hash can be checked and compared afterwards.
      
      This function should be used in block processing(receive afrom network and apply it locally) but not block generation.
      
      - In FinalizeAndAssemble function, after applying state mutations, the block is also to be assembled with the latest
        state root computed, updating the header. 
      
       This function should be used in block generation only.
      48d1bf06
    • rjl493456442's avatar
      core: show db error-info in case of mismatched hash root (#26870) · bba2a1ba
      rjl493456442 authored
      When a database failure occurs, bubble it up a into statedb, and report it in suitable places, such as during a 'bad block' report.
      bba2a1ba
  2. 15 Mar, 2023 1 commit
  3. 14 Mar, 2023 4 commits
  4. 13 Mar, 2023 5 commits
  5. 10 Mar, 2023 6 commits
  6. 09 Mar, 2023 5 commits
    • Péter Szilágyi's avatar
    • Roberto Bayardo's avatar
      core, core/types: plain Message struct (#25977) · 67ac5f0a
      Roberto Bayardo authored
      Here, the core.Message interface turns into a plain struct and
      types.Message gets removed.
      
      This is a breaking change to packages core and core/types. While we do
      not promise API stability for package core, we do for core/types. An
      exception can be made for types.Message, since it doesn't have any
      purpose apart from invoking the state transition in package core.
      types.Message was also marked deprecated by the same commit it
      got added in, 4dca5d4d (November 2016).
      
      The core.Message interface was added in December 2014, in commit
      db494170, for the purpose of 'testing' state transitions. It's the
      same change that made transaction struct fields private. Before that,
      the state transition used *types.Transaction directly.
      
      Over time, multiple implementations of the interface accrued across
      different packages, since constructing a Message is required whenever
      one wants to invoke the state transition. These implementations all
      looked very similar, a struct with private fields exposing the fields
      as accessor methods.
      
      By changing Message into a struct with public fields we can remove all
      these useless interface implementations. It will also hopefully
      simplify future changes to the type with less updates to apply across
      all of go-ethereum when a field is added to Message.
      
      ---------
      Co-authored-by: 's avatarFelix Lange <fjl@twurst.com>
      67ac5f0a
    • Martin Holst Swende's avatar
      08f6a2a8
    • Felix Lange's avatar
      core/forkid: fix issue in validation test (#26544) · 5395362e
      Felix Lange authored
      This changes the test to match the comment description. Using timestampedConfig in this test case is incorrect, the comment says 'local is at Gray Glacier' and isn't aware of more forks.
      5395362e
    • xiyang's avatar
      core/vm: fix typo in comment (#26838) · 1bf11684
      xiyang authored
      fixes eip 220 ->  2200
      1bf11684
  7. 08 Mar, 2023 4 commits
  8. 07 Mar, 2023 10 commits
  9. 06 Mar, 2023 3 commits
    • turboboost55's avatar
      metrics: improve accuracy of CPU gauges (#26793) · 544e4a70
      turboboost55 authored
      This PR changes metrics collection to actually measure the time interval between collections, rather
      than assume 3 seconds. I did some ad hoc profiling, and on slower hardware (eg, my Raspberry Pi 4)
      I routinely saw intervals between 3.3 - 3.5 seconds, with some being as high as 4.5 seconds. This
      will generally cause the CPU gauge readings to be too high, and in some cases can cause impossibly
      large values for the CPU load metrics (eg. greater than 400 for a 4 core CPU).
      
      ---------
      Co-authored-by: 's avatarFelix Lange <fjl@twurst.com>
      544e4a70
    • Marius van der Wijden's avatar
      core, eth/catalyst: fix race conditions in tests (#26790) · 5bc2ef98
      Marius van der Wijden authored
      Fixes a race in TestNewPayloadOnInvalidTerminalBlock where setting the TTD raced with
      the miner. Solution: set the TTD on the blockchain config not the genesis config.
      
      Also fixes a race in CopyHeader which resulted in race reports all over the place.
      5bc2ef98
    • Felix Lange's avatar
      core/types: add EffectiveGasPrice in Receipt (#26713) · 87186148
      Felix Lange authored
      This change adds a struct field EffectiveGasPrice in types.Receipt. The field is present
      in RPC responses, but not in the Go struct, and thus can't easily be accessed via ethclient.
      Co-authored-by: 's avatarPulsarAI <dev@pulsar-systems.fi>
      87186148