Skip to content

Commit a02fd12

Browse files
Merge branch 'maru/migrate-coreth-subtree-merge'
2 parents 4c46441 + f32a3cb commit a02fd12

File tree

739 files changed

+220644
-67
lines changed

Some content is hidden

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

739 files changed

+220644
-67
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
/Taskfile.yml @joshua-kim @maru-ava
2121
/flake.lock @joshua-kim @maru-ava
2222
/flake.nix @joshua-kim @maru-ava
23+
/graft/coreth @ava-labs/platform-evm
24+
/graft/coreth/triedb/firewood/ @alarso16 @ava-labs/platform-evm
2325
/network/p2p/ @joshua-kim
2426
/network/p2p/*.md @joshua-kim @meaghanfitzgerald
2527
/nix/* @joshua-kim @maru-ava

.github/actions/run-monitored-tmpnet-cmd/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ inputs:
55
run:
66
description: "the bash script to run e.g. ./scripts/my-script.sh"
77
required: true
8+
working_directory:
9+
description: "the working directory to run the command in"
10+
default: ''
811
run_env:
912
description: 'a string containing env vars for the command e.g. "MY_VAR1=foo MY_VAR2=bar"'
1013
default: ''
@@ -108,6 +111,7 @@ runs:
108111
shell: bash
109112
# --impure ensures the env vars are accessible to the command
110113
run: ${{ inputs.run_env }} $GITHUB_ACTION_PATH/nix-develop.sh --impure --command bash -x ${{ inputs.run }}
114+
working-directory: ${{ inputs.working_directory }}
111115
env:
112116
# Always collect metrics locally even when nodes are running in kube to enable collection from the test workload
113117
TMPNET_START_METRICS_COLLECTOR: ${{ inputs.prometheus_username != '' }}

.github/workflows/coreth-ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Coreth
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
merge_group:
8+
types: [checks_requested]
9+
10+
jobs:
11+
lint_test:
12+
name: Lint
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: ./graft/coreth
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: ./.github/actions/setup-go-for-project
20+
- name: Run all lint checks
21+
run: ./scripts/run_task.sh lint-all-ci
22+
- name: Check go.mod and go.sum are up-to-date
23+
run: ./scripts/run_task.sh check-go-mod-tidy
24+
25+
unit_test:
26+
name: Unit Tests (${{ matrix.os }})
27+
runs-on: ${{ matrix.os }}
28+
defaults:
29+
run:
30+
working-directory: ./graft/coreth
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
os: [macos-latest, ubuntu-22.04, ubuntu-latest]
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: ./.github/actions/setup-go-for-project
38+
- run: ./scripts/run_task.sh build-test
39+
- run: ./scripts/run_task.sh coverage
40+
41+
e2e_warp:
42+
name: E2E Warp Tests
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Git checkout
46+
uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 0
49+
- name: Run Warp E2E Tests
50+
uses: ./.github/actions/run-monitored-tmpnet-cmd
51+
with:
52+
run: ./scripts/run_task.sh test-e2e-warp-ci
53+
working_directory: ./graft/coreth
54+
artifact_prefix: warp
55+
prometheus_url: ${{ secrets.PROMETHEUS_URL || '' }}
56+
prometheus_push_url: ${{ secrets.PROMETHEUS_PUSH_URL || '' }}
57+
prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }}
58+
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
59+
loki_url: ${{ secrets.LOKI_URL || '' }}
60+
loki_push_url: ${{ secrets.LOKI_PUSH_URL || '' }}
61+
loki_username: ${{ secrets.LOKI_ID || '' }}
62+
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}

.golangci.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,24 @@ issues:
2929
# Maximum count of issues with the same text.
3030
max-same-issues: 0
3131

32+
formatters:
33+
enable:
34+
- gci
35+
- gofmt
36+
- gofumpt
37+
settings:
38+
gci:
39+
sections:
40+
- standard
41+
- default
42+
- blank
43+
- prefix(github.com/ava-labs/avalanchego)
44+
- alias
45+
- dot
46+
custom-order: true
47+
exclusions:
48+
generated: lax
49+
3250
linters:
3351
default: none
3452
enable:
@@ -240,20 +258,3 @@ linters:
240258
linters:
241259
- gosec
242260
- prealloc
243-
formatters:
244-
enable:
245-
- gci
246-
- gofmt
247-
- gofumpt
248-
settings:
249-
gci:
250-
sections:
251-
- standard
252-
- default
253-
- blank
254-
- prefix(github.com/ava-labs/avalanchego)
255-
- alias
256-
- dot
257-
custom-order: true
258-
exclusions:
259-
generated: lax

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ WORKDIR /build
1111
# Copy and download avalanche dependencies using go mod
1212
COPY go.mod .
1313
COPY go.sum .
14+
COPY graft/coreth ./graft/coreth
1415
RUN go mod download
1516

1617
# Copy the code into the container

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,8 @@ To officially support a new platform, one must satisfy the following requirement
243243
**We and our community welcome responsible disclosures.**
244244

245245
Please refer to our [Security Policy](SECURITY.md) and [Security Advisories](https://github.com/ava-labs/avalanchego/security/advisories).
246+
247+
## Licenses
248+
249+
Unless otherwise stated, all code in this repository is licensed under BSD-3. See our [licensing](LICENSE) for more details. Specifically, [grafted repositories](graft/) may use
250+
a different license, and one must refer to that project's README and LICENSE for more details

Taskfile.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ tasks:
117117
generate-mocks:
118118
desc: Generates testing mocks
119119
cmds:
120-
- cmd: grep -lr -E '^// Code generated by MockGen\. DO NOT EDIT\.$' . | xargs -r rm
120+
# Avoid deleting mocks in grafted modules
121+
- cmd: grep -lr -E '^// Code generated by MockGen\. DO NOT EDIT\.$' . | grep -v '^./graft' | xargs -r rm
121122
- cmd: go generate -run "mockgen" ./...
122123

123124
generate-canoto:

go.mod

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ require (
2121
github.com/DataDog/zstd v1.5.2
2222
github.com/StephenButtolph/canoto v0.17.3
2323
github.com/antithesishq/antithesis-sdk-go v0.3.8
24-
github.com/ava-labs/coreth v0.16.0-rc.0
24+
github.com/ava-labs/avalanchego/graft/coreth v0.16.0-rc.0
2525
github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2
26-
github.com/ava-labs/subnet-evm v0.8.1-db-metrics-fix
26+
github.com/ava-labs/subnet-evm v0.8.1-0.20251124174652-9114d48a927d
2727
github.com/btcsuite/btcd/btcutil v1.1.3
2828
github.com/cespare/xxhash/v2 v2.3.0
2929
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593
@@ -89,7 +89,7 @@ require (
8989
require (
9090
github.com/Microsoft/go-winio v0.6.1 // indirect
9191
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
92-
github.com/ava-labs/firewood-go-ethhash/ffi v0.0.13 // indirect
92+
github.com/ava-labs/firewood-go-ethhash/ffi v0.0.15 // indirect
9393
github.com/ava-labs/simplex v0.0.0-20250919142550-9cdfff10fd19
9494
github.com/beorn7/perks v1.0.1 // indirect
9595
github.com/bits-and-blooms/bitset v1.20.0 // indirect
@@ -204,3 +204,5 @@ tool (
204204
github.com/onsi/ginkgo/v2/ginkgo
205205
go.uber.org/mock/mockgen
206206
)
207+
208+
replace github.com/ava-labs/avalanchego/graft/coreth => ./graft/coreth

go.sum

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,14 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV
7171
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
7272
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
7373
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
74-
github.com/ava-labs/coreth v0.16.0-rc.0 h1:nPvkDbxaH8N9f/wQe7B+IGMhPISMuW5CU0cDYuU8iCw=
75-
github.com/ava-labs/coreth v0.16.0-rc.0/go.mod h1:uGr1C7BP0+dWhvsIouhuH0yCyI8YDgS6sfEFIExs0iI=
76-
github.com/ava-labs/firewood-go-ethhash/ffi v0.0.13 h1:obPwnVCkF5+B2f8WbTepHj0ZgiW21vKUgFCtATuAYNY=
77-
github.com/ava-labs/firewood-go-ethhash/ffi v0.0.13/go.mod h1:gsGr1ICjokI9CyPaaRHMqDoDCaT1VguC/IyOTx6rJ14=
74+
github.com/ava-labs/firewood-go-ethhash/ffi v0.0.15 h1:NAVjEu508HwdgbxH/xQxMQoBUgYUn9RQf0VeCrhtYMY=
75+
github.com/ava-labs/firewood-go-ethhash/ffi v0.0.15/go.mod h1:hR/JSGXxST9B9olwu/NpLXHAykfAyNGfyKnYQqiiOeE=
7876
github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2 h1:hQ15IJxY7WOKqeJqCXawsiXh0NZTzmoQOemkWHz7rr4=
7977
github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2/go.mod h1:DqSotSn4Dx/UJV+d3svfW8raR+cH7+Ohl9BpsQ5HlGU=
8078
github.com/ava-labs/simplex v0.0.0-20250919142550-9cdfff10fd19 h1:S6oFasZsplNmw8B2S8cMJQMa62nT5ZKGzZRdCpd+5qQ=
8179
github.com/ava-labs/simplex v0.0.0-20250919142550-9cdfff10fd19/go.mod h1:GVzumIo3zR23/qGRN2AdnVkIPHcKMq/D89EGWZfMGQ0=
82-
github.com/ava-labs/subnet-evm v0.8.1-db-metrics-fix h1:hESwxfeJQTI0FtQYP3/npWGh+4ifj5I3ehYcqzE41zI=
83-
github.com/ava-labs/subnet-evm v0.8.1-db-metrics-fix/go.mod h1:7Jypx176jtNk7Yzz8upQ2K9lcIUp2QaVVudUiWj/L1s=
80+
github.com/ava-labs/subnet-evm v0.8.1-0.20251124174652-9114d48a927d h1:7pjEE0BXLjzQlq5uKP5B2BTl9jTgDKaOfJx2Qfb01Jo=
81+
github.com/ava-labs/subnet-evm v0.8.1-0.20251124174652-9114d48a927d/go.mod h1:JTvIe8YbCjHpy8vy9uZBSpDXxawNXSnIe/Wlf3I09Tk=
8482
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
8583
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
8684
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=

graft/coreth/.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.ci
2+
.github
3+
.gitignore
4+
.golangci.yml
5+
.idea
6+
.vscode
7+
8+
LICENSE
9+
*.md

0 commit comments

Comments
 (0)