Skip to content

Commit 36af339

Browse files
Update avalanchego to v1.14.1-db-metrics-fix (#1836)
1 parent 44b20d2 commit 36af339

File tree

5 files changed

+29
-10
lines changed

5 files changed

+29
-10
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
- name: Setup Contracts
105105
run: ./scripts/run_task.sh setup-contracts
106106
- name: Run Warp E2E Tests
107-
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@dce38e90b1542fafa3c2b8efa8ef864d7a370eb6
107+
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@e869a214a50fdd8d136be64fa3d555f081f478c1
108108
with:
109109
run: ./scripts/run_task.sh test-e2e-warp-ci
110110
artifact_prefix: warp
@@ -126,7 +126,7 @@ jobs:
126126
with:
127127
fetch-depth: 0
128128
- name: Run E2E Load Tests
129-
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@dce38e90b1542fafa3c2b8efa8ef864d7a370eb6
129+
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@e869a214a50fdd8d136be64fa3d555f081f478c1
130130
with:
131131
run: ./scripts/run_task.sh test-e2e-load-ci
132132
artifact_prefix: load

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.24.9
55
require (
66
github.com/VictoriaMetrics/fastcache v1.12.1
77
github.com/antithesishq/antithesis-sdk-go v0.3.8
8-
github.com/ava-labs/avalanchego v1.14.0
8+
github.com/ava-labs/avalanchego v1.14.1-db-metrics-fix
99
github.com/ava-labs/firewood-go-ethhash/ffi v0.0.13
1010
github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2
1111
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl
2828
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
2929
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
3030
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
31-
github.com/ava-labs/avalanchego v1.14.0 h1:0j314N1fEwstKSymvyhvvxi8Hr752xc6MQvjq6kGIJY=
32-
github.com/ava-labs/avalanchego v1.14.0/go.mod h1:7sYTcQknONY5x5qzS+GrN+UtyB8kX7Q5ClHhGj1DgXg=
31+
github.com/ava-labs/avalanchego v1.14.1-db-metrics-fix h1:urul9QaWdulG5w4jl0xujnbzz+kOy2ZPMcaiTuPOP+c=
32+
github.com/ava-labs/avalanchego v1.14.1-db-metrics-fix/go.mod h1:7sYTcQknONY5x5qzS+GrN+UtyB8kX7Q5ClHhGj1DgXg=
3333
github.com/ava-labs/coreth v0.16.0-rc.0 h1:nPvkDbxaH8N9f/wQe7B+IGMhPISMuW5CU0cDYuU8iCw=
3434
github.com/ava-labs/coreth v0.16.0-rc.0/go.mod h1:uGr1C7BP0+dWhvsIouhuH0yCyI8YDgS6sfEFIExs0iI=
3535
github.com/ava-labs/firewood-go-ethhash/ffi v0.0.13 h1:obPwnVCkF5+B2f8WbTepHj0ZgiW21vKUgFCtATuAYNY=

network/network_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ func TestSyncedAppRequestAnyOnCtxCancellation(t *testing.T) {
329329
net.Connected(
330330
context.Background(),
331331
ids.GenerateTestNodeID(),
332-
version.CurrentApp,
332+
version.Current,
333333
),
334334
)
335335

plugin/evm/vm_database.go

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
"github.com/ava-labs/avalanchego/api/metrics"
1515
"github.com/ava-labs/avalanchego/database/factory"
16+
"github.com/ava-labs/avalanchego/database/meterdb"
1617
"github.com/ava-labs/avalanchego/database/pebbledb"
1718
"github.com/ava-labs/avalanchego/database/prefixdb"
1819
"github.com/ava-labs/avalanchego/database/versiondb"
@@ -222,19 +223,37 @@ func newStandaloneDatabase(dbConfig DatabaseConfig, gatherer metrics.MultiGather
222223
}
223224
}
224225

226+
dbReg, err := metrics.MakeAndRegister(
227+
gatherer,
228+
dbMetricsPrefix,
229+
)
230+
if err != nil {
231+
return nil, err
232+
}
233+
225234
db, err := factory.New(
226235
dbConfig.Name,
227236
dbPath,
228237
dbConfig.ReadOnly,
229238
dbConfigBytes,
230-
gatherer,
239+
dbReg,
231240
logger,
232-
dbMetricsPrefix,
233-
meterDBGatherer,
234241
)
235242
if err != nil {
236243
return nil, fmt.Errorf("couldn't create database: %w", err)
237244
}
238245

239-
return db, nil
246+
meterDBReg, err := metrics.MakeAndRegister(
247+
gatherer,
248+
meterDBGatherer,
249+
)
250+
if err != nil {
251+
return nil, err
252+
}
253+
254+
meterDB, err := meterdb.New(meterDBReg, db)
255+
if err != nil {
256+
return nil, fmt.Errorf("couldn't create meterdb: %w", err)
257+
}
258+
return meterDB, nil
240259
}

0 commit comments

Comments
 (0)