Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Nov 7, 2024
2 parents 057fc3b + fb6f8f4 commit 8fed6a4
Show file tree
Hide file tree
Showing 19 changed files with 176 additions and 382 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/ci-cd-main-branch-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
CHECKOUT_REF: "main"
DOCKERHUB_REPOSITORY: "erigontech/erigon"
LABEL_DESCRIPTION: "[docker image built on a last commit id from the main branch] Erigon is an implementation of Ethereum (execution layer with embeddable consensus layer), on the efficiency frontier. Archive Node by default."
KEEP_IMAGES: 100

on:
push:
Expand Down Expand Up @@ -127,7 +128,7 @@ jobs:
--push \
--platform linux/amd64,linux/arm64 .
- name: export and print docker build tag
- name: export and print docker build tag, cleanup old docker images
id: built_tag_export
env:
BUILD_VERSION: "main-${{ steps.getCommitId.outputs.short_commit_id }}"
Expand All @@ -136,11 +137,41 @@ jobs:
echo The following docker images have been published:
echo "${{ env.DOCKERHUB_REPOSITORY }}:main-${{ env.BUILD_VERSION }}"
echo "${{ env.DOCKERHUB_REPOSITORY }}:main-latest"
echo
echo "Cleanup old docker images matching pattern tag ~= main-XXXXXXX"
curl_cmd="curl -s -H \"Authorization: JWT ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}\" "
dockerhub_url='https://hub.docker.com/v2/namespaces/erigontech/repositories/erigon'
my_list () {
# First page:
next_page="$dockerhub_url/tags?page=1&page_size=100"
while [ "$next_page" != "null" ]
do
# Print tags and push dates for tags matching "main-":
$curl_cmd $next_page | jq -r '.results|.[]|.name + " " + .tag_last_pushed' | grep 'main-'
next_page=`$curl_cmd $next_page | jq '.next' | sed -e 's/^\"//' -e 's/\"$//'`
done
}
my_list | tail -n+${{ env.KEEP_IMAGES }} | while read line; do
echo -n "Removing docker image/published - $line "
current_image=$(echo $line | sed -e 's/^\(main-.\{7\}\) .*/\1/')
output_code=$(curl --write-out %{http_code} --output curl-output.log \
-s -X DELETE -H "Accept: application/json" \
-H "Authorization: JWT ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }}" \
https://hub.docker.com/v2/repositories/erigontech/erigon/tags/${current_image} )
if [ $output_code -ne 204 ]; then
echo "ERROR: failed to remove docker image erigon:${current_image}"
echo "ERROR: API response: $(cat curl-output.log)."
else
echo -n " - removed. "
fi
echo "Done."
done
run-kurtosis-assertoor:
needs: [define_matrix, Build]
uses: erigontech/erigon/.github/workflows/test-kurtosis-assertoor.yml@main
with:
checkout_ref: ${{ github.sha }}
os: ${{ needs.define_matrix.outputs.os }}
docker_build_tag: ${{ needs.Build.outputs.docker_build_tag }}
docker_build_tag: ${{ needs.Build.outputs.docker_build_tag }}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'

- name: Install golangci-lint
if: runner.os == 'Linux'
Expand Down
47 changes: 3 additions & 44 deletions .github/workflows/qa-rpc-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,51 +84,10 @@ jobs:
cd ${{ runner.workspace }}/rpc-tests/integration
rm -rf ./mainnet/results/
# Run RPC integration test runner via http
python3 ./run_tests.py -p 8545 --continue -f --json-diff -x \
# false positives: Erigon return expected response. but rpc-test somehow doesn't see 1 field.
erigon_getHeaderByHash,erigon_getHeaderByNumber,eth_feeHistory,\
# total difficulty field was removed, then added back
eth_getBlockByHash,eth_getBlockByNumber,\
# Erigon bugs
debug_accountRange,debug_storageRangeAt,\
# need update rpc-test - because Erigon is correct (@AskAlexSharov will do after https://github.com/erigontech/erigon/pull/12634)
debug_getModifiedAccountsByHash,debug_getModifiedAccountsByNumber,\
# Erigon bug https://github.com/erigontech/erigon/issues/12603
erigon_getLatestLogs,erigon_getLogsByHash/test_04.json,\
# Erigon bug https://github.com/erigontech/erigon/issues/12637
debug_traceBlockByNumber/test_05.tar,debug_traceBlockByNumber/test_08.tar,debug_traceBlockByNumber/test_09.tar,debug_traceBlockByNumber/test_10.tar,debug_traceBlockByNumber/test_11.tar,debug_traceBlockByNumber/test_12.tar,\
# remove this line after https://github.com/erigontech/rpc-tests/pull/281
parity_getBlockReceipts,\
# to investigate
debug_traceBlockByHash,\
debug_traceCallMany/test_02.tar,debug_traceCallMany/test_04.tar,debug_traceCallMany/test_05.tar,debug_traceCallMany/test_06.tar,debug_traceCallMany/test_07.tar,debug_traceCallMany/test_09.json,debug_traceCallMany/test_10.tar,\
engine_exchangeCapabilities/test_1.json,\
engine_exchangeTransitionConfigurationV1/test_01.json,\
engine_getClientVersionV1/test_1.json,\
erigon_getBalanceChangesInBlock,\
eth_createAccessList/test_16.json,\
trace_filter/test_16.json,\
trace_rawTransaction/test_01.json,\
trace_rawTransaction/test_03.json,\
admin_nodeInfo/test_01.json,\
admin_peers/test_01.json,\
erigon_nodeInfo/test_1.json,\
eth_coinbase/test_01.json,\
eth_getTransactionByHash/test_02.json,\
eth_getWork/test_01.json,\
eth_mining/test_01.json,\
eth_protocolVersion/test_1.json,\
eth_submitHashrate/test_1.json,\
eth_submitWork/test_1.json,\
net_peerCount/test_1.json,\
net_version/test_1.json,\
txpool_content/test_01.json,\
txpool_status/test_1.json,\
web3_clientVersion/test_1.json,\
eth_estimateGas/test_14.json,\
trace_replayBlockTransactions/test_29.tar
chmod +x ${{ runner.workspace }}/erigon/.github/workflows/scripts/run_rpc_tests.sh
${{ runner.workspace }}/erigon/.github/workflows/scripts/run_rpc_tests.sh
# Capture test runner script exit status
test_exit_status=$?
Expand Down
98 changes: 98 additions & 0 deletions .github/workflows/scripts/run_rpc_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#!/bin/bash

set +e # Disable exit on error

# Array of disabled tests
disabled_tests=(
# Erigon2 and Erigon3 never supported this api methods
trace_rawTransaction
# false positives: Erigon return expected response. but rpc-test somehow doesn't see 1 field.
erigon_getHeaderByHash,erigon_getHeaderByNumber,eth_feeHistory
# total difficulty field was removed, then added back
eth_getBlockByHash,eth_getBlockByNumber
# Erigon bugs
debug_accountRange,debug_storageRangeAt
# need update rpc-test - because Erigon is correct (@AskAlexSharov will do after https://github.com/erigontech/erigon/pull/12634)
debug_getModifiedAccountsByHash,debug_getModifiedAccountsByNumber
# Erigon bug https://github.com/erigontech/erigon/issues/12603
erigon_getLatestLogs,erigon_getLogsByHash/test_04.json
# Erigon bug https://github.com/erigontech/erigon/issues/12637
debug_traceBlockByNumber/test_05.tar
debug_traceBlockByNumber/test_08.tar
debug_traceBlockByNumber/test_09.tar
debug_traceBlockByNumber/test_10.tar
debug_traceBlockByNumber/test_11.tar
debug_traceBlockByNumber/test_12.tar
# remove this line after https://github.com/erigontech/rpc-tests/pull/281
parity_getBlockReceipts
# to investigate
debug_traceBlockByHash
debug_traceCallMany/test_02.tar
debug_traceCallMany/test_04.tar
debug_traceCallMany/test_05.tar
debug_traceCallMany/test_06.tar
debug_traceCallMany/test_07.tar
debug_traceCallMany/test_09.json
debug_traceCallMany/test_10.tar
engine_exchangeCapabilities/test_1.json
engine_exchangeTransitionConfigurationV1/test_01.json
engine_getClientVersionV1/test_1.json
erigon_getBalanceChangesInBlock
eth_createAccessList/test_16.json
admin_nodeInfo/test_01.json
admin_peers/test_01.json
erigon_nodeInfo/test_1.json
eth_coinbase/test_01.json
eth_getTransactionByHash/test_02.json
eth_getWork/test_01.json
eth_mining/test_01.json
eth_protocolVersion/test_1.json
eth_submitHashrate/test_1.json
eth_submitWork/test_1.json
net_peerCount/test_1.json
net_version/test_1.json
txpool_content/test_01.json
txpool_status/test_1.json
web3_clientVersion/test_1.json
eth_estimateGas/test_14.json
trace_replayBlockTransactions/test_29.tar
# recently started to fail
debug_traceTransaction/test_20.json
debug_traceTransaction/test_21.json
debug_traceTransaction/test_22.json
debug_traceTransaction/test_25.json
debug_traceTransaction/test_30.tar
debug_traceTransaction/test_33.json
debug_traceTransaction/test_35.tar
debug_traceTransaction/test_36.json
debug_traceTransaction/test_37.tar
debug_traceTransaction/test_38.tar
debug_traceTransaction/test_43.json
debug_traceTransaction/test_44.json
debug_traceTransaction/test_62.json
debug_traceTransaction/test_64.json
debug_traceTransaction/test_74.tar
debug_traceTransaction/test_75.tar
debug_traceTransaction/test_77.json
debug_traceTransaction/test_78.tar
debug_traceTransaction/test_79.tar
debug_traceTransaction/test_80.tar
debug_traceTransaction/test_81.tar
debug_traceTransaction/test_82.tar
debug_traceTransaction/test_83.tar
debug_traceTransaction/test_84.tar
debug_traceTransaction/test_85.tar
debug_traceTransaction/test_87.json
debug_traceTransaction/test_90.tar
debug_traceTransaction/test_91.tar
debug_traceTransaction/test_92.tar
debug_traceTransaction/test_93.json
debug_traceTransaction/test_96.json
trace_filter/test_16.json)

# Transform the array into a comma-separated string
disabled_test_list=$(IFS=,; echo "${disabled_tests[*]}")

python3 ./run_tests.py -p 8545 --continue -f --json-diff -x "$disabled_test_list"

exit $?
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ GO_FLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} -X ${PACKAGE}

GOBUILD = ${CPU_ARCH} CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" GOPRIVATE="$(GOPRIVATE)" $(GO) build $(GO_FLAGS)
GO_DBG_BUILD = ${CPU_ARCH} CGO_CFLAGS="$(CGO_CFLAGS) -DMDBX_DEBUG=1" CGO_LDFLAGS="$(CGO_LDFLAGS)" GOPRIVATE="$(GOPRIVATE)" $(GO) build -tags $(BUILD_TAGS),debug -gcflags=all="-N -l" # see delve docs
GOTEST = ${CPU_ARCH} CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" GOPRIVATE="$(GOPRIVATE)" GODEBUG=cgocheck=0 GOTRACEBACK=1 $(GO) test $(GO_FLAGS) ./...
GOTEST = ${CPU_ARCH} CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" GOPRIVATE="$(GOPRIVATE)" GODEBUG=cgocheck=0 GOTRACEBACK=1 $(GO) test $(GO_FLAGS) ./... -p 2

default: all

Expand Down
131 changes: 0 additions & 131 deletions cl/phase1/forkchoice/fork_graph/diff_storage/diff_storage.go

This file was deleted.

Loading

0 comments on commit 8fed6a4

Please sign in to comment.