Skip to content

Commit

Permalink
Merge branch 'main' of github.com:erigontech/erigon into shutter-fixe…
Browse files Browse the repository at this point in the history
…s-to-block-tracker
  • Loading branch information
taratorio committed Mar 6, 2025
2 parents 901b675 + 17ca154 commit ce8625f
Show file tree
Hide file tree
Showing 117 changed files with 4,101 additions and 763 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd-main-branch-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ run-name: "Commit id ${{ github.sha }}: CI-CD build and deploy docker images bas

env:
APPLICATION: "erigon"
BUILDER_IMAGE: "golang:1.23-alpine"
BUILDER_IMAGE: "golang:1.24-alpine"
TARGET_BASE_IMAGE: "alpine:3.21"
APP_REPO: "erigontech/erigon"
CHECKOUT_REF: "main"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: ${{ contains(fromJSON('[
"refs/heads/release/2.60",
"refs/heads/release/2.61",
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: ${{ contains(fromJSON('[
"refs/heads/release/2.60",
"refs/heads/release/2.61",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.23'
go-version: '1.24'

- name: Install golangci-lint
if: runner.os == 'Linux'
uses: golangci/golangci-lint-action@v6
with:
version: v1.63.4
version: v1.64.6
skip-cache: true

- name: Lint
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/qa-rpc-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

jobs:
integration-test-suite:
runs-on: [ self-hosted, Erigon3 ]
runs-on: [ self-hosted, RpcSpecific ]
timeout-minutes: 15
env:
ERIGON_REFERENCE_DATA_DIR: /opt/erigon-versions/reference-version/datadir
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Checkout RPC Tests Repository & Install Requirements
run: |
rm -rf ${{ runner.workspace }}/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch v1.46.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch v1.49.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
cd ${{ runner.workspace }}/rpc-tests
pip3 install -r requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qa-rpc-performance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
include:
- chain: mainnet
backend: Erigon3
backend: RpcSpecific
#- chain: bor-mainnet
# backend: Polygon
runs-on: [ self-hosted, "${{ matrix.backend }}" ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-erigon-is-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- run: git submodule update --init --recursive --force
- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
- name: Install dependencies on Linux
if: runner.os == 'Linux'
run: sudo apt update && sudo apt install build-essential
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-hive-eest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup go env and cache
uses: actions/setup-go@v5
with:
go-version: '>=1.22'
go-version: '>=1.23'
go-version-file: 'hive/go.mod'

# Targetting the clients/erigon/Dockerfile.git in the Hive director -
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-hive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup go env and cache
uses: actions/setup-go@v5
with:
go-version: '>=1.22'
go-version: '>=1.23'
go-version-file: 'hive/go.mod'

# Targetting the clients/erigon/Dockerfile.git in the Hive director -
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-integration-caplin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: ${{ contains(fromJSON('[
"refs/heads/release/2.60",
"refs/heads/release/2.61",
Expand All @@ -50,7 +50,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: ${{ contains(fromJSON('[
"refs/heads/release/2.60",
"refs/heads/release/2.61",
Expand Down
59 changes: 58 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,64 @@
ChangeLog
---------

## v3.0.0-beta2 (in development)
## v3.1.0 (in development)

**Improvements:**

TODO

**Bugfixes:**

TODO

### TODO

- milestones:
https://github.com/erigontech/erigon/milestone/31


## v3.0.0 (in development)


### Milestone

https://github.com/erigontech/erigon/milestone/30

## v3.0.0-rc2

**Bugfixes:**

- Caplin: error on aggregation_bit merge by @domiwei in https://github.com/erigontech/erigon/pull/14063
- Pectra: fix bad deposit contract deposit unmarshalling by @Giulio2002 in https://github.com/erigontech/erigon/pull/14068

### Milestone

https://github.com/erigontech/erigon/milestone/36

## v3.0.0-rc1

**Improvements:**

- Schedule Pectra for Chiado by @yperbasis in https://github.com/erigontech/erigon/pull/13898
- stagedsync: dbg option to log receipts on receipts hash mismatch (#13905) by @taratorio in https://github.com/erigontech/erigon/pull/13940
- Introduces a new method for estimating transaction gas that targets the maximum gas a contract could use (#13913). Fixes eth_estimateGas for historical blocks (#13903) by @somnathb1 in https://github.com/erigontech/erigon/pull/13916

**Bugfixes:**

- rpcdaemon: Show state sync transactions in eth_getLogs (#13924) by @shohamc1 in https://github.com/erigontech/erigon/pull/13951
- polygon/heimdall: fix snapshot store last entity to check in snapshots too (#13845) by @taratorio in https://github.com/erigontech/erigon/pull/13938
- Implemented wait if heimdall is not synced to the chain (#13807) by @taratorio in https://github.com/erigontech/erigon/pull/13939

**Known Problems:**

- polygon: `eth_getLogs` if search by filters - doesn't return state-sync (state-sync events are not indexed yet). Without filter can see state-sync events. In `eth_getReceipts` also can see. [Will](https://github.com/erigontech/erigon/issues/14003) release fixed files in E3.1
- polygon: `eth_getLogs` state-sync events have incorrect `index` field. [Will](https://github.com/erigontech/erigon/issues/14003) release fixed files in E3.1

### Milestone

https://github.com/erigontech/erigon/milestone/34

## v3.0.0-beta2

### Breaking changes
- Reverts Optimize gas by default in eth_createAccessList #8337
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax = docker/dockerfile:1.2
FROM docker.io/library/golang:1.22.12-alpine3.20 AS builder
FROM docker.io/library/golang:1.24.1-alpine3.20 AS builder

RUN apk --no-cache add build-base linux-headers git bash ca-certificates libstdc++

Expand All @@ -18,7 +18,7 @@ RUN --mount=type=cache,target=/root/.cache \
make BUILD_TAGS=nosqlite,noboltdb,nosilkworm all


FROM docker.io/library/golang:1.22.12-alpine3.20 AS tools-builder
FROM docker.io/library/golang:1.24.1-alpine3.20 AS tools-builder
RUN apk --no-cache add build-base linux-headers git bash ca-certificates libstdc++
WORKDIR /app

Expand All @@ -36,7 +36,7 @@ RUN --mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/go/pkg/mod \
make db-tools

FROM docker.io/library/alpine:3.19
FROM docker.io/library/alpine:3.20

# install required runtime libs, along with some helpers for debugging
RUN apk add --no-cache ca-certificates libstdc++ tzdata
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax = docker/dockerfile:1.2
FROM docker.io/library/golang:1.21-bullseye AS builder
FROM docker.io/library/golang:1.24-bullseye AS builder

RUN apt update
RUN apt install -y build-essential git bash ca-certificates libstdc++6
Expand All @@ -17,7 +17,7 @@ RUN --mount=type=cache,target=/root/.cache \
make all


FROM docker.io/library/golang:1.21-alpine3.17 AS tools-builder
FROM docker.io/library/golang:1.24-alpine3.20 AS tools-builder

RUN apk --no-cache add build-base linux-headers git bash ca-certificates libstdc++
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG RELEASE_DOCKER_BASE_IMAGE="debian:12.8-slim" \
CI_CD_MAIN_BUILDER_IMAGE="golang:1.22-bookworm" \
CI_CD_MAIN_BUILDER_IMAGE="golang:1.24-bookworm" \
CI_CD_MAIN_TARGET_BASE_IMAGE="alpine:3" \
UID_ERIGON=1000 \
GID_ERIGON=1000 \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Set `--prune.mode` to "archive" if you need an archive node or to "minimal" if y
System Requirements
===================

RAM: >=32GB, [Golang >= 1.22](https://golang.org/doc/install); GCC 10+ or Clang; On Linux: kernel > v4. 64-bit
RAM: >=32GB, [Golang >= 1.23](https://golang.org/doc/install); GCC 10+ or Clang; On Linux: kernel > v4. 64-bit
architecture.

- ArchiveNode Ethereum Mainnet: 2TB (April 2024). FullNode: 1.1TB (June 2024)
Expand Down Expand Up @@ -680,7 +680,7 @@ Windows users may run erigon in 3 possible ways:
build on windows :
* [Git](https://git-scm.com/downloads) for Windows must be installed. If you're cloning this repository is very
likely you already have it
* [GO Programming Language](https://golang.org/dl/) must be installed. Minimum required version is 1.22
* [GO Programming Language](https://golang.org/dl/) must be installed. Minimum required version is 1.23
* GNU CC Compiler at least version 13 (is highly suggested that you install `chocolatey` package manager - see
following point)
* If you need to build MDBX tools (i.e. `.\wmake.ps1 db-tools`)
Expand Down
2 changes: 1 addition & 1 deletion cl/aggregation/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (t *PoolTestSuite) TestAddAttestationElectra() {
CommitteeBits: cBits1,
}
att2 := &solid.Attestation{
AggregationBits: solid.BitlistFromBytes([]byte{0b00001100}, 2048*64),
AggregationBits: solid.BitlistFromBytes([]byte{0b00001101}, 2048*64),
Data: attData1,
Signature: [96]byte{'d', 'e', 'f', 'g', 'h', 'i'},
CommitteeBits: cBits2,
Expand Down
8 changes: 4 additions & 4 deletions cl/beacon/synced_data/mock_services/synced_data_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions cl/cltypes/solid/bitlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ func (u *BitList) removeMsb() {
// addMsb adds a most significant bit to the list, but doesn't change the length l.
func (u *BitList) addMsb() int {
byteLen := len(u.u)
found := false
for i := len(u.u) - 1; i >= 0; i-- {
if u.u[i] != 0 {
msb := bits.Len8(u.u[i])
Expand All @@ -152,10 +153,16 @@ func (u *BitList) addMsb() int {
} else {
u.u[i] |= 1 << uint(msb)
}
found = true
break
}
byteLen--
}
if !found {
u.u[0] = 1
byteLen = 1
}
u.l = byteLen
return byteLen
}

Expand Down Expand Up @@ -267,7 +274,7 @@ func (u *BitList) Merge(other *BitList) (*BitList, error) {
}
// copy by the longer one
var ret, unionFrom *BitList
if u.l < other.l {
if u.Bits() < other.Bits() {
ret = other.Copy()
unionFrom = u
} else {
Expand All @@ -276,13 +283,10 @@ func (u *BitList) Merge(other *BitList) (*BitList, error) {
}
// union
unionFrom.removeMsb()
ret.removeMsb()
for i := 0; i < unionFrom.l; i++ {
ret.u[i] |= unionFrom.u[i]
}
unionFrom.addMsb()
byteLen := ret.addMsb()
ret.l = byteLen
return ret, nil
}

Expand Down
3 changes: 2 additions & 1 deletion cmd/integration/commands/stages.go
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ func stagePolygonSync(db kv.TemporalRwDB, ctx context.Context, logger log.Logger

stageState := stage(stageSync, tx, nil, stages.PolygonSync)
cfg := stagedsync.NewPolygonSyncStageCfg(&ethconfig.Defaults, logger, chainConfig, nil, heimdallClient,
heimdallStore, bridgeStore, nil, 0, nil, blockReader, nil, 0, unwindTypes, nil /* notifications */, nil)
heimdallStore, bridgeStore, nil, 0, nil, blockReader, nil, 0, unwindTypes, nil /* notifications */, nil, nil)
// we only need blockReader and blockWriter (blockWriter is constructed in NewPolygonSyncStageCfg)
if unwind > 0 {
u := stageSync.NewUnwindState(stageState.ID, stageState.BlockNumber-unwind, stageState.BlockNumber, true, false)
Expand Down Expand Up @@ -1591,6 +1591,7 @@ func newSync(ctx context.Context, db kv.TemporalRwDB, miningConfig *params.Minin
stagedsync.StageSendersCfg(db, sentryControlServer.ChainConfig, cfg.Sync, false, dirs.Tmp, cfg.Prune, blockReader, sentryControlServer.Hd),
stagedsync.StageMiningExecCfg(db, miner, events, *chainConfig, engine, &vm.Config{}, dirs.Tmp, nil, 0, nil, blockReader),
stagedsync.StageMiningFinishCfg(db, *chainConfig, engine, miner, miningCancel, blockReader, builder.NewLatestBlockBuiltStore()),
false,
),
stagedsync.MiningUnwindOrder,
stagedsync.MiningPruneOrder,
Expand Down
5 changes: 3 additions & 2 deletions cmd/observer/database/db_retrier.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package database

import (
"context"
"math/rand"
"math/rand/v2"
"time"

"github.com/erigontech/erigon-lib/log/v3"
Expand All @@ -38,7 +38,8 @@ func retryBackoffTime(attempt int) time.Duration {
if attempt <= 0 {
return 0
}
jitter := rand.Int63n(30 * time.Millisecond.Nanoseconds() * int64(attempt)) // nolint: gosec

jitter := rand.Int64N(30 * time.Millisecond.Nanoseconds() * int64(attempt)) // nolint: gosec
var ns int64
if attempt <= 6 {
ns = ((50 * time.Millisecond.Nanoseconds()) << (attempt - 1)) + jitter
Expand Down
2 changes: 1 addition & 1 deletion cmd/state/exec3/historical_trace_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"sync/atomic"
"time"

"github.com/erigontech/erigon-lib/chain/networkname"
"golang.org/x/sync/errgroup"

"github.com/erigontech/erigon-lib/chain"
"github.com/erigontech/erigon-lib/chain/networkname"
"github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/datadir"
"github.com/erigontech/erigon-lib/common/dbg"
Expand Down
2 changes: 1 addition & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@ func setBorConfig(ctx *cli.Context, cfg *ethconfig.Config, nodeConfig *nodecfg.C
heimdall.RecordWayPoints(cfg.WithHeimdallWaypointRecording || cfg.PolygonSync || cfg.PolygonSyncStage)

chainConfig := params.ChainConfigByChainName(ctx.String(ChainFlag.Name))
if chainConfig.Bor != nil && !ctx.IsSet(MaxPeersFlag.Name) {
if chainConfig != nil && chainConfig.Bor != nil && !ctx.IsSet(MaxPeersFlag.Name) {
// override default max devp2p peers for polygon as per
// https://forum.polygon.technology/t/introducing-our-new-dns-discovery-for-polygon-pos-faster-smarter-more-connected/19871
// which encourages high peer count
Expand Down
Loading

0 comments on commit ce8625f

Please sign in to comment.