From e4e5d4a0c10eea4c57aee2d42ebf8f573464ccb8 Mon Sep 17 00:00:00 2001 From: Manav Darji Date: Tue, 10 May 2022 19:00:10 +0530 Subject: [PATCH 01/38] fix: fetch span retry bug --- consensus/bor/rest.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/consensus/bor/rest.go b/consensus/bor/rest.go index 6460b75a3c..d548b03a6d 100644 --- a/consensus/bor/rest.go +++ b/consensus/bor/rest.go @@ -99,6 +99,17 @@ func (h *HeimdallClient) FetchWithRetry(rawPath string, rawQuery string) (*Respo u.Path = rawPath u.RawQuery = rawQuery + // attempt counter + attempt := 1 + + // request data once + res, err := h.internalFetch(u) + if err == nil && res != nil { + return res, nil + } + log.Info("Retrying again in 5 seconds to fetch data from Heimdall", "path", u.Path, "attempt", attempt) + attempt++ + // create a new ticker for retrying the request ticker := time.NewTicker(5 * time.Second) defer ticker.Stop() @@ -113,7 +124,8 @@ func (h *HeimdallClient) FetchWithRetry(rawPath string, rawQuery string) (*Respo if err == nil && res != nil { return res, nil } - log.Info("Retrying again in 5 seconds to fetch data from Heimdall", "path", u.Path) + log.Info("Retrying again in 5 seconds to fetch data from Heimdall", "path", u.Path, "attempt", attempt) + attempt++ } } } From be014898833624df17ef4f6c0eee572f7e91b8c5 Mon Sep 17 00:00:00 2001 From: Manav Darji Date: Tue, 10 May 2022 19:12:24 +0530 Subject: [PATCH 02/38] move logs --- consensus/bor/rest.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/consensus/bor/rest.go b/consensus/bor/rest.go index d548b03a6d..3ef531de18 100644 --- a/consensus/bor/rest.go +++ b/consensus/bor/rest.go @@ -107,14 +107,14 @@ func (h *HeimdallClient) FetchWithRetry(rawPath string, rawQuery string) (*Respo if err == nil && res != nil { return res, nil } - log.Info("Retrying again in 5 seconds to fetch data from Heimdall", "path", u.Path, "attempt", attempt) - attempt++ // create a new ticker for retrying the request ticker := time.NewTicker(5 * time.Second) defer ticker.Stop() for { + log.Info("Retrying again in 5 seconds to fetch data from Heimdall", "path", u.Path, "attempt", attempt) + attempt++ select { case <-h.closeCh: log.Debug("Shutdown detected, terminating request") @@ -124,8 +124,6 @@ func (h *HeimdallClient) FetchWithRetry(rawPath string, rawQuery string) (*Respo if err == nil && res != nil { return res, nil } - log.Info("Retrying again in 5 seconds to fetch data from Heimdall", "path", u.Path, "attempt", attempt) - attempt++ } } } From eb76df22af662774063e9f0b4bfe1d2bc764fc59 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 10:00:31 +0300 Subject: [PATCH 03/38] better ci --- .github/workflows/ci.yml | 63 ++++++++++++++++++++++++++++++---------- Makefile | 24 +++++++++++++-- 2 files changed, 69 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d61e14cb42..b6e2e71305 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,20 +1,53 @@ name: CI on: [push, pull_request] jobs: - build: - runs-on: ubuntu-latest + tests: + strategy: + matrix: + os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: 1.17 - - name: "Build binaries" - run: make all - - name: "Run tests" - run: make test - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - file: ./cover.out + - uses: actions/checkout@v3 + - run: git submodule update --init --recursive --force + - uses: actions/setup-go@v3 + with: + go-version: 1.18.x + - name: Install dependencies on Linux + if: runner.os == 'Linux' + run: sudo apt update && sudo apt install build-essential + - uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/Library/Caches/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + + - name: Build + run: make all + + - name: Reproducible build test + run: | + make geth + shasum -a256 ./build/bin/geth > bor1.sha256 + make geth + shasum -a256 ./build/bin/geth > bor2.sha256 + if ! cmp -s bor1.sha256 bor2.sha256; then + echo >&2 "Reproducible build broken"; cat bor1.sha256; cat bor2.sha256; exit 1 + fi + + - name: Lint + if: runner.os == 'Linux' + uses: golangci/golangci-lint-action@v3 + with: + version: v1.46 + skip-pkg-cache: true + skip-build-cache: true + + - name: Test + run: make test + + - name: Data race tests + run: make test-race \ No newline at end of file diff --git a/Makefile b/Makefile index 6469b8510f..d23903faac 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,21 @@ .PHONY: geth android ios evm all test clean -GOBIN = ./build/bin GO ?= latest +GOBIN = $(CURDIR)/build/bin GORUN = env GO111MODULE=on go run GOPATH = $(shell go env GOPATH) +GIT_COMMIT ?= $(shell git rev-list -1 HEAD) +GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD) +GIT_TAG ?= $(shell git describe --tags `git rev-list --tags="v*" --max-count=1`) + +PACKAGE = github.com/ethereum/go-ethereum +GO_FLAGS += -trimpath -buildvcs=false +GO_FLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} -X ${PACKAGE}/params.GitBranch=${GIT_BRANCH} -X ${PACKAGE}/params.GitTag=${GIT_TAG}" + +GOTEST = GODEBUG=cgocheck=0 go test $(GO_FLAGS) ./... -p 1 -shuffle=on + bor: $(GORUN) build/ci.go install ./cmd/geth mkdir -p $(GOPATH)/bin/ @@ -45,8 +55,16 @@ ios: @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." test: - # Skip mobile and cmd tests since they are being deprecated - go test -v $$(go list ./... | grep -v go-ethereum/cmd/) -cover -coverprofile=cover.out + $(GOTEST) --timeout 5m -cover -coverprofile=cover.out + +test-race: + $(GOTEST) --timeout 5m -race + +test-integration: + $(GOTEST) --timeout 30m -tags integration + +escape: + cd $(path) && go test -gcflags "-m -m" -run none -bench=BenchmarkJumpdest* -benchmem -memprofile mem.out lint: ## Run linters. $(GORUN) build/ci.go lint From 5192fd7d8dff7a211a69d79a1d408490779edbc3 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 10:26:10 +0300 Subject: [PATCH 04/38] split units and integration. step 1 --- .github/workflows/ci.yml | 30 +++++++++++++------- .github/workflows/test-integration.yml | 39 ++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/test-integration.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6e2e71305..6ba2cece0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,16 @@ name: CI -on: [push, pull_request] +on: + push: + branches: + - "**" + - "!master" + pull_request: + branches: + - master + types: [opened, synchronize, closed] jobs: tests: + if: (!(github.event.action == 'closed' && github.event.pull_request.merged != true)) strategy: matrix: os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments @@ -28,15 +37,16 @@ jobs: - name: Build run: make all - - name: Reproducible build test - run: | - make geth - shasum -a256 ./build/bin/geth > bor1.sha256 - make geth - shasum -a256 ./build/bin/geth > bor2.sha256 - if ! cmp -s bor1.sha256 bor2.sha256; then - echo >&2 "Reproducible build broken"; cat bor1.sha256; cat bor2.sha256; exit 1 - fi + # TODO: make it work + # - name: Reproducible build test + # run: | + # make geth + # shasum -a256 ./build/bin/geth > bor1.sha256 + # make geth + # shasum -a256 ./build/bin/geth > bor2.sha256 + # if ! cmp -s bor1.sha256 bor2.sha256; then + # echo >&2 "Reproducible build broken"; cat bor1.sha256; cat bor2.sha256; exit 1 + # fi - name: Lint if: runner.os == 'Linux' diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml new file mode 100644 index 0000000000..93578062f2 --- /dev/null +++ b/.github/workflows/test-integration.yml @@ -0,0 +1,39 @@ +name: Integration tests +on: + push: + branches: + - "**" + - "!master" + pull_request: + branches: + - master + types: [opened, synchronize, closed] +jobs: + tests: + if: (!(github.event.action == 'closed' && github.event.pull_request.merged != true)) + strategy: + matrix: + os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + - run: git submodule update --init --recursive --force + - uses: actions/setup-go@v3 + with: + go-version: 1.18.x + - name: Install dependencies on Linux + if: runner.os == 'Linux' + run: sudo apt update && sudo apt install build-essential + + - uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/Library/Caches/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + + - name: test-integration + run: make test-integration From ee5b7c04aa571c158c0c2bfcac5cb5802954a5ef Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 10:31:41 +0300 Subject: [PATCH 05/38] integration tag --- tests/block_test.go | 3 +++ tests/block_test_util.go | 4 ++++ tests/bor/bor_test.go | 3 +++ tests/difficulty_test.go | 3 +++ tests/init_test.go | 3 +++ tests/state_test.go | 3 +++ tests/transaction_test.go | 3 +++ 7 files changed, 22 insertions(+) diff --git a/tests/block_test.go b/tests/block_test.go index 74c7ed8197..591bff6e07 100644 --- a/tests/block_test.go +++ b/tests/block_test.go @@ -14,6 +14,9 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . +//go:build integration +// +build integration + package tests import ( diff --git a/tests/block_test_util.go b/tests/block_test_util.go index bcf861e09b..fea4ee0b95 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -15,6 +15,10 @@ // along with the go-ethereum library. If not, see . // Package tests implements execution of Ethereum JSON tests. + +//go:build integration +// +build integration + package tests import ( diff --git a/tests/bor/bor_test.go b/tests/bor/bor_test.go index 7d0ca9372b..3bda2ee3f4 100644 --- a/tests/bor/bor_test.go +++ b/tests/bor/bor_test.go @@ -1,3 +1,6 @@ +//go:build integration +// +build integration + package bor import ( diff --git a/tests/difficulty_test.go b/tests/difficulty_test.go index 192dff12cc..0b030c1485 100644 --- a/tests/difficulty_test.go +++ b/tests/difficulty_test.go @@ -14,6 +14,9 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . +//go:build integration +// +build integration + package tests import ( diff --git a/tests/init_test.go b/tests/init_test.go index 7e2f3ff7f5..4ade0bfb90 100644 --- a/tests/init_test.go +++ b/tests/init_test.go @@ -14,6 +14,9 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . +//go:build integration +// +build integration + package tests import ( diff --git a/tests/state_test.go b/tests/state_test.go index d2c92b211c..8fcf35b864 100644 --- a/tests/state_test.go +++ b/tests/state_test.go @@ -14,6 +14,9 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . +//go:build integration +// +build integration + package tests import ( diff --git a/tests/transaction_test.go b/tests/transaction_test.go index cb0f262318..1197eebe19 100644 --- a/tests/transaction_test.go +++ b/tests/transaction_test.go @@ -14,6 +14,9 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . +//go:build integration +// +build integration + package tests import ( From 63cd7a3273615575d57dd76c4db5546597037b3a Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 10:33:44 +0300 Subject: [PATCH 06/38] move integration ci --- .github/workflows/ci.yml | 5 +++- .github/workflows/test-integration.yml | 39 -------------------------- 2 files changed, 4 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/test-integration.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ba2cece0b..36fdc12f86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,4 +60,7 @@ jobs: run: make test - name: Data race tests - run: make test-race \ No newline at end of file + run: make test-race + + - name: test-integration + run: make test-integration \ No newline at end of file diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml deleted file mode 100644 index 93578062f2..0000000000 --- a/.github/workflows/test-integration.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Integration tests -on: - push: - branches: - - "**" - - "!master" - pull_request: - branches: - - master - types: [opened, synchronize, closed] -jobs: - tests: - if: (!(github.event.action == 'closed' && github.event.pull_request.merged != true)) - strategy: - matrix: - os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v3 - - run: git submodule update --init --recursive --force - - uses: actions/setup-go@v3 - with: - go-version: 1.18.x - - name: Install dependencies on Linux - if: runner.os == 'Linux' - run: sudo apt update && sudo apt install build-essential - - - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/Library/Caches/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-go- - - - name: test-integration - run: make test-integration From b43ebd5f96a0bc21930956acc3169a15d44092f0 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 10:53:35 +0300 Subject: [PATCH 07/38] fix build --- tests/block_test_util.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/block_test_util.go b/tests/block_test_util.go index fea4ee0b95..d28f3a1237 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -16,9 +16,6 @@ // Package tests implements execution of Ethereum JSON tests. -//go:build integration -// +build integration - package tests import ( From 3c2510a5af17ac8d81c9a40381a2da5d45a7ae4d Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 11:22:17 +0300 Subject: [PATCH 08/38] move integration ci --- tests/rlp_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/rlp_test.go b/tests/rlp_test.go index 79a1683eb2..dbca73efc6 100644 --- a/tests/rlp_test.go +++ b/tests/rlp_test.go @@ -14,6 +14,9 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . +//go:build integration +// +build integration + package tests import ( From 15900477fb7e139e9a30d5efdf880749c60324dd Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 14:05:02 +0300 Subject: [PATCH 09/38] linters --- .github/workflows/ci.yml | 1 + .golangci.yml | 86 +++++++++++++++++++++++++++++++++++++++- Makefile | 12 +++++- go.mod | 11 +++-- go.sum | 68 +++++++++++++++++++++++++++++++ 5 files changed, 172 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36fdc12f86..4b71b413b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,7 @@ jobs: run: make all # TODO: make it work + # - name: Reproducible build test # run: | # make geth diff --git a/.golangci.yml b/.golangci.yml index 4950b98c21..14e0654ef0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -8,6 +8,8 @@ run: skip-dirs-use-default: true skip-files: - core/genesis_alloc.go + - gen_.*.go + - .*_gen.go linters: disable-all: true @@ -27,9 +29,70 @@ linters: linters-settings: gofmt: simplify: true + auto-fix: false goconst: min-len: 3 # minimum length of string constant - min-occurrences: 6 # minimum number of occurrences + min-occurrences: 2 # minimum number of occurrences + + gocritic: + # Which checks should be enabled; can't be combined with 'disabled-checks'; + # See https://go-critic.github.io/overview#checks-overview + # To check which checks are enabled run `GL_DEBUG=gocritic ./build/bin/golangci-lint run` + # By default list of stable checks is used. + enabled-checks: + - badLock + - filepathJoin + - sortSlice + - sprintfQuotedString + - syncMapLoadAndDelete + - weakCond + - boolExprSimplify + - httpNoBody + - ioutilDeprecated + - nestingReduce + - preferFilepathJoin + - redundantSprint + - stringConcatSimplify + - timeExprSimplify + - typeAssertChain + - yodaStyleExpr + - truncateCmp + - equalFold + - preferDecodeRune + - preferFprint + - preferStringWriter + - preferWriteByte + - sliceClear + #- ruleguard + + # Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty + disabled-checks: + - regexpMust + - exitAfterDefer + - dupBranchBody + - singleCaseSwitch + - unlambda + - captLocal + - commentFormatting + - ifElseChain + - importShadow + - builtinShadow + + # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks. + # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags". + enabled-tags: + - performance + - diagnostic + - opinionated + - style + disabled-tags: + - experimental + govet: + disable: + - deepequalerrors + - fieldalignment + - shadow + - unsafeptr issues: exclude-rules: @@ -48,3 +111,24 @@ issues: - path: cmd/faucet/ linters: - deadcode + # Exclude some linters from running on tests files. + - path: test\.go + linters: + - gosec + - unused + - deadcode + - gocritic + - path: cmd/devp2p + linters: + - gosec + - unused + - deadcode + - gocritic + - path: metrics/sample\.go + linters: + - gosec + - gocritic + - path: p2p/simulations + linters: + - gosec + - gocritic diff --git a/Makefile b/Makefile index d23903faac..9bc9ec5919 100644 --- a/Makefile +++ b/Makefile @@ -66,8 +66,16 @@ test-integration: escape: cd $(path) && go test -gcflags "-m -m" -run none -bench=BenchmarkJumpdest* -benchmem -memprofile mem.out -lint: ## Run linters. - $(GORUN) build/ci.go lint +lint: + @./build/bin/golangci-lint run --config ./.golangci.yml + +lintci: + @echo "--> Running linter for code" + @./build/bin/golangci-lint run --config ./.golangci.yml + +lintci-deps: + rm -f ./build/bin/golangci-lint + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.46.0 clean: env GO111MODULE=on go clean -cache diff --git a/go.mod b/go.mod index edd6d6887a..6065c1a5d2 100644 --- a/go.mod +++ b/go.mod @@ -23,10 +23,12 @@ require ( github.com/fatih/color v1.7.0 github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff + github.com/go-critic/go-critic v0.6.3 // indirect github.com/go-kit/kit v0.9.0 // indirect github.com/go-logfmt/logfmt v0.5.0 // indirect github.com/go-ole/go-ole v1.2.1 // indirect github.com/go-stack/stack v1.8.0 + github.com/go-toolsmith/astcopy v1.0.1 // indirect github.com/golang-jwt/jwt/v4 v4.3.0 github.com/golang/protobuf v1.5.2 github.com/golang/snappy v0.0.4 @@ -59,6 +61,8 @@ require ( github.com/olekukonko/tablewriter v0.0.5 github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 github.com/prometheus/tsdb v0.7.1 + github.com/quasilyte/gogrep v0.0.0-20220429205452-5e2753ee08f9 // indirect + github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/rjeczalik/notify v0.9.1 github.com/rs/cors v1.7.0 github.com/ryanuber/columnize v2.1.2+incompatible @@ -72,12 +76,13 @@ require ( go.opentelemetry.io/otel v1.2.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.2.0 go.opentelemetry.io/otel/sdk v1.2.0 - golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 + golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 + golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 golang.org/x/text v0.3.7 golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba - golang.org/x/tools v0.1.0 + golang.org/x/tools v0.1.10 + golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect google.golang.org/grpc v1.42.0 google.golang.org/protobuf v1.27.1 gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce diff --git a/go.sum b/go.sum index 19a6002886..d664628dac 100644 --- a/go.sum +++ b/go.sum @@ -162,6 +162,8 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= +github.com/go-critic/go-critic v0.6.3 h1:abibh5XYBTASawfTQ0rA7dVtQT+6KzpGqb/J+DxRDaw= +github.com/go-critic/go-critic v0.6.3/go.mod h1:c6b3ZP1MQ7o6lPR7Rv3lEf7pYQUmAcx8ABHgdZCQt/k= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -182,6 +184,25 @@ github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astcopy v1.0.1 h1:l09oBhAPyV74kLJ3ZO31iBU8htZGTwr9LTjuMCyL8go= +github.com/go-toolsmith/astcopy v1.0.1/go.mod h1:4TcEdbElGc9twQEYpVo/aieIXfHhiuLh4aLAck6dO7Y= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.1/go.mod h1:4oGA3EZXTVItV/ipGiOx7NWkY5veFfcsOJVS2YxltLw= +github.com/go-toolsmith/astequal v1.0.2 h1:+XvaV8zNxua+9+Oa4AHmgmpo4RYAbwr/qjNppLfX2yM= +github.com/go-toolsmith/astequal v1.0.2/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= +github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5 h1:eD9POs68PHkwrx7hAB78z1cb6PfGq/jyWn3wJywsH1o= +github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5/go.mod h1:3NAwwmD4uY/yggRxoEjk/S00MIV3A+H7rrE3i87eYxM= +github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.2 h1:8xdsa1+FSIH/RhEkgnD1j2CJOy5mNllW1Q9tRiYwvlk= +github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= @@ -226,10 +247,13 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -419,6 +443,21 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= +github.com/quasilyte/go-ruleguard v0.3.16-0.20220213074421-6aa060fab41a h1:sWFavxtIctGrVs5SYZ5Ml1CvrDAs8Kf5kx2PI3C41dA= +github.com/quasilyte/go-ruleguard v0.3.16-0.20220213074421-6aa060fab41a/go.mod h1:VMX+OnnSw4LicdiEGtRSD/1X8kW7GuEscjYNr4cOIT4= +github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.16/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= +github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5/go.mod h1:wSEyW6O61xRV6zb6My3HxrQ5/8ke7NE2OayqCHa3xRM= +github.com/quasilyte/gogrep v0.0.0-20220429205452-5e2753ee08f9 h1:mEQjyqtrQ6eB7oW9Qm+5po33faQIbhWp3qfhxGYuHKc= +github.com/quasilyte/gogrep v0.0.0-20220429205452-5e2753ee08f9/go.mod h1:MsVMK2P94jAne/7vEaLCRmjmOL0aTGAkvVOVuT+UYww= +github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= @@ -477,7 +516,9 @@ github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPyS github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xsleonard/go-merkle v1.1.0 h1:fHe1fuhJjGH22ZzVTAH0jqHLhTGhOq3wQjJN+8P0jQg= github.com/xsleonard/go-merkle v1.1.0/go.mod h1:cW4z+UZ/4f2n9IJgIiyDCdYguchoDyDAPmpuOWGxdGg= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= @@ -513,6 +554,9 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 h1:NvGWuYG8dkDHFSKksI1P9faiVJ9rayE6l0+ouWVIDs8= +golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -522,7 +566,10 @@ golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxT golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299 h1:zQpM52jfKHG6II1ISZY1ZcpygvuSFZpLwfluuF89XOg= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171 h1:DZhP7zSquENyG3Yb6ZpGqNEtgE8dfXhcLcheIF9RQHY= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -542,6 +589,9 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -560,6 +610,7 @@ golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -570,6 +621,10 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d h1:20cMwl2fHAzkJMEA+8J4JgqBQcQGzbisXo31MIeenXI= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -581,6 +636,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -622,8 +678,13 @@ golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 h1:uCLL3g5wH2xjxVREVuAbP9JM5PPKjRbXKRa6IBjkzmU= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 h1:nonptSpoQ4vQjyraW20DXPAglgQfVnM9ZC6MmNLMR60= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -667,13 +728,20 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= From 64ad2f9eb158e3d82ed16eae4d0f5d104aba8da6 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 14:40:15 +0300 Subject: [PATCH 10/38] update linter list --- .golangci.yml | 64 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 56 insertions(+), 8 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 14e0654ef0..d72bb83320 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -12,27 +12,63 @@ run: - .*_gen.go linters: - disable-all: true enable: - - deadcode - goconst - goimports - - gosimple - - govet - - ineffassign - misspell - # - staticcheck - unconvert - # - unused - - varcheck + - bodyclose + - containedctx + - contextcheck + - decorder + - durationcheck + - errchkjson + - errname + - errorlint + - exhaustive + - exportloopref + - gocognit + - gofmt + - gomnd + - gomoddirectives + - gosec + - makezero + - nestif + - nilerr + - nilnil + - noctx + #- nosprintfhostport # TODO: do we use IPv6? + - paralleltest + - prealloc + - predeclared + #- promlinter + #- revive + - tagliatelle + - tenv + - thelper + - tparallel + - unconvert + - unparam + - wsl linters-settings: gofmt: simplify: true auto-fix: false + goconst: min-len: 3 # minimum length of string constant min-occurrences: 2 # minimum number of occurrences + numbers: true + + goimports: + local-prefixes: github.com/ethereum/go-ethereum + + nestif: + min-complexity: 3 + + prealloc: + for-loops: true gocritic: # Which checks should be enabled; can't be combined with 'disabled-checks'; @@ -93,6 +129,18 @@ linters-settings: - fieldalignment - shadow - unsafeptr + check-shadowing: true + enable-all: true + settings: + printf: + # Run `go tool vet help printf` to see available settings for `printf` analyzer. + funcs: + - (github.com/ethereum/go-ethereum/log.Logger).Trace + - (github.com/ethereum/go-ethereum/log.Logger).Debug + - (github.com/ethereum/go-ethereum/log.Logger).Info + - (github.com/ethereum/go-ethereum/log.Logger).Warn + - (github.com/ethereum/go-ethereum/log.Logger).Error + - (github.com/ethereum/go-ethereum/log.Logger).Crit issues: exclude-rules: From 834c7741b40a10467f7eb62f29525851926652e3 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 15:21:21 +0300 Subject: [PATCH 11/38] only new issues --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b71b413b9..40483cbe73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,7 @@ jobs: version: v1.46 skip-pkg-cache: true skip-build-cache: true + only-new-issues: true - name: Test run: make test From cd4b40fffd1a1df589fdd3d076e0dd16dcede89f Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 15:26:55 +0300 Subject: [PATCH 12/38] test without linters --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40483cbe73..f9b383a310 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,15 +49,6 @@ jobs: # echo >&2 "Reproducible build broken"; cat bor1.sha256; cat bor2.sha256; exit 1 # fi - - name: Lint - if: runner.os == 'Linux' - uses: golangci/golangci-lint-action@v3 - with: - version: v1.46 - skip-pkg-cache: true - skip-build-cache: true - only-new-issues: true - - name: Test run: make test @@ -65,4 +56,13 @@ jobs: run: make test-race - name: test-integration - run: make test-integration \ No newline at end of file + run: make test-integration + + - name: Lint + if: runner.os == 'Linux' + uses: golangci/golangci-lint-action@v3 + with: + version: v1.46 + skip-pkg-cache: true + skip-build-cache: true + only-new-issues: true \ No newline at end of file From 6a598b4e93fe8bf6f5b75643f4cd26dea5543b42 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 15:27:18 +0300 Subject: [PATCH 13/38] revert --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9b383a310..40483cbe73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,15 +49,6 @@ jobs: # echo >&2 "Reproducible build broken"; cat bor1.sha256; cat bor2.sha256; exit 1 # fi - - name: Test - run: make test - - - name: Data race tests - run: make test-race - - - name: test-integration - run: make test-integration - - name: Lint if: runner.os == 'Linux' uses: golangci/golangci-lint-action@v3 @@ -65,4 +56,13 @@ jobs: version: v1.46 skip-pkg-cache: true skip-build-cache: true - only-new-issues: true \ No newline at end of file + only-new-issues: true + + - name: Test + run: make test + + - name: Data race tests + run: make test-race + + - name: test-integration + run: make test-integration \ No newline at end of file From 348f91e9f4339a1b96863d660b539ba920371ec4 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 15:31:10 +0300 Subject: [PATCH 14/38] more time for tests for data races --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9bc9ec5919..a59d443078 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ test: $(GOTEST) --timeout 5m -cover -coverprofile=cover.out test-race: - $(GOTEST) --timeout 5m -race + $(GOTEST) --timeout 15m -race test-integration: $(GOTEST) --timeout 30m -tags integration From 5458ac01cdb150fee94a8f70677708108b132129 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 15:41:02 +0300 Subject: [PATCH 15/38] fix --- .gitignore | 2 ++ Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ad4242c519..50328c8121 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,8 @@ */**/*dapps* build/_vendor/pkg +cover.out + #* .#* *# diff --git a/Makefile b/Makefile index a59d443078..55c33ada33 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ PACKAGE = github.com/ethereum/go-ethereum GO_FLAGS += -trimpath -buildvcs=false GO_FLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} -X ${PACKAGE}/params.GitBranch=${GIT_BRANCH} -X ${PACKAGE}/params.GitTag=${GIT_TAG}" -GOTEST = GODEBUG=cgocheck=0 go test $(GO_FLAGS) ./... -p 1 -shuffle=on +GOTEST = GODEBUG=cgocheck=0 go test $(GO_FLAGS) -p 1 ./... -shuffle=on bor: $(GORUN) build/ci.go install ./cmd/geth From b2b327eaf4d11a72fbeff11ff1984d7dc4c19ce8 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 15:47:18 +0300 Subject: [PATCH 16/38] ignore cmd tests --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 55c33ada33..eb129ee3c7 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ PACKAGE = github.com/ethereum/go-ethereum GO_FLAGS += -trimpath -buildvcs=false GO_FLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} -X ${PACKAGE}/params.GitBranch=${GIT_BRANCH} -X ${PACKAGE}/params.GitTag=${GIT_TAG}" -GOTEST = GODEBUG=cgocheck=0 go test $(GO_FLAGS) -p 1 ./... -shuffle=on +GOTEST = GODEBUG=cgocheck=0 go test $(GO_FLAGS) -p 1 $$(go list ./... | grep -v go-ethereum/cmd/) -shuffle=on bor: $(GORUN) build/ci.go install ./cmd/geth From 7c6357ecf6f47e05a41e9831eacc89d1bb2cd061 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 16:18:56 +0300 Subject: [PATCH 17/38] group concurrency --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40483cbe73..ec4063a557 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,11 @@ on: branches: - master types: [opened, synchronize, closed] + +concurrency: + group: build-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: tests: if: (!(github.event.action == 'closed' && github.event.pull_request.merged != true)) From e36a54d60021a3845ce23d58580194f1cd0d9285 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 16:43:43 +0300 Subject: [PATCH 18/38] goleak --- Makefile | 3 +++ accounts/abi/bind/backends/simulated_test.go | 5 +++++ common/leak/ignore_list.go | 13 +++++++++++++ go.mod | 1 + go.sum | 7 +++++++ 5 files changed, 29 insertions(+) create mode 100644 common/leak/ignore_list.go diff --git a/Makefile b/Makefile index eb129ee3c7..608cd52f2c 100644 --- a/Makefile +++ b/Makefile @@ -77,6 +77,9 @@ lintci-deps: rm -f ./build/bin/golangci-lint curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.46.0 +goimports: + goimports -local "$(PACKAGE)" -w . + clean: env GO111MODULE=on go clean -cache rm -fr build/_workspace/pkg/ $(GOBIN)/* diff --git a/accounts/abi/bind/backends/simulated_test.go b/accounts/abi/bind/backends/simulated_test.go index 8a0cbe3357..7df1a823ec 100644 --- a/accounts/abi/bind/backends/simulated_test.go +++ b/accounts/abi/bind/backends/simulated_test.go @@ -27,10 +27,13 @@ import ( "testing" "time" + "go.uber.org/goleak" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/leak" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" @@ -38,6 +41,8 @@ import ( ) func TestSimulatedBackend(t *testing.T) { + defer goleak.VerifyNone(t, leak.IgnoreList()...) + var gasLimit uint64 = 8000029 key, _ := crypto.GenerateKey() // nolint: gosec auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337)) diff --git a/common/leak/ignore_list.go b/common/leak/ignore_list.go new file mode 100644 index 0000000000..adcadce274 --- /dev/null +++ b/common/leak/ignore_list.go @@ -0,0 +1,13 @@ +package leak + +import "go.uber.org/goleak" + +func IgnoreList() []goleak.Option { + return []goleak.Option { + goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache"), + goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*recursiveTree).dispatch"), + goleak.IgnoreTopFunction("github.com/rjeczalik/notify._Cfunc_CFRunLoopRun"), + goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/metrics.(*meterArbiter).tick"), + goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/consensus/ethash.(*remoteSealer).loop"), + } +} \ No newline at end of file diff --git a/go.mod b/go.mod index 6065c1a5d2..e9c010d388 100644 --- a/go.mod +++ b/go.mod @@ -76,6 +76,7 @@ require ( go.opentelemetry.io/otel v1.2.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.2.0 go.opentelemetry.io/otel/sdk v1.2.0 + go.uber.org/goleak v1.1.12 // indirect golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 diff --git a/go.sum b/go.sum index d664628dac..3aba63edb5 100644 --- a/go.sum +++ b/go.sum @@ -518,6 +518,7 @@ github.com/xsleonard/go-merkle v1.1.0 h1:fHe1fuhJjGH22ZzVTAH0jqHLhTGhOq3wQjJN+8P github.com/xsleonard/go-merkle v1.1.0/go.mod h1:cW4z+UZ/4f2n9IJgIiyDCdYguchoDyDAPmpuOWGxdGg= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= @@ -540,6 +541,8 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.opentelemetry.io/proto/otlp v0.10.0 h1:n7brgtEbDvXEgGyKKo8SobKT1e9FewlDtXzkVP5djoE= go.opentelemetry.io/proto/otlp v0.10.0/go.mod h1:zG20xCK0szZ1xdokeSOwEcmlXu+x9kkdRe6N1DhKcfU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -618,6 +621,7 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d h1:20cMwl2fHAzkJMEA+8J4JgqBQcQGzbisXo31MIeenXI= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -675,9 +679,11 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 h1:uCLL3g5wH2xjxVREVuAbP9JM5PPKjRbXKRa6IBjkzmU= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -732,6 +738,7 @@ golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= From 2bac6ce45fea9a6bcffc689a944065779e31d056 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 17:09:36 +0300 Subject: [PATCH 19/38] remove shuffle for e2e --- .github/workflows/ci.yml | 6 +++--- Makefile | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec4063a557..c23dc68bf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,8 +66,8 @@ jobs: - name: Test run: make test - - name: Data race tests - run: make test-race + #- name: Data race tests + # run: make test-race - name: test-integration - run: make test-integration \ No newline at end of file + run: make test-integration \ No newline at end of file diff --git a/Makefile b/Makefile index 608cd52f2c..389c1f3202 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,9 @@ PACKAGE = github.com/ethereum/go-ethereum GO_FLAGS += -trimpath -buildvcs=false GO_FLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} -X ${PACKAGE}/params.GitBranch=${GIT_BRANCH} -X ${PACKAGE}/params.GitTag=${GIT_TAG}" -GOTEST = GODEBUG=cgocheck=0 go test $(GO_FLAGS) -p 1 $$(go list ./... | grep -v go-ethereum/cmd/) -shuffle=on +TESTALL = $$(go list ./... | grep -v go-ethereum/cmd/) +TESTE2E = ./tests/... +GOTEST = GODEBUG=cgocheck=0 go test $(GO_FLAGS) -p 1 bor: $(GORUN) build/ci.go install ./cmd/geth @@ -55,13 +57,13 @@ ios: @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." test: - $(GOTEST) --timeout 5m -cover -coverprofile=cover.out + $(GOTEST) --timeout 5m -shuffle=on -cover -coverprofile=cover.out $(TESTALL) test-race: - $(GOTEST) --timeout 15m -race + $(GOTEST) --timeout 15m -race -shuffle=on $(TESTALL) test-integration: - $(GOTEST) --timeout 30m -tags integration + $(GOTEST) --timeout 30m -tags integration -count=1 $(TESTE2E) escape: cd $(path) && go test -gcflags "-m -m" -run none -bench=BenchmarkJumpdest* -benchmem -memprofile mem.out From ca19e0182d53f616c17c3a4738f2885a5921dd36 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Wed, 11 May 2022 17:11:59 +0300 Subject: [PATCH 20/38] fix --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 389c1f3202..5f6287dff5 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ test-race: $(GOTEST) --timeout 15m -race -shuffle=on $(TESTALL) test-integration: - $(GOTEST) --timeout 30m -tags integration -count=1 $(TESTE2E) + $(GOTEST) --timeout 30m -tags integration $(TESTE2E) escape: cd $(path) && go test -gcflags "-m -m" -run none -bench=BenchmarkJumpdest* -benchmem -memprofile mem.out From f0f113c0fcc6ce6f360f1e63b7e80fb19ec391d2 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Thu, 12 May 2022 15:25:59 +0300 Subject: [PATCH 21/38] run versus origin/master --- .golangci.yml | 6 +++++- Makefile | 4 ---- common/leak/ignore_list.go | 4 ++-- go.mod | 1 + go.sum | 3 +++ 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index d72bb83320..7dc4fc37e3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -24,7 +24,6 @@ linters: - durationcheck - errchkjson - errname - - errorlint - exhaustive - exportloopref - gocognit @@ -50,6 +49,7 @@ linters: - unconvert - unparam - wsl + #- errorlint causes stack overflow. TODO: recheck after each golangci update linters-settings: gofmt: @@ -180,3 +180,7 @@ issues: linters: - gosec - gocritic + max-issues-per-linter: 0 + max-same-issues: 0 + #new: true + new-from-rev: origin/master \ No newline at end of file diff --git a/Makefile b/Makefile index 5f6287dff5..bce03bf5ef 100644 --- a/Makefile +++ b/Makefile @@ -71,10 +71,6 @@ escape: lint: @./build/bin/golangci-lint run --config ./.golangci.yml -lintci: - @echo "--> Running linter for code" - @./build/bin/golangci-lint run --config ./.golangci.yml - lintci-deps: rm -f ./build/bin/golangci-lint curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.46.0 diff --git a/common/leak/ignore_list.go b/common/leak/ignore_list.go index adcadce274..e43e1c0393 100644 --- a/common/leak/ignore_list.go +++ b/common/leak/ignore_list.go @@ -3,11 +3,11 @@ package leak import "go.uber.org/goleak" func IgnoreList() []goleak.Option { - return []goleak.Option { + return []goleak.Option{ goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache"), goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*recursiveTree).dispatch"), goleak.IgnoreTopFunction("github.com/rjeczalik/notify._Cfunc_CFRunLoopRun"), goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/metrics.(*meterArbiter).tick"), goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/consensus/ethash.(*remoteSealer).loop"), } -} \ No newline at end of file +} diff --git a/go.mod b/go.mod index e9c010d388..5e3a8b81e9 100644 --- a/go.mod +++ b/go.mod @@ -60,6 +60,7 @@ require ( github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 github.com/olekukonko/tablewriter v0.0.5 github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 + github.com/polyfloyd/go-errorlint v0.0.0-20220510153142-36539f2bdac3 // indirect github.com/prometheus/tsdb v0.7.1 github.com/quasilyte/gogrep v0.0.0-20220429205452-5e2753ee08f9 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect diff --git a/go.sum b/go.sum index 3aba63edb5..b5278c5112 100644 --- a/go.sum +++ b/go.sum @@ -429,6 +429,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polyfloyd/go-errorlint v0.0.0-20220510153142-36539f2bdac3 h1:GhmKVnwiethXkJVYqq/kdcw3+u2TIuhPwmHhB+ehpIQ= +github.com/polyfloyd/go-errorlint v0.0.0-20220510153142-36539f2bdac3/go.mod h1:KZy4xxPJyy88/gldCe5OdW6OQRtNO3EZE7hXzmnebgA= github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -689,6 +691,7 @@ golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 h1:uCLL3g5wH2xjxVREVuAbP9JM5 golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 h1:nonptSpoQ4vQjyraW20DXPAglgQfVnM9ZC6MmNLMR60= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= From 594c9ab23f74d9f53241e4efc5a683280a9fcc2a Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Thu, 12 May 2022 18:04:04 +0300 Subject: [PATCH 22/38] vs master --- .github/workflows/ci.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c23dc68bf2..0cb5167156 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - run: git submodule update --init --recursive --force + - run: | + git submodule update --init --recursive --force + git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master - uses: actions/setup-go@v3 with: go-version: 1.18.x @@ -54,14 +56,13 @@ jobs: # echo >&2 "Reproducible build broken"; cat bor1.sha256; cat bor2.sha256; exit 1 # fi + - name: Golang-ci install + if: runner.os == 'Linux' + run: make lintci-deps + - name: Lint if: runner.os == 'Linux' - uses: golangci/golangci-lint-action@v3 - with: - version: v1.46 - skip-pkg-cache: true - skip-build-cache: true - only-new-issues: true + run: make lint - name: Test run: make test From a57d21166a8e08a6d9c6a58a69e65e6914342bd8 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Thu, 12 May 2022 18:27:03 +0300 Subject: [PATCH 23/38] leaks --- .github/workflows/ci.yml | 10 ++++++---- common/leak/ignore_list.go | 8 ++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cb5167156..6060ca77cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,13 +25,19 @@ jobs: - run: | git submodule update --init --recursive --force git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master + - uses: actions/setup-go@v3 with: go-version: 1.18.x + - name: Install dependencies on Linux if: runner.os == 'Linux' run: sudo apt update && sudo apt install build-essential + - name: Golang-ci install + if: runner.os == 'Linux' + run: make lintci-deps + - uses: actions/cache@v3 with: path: | @@ -56,10 +62,6 @@ jobs: # echo >&2 "Reproducible build broken"; cat bor1.sha256; cat bor2.sha256; exit 1 # fi - - name: Golang-ci install - if: runner.os == 'Linux' - run: make lintci-deps - - name: Lint if: runner.os == 'Linux' run: make lint diff --git a/common/leak/ignore_list.go b/common/leak/ignore_list.go index e43e1c0393..ed61342a06 100644 --- a/common/leak/ignore_list.go +++ b/common/leak/ignore_list.go @@ -4,10 +4,18 @@ import "go.uber.org/goleak" func IgnoreList() []goleak.Option { return []goleak.Option{ + // a list of goroutne leaks that goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache"), goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*recursiveTree).dispatch"), + goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*nonrecursiveTree).dispatch"), goleak.IgnoreTopFunction("github.com/rjeczalik/notify._Cfunc_CFRunLoopRun"), + + // todo: this leaks should be fixed goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/metrics.(*meterArbiter).tick"), goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/consensus/ethash.(*remoteSealer).loop"), + goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/core.(*BlockChain).updateFutureBlocks"), + goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/core/state/snapshot.(*diskLayer).generate"), + goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/accounts/abi/bind/backends.nullSubscription.func1"), + goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/eth/filters.(*EventSystem).eventLoop"), } } From b05c336a831bc1e9466d90da7c70ab4183268bfb Mon Sep 17 00:00:00 2001 From: Evgeny Danilenko <6655321@bk.ru> Date: Thu, 12 May 2022 18:52:40 +0300 Subject: [PATCH 24/38] fmt --- common/leak/ignore_list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/leak/ignore_list.go b/common/leak/ignore_list.go index ed61342a06..4f0fe62e9b 100644 --- a/common/leak/ignore_list.go +++ b/common/leak/ignore_list.go @@ -4,7 +4,7 @@ import "go.uber.org/goleak" func IgnoreList() []goleak.Option { return []goleak.Option{ - // a list of goroutne leaks that + // a list of goroutne leaks that hard to fix due to external dependencies or too big refactoring needed goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache"), goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*recursiveTree).dispatch"), goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*nonrecursiveTree).dispatch"), From 39d943d22e7ffa31af1ebb65334cc7dab13242af Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Fri, 13 May 2022 09:11:17 +0300 Subject: [PATCH 25/38] stable tests --- Makefile | 2 +- common/leak/ignore_list.go | 2 ++ metrics/sample_test.go | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bce03bf5ef..313fabb134 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD) GIT_TAG ?= $(shell git describe --tags `git rev-list --tags="v*" --max-count=1`) PACKAGE = github.com/ethereum/go-ethereum -GO_FLAGS += -trimpath -buildvcs=false +GO_FLAGS += -buildvcs=false GO_FLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} -X ${PACKAGE}/params.GitBranch=${GIT_BRANCH} -X ${PACKAGE}/params.GitTag=${GIT_TAG}" TESTALL = $$(go list ./... | grep -v go-ethereum/cmd/) diff --git a/common/leak/ignore_list.go b/common/leak/ignore_list.go index 4f0fe62e9b..56134dcabc 100644 --- a/common/leak/ignore_list.go +++ b/common/leak/ignore_list.go @@ -7,7 +7,9 @@ func IgnoreList() []goleak.Option { // a list of goroutne leaks that hard to fix due to external dependencies or too big refactoring needed goleak.IgnoreTopFunction("github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache"), goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*recursiveTree).dispatch"), + goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*recursiveTree).internal"), goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*nonrecursiveTree).dispatch"), + goleak.IgnoreTopFunction("github.com/rjeczalik/notify.(*nonrecursiveTree).internal"), goleak.IgnoreTopFunction("github.com/rjeczalik/notify._Cfunc_CFRunLoopRun"), // todo: this leaks should be fixed diff --git a/metrics/sample_test.go b/metrics/sample_test.go index c9168d3e82..d675862e84 100644 --- a/metrics/sample_test.go +++ b/metrics/sample_test.go @@ -244,6 +244,7 @@ func TestUniformSampleIncludesTail(t *testing.T) { } func TestUniformSampleSnapshot(t *testing.T) { + rand.Seed(1) s := NewUniformSample(100) for i := 1; i <= 10000; i++ { s.Update(int64(i)) @@ -339,6 +340,9 @@ func TestUniformSampleConcurrentUpdateCount(t *testing.T) { if testing.Short() { t.Skip("skipping in short mode") } + + rand.Seed(1) + s := NewUniformSample(100) for i := 0; i < 100; i++ { s.Update(int64(i)) From 81ede2f6d25e52e3d3e1e195625046250e885793 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Fri, 13 May 2022 09:25:37 +0300 Subject: [PATCH 26/38] where to run --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6060ca77cf..a7e78112c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: pull_request: branches: - master - types: [opened, synchronize, closed] + types: [closed] concurrency: group: build-${{ github.event.pull_request.number || github.ref }} @@ -15,7 +15,7 @@ concurrency: jobs: tests: - if: (!(github.event.action == 'closed' && github.event.pull_request.merged != true)) + if: (github.event.action != 'closed' || github.event.pull_request.merged == true) strategy: matrix: os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments From 485762a28d013d5c94be6daebf5f3cb2492748c9 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Fri, 13 May 2022 09:35:31 +0300 Subject: [PATCH 27/38] where to run --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7e78112c2..fc170c3871 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,8 +6,7 @@ on: - "!master" pull_request: branches: - - master - types: [closed] + - "**" concurrency: group: build-${{ github.event.pull_request.number || github.ref }} From 3268c143cdbc8fc51668334e9955e86028896c51 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Fri, 13 May 2022 09:36:02 +0300 Subject: [PATCH 28/38] where to run --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc170c3871..14cf78dfc1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,8 @@ on: - "!master" pull_request: branches: - - "**" + - master + types: [synchronize, closed] concurrency: group: build-${{ github.event.pull_request.number || github.ref }} From 276e82b16c8e56ebbb15d7680d045da74c2aaba8 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Fri, 13 May 2022 09:36:40 +0300 Subject: [PATCH 29/38] where to run1 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14cf78dfc1..03037bb2e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: - "!master" pull_request: branches: - - master + - "master" types: [synchronize, closed] concurrency: From a8a9229c341bbb3e984ac0016d744d3428bedc4d Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Fri, 13 May 2022 09:37:23 +0300 Subject: [PATCH 30/38] where to run2 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03037bb2e3..ca4e9671fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: pull_request: branches: - "master" - types: [synchronize, closed] + types: [opened, synchronize, closed] concurrency: group: build-${{ github.event.pull_request.number || github.ref }} From 5a3eb08a57c64ee41c6ede4271dcfc1f290f15ce Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Fri, 13 May 2022 09:38:43 +0300 Subject: [PATCH 31/38] where to run3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca4e9671fa..2015b06777 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: pull_request: branches: - "master" - types: [opened, synchronize, closed] + types: [closed] concurrency: group: build-${{ github.event.pull_request.number || github.ref }} From 95bfcdc5f4a7af6576a4c520a8f7ca3da284286e Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Fri, 13 May 2022 10:06:11 +0300 Subject: [PATCH 32/38] macos tests --- consensus/ethash/sealer_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consensus/ethash/sealer_test.go b/consensus/ethash/sealer_test.go index c34e76aec2..a9e96af866 100644 --- a/consensus/ethash/sealer_test.go +++ b/consensus/ethash/sealer_test.go @@ -70,7 +70,7 @@ func TestRemoteNotify(t *testing.T) { if want := common.BytesToHash(target.Bytes()).Hex(); work[2] != want { t.Errorf("work packet target mismatch: have %s, want %s", work[2], want) } - case <-time.After(3 * time.Second): + case <-time.After(5 * time.Second): t.Fatalf("notification timed out") } } From e7870978744ffd675feeb1106a8d5ef4e63b7628 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Fri, 13 May 2022 18:41:27 +0300 Subject: [PATCH 33/38] restore codecov --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2015b06777..9ee76fca61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,4 +73,9 @@ jobs: # run: make test-race - name: test-integration - run: make test-integration \ No newline at end of file + run: make test-integration + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./cover.out \ No newline at end of file From 52647fcd88ec4b92b76682359dc38dbac81a485e Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Mon, 16 May 2022 10:12:09 +0300 Subject: [PATCH 34/38] run on forked branches --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ee76fca61..59fa866165 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,11 +3,10 @@ on: push: branches: - "**" - - "!master" pull_request: branches: - - "master" - types: [closed] + - "**" + types: [opened, synchronize] concurrency: group: build-${{ github.event.pull_request.number || github.ref }} From 30dd11a183e0e06c92ca0fa3b081001af5de8b45 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Mon, 16 May 2022 10:35:57 +0300 Subject: [PATCH 35/38] run on forked branches --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59fa866165..79dba640ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,10 +3,13 @@ on: push: branches: - "**" + - "!main" pull_request: branches: - "**" - types: [opened, synchronize] + types: [opened, synchronize, closed] + + workflow_dispatch: concurrency: group: build-${{ github.event.pull_request.number || github.ref }} From 91559f39556f73cadfbd6984450f579d1f941603 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Mon, 16 May 2022 10:47:33 +0300 Subject: [PATCH 36/38] run on forked branches --- .github/workflows/ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79dba640ca..9d51c4f67b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,13 +3,6 @@ on: push: branches: - "**" - - "!main" - pull_request: - branches: - - "**" - types: [opened, synchronize, closed] - - workflow_dispatch: concurrency: group: build-${{ github.event.pull_request.number || github.ref }} From 3aaf6bc13e30771ff35bfcfd04759155c2e65939 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Tue, 17 May 2022 19:25:59 +0300 Subject: [PATCH 37/38] cherry-pick from Jerry's Chen branch --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d51c4f67b..fc2445e0f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,12 @@ name: CI -on: +=on: push: + branches: + - "master" + pull_request: branches: - "**" + types: [opened, synchronize] concurrency: group: build-${{ github.event.pull_request.number || github.ref }} From 2930d04428f649d93971e1ccad6e9a2c10665a13 Mon Sep 17 00:00:00 2001 From: Evgeny Danienko <6655321@bk.ru> Date: Tue, 17 May 2022 19:28:08 +0300 Subject: [PATCH 38/38] misspell --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc2445e0f4..7db530c346 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: CI -=on: +on: push: branches: - "master"