From 6b62bd204c062be764c1aaa68dd4b9eda1de4d0c Mon Sep 17 00:00:00 2001 From: Ceyhun Onur Date: Mon, 14 Oct 2024 23:19:36 +0300 Subject: [PATCH] Sync subnet evm (#673) * nit: peer/network.go: remove refs to cross chain in comments (#1333) * bump golang version * remove style changes --------- Co-authored-by: Darioush Jalali --- .github/workflows/ci.yml | 6 +++--- .github/workflows/sync-subnet-evm-branch.yml | 16 ++++++++-------- Dockerfile | 4 ++-- accounts/abi/bind/bind_test.go | 2 +- go.mod | 6 +++--- go.sum | 8 ++++---- peer/network.go | 2 +- peer/stats/stats.go | 2 +- scripts/versions.sh | 2 +- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fbf1601ee1..e7bf047ead 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: token: ${{ secrets.AVALANCHE_PAT }} - uses: actions/setup-go@v5 with: - go-version: "~1.21.12" + go-version: "~1.22.8" check-latest: true - name: change avalanchego dep if: ${{ github.event_name == 'workflow_dispatch' }} @@ -73,7 +73,7 @@ jobs: token: ${{ secrets.AVALANCHE_PAT }} - uses: actions/setup-go@v5 with: - go-version: "~1.21.12" + go-version: "~1.22.8" check-latest: true - name: change avalanchego dep if: ${{ github.event_name == 'workflow_dispatch' }} @@ -112,7 +112,7 @@ jobs: token: ${{ secrets.AVALANCHE_PAT }} - uses: actions/setup-go@v5 with: - go-version: "~1.21.12" + go-version: "~1.22.8" check-latest: true - name: Run e2e tests run: E2E_SERIAL=1 ./scripts/tests.e2e.sh diff --git a/.github/workflows/sync-subnet-evm-branch.yml b/.github/workflows/sync-subnet-evm-branch.yml index d51be8df89..97e8554ef8 100644 --- a/.github/workflows/sync-subnet-evm-branch.yml +++ b/.github/workflows/sync-subnet-evm-branch.yml @@ -1,11 +1,11 @@ -name: "Sync Subnet EVM Branch" +name: "Sync Subnet EVM Branch" on: workflow_dispatch: - inputs: - remoteBranch: - description: "Subnet EVM Branch" - required: true - default: "master" + inputs: + remoteBranch: + description: "Subnet EVM Branch" + required: true + default: "master" jobs: sync_branch: @@ -16,5 +16,5 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: "~1.21.12" - check-latest: true \ No newline at end of file + go-version: "~1.22.8" + check-latest: true diff --git a/Dockerfile b/Dockerfile index 1807b17666..1b370e61ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # ============= Compilation Stage ================ -FROM golang:1.21.12-bullseye AS builder +FROM golang:1.22.8-bullseye AS builder ARG AVALANCHE_VERSION @@ -17,7 +17,7 @@ WORKDIR $GOPATH/src/github.com/ava-labs/avalanchego RUN go mod download # Replace the coreth dependency RUN go mod edit -replace github.com/ava-labs/coreth=../coreth -RUN go mod download && go mod tidy -compat=1.21 +RUN go mod download && go mod tidy -compat=1.22 # Build the AvalancheGo binary with local version of coreth. RUN ./scripts/build_avalanche.sh diff --git a/accounts/abi/bind/bind_test.go b/accounts/abi/bind/bind_test.go index 7f82c5dd51..a54919722c 100644 --- a/accounts/abi/bind/bind_test.go +++ b/accounts/abi/bind/bind_test.go @@ -2179,7 +2179,7 @@ func golangBindings(t *testing.T, overload bool) { if out, err := replacer.CombinedOutput(); err != nil { t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out) } - tidier := exec.Command(gocmd, "mod", "tidy", "-compat=1.21") + tidier := exec.Command(gocmd, "mod", "tidy", "-compat=1.22") tidier.Dir = pkg if out, err := tidier.CombinedOutput(); err != nil { t.Fatalf("failed to tidy Go module file: %v\n%s", err, out) diff --git a/go.mod b/go.mod index 717db219e2..75608b44bb 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module github.com/ava-labs/coreth -go 1.21.12 +go 1.22.8 require ( github.com/VictoriaMetrics/fastcache v1.12.1 - github.com/ava-labs/avalanchego v1.11.12-rc.2 + github.com/ava-labs/avalanchego v1.11.12-rc.3 github.com/cespare/cp v0.1.0 github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 github.com/davecgh/go-spew v1.1.1 @@ -16,7 +16,7 @@ require ( github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 github.com/google/uuid v1.6.0 github.com/gorilla/rpc v1.2.0 - github.com/gorilla/websocket v1.4.2 + github.com/gorilla/websocket v1.5.0 github.com/hashicorp/go-bexpr v0.1.10 github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 diff --git a/go.sum b/go.sum index a330b9b297..e0b4fed0f8 100644 --- a/go.sum +++ b/go.sum @@ -54,8 +54,8 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY 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/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/avalanchego v1.11.12-rc.2 h1:H1C0gsTOtwMD3qrouEqry0hfoBIC//9lEiDh/AvpaaY= -github.com/ava-labs/avalanchego v1.11.12-rc.2/go.mod h1:yFx3V31Jy9NFa8GZlgGnwiVf8KGjeF2+Uc99l9Scd/8= +github.com/ava-labs/avalanchego v1.11.12-rc.3 h1:cfJ9HCCunCZn922uIfnsw1UKt/c4pOl2/6w/Y7Fwn9Q= +github.com/ava-labs/avalanchego v1.11.12-rc.3/go.mod h1:qSHmog3wMVjo/ruIAQo0ppXAilyni07NIu5K88RyhWE= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -299,8 +299,8 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR github.com/gorilla/rpc v1.2.0 h1:WvvdC2lNeT1SP32zrIce5l0ECBfbAlmrmSBsuc57wfk= github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= diff --git a/peer/network.go b/peer/network.go index 32c2b63bf6..7739e279bc 100644 --- a/peer/network.go +++ b/peer/network.go @@ -303,7 +303,7 @@ func (n *network) AppRequestFailed(ctx context.Context, nodeID ids.NodeID, reque } // calculateTimeUntilDeadline calculates the time until deadline and drops it if we missed he deadline to response. -// This function updates metrics for both app requests and cross chain requests. +// This function updates metrics for app requests. // This is called by [AppRequest]. func calculateTimeUntilDeadline(deadline time.Time, stats stats.RequestHandlerStats) (time.Time, error) { // calculate how much time is left until the deadline diff --git a/peer/stats/stats.go b/peer/stats/stats.go index 856ab8847a..165537bae7 100644 --- a/peer/stats/stats.go +++ b/peer/stats/stats.go @@ -9,7 +9,7 @@ import ( "github.com/ava-labs/coreth/metrics" ) -// RequestHandlerStats provides the interface for metrics for both app requests and cross chain requests. +// RequestHandlerStats provides the interface for metrics for app requests. type RequestHandlerStats interface { UpdateTimeUntilDeadline(duration time.Duration) IncDeadlineDroppedRequest() diff --git a/scripts/versions.sh b/scripts/versions.sh index 2ab24eed5f..2294b628bf 100644 --- a/scripts/versions.sh +++ b/scripts/versions.sh @@ -6,4 +6,4 @@ set -euo pipefail # Don't export them as they're used in the context of other calls -AVALANCHE_VERSION=${AVALANCHE_VERSION:-'v1.11.12-rc.2'} +AVALANCHE_VERSION=${AVALANCHE_VERSION:-'v1.11.12-rc.3'}