Skip to content

Commit

Permalink
Merge branch 'main' into badcursor
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Nov 5, 2024
2 parents 7102c0a + 2b248ca commit 1edc029
Show file tree
Hide file tree
Showing 613 changed files with 13,036 additions and 14,730 deletions.
File renamed without changes.
18 changes: 1 addition & 17 deletions .github/workflows/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,15 @@ on:
workflow_dispatch:

jobs:
# check-snap-modifications:
# runs-on: ubuntu-24.04
# outputs:
# modified: ${{ steps.check-modified.outputs.modified }}
#
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 2 # Ensures we fetch enough history to compare
#
# - name: Is erigontech/erigon-snapshot updated in go.mod # if not, pipeline should exit because grep exit code >0 when no match
# run: |
# git diff HEAD~1 HEAD -- go.mod | grep 'github.com/erigontech/erigon-snapshot'

ManifestCheck:
# needs: check-snap-modifications
if: github.event.pull_request.draft == false
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- run: sudo apt update && sudo apt install build-essential
go-version: '1.23'
- run: make downloader
- run: echo $ModModified
- run: ./build/bin/downloader manifest-verify --chain mainnet
Expand Down
109 changes: 9 additions & 100 deletions .github/workflows/qa-rpc-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
integration-test-suite:
runs-on: [self-hosted, Erigon3]
runs-on: [ self-hosted, Erigon3 ]
env:
ERIGON_REFERENCE_DATA_DIR: /opt/erigon-versions/reference-version/datadir
ERIGON_TESTBED_DATA_DIR: /opt/erigon-testbed/datadir
Expand Down Expand Up @@ -85,7 +85,11 @@ jobs:
rm -rf ./mainnet/results/
# Run RPC integration test runner via http
python3 ./run_tests.py -p 8545 --continue -f --json-diff -x debug_,\
python3 ./run_tests.py -p 8545 --continue -f --json-diff -x \
debug_accountRange,debug_getModifiedAccountsByHash,debug_getModifiedAccountsByNumber,debug_storageRangeAt,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,\
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,\
debug_traceTransaction,\
engine_exchangeCapabilities/test_1.json,\
engine_exchangeTransitionConfigurationV1/test_01.json,\
engine_getClientVersionV1/test_1.json,\
Expand Down Expand Up @@ -114,15 +118,7 @@ jobs:
erigon_getLatestLogs/test_11.json,\
erigon_getLatestLogs/test_12.json,\
erigon_getBalanceChangesInBlock,\
eth_callBundle/test_09.json,\
eth_callBundle/test_12.json,\
eth_createAccessList/test_06.json,\
eth_createAccessList/test_07.json,\
eth_createAccessList/test_15.json,\
eth_createAccessList/test_16.json,\
eth_getBlockTransactionCountByHash/test_02.json,\
eth_getBlockTransactionCountByNumber/test_08.json,\
eth_getUncleCountByBlockHash/test_03.json,\
parity_getBlockReceipts/test_01.json,\
parity_getBlockReceipts/test_02.json,\
parity_getBlockReceipts/test_03.json,\
Expand All @@ -133,64 +129,9 @@ jobs:
parity_getBlockReceipts/test_08.json,\
parity_getBlockReceipts/test_09.json,\
parity_getBlockReceipts/test_10.json,\
trace_call/test_02.json,\
trace_call/test_04.tar,\
trace_call/test_08.tar,\
trace_call/test_11.tar,\
trace_call/test_13.json,\
trace_call/test_17.tar,\
trace_call/test_19.tar,\
trace_call/test_20.json,\
trace_callMany/test_01.json,\
trace_callMany/test_02.json,\
trace_callMany/test_03.json,\
trace_callMany/test_04.json,\
trace_callMany/test_05.json,\
trace_callMany/test_06.json,\
trace_callMany/test_07.json,\
trace_callMany/test_08.json,\
trace_callMany/test_09.json,\
trace_callMany/test_10.json,\
trace_callMany/test_11.json,\
trace_callMany/test_12.json,\
trace_filter/test_16.json,\
trace_rawTransaction/test_01.json,\
trace_rawTransaction/test_03.json,\
trace_replayBlockTransactions/test_01.tar,\
trace_replayBlockTransactions/test_02.tar,\
trace_replayBlockTransactions/test_03.tar,\
trace_replayBlockTransactions/test_04.tar,\
trace_replayBlockTransactions/test_05.tar,\
trace_replayBlockTransactions/test_08.tar,\
trace_replayBlockTransactions/test_10.json,\
trace_replayBlockTransactions/test_11.json,\
trace_replayBlockTransactions/test_13.tar,\
trace_replayBlockTransactions/test_14.tar,\
trace_replayBlockTransactions/test_15.tar,\
trace_replayBlockTransactions/test_16.tar,\
trace_replayBlockTransactions/test_17.tar,\
trace_replayBlockTransactions/test_18.tar,\
trace_replayBlockTransactions/test_19.tar,\
trace_replayBlockTransactions/test_20.tar,\
trace_replayBlockTransactions/test_21.tar,\
trace_replayBlockTransactions/test_22.tar,\
trace_replayBlockTransactions/test_23.tar,\
trace_replayBlockTransactions/test_24.tar,\
trace_replayBlockTransactions/test_25.tar,\
trace_replayTransaction/test_02.tar,\
trace_replayTransaction/test_03.tar,\
trace_replayTransaction/test_04.tar,\
trace_replayTransaction/test_05.tar,\
trace_replayTransaction/test_06.tar,\
trace_replayTransaction/test_07.tar,\
trace_replayTransaction/test_10.tar,\
trace_replayTransaction/test_11.tar,\
trace_replayTransaction/test_14.tar,\
trace_replayTransaction/test_16.tar,\
trace_replayTransaction/test_18.tar,\
trace_replayTransaction/test_23.tar,\
trace_replayTransaction/test_24.json,\
trace_replayTransaction/test_29.tar,\
admin_nodeInfo/test_01.json,\
admin_peers/test_01.json,\
erigon_nodeInfo/test_1.json,\
Expand Down Expand Up @@ -228,50 +169,18 @@ jobs:
eth_submitWork/test_1.json,\
net_peerCount/test_1.json,\
net_version/test_1.json,\
ots_getBlockDetails/test_01.json,\
ots_getBlockDetails/test_02.json,\
ots_getBlockDetails/test_03.json,\
ots_getBlockDetails/test_04.json,\
ots_getBlockDetails/test_05.json,\
ots_getBlockDetailsByHash/test_01.json,\
ots_getBlockDetailsByHash/test_02.json,\
ots_getBlockDetailsByHash/test_03.json,\
ots_getBlockDetailsByHash/test_04.json,\
ots_getBlockTransactions/test_01.json,\
ots_getBlockTransactions/test_02.json,\
ots_getBlockTransactions/test_03.json,\
ots_getBlockTransactions/test_04.json,\
ots_getBlockTransactions/test_05.json,\
ots_searchTransactionsBefore/test_13.json,\
trace_call/test_05.json,\
trace_call/test_07.json,\
trace_call/test_12.json,\
trace_call/test_14.json,\
trace_call/test_15.json,\
trace_call/test_16.json,\
trace_call/test_18.json,\
txpool_content/test_01.json,\
txpool_status/test_1.json,\
web3_clientVersion/test_1.json,\
eth_estimateGas/test_14.json,\
trace_replayBlockTransactions/test_26.tar,\
trace_replayBlockTransactions/test_28.tar,\
trace_replayBlockTransactions/test_29.tar,\
trace_replayBlockTransactions/test_31.tar,\
trace_replayBlockTransactions/test_32.tar,\
trace_replayBlockTransactions/test_33.tar,\
trace_replayBlockTransactions/test_34.tar,\
trace_replayBlockTransactions/test_35.tar,\
trace_replayTransaction/test_31.json,\
trace_replayTransaction/test_32.json,\
trace_replayTransaction/test_34.json
trace_replayBlockTransactions/test_29.tar
# Capture test runner script exit status
test_exit_status=$?
# Save the subsection reached status
echo "::set-output name=test_executed::true"
# Check test runner exit status
if [ $test_exit_status -eq 0 ]; then
echo "tests completed successfully"
Expand All @@ -280,7 +189,7 @@ jobs:
else
echo "error detected during tests"
echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT"
# Save failed results to a directory with timestamp and commit hash
cp -r ${{ runner.workspace }}/rpc-tests/integration/mainnet/results/ $RPC_PAST_TEST_DIR/mainnet_$(date +%Y%m%d_%H%M%S)_integration_$commit_http/
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qa-rpc-test-bisection-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Checkout RPC Tests Repository & Install Requirements
run: |
rm -rf $GITHUB_WORKSPACE/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch v1.00.0 https://github.com/erigontech/rpc-tests $GITHUB_WORKSPACE/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch v1.0.0 https://github.com/erigontech/rpc-tests $GITHUB_WORKSPACE/rpc-tests
cd $GITHUB_WORKSPACE/rpc-tests
pip3 install -r requirements.txt
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/test-hive-eest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Hive EEST tests

on:
push:
branches:
- release/*
- main
workflow_dispatch:

jobs:
test-hive-eest:
runs-on: ubuntu-latest
steps:
- name: Checkout Hive
uses: actions/checkout@v4
with:
repository: danceratopz/hive
ref: prague-devnet-4
path: hive
- name: Setup go env and cache
uses: actions/setup-go@v5
with:
go-version: '>=1.22'
go-version-file: 'hive/go.mod'

# Targetting the clients/erigon/Dockerfile.git in the Hive director -
# this builds the container from github and uses it for tests
- name: Get dependencies and build hive
run: |
cd hive
git status
go get . >> buildlogs.log
rm clients/erigon/Dockerfile
mv clients/erigon/Dockerfile.git clients/erigon/Dockerfile
branch_name=$(echo ${GITHUB_REF#refs/heads/} | sed 's/[&/\]/\\&/g')
echo Building Hive with Erigon branch - $branch_name
sed -i "s/^ARG github=ledgerwatch\/erigon$/ARG github=erigontech\/erigon/" clients/erigon/Dockerfile
sed -i "s/^ARG tag=main$/ARG tag=${branch_name}/" clients/erigon/Dockerfile
if [[ "$branch_name" != "main" ]]; then
sed -i "/$sync.parallel-state-flushing/d" clients/erigon/erigon.sh
fi
go build . >> buildlogs.log
# Depends on the last line of hive output that prints the number of suites, tests and failed
# Currently, we fail even if suites and tests are too few, indicating the tests did not run
# We also fail if more than half the tests fail
- name: Run hive tests and parse output
run: |
cd hive
run_suite() {
echo -e "\n\n============================================================"
echo "Running test: ${1}"
echo -e "\n"
./hive --sim 'ethereum/eest/consume-engine' --client erigon 2>&1 | tee output.log || {
if [ $? -gt 0 ]; then
echo "Exitcode gt 0"
fi
}
status_line=$(tail -2 output.log | head -1 | sed -r "s/\x1B\[[0-9;]*[a-zA-Z]//g")
suites=$(echo "$status_line" | sed -n 's/.*suites=\([0-9]*\).*/\1/p')
if [ -z "$suites" ]; then
status_line=$(tail -1 output.log | sed -r "s/\x1B\[[0-9;]*[a-zA-Z]//g")
suites=$(echo "$status_line" | sed -n 's/.*suites=\([0-9]*\).*/\1/p')
fi
tests=$(echo "$status_line" | sed -n 's/.*tests=\([0-9]*\).*/\1/p')
failed=$(echo "$status_line" | sed -n 's/.*failed=\([0-9]*\).*/\1/p')
echo -e "\n"
echo "----------- Results for ${1} -----------"
echo "Tests: $tests, Failed: $failed"
echo -e "\n\n============================================================"
if (( tests < 4 )); then
echo "Too few tests run for suite ${1} - ${tests} tests"
exit 1
fi
if (( failed*2 > tests )); then
echo "Too many failures for suite ${1} - ${failed} failed out of ${tests}"
exit 1
fi
}
run_suite eest/consume-engine
19 changes: 12 additions & 7 deletions .github/workflows/test-hive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test Hive
on:
push:
branches:
# - main
- main
- release/*
- docker_pectra
schedule:
Expand Down Expand Up @@ -57,10 +57,15 @@ jobs:
echo "Exitcode gt 0"
fi
}
last_line=$(tail -2 output.log | head -1 | sed -r "s/\x1B\[[0-9;]*[a-zA-Z]//g")
suites=$(echo "$last_line" | sed -n 's/.*suites=\([0-9]*\).*/\1/p')
tests=$(echo "$last_line" | sed -n 's/.*tests=\([0-9]*\).*/\1/p')
failed=$(echo "$last_line" | sed -n 's/.*failed=\([0-9]*\).*/\1/p')
status_line=$(tail -2 output.log | head -1 | sed -r "s/\x1B\[[0-9;]*[a-zA-Z]//g")
suites=$(echo "$status_line" | sed -n 's/.*suites=\([0-9]*\).*/\1/p')
if [ -z "$suites" ]; then
status_line=$(tail -1 output.log | sed -r "s/\x1B\[[0-9;]*[a-zA-Z]//g")
suites=$(echo "$status_line" | sed -n 's/.*suites=\([0-9]*\).*/\1/p')
fi
tests=$(echo "$status_line" | sed -n 's/.*tests=\([0-9]*\).*/\1/p')
failed=$(echo "$status_line" | sed -n 's/.*failed=\([0-9]*\).*/\1/p')
echo -e "\n"
echo "----------- Results for ${1}-${2} -----------"
echo "Tests: $tests, Failed: $failed"
Expand All @@ -75,9 +80,9 @@ jobs:
exit 1
fi
}
run_suite engine exchange-capabilities
run_suite engine withdrawals
run_suite engine cancun
run_suite engine exchange-capabilities
run_suite engine auth
run_suite engine api
run_suite engine auth
run_suite rpc compat
11 changes: 11 additions & 0 deletions .github/workflows/test-integration-caplin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: ${{ contains(fromJSON('[
"refs/heads/release/2.60",
"refs/heads/release/2.61",
"refs/heads/main"
]'), github.ref) }}

- name: Install dependencies on Linux
if: runner.os == 'Linux'
run: sudo apt update && sudo apt install build-essential
Expand All @@ -45,6 +51,11 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: ${{ contains(fromJSON('[
"refs/heads/release/2.60",
"refs/heads/release/2.61",
"refs/heads/main"
]'), github.ref) }}

- uses: actions/cache@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-kurtosis-assertoor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
BUILD_VERSION: ${{ inputs.docker_build_tag }}
DOCKER_URL: ${{ env.DOCKERHUB_REPOSITORY }}
run: |
wget -O kurtosis_config_with_p.yaml https://raw.githubusercontent.com/erigontech/erigon/main/.github/workflows/kurtosis/config.yaml
wget -O kurtosis_config_with_p.yaml https://raw.githubusercontent.com/erigontech/erigon/main/.github/workflows/kurtosis/config.properties
sed 's#<<ERIGON_IMAGE_PLACEHOLDER>>#${{ env.DOCKER_URL }}:${{ env.BUILD_VERSION }}#g' kurtosis_config_with_p.yaml > kurtosis_config.yaml
- name: Run Kurtosis + assertoor tests
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,18 @@ test: test-erigon-lib
test-integration: test-erigon-lib
$(GOTEST) --timeout 240m -tags $(BUILD_TAGS),integration

## test-hive run the hive tests locally off nektos/act workflows simulator
test-hive:
@if ! command -v act >/dev/null 2>&1; then \
echo "act command not found in PATH, please source it in PATH. If nektosact is not installed, install it by visiting https://nektosact.com/installation/index.html"; \
elif [ -z "$(GITHUB_TOKEN)"]; then \
echo "Please export GITHUB_TOKEN var in the environment" ; \
elif [ "$(SUITE)" = "eest" ]; then \
act -j test-hive-eest -s GITHUB_TOKEN=$(GITHUB_TOKEN) ; \
else \
act -j test-hive -s GITHUB_TOKEN=$(GITHUB_TOKEN) ; \
fi

## lint-deps: install lint dependencies
lint-deps:
@cd erigon-lib && $(MAKE) lint-deps
Expand Down
Loading

0 comments on commit 1edc029

Please sign in to comment.