From d9100b8eb465de7e416842d0507911eaf3427902 Mon Sep 17 00:00:00 2001 From: Alexey Kiselev Date: Wed, 28 Aug 2024 21:45:39 +0400 Subject: [PATCH 1/3] Deprecated linter "exportloopref" replaced with "copyloopvar". (#1475) * Deprecated linter "exportloopref" replaced with "copyloopvar". Golangci-lint version updated to v1.60.2. * Deprecated output format "github-actions" replaced with "colored-line-number". --- .github/workflows/go.yml | 4 ++-- .golangci-strict.yml | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index dafd452ab..01e9f0d64 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -30,7 +30,7 @@ jobs: args: -c .golangci.yml # Strict linter configuration, only checking new code from pull requests. - name: golangci-lint-strict - run: golangci-lint run -c .golangci-strict.yml --new-from-rev=origin/master --out-format=github-actions,line-number + run: golangci-lint run -c .golangci-strict.yml --new-from-rev=origin/master --out-format=colored-line-number build: name: ubuntu @@ -46,7 +46,7 @@ jobs: cache: true - name: Set up GolangCI-Lint - run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $HOME/bin v1.59.0 + run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $HOME/bin v1.60.2 - name: Check out code into the Go module directory uses: actions/checkout@v4 diff --git a/.golangci-strict.yml b/.golangci-strict.yml index 484ff68fd..d7dad9b5f 100644 --- a/.golangci-strict.yml +++ b/.golangci-strict.yml @@ -197,7 +197,6 @@ linters: - errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error - errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13 - exhaustive # checks exhaustiveness of enum switch statements - - exportloopref # checks for pointers to enclosing loop variables - forbidigo # forbids identifiers - funlen # tool for detection of long functions - gocheckcompilerdirectives # validates go compiler directive comments (//go:) @@ -243,6 +242,7 @@ linters: - usestdlibvars # detects the possibility to use variables/constants from the Go standard library - wastedassign # finds wasted assignment statements - whitespace # detects leading and trailing whitespace + - copyloopvar # detects places where loop variables are copied ## you may want to enable #- decorder # checks declaration order and count of types, constants, variables and functions @@ -289,7 +289,6 @@ linters: #- interfacer # [deprecated] suggests narrower interface types #- maligned # [deprecated, replaced by govet fieldalignment] detects Go structs that would take less memory if their fields were sorted #- nosnakecase # [deprecated, replaced by revive var-naming] detects snake case of variable naming and function name - #- scopelint # [deprecated, replaced by exportloopref] checks for unpinned variables in go programs #- structcheck # [deprecated, replaced by unused] finds unused struct fields #- varcheck # [deprecated, replaced by unused] finds unused global variables and constants From c43de5715619c98509dfdbc0bf5b4f94db45fb35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 06:03:25 +0300 Subject: [PATCH 2/3] Bump google.golang.org/grpc from 1.65.0 to 1.66.0 (#1476) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.65.0 to 1.66.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.65.0...v1.66.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 0ac538ac2..6a346353d 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 golang.org/x/sync v0.8.0 golang.org/x/sys v0.24.0 - google.golang.org/grpc v1.65.0 + google.golang.org/grpc v1.66.0 google.golang.org/protobuf v1.34.2 moul.io/zapfilter v1.7.0 ) @@ -108,7 +108,7 @@ require ( golang.org/x/net v0.26.0 // indirect golang.org/x/term v0.23.0 // indirect golang.org/x/text v0.17.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index 00b88bd70..979d1491c 100644 --- a/go.sum +++ b/go.sum @@ -434,10 +434,10 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 47290c0276debb29e0854b38fc518546f455b109 Mon Sep 17 00:00:00 2001 From: Alexey Kiselev Date: Thu, 29 Aug 2024 13:55:54 +0400 Subject: [PATCH 3/3] Added work-around to handle the Docker configuration issue https://github.com/moby/moby/issues/48274. (#1477) Network and FSM logging turned on for Gowaves node during integration tests. --- Dockerfile.gowaves-it | 2 ++ itests/docker/docker.go | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile.gowaves-it b/Dockerfile.gowaves-it index 61baa3e3f..bd647ad53 100644 --- a/Dockerfile.gowaves-it +++ b/Dockerfile.gowaves-it @@ -55,6 +55,8 @@ CMD /app/node \ -build-state-hashes \ -serve-extended-api \ -log-level=debug \ + -log-network \ + -log-fsm \ -obsolescence=1h \ -reward=$DESIRED_REWARD \ -vote=$SUPPORTED_FEATURES \ diff --git a/itests/docker/docker.go b/itests/docker/docker.go index f1de1c9f2..0dbcce8f7 100644 --- a/itests/docker/docker.go +++ b/itests/docker/docker.go @@ -217,9 +217,9 @@ func (d *Docker) runGoNode(ctx context.Context, cfgPath string, suiteName string "SUPPORTED_FEATURES=" + supportedFeatures, }, ExposedPorts: []string{ - GrpcApiPort, - RESTApiPort, - BindPort, + GrpcApiPort + "/tcp", + RESTApiPort + "/tcp", + BindPort + "/tcp", }, Mounts: []string{ cfgPath + ":/home/gowaves/config", @@ -311,9 +311,9 @@ func (d *Docker) runScalaNode(ctx context.Context, cfgPath string, suiteName str "-Dwaves.network.enable-blacklisting=no", }, ExposedPorts: []string{ - GrpcApiPort, - RESTApiPort, - BindPort, + GrpcApiPort + "/tcp", + RESTApiPort + "/tcp", + BindPort + "/tcp", }, Networks: []*dockertest.Network{d.network}, }