Skip to content

Commit 4471330

Browse files
authored
Merge main into PR branch
2 parents dda2ff6 + 3d203a2 commit 4471330

File tree

20 files changed

+750
-636
lines changed

20 files changed

+750
-636
lines changed

.github/workflows/test-all-erigon.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,16 @@ jobs:
127127
strategy:
128128
matrix:
129129
os: [ windows-2025 ]
130-
runs-on: ${{ matrix.os }}
130+
runs-on:
131+
group: "selfhosted-win"
131132

132133
steps:
133-
- name: Configure Pagefile
134-
uses: al-cheb/configure-pagefile-action@v1.5
135-
with:
136-
minimum-size: 8GB
137-
disk-root: "C:"
134+
# not needed on self-hosted runner. already configured.
135+
#- name: Configure Pagefile
136+
# uses: al-cheb/configure-pagefile-action@v1.5
137+
# with:
138+
# minimum-size: 8GB
139+
# disk-root: "C:"
138140

139141
- name: "Checkout code with submodules and large files (lfs) on ${{ matrix.os }}"
140142
if: needs.source-of-changes.outputs.changed_files != 'true'
@@ -143,22 +145,32 @@ jobs:
143145
fetch-depth: 1
144146
submodules: recursive
145147
lfs: true
148+
clean: true
146149

147150
- name: Setup Go environment on ${{ matrix.os }}
148151
if: needs.source-of-changes.outputs.changed_files != 'true'
149152
uses: actions/setup-go@v6
150153
with:
151-
go-version: '1.25'
152-
cache: true
154+
go-version: '>=1.25'
155+
cache: false
153156

154-
- name: Install make
155-
run: choco install make -y
157+
# "make" already preinstalled:
158+
#- name: Install make
159+
# run: choco install make -y
156160

157161
- name: Run all tests on ${{ matrix.os }}
158162
if: needs.source-of-changes.outputs.changed_files != 'true'
159163
shell: bash
164+
env:
165+
GOMODCACHE: C:\go-cache\mod
166+
GOCACHE: C:\go-cache\build
160167
run: make test-all
161168

169+
- name: Cleanup
170+
if: always()
171+
run: |
172+
Remove-Item -Path "$env:TEMP\*" -Recurse -Force -ErrorAction SilentlyContinue
173+
162174
- name: This ${{ matrix.os }} check does not make sense for changes within out-of-scope directories
163175
if: needs.source-of-changes.outputs.changed_files == 'true'
164176
run: echo "This check does not make sense for changes within out-of-scope directories"

cmd/rpcdaemon/graphql/graphql_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,8 @@ func TestGraphQLQueryBlock(t *testing.T) {
139139
if err != nil {
140140
t.Fatalf("could not post: %v", err)
141141
}
142-
defer resp.Body.Close()
143-
144142
bodyBytes, err := io.ReadAll(resp.Body)
143+
resp.Body.Close()
145144
if err != nil {
146145
t.Fatalf("could not read from response body: %v", err)
147146
}

db/datastruct/fusefilter/fusefilter_writer_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ func TestMultipleFilters(t *testing.T) {
219219

220220
writer, err := NewWriter(filePath)
221221
require.NoError(err, "Failed to create writer %d", i)
222-
defer writer.Close()
223222

224223
// Add some keys
225224
for j := 0; j < 100; j++ {
@@ -233,7 +232,6 @@ func TestMultipleFilters(t *testing.T) {
233232
// Read back and verify
234233
reader, err := NewReader(filePath)
235234
require.NoError(err, "Failed to create reader for filter %d", i)
236-
defer reader.Close()
237235
for j := 0; j < 100; j++ {
238236
key := baseKey + uint64(j)
239237
require.True(reader.ContainsHash(key), "Key %d not found in filter %d", key, i)

db/integrity/commitment_integirty.go

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,11 @@ func checkCommitmentRootViaSd(ctx context.Context, tx kv.TemporalTx, f state.Vis
244244
}
245245

246246
func checkCommitmentRootViaRecompute(ctx context.Context, tx kv.TemporalTx, sd *execctx.SharedDomains, info commitmentRootInfo, f state.VisibleFile, logger log.Logger) error {
247+
trace := logger.Enabled(ctx, log.LvlTrace)
247248
touchLoggingVisitor := func(k []byte) {
248-
logger.Debug("account touch for root block", "key", common.Address(k), "blockNum", info.blockNum, "file", filepath.Base(f.Fullpath()))
249+
if trace {
250+
logger.Trace("account touch for root block", "key", common.Address(k), "blockNum", info.blockNum, "file", filepath.Base(f.Fullpath()))
251+
}
249252
}
250253
touches, err := touchHistoricalKeys(sd, tx, kv.AccountsDomain, info.blockMinTxNum, info.txNum+1, touchLoggingVisitor)
251254
if err != nil {
@@ -353,6 +356,7 @@ func checkCommitmentKvDeref(ctx context.Context, file state.VisibleFile, stepSiz
353356
)
354357
return derefCounts{}, nil
355358
}
359+
trace := logger.Enabled(ctx, log.LvlTrace)
356360
logger.Info("[integrity] commitment deref in", "kv", fileName, "startTxNum", startTxNum, "endTxNum", endTxNum)
357361
commDecomp, err := seg.NewDecompressor(file.Fullpath())
358362
if err != nil {
@@ -424,7 +428,7 @@ func checkCommitmentKvDeref(ctx context.Context, file state.VisibleFile, stepSiz
424428
counts.branchKeys++
425429
branchData := commitment.BranchData(branchValue)
426430
newBranchData, err := branchData.ReplacePlainKeys(newBranchValueBuf[:0], func(key []byte, isStorage bool) ([]byte, error) {
427-
if logger.Enabled(ctx, log.LvlTrace) {
431+
if trace {
428432
logger.Trace(
429433
"checking commitment deref for branch",
430434
"branchKey", hex.EncodeToString(branchKey),
@@ -435,7 +439,7 @@ func checkCommitmentKvDeref(ctx context.Context, file state.VisibleFile, stepSiz
435439
}
436440
if isStorage {
437441
if len(key) == length.Addr+length.Hash {
438-
if logger.Enabled(ctx, log.LvlTrace) {
442+
if trace {
439443
logger.Trace(
440444
"skipping, not a storage reference",
441445
"branchKey", hex.EncodeToString(branchKey),
@@ -468,7 +472,7 @@ func checkCommitmentKvDeref(ctx context.Context, file state.VisibleFile, stepSiz
468472
integrityErr = fmt.Errorf("%w: %w", ErrIntegrity, err)
469473
return key, nil
470474
}
471-
if logger.Enabled(ctx, log.LvlTrace) {
475+
if trace {
472476
logger.Trace(
473477
"dereferenced storage key",
474478
"branchKey", hex.EncodeToString(branchKey),
@@ -482,7 +486,7 @@ func checkCommitmentKvDeref(ctx context.Context, file state.VisibleFile, stepSiz
482486
return plainKey, nil
483487
}
484488
if len(key) == length.Addr {
485-
if logger.Enabled(ctx, log.LvlTrace) {
489+
if trace {
486490
logger.Trace(
487491
"skipping, not an account reference",
488492
"branchKey", hex.EncodeToString(branchKey),
@@ -514,7 +518,7 @@ func checkCommitmentKvDeref(ctx context.Context, file state.VisibleFile, stepSiz
514518
integrityErr = fmt.Errorf("%w: %w", ErrIntegrity, err)
515519
return key, nil
516520
}
517-
if logger.Enabled(ctx, log.LvlTrace) {
521+
if trace {
518522
logger.Trace(
519523
"dereferenced account key",
520524
"branchKey", hex.EncodeToString(branchKey),
@@ -770,12 +774,15 @@ func CheckCommitmentHistAtBlk(ctx context.Context, db kv.TemporalRoDB, br servic
770774
return fmt.Errorf("commitment state txNum doesn't match maxTxNum: %d != %d", latestTxNum, maxTxNum)
771775
}
772776
logger.Info("commitment recalc info", "blockNum", blockNum, "minTxNum", minTxNum, "maxTxNum", maxTxNum, "toTxNum", toTxNum)
777+
trace := logger.Enabled(ctx, log.LvlTrace)
773778
touchLoggingVisitor := func(k []byte) {
774-
args := []any{"key", common.Address(k[:length.Addr])}
775-
if len(k) > length.Addr {
776-
args = append(args, "slot", common.Hash(k[length.Addr:]))
779+
if trace {
780+
args := []any{"key", common.Address(k[:length.Addr])}
781+
if len(k) > length.Addr {
782+
args = append(args, "slot", common.Hash(k[length.Addr:]))
783+
}
784+
logger.Trace("commitment touched key", args...)
777785
}
778-
logger.Debug("commitment touched key", args...)
779786
}
780787
touchStart := time.Now()
781788
accTouches, err := touchHistoricalKeys(sd, tx, kv.AccountsDomain, minTxNum, toTxNum, touchLoggingVisitor)

0 commit comments

Comments
 (0)