diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e14f361ca9e..d158570452d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,31 +112,3 @@ jobs: - name: Test erigon-lib run: cd erigon-lib && make test-no-fuzz - -# docker-build-check: -# # don't run this on main - the PR must have run it to be merged and it misleads that this pushes the docker image -# if: (${{ github.event_name == 'push' || !github.event.pull_request.draft }}) && ${{ github.ref != 'refs/heads/main' }} -# runs-on: ubuntu-22.04 -# -# steps: -# - uses: AutoModality/action-clean@v1 -# - uses: actions/checkout@v4 -# with: -# fetch-depth: 0 # fetch git tags for "git describe" - -# - name: make docker (see dockerhub for image builds) -# run: DOCKER_TAG=thorax/erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker - - # check with root permissions, should be cached from previous build -# - name: sudo make docker -# run: sudo DOCKER_TAG=thorax/erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker - -# automated-tests: -# runs-on: -# ubuntu-22.04 -# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} -# steps: -# - uses: actions/checkout@v4 -# -# - name: run automated testing -# run: BUILD_ERIGON=1 ./tests/automated-testing/run.sh diff --git a/.github/workflows/docker-tags.yml b/.github/workflows/docker-tags.yml index d169a287bb9..8935ad16804 100644 --- a/.github/workflows/docker-tags.yml +++ b/.github/workflows/docker-tags.yml @@ -32,8 +32,6 @@ jobs: - run: | make release-dry-run docker images - # docker image push --all-tags thorax/erigon - # docker image push --all-tags ghcr.io/erigontech/erigon env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VERSION: ${GITHUB_REF#refs/tags/} diff --git a/.github/workflows/hive-nightly.yml b/.github/workflows/hive-nightly.yml index a96f579570d..ff2d28998e8 100644 --- a/.github/workflows/hive-nightly.yml +++ b/.github/workflows/hive-nightly.yml @@ -14,17 +14,10 @@ jobs: with: fetch-depth: 0 # fetch git tags for "git describe" - - name: build erigon image - run: DOCKER_TAG=thorax/erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker - - # check with root permissions, should be cached from previous build - - name: build erigon image (root permissions) - run: sudo DOCKER_TAG=thorax/erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker - - name: run hive and parse output run: | sudo mkdir -p /results-${{ github.run_id }} - docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}:/work thorax/hive:latest --sim ethereum/engine --results-root=/work/results-${{ github.run_id }} --client erigon_ci-$GITHUB_SHA --exit.fail=false + docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}:/work thorax/hive:latest --sim ethereum/engine --results-root=/work/results-${{ github.run_id }} --client erigon --exit.fail=false docker run --rm --pull always -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}:/work --entrypoint /app/hivecioutput thorax/hive:latest --resultsdir=/work/results-${{ github.run_id }} --outdir=/work/results-${{ github.run_id }} --exclusionsfile=/work/hive/exclusions.json - name: clean up containers diff --git a/.github/workflows/test-kurtosis-assertoor.yml b/.github/workflows/test-kurtosis-assertoor.yml index fff9bd6c672..fae60c89cc2 100644 --- a/.github/workflows/test-kurtosis-assertoor.yml +++ b/.github/workflows/test-kurtosis-assertoor.yml @@ -39,10 +39,6 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - name: make docker (see dockerhub for image builds) - run: DOCKER_TAG=thorax/erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker - - name: Install dependencies on Linux if: runner.os == 'Linux' run: sudo apt update && sudo apt install build-essential @@ -50,7 +46,7 @@ jobs: - name: download kurtosis config run: | wget -O kurtosis_config_with_p.yaml https://raw.githubusercontent.com/erigontech/erigon/main/.github/workflows/kurtosis/config.yaml - sed 's/<>/thorax\/erigon:ci-'$GITHUB_SHA'/' kurtosis_config_with_p.yaml > kurtosis_config.yaml + sed 's/<>/erigontech\/erigon:main-latest/' kurtosis_config_with_p.yaml > kurtosis_config.yaml - name: Run Kurtosis + assertoor tests uses: ethpandaops/kurtosis-assertoor-github-action@v1 diff --git a/Makefile b/Makefile index 7c58c02a28a..33763e88bc6 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ ERIGON_USER ?= erigon # if using volume-mounting data dir, then must exist on host OS DOCKER_UID ?= $(shell id -u) DOCKER_GID ?= $(shell id -g) -DOCKER_TAG ?= thorax/erigon:latest +DOCKER_TAG ?= erigontech/erigon:latest # Variables below for building on host OS, and are ignored for docker # @@ -294,25 +294,6 @@ release-dry-run: git-submodules -w /go/src/$(PACKAGE_NAME) \ ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \ --clean --skip=validate --skip=publish - -.PHONY: release -release: git-submodules - @docker run \ - --rm \ - --privileged \ - -e CGO_ENABLED=1 \ - -e GITHUB_TOKEN \ - -e DOCKER_USERNAME \ - -e DOCKER_PASSWORD \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v `pwd`:/go/src/$(PACKAGE_NAME) \ - -w /go/src/$(PACKAGE_NAME) \ - ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \ - --clean --skip=validate - - @docker image push --all-tags thorax/erigon - @docker image push --all-tags ghcr.io/erigontech/erigon - # since DOCKER_UID, DOCKER_GID are default initialized to the current user uid/gid, # we need separate envvars to facilitate creation of the erigon user on the host OS. ERIGON_USER_UID ?= 3473 @@ -342,13 +323,6 @@ user_macos: sudo dscl . -append /Groups/admin GroupMembership $(ERIGON_USER) sudo -u $(ERIGON_USER) mkdir -p /Users/$(ERIGON_USER)/.local/share -## hive: run hive test suite locally using docker e.g. OUTPUT_DIR=~/results/hive SIM=ethereum/engine make hive -.PHONY: hive -hive: - DOCKER_TAG=thorax/erigon:ci-local make docker - docker pull thorax/hive:latest - docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(OUTPUT_DIR):/work thorax/hive:latest --sim $(SIM) --results-root=/work/results --client erigon_ci-local # run erigon - ## automated-tests run automated tests (BUILD_ERIGON=0 to prevent erigon build with local image tag) .PHONY: automated-tests automated-tests: diff --git a/docker-compose.yml b/docker-compose.yml index 505d585cd83..a59017bba69 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ version: '2.2' # Basic erigon's service x-erigon-service: &default-erigon-service - image: thorax/erigon:${TAG:-latest} + image: erigontech/erigon:${TAG:-latest} pid: service:erigon # Use erigon's PID namespace. It's required to open Erigon's DB from another process (RPCDaemon local-mode) volumes_from: [ erigon ] restart: unless-stopped @@ -24,7 +24,7 @@ x-erigon-service: &default-erigon-service services: erigon: - image: thorax/erigon:${TAG:-latest} + image: erigontech/erigon:${TAG:-latest} build: args: UID: ${DOCKER_UID:-1000} diff --git a/k8s/base/statefulset.yaml b/k8s/base/statefulset.yaml index 5ff103ab86e..c22c750e62c 100644 --- a/k8s/base/statefulset.yaml +++ b/k8s/base/statefulset.yaml @@ -22,7 +22,7 @@ spec: command: - erigon env: [] - image: thorax/erigon + image: erigontech/erigon name: erigon ports: - containerPort: 9090 diff --git a/tests/automated-testing/docker-compose.yml b/tests/automated-testing/docker-compose.yml index cff9184f04b..17a8429b562 100644 --- a/tests/automated-testing/docker-compose.yml +++ b/tests/automated-testing/docker-compose.yml @@ -4,12 +4,12 @@ services: erigon: profiles: - first - image: thorax/erigon:$ERIGON_TAG + image: erigontech/erigon:$ERIGON_TAG command: | --datadir=/home/erigon/.local/share/erigon --chain=dev --private.api.addr=0.0.0.0:9090 --mine --log.dir.path=/logs/node1 ports: - "8551:8551" - volumes: + volumes: - datadir:/home/erigon/.local/share/erigon - ./logdir:/logs user: ${DOCKER_UID}:${DOCKER_GID} @@ -17,22 +17,22 @@ services: mem_swappiness: 0 erigon-node2: - profiles: - - second - image: thorax/erigon:$ERIGON_TAG - command: | - --datadir=/home/erigon/.local/share/erigon --chain=dev --private.api.addr=0.0.0.0:9090 --staticpeers=$ENODE --log.dir.path=/logs/node2 - volumes: - - datadir2:/home/erigon/.local/share/erigon - - ./logdir:/logs - user: ${DOCKER_UID}:${DOCKER_GID} - restart: unless-stopped - mem_swappiness: 0 + profiles: + - second + image: erigontech/erigon:$ERIGON_TAG + command: | + --datadir=/home/erigon/.local/share/erigon --chain=dev --private.api.addr=0.0.0.0:9090 --staticpeers=$ENODE --log.dir.path=/logs/node2 + volumes: + - datadir2:/home/erigon/.local/share/erigon + - ./logdir:/logs + user: ${DOCKER_UID}:${DOCKER_GID} + restart: unless-stopped + mem_swappiness: 0 rpcdaemon: profiles: - first - image: thorax/erigon:$ERIGON_TAG + image: erigontech/erigon:$ERIGON_TAG entrypoint: rpcdaemon command: | --private.api.addr=erigon:9090 --http.api=admin,eth,erigon,web3,net,debug,trace,txpool,parity --http.addr=0.0.0.0 --http.vhosts=any --http.corsdomain=* --http.port=8545 --graphql --log.dir.path=/logs/node1 @@ -44,7 +44,7 @@ services: rpcdaemon-node2: profiles: - second - image: thorax/erigon:$ERIGON_TAG + image: erigontech/erigon:$ERIGON_TAG entrypoint: rpcdaemon command: | --private.api.addr=erigon-node2:9090 --http.api=admin,eth,erigon,web3,net,debug,trace,txpool,parity --http.addr=0.0.0.0 --http.vhosts=any --http.corsdomain=* --http.port=8545 --log.dir.path=/logs/node2 diff --git a/tests/automated-testing/run.sh b/tests/automated-testing/run.sh index 78d608b0642..e1db87aea71 100755 --- a/tests/automated-testing/run.sh +++ b/tests/automated-testing/run.sh @@ -14,15 +14,17 @@ cd "$SCRIPT_DIR" || exit #export DOCKER_UID=1000 #export DOCKER_GID=1000 -# set GITHUB_SHA +# set SHORT_SHA if [ -z "$GITHUB_SHA" ]; then - export GITHUB_SHA=local + export SHORT_SHA=latest +else + export SHORT_SHA=${GITHUB_SHA::7} fi -echo "GITHUB_SHA=$GITHUB_SHA" +echo "SHORT_SHA=$SHORT_SHA" # set ERIGON_TAG if [ -z "$ERIGON_TAG" ]; then - export ERIGON_TAG=ci-$GITHUB_SHA + export ERIGON_TAG=main-$SHORT_SHA fi echo "ERIGON_TAG=$ERIGON_TAG" @@ -34,7 +36,7 @@ echo "BUILD_ERIGON=$BUILD_ERIGON" if [ "$BUILD_ERIGON" = 1 ] ; then echo "building erigon..." - cd ../../ && DOCKER_TAG=thorax/erigon:$ERIGON_TAG DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker + cd ../../ && DOCKER_TAG=erigontech/erigon:$ERIGON_TAG DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker fi # move back to the script directory