Skip to content

Commit 59568fb

Browse files
committed
Merge remote-tracking branch 'upstream/master' into bal-devnet-6-benchmarks
bal-devnet-6 (#11436) is now in master, so this brings everything from master including the BAL devnet-6 PR plus subsequent master commits. Conflict resolution: - Took ours for every BAL-touching file (decoders, manager, validator, BlockAccessListBased/TracedAccess world states, parallel-loop executor, cache pre-warmer, BAL tests). Our branch's ReadOnly*/Generated*/*AtIndex split diverges substantially from upstream's unified BlockAccessList, and upstream merging bal-devnet-6 into master pulled in the unified version. - Removed (again) BlockAccessListValidationIndex + tests, BlockAccessList, AccountChanges, SlotChanges, BlockAccessListItemCountTests, and BlockAccessListJournalTests: all reference the removed unified type. - Removed the now-broken Rlp.Encode(BlockAccessList) overload in Rlp.cs; callers use the generic Rlp.Encode<T> path for ReadOnly/Generated BALs. - Took theirs for TxReceiptConverter (upstream's boxing-free ForcedNumberConversion.Value refactor, already includes our EIP-7778/8037 diagnostic fields) and ChainSpecBasedSpecProvider (comment-only addition). - Took ours for OpcodeBlockTracer (kept t_ prefix on the [ThreadStatic] field, our existing convention). - For .github/workflows/nethermind-tests-flat.yml took upstream's unconditional pre-build + 'dotnet build-server shutdown || true' approach (matches their CI peak-memory PR) while keeping our extra Cache NuGet packages step. - Updated EngineModuleTests.V6 ResultWrapper generic args from IEnumerable to IReadOnlyList to match upstream's API change.
2 parents 891d9d5 + e913d87 commit 59568fb

158 files changed

Lines changed: 7354 additions & 696 deletions

File tree

Some content is hidden

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

.agents/rules/coding-style.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- Use `?.` null-conditional operator where applicable
1010
- Use `ArgumentNullException.ThrowIfNull` for null checks
1111
- Use `ObjectDisposedException.ThrowIf` for disposal checks
12-
- Use documentation comments with proper structure (`<summary>`, `<param>`, `<returns>`) for all public APIs
12+
- Use documentation comments with proper structure (`<summary>`, `<remarks>`, `<param>`, `<returns>`, `<exception>`, `<typeparam>`, `<inheritdoc/>`) for all public APIs. See [AGENTS.md](../../AGENTS.md) "Coding guidelines and style" for when to use each tag.
1313
- Avoid `var` — spell out types (exception: very long nested generic types)
1414
- Prefer low-allocation code patterns
1515
- Use `Array.Empty<T>()` or `[]` instead of `new T[0]` — avoids allocating a new empty array each time. In attribute arguments (e.g. `[Attr(new string[0])]`), `new T[0]` is acceptable because `Array.Empty<T>()` is not a compile-time constant.

.agents/rules/test-infrastructure.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ The rule: **if production modules already wire a component, use them — don't c
7171
- Add tests to existing test files rather than creating new ones
7272
- **Do not duplicate test methods that differ only in parameters** — use `[TestCase(...)]` or `[TestCaseSource(...)]` to parameterize a single method
7373
- Before writing a new test, check if an existing test can be extended with another `[TestCase]` or use `[TestCaseSource]`
74+
- **When only parts of tests are similar** — extract the shared parts into helper methods or types instead of copy-pasting:
75+
- Shared arrange/build steps → a private helper method, an existing builder (`Build.A.Block...`, `Build.A.Transaction...`, `TestItem.*`), or a new builder if the pattern is reused across files
76+
- Shared assertions → a helper method like `AssertExpectedState(...)` so each test asserts in one line and the failure message stays meaningful
77+
- Shared scenarios spanning multiple test classes → a base fixture, a shared `static` helper class, or a fixture-level `[SetUp]`
78+
- Keep each test body focused on what makes the case unique; the helper should not hide behavior that matters for understanding the test
79+
- Use `[TestCaseSource]` (not `[TestCase]`) when cases need non-constant data, named scenarios, or grow beyond a handful — keep the source method or `IEnumerable<TestCaseData>` next to the test it feeds
7480

7581
## DotNetty `IByteBuffer` in tests
7682

.github/workflows/build-solutions.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
with:
2626
large-packages: false
2727
tool-cache: false
28+
swap-storage: false
2829

2930
- name: Check out repository
3031
uses: actions/checkout@v6

.github/workflows/code-lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
with:
2424
large-packages: false
2525
tool-cache: false
26+
swap-storage: false
2627

2728
- name: Check out repository
2829
uses: actions/checkout@v6

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
with:
2626
large-packages: false
2727
tool-cache: false
28+
swap-storage: false
2829

2930
- name: Check out repository
3031
uses: actions/checkout@v6

.github/workflows/evm-opcode-benchmark-diff.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ jobs:
9191
with:
9292
large-packages: false
9393
tool-cache: false
94+
swap-storage: false
9495

9596
- name: Check out PR head
9697
uses: actions/checkout@v6

.github/workflows/nethermind-tests-checked.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,19 @@ jobs:
103103
with:
104104
cache: true
105105
cache-dependency-path: |
106-
src/Nethermind/**/packages.lock.json
106+
src/Nethermind/Nethermind.Runner/packages.lock.json
107107
108108
- name: ${{ matrix.project }}
109109
id: test
110110
working-directory: src/Nethermind/${{ matrix.project }}
111111
env:
112112
DOTNET_EnableHWIntrinsic: ${{ matrix.variant.hw-intrinsic }}
113113
run: |
114-
dotnet test --project ${{ matrix.project }}.csproj -c release \
115-
${{ matrix.variant.dotnet-args }}
114+
dotnet build ${{ matrix.project }}.csproj -c release ${{ matrix.variant.dotnet-args }}
115+
dotnet build-server shutdown || true # macOS VB/C# server sometimes fails to shut down; harmless
116+
test_args=(--no-build --no-restore)
117+
118+
dotnet test --project ${{ matrix.project }}.csproj -c release "${test_args[@]}" ${{ matrix.variant.dotnet-args }}
116119
117120
tests-chunked:
118121
name: Run ${{ matrix.test.project }} (${{ matrix.test.chunk }}) [${{ matrix.variant.label }}]
@@ -148,6 +151,7 @@ jobs:
148151
with:
149152
large-packages: false
150153
tool-cache: false
154+
swap-storage: false
151155

152156
- name: Check out repository
153157
uses: actions/checkout@v6
@@ -159,7 +163,7 @@ jobs:
159163
with:
160164
cache: true
161165
cache-dependency-path: |
162-
src/Nethermind/**/packages.lock.json
166+
src/Nethermind/Nethermind.Runner/packages.lock.json
163167
164168
- name: ${{ matrix.test.project }} (${{ matrix.test.chunk }})
165169
id: test
@@ -169,8 +173,11 @@ jobs:
169173
TEST_CHUNK: ${{ matrix.test.chunk }}
170174
TEST_SKIP_HEAVY: 1
171175
run: |
172-
dotnet test --project ${{ matrix.test.project }}.csproj -c release \
173-
${{ matrix.variant.dotnet-args }}
176+
dotnet build ${{ matrix.test.project }}.csproj -c release ${{ matrix.variant.dotnet-args }}
177+
dotnet build-server shutdown || true # macOS VB/C# server sometimes fails to shut down; harmless
178+
test_args=(--no-build --no-restore)
179+
180+
dotnet test --project ${{ matrix.test.project }}.csproj -c release "${test_args[@]}" ${{ matrix.variant.dotnet-args }}
174181
175182
tests-summary:
176183
name: Tests summary

.github/workflows/nethermind-tests-flat.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ jobs:
229229
with:
230230
cache: true
231231
cache-dependency-path: |
232-
src/Nethermind/**/packages.lock.json
232+
src/Nethermind/Nethermind.Runner/packages.lock.json
233233
234234
- name: Cache NuGet packages
235235
uses: actions/cache@v5
@@ -288,13 +288,9 @@ jobs:
288288
# Variant matrix entries set `matrix.filter` to scope to a specific Amsterdam
289289
# parallel-variant fixture. Default Pyspec chunks instead exclude the variant
290290
# classes by name so they don't double-run the heavy Amsterdam fixture set.
291-
if [ "$IS_PYSPEC" = "true" ]; then
292-
dotnet build ${{ matrix.project }}.csproj -c release
293-
dotnet build-server shutdown
294-
run_test --no-build --no-restore
295-
else
296-
run_test
297-
fi
291+
dotnet build ${{ matrix.project }}.csproj -c release
292+
dotnet build-server shutdown || true # macOS VB/C# server sometimes fails to shut down; harmless
293+
run_test --no-build --no-restore
298294
299295
tests-summary:
300296
name: Tests summary

.github/workflows/nethermind-tests.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
with:
105105
cache: true
106106
cache-dependency-path: |
107-
src/Nethermind/**/packages.lock.json
107+
src/Nethermind/Nethermind.Runner/packages.lock.json
108108
109109
- name: Cache NuGet packages
110110
uses: actions/cache@v5
@@ -118,8 +118,12 @@ jobs:
118118
working-directory: src/Nethermind/${{ matrix.project }}
119119
run: |
120120
flags="${{ matrix.runner == 'ubuntu-latest' && env.COLLECT_COVERAGE == 'true' && '--coverage --coverage-output-format cobertura --coverage-settings ../codecoverage.json' || '' }}"
121+
dotnet build ${{ matrix.project }}.csproj -c release
122+
dotnet build-server shutdown || true # macOS VB/C# server sometimes fails to shut down; harmless
123+
test_args=(--no-build --no-restore)
124+
121125
set +e
122-
dotnet test --project ${{ matrix.project }}.csproj -c release $flags
126+
dotnet test --project ${{ matrix.project }}.csproj -c release "${test_args[@]}" $flags
123127
rc=$?
124128
set -e
125129
if [[ $rc -eq 0 ]]; then
@@ -128,7 +132,7 @@ jobs:
128132
exit 1
129133
else
130134
echo "::warning::Test process crashed (exit code $rc), retrying..."
131-
dotnet test --project ${{ matrix.project }}.csproj -c release $flags
135+
dotnet test --project ${{ matrix.project }}.csproj -c release "${test_args[@]}" $flags
132136
fi
133137
134138
- name: Upload coverage report
@@ -189,7 +193,7 @@ jobs:
189193
with:
190194
cache: true
191195
cache-dependency-path: |
192-
src/Nethermind/**/packages.lock.json
196+
src/Nethermind/Nethermind.Runner/packages.lock.json
193197
194198
- name: Cache NuGet packages
195199
uses: actions/cache@v5
@@ -205,8 +209,12 @@ jobs:
205209
TEST_CHUNK: ${{ matrix.chunk }}
206210
run: |
207211
flags="${{ matrix.runner == 'ubuntu-latest' && env.COLLECT_COVERAGE == 'true' && '--coverage --coverage-output-format cobertura --coverage-settings ../codecoverage.json' || '' }}"
212+
dotnet build ${{ matrix.project }}.csproj -c release
213+
dotnet build-server shutdown || true # macOS VB/C# server sometimes fails to shut down; harmless
214+
test_args=(--no-build --no-restore)
215+
208216
set +e
209-
dotnet test --project ${{ matrix.project }}.csproj -c release $flags
217+
dotnet test --project ${{ matrix.project }}.csproj -c release "${test_args[@]}" $flags
210218
rc=$?
211219
set -e
212220
if [[ $rc -eq 0 ]]; then
@@ -215,7 +223,7 @@ jobs:
215223
exit 1
216224
else
217225
echo "::warning::Test process crashed (exit code $rc), retrying..."
218-
dotnet test --project ${{ matrix.project }}.csproj -c release $flags
226+
dotnet test --project ${{ matrix.project }}.csproj -c release "${test_args[@]}" $flags
219227
fi
220228
221229
- name: Upload coverage report
@@ -275,6 +283,7 @@ jobs:
275283
with:
276284
large-packages: false
277285
tool-cache: false
286+
swap-storage: false
278287

279288
- name: Check out repository
280289
uses: actions/checkout@v6
@@ -286,7 +295,7 @@ jobs:
286295
with:
287296
cache: true
288297
cache-dependency-path: |
289-
src/Nethermind/**/packages.lock.json
298+
src/Nethermind/Nethermind.Runner/packages.lock.json
290299
291300
- name: Cache NuGet packages
292301
uses: actions/cache@v5
@@ -301,8 +310,12 @@ jobs:
301310
env:
302311
TEST_CHUNK: ${{ matrix.test.chunk }}
303312
run: |
313+
dotnet build ${{ matrix.test.project }}.csproj -c release
314+
dotnet build-server shutdown || true # macOS VB/C# server sometimes fails to shut down; harmless
315+
test_args=(--no-build --no-restore)
316+
304317
set +e
305-
dotnet test --project ${{ matrix.test.project }}.csproj -c release
318+
dotnet test --project ${{ matrix.test.project }}.csproj -c release "${test_args[@]}"
306319
rc=$?
307320
set -e
308321
if [[ $rc -eq 0 ]]; then
@@ -311,7 +324,7 @@ jobs:
311324
exit 1
312325
else
313326
echo "::warning::Test process crashed (exit code $rc), retrying..."
314-
dotnet test --project ${{ matrix.test.project }}.csproj -c release
327+
dotnet test --project ${{ matrix.test.project }}.csproj -c release "${test_args[@]}"
315328
fi
316329
317330
tests-summary:

.github/workflows/publish-docker.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Publish Docker image
22

33
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
47
push:
58
branches: [master, release/*, performance]
69
paths: [src/Nethermind/**]
@@ -35,6 +38,7 @@ jobs:
3538
with:
3639
large-packages: false
3740
tool-cache: false
41+
swap-storage: false
3842

3943
- name: Check out repository
4044
uses: actions/checkout@v6
@@ -43,7 +47,7 @@ jobs:
4347
uses: ./.github/actions/publish-docker
4448
with:
4549
image-name: ${{ github.event.inputs.image-name || 'nethermind' }}
46-
tag: ${{ github.event.inputs.tag || '' }}
50+
tag: ${{ github.event.inputs.tag || (github.event_name == 'schedule' && 'nightly') || '' }}
4751
dockerfile: ${{ github.event.inputs.dockerfile || 'Dockerfile' }}
4852
build-config: ${{ github.event.inputs.build-config || 'release' }}
4953
docker-hub-username: ${{ secrets.DOCKER_HUB_USERNAME }}

0 commit comments

Comments
 (0)