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 v2.60.2 #106

Merged
merged 577 commits into from
Jul 12, 2024
Merged

Upstream v2.60.2 #106

merged 577 commits into from
Jul 12, 2024
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Apr 1, 2024

  1. chore: fix typo in comment (erigontech#9846)

    Signed-off-by: stayweek <[email protected]>
    stayweek committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    878f01f View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2024

  1. Configuration menu
    Copy the full SHA
    c7330e1 View commit details
    Browse the repository at this point in the history
  2. downloader: to show more gradual progress when re-hashing/verying fil…

    …es (erigontech#9805)
    
    we recently changed field which used to measure progress from
    `t.BytesCompleted()` to `t.Stats().BytesReadData` - and seems it doesn't
    include "re-hashing" progress - so progress doesn't grow in logs and
    looks like it's stuck.
    
    argument to change - was: `t.BytesCompleted()` is not recommended to use
    for "download rate calculation".
    
    We don't use this field for rate calc, we using it for progress calc
    AskAlexSharov committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    06864e0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    95c8e37 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2024

  1. exitCode 1 when got webseed errs, added report overview in the end (e…

    …rigontech#9857)
    
    For better integration with GH Actions added overview in the end of
    reports and exit with code 1 in case when met some errors.
    awskii committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    c351ddc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ed44953 View commit details
    Browse the repository at this point in the history
  3. Caplin: beacon committee subscription api (erigontech#9721)

    This pr implements following beacon api
    
    https://ethereum.github.io/beacon-APIs/#/Validator/prepareBeaconCommitteeSubnet
    Steps:
    1. once receive committee subscription request, record this subscription
    info associated with validator index.
    2. if `isAggregator` flag is on, prepare internal data structure to
    collect and aggregate incoming attestation.
    3. set expiry and begin to subscribe `beacon_attestation_{subnet}`, so
    we are capable of receiving attestation data from peer.
    4. whenever receive attestation data, try aggregate it if needed.
    domiwei committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    b359c26 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2024

  1. txpool: check blob fields only if txn is Blob Tx (erigontech#9859)

    Fix erigontech#9834
    
    Let's check and validate blob configurations only if the txn is BlobTx
    
    Signed-off-by: jsvisa <[email protected]>
    jsvisa committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    cb755cb View commit details
    Browse the repository at this point in the history
  2. Caplin: Fixed gaps in blob download (erigontech#9850)

    Basically, now in order to mark blobs of a block as downloaded, re-check
    the blocks payload used to download it against the blob store.
    Giulio2002 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    ed5daf8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bb4a054 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2024

  1. Caplin: Add sync committees aggregation (erigontech#9829)

    # Sync Committee Contribution pooling
    
    First of all, a distinction:
    * Sync Committee Messages are single unaggregated messages from a
    specific validator
    * Sync Committee Contributions are aggregated messages from many
    validators.
    
    We get these 2 messages from 2 different gossip sources, and then after
    validating the Gossip rules, we send everything to the pool which
    aggregate the `sync committee` or `contribution` into another aggregate.
    
    ## Sync Committee subscription:
    /eth/v1/validator/sync_committee_subscriptions
    
    The subscription just starts to subscribe to the `Sync Committee`'s
    Gossip channel. it is actually really simple, here is the pseudo-code
    for how the subscription happen for each `ValidatorIndex` requested:
    
    ```vb
    Function PostEthV1ValidatorSyncCommitteeSubscriptions
        Request: ValidatorIndicies []uint64
    
    
        Get the head state of the blockchain
    
    
        For each subRequest in ValidatorIndicies do
    
            
            Compute the subnets for the validator index from subRequest using the headState
    
            For each subnet in syncnets do
                Construct a topic name for the sync committee subnet
                        Subscribe to the topic with the sync committee subnet the topic with the calculated expiry time in sentinel
                
    End Function
    ```
    
    ### Extras
    
    * /eth/v1/validator/contribution_and_proofs - Submit to the node a
    contribution to be republished on the Gossip.
    * /eth/v1/validator/sync_committee_contribution - Retrieve a
    contribution (from the pool) that we have aggregated from the gossip.
    * /eth/v1/beacon/pool/sync_committees - Submit to the node a sync sync
    committee messages to be republished on the Gossip.
    
    ---------
    
    Co-authored-by: Kewei <[email protected]>
    Giulio2002 and domiwei committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    183dbf7 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2024

  1. Caplin: Fixed network regressions (erigontech#9863)

    Basically pruning was overpruning useful blobs which were needed for
    processing of blocks at chain tip, thus leading to degraded performance.
    
    Regressions fixed:
    
    1) Make a copy of `GossipData` so that we do not risk republishing
    gossip bogus/mem corrupted data as published. (`PublishGossip` takes
    hold of the data bytes for a long time)
    2) Blobs download not showing progress
    3) Increase request dial timeout to specs
    4) Made `Attestations` routine recoverable
    5) Fixed inconsistency in the total active balance cache which caused a
    panic
    Giulio2002 committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    a035c5a View commit details
    Browse the repository at this point in the history
  2. downloader: --seedbox stopped to be self-driven (erigontech#9868)

    we did make `downloader` more passive (erigon-driven), but it did break
    `--seedbox` flag also
    AskAlexSharov committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    433f4de View commit details
    Browse the repository at this point in the history
  3. downloader: calling wrong url to download .torrent (erigontech#9867)

    - new method `DownloadAndSaveTorrentFile` did download data files
    instead of .torrent files because `WebSeeds.ByName()` return data urls -
    not .torrent urls
    - calling wrong url to download .torrent
    - save value to disk without `.torrent` suffix 
    - size attack prevention - did return nil err and it stopped webseed
    scanning
    AskAlexSharov committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    fbe3a46 View commit details
    Browse the repository at this point in the history
  4. New overlays feature for doing ad-hoc simulations of existing contrac…

    …ts with modified bytecode (erigontech#9438)
    
    In this PR I'm introducing so-called `overlays` for doing ad-hoc state
    simulations of contracts which replay the state with a modified bytecode
    for any given block range.
    
    The new feature adds two new RPC methods: `overlay_callConstructor` and
    `overlay_getLogs`
    
    I've also added a few bench tests and a new postman collection which
    checks both new methods for the WETH contract in original and modified
    version.
    
    ## Motivation
    Overlays allow you to add your custom logic to already deployed
    contracts and simulate on top of them. With overlays you can create new
    view functions, modify existing ones, change field visibility, emit new
    events and query the historical data of any contract with your modified
    source code.
    
    Similar commercial products exist in the space and I believe making this
    feature opensource in erigon will make it easier for everyone to tinker
    with it and build new cool things on top of it ✨
    
    ## Usage
    1) compile your contract to obtain the new deployment bytecode, append
    the constructor args at the end, if any
    2) call `overlay_callConstructor` with the result from 1) to receive the
    runtime bytecode
    3) call `overlay_getLogs` to simulate new logs, passing 2) as state
    overrides
    ([example](https://github.com/crebsy/erigon/blob/devel/cmd/rpcdaemon/postman/Overlay_Testing.json))
    4) call `eth_call` to simulate new view function calls passing 2) as
    state overrides
    
    ## Ad-hoc query performance & historical back-filling
    The current implementation for ad-hoc range queries of `overlay_getLogs`
    is optimized so that irrelevant blocks are skipped entirely from the
    simulation context. This can lead to very fast results of a few minutes
    or even seconds for simulating the entire historical logs of a contract
    which makes any infra for back-filling redundant. However, such
    shortcuts are only effectively working for contracts which are not
    touching too many blocks of the chain's history. So depending on the
    contract you're trying to patch, you still might need to create a custom
    back-filling script which simulates the new logs with e.g. 1000 or 10000
    block ranges.
    
    As a reference for a "busy" contract the simulation rate for the
    [Uniswap V2 router
    ](https://etherscan.io/address/0x7a250d5630b4cf539739df2c5dacb4c659f2488d#code)
    was ~ 280 blocks/s on a host with 24 cores. So while small block ranges
    returned relatively quickly, the simulation of the entire historical
    logs for this contract took a few hours on a single node.
    
    I'm not collecting any perf metrics yet for this but this could be
    easily added in the future for tracking better implementations and
    insights about contract <-> block distribution.
    
    ## Configuration
    1) Enable the `ots,overlay` api namespaces by adding it to the
    `--http.api` flag
    
    2) The implementation of `overlay_getLogs` is parallelized so it's good
    practice to increase the `--db.read.concurrency` to a higher value, e.g.
    256 so other erigon goroutines are not getting blocked.
    
    
    ## Supported networks
    Tested with ethereum and polygon nodes
    crebsy committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    17da5dd View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. polygon/p2p: fix issues found during testing (erigontech#9872)

    Fixes problems found during bor-mainnet sync tests:
    - FetchHeaders: paging-like fetching of headers from a peer - assumption
    was that a peer response will contain all e.g. 1024 headers since they
    can fit in < 2 MB however despite that some peers respond with only 16
    headers so we need to send further requests until we get all e.g. 1024
    headers
    - It looks like another assumption didn't hold - when we penalize a peer
    sentry doesn't generate a disconnect even. For that this PR creates a
    tracking penalizer that updates the peer tracker with a disconnect.
    - Removes another wrong incorrect - ErrEmptyBody validation because
    there are blocks which are empty, e.g. first 100,000k blocks
    - Sentry SentMessageById was disallowing GetBlockBodiesMsg, this PR
    fixes this
    taratorio committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    dd53519 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1c851ae View commit details
    Browse the repository at this point in the history
  3. Caplin: Refactored state antiquary (erigontech#9876)

    This PR separates the data collection layer from the `Antiquary` object
    to the `beaconStatesCollector`, which hopefully makes the code cleaner.
    It is still messy, but now we have a proper separation between the logic
    and the data collection layer.
    
    The reason why we have internal buffers here is that MDBX locks the
    entire database when writing to it, so we need to minimize the time
    spent in the write lock. So instead of writing the historical states on
    write transactions and keeping the lock for hours, we accumulate them in
    memory and write them in a single write transaction.
    Giulio2002 committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    faf7a43 View commit details
    Browse the repository at this point in the history
  4. polygon/sync: fix issues found during testing (erigontech#9873)

    Fixes problems found during bor-mainnet sync tests:
    
    - sync.Run was missing a for loop for initial sync convergences
    - temporarily disabling ForkChoiceUpdate execution since we are yet to
    solve and add missing state sync events and spans
    - no need to flush storage inside block downloader (better async
    performance)
    - logging improvements
    taratorio committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    c672452 View commit details
    Browse the repository at this point in the history
  5. polygon/heimdall: heimdall improvements after astrid sync tests (erig…

    …ontech#9882)
    
    - fixes an issue where heimdall polling goroutines get terminated upon a
    heimdall http err which is incorrect - these polling routines should be
    kept alive upon errors and errors should simply be logged
    - adds logging
    - reduces cyclomatic complexity by extracting logic for polling events,
    spans, checkpoints
    
    ---------
    
    Co-authored-by: battlmonstr <[email protected]>
    taratorio and battlmonstr committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    7d05ec1 View commit details
    Browse the repository at this point in the history
  6. dvovk/headers info (erigontech#9748)

    - collecting info for "Headers" stage
    dvovk committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    70406e6 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2024

  1. Configuration menu
    Copy the full SHA
    012199f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    48592ea View commit details
    Browse the repository at this point in the history
  3. dvovk/networkspeedtest (erigontech#9885)

    Implemented a network speed test to run every 180 seconds. This
    information is crucial for diagnostic tools. It helps us identify if a
    client is reaching their maximum capacity.
    dvovk committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    32218d9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0d2cf66 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    56cf84b View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

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

Commits on Apr 11, 2024

  1. Configuration menu
    Copy the full SHA
    ec027f4 View commit details
    Browse the repository at this point in the history
  2. do not open corrupted file (erigontech#9908)

    Do not open files which are bigger than 32 bytes but "has no" words in
    it.
    awskii committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    642a80a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    da015df View commit details
    Browse the repository at this point in the history
  4. p2p/sentry: StatusDataProvider ReadCurrentHeader error (erigontech#9890)

    P2P fails on restart because rawdb.ReadCurrentHeader returns a nil
    header. It looks like ReadHeadHeaderHash fails to find the current
    header hash. However the correct hash is returned by ReadHeadBlockHash.
    
    Let's use ReadHeadBlockHash, because the status needs to report a header for which we have a full block body.
    battlmonstr committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    63c7118 View commit details
    Browse the repository at this point in the history
  5. polygon/heimdall: optimise fetch checkpoints (erigontech#9897)

    Brings down time to fetch all checkpoints from 4 hours to 42 seconds in
    combination with maticnetwork/heimdall#1154
    
    ```
    DBUG[04-09|21:12:39.754] [bor.heimdall] fetching all checkpoints 
    DBUG[04-09|21:13:10.355] [bor.heimdall] fetching all checkpoints progress page=5 len=40000
    DBUG[04-09|21:13:22.061] [bor.heimdall] fetching all checkpoints done len=60474 duration=42.307967083s
    ```
    taratorio committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    e7d5a84 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c648885 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f5891c1 View commit details
    Browse the repository at this point in the history
  8. Revert "updateForkChoice: support --sync.loop.block.limit (erigontech…

    …#9315)" (erigontech#9900)
    
    we have this PR in release and don't have in devel
    
    Co-authored-by: Andrew Ashikhmin <[email protected]>
    AskAlexSharov and yperbasis committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    a5d82cf View commit details
    Browse the repository at this point in the history
  9. downloader: manual .lock remove may lead to race and creation of data…

    … files without .torrent (erigontech#9782)
    
    ```
    if !prohibited(file) && !exists(file) {
       create(file)
    }
    ```
    such pattern is always race - even if `prohibited`/`exists()`/`create()`
    are atomic inside.
    to eliminate race - need move towards analog of `CompareAndSwap` -
    `CreateIfNotProhibited` which in 1 mutex lock will: check_lock,
    existence, create.
    AskAlexSharov committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    c756a55 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    50be88d View commit details
    Browse the repository at this point in the history
  11. turbo/jsonrpc: improved interface readability (erigontech#9910)

    It seems like you need context when implementing
    `GetModifiedAccountsByHash`.
    However, it is not specified in the interface.
    bbaktaeho committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    f9b9d59 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2024

  1. Configuration menu
    Copy the full SHA
    090a65a View commit details
    Browse the repository at this point in the history
  2. Fix default gas values in debug_ RPCs (erigontech#9922)

    When not specified, gas fee cap should default to base fee to prevent
    errors where gas fee cap is less than block base fee.
    
    Fixes erigontech#9870
    shohamc1 committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    4eed27b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1cbdfe3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    400c9ba View commit details
    Browse the repository at this point in the history
  5. fix race conditions (erigontech#9906)

    fixes two minor race conditions
    awskii committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    43b20c1 View commit details
    Browse the repository at this point in the history
  6. Caplin: wrong IsTopicBeaconAttestation (erigontech#9915)

    fix `IsTopicBeaconAttestation ` and slightly revise notifier.
    domiwei committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    1c4a964 View commit details
    Browse the repository at this point in the history
  7. qa tests: add snap download test workflow (erigontech#9925)

    Starts Erigon from scratch, monitors the snapshot download process and
    waits for it to complete within 4 hours, reporting times for download
    and indexing phases. Fails if the download phase doesn't finish on time
    mriccobene committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    e4b50b7 View commit details
    Browse the repository at this point in the history
  8. Updating sync stages metrics along with DB update (erigontech#9907)

    - added updating prometheus sync metrics once in 180 seconds log loop
    erigontech#8438
    dvovk committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    7e85689 View commit details
    Browse the repository at this point in the history
  9. Add cloudflare app firewall specific headers (erigontech#9904)

    This PR adds headers which prevent the cloudflare firewall from banning
    the downloaders http requests.
    
    At the moment these are not obfuscated in the codebase.
    
    This should be reviewed before this change is committed to the core
    repo.
    mh0lt committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    6bfa6f8 View commit details
    Browse the repository at this point in the history
  10. grafana: disable staking (erigontech#9923)

    staking - it's some feature to sum 2 graphics - have no idea when it can be useful - only confusing now.
    AskAlexSharov committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    ef5e3d0 View commit details
    Browse the repository at this point in the history
  11. Refactoring of messages handling (erigontech#9887)

    The Gossip Manager is responsible for handling incoming messages from
    the network and handling those accordingly, if the handling goes well,
    these messages are then re-gossiped to the rest of the network. The
    Gossip Manager registers a `Service` object which is responsible for
    handling the incoming messages.
    
    Below is a small graph on how the Gossip Manager works:
    <img width="754" alt="gossipmanager"
    src="https://github.com/ledgerwatch/erigon/assets/29233688/57fddf79-b417-4792-8aac-1a08534c1207">
    Giulio2002 committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    771b834 View commit details
    Browse the repository at this point in the history
  12. renaming step2 (erigontech#9920)

    - Rename
      - state.AggregatorV3Context -> state.FilesRoTx
      - MakeContext() -> BeginFilesRo()
      - aggCtx -> aggTx
      - InvertedIndexContext -> InvertedIndexRoTx, ic -> iit
      - HistoryContext -> HistoryRoTx, hc -> ht
      - DomainContext -> DomainRoTx, dc -> dt
    
    Remove
    - Aggregator class
    AskAlexSharov committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    0f41159 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    567d222 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2024

  1. Configuration menu
    Copy the full SHA
    604de2d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0be04e6 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2024

  1. Caplin: Moving more code out of the ForkChoiceStoire (erigontech#9933)

    I also added `EthereumClock` which is an abstraction over ETH 2.0
    reliance on `unix.Nano()` for better testing in the future. I just added
    the `struct` this object is not used anywhere. also had to regenerate
    some mocks.
    Giulio2002 committed Apr 14, 2024
    Configuration menu
    Copy the full SHA
    1d95570 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2024

  1. Configuration menu
    Copy the full SHA
    1248831 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b8c498d View commit details
    Browse the repository at this point in the history
  3. data races running TestMiningBenchmark (erigontech#8704) (erigontech#…

    …9926)
    
    * fix GrpcServer.p2pServer race
    * fix HeaderDownload.latestMinedBlockNumber race
    
    see erigontech#8704
    battlmonstr committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    fcad3a0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bd378f2 View commit details
    Browse the repository at this point in the history
  5. p2p/sentry: fix missing disconnect events after penalising a peer (er…

    …igontech#9928)
    
    Problematic situation
    `runPeer` blocks on `rw.ReadMsg()`, however in the meantime the peer
    gets penalised.
    
    Expected behaviour
    the peer to get disconnected and for sentry to generate a Disconnect
    event
    
    Actual behaviour
    no disconnect event gets generated, peer is stuck in `rw.ReadMsg()`
    
    Fix
    call `pi.peer.Disconnect(reason)` as part of `peerInfo.Remove(reason)`
    during `Penalize`
    
    1. `Disconnect` sends a disc reason to `p.disc` channel
    2. `p.disc` channel is read in `Peer.run` -
    https://github.com/ledgerwatch/erigon/blob/devel/p2p/peer.go#L279
    3. it causes the function to exit and in its defer call close `p.closed`
    channel
    4. `p.closed` channel is used as a closing channel in the
    `protoRW.closed` in both `ReadMsg` and `WriteMsg` so once it is closed
    those functions exit
    taratorio committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    890b8b5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    143c9f8 View commit details
    Browse the repository at this point in the history
  7. polygon/p2p: remove no longer needed trackingPenalizer (erigontech#9929)

    After the fix done in erigontech#9928
    trackingPenalizer is no longer needed
    taratorio committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    b1efa16 View commit details
    Browse the repository at this point in the history
  8. polygon/heimdall: use value receiver for checkpoints sort (erigontech…

    …#9947)
    
    minor tidy up of code I wrote last week
    taratorio committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    1e72f64 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f5692a5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6a9ce5a View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2024

  1. beacon downloader: improve logging of hashes (erigontech#9951)

    ```
    Gotten unexpected root                   got="[25 97 1 2 224 23 12 23 98 201 172 124 211 121 115 79 189 245 64 97 147 7 148 171 53 37 124 29 33 89 66 161]" expected=0xf09b99bb8c94f0c631625f020805ff21f111fac6f889fe78b9b91e71c6cf16ce
    ```
    AskAlexSharov committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    ac43aa8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    44c7d04 View commit details
    Browse the repository at this point in the history
  3. set default values for diagnostic address and debug address (erigonte…

    …ch#9961)
    
    Set default values for "debug.addrs" and "diagnostics.addr" to make
    support command compact:
    OLD -> ./build/bin/erigon support --debug.addrs localhost:6060
    --diagnostics.addr localhost:8080 --diagnostics.sessions 15947373
    NEW -> ./build/bin/erigon support --diagnostics.sessions 15947373
    dvovk committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    7e5e5ca View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2024

  1. Clarify decompressor opening errors (erigontech#9948)

    Introduces `ErrCompressedFileCorrupted`.
    
    Those errors should be handled properly inside aggregator and inside
    different utilities.
    At least we do not open wrong compressed files but we sometimes want to
    do some extra on those files (eg during run of a `downloader`)
    awskii committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    3af7e45 View commit details
    Browse the repository at this point in the history
  2. Added downloader http handling and extended logging (erigontech#9962)

    * Added cf headers to webseed requests
    
    * Extended torrent tequest transport to retry 500+ status responses and
    count progress and fails
    
    * Added internal torrent status logging for stopped and no-progress
    files
    mh0lt committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    2140e2f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    618d267 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3483551 View commit details
    Browse the repository at this point in the history
  5. p2p/sentry/sentry_multi_client: flag to disable block download code (e…

    …rigontech#9957)
    
    ### Change ### 
    Adds a `disableBlockDownload` boolean flag to current implementation of
    sentry multi client to disable built in header and body download
    funcitonality.
    
    ### Long Term ###
    Long term we are planning to refactor sentry multi client and de-couple
    it from custom header and body download logic.
    
    ### Context ### 
    Astrid uses its own body download logic which is de-coupled from sentry
    multi client.
    
    When both are used at the same time (using `--polygon.sync=true`) there
    are 2 problematic scenarios:
    - restarting Astrid takes a very long time due to the init logic of
    sentry multi client. It calls `HeaderDownload.RecoverFromDb` which is
    coupled to the Headers stage in the stage loop. So if Astrid has fetched
    1 million headers but hasn't committed execution yet then this will
    result in very slow start up since all 1 million blocks have to be read
    from the DB. Example logs:
    ```
    [INFO] [04-16|12:55:42.254] [downloader] recover headers from db     left=65536
    ...
    [INFO] [04-16|13:03:42.254] [downloader] recover headers from db     left=65536
    ```
    
    - debug log messages warning about sentry consuming being slow since
    Astrid does not use `HeaderDownload` and `BodyDownload` so there is
    nothing consuming the headers and bodies from these data structures.
    This has no logical impact, however clogs resources. Example logs:
    ```
    [DBUG] [04-16|14:03:15.311] [sentry] consuming is slow, drop 50% of old messages msgID=BLOCK_HEADERS_66
    [DBUG] [04-16|14:03:15.311] [sentry] consuming is slow, drop 50% of old messages msgID=BLOCK_HEADERS_66
    ```
    taratorio committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    bca27f3 View commit details
    Browse the repository at this point in the history
  6. Fix missing prune log index (erigontech#9968)

    Existing prune had some confusing logic (thanks to me).
    
    In PR, change the logic to:
    if receipt, or any individual log in the receipt contains an address in
    `noPruneContracts` the entire log must be stored and indexed.
    
    Also fixes a regression that logs were not getting indexed - this was
    due to
    ```
    if l.BlockNumber < pruneBlock && cfg.noPruneContracts != nil && !cfg.noPruneContracts[l.Address] {
    ```
    Since the individual log object didn't have the block number - something
    that shouldn't matter.
    In PR, change the logic to:
    Use `blockNum` from outer loop
    somnathb1 committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    e3b87dd View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4a578ba View commit details
    Browse the repository at this point in the history
  8. cmd/integration: log index stage sub command to reset only prune_at p…

    …oint (erigontech#9971)
    
    --reset clears all the tables associated with a stage, while we just
    want to reset the prune_at progress to 0 for some situations
    taratorio committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    b17aa53 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1c5b7f3 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2024

  1. opening domains/hsit/indices with corrupted files on disk (erigontech…

    …#9970)
    
    Fixes panic and log prints
    ```
    DBUG[04-17|03:03:11.204] [agg] History.openFiles                  err="compressed file \"v1-accounts.1344-1408.v\" dictionary is corrupted: size 9.3 GB but no words in it" f=/mnt/erigon/snapshots/history/v1-accounts.1344-1408.v
    panic: History(code).openFiles: compressed file "v1-code.1344-1408.v" dictionary is corrupted: size 3.9 MB but no words in it
    
    goroutine 1 [running]:
    github.com/ledgerwatch/erigon/cmd/integration/commands.allSnapshots.func1()
    	github.com/ledgerwatch/erigon/cmd/integration/commands/stages.go:1743 +0x4c8
    sync.(*Once).doSlow(0xc00102fbc0?, 0xc00102b870?)
    	sync/once.go:74 +0xc2
    sync.(*Once).Do(...)
    	sync/once.go:65
    github.com/ledgerwatch/erigon/cmd/integration/commands.allSnapshots({0x1ebbe30?, 0x2c90460?}, {0x1ec32a0?, 0xc0004d68c0?}, {0x1ec6508?, 0xc000519f00?})
    	github.com/ledgerwatch/erigon/cmd/integration/commands/stages.go:1717 +0x90
    github.com/ledgerwatch/erigon/cmd/integration/commands.openDB({{0x1ec6508, 0xc0000f1800}, 0xc000df6410, 0x1cb3c98, {0xc000a25290, 0x15}, 0x0, 0x20000000000, 0x40000000, 0xffffffffffffffff, ...}, ...)
    	github.com/ledgerwatch/erigon/cmd/integration/commands/root.go:108 +0x4a5
    github.com/ledgerwatch/erigon/cmd/integration/commands.init.func11(0x2b5cbe0, {0x1a0b51f?, 0x4?, 0x1a0b3df?})
    	github.com/ledgerwatch/erigon/cmd/integration/commands/stages.go:366 +0xea
    github.com/spf13/cobra.(*Command).execute(0x2b5cbe0, {0xc000895470, 0x3, 0x3})
    	github.com/spf13/[email protected]/command.go:987 +0xab1
    github.com/spf13/cobra.(*Command).ExecuteC(0x2b5c340)
    	github.com/spf13/[email protected]/command.go:1115 +0x3ff
    github.com/spf13/cobra.(*Command).Execute(...)
    	github.com/spf13/[email protected]/command.go:1039
    github.com/spf13/cobra.(*Command).ExecuteContext(0x0?, {0x1ebbf90?, 0xc000df63c0?})
    	github.com/spf13/[email protected]/command.go:1032 +0x47
    main.main()
    	github.com/ledgerwatch/erigon/cmd/integration/main.go:15 +0xe6
    ```
    awskii committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    8d8f88a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ad69def View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3730cff View commit details
    Browse the repository at this point in the history
  4. dvovk/fix speedtest (erigontech#9973)

    - put initial speed test inside go routine
    - passed context to download, upload, latency tests to stop if parent
    context cancelled
    - increased test interval to 30 minutes
    dvovk committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    c994ca2 View commit details
    Browse the repository at this point in the history
  5. golangci-lint v1.57.2 (erigontech#9978)

    remove some deprecated linters and fields:
    https://golangci-lint.run/product/changelog/
    AskAlexSharov committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    c714044 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2024

  1. Configuration menu
    Copy the full SHA
    7ad5710 View commit details
    Browse the repository at this point in the history
  2. downloader: RecalcStates double-accounting fix (erigontech#9985)

    `stats.MetadataReady++` was called outside if and inside
    AskAlexSharov committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    e364cd1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    629514a View commit details
    Browse the repository at this point in the history
  4. downloader: step towards atomic fs (erigontech#9992)

    - existence check and creation must be inside same `mutex.Lock`
    - use ".tmp + rename" trick
    
    Example of possible race: 
    ```
    [EROR] [04-19|03:33:12.908] Erigon startup                           err="rename /mnt/erigon/snapshots/v1-000900-001000-transactions.seg.torrent.tmp /mnt/erigon/snapshots/v1-000900-001000-transactions.seg.torrent: no such file or directory"
    ```
    AskAlexSharov committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    77d3aff View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    991c322 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e7d67fd View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2024

  1. mdbx: Batch() (erigontech#9999)

    This task is mostly implemented to be used in
    `erigon/erigon-lib/downloader/mdbx_piece_completion.go` and maybe in
    `nodesDB` (where we need many parallel RwTx)
    
    I was agains adding this "trick"/"api" last years, because thought that
    we can implement our App to be more 1-big-rwtx-friendly. And we did it
    in Erigon - StagedSync. TxPool also did, but with a bit less happy face
    - by "map+mutex with periodic flush to db". But `anacrolix/torrent` is
    external library and unlikely will survive such big mind-model-change.
    Maybe it's time to add `db.Batch()`.
    
    #### Batch Rw transactions
    
    Each `DB.Update()` waits for disk to commit the writes. This overhead
    can be minimized by combining multiple updates with the `DB.Batch()`
    function:
    
    ```go
    err := db.Batch(func(tx *bolt.Tx) error {
    	...
    	return nil
    })
    ```
    
    Concurrent Batch calls are opportunistically combined into larger
    transactions. Batch is only useful when there are multiple goroutines
    calling it.
    
    The trade-off is that `Batch` can call the given
    function multiple times, if parts of the transaction fail. The
    function must be idempotent and side effects must take effect only
    after a successful return from `DB.Batch()`.
    
    For example: don't display messages from inside the function, instead
    set variables in the enclosing scope:
    
    ```go
    var id uint64
    err := db.Batch(func(tx *bolt.Tx) error {
    	// Find last key in bucket, decode as bigendian uint64, increment
    	// by one, encode back to []byte, and add new key.
    	...
    	id = newValue
    	return nil
    })
    if err != nil {
    	return ...
    }
    fmt.Println("Allocated ID %d", id)
    ```
    
    
    ---- 
    
    Implementation mostly taken from
    https://github.com/etcd-io/bbolt/?tab=readme-ov-file#batch-read-write-transactions
    
    Maybe in future can push-down it to
    https://github.com/erigontech/mdbx-go
    AskAlexSharov committed Apr 20, 2024
    Configuration menu
    Copy the full SHA
    122f9f8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    86dd0e5 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2024

  1. Caplin: indexing to use right buf size (erigontech#9998)

    - PutUvarint can produce 10 bytes
    - re-using buffer - faster and less gc
    AskAlexSharov committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    54a1609 View commit details
    Browse the repository at this point in the history
  2. First round of fixes in making gossip publishing good for the validat…

    …or: See comment (erigontech#9972)
    
    * Fixed and simplified unaggregated bits check.
    * There are 2 bits on, one for the attester and one for the
    End-of-bitlist, needed to account for end of bitlist bit
     * Wrong publishing topic for sync_committee_ messages
    * Added more Ignore by receiving specific errors to avoid forwarding
    useless data.
     * Replaced `validateAttestation` with full message processing
     * Fixed forwarding of sync committee aggregates
     * Fixed subnet announcements
    
    ---------
    
    Co-authored-by: kewei <[email protected]>
    Giulio2002 and domiwei committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    596d54d View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. Downloader: atomic-fs to be less smart. if app called - Create() - do…

    …n't check .lock. Otherwise can't create .torrent for existing .seg files. (erigontech#10004)
    AskAlexSharov committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    3f7cf91 View commit details
    Browse the repository at this point in the history
  2. Implement the optional output field on ots_traceTransaction (erigonte…

    …ch#10014)
    
    This is for E2.
    
    It implements the backward compatible output field for traces on
    ots_traceTransaction: otterscan/execution-apis#1
    
    It'll be consumed by Otterscan in an upcoming release of this feature:
    otterscan/otterscan#1530
    wmitsuda committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    34e8d35 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    80513aa View commit details
    Browse the repository at this point in the history
  4. re-gen mock files (erigontech#10007)

    there was error:
    ```
    prog.go:12:2: missing go.sum entry for module providing package github.com/golang/mock/mockgen/model; to add:
    	go mod download github.com/golang/mock
    ```
    AskAlexSharov committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    addda2e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3af5c35 View commit details
    Browse the repository at this point in the history
  6. chain-config: capital IsOsaka (erigontech#9989)

    To Follow suit with rest of the naming
    somnathb1 committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    be8e4e6 View commit details
    Browse the repository at this point in the history
  7. move more services out from ForkchoiceStore (erigontech#9981)

    - voluntary_exit
    - bls_to_execution_change
    - proposer_slashing
    - expirable lru
    
    ---------
    
    Co-authored-by: Giulio <[email protected]>
    domiwei and Giulio2002 committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    991230e View commit details
    Browse the repository at this point in the history
  8. WP - dvovk/diagnostics downloader print (erigontech#10000)

    Added command which prints to console diagnostics data. In this initial
    version it is possible to print stages list and snapshot download
    progress. Erigon should be running with --metrics flag
    There are two available commands:
    - "downloader"
    - "stages" "current"
    There are two possible options for output: text and json
    Run command - ./build/bin/diag [command] [text | json]
    
    ---------
    
    Co-authored-by: Mark Holt <[email protected]>
    dvovk and mh0lt committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    8f0582b View commit details
    Browse the repository at this point in the history
  9. move temporal package to erigon-lib (erigontech#10015)

    Co-authored-by: awskii <[email protected]>
    AskAlexSharov and awskii committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    ab361e4 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2024

  1. Configuration menu
    Copy the full SHA
    2b8f669 View commit details
    Browse the repository at this point in the history
  2. Added body close on retry for downloader round trip (erigontech#10008)

    Add missing body close method when webseed roundtrip is retried
    mh0lt committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    49e39ab View commit details
    Browse the repository at this point in the history
  3. Set block baseFeePerGas value in graphql response (erigontech#9974)

    Set baseFeePerGas value in graphql resolver for block
    scorring committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    6457ef3 View commit details
    Browse the repository at this point in the history
  4. vm: Rename stateTransition gas to gasRemaining (erigontech#10025)

    The `StateTransition` property `gas` actually tracks the remaining gas
    in the current context. This PR is to improve code readability.
    Geth also uses similar naming.
    somnathb1 committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    de39ac4 View commit details
    Browse the repository at this point in the history
  5. chore: fix function names in comment (erigontech#9987)

    Signed-off-by: fuyangpengqi <[email protected]>
    fuyangpengqi committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    0fa85d2 View commit details
    Browse the repository at this point in the history
  6. sonar: add test coverage (erigontech#9988)

    - attempt to integrate sonar with test coverage by following 
    -
    https://sonarcloud.io/project/configuration/GitHubActions?id=ledgerwatch_erigon
    -
    https://docs.sonarsource.com/sonarcloud/advanced-setup/ci-based-analysis/github-actions-for-sonarcloud/
    - adds sonar properties file to specify code coverage output
    - also properties file can be used to filter out generated code from
    sonar scan
        - protobuf
        - graphql
        - ignore pedersen hash bindings code
    - ... there will be more ignores coming in later PRs (e.g. some c/c++
    code we dont need to scan, some js code, some contract gen code, etc.)
    taratorio committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    ff05e20 View commit details
    Browse the repository at this point in the history
  7. sonar: disable c/c++ scanning (erigontech#10033)

    Fixes error in Sonar GitHub action:
    <img width="1645" alt="Screenshot 2024-04-23 at 17 46 01"
    src="https://github.com/ledgerwatch/erigon/assets/94537774/3833db1c-6a8a-4db2-8bb7-5de58b57e638">
    taratorio committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    7d668f2 View commit details
    Browse the repository at this point in the history
  8. Caplin: Added SyncAggregate computation to block production (erigon…

    …tech#10009)
    
    This PR allows the computation for the computation of the
    `SyncAggregate` field in block production:
    https://sepolia.beaconcha.in/slot/4832922 proof of the code working is
    that now Caplin validators can include sync aggregates in their blocks.
    
    Things modified:
    * We do not aggregate pre-aggregated `SyncContributionAndProof`s,
    instead we just listen to the network and pick the most profitable ones
    for each sub sync committee (4 sync subcommittee on mainnet).
    profitability == most bits set in `AggregationBits` field.
    * Separate aggregates set for contribution to be included in a block
    from the ones constructed from `SyncCommitteeMessage`s, combining the
    two causes some contributions to be marked as invalid and not
    aggregable.
    * Remove SyncContributionMock in favor of gomock
    Giulio2002 committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    6d9a5fd View commit details
    Browse the repository at this point in the history
  9. polygon/sync: message listener to preserve peer events ordering (erig…

    …ontech#10032)
    
    Observed the following issue in a long running Astrid sync on
    bor-mainnet:
    ```
    [DBUG] [04-17|14:25:43.504] [p2p.peerEventObserver] received new peer event id=Disconnect peerId=51935aa1eeabdb73b70d36c7d5953a3bfdf5c84e88241c44a7d16d508b281d397bdd8504c934bfb45af146b86eb5899ccea85e590774f9823d056a424080b763
    [DBUG] [04-17|14:25:43.504] [p2p.peerEventObserver] received new peer event id=Connect peerId=51935aa1eeabdb73b70d36c7d5953a3bfdf5c84e88241c44a7d16d508b281d397bdd8504c934bfb45af146b86eb5899ccea85e590774f9823d056a424080b763
    ```
    
    Note the timestamps are the same on the millisecond level, however the
    disconnect was processed before the connect which is wrong (connect
    should always be first).
    
    This then got the `PeerTracker` in a bad state - it kept on returning
    peer
    `51935aa1eeabdb73b70d36c7d5953a3bfdf5c84e88241c44a7d16d508b281d397bdd8504c934bfb45af146b86eb5899ccea85e590774f9823d056a424080b763`
    as a valid peer to download from, which caused repeated `peer not found`
    errors when sending messages to it.
    
    Fix is to have the message listener wait for all observers to finish
    processing peer event 1 before proceeding to notifying them about peer
    event 2.
    taratorio committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    190cbfa View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    586416c View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2024

  1. sonar: fix warnings (erigontech#10034)

    Fixes Sonar warnings:
    <img width="550" alt="Screenshot 2024-04-23 at 19 37 53"
    src="https://github.com/ledgerwatch/erigon/assets/94537774/b85c9607-3800-408d-8a1b-c5bf80da38b2">
    taratorio committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    7066578 View commit details
    Browse the repository at this point in the history
  2. sonar: fix js warnings and exclude mocks (erigontech#10042)

    - Excludes go mock generated files from analysis
    - Excludes broken js files (valid as they are used for tracers and test
    data) to fix below warnings
    <img width="1658" alt="Screenshot 2024-04-24 at 11 12 04"
    src="https://github.com/ledgerwatch/erigon/assets/94537774/7925d07f-37f3-43c9-b34a-9a5361e48a8a">
    taratorio committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    965213d View commit details
    Browse the repository at this point in the history
  3. tests: Support iterations in Heimdall simulator (erigontech#10040)

    Accept a slice of block numbers that represents the final block number
    that will be available to the client of the simulator.Any data after the
    iteration stage end is not accessible to the client.
    
    The iteration moves to the next stage under certain conditions:
    - requesting the latest span via `FetchSpan`
    - requesting state sync events beyond current last iteration block's
    timestamp
    shohamc1 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    faebc82 View commit details
    Browse the repository at this point in the history
  4. Fix forward bor snaps (erigontech#10027)

    This fixes this issue:
    
    erigontech#9499
    
    which is caused by restarting erigon during the bor-heimdall stage.
    
    Previously after the initial call to bor-heimdall (header 0), forward
    downloading was disabled, but backward
    downloading recursively collects headers - holding results in memory
    until it can roll them forward. This should
    only be called for a limited number of headers, otherwise it leads to a
    large amount of memory >45GB for bor
    main net if the process is stopped at block 1.
    mh0lt committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    d1340de View commit details
    Browse the repository at this point in the history
  5. Added downloader request count (erigontech#10036)

    The downloader is not complete until all of its requested files have
    been downloaded.
    
    This changes adds a request count to the downloader stats to be checked
    for completeness, otherwise the downloader
    may appear complete before all required torrents have been added.
    mh0lt committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    9af7278 View commit details
    Browse the repository at this point in the history
  6. StageSenders: --sync.loop.block.limit support (erigontech#9982)

    We reverted support of this flag in `updateForkChoice` because
    implementation was too complex and fragile:
    erigontech#9900
    
    But it's good-enough if StageSenders will preserve this flag - then next
    stages (exec) will also follow (because they look at prev stage
    progress).
    
    It's good-enough - because users just want to save some partial progress
    after restoring node from backup (long downtime). And enforce "all
    stages progress together" invariant
    AskAlexSharov committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    2bd713b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4753554 View commit details
    Browse the repository at this point in the history
  8. Optimize prune old chunks (erigontech#10019)

    **Summary**
    Fixes prune point for log (+index)
    - Unnecessary to use ETL again for deleting `kv.Log` entries, can just
    introduce `RwCursor` in the initial loop
    - Put the last `pruneTo` block number in the `PruneState` - this will
    begin pruning from that point. Earlier the `pruneFrom` point being
    passed in was buggy as it used some other assumption for this value
    somnathb1 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    d318f11 View commit details
    Browse the repository at this point in the history
  9. [ots] Fix block rewards calculation on post-merge blocks (erigontech#…

    …10038)
    
    This is for E2.
    
    The block rewards returned by Otterscan API is incorrect since the
    merge. It replaces very old code with the same calculation used for
    trace_block.
    
    this code probably won't work with Aura consensus, but that's ok since
    the current one doesn't work as well. It would actually require exposing
    more code from block execution and I don't want to handle it for now,
    let's fix only the post-merge calc for now.
    
    Co-authored-by: sealer3 <[email protected]>
    wmitsuda and sealer3 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    dfdfed5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ed3325b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    831c48d View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    49b7a97 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    9976e3c View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2024

  1. Build Silkworm RpcDaemon settings from Erigon ones (erigontech#10002)

    This PR introduces support for customising Silkworm RpcDaemon settings
    in Erigon++.
    
    Common RPC settings between Erigon and Silkworm are simply translated
    from the existing Erigon command-line options. They include:
    - `--http.addr`
    - `--http.port`
    - `--http.compression`
    - `--http.corsdomain`
    - `--http.api`
    - `--ws`
    - `--ws.compression`
    
    Moreover, the following Silkworm-specific command-line options are
    added:
    - `--silkworm.verbosity`
    - `--silkworm.contexts`
    - `--silkworm.rpc.log`
    - `--silkworm.rpc.log.maxsize`
    - `--silkworm.rpc.log.maxfiles`
    - `--silkworm.rpc.log.response`
    - `--silkworm.rpc.workers`
    - `--silkworm.rpc.compatibility`
    
    Default values cover the common usages of Erigon++ experimental
    features, yet such options can be useful for testing some corner cases
    or collecting information.
    
    Finally, this PR adds a new `LogDirPath` function to `logging` module
    just to determine the log dir path used by Erigon and put there also
    Silkworm RPC interface logs, when enabled.
    canepat committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    d2aaa68 View commit details
    Browse the repository at this point in the history
  2. Optimized attestation processing (erigontech#10020)

    * Decrease memory footprint on chain tip
    * Fix a race
    * Better times on `Attestation` processing. 1 sec -> 54 ms
    Giulio2002 committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    2fe4b37 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3323fdc View commit details
    Browse the repository at this point in the history
  4. chore: fix comments (erigontech#9958)

    Fix some comments
    persmor committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    b2cf6d2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0620607 View commit details
    Browse the repository at this point in the history
  6. drop go 1.20 support (erigontech#10052)

    drop go 1.20 support 
    
    use ` github.com/erigontech/torrent v1.54.2-alpha` - to simplify future
    support and features backport
    AskAlexSharov committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    ee420ad View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a700f92 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cb73f91 View commit details
    Browse the repository at this point in the history
  9. downloader: remove deprecated manual fsync (erigontech#10064)

    After switching to more durable db mode
    erigontech#10010 - we don't need manual
    fsync anymore.
    AskAlexSharov committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    bc18485 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c973a15 View commit details
    Browse the repository at this point in the history
  11. Caplin: fixed attestation broadcasting (erigontech#10041)

    This PR fixes 2 things:
    * Superset handling (should ignore)
    * SSZ offset not set for custom ssz in attestation encoding after json
    unmarshalling
    Giulio2002 committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    341bfea View commit details
    Browse the repository at this point in the history
  12. feat: add fullTx params to NewPendingTransactions (erigontech#9204)

    feat: add `fullTx` params to `NewPendingTransactions`
    
    Closes erigontech#9203
    galois committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    b9ebb6c View commit details
    Browse the repository at this point in the history
  13. backward compatibility of .lock (erigontech#10006)

    In PR: 
    - new .lock format introduced by
    erigontech#9766 is not backward
    compatible. In the past “empty .lock” did mean “all prohibited” and it
    was changed to “all allowed”.
    - commit
    
    Not in PR: I have idea to make .lock also forward compatible - by making
    it whitelist instead of blacklist: after adding new snap type it will
    not be downloaded by accident. Will do it in next PR.
    
    But I need one more confirmation - why do we need exceptions from .lock?
    Why we breaking "download once" invariant for some type of files? Can we
    avoid it?
    AskAlexSharov committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    3829bfe View commit details
    Browse the repository at this point in the history
  14. Make logs subscription channel size configurable (erigontech#9810)

    This PR makes the channel that is used to send logs to subscriptions
    configurable so logs are not dropped when the channel gets filled. See
    issue 9699.
    This is just an initial version since I wanted to gather some feedback
    and was unsure if this is the correct approach to solve this.
    adytzu2007 committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    a0049fe View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    d7cd1fa View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2024

  1. [ots] Fix incorrect return type and overflow on total block fees calc (

    …erigontech#10070)
    
    For E2: fix incorrect type + overflow in certain blocks
    
    Corresponding otterscan issue:
    otterscan/otterscan#1658
    wmitsuda committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    3e1331a View commit details
    Browse the repository at this point in the history
  2. RPC: --http.dbg.single=true and custom HTTP header dbg: true (eri…

    …gontech#10039)
    
    - Added method `tx.Context()` - because Tx already bounded to context by
    `db.BeginRo(ctx)`
    - Removed ctx parameter from `BlockWithSenders` method in interfaces
    - Added `dbg.ToContext()` and `dbg.Enabled(ctx)` methods to set/get
    debugging tag to `ctx`.
    
    Added way to debug single http request: 
    To print more detailed logs for 1 request - add `--http.dbg.single=true`
    flag. Then can send HTTP header `"dbg: true"`:
    
    ```
    curl -X POST -H "dbg: true" -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id":1}' localhost:8545
    ```
    
    ---------
    
    Co-authored-by: battlmonstr <[email protected]>
    AskAlexSharov and battlmonstr committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    a5270bc View commit details
    Browse the repository at this point in the history
  3. all: use the built-in slices library (erigontech#9842)

    In the current go 1.21 version used in the project, slices are no longer
    an experimental feature and have entered the standard library
    
    Co-authored-by: alex.sharov <[email protected]>
    carehabit and AskAlexSharov committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    9001183 View commit details
    Browse the repository at this point in the history
  4. chore(config): json marshal chainName (erigontech#9865)

    As the other fields are json marshaled into lowerUpper case, we should
    use the same style.
    
    ---------
    
    Signed-off-by: jsvisa <[email protected]>
    jsvisa committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    aee77ab View commit details
    Browse the repository at this point in the history
  5. Fix new_heads Events Emission on Block Forks (erigontech#10072)

    TL;DR: on a reorg, the common ancestor block is not being published to
    subscribers of newHeads
    
    #### Expected behavior
    
    if the reorg's common ancestor is 2, I expect 2 to be republished
    
    1, 2, **2**, **3**, **4**
    
    #### Actual behavior
    
    2 is not republished, and 3's parentHash points to a 2 header that was
    never received
    
    1, 2, **3**, **4**
    
    This PR is the same thing as
    erigontech#9738 except with a test.
    
    Note... the test passes, but **this does not actually work in
    production** (for Ethereum mainnet with prysm as external CL).
    
    Why? Because in production, `h.sync.PrevUnwindPoint()` is always nil:
    https://github.com/ledgerwatch/erigon/blob/a5270bccf5e69a6beaaab9a0663bdad80e989505/turbo/stages/stageloop.go#L291
    which means the initial "if block" is never entered, and thus we have
    **no control** of increment/decrement `notifyFrom` during reorgs
    https://github.com/ledgerwatch/erigon/blob/a5270bccf5e69a6beaaab9a0663bdad80e989505/eth/stagedsync/stage_finish.go#L137-L146
    
    I don't know why `h.sync.PrevUnwindPoint()` is seemingly always nil, or
    how the test can pass if it fails in prod. I'm hoping to pass the baton
    to someone who might. Thank you @indanielo for original fix.
    
    If we can figure this bug out, it closes erigontech#8848 and closes erigontech#9568 and
    closes erigontech#10056
    
    ---------
    
    Co-authored-by: Daniel Gimenez <[email protected]>
    jotto and indanielo committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    4e56433 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    eac6f04 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c83ee65 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6e7efa2 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    382f881 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2024

  1. downloader: docs on MMAP for data-files r/w and experiments with bufio (

    erigontech#10074)
    
    Pros:
    - it allows to not pre-alloc files:
    erigontech#8688
    - it allows to not "sig-bus" when no space left on disk (return
    user-friendly error). see:
    erigontech#8500 - but DB will be MMAP
    anyway and may get "sig-bus"
    
    FYI:
    - seems no perf difference (but i tested only on cloud drives)
    - erigon will anyway open it as mmap 
     
    Cons: 
    - i did implemented `fsync` for mmap (
    anacrolix/torrent#755 ) - probably will need
    implement it for bufio: anacrolix/torrent#937
    - no zero-copy: more `alloc` memory will be holded by APP (PageCache
    starvation). I see 2x mem usage (at `--torrent.download.slots=500` 20gb
    vs 40gb)
    - i see "10K threads exchaused" error earlier (on
    `--torrent.download.slots=500`).
    - what else?
    AskAlexSharov committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    7ac8b10 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d450357 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ab0f633 View commit details
    Browse the repository at this point in the history
  4. Fetch and skip sync events (erigontech#10051)

    For period where there are not many sync events (mostly testnets) sync
    event fecthing can be slow becuase sync events are fetched at the end of
    every sprint.
    
    Fetching the next and looking at its block number optimizes this because
    fetches can be skipped until the next known block with sync events.
    mh0lt committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    5d92302 View commit details
    Browse the repository at this point in the history
  5. EIP-2537 (BLS12-381): use gnark instead of kilic (erigontech#10082)

    Cherry pick ethereum/go-ethereum#29441
    
    ---------
    
    Co-authored-by: Marius van der Wijden <[email protected]>
    Co-authored-by: Martin Holst Swende <[email protected]>
    3 people committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    2241e11 View commit details
    Browse the repository at this point in the history
  6. abi: fix abigen issue with make devtools (erigontech#10091)

    fixes erigontech#7593 
    
    it introduced a regression: `"fmt"` and `"reflect"` imports were added
    for all files generated by `abigen` assuming that they will be used in
    all cases, however that assumption was wrong for some cases resulting in
    invalid code being generated (in this case after running `make
    devtools`):
    <img width="982" alt="Screenshot 2024-04-27 at 10 50 37"
    src="https://github.com/ledgerwatch/erigon/assets/94537774/9a1b93a5-2141-40d9-8c9e-01a1ff6c031c">
    taratorio committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    00850e0 View commit details
    Browse the repository at this point in the history
  7. Caplin: Inclusion of VoluntaryExits, AttesterSlashings, `Proposer…

    …Slashing`s, `BlsExecutionToChange`s and `Attestation`s into block production (erigontech#10071)
    
    This PR add operations inclusion.
    ## Normal operations
    
    * BlsExecutionChange
    * VoluntaryExit
    * Slashings
    
    Each of these operations blacklist the index they work on so we do not
    have repeating indices for the same operations twice. we assume all
    signatures are pre-validated and just see if it is a good time to
    produce a block with them (by looking at their slot)
    ## Aggregated Attestations
    
    There is a lot of trash attestations on the network so we separate our
    algorithm in 3 steps:
    
    ### Eligibility
    
    We iterate over the entire pool of accumulated attestations and filter
    out all attestations who cannot be included at the current slot, and
    compute their expected reward. (filter out if 0).
    
    ### Ranking
    
    We rank the `Attestation`s by their expected reward (we just sort the
    array of candidates) by expected reward in ascending order.
    
    ### Filtering by superset
    
    We may have some supersets left-over, filter attestation which ends up
    being supersets of other. this process is done from highest reward down
    to lowest reward.
    Giulio2002 committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    b14b766 View commit details
    Browse the repository at this point in the history
  8. mdbx: Return err early in iter.Next() (erigontech#10078)

    `HasNext` will return true even with existing error and the application
    will expect a next entry. The `Next` function can get into an internal
    error (such as a `panic()`) while fetching the next cursor item and thus
    fail to return the error.
    
    ---------
    
    Co-authored-by: alex.sharov <[email protected]>
    somnathb1 and AskAlexSharov committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    d7d0960 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2024

  1. make: mocks using mockgen (erigontech#10098)

    - replaces usages of `moq` in `erigon-lib` with `mockgen` (gomock)
    - adds a `make mocks` and `mocks-clean` command for `erigon`
    - updates existing `make mocks` command and adds a `mocks-clean` common
    for `erigon-lib`
    taratorio committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    63578a8 View commit details
    Browse the repository at this point in the history
  2. mockgen: use typed mocks for compile time check (erigontech#10103)

    Use `mockgen -typed=true` to generate mocks with type-safe `Return`,
    `Do`, `DoAndReturn` function -
    https://github.com/uber-go/mock?tab=readme-ov-file#flags
    taratorio committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    4bc3bc6 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2024

  1. make: add gen commands (erigontech#10106)

    adds:
    - `make gen`
    - `make solc`
    - `make abigen`
    - `make codecgen`
    - `make gencodec`
    - `make graphql`
    
    tidies up `make devtools`
    taratorio committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    255be13 View commit details
    Browse the repository at this point in the history
  2. added print DBs table sizes (erigontech#10111)

    Added command to print databases tables basic info. There are two
    options :
    - print all info: ./build/bin/diag dbs all
    - print only populated tables and dbs: ./build/bin/diag dbs pop   
    
    Here is example output:
    ![Screenshot 2024-04-28 at 21 38
    18](https://github.com/ledgerwatch/erigon/assets/29065143/f0a04931-8d87-4c45-b71a-71d75404f3fc)
    
    
    @taratorio if you want I can add flag which will print specific DB.
    dvovk committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    e697459 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3ad651e View commit details
    Browse the repository at this point in the history
  4. Caplin: tweaks to make staking more stable. (erigontech#10097)

    Tweaks I did:
    1) Decreased attestation expiry down to 30 minutes
    2) Removed slot check in committeeSubAggregation
    3) More reliable algorithm for the dependent root
    
    Results:
    * Better aggregates
    * Less strain on the node
    * No blocks/attestations missed
    Giulio2002 committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    3b72b5a View commit details
    Browse the repository at this point in the history
  5. mdbx: pre-open read pagesize from db (erigontech#10113)

    Problem: if --pageSize parameter not set - we using `default pagesize`
    instead of `real pagesize of db`. And it causing different `dirtySpace`
    size (because it's accounted in "pages")
    AskAlexSharov committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    a12a99c View commit details
    Browse the repository at this point in the history
  6. RPC: Receipts LRU cache (erigontech#10112)

    for erigontech#10099
    for things like `eth_getTransactionReceipt`,
    `ots_searchTransactionsAfter`, etc...
    
    Also moved:
    - moved `api.chainConfig()` inside `api.getReceipts()`
    - switched `ots` to use blocks/receipts lru
    - switched price oracle to use blocks/receipts
    AskAlexSharov committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    83c95ba View commit details
    Browse the repository at this point in the history
  7. use sonar for code coverage badge (erigontech#10107)

    - use sonar badge for code coverage
    - remove unnecessary "Coverage" GitHub action and unnecessary duplicate
    test run on "devel" CI for it
    - the existing coverage job + badge didn't seem to be accurate (wasn't
    taking into account `erigon-lib` sub-module)
    
    <img width="982" alt="Screenshot 2024-04-29 at 12 06 46"
    src="https://github.com/ledgerwatch/erigon/assets/94537774/e47367ed-340d-42b5-ad00-2f59edce100c">
    taratorio committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    aed056f View commit details
    Browse the repository at this point in the history
  8. dvovk/limit mem usage (erigontech#10069)

    Implemented limit for saving peers in an Erigon node memory to be able
    to turn on diagnostics data collection by default.
    dvovk committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    2b83da1 View commit details
    Browse the repository at this point in the history
  9. chore: fix some function names (erigontech#10117)

    Signed-off-by: luchenhan <[email protected]>
    luchenhan committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    06dfaea View commit details
    Browse the repository at this point in the history
  10. Revert "backward compatibility of .lock" and Backward compatibility b…

    …y Giulio (erigontech#10077)
    
    Reverts erigontech#10006 and add a proper migration routine
    Giulio2002 committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    298e153 View commit details
    Browse the repository at this point in the history
  11. dvovk/enable_dignostic (erigontech#10083)

    Enabled diagnostics by default to collect data. It will allow to connect
    to node and get stored data. It includes three new flags:
    - "diagnostics.disabled" - it's set to "false" by default. Set to "true"
    if you want to disable diagnostics.
    - "diagnostics.endpoint.addr" - address of HTTP endpoint to get
    diagnostics data
    - "diagnostics.endpoint.port" - port of HTTP endpoint to get diagnostics
    data
    
    [DO NOT MERGE] as it depend on: 
    - erigontech#10069
    - update support command
    - update diagnostics UI
    dvovk committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    0967c5e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    287e4a2 View commit details
    Browse the repository at this point in the history
  13. Bor waypoint storage (erigontech#9793)

    Implementation of db and snapshot storage for additional synced hiemdall
    waypoint types
    
    * Checkpoint
    * Milestones
    
    This is targeted at the Astrid downloader which uses waypoints to verify
    headers during syncing and fork choice selection.
    
    Post milestones for heimdall these types are currently downloaded by
    erigon but not persisted locally. This change adds persistence for these
    types.
    
    In addition to the pure persistence changes this PR also contains a
    refactor step which is part of the process of extracting polygon related
    types from erigon core into a seperate package which may eventually be
    extracted to a separate module and possibly repo.
    
    The aim is rather than the core `turbo\snapshotsync\freezeblocks` having
    to know about types it manages and how to exaract and index their
    contents this can concern it self with a set of macro shard management
    actions.
    
    This process is partially completed by this PR, a final step will be to
    remove BorSnapshots and to simplify the places in the code which has to
    remeber to deal with them. This requires further testing so has been
    left out of this PR to avoid delays in delivering the base types.
    
    # Status
    
    * Waypont types and storage are complete and integrated in to the
    BorHeimdall stage, The code has been tested to check that types are
    inserted into mdbx, extracted and merged correctly
    * I have verified that when produced from block 0 the new snapshot
    correctly follow the merging strategy of existing snapshots
    * The functionality is enables by a **--bor.waypoints=true** this is
    false by default.
    
    # Testing
    
    This has been tested as follows:
    
    * Run a Mumbai instance to the tip and check current processing for
    milestones and checkpoints
    
    # Post merge steps
    
    * Produce and release snapshots for mumbai and bor mainnet
    * Check existing node upgrades
    * Remove --bor.waypoints flags
    mh0lt committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    714c259 View commit details
    Browse the repository at this point in the history
  14. Replace snaptype.AllTypes with local definitions (erigontech#10132)

    When adding bor waypont types I have removed snaptype.AllTypes because
    it causes package cross-dependencies.
    
    This fixes the places where all types have been used post the merge
    changes.
    mh0lt committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    b766820 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    dee2191 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. qa-tests: small improvements (erigontech#10127)

    This PR
    - avoids installing Golang on every test run, 
    - clean up the testbed datadir at the end of the test
    mriccobene committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    d8bf235 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7edc0b8 View commit details
    Browse the repository at this point in the history
  3. align deps of e35 and devel (erigontech#10136)

    - upgrade docker 
    - remove tendermint
    AskAlexSharov committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    9e7e8c3 View commit details
    Browse the repository at this point in the history
  4. core/types: disable go:generate codecgen for receipts and logs (erigo…

    …ntech#10105)
    
    running `go generate ./...` fails with:
    ```
    codecgen error: error running 'go run codecgen-main-2.generated.go': exit status 1, console: panic: encoding alphabet includes duplicate symbols
    
    goroutine 1 [running]:
    encoding/base64.NewEncoding(...)
        /usr/local/go/src/encoding/base64/base64.go:82
    github.com/ugorji/go/codec.init()
        /Users/milen/go/pkg/mod/github.com/ugorji/go/[email protected]/gen.go:168 +0xf1c
    exit status 2
    ```
    
    this is a problem when using go1.22 and it has been fixed here:
    -
    ugorji/go@8286c2d
    - issue: ugorji/go#407
    taratorio committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    70dfadd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    01e4969 View commit details
    Browse the repository at this point in the history
  6. Refactored types to force runtime registrations to be type dependent (e…

    …rigontech#10147)
    
    This resolves erigontech#10135
    
    All enums are constrained by their owning type which forces package
    includsion and hence type registration.
    
    Added tests for each type to check the construction cycle.
    mh0lt committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    1558fc7 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2024

  1. Configuration menu
    Copy the full SHA
    24a789b View commit details
    Browse the repository at this point in the history
  2. Set existing torrent webseeds after download (erigontech#10149)

    Fix a timing hole where torrents that get created before webseeds have
    been downloaded don't get webseeds set.
    mh0lt committed May 1, 2024
    Configuration menu
    Copy the full SHA
    8d21150 View commit details
    Browse the repository at this point in the history
  3. eth, txpool: enforce 30gwei for gas related configs for polygon (erig…

    …ontech#10158)
    
    Cherry-pick PR erigontech#10119 into the release
    
    Co-authored-by: Marcello Ardizzone <[email protected]>
    yperbasis and marcello33 committed May 1, 2024
    Configuration menu
    Copy the full SHA
    82262fe View commit details
    Browse the repository at this point in the history

Commits on May 2, 2024

  1. make: fix gen issue with mockgen not found in PATH (erigontech#10162) (

    …erigontech#10166)
    
    Fixes
    erigontech#10157 (comment)
    
    Problem was:
    ```
    grep -r -l --exclude-dir=erigon-lib "^// Code generated by MockGen. DO NOT EDIT.$" . | xargs rm -r
    ```
    
    was deleting the `mockgen` binary after it was built 🙃
    taratorio committed May 2, 2024
    Configuration menu
    Copy the full SHA
    697732d View commit details
    Browse the repository at this point in the history
  2. abigen: fix duplicate struct definitions (erigontech#10157) (erigonte…

    …ch#10164)
    
    fixes a 2nd regression introduced by -
    erigontech#7593
    
    - it generates duplicate struct types in the same package (check
    screenshot below)
    - also found a better way to fix the first regression with unused
    imports (improvement over
    erigontech#10091)
    
    <img width="1438" alt="Screenshot 2024-04-30 at 17 30 42"
    src="https://github.com/ledgerwatch/erigon/assets/94537774/154d484b-4b67-4104-8a6e-eac2423e1c0e">
    taratorio committed May 2, 2024
    Configuration menu
    Copy the full SHA
    9a010cd View commit details
    Browse the repository at this point in the history
  3. dvovk/pprof fix (erigontech#10155) (erigontech#10178)

    Cherry pick PR erigontech#10155 into the release
    
    Co-authored-by: Dmytro <[email protected]>
    yperbasis and dvovk committed May 2, 2024
    Configuration menu
    Copy the full SHA
    4079f4e View commit details
    Browse the repository at this point in the history
  4. Engine API: NewPayload fails with a "context canceled" error in Curre…

    …nt/GetHeader (erigontech#9786) (erigontech#9894)
    
    * improved logging
    * check ctx in ServeHTTP: The context might be cancelled if the client's
    connection was closed while waiting for ServeHTTP.
    * If execution API returns ExecutionStatus_Busy, limit retry attempts to
    10 seconds. This timeout must be lower than a typical client timeout (30
    sec), in order to give the client feedback about the server status.
    * If execution API returns ExecutionStatus_Busy, increase retry delay
    from 10 ms to 100 ms to avoid stalling ourselves with multiple busy
    loops. IMO this delay should be higher (e.g. 1 sec). Ideally we
    shouldn't do polling at all, but doing a blocking ctx call requires
    rearchitecting the ExecutionStatus_Busy logic.
    
    see erigontech#9786
    battlmonstr committed May 2, 2024
    Configuration menu
    Copy the full SHA
    bd1a458 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b59f04c View commit details
    Browse the repository at this point in the history

Commits on May 3, 2024

  1. Unnecessary Logs in sentry removed (erigontech#10190)

    Cherry pick PR erigontech#10187 into the release
    
    Co-authored-by: Giulio rebuffo <[email protected]>
    yperbasis and Giulio2002 committed May 3, 2024
    Configuration menu
    Copy the full SHA
    a5257bf View commit details
    Browse the repository at this point in the history
  2. nil block during execution (erigontech#10193)

    release cherry pick
    AskAlexSharov committed May 3, 2024
    Configuration menu
    Copy the full SHA
    6648899 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2024

  1. qa-tests: updating test workflow on release/2.60 (erigontech#10196)

    This PR brings the changes of erigontech#10195 to the branch release/2.60 with the
    necessary modifications
    mriccobene committed May 4, 2024
    Configuration menu
    Copy the full SHA
    49e0171 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2024

  1. qa-tests: fix workflows for release 2.60 (erigontech#10217)

    Running a test every day doesn't make sense on an inactive branch. 
    It also seems that the schedule trigger favours the main branch if the
    test workflow has the same name on the main and other branches.
    So this PR changes the test trigger to "push events".
    mriccobene committed May 6, 2024
    Configuration menu
    Copy the full SHA
    88680ca View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a1e1338 View commit details
    Browse the repository at this point in the history
  3. Blocks snaps - see 0 indices after reopen (erigontech#10219)

    Cherry pick PR erigontech#10214 into the release
    
    Co-authored-by: Alex Sharov <[email protected]>
    yperbasis and AskAlexSharov committed May 6, 2024
    Configuration menu
    Copy the full SHA
    948e781 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2024

  1. torrent v1.54.2-alpha-7 -> v1.54.2-alpha-8 (release/2.60) (erigontech…

    …#10224)
    
    This adds torrent fixes that remove bad peers due to non handling of
    http errs.
    mh0lt committed May 7, 2024
    Configuration menu
    Copy the full SHA
    40d1327 View commit details
    Browse the repository at this point in the history
  2. fixed start diag server (erigontech#10236)

    fixed start diag server if metrics address is different from pprof
    address
    
    ---------
    
    Co-authored-by: taratorio <[email protected]>
    dvovk and taratorio committed May 7, 2024
    Configuration menu
    Copy the full SHA
    764706d View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. Configuration menu
    Copy the full SHA
    7d41c27 View commit details
    Browse the repository at this point in the history
  2. downloader: --seedbox doesn't init snaptypes (erigontech#10245)

    Cherry pick PR erigontech#10215 into the release
    
    Co-authored-by: Alex Sharov <[email protected]>
    yperbasis and AskAlexSharov committed May 8, 2024
    Configuration menu
    Copy the full SHA
    32f7775 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

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

Commits on May 10, 2024

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

Commits on May 13, 2024

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

Commits on May 14, 2024

  1. remove nils from p2p logs (erigontech#10303)

    fix for 
    ```
    [p2p] Server                             protocol=68 peers=2 trusted=0 inbound=1 LOG15_ERROR= LOG15_ERROR= LOG15_ERROR= LOG15_ERROR= LOG15_ERROR= i/o timeout=53 EOF=65 closed by remote=215 too many peers=6 ecies: invalid message=5
    ```
    AskAlexSharov committed May 14, 2024
    Configuration menu
    Copy the full SHA
    e67eaaf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7883a4e View commit details
    Browse the repository at this point in the history

Commits on May 17, 2024

  1. fix Consensus specification tests CI (erigontech#10391) (erigontech#1…

    …0396)
    
    Cherry-pick:
    erigontech@bc5fa6f
    
    Need this to get PR CI green for v2.60.1 patches, e.g. -
    erigontech#10390
    
    Co-authored-by: Andrew Ashikhmin <[email protected]>
    taratorio and yperbasis committed May 17, 2024
    Configuration menu
    Copy the full SHA
    ce8b757 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2024

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

Commits on May 20, 2024

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

Commits on May 24, 2024

  1. fix gas price not right problem (erigontech#10456)

    Cherry pick PR erigontech#10451 into the release branch
    
    Co-authored-by: mars <[email protected]>
    yperbasis and marshalys committed May 24, 2024
    Configuration menu
    Copy the full SHA
    7fced9f View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. eth_estimateGas: default feeCap to base fee (erigontech#10499)

    Copy PR erigontech#10495 into the release branch
    yperbasis committed May 27, 2024
    Configuration menu
    Copy the full SHA
    c0be07d View commit details
    Browse the repository at this point in the history
  2. Add flag for bor waypoint types (erigontech#10501)

    Cherry pick PR erigontech#10281 into the release branch
    
    Co-authored-by: Mark Holt <[email protected]>
    Co-authored-by: alex.sharov <[email protected]>
    3 people committed May 27, 2024
    Configuration menu
    Copy the full SHA
    2e500bd View commit details
    Browse the repository at this point in the history
  3. try to fix 'method handler crashed' for debug_traceCall of erigontech…

    …#9090 (erigontech#10502)
    
    Cherry pick PR erigontech#10401 into the release branch
    
    Co-authored-by: mars <[email protected]>
    yperbasis and marshalys committed May 27, 2024
    Configuration menu
    Copy the full SHA
    b0df97f View commit details
    Browse the repository at this point in the history
  4. diagnostics: cherry pick speedtest disable (erigontech#10509)

    Cherry pick PR erigontech#10449 into the release branch
    dvovk committed May 27, 2024
    Configuration menu
    Copy the full SHA
    7e1adef View commit details
    Browse the repository at this point in the history
  5. Enable DNS p2p discovery on holesky (erigontech#10507)

    Cherry pick PR erigontech#10460 into the release branch
    
    Co-authored-by: Willian Mitsuda <[email protected]>
    yperbasis and wmitsuda committed May 27, 2024
    Configuration menu
    Copy the full SHA
    7b5653b View commit details
    Browse the repository at this point in the history
  6. fix eth_call 'method handler crashed' error when tx has set maxFeePer…

    …BlobGas (erigontech#10506)
    
    Cherry pick PR erigontech#10452 into the release branch
    
    Co-authored-by: mars <[email protected]>
    yperbasis and marshalys committed May 27, 2024
    Configuration menu
    Copy the full SHA
    d3af203 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2024

  1. e2: remove overlapped files only after merge (erigontech#10487)

    Otherwise: if start after `kill -9` in the middle of merge - may remove
    small files of 1 type of file, but leave small files of another type of
    files (which merge was not finished) - and leave node in un-mergable
    state: erigontech#10485
    
    ---------
    
    Co-authored-by: awskii <[email protected]>
    AskAlexSharov and awskii committed May 28, 2024
    Configuration menu
    Copy the full SHA
    608a940 View commit details
    Browse the repository at this point in the history
  2. add flag checking for pruning waypoints (erigontech#10508)

    Cherry pick PR erigontech#10468 into the release branch
    
    Co-authored-by: Mark Holt <[email protected]>
    yperbasis and mh0lt committed May 28, 2024
    Configuration menu
    Copy the full SHA
    e9840ad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9501f93 View commit details
    Browse the repository at this point in the history
  4. add lock to purgeMilestoneIDsList (erigontech#10524)

    Cherry pick PR erigontech#10493 into the release branch
    
    Co-authored-by: Mark Holt <[email protected]>
    yperbasis and mh0lt committed May 28, 2024
    Configuration menu
    Copy the full SHA
    128f015 View commit details
    Browse the repository at this point in the history
  5. polygon/heimdall: fix checkpoint json marshalling (erigontech#10530)

    Fixes a recent regression causing unwinds due to checkpoints having zero
    root hash:
    ```
    [WARN] [05-18|23:58:54.662] [bor] Root hash mismatch while whitelisting checkpoint expected=ac1c57270479250af3ce8eee90075cd8b2ba1bac55353105e063d9a4c87c743e got=0000000000000000000000000000000000000000000000000000000000000000
    [WARN] [05-18|23:58:54.662] [bor] Rewinding chain due to checkpoint root hash mismatch number=57125727
    ```
    
    Note this has already been fixed on Erigon 3 branch but as part of a
    non-related PR -
    https://github.com/ledgerwatch/erigon/pull/10124/files#diff-47d4532f399f2d6a45e6f19944a45c80bac573b4d1b5cb51485d0254229d1b16
    taratorio committed May 28, 2024
    Configuration menu
    Copy the full SHA
    f13762b View commit details
    Browse the repository at this point in the history

Commits on May 29, 2024

  1. Fix capacity for immediate appends (erigontech#10539)

    Cherry pick PR erigontech#10528 into the release branch
    
    Co-authored-by: Shoham Chakraborty <[email protected]>
    yperbasis and shohamc1 committed May 29, 2024
    Configuration menu
    Copy the full SHA
    b672fcb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c33912c View commit details
    Browse the repository at this point in the history

Commits on May 30, 2024

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

Commits on May 31, 2024

  1. blobGasPrice should be marshalled as hex (erigontech#10571)

    Cherry pick PR erigontech#10551 into the release branch
    yperbasis committed May 31, 2024
    Configuration menu
    Copy the full SHA
    efed89b View commit details
    Browse the repository at this point in the history
  2. Caplin: Fixed reforwarding of Bls Execution changes (erigontech#10577)

    Cherry pick PR erigontech#10546 into the release branch
    
    Co-authored-by: Giulio rebuffo <[email protected]>
    yperbasis and Giulio2002 committed May 31, 2024
    Configuration menu
    Copy the full SHA
    c3fcd76 View commit details
    Browse the repository at this point in the history
  3. Caplin: Proper "Normalization" of length of ForkVersions to 8 hex cha…

    …racters (erigontech#10578)
    
    Cherry pick PR erigontech#10512 into the release branch
    
    Co-authored-by: Giulio rebuffo <[email protected]>
    yperbasis and Giulio2002 committed May 31, 2024
    Configuration menu
    Copy the full SHA
    2e3d061 View commit details
    Browse the repository at this point in the history
  4. Caplin: Update BlobSidecars Beacon API endpoint to the latest specs (e…

    …rigontech#10580)
    
    Cherry pick PR erigontech#10576 into the release branch
    
    Co-authored-by: Giulio rebuffo <[email protected]>
    yperbasis and Giulio2002 committed May 31, 2024
    Configuration menu
    Copy the full SHA
    b29d137 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2024

  1. bor blocks retire: infinity loop fix (erigontech#10596)

    Problem: `+1` was added to maxBlockNum instead of minBlockNum
    for: erigontech#10554
    AskAlexSharov committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    5bbcc7a View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2024

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

Commits on Jun 5, 2024

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

Commits on Jun 10, 2024

  1. Fix potential p2p shutdown hangup (erigontech#10626)

    This is a fix for: 
    
    erigontech#10192
    
    This fixes is a deadlock in v4_udp.go where 
    * Thread A waits on mutex.Lock() in resetTimeout() called after reading
    listUpdate channel.
    * Thread B waits on listUpdate <- plist.PushBack(p) called after locking
    mutex.Lock()
      
    This fix decouples the list operations which need locking from the
    channel operations which don't by storing the changes in local
    variables. These updates are used for resetting a timeout - which is not
    order dependent.
    mh0lt committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    2222a11 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2024

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

Commits on Jun 14, 2024

  1. rpc: Fix incorrect txfeecap (erigontech#10643)

    Cherry pick PR erigontech#10636 to
    Erigon 2
    shohamc1 committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    fabed0c View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2024

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

Commits on Jun 18, 2024

  1. qa-tests: backport to release/2.60 improvements made to e3 github act…

    …ion workflows (erigontech#10778)
    
    This PR backports improvements that we added to the E3 tests: recording
    runner name and db version used for testing on MongoDB database.
    mriccobene committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    4fb2ef4 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2024

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

Commits on Jun 21, 2024

  1. Configuration menu
    Copy the full SHA
    847d786 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    79d0182 View commit details
    Browse the repository at this point in the history
  3. diagnostics: move E3 changes to E2 (erigontech#10806)

    Merged all the work done from main branch to keep diagnostics up to
    date.
    dvovk committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    2e590ce View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e8c5632 View commit details
    Browse the repository at this point in the history
  5. Fix NewPayload Validation during header download (erigontech#10837)

    Cherry pick PR erigontech#10093 into the release branch
    
    Co-authored-by: Minhyuk Kim <[email protected]>
    yperbasis and mininny committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    478b5b2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    478d144 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. Fix gas fee calculation for debug calls (erigontech#10880)

    Cherry pick PR erigontech#10825 into the release branch
    
    Co-authored-by: Minhyuk Kim <[email protected]>
    yperbasis and mininny committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    2fcf653 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

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

Commits on Jul 1, 2024

  1. Configuration menu
    Copy the full SHA
    ce300aa View commit details
    Browse the repository at this point in the history
  2. Fix conflicts

    boyuan-chen committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    b1bc29f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4b098c3 View commit details
    Browse the repository at this point in the history
  4. Fix depositTx in receipt

    boyuan-chen committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    1b42e46 View commit details
    Browse the repository at this point in the history
  5. Fix receipt

    boyuan-chen committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    ecd5afa View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2024

  1. Fix integration test

    boyuan-chen committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    c6feab8 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2024

  1. Configuration menu
    Copy the full SHA
    2e9bf15 View commit details
    Browse the repository at this point in the history
  2. Fix go.sum

    boyuan-chen committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    ac52e07 View commit details
    Browse the repository at this point in the history