From 7409e3e0fda968b8b239c4f163e9ac671a5010db Mon Sep 17 00:00:00 2001 From: Austin Larson Date: Fri, 12 Dec 2025 17:22:23 -0500 Subject: [PATCH 1/6] chore: Add evm-shared as module --- .github/CODEOWNERS | 1 + .github/workflows/evm-ci.yml | 39 ++++++ Dockerfile | 1 + graft/evm-shared/.golangci.yml | 77 ++++++++++++ graft/evm-shared/Taskfile.yml | 99 +++++++++++++++ graft/evm-shared/go.mod | 69 +++++++++++ graft/evm-shared/go.sum | 161 +++++++++++++++++++++++++ graft/evm-shared/scripts/build_test.sh | 19 +++ graft/evm-shared/scripts/coverage.sh | 16 +++ graft/evm-shared/scripts/shellcheck.sh | 39 ++++++ vms/example/xsvm/Dockerfile | 1 + 11 files changed, 522 insertions(+) create mode 100644 .github/workflows/evm-ci.yml create mode 100644 graft/evm-shared/.golangci.yml create mode 100644 graft/evm-shared/Taskfile.yml create mode 100644 graft/evm-shared/go.mod create mode 100644 graft/evm-shared/go.sum create mode 100755 graft/evm-shared/scripts/build_test.sh create mode 100755 graft/evm-shared/scripts/coverage.sh create mode 100755 graft/evm-shared/scripts/shellcheck.sh diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 58097de61564..3c963a557ed1 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -22,6 +22,7 @@ /flake.nix @joshua-kim @maru-ava /graft/coreth @ava-labs/platform-evm /graft/coreth/triedb/firewood/ @alarso16 @ava-labs/platform-evm +/graft/evm-shared @ava-labs/platform-evm /graft/subnet-evm @ava-labs/platform-evm /graft/subnet-evm/triedb/firewood/ @alarso16 @ava-labs/platform-evm /network/p2p/ @joshua-kim diff --git a/.github/workflows/evm-ci.yml b/.github/workflows/evm-ci.yml new file mode 100644 index 000000000000..515cc05050dd --- /dev/null +++ b/.github/workflows/evm-ci.yml @@ -0,0 +1,39 @@ +name: EVM Shared +on: + push: + branches: + - master + pull_request: + merge_group: + types: [checks_requested] + +jobs: + lint_test: + name: Lint + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./graft/evm-shared + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup-go-for-project + - name: Run all lint checks + run: ../../scripts/run_task.sh lint-all-ci + - name: Check go.mod and go.sum are up-to-date + run: ../../scripts/run_task.sh check-go-mod-tidy + + unit_test: + name: Unit Tests (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + defaults: + run: + working-directory: ./graft/evm-shared + strategy: + fail-fast: false + matrix: + os: [macos-latest, ubuntu-22.04, ubuntu-latest] + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup-go-for-project + - run: ../../scripts/run_task.sh build-test + - run: ../../scripts/run_task.sh coverage \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e83e6c9b5076..6955ae3818a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,7 @@ COPY go.mod . COPY go.sum . COPY graft/coreth ./graft/coreth COPY graft/subnet-evm ./graft/subnet-evm +COPY graft/evm-shared ./graft/evm-shared RUN go mod download # Copy the code into the container diff --git a/graft/evm-shared/.golangci.yml b/graft/evm-shared/.golangci.yml new file mode 100644 index 000000000000..c85b064589b8 --- /dev/null +++ b/graft/evm-shared/.golangci.yml @@ -0,0 +1,77 @@ +version: "2" +run: + tests: true + +linters: + default: none + enable: + - bidichk + - copyloopvar + - durationcheck + - gocheckcompilerdirectives + - govet + - ineffassign + - mirror + - misspell + - reassign + # - revive # only certain checks enabled + - staticcheck + - unconvert + - unused + - whitespace + settings: + goconst: + min-len: 3 # minimum length of string constant + min-occurrences: 6 # minimum number of occurrences + staticcheck: + checks: + - all + + # There's a lot of legacy code that triggers these warnings after upgrading golangci-lint. + # These checks are removed. + - -QF1001 # Apply De Morgan’s law + - -QF1002 # Convert an untagged switch comparing the same variable into a “tagged” switch + - -QF1003 # Convert if / else-if chains comparing the same variable into a tagged switch + - -QF1006 # Lift if + break into loop condition + - -QF1008 # Omit embedded fields from selector expression + - -QF1010 # Convert slice of bytes to string when printing it + - -SA1019 # Use of deprecated identifiers: triggers when you import or use something marked deprecated. + - -SA4009 # A function argument is overwritten before its first use. + - -SA9003 # Empty body in an if or else branch. + - -ST1003 # Poorly chosen identifier. + - -ST1008 # A function’s error value should be its last return value. + - -ST1016 # Use consistent method receiver names (e.g. avoid mixing `s *S`, `s S`, `t *T` in same type). + + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - unused + # Exclude unused geth symbols from ethclient/ethclient.go to simplify upgrading Geth to a newer version. + path: ethclient\/ethclient\.go + text: (type `rpcProgress`|func `\(\*rpcProgress\)\.toSyncProgress`) is unused + - linters: + - goconst + path: (.+)_test\.go + paths: + - third_party$ + - builtin$ + - examples$ + +formatters: + enable: + - goimports + settings: + gofmt: + simplify: true + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/graft/evm-shared/Taskfile.yml b/graft/evm-shared/Taskfile.yml new file mode 100644 index 000000000000..7b17274e2ca2 --- /dev/null +++ b/graft/evm-shared/Taskfile.yml @@ -0,0 +1,99 @@ +# https://taskfile.dev +# To run on a system without task installed, `./scripts/run_task.sh` will execute it with `go run`. +# If in the nix dev shell, `task` is available. + +version: '3' + +env: + AVALANCHEGO_BUILD_PATH: '{{.AVALANCHEGO_BUILD_PATH | default (printf "%s/avalanchego/build" .TASKFILE_DIR) }}' + +tasks: + default: ./scripts/run_task.sh --list + + build-test: + desc: Run all Go tests with retry logic for flaky tests, race detection, and coverage reporting + cmd: ./scripts/build_test.sh # ci.yml + + check-clean-branch: + desc: Checks that the git working tree is clean + cmds: + - cmd: git add --all + - cmd: git update-index --really-refresh >> /dev/null + - cmd: git status --short # Show the status of the working tree. + - cmd: git diff-index --quiet HEAD # Exits if any uncommitted changes are found. + + check-generate-codec: + desc: Checks that generated codec files are up-to-date (requires a clean git working tree) + cmds: + - task: generate-codec + - task: check-clean-branch + + check-generate-mocks: + desc: Checks that generated mocks are up-to-date (requires a clean git working tree) + cmds: + - task: generate-mocks + - task: check-clean-branch + + check-generate-rlp: + desc: Checks that generated rlp files are up-to-date (requires a clean git working tree) + cmds: + - task: generate-rlp + - task: check-clean-branch + + check-go-mod-tidy: + desc: Checks that all go.mod and go.sum files are up-to-date (requires a clean git working tree) + cmds: + - cmd: go mod tidy + - task: check-clean-branch + + coverage: + desc: Display test coverage statistics from coverage.out file + cmd: ./scripts/coverage.sh # ci.yml + + generate-codec: + desc: Generates fjl/gencodec files + cmds: + - cmd: grep -lr -E '^// Code generated by github\.com\/fjl\/gencodec\. DO NOT EDIT\.$' . | xargs -r rm + - cmd: go generate -run gencodec ./... + + generate-mocks: + desc: Generates testing mocks + cmds: + - cmd: grep -lr -E '^// Code generated by MockGen\. DO NOT EDIT\.$' . | xargs -r rm + - cmd: go generate -run mockgen ./... + + generate-rlp: + desc: Generates rlp files + cmds: + - cmd: grep -lr -E '^// Code generated by rlpgen\. DO NOT EDIT.\.$' . | xargs -r rm + - cmd: go generate -run rlpgen ./... + + lint: + desc: Run golangci-lint and check for allowed Ethereum imports in Go code + cmd: ./scripts/lint.sh + + lint-all: + desc: Runs all lint checks in parallel + deps: + - lint + - shellcheck + - check-generate-codec + - check-generate-mocks + - check-generate-rlp + + lint-all-ci: + desc: Runs all lint checks one-by-one + cmds: + - task: lint + - task: shellcheck + - task: check-generate-codec + - task: check-generate-mocks + - task: check-generate-rlp + + lint-fix: + desc: Run golangci-lint with auto-fix where possible + cmd: ./scripts/lint_fix.sh + + shellcheck: + desc: Run shellcheck static analysis on all shell scripts with version management + cmd: ./scripts/shellcheck.sh diff --git a/graft/evm-shared/go.mod b/graft/evm-shared/go.mod new file mode 100644 index 000000000000..873abf00b24e --- /dev/null +++ b/graft/evm-shared/go.mod @@ -0,0 +1,69 @@ +module github.com/ava-labs/avalanchego/graft/evm-shared + +go 1.24.9 + +require ( + github.com/VictoriaMetrics/fastcache v1.12.1 + github.com/ava-labs/avalanchego v1.14.0 + github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2 + github.com/gorilla/rpc v1.2.1 + github.com/stretchr/testify v1.11.1 +) + +require ( + github.com/BurntSushi/toml v1.5.0 // indirect + github.com/DataDog/zstd v1.5.2 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.5 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cenkalti/backoff/v5 v5.0.2 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/google/renameio/v2 v2.0.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect + github.com/holiman/uint256 v1.2.4 // indirect + github.com/mr-tron/base58 v1.2.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.23.0 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.65.0 // indirect + github.com/prometheus/procfs v0.16.1 // indirect + github.com/shirou/gopsutil v3.21.11+incompatible // indirect + github.com/supranational/blst v0.3.14 // indirect + github.com/tklauser/go-sysconf v0.3.15 // indirect + github.com/tklauser/numcpus v0.10.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/otel v1.37.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 // indirect + go.opentelemetry.io/otel/metric v1.37.0 // indirect + go.opentelemetry.io/otel/sdk v1.37.0 // indirect + go.opentelemetry.io/otel/trace v1.37.0 // indirect + go.opentelemetry.io/proto/otlp v1.7.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.45.0 // indirect + golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e // indirect + golang.org/x/net v0.47.0 // indirect + golang.org/x/sys v0.38.0 // indirect + golang.org/x/term v0.37.0 // indirect + golang.org/x/text v0.31.0 // indirect + gonum.org/v1/gonum v0.16.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect + google.golang.org/grpc v1.75.0 // indirect + google.golang.org/protobuf v1.36.8 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace github.com/ava-labs/avalanchego => ../../ diff --git a/graft/evm-shared/go.sum b/graft/evm-shared/go.sum new file mode 100644 index 000000000000..45d2ad5470db --- /dev/null +++ b/graft/evm-shared/go.sum @@ -0,0 +1,161 @@ +github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= +github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= +github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= +github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2 h1:hQ15IJxY7WOKqeJqCXawsiXh0NZTzmoQOemkWHz7rr4= +github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2/go.mod h1:DqSotSn4Dx/UJV+d3svfW8raR+cH7+Ohl9BpsQ5HlGU= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/btcsuite/btcd/btcec/v2 v2.3.5 h1:dpAlnAwmT1yIBm3exhT1/8iUSD98RDJM5vqJVQDQLiU= +github.com/btcsuite/btcd/btcec/v2 v2.3.5/go.mod h1:m22FrOAiuxl/tht9wIqAoGHcbnCCaPWyauO8y2LGGtQ= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8= +github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8= +github.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= +github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/rpc v1.2.1 h1:yC+LMV5esttgpVvNORL/xX4jvTTEUE30UZhZ5JF7K9k= +github.com/gorilla/rpc v1.2.1/go.mod h1:uNpOihAlF5xRFLuTYhfR0yfCTm0WTQSQttkMSptRfGk= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 h1:X5VWvz21y3gzm9Nw/kaUeku/1+uBhcekkmy4IkffJww= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1/go.mod h1:Zanoh4+gvIgluNqcfMVTJueD4wSS5hT7zTt4Mrutd90= +github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= +github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= +github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc= +github.com/prometheus/client_golang v1.23.0/go.mod h1:i/o0R9ByOnHX0McrTMTyhYvKE4haaf2mW08I+jGAjEE= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE= +github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/sanity-io/litter v1.5.1 h1:dwnrSypP6q56o3lFxTU+t2fwQ9A+U5qrXVO4Qg9KwVU= +github.com/sanity-io/litter v1.5.1/go.mod h1:5Z71SvaYy5kcGtyglXOC9rrUi3c1E8CamFWjQsazTh0= +github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= +github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo= +github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/thepudds/fzgen v0.4.3 h1:srUP/34BulQaEwPP/uHZkdjUcUjIzL7Jkf4CBVryiP8= +github.com/thepudds/fzgen v0.4.3/go.mod h1:BhhwtRhzgvLWAjjcHDJ9pEiLD2Z9hrVIFjBCHJ//zJ4= +github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= +github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= +github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= +github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 h1:Ahq7pZmv87yiyn3jeFz/LekZmPLLdKejuO3NcK9MssM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0/go.mod h1:MJTqhM0im3mRLw1i8uGHnCvUEeS7VwRyxlLC78PA18M= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 h1:EtFWSnwW9hGObjkIdmlnWSydO+Qs8OwzfzXLUPg4xOc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0/go.mod h1:QjUEoiGCPkvFZ/MjK6ZZfNOS6mfVEVKYE99dFhuN2LI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= +go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= +go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= +go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= +go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os= +go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= +golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= +golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e h1:4qufH0hlUYs6AO6XmZC3GqfDPGSXHVXUFR6OND+iJX4= +golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c= +golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= +golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= +golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= +golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= +golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= +golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 h1:FiusG7LWj+4byqhbvmB+Q93B/mOxJLN2DTozDuZm4EU= +google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:kXqgZtrWaf6qS3jZOCnCH7WYfrvFjkC51bM8fz3RsCA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c h1:qXWI/sQtv5UKboZ/zUk7h+mrf/lXORyI+n9DKDAusdg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo= +google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4= +google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/graft/evm-shared/scripts/build_test.sh b/graft/evm-shared/scripts/build_test.sh new file mode 100755 index 000000000000..00e80cbb615b --- /dev/null +++ b/graft/evm-shared/scripts/build_test.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -euo pipefail + +REPO_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd ../../../ && pwd ) +# shellcheck disable=SC1091 +source "$REPO_ROOT"/scripts/constants.sh + +# We pass in the arguments to this script directly to enable easily passing parameters such as enabling race detection, +# parallelism, and test coverage. +# DO NOT RUN tests from the top level "tests" directory since they are run by ginkgo +race="-race" +if [[ -n "${NO_RACE:-}" ]]; then + race="" +fi + +cd "$REPO_ROOT/graft/evm-shared" +# shellcheck disable=SC2046 +go test -shuffle=on ${race:-} -timeout="${TIMEOUT:-600s}" -coverprofile=coverage.out -covermode=atomic "$@" ./... diff --git a/graft/evm-shared/scripts/coverage.sh b/graft/evm-shared/scripts/coverage.sh new file mode 100755 index 000000000000..e5975b8b8e63 --- /dev/null +++ b/graft/evm-shared/scripts/coverage.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail + +if [ ! -f "coverage.out" ]; then + echo "no coverage file" + exit 0 +fi + +totalCoverage=$(go tool cover -func=coverage.out | grep total | grep -Eo '[0-9]+\.[0-9]+') +echo "Current test coverage : $totalCoverage %" +echo "========================================" + +go tool cover -func=coverage.out diff --git a/graft/evm-shared/scripts/shellcheck.sh b/graft/evm-shared/scripts/shellcheck.sh new file mode 100755 index 000000000000..140efd2ac989 --- /dev/null +++ b/graft/evm-shared/scripts/shellcheck.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +set -euo pipefail + +VERSION="v0.9.0" + +function get_version { + local target_path=$1 + if command -v "${target_path}" > /dev/null; then + echo "v$("${target_path}" --version | grep version: | awk '{print $2}')" + fi +} + +REPO_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd ) + +SYSTEM_VERSION="$(get_version shellcheck)" +if [[ "${SYSTEM_VERSION}" == "${VERSION}" ]]; then + SHELLCHECK=shellcheck +else + # Try to install a local version + SHELLCHECK="${REPO_ROOT}/bin/shellcheck" + LOCAL_VERSION="$(get_version "${SHELLCHECK}")" + if [[ -z "${LOCAL_VERSION}" || "${LOCAL_VERSION}" != "${VERSION}" ]]; then + if which sw_vers &> /dev/null; then + echo "on macos, only x86_64 binaries are available so rosetta is required" + echo "to avoid using rosetta, install via homebrew: brew install shellcheck" + DIST=darwin.x86_64 + else + # Linux - binaries for common arches *should* be available + arch="$(uname -i)" + DIST="linux.${arch}" + fi + curl -s -L "https://github.com/koalaman/shellcheck/releases/download/${VERSION}/shellcheck-${VERSION}.${DIST}.tar.xz" | tar Jxv -C /tmp > /dev/null + mkdir -p "$(dirname "${SHELLCHECK}")" + cp /tmp/shellcheck-"${VERSION}"/shellcheck "${SHELLCHECK}" + fi +fi + +find "${REPO_ROOT}" -type f -name "*.sh" -print0 | xargs -0 "${SHELLCHECK}" "${@}" diff --git a/vms/example/xsvm/Dockerfile b/vms/example/xsvm/Dockerfile index 03c670968af1..945cb3dd73af 100644 --- a/vms/example/xsvm/Dockerfile +++ b/vms/example/xsvm/Dockerfile @@ -15,6 +15,7 @@ COPY go.mod . COPY go.sum . COPY graft/coreth ./graft/coreth COPY graft/subnet-evm ./graft/subnet-evm +COPY graft/evm-shared ./graft/evm-shared RUN go mod download # Copy the code into the container From f0e25fc42d2e491111bf04f825fe8d4fb3102762 Mon Sep 17 00:00:00 2001 From: Austin Larson Date: Mon, 15 Dec 2025 11:10:23 -0500 Subject: [PATCH 2/6] refactor: rename shared folder --- .github/CODEOWNERS | 2 +- .github/workflows/evm-ci.yml | 4 ++-- Dockerfile | 2 +- graft/coreth/Taskfile.yml | 4 ++-- graft/{evm-shared => evm}/.golangci.yml | 0 graft/{evm-shared => evm}/Taskfile.yml | 0 graft/{evm-shared => evm}/go.mod | 2 +- graft/{evm-shared => evm}/go.sum | 0 graft/{evm-shared => evm}/scripts/build_test.sh | 2 +- graft/{evm-shared => evm}/scripts/coverage.sh | 0 graft/{evm-shared => evm}/scripts/lint.sh | 6 +++--- graft/{evm-shared => evm}/scripts/lint_fix.sh | 4 ++-- graft/{evm-shared => evm}/scripts/lint_setup.sh | 2 +- graft/{evm-shared => evm}/scripts/shellcheck.sh | 0 graft/subnet-evm/Taskfile.yml | 4 ++-- vms/example/xsvm/Dockerfile | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) rename graft/{evm-shared => evm}/.golangci.yml (100%) rename graft/{evm-shared => evm}/Taskfile.yml (100%) rename graft/{evm-shared => evm}/go.mod (98%) rename graft/{evm-shared => evm}/go.sum (100%) rename graft/{evm-shared => evm}/scripts/build_test.sh (95%) rename graft/{evm-shared => evm}/scripts/coverage.sh (100%) rename graft/{evm-shared => evm}/scripts/lint.sh (98%) rename graft/{evm-shared => evm}/scripts/lint_fix.sh (94%) rename graft/{evm-shared => evm}/scripts/lint_setup.sh (99%) rename graft/{evm-shared => evm}/scripts/shellcheck.sh (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3c963a557ed1..2070705083cf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -22,7 +22,7 @@ /flake.nix @joshua-kim @maru-ava /graft/coreth @ava-labs/platform-evm /graft/coreth/triedb/firewood/ @alarso16 @ava-labs/platform-evm -/graft/evm-shared @ava-labs/platform-evm +/graft/evm @ava-labs/platform-evm /graft/subnet-evm @ava-labs/platform-evm /graft/subnet-evm/triedb/firewood/ @alarso16 @ava-labs/platform-evm /network/p2p/ @joshua-kim diff --git a/.github/workflows/evm-ci.yml b/.github/workflows/evm-ci.yml index 515cc05050dd..80c9651ad61d 100644 --- a/.github/workflows/evm-ci.yml +++ b/.github/workflows/evm-ci.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: ./graft/evm-shared + working-directory: ./graft/evm steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-go-for-project @@ -27,7 +27,7 @@ jobs: runs-on: ${{ matrix.os }} defaults: run: - working-directory: ./graft/evm-shared + working-directory: ./graft/evm strategy: fail-fast: false matrix: diff --git a/Dockerfile b/Dockerfile index 6955ae3818a1..436a8af47e78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ COPY go.mod . COPY go.sum . COPY graft/coreth ./graft/coreth COPY graft/subnet-evm ./graft/subnet-evm -COPY graft/evm-shared ./graft/evm-shared +COPY graft/evm ./graft/evm RUN go mod download # Copy the code into the container diff --git a/graft/coreth/Taskfile.yml b/graft/coreth/Taskfile.yml index ca109e533a12..dee5c4f28dcd 100644 --- a/graft/coreth/Taskfile.yml +++ b/graft/coreth/Taskfile.yml @@ -70,7 +70,7 @@ tasks: lint: desc: Run golangci-lint and check for allowed Ethereum imports in Go code - cmd: ../evm-shared/scripts/lint.sh + cmd: ../evm/scripts/lint.sh lint-all: desc: Runs all lint checks in parallel @@ -92,7 +92,7 @@ tasks: lint-fix: desc: Run golangci-lint with auto-fix where possible - cmd: ../evm-shared/scripts/lint_fix.sh + cmd: ../evm/scripts/lint_fix.sh shellcheck: desc: Run shellcheck static analysis on all shell scripts with version management diff --git a/graft/evm-shared/.golangci.yml b/graft/evm/.golangci.yml similarity index 100% rename from graft/evm-shared/.golangci.yml rename to graft/evm/.golangci.yml diff --git a/graft/evm-shared/Taskfile.yml b/graft/evm/Taskfile.yml similarity index 100% rename from graft/evm-shared/Taskfile.yml rename to graft/evm/Taskfile.yml diff --git a/graft/evm-shared/go.mod b/graft/evm/go.mod similarity index 98% rename from graft/evm-shared/go.mod rename to graft/evm/go.mod index 873abf00b24e..afffac52699a 100644 --- a/graft/evm-shared/go.mod +++ b/graft/evm/go.mod @@ -1,4 +1,4 @@ -module github.com/ava-labs/avalanchego/graft/evm-shared +module github.com/ava-labs/avalanchego/graft/evm go 1.24.9 diff --git a/graft/evm-shared/go.sum b/graft/evm/go.sum similarity index 100% rename from graft/evm-shared/go.sum rename to graft/evm/go.sum diff --git a/graft/evm-shared/scripts/build_test.sh b/graft/evm/scripts/build_test.sh similarity index 95% rename from graft/evm-shared/scripts/build_test.sh rename to graft/evm/scripts/build_test.sh index 00e80cbb615b..94cc38f1b723 100755 --- a/graft/evm-shared/scripts/build_test.sh +++ b/graft/evm/scripts/build_test.sh @@ -14,6 +14,6 @@ if [[ -n "${NO_RACE:-}" ]]; then race="" fi -cd "$REPO_ROOT/graft/evm-shared" +cd "$REPO_ROOT/graft/evm" # shellcheck disable=SC2046 go test -shuffle=on ${race:-} -timeout="${TIMEOUT:-600s}" -coverprofile=coverage.out -covermode=atomic "$@" ./... diff --git a/graft/evm-shared/scripts/coverage.sh b/graft/evm/scripts/coverage.sh similarity index 100% rename from graft/evm-shared/scripts/coverage.sh rename to graft/evm/scripts/coverage.sh diff --git a/graft/evm-shared/scripts/lint.sh b/graft/evm/scripts/lint.sh similarity index 98% rename from graft/evm-shared/scripts/lint.sh rename to graft/evm/scripts/lint.sh index b3d62c98219f..89eaf1bb2bcf 100755 --- a/graft/evm-shared/scripts/lint.sh +++ b/graft/evm/scripts/lint.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash # -# lint.sh - Comprehensive linting script for modules using evm-shared +# lint.sh - Comprehensive linting script for modules using evm # # Usage: -# This script must be run from the root of a module that uses evm-shared +# This script must be run from the root of a module that uses evm # (e.g., coreth/ or subnet-evm/). # # From the module root: -# ../evm-shared/scripts/lint.sh +# ../evm/scripts/lint.sh # TESTS='license_header' ./scripts/lint.sh # Run specific test only # # Requirements: diff --git a/graft/evm-shared/scripts/lint_fix.sh b/graft/evm/scripts/lint_fix.sh similarity index 94% rename from graft/evm-shared/scripts/lint_fix.sh rename to graft/evm/scripts/lint_fix.sh index 707793d96473..a95286b9e801 100755 --- a/graft/evm-shared/scripts/lint_fix.sh +++ b/graft/evm/scripts/lint_fix.sh @@ -3,8 +3,8 @@ # lint_fix.sh - Runs golangci-lint with automatic fixes # # Usage: -# This script must be run from the root of a module that uses evm-shared -# (e.g., coreth/ or subnet-evm/), NOT from evm-shared itself. +# This script must be run from the root of a module that uses evm +# (e.g., coreth/ or subnet-evm/), NOT from evm itself. # # From the repository root: # ./scripts/lint_fix.sh diff --git a/graft/evm-shared/scripts/lint_setup.sh b/graft/evm/scripts/lint_setup.sh similarity index 99% rename from graft/evm-shared/scripts/lint_setup.sh rename to graft/evm/scripts/lint_setup.sh index afc5e3f8009a..510e821fc32e 100755 --- a/graft/evm-shared/scripts/lint_setup.sh +++ b/graft/evm/scripts/lint_setup.sh @@ -11,7 +11,7 @@ # to each category of files. # # Usage: -# This script must be sourced from the root of a module that uses evm-shared: +# This script must be sourced from the root of a module that uses evm: # # source ./scripts/lint_setup.sh # setup_lint diff --git a/graft/evm-shared/scripts/shellcheck.sh b/graft/evm/scripts/shellcheck.sh similarity index 100% rename from graft/evm-shared/scripts/shellcheck.sh rename to graft/evm/scripts/shellcheck.sh diff --git a/graft/subnet-evm/Taskfile.yml b/graft/subnet-evm/Taskfile.yml index 71f56405edc4..d1926f45903a 100644 --- a/graft/subnet-evm/Taskfile.yml +++ b/graft/subnet-evm/Taskfile.yml @@ -100,7 +100,7 @@ tasks: lint: desc: Run golangci-lint and check for allowed Ethereum imports in Go code - cmd: ../evm-shared/scripts/lint.sh + cmd: ../evm/scripts/lint.sh lint-all: desc: Runs all lint checks in parallel @@ -124,7 +124,7 @@ tasks: lint-fix: desc: Run golangci-lint with auto-fix where possible - cmd: ../evm-shared/scripts/lint_fix.sh + cmd: ../evm/scripts/lint_fix.sh shellcheck: desc: Run shellcheck static analysis on all shell scripts with version management diff --git a/vms/example/xsvm/Dockerfile b/vms/example/xsvm/Dockerfile index 945cb3dd73af..ad3a7ea065ff 100644 --- a/vms/example/xsvm/Dockerfile +++ b/vms/example/xsvm/Dockerfile @@ -15,7 +15,7 @@ COPY go.mod . COPY go.sum . COPY graft/coreth ./graft/coreth COPY graft/subnet-evm ./graft/subnet-evm -COPY graft/evm-shared ./graft/evm-shared +COPY graft/evm ./graft/evm RUN go mod download # Copy the code into the container From 9937990426782ffcdb2373c8caf383e8a5695dba Mon Sep 17 00:00:00 2001 From: Austin Larson Date: Mon, 15 Dec 2025 11:16:35 -0500 Subject: [PATCH 3/6] refactor: Use some shared code --- go.mod | 4 + graft/coreth/ethclient/simulated/backend.go | 2 +- graft/coreth/go.mod | 3 + graft/coreth/plugin/evm/vm.go | 2 +- graft/coreth/plugin/evm/vm_test.go | 2 +- .../coreth/plugin/evm/vmtest/test_syncervm.go | 2 +- graft/coreth/plugin/evm/wrapped_block.go | 2 +- graft/coreth/precompile/modules/registerer.go | 2 +- .../precompile/modules/registerer_test.go | 2 +- graft/{coreth => evm}/constants/constants.go | 0 graft/evm/go.mod | 58 +------ graft/evm/go.sum | 153 ------------------ graft/subnet-evm/constants/constants.go | 11 -- graft/subnet-evm/core/blockchain_reader.go | 2 +- graft/subnet-evm/core/chain_makers.go | 2 +- .../subnet-evm/ethclient/simulated/backend.go | 2 +- graft/subnet-evm/go.mod | 3 + graft/subnet-evm/plugin/evm/syncervm_test.go | 2 +- graft/subnet-evm/plugin/evm/vm.go | 2 +- graft/subnet-evm/plugin/evm/vm_test.go | 2 +- .../nativeminter/unpack_pack_test.go | 2 +- .../contracts/rewardmanager/contract.go | 4 +- .../contracts/rewardmanager/contract_test.go | 2 +- .../contracts/rewardmanager/simulated_test.go | 2 +- .../precompile/modules/registerer.go | 2 +- .../precompile/modules/registerer_test.go | 2 +- 26 files changed, 31 insertions(+), 241 deletions(-) rename graft/{coreth => evm}/constants/constants.go (100%) delete mode 100644 graft/subnet-evm/constants/constants.go diff --git a/go.mod b/go.mod index 39447b1db617..ed08b5e0dd22 100644 --- a/go.mod +++ b/go.mod @@ -87,6 +87,8 @@ require ( k8s.io/utils v0.0.0-20230726121419-3b25d923346b ) +require github.com/ava-labs/avalanchego/graft/evm v0.0.0-00010101000000-000000000000 // indirect + require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect @@ -209,3 +211,5 @@ tool ( replace github.com/ava-labs/avalanchego/graft/coreth => ./graft/coreth replace github.com/ava-labs/avalanchego/graft/subnet-evm => ./graft/subnet-evm + +replace github.com/ava-labs/avalanchego/graft/evm => ./graft/evm diff --git a/graft/coreth/ethclient/simulated/backend.go b/graft/coreth/ethclient/simulated/backend.go index 08c4aa63f740..fcb205c9add3 100644 --- a/graft/coreth/ethclient/simulated/backend.go +++ b/graft/coreth/ethclient/simulated/backend.go @@ -33,7 +33,6 @@ import ( "time" "github.com/ava-labs/avalanchego/graft/coreth/consensus/dummy" - "github.com/ava-labs/avalanchego/graft/coreth/constants" "github.com/ava-labs/avalanchego/graft/coreth/core" "github.com/ava-labs/avalanchego/graft/coreth/eth" "github.com/ava-labs/avalanchego/graft/coreth/eth/ethconfig" @@ -42,6 +41,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/node" "github.com/ava-labs/avalanchego/graft/coreth/params" "github.com/ava-labs/avalanchego/graft/coreth/rpc" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/utils/timer/mockable" ethereum "github.com/ava-labs/libevm" "github.com/ava-labs/libevm/common" diff --git a/graft/coreth/go.mod b/graft/coreth/go.mod index 23b145b12e86..eb965913a091 100644 --- a/graft/coreth/go.mod +++ b/graft/coreth/go.mod @@ -10,6 +10,7 @@ go 1.24.9 require ( github.com/VictoriaMetrics/fastcache v1.12.1 github.com/ava-labs/avalanchego v1.14.1-0.20251120155522-df4a8e531761 + github.com/ava-labs/avalanchego/graft/evm v0.0.0-00010101000000-000000000000 github.com/ava-labs/firewood-go-ethhash/ffi v0.0.16 github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc @@ -184,3 +185,5 @@ tool ( ) replace github.com/ava-labs/avalanchego => ../../ + +replace github.com/ava-labs/avalanchego/graft/evm => ../evm diff --git a/graft/coreth/plugin/evm/vm.go b/graft/coreth/plugin/evm/vm.go index 44fac1fa0d31..d17db128b0d9 100644 --- a/graft/coreth/plugin/evm/vm.go +++ b/graft/coreth/plugin/evm/vm.go @@ -43,7 +43,6 @@ import ( "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/database/versiondb" "github.com/ava-labs/avalanchego/graft/coreth/consensus/dummy" - "github.com/ava-labs/avalanchego/graft/coreth/constants" "github.com/ava-labs/avalanchego/graft/coreth/core" "github.com/ava-labs/avalanchego/graft/coreth/core/txpool" "github.com/ava-labs/avalanchego/graft/coreth/eth" @@ -66,6 +65,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/sync/handlers" "github.com/ava-labs/avalanchego/graft/coreth/triedb/hashdb" "github.com/ava-labs/avalanchego/graft/coreth/warp" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/network/p2p" "github.com/ava-labs/avalanchego/network/p2p/acp118" diff --git a/graft/coreth/plugin/evm/vm_test.go b/graft/coreth/plugin/evm/vm_test.go index 157ece7c1513..d64dda99e705 100644 --- a/graft/coreth/plugin/evm/vm_test.go +++ b/graft/coreth/plugin/evm/vm_test.go @@ -28,7 +28,6 @@ import ( "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/database/memdb" "github.com/ava-labs/avalanchego/graft/coreth/consensus/dummy" - "github.com/ava-labs/avalanchego/graft/coreth/constants" "github.com/ava-labs/avalanchego/graft/coreth/core" "github.com/ava-labs/avalanchego/graft/coreth/eth" "github.com/ava-labs/avalanchego/graft/coreth/miner" @@ -46,6 +45,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/rpc" "github.com/ava-labs/avalanchego/graft/coreth/utils" "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow/snowtest" "github.com/ava-labs/avalanchego/upgrade" diff --git a/graft/coreth/plugin/evm/vmtest/test_syncervm.go b/graft/coreth/plugin/evm/vmtest/test_syncervm.go index b39703d99cca..482fc19f4848 100644 --- a/graft/coreth/plugin/evm/vmtest/test_syncervm.go +++ b/graft/coreth/plugin/evm/vmtest/test_syncervm.go @@ -23,7 +23,6 @@ import ( "github.com/ava-labs/avalanchego/database/prefixdb" "github.com/ava-labs/avalanchego/graft/coreth/consensus/dummy" - "github.com/ava-labs/avalanchego/graft/coreth/constants" "github.com/ava-labs/avalanchego/graft/coreth/core" "github.com/ava-labs/avalanchego/graft/coreth/core/coretest" "github.com/ava-labs/avalanchego/graft/coreth/params/paramstest" @@ -33,6 +32,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/vmsync" "github.com/ava-labs/avalanchego/graft/coreth/sync/statesync/statesynctest" "github.com/ava-labs/avalanchego/graft/coreth/utils/utilstest" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/engine/enginetest" diff --git a/graft/coreth/plugin/evm/wrapped_block.go b/graft/coreth/plugin/evm/wrapped_block.go index 2db44fa8b263..c7600a9bf2cc 100644 --- a/graft/coreth/plugin/evm/wrapped_block.go +++ b/graft/coreth/plugin/evm/wrapped_block.go @@ -18,7 +18,6 @@ import ( "github.com/ava-labs/libevm/rlp" "github.com/ava-labs/libevm/trie" - "github.com/ava-labs/avalanchego/graft/coreth/constants" "github.com/ava-labs/avalanchego/graft/coreth/core" "github.com/ava-labs/avalanchego/graft/coreth/params" "github.com/ava-labs/avalanchego/graft/coreth/params/extras" @@ -28,6 +27,7 @@ import ( "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap0" "github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/upgrade/ap1" "github.com/ava-labs/avalanchego/graft/coreth/precompile/precompileconfig" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow/consensus/snowman" "github.com/ava-labs/avalanchego/snow/engine/snowman/block" diff --git a/graft/coreth/precompile/modules/registerer.go b/graft/coreth/precompile/modules/registerer.go index e84da42062ce..79379c755105 100644 --- a/graft/coreth/precompile/modules/registerer.go +++ b/graft/coreth/precompile/modules/registerer.go @@ -10,8 +10,8 @@ import ( "github.com/ava-labs/libevm/common" - "github.com/ava-labs/avalanchego/graft/coreth/constants" "github.com/ava-labs/avalanchego/graft/coreth/utils" + "github.com/ava-labs/avalanchego/graft/evm/constants" ) var ( diff --git a/graft/coreth/precompile/modules/registerer_test.go b/graft/coreth/precompile/modules/registerer_test.go index d84220b87e1a..238ad218e854 100644 --- a/graft/coreth/precompile/modules/registerer_test.go +++ b/graft/coreth/precompile/modules/registerer_test.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/graft/coreth/constants" + "github.com/ava-labs/avalanchego/graft/evm/constants" ) func TestInsertSortedByAddress(t *testing.T) { diff --git a/graft/coreth/constants/constants.go b/graft/evm/constants/constants.go similarity index 100% rename from graft/coreth/constants/constants.go rename to graft/evm/constants/constants.go diff --git a/graft/evm/go.mod b/graft/evm/go.mod index afffac52699a..855ca12e1a9a 100644 --- a/graft/evm/go.mod +++ b/graft/evm/go.mod @@ -2,68 +2,12 @@ module github.com/ava-labs/avalanchego/graft/evm go 1.24.9 -require ( - github.com/VictoriaMetrics/fastcache v1.12.1 - github.com/ava-labs/avalanchego v1.14.0 - github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2 - github.com/gorilla/rpc v1.2.1 - github.com/stretchr/testify v1.11.1 -) +require github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2 require ( - github.com/BurntSushi/toml v1.5.0 // indirect - github.com/DataDog/zstd v1.5.2 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.5 // indirect - github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cenkalti/backoff/v5 v5.0.2 // indirect - github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect - github.com/go-logr/logr v1.4.3 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.3.0 // indirect - github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/google/renameio/v2 v2.0.0 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect github.com/holiman/uint256 v1.2.4 // indirect - github.com/mr-tron/base58 v1.2.0 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.23.0 // indirect - github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.65.0 // indirect - github.com/prometheus/procfs v0.16.1 // indirect - github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/supranational/blst v0.3.14 // indirect - github.com/tklauser/go-sysconf v0.3.15 // indirect - github.com/tklauser/numcpus v0.10.0 // indirect - github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/otel v1.37.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 // indirect - go.opentelemetry.io/otel/metric v1.37.0 // indirect - go.opentelemetry.io/otel/sdk v1.37.0 // indirect - go.opentelemetry.io/otel/trace v1.37.0 // indirect - go.opentelemetry.io/proto/otlp v1.7.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.27.0 // indirect golang.org/x/crypto v0.45.0 // indirect - golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e // indirect - golang.org/x/net v0.47.0 // indirect golang.org/x/sys v0.38.0 // indirect - golang.org/x/term v0.37.0 // indirect - golang.org/x/text v0.31.0 // indirect - gonum.org/v1/gonum v0.16.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect - google.golang.org/grpc v1.75.0 // indirect - google.golang.org/protobuf v1.36.8 // indirect - gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) replace github.com/ava-labs/avalanchego => ../../ diff --git a/graft/evm/go.sum b/graft/evm/go.sum index 45d2ad5470db..b59abce5d4bf 100644 --- a/graft/evm/go.sum +++ b/graft/evm/go.sum @@ -1,161 +1,8 @@ -github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= -github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= -github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2 h1:hQ15IJxY7WOKqeJqCXawsiXh0NZTzmoQOemkWHz7rr4= github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2/go.mod h1:DqSotSn4Dx/UJV+d3svfW8raR+cH7+Ohl9BpsQ5HlGU= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/btcsuite/btcd/btcec/v2 v2.3.5 h1:dpAlnAwmT1yIBm3exhT1/8iUSD98RDJM5vqJVQDQLiU= -github.com/btcsuite/btcd/btcec/v2 v2.3.5/go.mod h1:m22FrOAiuxl/tht9wIqAoGHcbnCCaPWyauO8y2LGGtQ= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cenkalti/backoff/v5 v5.0.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8= -github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8= -github.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= -github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= -github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= -github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/rpc v1.2.1 h1:yC+LMV5esttgpVvNORL/xX4jvTTEUE30UZhZ5JF7K9k= -github.com/gorilla/rpc v1.2.1/go.mod h1:uNpOihAlF5xRFLuTYhfR0yfCTm0WTQSQttkMSptRfGk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 h1:X5VWvz21y3gzm9Nw/kaUeku/1+uBhcekkmy4IkffJww= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1/go.mod h1:Zanoh4+gvIgluNqcfMVTJueD4wSS5hT7zTt4Mrutd90= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= -github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc= -github.com/prometheus/client_golang v1.23.0/go.mod h1:i/o0R9ByOnHX0McrTMTyhYvKE4haaf2mW08I+jGAjEE= -github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= -github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE= -github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= -github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= -github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= -github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= -github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= -github.com/sanity-io/litter v1.5.1 h1:dwnrSypP6q56o3lFxTU+t2fwQ9A+U5qrXVO4Qg9KwVU= -github.com/sanity-io/litter v1.5.1/go.mod h1:5Z71SvaYy5kcGtyglXOC9rrUi3c1E8CamFWjQsazTh0= -github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= -github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo= -github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= -github.com/thepudds/fzgen v0.4.3 h1:srUP/34BulQaEwPP/uHZkdjUcUjIzL7Jkf4CBVryiP8= -github.com/thepudds/fzgen v0.4.3/go.mod h1:BhhwtRhzgvLWAjjcHDJ9pEiLD2Z9hrVIFjBCHJ//zJ4= -github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= -github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= -github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= -github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= -github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= -github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= -go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 h1:Ahq7pZmv87yiyn3jeFz/LekZmPLLdKejuO3NcK9MssM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0/go.mod h1:MJTqhM0im3mRLw1i8uGHnCvUEeS7VwRyxlLC78PA18M= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 h1:EtFWSnwW9hGObjkIdmlnWSydO+Qs8OwzfzXLUPg4xOc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0/go.mod h1:QjUEoiGCPkvFZ/MjK6ZZfNOS6mfVEVKYE99dFhuN2LI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= -go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= -go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= -go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= -go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= -go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= -go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= -go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= -go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= -go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os= -go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo= -go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= -go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= -go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= -golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e h1:4qufH0hlUYs6AO6XmZC3GqfDPGSXHVXUFR6OND+iJX4= -golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c= -golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= -golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= -golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= -golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= -golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= -golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= -golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= -gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= -gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= -google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 h1:FiusG7LWj+4byqhbvmB+Q93B/mOxJLN2DTozDuZm4EU= -google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:kXqgZtrWaf6qS3jZOCnCH7WYfrvFjkC51bM8fz3RsCA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c h1:qXWI/sQtv5UKboZ/zUk7h+mrf/lXORyI+n9DKDAusdg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo= -google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4= -google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= -google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= -google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/graft/subnet-evm/constants/constants.go b/graft/subnet-evm/constants/constants.go deleted file mode 100644 index 974096020c9e..000000000000 --- a/graft/subnet-evm/constants/constants.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package constants - -import "github.com/ava-labs/libevm/common" - -var BlackholeAddr = common.Address{ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -} diff --git a/graft/subnet-evm/core/blockchain_reader.go b/graft/subnet-evm/core/blockchain_reader.go index 23dc0cac97ae..0c65f0e21780 100644 --- a/graft/subnet-evm/core/blockchain_reader.go +++ b/graft/subnet-evm/core/blockchain_reader.go @@ -30,9 +30,9 @@ package core import ( "math/big" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus" - "github.com/ava-labs/avalanchego/graft/subnet-evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/state/snapshot" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/feemanager" diff --git a/graft/subnet-evm/core/chain_makers.go b/graft/subnet-evm/core/chain_makers.go index feabb180b945..f3234110ce34 100644 --- a/graft/subnet-evm/core/chain_makers.go +++ b/graft/subnet-evm/core/chain_makers.go @@ -31,9 +31,9 @@ import ( "fmt" "math/big" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus" - "github.com/ava-labs/avalanchego/graft/subnet-evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/extstate" "github.com/ava-labs/avalanchego/graft/subnet-evm/params" "github.com/ava-labs/avalanchego/graft/subnet-evm/plugin/evm/customheader" diff --git a/graft/subnet-evm/ethclient/simulated/backend.go b/graft/subnet-evm/ethclient/simulated/backend.go index e43043fd2a16..2a1f4ec53123 100644 --- a/graft/subnet-evm/ethclient/simulated/backend.go +++ b/graft/subnet-evm/ethclient/simulated/backend.go @@ -32,8 +32,8 @@ import ( "math/big" "time" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus/dummy" - "github.com/ava-labs/avalanchego/graft/subnet-evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/eth" "github.com/ava-labs/avalanchego/graft/subnet-evm/eth/ethconfig" diff --git a/graft/subnet-evm/go.mod b/graft/subnet-evm/go.mod index 12245aabfe3e..bf2425df45a5 100644 --- a/graft/subnet-evm/go.mod +++ b/graft/subnet-evm/go.mod @@ -17,6 +17,7 @@ require ( github.com/VictoriaMetrics/fastcache v1.12.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 github.com/ava-labs/avalanchego v1.14.1-antithesis-docker-image-fix + github.com/ava-labs/avalanchego/graft/evm v0.0.0-00010101000000-000000000000 github.com/ava-labs/firewood-go-ethhash/ffi v0.0.16 github.com/ava-labs/libevm v1.13.15-0.20251016142715-1bccf4f2ddb2 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc @@ -207,3 +208,5 @@ tool ( ) replace github.com/ava-labs/avalanchego => ../../ + +replace github.com/ava-labs/avalanchego/graft/evm => ../evm diff --git a/graft/subnet-evm/plugin/evm/syncervm_test.go b/graft/subnet-evm/plugin/evm/syncervm_test.go index 062bd87256c6..4b182b40b77d 100644 --- a/graft/subnet-evm/plugin/evm/syncervm_test.go +++ b/graft/subnet-evm/plugin/evm/syncervm_test.go @@ -24,8 +24,8 @@ import ( "github.com/ava-labs/avalanchego/api/metrics" "github.com/ava-labs/avalanchego/database/prefixdb" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus/dummy" - "github.com/ava-labs/avalanchego/graft/subnet-evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/coretest" "github.com/ava-labs/avalanchego/graft/subnet-evm/params/paramstest" diff --git a/graft/subnet-evm/plugin/evm/vm.go b/graft/subnet-evm/plugin/evm/vm.go index 61fabbeb45d1..c92027de58de 100644 --- a/graft/subnet-evm/plugin/evm/vm.go +++ b/graft/subnet-evm/plugin/evm/vm.go @@ -41,9 +41,9 @@ import ( "github.com/ava-labs/avalanchego/codec" "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/database/versiondb" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" "github.com/ava-labs/avalanchego/graft/subnet-evm/consensus/dummy" - "github.com/ava-labs/avalanchego/graft/subnet-evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/txpool" "github.com/ava-labs/avalanchego/graft/subnet-evm/eth" diff --git a/graft/subnet-evm/plugin/evm/vm_test.go b/graft/subnet-evm/plugin/evm/vm_test.go index 758e89cf2d38..2db384e2cb7c 100644 --- a/graft/subnet-evm/plugin/evm/vm_test.go +++ b/graft/subnet-evm/plugin/evm/vm_test.go @@ -29,8 +29,8 @@ import ( "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/database/memdb" "github.com/ava-labs/avalanchego/database/prefixdb" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" - "github.com/ava-labs/avalanchego/graft/subnet-evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/txpool" "github.com/ava-labs/avalanchego/graft/subnet-evm/eth" diff --git a/graft/subnet-evm/precompile/contracts/nativeminter/unpack_pack_test.go b/graft/subnet-evm/precompile/contracts/nativeminter/unpack_pack_test.go index 502a249add26..4048674cfdb9 100644 --- a/graft/subnet-evm/precompile/contracts/nativeminter/unpack_pack_test.go +++ b/graft/subnet-evm/precompile/contracts/nativeminter/unpack_pack_test.go @@ -12,8 +12,8 @@ import ( "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/accounts/abi" - "github.com/ava-labs/avalanchego/graft/subnet-evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contract" ) diff --git a/graft/subnet-evm/precompile/contracts/rewardmanager/contract.go b/graft/subnet-evm/precompile/contracts/rewardmanager/contract.go index 94dee2964680..8629cd1205aa 100644 --- a/graft/subnet-evm/precompile/contracts/rewardmanager/contract.go +++ b/graft/subnet-evm/precompile/contracts/rewardmanager/contract.go @@ -11,11 +11,11 @@ import ( "errors" "fmt" - "github.com/ava-labs/libevm/core/types" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/accounts/abi" - "github.com/ava-labs/avalanchego/graft/subnet-evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contract" + "github.com/ava-labs/libevm/core/types" "github.com/ava-labs/libevm/common" "github.com/ava-labs/libevm/core/vm" diff --git a/graft/subnet-evm/precompile/contracts/rewardmanager/contract_test.go b/graft/subnet-evm/precompile/contracts/rewardmanager/contract_test.go index 6ed2f568d09c..946abe43b86c 100644 --- a/graft/subnet-evm/precompile/contracts/rewardmanager/contract_test.go +++ b/graft/subnet-evm/precompile/contracts/rewardmanager/contract_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/commontype" - "github.com/ava-labs/avalanchego/graft/subnet-evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/core/extstate" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/allowlist/allowlisttest" "github.com/ava-labs/avalanchego/graft/subnet-evm/precompile/contracts/rewardmanager" diff --git a/graft/subnet-evm/precompile/contracts/rewardmanager/simulated_test.go b/graft/subnet-evm/precompile/contracts/rewardmanager/simulated_test.go index 57d73dc525b7..915cd01d814a 100644 --- a/graft/subnet-evm/precompile/contracts/rewardmanager/simulated_test.go +++ b/graft/subnet-evm/precompile/contracts/rewardmanager/simulated_test.go @@ -14,8 +14,8 @@ import ( "github.com/ava-labs/libevm/crypto" "github.com/stretchr/testify/require" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/accounts/abi/bind" - "github.com/ava-labs/avalanchego/graft/subnet-evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/core" "github.com/ava-labs/avalanchego/graft/subnet-evm/eth/ethconfig" "github.com/ava-labs/avalanchego/graft/subnet-evm/node" diff --git a/graft/subnet-evm/precompile/modules/registerer.go b/graft/subnet-evm/precompile/modules/registerer.go index 086dce3f0e0b..e3a1f5e09f2e 100644 --- a/graft/subnet-evm/precompile/modules/registerer.go +++ b/graft/subnet-evm/precompile/modules/registerer.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/libevm/common" - "github.com/ava-labs/avalanchego/graft/subnet-evm/constants" + "github.com/ava-labs/avalanchego/graft/evm/constants" "github.com/ava-labs/avalanchego/graft/subnet-evm/utils" ) diff --git a/graft/subnet-evm/precompile/modules/registerer_test.go b/graft/subnet-evm/precompile/modules/registerer_test.go index 8b42eac62adb..238ad218e854 100644 --- a/graft/subnet-evm/precompile/modules/registerer_test.go +++ b/graft/subnet-evm/precompile/modules/registerer_test.go @@ -10,7 +10,7 @@ import ( "github.com/ava-labs/libevm/common" "github.com/stretchr/testify/require" - "github.com/ava-labs/avalanchego/graft/subnet-evm/constants" + "github.com/ava-labs/avalanchego/graft/evm/constants" ) func TestInsertSortedByAddress(t *testing.T) { From 71346d0ccd49ba56a6b2df922aedd556b2709c1e Mon Sep 17 00:00:00 2001 From: Austin Larson Date: Mon, 15 Dec 2025 11:45:51 -0500 Subject: [PATCH 4/6] fix: CI failures --- graft/evm/scripts/upstream_files.txt | 0 .../accounts/abi/bind/precompilebind/precompile_bind_test.go | 5 +++++ 2 files changed, 5 insertions(+) create mode 100644 graft/evm/scripts/upstream_files.txt diff --git a/graft/evm/scripts/upstream_files.txt b/graft/evm/scripts/upstream_files.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/graft/subnet-evm/accounts/abi/bind/precompilebind/precompile_bind_test.go b/graft/subnet-evm/accounts/abi/bind/precompilebind/precompile_bind_test.go index 16757d1efefe..ffa511e96995 100644 --- a/graft/subnet-evm/accounts/abi/bind/precompilebind/precompile_bind_test.go +++ b/graft/subnet-evm/accounts/abi/bind/precompilebind/precompile_bind_test.go @@ -689,6 +689,11 @@ func TestPrecompileBind(t *testing.T) { out, err = replacer.CombinedOutput() require.NoError(t, err, "failed to replace binding test dependency to current source tree: %v\n%s", err, out) + replacer = exec.Command(gocmd, "mod", "edit", "-x", "-require", "github.com/ava-labs/avalanchego/graft/evm@v0.0.0", "-replace", "github.com/ava-labs/avalanchego/graft/evm="+filepath.Join(pwd, "..", "..", "..", "..", "..", "evm")) + replacer.Dir = pkg + out, err = replacer.CombinedOutput() + require.NoError(t, err, "failed to replace binding test dependency to current source tree: %v\n%s", err, out) + tidier := exec.Command(gocmd, "mod", "tidy", "-compat=1.24") tidier.Dir = pkg out, err = tidier.CombinedOutput() From 4718ca828e057c4f6ae07003b6caff58ef4cb399 Mon Sep 17 00:00:00 2001 From: Austin Larson Date: Mon, 15 Dec 2025 12:13:37 -0500 Subject: [PATCH 5/6] fix: Tasks --- graft/evm/Taskfile.yml | 55 +-------------------------------- graft/evm/scripts/lint_setup.sh | 14 +++++++-- graft/evm/scripts/shellcheck.sh | 39 ----------------------- 3 files changed, 12 insertions(+), 96 deletions(-) delete mode 100755 graft/evm/scripts/shellcheck.sh diff --git a/graft/evm/Taskfile.yml b/graft/evm/Taskfile.yml index 7b17274e2ca2..ccb2526b00f8 100644 --- a/graft/evm/Taskfile.yml +++ b/graft/evm/Taskfile.yml @@ -22,24 +22,6 @@ tasks: - cmd: git status --short # Show the status of the working tree. - cmd: git diff-index --quiet HEAD # Exits if any uncommitted changes are found. - check-generate-codec: - desc: Checks that generated codec files are up-to-date (requires a clean git working tree) - cmds: - - task: generate-codec - - task: check-clean-branch - - check-generate-mocks: - desc: Checks that generated mocks are up-to-date (requires a clean git working tree) - cmds: - - task: generate-mocks - - task: check-clean-branch - - check-generate-rlp: - desc: Checks that generated rlp files are up-to-date (requires a clean git working tree) - cmds: - - task: generate-rlp - - task: check-clean-branch - check-go-mod-tidy: desc: Checks that all go.mod and go.sum files are up-to-date (requires a clean git working tree) cmds: @@ -50,50 +32,15 @@ tasks: desc: Display test coverage statistics from coverage.out file cmd: ./scripts/coverage.sh # ci.yml - generate-codec: - desc: Generates fjl/gencodec files - cmds: - - cmd: grep -lr -E '^// Code generated by github\.com\/fjl\/gencodec\. DO NOT EDIT\.$' . | xargs -r rm - - cmd: go generate -run gencodec ./... - - generate-mocks: - desc: Generates testing mocks - cmds: - - cmd: grep -lr -E '^// Code generated by MockGen\. DO NOT EDIT\.$' . | xargs -r rm - - cmd: go generate -run mockgen ./... - - generate-rlp: - desc: Generates rlp files - cmds: - - cmd: grep -lr -E '^// Code generated by rlpgen\. DO NOT EDIT.\.$' . | xargs -r rm - - cmd: go generate -run rlpgen ./... - lint: desc: Run golangci-lint and check for allowed Ethereum imports in Go code cmd: ./scripts/lint.sh - lint-all: - desc: Runs all lint checks in parallel - deps: - - lint - - shellcheck - - check-generate-codec - - check-generate-mocks - - check-generate-rlp - lint-all-ci: desc: Runs all lint checks one-by-one cmds: - task: lint - - task: shellcheck - - task: check-generate-codec - - task: check-generate-mocks - - task: check-generate-rlp lint-fix: desc: Run golangci-lint with auto-fix where possible - cmd: ./scripts/lint_fix.sh - - shellcheck: - desc: Run shellcheck static analysis on all shell scripts with version management - cmd: ./scripts/shellcheck.sh + cmd: ./scripts/lint_fix.sh \ No newline at end of file diff --git a/graft/evm/scripts/lint_setup.sh b/graft/evm/scripts/lint_setup.sh index 510e821fc32e..3a00cc5d96b9 100755 --- a/graft/evm/scripts/lint_setup.sh +++ b/graft/evm/scripts/lint_setup.sh @@ -38,8 +38,14 @@ function setup_lint { fi local upstream_folders_file="./scripts/upstream_files.txt" - # Read the upstream_folders file into an array - mapfile -t upstream_folders <"$upstream_folders_file" + # check that the file exists + if [[ ! -f "$upstream_folders_file" ]]; then + echo "upstream_folders_file not found: $upstream_folders_file" + upstream_folders=() + else + # Read the upstream_folders file into an array + mapfile -t upstream_folders <"$upstream_folders_file" + fi # Shared find filters local -a find_filters=( @@ -69,7 +75,9 @@ function setup_lint { fi done # Remove the last '-o' from the arrays - unset 'upstream_find_args[${#upstream_find_args[@]}-1]' + if [ ${#upstream_find_args[@]} -ne 0 ]; then + unset 'upstream_find_args[${#upstream_find_args[@]}-1]' + fi # Find upstream files # shellcheck disable=SC2034 # used by external scripts after sourcing diff --git a/graft/evm/scripts/shellcheck.sh b/graft/evm/scripts/shellcheck.sh deleted file mode 100755 index 140efd2ac989..000000000000 --- a/graft/evm/scripts/shellcheck.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION="v0.9.0" - -function get_version { - local target_path=$1 - if command -v "${target_path}" > /dev/null; then - echo "v$("${target_path}" --version | grep version: | awk '{print $2}')" - fi -} - -REPO_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd ) - -SYSTEM_VERSION="$(get_version shellcheck)" -if [[ "${SYSTEM_VERSION}" == "${VERSION}" ]]; then - SHELLCHECK=shellcheck -else - # Try to install a local version - SHELLCHECK="${REPO_ROOT}/bin/shellcheck" - LOCAL_VERSION="$(get_version "${SHELLCHECK}")" - if [[ -z "${LOCAL_VERSION}" || "${LOCAL_VERSION}" != "${VERSION}" ]]; then - if which sw_vers &> /dev/null; then - echo "on macos, only x86_64 binaries are available so rosetta is required" - echo "to avoid using rosetta, install via homebrew: brew install shellcheck" - DIST=darwin.x86_64 - else - # Linux - binaries for common arches *should* be available - arch="$(uname -i)" - DIST="linux.${arch}" - fi - curl -s -L "https://github.com/koalaman/shellcheck/releases/download/${VERSION}/shellcheck-${VERSION}.${DIST}.tar.xz" | tar Jxv -C /tmp > /dev/null - mkdir -p "$(dirname "${SHELLCHECK}")" - cp /tmp/shellcheck-"${VERSION}"/shellcheck "${SHELLCHECK}" - fi -fi - -find "${REPO_ROOT}" -type f -name "*.sh" -print0 | xargs -0 "${SHELLCHECK}" "${@}" From 95251aa2608b7311b117a228255506cc75347268 Mon Sep 17 00:00:00 2001 From: Austin Larson Date: Mon, 15 Dec 2025 13:26:24 -0500 Subject: [PATCH 6/6] style: clarify behavior --- graft/evm/scripts/lint_setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/graft/evm/scripts/lint_setup.sh b/graft/evm/scripts/lint_setup.sh index 3a00cc5d96b9..0cef4127d4e0 100755 --- a/graft/evm/scripts/lint_setup.sh +++ b/graft/evm/scripts/lint_setup.sh @@ -38,9 +38,8 @@ function setup_lint { fi local upstream_folders_file="./scripts/upstream_files.txt" - # check that the file exists if [[ ! -f "$upstream_folders_file" ]]; then - echo "upstream_folders_file not found: $upstream_folders_file" + # if the file doesn't exist, assume no upstream files upstream_folders=() else # Read the upstream_folders file into an array