Skip to content

Commit 58da252

Browse files
committed
Merge branch 'master' into triedb-batch-sizes
2 parents dfecbcb + ade3794 commit 58da252

File tree

328 files changed

+29196
-10212
lines changed

Some content is hidden

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

328 files changed

+29196
-10212
lines changed

.github/workflows/arbitrator-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ env:
2828
jobs:
2929
arbitrator:
3030
name: Run Arbitrator tests
31-
runs-on: ubuntu-8
31+
runs-on: arbitrator-ci
3232
steps:
3333
- name: Setup tmate session
3434
uses: mxschmitt/action-tmate@v3
@@ -48,7 +48,7 @@ jobs:
4848
sudo ln -s /usr/bin/wasm-ld-14 /usr/local/bin/wasm-ld
4949
5050
- name: Install go
51-
uses: actions/setup-go@v4
51+
uses: actions/setup-go@v5
5252
with:
5353
go-version: 1.23.x
5454

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
jobs:
1414
test:
1515
name: Go Tests
16-
runs-on: ubuntu-8
16+
runs-on: arbitrator-ci
1717

1818
# Creates a redis container for redis tests
1919
services:
@@ -126,10 +126,10 @@ jobs:
126126
run: ./scripts/build-brotli.sh -w -d
127127

128128
- name: Build
129-
run: make build test-go-deps -j
129+
run: make build test-go-deps -j8
130130

131131
- name: Build all lint dependencies
132-
run: make -j build-node-deps
132+
run: make -j8 build-node-deps
133133

134134
- name: Lint
135135
uses: golangci/golangci-lint-action@v8
@@ -153,13 +153,13 @@ jobs:
153153
if: matrix.test-mode == 'pathdb'
154154
run: |
155155
echo "Running tests with Path Scheme" >> full.log
156-
${{ github.workspace }}/.github/workflows/gotestsum.sh --tags cionly --timeout 20m --cover --test_state_scheme path
156+
${{ github.workspace }}/.github/workflows/gotestsum.sh --tags cionly --timeout 90m --cover --test_state_scheme path
157157
158158
- name: run tests without race detection and hash state scheme
159159
if: matrix.test-mode == 'defaults'
160160
run: |
161161
echo "Running tests with Hash Scheme" >> full.log
162-
${{ github.workspace }}/.github/workflows/gotestsum.sh --tags cionly --timeout 20m --test_state_scheme hash
162+
${{ github.workspace }}/.github/workflows/gotestsum.sh --tags cionly --timeout 60m --test_state_scheme hash
163163
164164
- name: run redis tests
165165
if: matrix.test-mode == 'defaults'
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Close trivial PRs
2+
3+
on:
4+
pull_request_target:
5+
types: [labeled]
6+
7+
jobs:
8+
close-trivial-pr:
9+
if: github.event.label.name == 'trivial'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
pull-requests: write
13+
14+
steps:
15+
- name: Fetch CONTRIBUTING.md snippet
16+
id: snippet
17+
env:
18+
REPO: ${{ github.repository }}
19+
run: |
20+
SNIPPET=$(curl -sSfL "https://raw.githubusercontent.com/${REPO}/refs/heads/master/CONTRIBUTING.md" \
21+
| sed -n '/<!-- start-trivial-prs -->/,/<!-- end-trivial-prs -->/p' \
22+
| sed '/<!--.*-->/d')
23+
24+
# Use GitHub Actions heredoc-style output to preserve multiline content
25+
echo "snippet<<EOF" >> $GITHUB_OUTPUT
26+
echo "$SNIPPET" >> $GITHUB_OUTPUT
27+
echo "EOF" >> $GITHUB_OUTPUT
28+
29+
- name: Comment and Close PR
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: |
33+
PR_NUMBER=${{ github.event.pull_request.number }}
34+
REPO=${{ github.repository }}
35+
DEF_BRANCH=${{ github.event.repository.default_branch }}
36+
SNIPPET="${{ steps.snippet.outputs.snippet }}"
37+
38+
gh pr close $PR_NUMBER --repo $REPO --comment "Thank you for your contribution. However, this PR has been automatically closed because it was labeled as **trivial**. As stated in our [CONTRIBUTING.md](../blob/${DEF_BRANCH}/CONTRIBUTING.md):
39+
40+
---
41+
42+
${SNIPPET}
43+
44+
---
45+
46+
We appreciate meaningful contributions!"

.github/workflows/codeql-analysis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
cache-dependency-path: '**/yarn.lock'
6262

6363
- name: Install go
64-
uses: actions/setup-go@v4
64+
uses: actions/setup-go@v5
6565
with:
6666
go-version: 1.23.x
6767

@@ -99,7 +99,7 @@ jobs:
9999
run: cargo install --force cbindgen
100100

101101
- name: Cache Build Products
102-
uses: actions/cache@v3
102+
uses: actions/cache@v4
103103
with:
104104
path: |
105105
~/.cache/go-build
@@ -108,13 +108,13 @@ jobs:
108108

109109
- name: Cache wabt build
110110
id: cache-wabt
111-
uses: actions/cache@v3
111+
uses: actions/cache@v4
112112
with:
113113
path: ~/wabt-prefix
114114
key: ${{ runner.os }}-wabt-codeql-${{ matrix.language }}-${{ env.WABT_VERSION }}
115115

116116
- name: Cache cbrotli
117-
uses: actions/cache@v3
117+
uses: actions/cache@v4
118118
id: cache-cbrotli
119119
with:
120120
path: |
@@ -127,7 +127,7 @@ jobs:
127127
restore-keys: ${{ runner.os }}-brotli-${{ matrix.language }}-${{ hashFiles('scripts/build-brotli.sh') }}-${{ hashFiles('.github/workflows/arbitrator-ci.yaml') }}
128128

129129
- name: Cache Rust Build Products
130-
uses: actions/cache@v3
130+
uses: actions/cache@v4
131131
with:
132132
path: |
133133
~/.cargo/

.github/workflows/docker.yml

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,11 @@ run-name: Docker build CI triggered from @${{ github.actor }} of ${{ github.head
33
on:
44
workflow_dispatch:
55
pull_request:
6-
types: [labeled]
6+
types: [opened, synchronize, reopened]
77
jobs:
8-
# Only runs Docker build jobs if a PR has received a final "design approved" label as a final check
9-
check-label:
10-
name: Check for required label
11-
runs-on: ubuntu-latest
12-
if: github.event_name == 'pull_request'
13-
outputs:
14-
should-run: ${{ steps.check-label.outputs.has-label }}
15-
steps:
16-
- id: check-label
17-
uses: actions/github-script@v6
18-
with:
19-
script: |
20-
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
21-
owner: context.repo.owner,
22-
repo: context.repo.repo,
23-
issue_number: context.issue.number
24-
});
25-
const hasLabel = labels.some(label => label.name === 'design-approved');
26-
core.setOutput('has-label', hasLabel);
27-
console.log(`PR has 'design-approved' label: ${hasLabel}`);
28-
298
docker:
309
name: Docker build
31-
needs: check-label
32-
# Run if it's not a PR or if it's a PR with the required label
33-
if: github.event_name != 'pull_request' || needs.check-label.outputs.should-run == 'true'
34-
runs-on: ubuntu-8
10+
runs-on: arbitrator-ci
3511
services:
3612
# local registry
3713
registry:
@@ -48,7 +24,7 @@ jobs:
4824
with:
4925
driver-opts: network=host
5026
- name: Cache Docker layers
51-
uses: actions/cache@v3
27+
uses: actions/cache@v4
5228
with:
5329
path: /tmp/.buildx-cache
5430
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile') }}

.github/workflows/gotestsum.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ timeout=""
1111
tags=""
1212
run=""
1313
test_state_scheme=""
14+
log=true
1415
race=false
1516
cover=false
1617
while [[ $# -gt 0 ]]; do
@@ -47,6 +48,10 @@ while [[ $# -gt 0 ]]; do
4748
cover=true
4849
shift
4950
;;
51+
--nolog)
52+
log=false
53+
shift
54+
;;
5055
*)
5156
echo "Invalid argument: $1"
5257
exit 1
@@ -56,7 +61,7 @@ done
5661

5762
packages=$(go list ./...)
5863
for package in $packages; do
59-
cmd="stdbuf -oL gotestsum --format short-verbose --packages=\"$package\" --rerun-fails=2 --no-color=false --"
64+
cmd="stdbuf -oL gotestsum --format short-verbose --packages=\"$package\" --rerun-fails=2 --rerun-fails-max-failures=30 --no-color=false --"
6065
if [ "$timeout" != "" ]; then
6166
cmd="$cmd -timeout $timeout"
6267
fi
@@ -83,7 +88,11 @@ for package in $packages; do
8388
cmd="$cmd -args -- --test_loglevel=8" # Use error log level, which is the value 8 in the slog level enum for tests.
8489
fi
8590

86-
cmd="$cmd > >(stdbuf -oL tee -a full.log | grep -vE \"INFO|seal\")"
91+
if [ "$log" == true ]; then
92+
cmd="$cmd > >(stdbuf -oL tee -a full.log | grep -vE \"DEBUG|TRACE|INFO|seal\")"
93+
else
94+
cmd="$cmd | grep -vE \"DEBUG|TRACE|INFO|seal\""
95+
fi
8796

8897
echo ""
8998
echo running tests for "$package"

.github/workflows/nightly-ci.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# Only run on schedule AND main branch
1717
tests-scheduled:
1818
name: Scheduled tests
19-
runs-on: ubuntu-8
19+
runs-on: arbitrator-ci
2020

2121
services:
2222
redis:
@@ -29,7 +29,7 @@ jobs:
2929
matrix:
3030
test-mode: [race, legacychallenge, long, challenge, l3challenge]
3131

32-
if: github.event_name == 'schedule' && github.ref == 'refs/heads/master'
32+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.ref == 'refs/heads/master')
3333

3434
steps:
3535
- name: Checkout
@@ -89,15 +89,15 @@ jobs:
8989
run: cargo install --force cbindgen
9090

9191
- name: Cache Build Products
92-
uses: actions/cache@v3
92+
uses: actions/cache@v4
9393
with:
9494
path: |
9595
~/.cache/go-build
9696
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
9797
restore-keys: ${{ runner.os }}-go-
9898

9999
- name: Cache Rust Build Products
100-
uses: actions/cache@v3
100+
uses: actions/cache@v4
101101
with:
102102
path: |
103103
~/.cargo/
@@ -110,7 +110,7 @@ jobs:
110110
restore-keys: ${{ runner.os }}-cargo-${{ steps.rust-version.outputs.version }}-
111111

112112
- name: Cache cbrotli
113-
uses: actions/cache@v3
113+
uses: actions/cache@v4
114114
id: cache-cbrotli
115115
with:
116116
path: |
@@ -156,7 +156,7 @@ jobs:
156156
if: matrix.test-mode == 'race'
157157
run: |
158158
echo "Running tests with Hash Scheme" >> full.log
159-
${{ github.workspace }}/.github/workflows/gotestsum.sh --race --timeout 30m --test_state_scheme hash
159+
${{ github.workspace }}/.github/workflows/gotestsum.sh --race --timeout 90m --test_state_scheme hash
160160
161161
- name: run challenge tests
162162
if: matrix.test-mode == 'challenge'
@@ -192,7 +192,7 @@ jobs:
192192
# Only run this job if files in bold/legacy/ are modified
193193
tests-pr:
194194
name: PR modified files tests
195-
runs-on: ubuntu-8
195+
runs-on: arbitrator-ci
196196
if: github.event_name == 'pull_request'
197197

198198
permissions:
@@ -203,6 +203,8 @@ jobs:
203203
uses: actions/checkout@v4
204204
with:
205205
submodules: true
206+
fetch-depth: 10 // Will cover most PRs
207+
persist-credentials: true // In case changed-files requires deeper depth
206208

207209
- name: Check changed files
208210
id: changed-files
@@ -280,7 +282,7 @@ jobs:
280282

281283
- name: Cache Build Products
282284
if: steps.changed-files.outputs.any_changed == 'true'
283-
uses: actions/cache@v3
285+
uses: actions/cache@v4
284286
with:
285287
path: |
286288
~/.cache/go-build
@@ -289,7 +291,7 @@ jobs:
289291

290292
- name: Cache Rust Build Products
291293
if: steps.changed-files.outputs.any_changed == 'true'
292-
uses: actions/cache@v3
294+
uses: actions/cache@v4
293295
with:
294296
path: |
295297
~/.cargo/
@@ -305,7 +307,7 @@ jobs:
305307
306308
- name: Cache cbrotli
307309
if: steps.changed-files.outputs.any_changed == 'true'
308-
uses: actions/cache@v3
310+
uses: actions/cache@v4
309311
id: cache-cbrotli
310312
with:
311313
path: |

.github/workflows/release-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
driver-opts: network=host
2121

2222
- name: Cache Docker layers
23-
uses: actions/cache@v3
23+
uses: actions/cache@v4
2424
with:
2525
path: /tmp/.buildx-cache
2626
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile') }}

.github/workflows/submodule-pin-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
[bold]=origin/main
3737
[arbitrator/langs/c]=origin/vm-storage-cache
3838
[arbitrator/tools/wasmer]=origin/stylus
39+
[contracts-local/lib/openzeppelin-contracts]=origin/release-v4.7
3940
)
4041
divergent=0
4142
for mod in `git submodule --quiet foreach 'echo $name'`; do

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ node_modules
1010
.DS_Store
1111
.idea
1212
.vscode
13+
.cursor
1314
cmd/node/data
1415
cmd/node/node
1516
solgen/go/

0 commit comments

Comments
 (0)