Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream merge v1.14.12 #432

Open
wants to merge 102 commits into
base: optimism
Choose a base branch
from

Commits on Nov 19, 2024

  1. Configuration menu
    Copy the full SHA
    75d1d8a View commit details
    Browse the repository at this point in the history
  2. core/rawdb: freezer index repair (#29792)

    This pull request removes the `fsync` of index files in freezer.ModifyAncients function for 
    performance gain.
    
    Originally, fsync is added after each freezer write operation to ensure
    the written data is truly transferred into disk. Unfortunately, it turns 
    out `fsync` can be relatively slow, especially on
    macOS (see ethereum/go-ethereum#28754 for more
    information). 
    
    In this pull request, fsync for index file is removed as it turns out
    index file can be recovered even after a unclean shutdown. But fsync for data file is still kept, as
    we have no meaningful way to validate the data correctness after unclean shutdown.
    
    ---
    
    **But why do we need the `fsync` in the first place?** 
    
    As it's necessary for freezer to survive/recover after the machine crash
    (e.g. power failure).
    In linux, whenever the file write is performed, the file metadata update
    and data update are
    not necessarily performed at the same time. Typically, the metadata will
    be flushed/journalled
    ahead of the file data. Therefore, we make the pessimistic assumption
    that the file is first
    extended with invalid "garbage" data (normally zero bytes) and that
    afterwards the correct
    data replaces the garbage. 
    
    We have observed that the index file of the freezer often contain
    garbage entry with zero value
    (filenumber = 0, offset = 0) after a machine power failure. It proves
    that the index file is extended
    without the data being flushed. And this corruption can destroy the
    whole freezer data eventually.
    
    Performing fsync after each write operation can reduce the time window
    for data to be transferred
    to the disk and ensure the correctness of the data in the disk to the
    greatest extent.
    
    ---
    
    **How can we maintain this guarantee without relying on fsync?**
    
    Because the items in the index file are strictly in order, we can
    leverage this characteristic to
    detect the corruption and truncate them when freezer is opened.
    Specifically these validation
    rules are performed for each index file:
    
    For two consecutive index items:
    
    - If their file numbers are the same, then the offset of the latter one
    MUST not be less than that of the former.
    - If the file number of the latter one is equal to that of the former
    plus one, then the offset of the latter one MUST not be 0.
    - If their file numbers are not equal, and the latter's file number is
    not equal to the former plus 1, the latter one is valid
    
    And also, for the first non-head item, it must refer to the earliest
    data file, or the next file if the
    earliest file is not sufficient to place the first item(very special
    case, only theoretical possible
    in tests)
    
    With these validation rules, we can detect the invalid item in index
    file with greatest possibility.
    
    --- 
    
    But unfortunately, these scenarios are not covered and could still lead
    to a freezer corruption if it occurs:
    
    **All items in index file are in zero value**
    
    It's impossible to distinguish if they are truly zero (e.g. all the data
    entries maintained in freezer
    are zero size) or just the garbage left by OS. In this case, these index
    items will be kept by truncating
    the entire data file, namely the freezer is corrupted.
    
    However, we can consider that the probability of this situation
    occurring is quite low, and even
    if it occurs, the freezer can be considered to be close to an empty
    state. Rerun the state sync
    should be acceptable.
    
    **Index file is integral while relative data file is corrupted**
    
    It might be possible the data file is corrupted whose file size is
    extended correctly with garbage
    filled (e.g. zero bytes). In this case, it's impossible to detect the
    corruption by index validation.
    
    We can either choose to `fsync` the data file, or blindly believe that
    if index file is integral then
    the data file could be integral with very high chance. In this pull
    request, the first option is taken.
    rjl493456442 authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    ee4daa1 View commit details
    Browse the repository at this point in the history
  3. internal/web3ext: rm unused modules (#30532)

    Remove console extensions for already deleted API namespaces (les, vflux and ethash).
    s1na authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    153e570 View commit details
    Browse the repository at this point in the history
  4. core/vm, cmd/evm: implement eof validation (#30418)

    The bulk of this PR is authored by @lightclient , in the original
    EOF-work. More recently, the code has been picked up and reworked for the new EOF
    specification, by @MariusVanDerWijden , in ethereum/go-ethereum#29518, and also @shemnon has contributed with fixes.
    
    This PR is an attempt to start eating the elephant one small bite at a
    time, by selecting only the eof-validation as a standalone piece which
    can be merged without interfering too much in the core stuff.
    
    In this PR: 
    
    - [x] Validation of eof containers, lifted from #29518, along with
    test-vectors from consensus-tests and fuzzing, to ensure that the move
    did not lose any functionality.
    - [x] Definition of eof opcodes, which is a prerequisite for validation
    - [x] Addition of `undefined` to a jumptable entry item. I'm not
    super-happy with this, but for the moment it seems the least invasive
    way to do it. A better way might be to go back and allowing nil-items or
    nil execute-functions to denote "undefined".
    - [x] benchmarks of eof validation speed 
    
    
    ---------
    
    Co-authored-by: lightclient <[email protected]>
    Co-authored-by: Marius van der Wijden <[email protected]>
    Co-authored-by: Danno Ferrin <[email protected]>
    4 people committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    f9bed32 View commit details
    Browse the repository at this point in the history
  5. beacon/light: optimize lock usage in HeadTracker (#30485)

    minimizes the time when the lock is held
    zhiqiangxu authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    3108c37 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    912b3b4 View commit details
    Browse the repository at this point in the history
  7. log: remove unused parameter (#30432)

    asamuj authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    677bc2a View commit details
    Browse the repository at this point in the history
  8. all: implement flat deposit requests encoding (#30425)

    This implements recent changes to EIP-7685, EIP-6110, and
    execution-apis.
    
    ---------
    
    Co-authored-by: lightclient <[email protected]>
    Co-authored-by: Shude Li <[email protected]>
    3 people authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    c93656f View commit details
    Browse the repository at this point in the history
  9. eth/tracers: do system contract processing prior to parallel-tracing …

    …(#30520)
    
    This fixes `debug_traceBlock` methods for JS tracers in that it correctly
    applies the beacon block root processing to the state.
    easyfold authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    8f3ae2a View commit details
    Browse the repository at this point in the history
  10. eth/catalyst, core/txpool/blobpool: make tests output less logs (#30563)

    A couple of tests set the debug level to `TRACE` on stdout,
    and all subsequent tests in the same package are also affected
    by that, resulting in outputs of tens of megabytes. 
    
    This PR removes such calls from two packages where it was prevalent.
    This makes getting a summary of failing tests simpler, and possibly
    reduces some strain from the CI pipeline.
    holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    0205fb9 View commit details
    Browse the repository at this point in the history
  11. eth/protocols/eth: remove Requests in block body (#30562)

    Block no longer has Requests. This PR just removes some code that wasn't removed in #30425.
    islishude authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    f1ec974 View commit details
    Browse the repository at this point in the history
  12. core/tracing: add GetTransientState method to StateDB interface (#30531)

    Allows live custom tracers to access contract transient storage through the StateDB interface.
    kchojn authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    e6c1fb3 View commit details
    Browse the repository at this point in the history
  13. all: implement EIP-7002 & EIP-7251 (#30571)

    This is a redo of #29052 based on newer specs. Here we implement EIPs
    scheduled for the Prague fork:
    
    - EIP-7002: Execution layer triggerable withdrawals
    - EIP-7251: Increase the MAX_EFFECTIVE_BALANCE
    
    Co-authored-by: lightclient <[email protected]>
    2 people authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    bee38eb View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    15b0152 View commit details
    Browse the repository at this point in the history
  15. cmd/evm: fixup issues with requests in t8n (#30584)

    This fixes a few issues missed in #29052:
    
    * `requests` must be hex encoded, so added a helper to marshal.
    * The statedb was committed too early and so the result of the system
    calls was lost.
    * For devnet-4 we need to pull off the type byte prefix from the request
    data.
    lightclient authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    54a4b1d View commit details
    Browse the repository at this point in the history
  16. core: enable EIP-2935 in chain maker (#30575)

    fjl authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    912a137 View commit details
    Browse the repository at this point in the history
  17. trie: concurrent commit (#30545)

    This change makes the trie commit operation concurrent, if the number of changes exceed 100. 
    
    Co-authored-by: stevemilk <[email protected]>
    Co-authored-by: Gary Rong <[email protected]>
    3 people committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    118ed44 View commit details
    Browse the repository at this point in the history
  18. build: update to golangci-lint 1.61.0 (#30587)

    Changelog: https://golangci-lint.run/product/changelog/#1610 
    
    Removes `exportloopref` (no longer needed), replaces it with
    `copyloopvar` which is basically the opposite.
    
    Also adds: 
    - `durationcheck`
    - `gocheckcompilerdirectives`
    - `reassign`
    - `mirror`
    - `tenv`
    
    ---------
    
    Co-authored-by: Marius van der Wijden <[email protected]>
    holiman and MariusVanDerWijden committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    7a625d3 View commit details
    Browse the repository at this point in the history
  19. beacon/engine: strip type byte in requests (#30576)

    This change brings geth into compliance with the current engine API
    specification for the Prague fork. I have moved the assignment of
    ExecutionPayloadEnvelope.Requests into BlockToExecutableData to ensure
    there is a single place where the type is removed.
    
    While doing so, I noticed that handling of requests in the miner was not
    quite correct for the empty payload. It would return `nil` requests for
    the empty payload even for blocks after the Prague fork. To fix this, I
    have added the emptyRequests field in miner.Payload.
    fjl authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    b755cec View commit details
    Browse the repository at this point in the history
  20. internal/ethapi: refactor TxArgs.setCancunFeeDefaults (#30541)

    calculating a reasonable tx blob fee cap (`max_blob_fee_per_gas *
    total_blob_gas`) only depends on the excess blob gas of the parent
    header. The parent header is assumed to be correct, so the method should
    not be able to fail and return an error.
    jwasinger authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    086a52d View commit details
    Browse the repository at this point in the history
  21. crypto: use decred secp256k1 directly (#30595)

    Use `github.com/decred/dcrd/dcrec/secp256k1/v4` directly rather than
    `github.com/btcsuite/btcd/btcec/v2` which is just a wrapper around the
    underlying decred library. Inspired by
    cosmos/cosmos-sdk#15018
    
    `github.com/btcsuite/btcd/btcec/v2` has a very annoying breaking change
    when upgrading from `v2.3.3` to `v2.3.4`. The easiest way to workaround
    this is to just remove the wrapper.
    
    Would be very nice if you could backport this to the release branches.
    
    References:
    - btcsuite/btcd#2221
    - cometbft/cometbft#4294
    - cometbft/cometbft#3728
    - zeta-chain/node#2934
    gartnera authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    ddbf548 View commit details
    Browse the repository at this point in the history
  22. beacon/engine: omit null witness field from payload envelope (#30597)

    ## Description
    
    Omit null `witness` field from payload envelope.
    
    ## Motivation
    
    Currently, JSON encoded payload types always include `"witness": null`,
    which, I believe, is not intentional.
    rkrasiuk authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    8e27edb View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    4918c7c View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    bcb2c15 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    9c054f8 View commit details
    Browse the repository at this point in the history
  26. core: reduce peak memory usage during reorg (#30600)

    ~~Opening this as a draft to have a discussion.~~ Pressed the wrong
    button
    I had [a previous PR
    ](ethereum/go-ethereum#24616 long time ago
    which reduced the peak memory used during reorgs by not accumulating all
    transactions and logs.
    This PR reduces the peak memory further by not storing the blocks in
    memory.
    However this means we need to pull the blocks back up from storage
    multiple times during the reorg.
    I collected the following numbers on peak memory usage: 
    
    // Master: BenchmarkReorg-8 10000 899591 ns/op 820154 B/op 1440
    allocs/op 1549443072 bytes of heap used
    // WithoutOldChain: BenchmarkReorg-8 10000 1147281 ns/op 943163 B/op
    1564 allocs/op 1163870208 bytes of heap used
    // WithoutNewChain: BenchmarkReorg-8 10000 1018922 ns/op 943580 B/op
    1564 allocs/op 1171890176 bytes of heap used
    
    Each block contains a transaction with ~50k bytes and we're doing a 10k
    block reorg, so the chain should be ~500MB in size
    
    ---------
    
    Co-authored-by: Péter Szilágyi <[email protected]>
    2 people authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    767a292 View commit details
    Browse the repository at this point in the history
  27. eth/tracers: various fixes (#30540)

    Breaking changes:
    
    - The ChainConfig was exposed to tracers via VMContext passed in
    `OnTxStart`. This is unnecessary specially looking through the lens of
    live tracers as chain config remains the same throughout the lifetime of
    the program. It was there so that native API-invoked tracers could
    access it. So instead we moved it to the constructor of API tracers.
    
    Non-breaking:
    
    - Change the default config of the tracers to be `{}` instead of nil.
    This way an extra nil check can be avoided.
    
    Refactoring:
    
    - Rename `supply` struct to `supplyTracer`.
    - Un-export some hook definitions.
    s1na authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    e648904 View commit details
    Browse the repository at this point in the history
  28. miner: send full request when resolving full payload (#30615)

    Fixes an issue missed in #30576 where we send empty requests for a full
    payload being resolved, causing hash mismatch later on when we get the
    payload back via `NewPayload`.
    lightclient authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    5d41ac5 View commit details
    Browse the repository at this point in the history
  29. beacon/engine,eth/catalyst: hex marshal requests in engine api (#30603)

    Co-authored-by: Felix Lange <[email protected]>
    2 people authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    1660698 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    cfd1489 View commit details
    Browse the repository at this point in the history
  31. swarm: nuke this leftover (#30622)

    Swarm moved out more than 5 years ago, time to let it go.
    karalabe authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    44c44c7 View commit details
    Browse the repository at this point in the history
  32. gitignore: get rid of some relics (#30623)

    Clean out some ancient stuff from git ignore.
    karalabe authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    ac3ebe2 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    56d14b2 View commit details
    Browse the repository at this point in the history
  34. core, trie, triedb: minor changes from snapshot integration (#30599)

    This change ports some non-important changes from ethereum/go-ethereum#30159, including interface renaming and some trivial refactorings.
    rjl493456442 authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    6412bee View commit details
    Browse the repository at this point in the history
  35. core/state: fix runaway alloc caused by prefetcher heap escape (#30629)

    Co-authored-by: lightclient <[email protected]>
    2 people authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    d03ed72 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    7a79f2f View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    1c88e42 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    997d122 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    b7d8f47 View commit details
    Browse the repository at this point in the history
  40. build, internal, version: break ci.go/version->common dependency (#30…

    …638)
    
    This PR tries to break the ci.go to common dependency by moving the
    version number out of params.
    karalabe authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    db03e01 View commit details
    Browse the repository at this point in the history
  41. eth/tracers/js: avoid compiling js bigint when not needed (#30640)

    While looking at some mem profiles from `evm` runs, I noticed that
    `goja` compilation of the bigint library was present. The bigint library
    compilation happens in a package `init`, whenever the package
    `eth/tracers/js` is loaded. This PR changes it to load lazily when
    needed.
    
    It becomes slightly faster with this change, and slightly less alloc:y. 
    
    Non-scientific benchmark with 100 executions: 
    ```
    time for i in {1..100}; do ./evm --code 6040 run; done;
     ```
    
    current `master`:
    
    ```
    real    0m6.634s
    user    0m5.213s
    sys     0m2.277s
    ```
    Without compiling bigint
    ```
    real    0m5.802s
    user    0m4.191s
    sys     0m1.965s
    ```
    holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    26e1470 View commit details
    Browse the repository at this point in the history
  42. consensus/clique, miner: remove clique -> accounts dependency (#30642)

    Clique currently depends on the `accounts` package. This was a bit of a
    big cannon even in the past, just to pass a signer "account" to the
    Clique block producer. Either way, nowadays Geth does not support clique
    mining any more, so by removing that bit of functionality from our code,
    we can also break this dependency.
    
    Clique should ideally be further torn out, but this at least gets us one
    step closer to cleanups.
    karalabe authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    c6823c7 View commit details
    Browse the repository at this point in the history
  43. common: drop BigMin and BigMax, they pollute our dep graph (#30645)

    Way back we've added `common.math.BigMin` and `common.math.BigMax`.
    These were kind of cute helpers, but unfortunate ones, because package
    all over out codebase added dependencies to this package just to avoid
    having to write out 3 lines of code.
    
    Because of this, we've also started having package name clashes with the
    stdlib `math`, which got solves even more badly by moving some helpers
    over ***from*** the stdlib into our custom lib (e.g. MaxUint64). The
    latter ones were nuked out in a previous PR and this PR nukes out BigMin
    and BigMax, inlining them at all call sites.
    
    As we're transitioning to uint256, if need be, we can add a min and max
    to that.
    karalabe authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    e5fb824 View commit details
    Browse the repository at this point in the history
  44. core/state: move state log mechanism to a separate layer (#30569)

    This PR moves the logging/tracing-facilities out of `*state.StateDB`,
    in to a wrapping struct which implements `vm.StateDB` instead.
    
    In most places, it is a pretty straight-forward change: 
    - First, hoisting the invocations from state objects up to the statedb. 
    - Then making the mutation-methods simply return the previous value, so
    that the external logging layer could log everything.
    
    Some internal code uses the direct object-accessors to mutate the state,
    particularly in testing and in setting up state overrides, which means
    that these changes are unobservable for the hooked layer. Thus, configuring
    the overrides are not necessarily part of the API we want to publish.
    
    The trickiest part about the layering is that when the selfdestructs are
    finally deleted during `Finalise`, there's the possibility that someone
    sent some ether to it, which is burnt at that point, and thus needs to
    be logged. The hooked layer reaches into the inner layer to figure out
    these events.
    
    In package `vm`, the conversion from `state.StateDB + hooks` into a
    hooked `vm.StateDB` is performed where needed.
    
    ---------
    
    Co-authored-by: Gary Rong <[email protected]>
    holiman and rjl493456442 committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    d7434fa View commit details
    Browse the repository at this point in the history
  45. crypto, tests/fuzzers: add gnark bn254 precompile methods for fuzzing…

    … (#30585)
    
    Makes the gnark precompile methods more amenable to fuzzing
    kevaundray authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    cba2e77 View commit details
    Browse the repository at this point in the history
  46. all: remove TerminalTotalDifficultyPassed (#30609)

    rebased ethereum/go-ethereum#29766 . The
    downstream branch appears to have been deleted and I don't have perms to
    push to that fork.
    
    `TerminalTotalDifficultyPassed` is removed. `TerminalTotalDifficulty`
    must now be non-nil, and it is expected that networks are already
    merged: we can only import PoW/Clique chains, not produce blocks on
    them.
    
    ---------
    
    Co-authored-by: stevemilk <[email protected]>
    2 people authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    53e3f44 View commit details
    Browse the repository at this point in the history
  47. eth/tracers/internal/tracertest: add missing Random to call context (…

    …#30652)
    
    Fixes a configuration issue in a test-helper, so that we can do call tracing-tests post-merge
    islishude authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    e9e1cb0 View commit details
    Browse the repository at this point in the history
  48. docs: update security policy (#30606)

    previous key expired 2023-07-27, the new one expires 2026-02-22:
    
    pub   rsa4096 2016-11-11 [SC] [expires: 2026-02-22]
          AE96ED969E479B0084F3E17FE88D3334FA5F6A0A
    uid Ethereum Foundation Security Team <[email protected]>
    uid Ethereum Foundation Bug Bounty <[email protected]>
    sub   rsa4096 2016-11-11 [E] [expires: 2026-02-22]
    fredriksvantes authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    99ec8e4 View commit details
    Browse the repository at this point in the history
  49. core: fix tracing of system calls (#30666)

    This change makes it so that the wrapped statedb with tracing-hooks is passed to the system call processing
    
    Fixes #30658
    s1na authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    0d1d689 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    6a3f575 View commit details
    Browse the repository at this point in the history
  51. beacon/blsync: add holesky config and update checkpoints (#30671)

    This PR adds the beacon chain config for the holesky testnet. It also
    updates beacon checkpoints for Mainnet and Sepolia.
    zsfelfoldi authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    a7c01a2 View commit details
    Browse the repository at this point in the history
  52. ethdb: add DeleteRange feature (#30668)

    This PR adds `DeleteRange` to `ethdb.KeyValueWriter`. While range
    deletion using an iterator can be really slow, `DeleteRange` is natively
    supported by pebble and apparently runs in O(1) time (typically 20-30ms
    in my tests for removing hundreds of millions of keys and gigabytes of
    data). For leveldb and memorydb an iterator based fallback is
    implemented. Note that since the iterator method can be slow and a
    database function should not unexpectedly block for a very long time,
    the number of deleted keys is limited at 10000 which should ensure that
    it does not block for more than a second. ErrTooManyKeys is returned if
    the range has only been partially deleted. In this case the caller can
    repeat the call until it finally succeeds.
    zsfelfoldi authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    a7e2b8b View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    571628a View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    856f807 View commit details
    Browse the repository at this point in the history
  55. eth/tracers: add disableCode/Storage options for prestateTracer (#30648)

    When using the prestateTracer, in some cases users are only concerned
    with balances or nonce information, and are not interested in the lengthy
    contract code or storage data.
    
    Therefore, this PR introduces two new configuration options in the
    `prestateTracerConfig` structure:
    - `disableCode`
    - `disableStorage`
    
    These options allow users to control whether the tracer returns contract
    code and storage data during execution tracing. By setting these
    options, users can more flexibly customize their needs and focus on
    obtaining information that is more critical and relevant to their
    specific use cases.
    
    These options work with the default mode as well as `diffMode: true`.
    
    ---------
    
    Signed-off-by: jsvisa <[email protected]>
    Co-authored-by: Sina M <[email protected]>
    2 people authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    f3cbacf View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    b7767ef View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    3017efe View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    8de45c1 View commit details
    Browse the repository at this point in the history
  59. beacon/light: remove unused CommitteeChain.signerThreshold (#30484)

    This field is a duplicate of UpdateScore.SignerCount and never referenced.
    zhiqiangxu authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    f124ce3 View commit details
    Browse the repository at this point in the history
  60. core/vm: speed up push and interpreter loop (#30662)

    Looking at the cpu profile of a burntpix benchmark, I noticed that a lot
    of time was spent in gas-used, in the interpreter loop. It's an actual
    call (not inlined), which explicitly wants to be ignored by tracing
    ("tracing.GasChangeIgnored"), so it can be safely and simply inlined.
    
    The other change is in `pushX`. These also do a call to
    `common.RightPadBytes`. I replaced that by a doing a corresponding `Lsh`
    on the `u256` if needed. Note: it's needed only to make the stack output
    look right, for fuzzers. It technically doesn't matter what we put
    there: if code ends on a pushdata immediate, nothing will consume the
    stack element. We could just as well just ignore it, if we didn't care
    about fuzzers (which I do).
    
    Seems quite a lot faster on burntpix, according to my runs. 
    
    This PR:
    ```
    EVM gas used:    5642735088
    execution time:  34.84609475s
    allocations:     915683
    allocated bytes: 175334088
    ```
    ```
    EVM gas used:    5642735088
    execution time:  36.671958278s
    allocations:     915701
    allocated bytes: 175340528
    ```
    
    Master
    ```
    EVM gas used:    5642735088
    execution time:  49.349209526s
    allocations:     915684
    allocated bytes: 175333368
    ```
    ```
    EVM gas used:    5642735088
    execution time:  46.581006598s
    allocations:     915681
    allocated bytes: 175330728
    ```
    
    ---------
    
    Co-authored-by: Sina M <[email protected]>
    Co-authored-by: Felix Lange <[email protected]>
    3 people committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    b1defd4 View commit details
    Browse the repository at this point in the history
  61. core: add code to witness when state object is accessed (#30698)

    I think the core code should generally be agnostic about the witness and
    the statedb layer should determine what elements need to be included in
    the witness. Because code is accessed via `GetCode`, and
    `GetCodeLength`, the statedb will always know when it needs to add that
    code into the witness.
    
    The edge case is block hashes, so we continue to add them manually in
    the implementation of `BLOCKHASH`.
    
    It probably makes sense to refactor statedb so we have a wrapped
    implementation that accumulates the witness, but this is a simpler
    change that makes #30078 less aggressive.
    lightclient authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    0d6d79f View commit details
    Browse the repository at this point in the history
  62. cmd/utils, eth/ethconfig: remove some ancient leftover flag (#30705)

    This is a flag leftover from the swarm era. No need to deprecate it,
    it's been useless/dead forever now.
    karalabe authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    83def9b View commit details
    Browse the repository at this point in the history
  63. internal/flags: remove Merge, it's identical to slices.Concat (#30706)

    This is a noop change to not have custom code for stdlib functionality.
    karalabe authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    9f58dc0 View commit details
    Browse the repository at this point in the history
  64. internal/flags: remove low-use type TextMarshalerFlag (#30707)

    Currently we have a custom TextMarshalerFlag. It's a nice idea, allowing
    anything implementing text marshaller to be used as a flag. That said,
    we only ever used it in one place because it's not that obvious how to
    use and it needs some boilerplate on the type itself too, apart of the
    heavy boilerplate got the custom flag.
    
    All in all there's no *need* to drop this feature just now, but while
    porting the cmds over to cli @V3, all other custom flags worker
    perfectly, whereas this one started crashing deep inside the cli
    package. The flag handling in v3 got rebuild on generics and there are a
    number of new methods needed; and my guess is that maybe one of them
    doesn't work like this flag currently is designed too.
    
    We could definitely try and redesign this flag for cli v3... but all
    that effort and boilerplate just to use it for 1 flag in 1 location,
    seems not worth it. So for now I'm suggesting removing it and maybe
    reconsider a similar feature in cli v3 with however it will work.
    karalabe authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    7502503 View commit details
    Browse the repository at this point in the history
  65. all: remove personal RPC namespace (#30704)

    This PR is a first step towards removing account management from geth,
    and contains a lot of the user-facing changes.
    
    With this PR, the `personal` namespace disappears. **Note**: `personal`
    namespace has been deprecated for quite some time (since
    ethereum/go-ethereum#26390 1 year and 8 months
    ago), and users who have wanted to use it has been forced to used the
    flag `--rpc.enabledeprecatedpersonal`. So I think it's fairly
    non-controversial to drop it at this point.
    
    Specifically, this means: 
    
    - Account/wallet listing
      -`personal.getListAccounts`  
      -`personal.listAccounts`     
      -`personal.getListWallets`   
      -`personal.listWallets`      
    - Lock/unlock
      -`personal.lockAccount`      
      -`personal.openWallet`       
      -`personal.unlockAccount`
    - Sign ops
      -`personal.sign`             
      -`personal.sendTransaction`  
      -`personal.signTransaction`  
    - Imports / inits
      -`personal.deriveAccount`    
      -`personal.importRawKey`     
      -`personal.initializeWallet` 
      -`personal.newAccount`       
      -`personal.unpair` 
    - Other: 
      -`personal.ecRecover`        
    
    
    The underlying keystores and account managent code is still in place,
    which means that `geth --dev` still works as expected, so that e.g. the
    example below still works:
    
    ```
    > eth.sendTransaction({data:"0x6060", value: 1, from:eth.accounts[0]})
    ```	
    
    Also, `ethkey` and `clef` are untouched. 
    
    With the removal of `personal`, as far as I know we have no more API
    methods which contain credentials, and if we want to implement
    logging-capabilities of RPC ingress payload, it would be possible after
    this.
    
    ---------
    
    Co-authored-by: Felix Lange <[email protected]>
    holiman and fjl committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    21b3400 View commit details
    Browse the repository at this point in the history
  66. eth/tracers: flatCallTracer error compatible with parity (#30497)

    Compatible error message in the flat call tracer with parity-style endpoints.
    
    Signed-off-by: jsvisa <[email protected]>
    jsvisa authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    b92e17f View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    1fe607b View commit details
    Browse the repository at this point in the history
  68. tests/fuzzers/bls12381: more verbose fuzzing-output (#30724)

    This PR updates the fuzzing verbosity a bit, in case of mismatches
    holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    3adb076 View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    5de5f33 View commit details
    Browse the repository at this point in the history
  70. eth/catalyst: make engine api test time independent (#30713)

    This test depends on a 100ms timer, which fails quite often, messing up
    our pipelines. Hook directly into the internal version of getPayload
    which has the capacity to wait for the full payload before returning.
    This might not be absolutely correct from a test perspective, but it
    beats failing ci. The alternative would be to expose the full build hook
    into the outside, but it might be a bit overkill for this scenario.
    karalabe authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    9bb5194 View commit details
    Browse the repository at this point in the history
  71. core/vm/runtime: invoke tx-end hook (#30711)

    When using the `core/vm/runtime` helpers to execute code, callbacks for the tx end were not invoked. This change fixes it by invoking them.
    holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    b45ba07 View commit details
    Browse the repository at this point in the history
  72. core, trie: verkle state processor tests (#30672)

    Tests that are crucial to for verifying the verkle testnet functions properly.
    
    ---------
    
    Signed-off-by: Guillaume Ballet <[email protected]>
    Co-authored-by: Ignacio Hagopian <[email protected]>
    Co-authored-by: Gary Rong <[email protected]>
    Co-authored-by: Martin HS <[email protected]>
    4 people committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    ed01e6f View commit details
    Browse the repository at this point in the history
  73. all: fix issues with benchmarks (#30667)

    This PR fixes some issues with benchmarks
    
    - [x] Removes log output from a log-test
    - [x] Avoids a `nil`-defer in `triedb/pathdb`
    - [x] Fixes some crashes re tracers
    - [x] Refactors a very resource-expensive benchmark for blobpol.
    **NOTE**: this rewrite touches live production code (a little bit), as
    it makes the validator-function used by the blobpool configurable.
    - [x] Switch some benches over to use pebble over leveldb
    - [x] reduce mem overhead in the setup-phase of some tests
    - [x] Marks some tests with a long setup-phase to be skipped if `-short`
    is specified (where long is on the order of tens of seconds). Ideally,
    in my opinion, one should be able to run with `-benchtime 10ms -short`
    and sanity-check all tests very quickly.
    - [x]  Drops some metrics-bechmark which times the speed of `copy`.
    
    ---------
    
    Co-authored-by: Sina Mahmoodi <[email protected]>
    holiman and s1na committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    6578b9a View commit details
    Browse the repository at this point in the history
  74. eth/tracers: fill the creationMethod in flatCall (#30539)

    `flatCallTracer` will now specify the type of a create in the action
    via the `creationMethod` field.
    
    ---------
    
    Signed-off-by: jsvisa <[email protected]>
    Co-authored-by: Sina Mahmoodi <[email protected]>
    2 people authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    8a3a697 View commit details
    Browse the repository at this point in the history
  75. core/state: small fix in hooked statedb (#30732)

    fixes a very tiny bug
    holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    b04d6c4 View commit details
    Browse the repository at this point in the history
  76. cmd/utils: change blssync.JWTSecretFlag to DirectoryFlag (#30729)

    closes ethereum/go-ethereum#30304
    
    We already use `DirectoryFlag` for `authrpc.jwtsecret` which expands the
    tilde, so this should work out of the box
    MariusVanDerWijden authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    d01591c View commit details
    Browse the repository at this point in the history
  77. build(deps): bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1 (#…

    …30728)
    
    Bumps [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt) from 4.5.0 to 4.5.1.
    
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    31bc9e6 View commit details
    Browse the repository at this point in the history
  78. ethclient: add RevertErrorData function and example (#30669)

    Here I'm adding a new helper function that extracts the revert reason of
    a contract call. Unfortunately, this aspect of the API is underspecified.
    See these spec issues for more detail:
    
    - ethereum/execution-apis#232
    - ethereum/execution-apis#463
    - ethereum/execution-apis#523
    
    The function added here only works with Geth-like servers that return
    error code `3`. We will not be able to support all possible servers.
    However, if there is a specific server implementation that makes it
    possible to extract the same info, we could add it in the same function
    as well.
    
    ---------
    
    Co-authored-by: Marius van der Wijden <[email protected]>
    2 people authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    13413be View commit details
    Browse the repository at this point in the history
  79. ethclient/gethclient: testcase for createAccessList, make tabledriven…

    … (#30194)
    
    Adds testcase for createAccessList when user requested gasPrice is less than baseFee, also makes the tests tabledriven
    ---------
    
    Co-authored-by: Martin Holst Swende <[email protected]>
    SangIlMo and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    a01688e View commit details
    Browse the repository at this point in the history
  80. internal/ethapi: Set basefee for AccessList based on given block, n…

    …ot chain tip (#30538)
    jwasinger authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    25d0740 View commit details
    Browse the repository at this point in the history
  81. accounts/usbwallet: support dynamic tx (#30180)

    Adds support non-legacy transaction-signing using ledger
    
    ---------
    
    Co-authored-by: Martin Holst Swende <[email protected]>
    shrimalmadhur and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    f476702 View commit details
    Browse the repository at this point in the history
  82. signer/core: extended support for EIP-712 array types (#30620)

    This change updates the EIP-712 implementation to resolve [#30619](ethereum/go-ethereum#30619).
    
    The test cases have been repurposed from the ethers.js [repository](https://github.com/ethers-io/ethers.js/blob/main/testcases/typed-data.json.gz), but have been updated to remove tests that don't have a valid domain separator; EIP-712 messages without a domain separator are not supported by geth.
    
    ---------
    
    Co-authored-by: Martin Holst Swende <[email protected]>
    naveen-imtb and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    b362c37 View commit details
    Browse the repository at this point in the history
  83. cmd/evm: benchmarking via statetest command + filter by name, index…

    … and fork (#30442)
    
    When `evm statetest --bench` is specified, benchmark the execution
    similarly to `evm run`.
    
    Also adds the ability to filter tests by name, index and fork. 
    
    ---------
    
    Co-authored-by: Martin Holst Swende <[email protected]>
    jwasinger and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    f57f215 View commit details
    Browse the repository at this point in the history
  84. beacon/blsync: remove cli dependencies (#30720)

    This PR moves chain config related code (config file processing, fork
    logic, network defaults) from `beacon/types` and `beacon/blsync` into
    `beacon/params` while the command line flag logic of the chain config is
    moved into `cmd/utils`, thereby removing the cli dependencies from
    package `beacon` and its sub-packages.
    zsfelfoldi authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    766cda8 View commit details
    Browse the repository at this point in the history
  85. core/state: invoke OnCodeChange-hook on selfdestruct (#30686)

    This change invokes the OnCodeChange hook when selfdestruct operation is performed, and a contract is removed. This is an event which can be consumed by tracers.
    kchojn authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    d71da30 View commit details
    Browse the repository at this point in the history
  86. Configuration menu
    Copy the full SHA
    0e06e89 View commit details
    Browse the repository at this point in the history
  87. Configuration menu
    Copy the full SHA
    2b53182 View commit details
    Browse the repository at this point in the history
  88. Configuration menu
    Copy the full SHA
    ba882b6 View commit details
    Browse the repository at this point in the history
  89. eth/protocols/eth: add ETH68 protocol handler fuzzers (#30417)

    Adds a protocol handler fuzzer to fuzz the ETH68 protocol handlers
    MariusVanDerWijden authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    9b3cf57 View commit details
    Browse the repository at this point in the history
  90. tests: fix test panic (#30741)

    Fix panic in tests
    rjl493456442 authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    243feea View commit details
    Browse the repository at this point in the history
  91. p2p/netutil: unittests for addrutil (#30439)

    add unit tests for `p2p/addrutil`
    
    ---------
    
    Co-authored-by: Martin HS <[email protected]>
    tianyeyouyou and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    4afca7c View commit details
    Browse the repository at this point in the history
  92. docs: fix typo (#30740)

    fixes a typo on one of the postmortems
    0xwitty authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    c8f6d24 View commit details
    Browse the repository at this point in the history
  93. core/state: tests on the binary iterator (#30754)

    Fixes an error in the binary iterator, adds additional testcases
    
    ---------
    
    Co-authored-by: Gary Rong <[email protected]>
    holiman and rjl493456442 committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    62cce0c View commit details
    Browse the repository at this point in the history
  94. cmd/geth: remove unlock commandline flag (#30737)

    This is one further step towards removing account management from
    `geth`. This PR deprecates the flag `unlock`, and makes the flag moot:
    unlock via geth is no longer possible.
    holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    55b18e9 View commit details
    Browse the repository at this point in the history
  95. Configuration menu
    Copy the full SHA
    a7ef9d6 View commit details
    Browse the repository at this point in the history
  96. core: fix typos (#30767)

    AtomicInnovation321 authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    ed7bac0 View commit details
    Browse the repository at this point in the history
  97. all: remove kilic dependency from bls12381 fuzzers (#30296)

    The [kilic](https://github.com/kilic/bls12-381) bls12381 implementation
    has been archived. It shouldn't be necessary to include it as a fuzzing
    target any longer.
    
    This also adds fuzzers for G1/G2 mul that use inputs that are guaranteed
    to be valid. Previously, we just did random input fuzzing for these
    precompiles.
    jwasinger authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    9e959db View commit details
    Browse the repository at this point in the history
  98. core/txpool, eth/catalyst: clear transaction pool in Rollback (#30534)

    This adds an API method `DropTransactions` to legacy pool, blob pool and
    txpool interface. This method removes all txs currently tracked in the
    pools.
    
    It modifies the simulated beacon to use the new method in `Rollback`
    which removes previous hacky implementation that also erroneously reset
    the gas tip to 1 gwei.
    
    ---------
    
    Co-authored-by: Felix Lange <[email protected]>
    2 people authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    71b32b4 View commit details
    Browse the repository at this point in the history
  99. rpc: run tests in parallel (#30384)

    estensen authored and holiman committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    f3c19b1 View commit details
    Browse the repository at this point in the history
  100. Configuration menu
    Copy the full SHA
    293a300 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2024

  1. Configuration menu
    Copy the full SHA
    fdfd720 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2024

  1. Configuration menu
    Copy the full SHA
    7fee79c View commit details
    Browse the repository at this point in the history