Skip to content

Commit 46623ef

Browse files
committed
Merge remote-tracking branch 'refs/remotes/upstream/op-erigon' into op-erigon
# Conflicts: # go.mod
2 parents 101e888 + 038c167 commit 46623ef

File tree

1,908 files changed

+260071
-65197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,908 files changed

+260071
-65197
lines changed

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Commit hash:
1616

1717
Erigon Command (with flags/config):
1818

19-
Concensus Layer:
19+
Consensus Layer:
2020

21-
Concensus Layer Command (with flags/config):
21+
Consensus Layer Command (with flags/config):
2222

2323
Chain/Network:
2424

.github/workflows/ci.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,19 @@ jobs:
2929
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
3030
strategy:
3131
matrix:
32-
os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments
32+
# list of os: https://github.com/actions/virtual-environments
33+
os:
34+
- ubuntu-22.04
35+
- macos-13
3336
runs-on: ${{ matrix.os }}
3437

3538
steps:
3639
- uses: actions/checkout@v3
40+
with:
41+
fetch-depth: 0
3742
- uses: actions/setup-go@v4
3843
with:
39-
go-version: '1.20'
44+
go-version: '1.21'
4045
- name: Install dependencies on Linux
4146
if: runner.os == 'Linux'
4247
run: sudo apt update && sudo apt install build-essential
@@ -56,9 +61,9 @@ jobs:
5661
5762
- name: Install golangci-lint
5863
if: runner.os == 'Linux'
59-
uses: golangci/golangci-lint-action@v3
64+
uses: golangci/golangci-lint-action@v4
6065
with:
61-
version: v1.54.2
66+
version: v1.57.2
6267
skip-build-cache: true
6368
args: --help
6469

@@ -73,6 +78,14 @@ jobs:
7378
- name: Test
7479
run: make test
7580

81+
- name: SonarCloud
82+
if: runner.os == 'Linux'
83+
uses: SonarSource/[email protected]
84+
env:
85+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
86+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
87+
continue-on-error: true
88+
7689
tests-windows:
7790
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
7891
strategy:
@@ -88,7 +101,7 @@ jobs:
88101
- uses: actions/checkout@v3
89102
- uses: actions/setup-go@v4
90103
with:
91-
go-version: '1.20'
104+
go-version: '1.21'
92105

93106
- uses: actions/cache@v3
94107
with:
@@ -98,8 +111,8 @@ jobs:
98111
key: chocolatey-${{ matrix.os }}
99112
- name: Install dependencies
100113
run: |
101-
choco upgrade mingw -y --no-progress --version 11.2.0.07112021
102-
choco install cmake -y --no-progress --version 3.23.1
114+
choco upgrade mingw -y --no-progress --version 13.2.0
115+
choco install cmake -y --no-progress --version 3.27.8
103116
104117
- name: Build
105118
run: .\wmake.ps1 all
@@ -113,7 +126,8 @@ jobs:
113126
docker-build-check:
114127
# don't run this on devel - the PR must have run it to be merged and it misleads that this pushes the docker image
115128
if: (${{ github.event_name == 'push' || !github.event.pull_request.draft }}) && ${{ github.ref != 'refs/heads/devel' }}
116-
runs-on: ubuntu-20.04
129+
runs-on: ubuntu-22.04
130+
117131
steps:
118132
- uses: AutoModality/action-clean@v1
119133
- uses: actions/checkout@v3
@@ -129,7 +143,7 @@ jobs:
129143

130144
# automated-tests:
131145
# runs-on:
132-
# ubuntu-20.04
146+
# ubuntu-22.04
133147
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
134148
# steps:
135149
# - uses: actions/checkout@v3

.github/workflows/coverage.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.github/workflows/hive.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: QA - Clean exit (block downloading)
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/2.*'
7+
pull_request:
8+
branches:
9+
- 'release/2.*'
10+
types:
11+
- ready_for_review
12+
workflow_dispatch: # Run manually
13+
14+
jobs:
15+
clean-exit-bd-test:
16+
runs-on: [self-hosted, Erigon2]
17+
env:
18+
ERIGON_REFERENCE_DATA_DIR: /opt/erigon-versions/reference-version/datadir
19+
ERIGON_TESTBED_DATA_DIR: /opt/erigon-testbed/datadir
20+
ERIGON_QA_PATH: /home/qarunner/erigon-qa
21+
WORKING_TIME_SECONDS: 600
22+
CHAIN: mainnet
23+
24+
steps:
25+
- name: Check out repository
26+
uses: actions/checkout@v4
27+
28+
- name: Clean Erigon Build Directory
29+
run: |
30+
make clean
31+
32+
- name: Build Erigon
33+
run: |
34+
make erigon
35+
working-directory: ${{ github.workspace }}
36+
37+
- name: Pause the Erigon instance dedicated to db maintenance
38+
run: |
39+
python3 $ERIGON_QA_PATH/test_system/db-producer/pause_production.py || true
40+
41+
- name: Restore Erigon Testbed Data Directory
42+
run: |
43+
rsync -a --delete $ERIGON_REFERENCE_DATA_DIR/ $ERIGON_TESTBED_DATA_DIR/
44+
45+
- name: Run Erigon, send ctrl-c and check for clean exiting
46+
id: test_step
47+
run: |
48+
set +e # Disable exit on error
49+
50+
# Run Erigon, send ctrl-c and check logs
51+
python3 $ERIGON_QA_PATH/test_system/qa-tests/clean-exit/run_and_check_clean_exit.py ${{ github.workspace }}/build/bin $ERIGON_TESTBED_DATA_DIR $WORKING_TIME_SECONDS Erigon2
52+
53+
# Capture monitoring script exit status
54+
test_exit_status=$?
55+
56+
# Save the subsection reached status
57+
echo "::set-output name=test_executed::true"
58+
59+
# Clean up Erigon process if it's still running
60+
if kill -0 $ERIGON_PID 2> /dev/null; then
61+
echo "Terminating Erigon"
62+
kill $ERIGON_PID
63+
wait $ERIGON_PID
64+
fi
65+
66+
# Check test runner script exit status
67+
if [ $test_exit_status -eq 0 ]; then
68+
echo "Tests completed successfully"
69+
echo "TEST_RESULT=success" >> "$GITHUB_OUTPUT"
70+
else
71+
echo "Error detected during tests"
72+
echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT"
73+
fi
74+
75+
- name: Delete Erigon Testbed Data Directory
76+
if: always()
77+
run: |
78+
rm -rf $ERIGON_TESTBED_DATA_DIR
79+
80+
- name: Resume the Erigon instance dedicated to db maintenance
81+
run: |
82+
python3 $ERIGON_QA_PATH/test_system/db-producer/resume_production.py || true
83+
84+
- name: Save test results
85+
if: steps.test_step.outputs.test_executed == 'true'
86+
env:
87+
TEST_RESULT: ${{ steps.test_step.outputs.TEST_RESULT }}
88+
run: |
89+
db_version=$(python3 $ERIGON_QA_PATH/test_system/qa-tests/uploads/prod_info.py $ERIGON_REFERENCE_DATA_DIR/../production.ini production erigon_repo_commit)
90+
if [ -z "$db_version" ]; then
91+
db_version="no-version"
92+
fi
93+
94+
python3 $ERIGON_QA_PATH/test_system/qa-tests/uploads/upload_test_results.py --repo erigon --commit $(git rev-parse HEAD) --branch ${{ github.ref_name }} --test_name clean-exit-block-downloading --chain $CHAIN --runner ${{ runner.name }} --db_version $db_version --outcome $TEST_RESULT --result_file ${{ github.workspace }}/result.json
95+
96+
- name: Upload test results
97+
if: steps.test_step.outputs.test_executed == 'true'
98+
uses: actions/upload-artifact@v4
99+
with:
100+
name: test-results
101+
path: ${{ github.workspace }}/result.json
102+
103+
- name: Action for Success
104+
if: steps.test_step.outputs.TEST_RESULT == 'success'
105+
run: echo "::notice::Tests completed successfully"
106+
107+
- name: Action for Not Success
108+
if: steps.test_step.outputs.TEST_RESULT != 'success'
109+
run: |
110+
echo "::error::Error detected during tests"
111+
exit 1

0 commit comments

Comments
 (0)