Skip to content

Commit

Permalink
upstream alpha7
Browse files Browse the repository at this point in the history
  • Loading branch information
blxdyx committed Dec 19, 2024
2 parents 92a97b3 + 34714c0 commit e24e248
Show file tree
Hide file tree
Showing 219 changed files with 9,933 additions and 7,577 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/kurtosis/regular-assertoor.io
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ participants_matrix:
el_image: test/erigon:current
cl:
- cl_type: lighthouse
cl_image: sigp/lighthouse:v6.0.0
- cl_type: nimbus
cl_image: statusim/nimbus-eth2:multiarch-v24.11.0
network_params:
#electra_fork_epoch: 1
min_validator_withdrawability_delay: 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
if: runner.os == 'Linux'
uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0
args: --help
version: v1.62.2
skip-cache: true

- name: Lint
if: runner.os == 'Linux'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qa-rpc-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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.22.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch v1.26.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
cd ${{ runner.workspace }}/rpc-tests
pip3 install -r requirements.txt
Expand Down
168 changes: 92 additions & 76 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
name: Release
run-name: "Build release ${{ inputs.release_version}} from branch ${{ inputs.checkout_ref }} by @${{ github.actor}}"
run-name: Build release ${{ inputs.release_version}} from branch ${{ inputs.checkout_ref }} by @${{ github.actor }}

env:
APPLICATION: "bsc-erigon"
BUILDER_IMAGE: "ghcr.io/goreleaser/goreleaser-cross:v1.22.7"
DOCKER_BASE_IMAGE: "alpine:3.20.3"
BUILDER_IMAGE: "golang:1.22-bookworm"
DOCKER_BASE_IMAGE: "debian:12.8-slim"
APP_REPO: "node-real/bsc-erigon"
PACKAGE: "github.com/erigontech/erigon"
DOCKERHUB_REPOSITORY: "node-real/bsc-erigon"
DOCKERFILE_PATH: "Dockerfile.release"
GITHUB_AUTOMATION_EMAIL: "[email protected]"
GITHUB_AUTOMATION_NAME: "Erigon Github Automation"
LABEL_DESCRIPTION: "Erigon is an implementation of Ethereum (execution layer with embeddable consensus layer), on the efficiency frontier. Archive Node by default."

on:
push:
branches-ignore:
- '**'
workflow_dispatch:
inputs:
checkout_ref:
Expand All @@ -27,13 +22,12 @@ on:
release_version:
required: true
type: string
description: 'Release version number (Pattern - v#.#.# , f.e. v2.60.8 or v3.0.0 or v3.0.0-alpha1 for pre-releases. Prefix it with "v".)'
description: 'Release version number (Pattern - v#.#.# , f.e. v2.60.1 or v3.0.0 or v3.0.0-alpha1 for pre-releases. Use prefix "v".)'
perform_release:
required: false
type: boolean
default: false
description: 'perform_release: when set then all artifacts will be published and the DRAFT of the release
notes will be created.'
description: 'perform_release: when set then all artifacts will be published and the DRAFT of the release notes will be created.'
publish_latest_tag:
required: false
type: boolean
Expand All @@ -43,27 +37,29 @@ on:
jobs:

build-release:
## runs-on: ubuntu-22.04
runs-on: [self-hosted, prod-cicd-runners]
runs-on: ubuntu-latest
#runs-on: ubuntu-latest-devops-xxlarge
timeout-minutes: 75
name: Create git tag, build and publish Artifacts
name: Create git tag, build and publish Release Artifacts
outputs:
commit-id: ${{ steps.getCommitId.outputs.id }}
short-commit-id: ${{ steps.getCommitId.outputs.short_commit_id }}
application: ${{ env.APPLICATION }}
parsed-version: ${{ steps.getCommitId.outputs.parsed_version}}

steps:
- name: Checkout git repository ${{ env.APP_REPO }}
- name: Checkout git repository ${{ env.APP_REPO }} reference ${{ inputs.checkout_ref }}
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 ## 4.1.7 release
with:
repository: ${{ env.APP_REPO }}
fetch-depth: 0
ref: ${{ inputs.checkout_ref }}
path: 'erigon'

- name: Check if tag ${{ inputs.release_version }} already exists in case perform_release is set.
- name: Check if tag ${{ inputs.release_version }} already exists and create it in case perform_release is set.
if: ${{ (inputs.perform_release) && (inputs.release_version != '') }}
run: |
cd erigon
if git ls-remote --exit-code --quiet --tags origin '${{ inputs.release_version }}'; then
echo "ERROR: tag ${{ inputs.release_version }} exists and workflow is performing release. Exit."
exit 1
Expand All @@ -74,12 +70,14 @@ jobs:
echo; echo "Git TAG ${{ inputs.release_version }} created and pushed."
fi
- name: Get commit id
- name: Run some commands, get commit id
id: getCommitId
run: |
mkdir $GITHUB_WORKSPACE/build-arm64 $GITHUB_WORKSPACE/build-amd64 $GITHUB_WORKSPACE/build-amd64v2
echo "id=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "short_commit_id=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT
echo "parsed_version=$(echo ${{ inputs.release_version }} | sed -e 's/^v//g')" >> $GITHUB_OUTPUT
echo "week_of_the_year=$(/bin/date -u "+%Y-%W")" >> $GITHUB_OUTPUT
- name: ghcr-login
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 ## v3.3.0
Expand All @@ -94,74 +92,108 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db ## v3.6.1

- name: Build binaries with goreleaser
- name: Setup GO build and pkg cache for one week only
id: cache
uses: actions/cache@v4
with:
key: cache-year-week-${{ steps.getCommitId.outputs.week_of_the_year }}-go.mod-hash:${{ hashFiles('erigon/go.mod') }}
path: |
~/go/pkg
~/.cache
- name: Build for linux/arm64
run: >
docker run --platform linux/arm64
--rm
-v $(pwd)/erigon:/erigon:ro
-v ${GITHUB_WORKSPACE}/build-arm64:/erigon-build
-v ${HOME}/.cache:/root/.cache
-v ${HOME}/go/pkg/mod:/go/pkg/mod
-w /erigon --entrypoint /bin/bash
${{ env.BUILDER_IMAGE }}
-c "git config --global --add safe.directory /erigon;
make GOARCH=arm64 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm
erigon downloader devnet evm caplin diag integration rpcdaemon sentry txpool"
## temporary disable silkworm in 3.x.x
- name: Build for linux/amd64 (with nosilkworm tag)
run: >
docker run --platform linux/amd64
--rm
-v $(pwd)/erigon:/erigon:ro
-v ${GITHUB_WORKSPACE}/build-amd64:/erigon-build
-v ${HOME}/.cache:/root/.cache
-v ${HOME}/go/pkg/mod:/go/pkg/mod
-w /erigon --entrypoint /bin/bash
${{ env.BUILDER_IMAGE }}
-c "git config --global --add safe.directory /erigon;
make GOARCH=amd64 GOAMD64=v1 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm
erigon downloader devnet evm caplin diag integration rpcdaemon sentry txpool;
if [ ${WITH_SILKWORM} ]; then find / -name libsilkworm_capi.so -exec install {} /erigon-build \; ; fi;"
## temporary disable silkworm in 3.x.x
- name: Build for linux/amd64/v2 (with nosilkworm tag)
run: >
docker run --platform linux/amd64/v2
--rm
-v $(pwd)/erigon:/erigon:ro
-v ${GITHUB_WORKSPACE}/build-amd64v2:/erigon-build
-v ${HOME}/.cache:/root/.cache
-v ${HOME}/go/pkg/mod:/go/pkg/mod
-w /erigon --entrypoint /bin/bash
${{ env.BUILDER_IMAGE }}
-c "git config --global --add safe.directory /erigon;
make GOARCH=amd64 GOAMD64=v2 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm
erigon downloader devnet evm caplin diag integration rpcdaemon sentry txpool;
if [ ${WITH_SILKWORM} ]; then find / -name libsilkworm_capi.so -exec install {} /erigon-build \; ; fi;"
- name: Create archives and checksums
env:
BUILD_VERSION: ${{ inputs.release_version }}
DOCKER_URL: ghcr.io/${{github.repository}}
RELEASE_VERSION: ${{ inputs.release_version }}
run: |
docker run --rm \
-w /${{ env.APPLICATION }}/ \
-e BUILD_VERSION=${{ env.BUILD_VERSION }} \
-e GIT_COMMIT=${{ steps.getCommitId.outputs.id }} \
-e GIT_BRANCH=${{ inputs.checkout_ref }} \
-e GIT_TAG=${{ inputs.release_version }} \
-e PACKAGE=${{ env.PACKAGE }} \
-e APPLICATION=${{ env.APPLICATION }} \
-v $(pwd):/${{ env.APPLICATION}} \
-v /var/run/docker.sock:/var/run/docker.sock \
${{ env.BUILDER_IMAGE }} release --timeout 60m0s --clean --skip=validate,announce,publish
echo "DEBUG: ls -lao in the working directory"
ls -lao
echo "DEBUG: content of the dist/ directory"
find dist/ -ls
cd ${GITHUB_WORKSPACE}
mkdir $GITHUB_WORKSPACE/release
for dir in build-*; do
cd $dir
echo Current directory is $(pwd) . Checksum file and archive will be created for this directory
sha256sum * > checksums.txt
tar czvf $GITHUB_WORKSPACE/release/${APPLICATION}_${RELEASE_VERSION}_linux_$(echo $dir | sed 's,build-,,').tar.gz \
--transform "s,^./,${APPLICATION}_${RELEASE_VERSION}_linux_$(echo $dir | sed 's,build-,,')/," .
cd -
done
cd $GITHUB_WORKSPACE/release
sha256sum * > ${APPLICATION}_${RELEASE_VERSION}_checksums.txt
echo Content of release directory:
find . -type f -ls
- name: Upload artifact -- linux/arm64
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a ## v4.3.6
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz
path: ./dist/${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz
retention-days: 1
path: ${{ github.workspace }}/release/${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz
retention-days: 3
compression-level: 0
if-no-files-found: error

- name: Upload artifact -- linux/amd64
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a ## v4.3.6
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
path: ./dist/${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
retention-days: 1
path: ${{ github.workspace }}/release/${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
retention-days: 3
compression-level: 0
if-no-files-found: error

- name: Upload artifact -- linux/amd64/v2
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a ## v4.3.6
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
path: ./dist/${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
retention-days: 1
compression-level: 0
if-no-files-found: error

- name: Upload artifact -- darwin/arm64
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a ## v4.3.6
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_darwin_arm64.tar.gz
path: ./dist/${{ env.APPLICATION }}_${{ inputs.release_version }}_darwin_arm64.tar.gz
retention-days: 1
compression-level: 0
if-no-files-found: error

- name: Upload artifact -- darwin/amd64
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a ## v4.3.6
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_darwin_amd64.tar.gz
path: ./dist/${{ env.APPLICATION }}_${{ inputs.release_version }}_darwin_amd64.tar.gz
retention-days: 1
path: ${{ github.workspace }}/release/${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
retention-days: 3
compression-level: 0
if-no-files-found: error



build-debian-pkg:
name: Debian packages
needs: [ build-release ]
Expand All @@ -171,7 +203,6 @@ jobs:
version: ${{ needs.build-release.outputs.parsed-version }}



publish-docker-image:
needs: [ build-release ]
runs-on: ubuntu-latest
Expand All @@ -192,19 +223,16 @@ jobs:
uses: actions/download-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz
path: dist/

- name: Download amd64 artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz
path: dist/

- name: Download amd64v2 artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
path: dist/

- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf ## v3.2.0
Expand Down Expand Up @@ -278,18 +306,6 @@ jobs:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz
path: dist/

- name: Download darwin/amd64 artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_darwin_amd64.tar.gz
path: dist/

- name: Download darwin/arm64 artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_darwin_arm64.tar.gz
path: dist/

- name: Download arm64 debian package
uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/scripts/run_rpc_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ disabled_tests=(
eth_coinbase/test_01.json
eth_createAccessList/test_16.json
eth_getTransactionByHash/test_02.json
# Small prune issue that leads to wrong ReceiptDomain data at 16999999 (probably at every million) block: https://github.com/erigontech/erigon/issues/13050
ots_searchTransactionsBefore/test_04.tar
eth_getWork/test_01.json
eth_mining/test_01.json
eth_protocolVersion/test_1.json
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test-kurtosis-assertoor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:
- name: Fast checkout git repository
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 ## v3.3.0
with:
username: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_USERNAME }}
password: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}

- name: Docker build current branch
run: |
docker build -t test/erigon:current .
Expand All @@ -39,4 +45,4 @@ jobs:
enclave_name: "kurtosis-run2-${{ github.run_id }}"
ethereum_package_args: ".github/workflows/kurtosis/pectra.io"
kurtosis_extra_args: --verbosity detailed --cli-log-level trace
persistent_logs: "true"
persistent_logs: "true"
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ linters:
- testifylint #TODO: enable me
- gocheckcompilerdirectives
- protogetter
- recvcheck #TODO: enable me
enable:
- unconvert
# - predeclared #TODO: enable me
Expand Down
17 changes: 16 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,21 @@ ChangeLog
- milestone: https://github.com/erigontech/erigon/milestone/5
- Known problem:
- external CL support
- `erigon_getLatestLogs` not emplimented
- `erigon_getLatestLogs` not implemented

### Acknowledgements:

## v3.0.0-alpha7

### Improvements:

- Faster eth_getTransactionReceipt with "txn-granularity cache" in https://github.com/erigontech/erigon/pull/13134 and "executing only 1 txn" https://github.com/erigontech/erigon/pull/12424
- Return PrunedError when trying to read unavailable historical data in https://github.com/erigontech/erigon/pull/13014

### Fixes:

- Fix trace_block returning "insufficient funds" (Issues #12525 and similar) with standalone rpcdaemon in https://github.com/erigontech/erigon/pull/13129


### Acknowledgements:

Expand All @@ -36,6 +50,7 @@ ChangeLog
### New features:

- Reduced `.idx` and `.efi` files size by 25% (require re-sync)
- Support: `debug_getRawReceipts`
- debian packages
- `--externalcl` support
- bor-mainnet can work on 32G machine
Expand Down
Loading

0 comments on commit e24e248

Please sign in to comment.