diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index ada29474be7..fbe5bd1bf59 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -41,7 +41,7 @@ jobs: - name: Setup go uses: actions/setup-go@v3 with: - go-version: "1.19" + go-version: "1.20" cache: true - name: Build relic diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index eb28e840078..9079fb06a98 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -14,7 +14,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.19' + go-version: "1.20" - name: Checkout repo uses: actions/checkout@v2 - name: Build relic diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5772ef5dcb3..26d14496fb5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ on: - 'v[0-9]+.[0-9]+' env: - GO_VERSION: 1.19 + GO_VERSION: "1.20" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} @@ -47,7 +47,7 @@ jobs: uses: golangci/golangci-lint-action@v3 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.49 + version: v1.51 args: -v --build-tags relic working-directory: ${{ matrix.dir }} # https://github.com/golangci/golangci-lint-action/issues/244 diff --git a/.github/workflows/flaky-test-debug.yml b/.github/workflows/flaky-test-debug.yml index 3a5b47e2c2f..8058a656f29 100644 --- a/.github/workflows/flaky-test-debug.yml +++ b/.github/workflows/flaky-test-debug.yml @@ -5,7 +5,7 @@ on: branches: - '**/*flaky-test-debug*' env: - GO_VERSION: 1.19 + GO_VERSION: "1.20" #concurrency: # group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} @@ -36,7 +36,7 @@ jobs: uses: golangci/golangci-lint-action@v3 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.49 + version: v1.51 args: -v --build-tags relic working-directory: ${{ matrix.dir }} # https://github.com/golangci/golangci-lint-action/issues/244 diff --git a/.github/workflows/test-monitor-flaky.yml b/.github/workflows/test-monitor-flaky.yml index fcf215b734e..442d71c3e07 100644 --- a/.github/workflows/test-monitor-flaky.yml +++ b/.github/workflows/test-monitor-flaky.yml @@ -13,7 +13,7 @@ on: env: BIGQUERY_DATASET: production_src_flow_test_metrics BIGQUERY_TABLE: test_results - GO_VERSION: 1.19 + GO_VERSION: "1.20" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} diff --git a/.github/workflows/test-monitor-regular-skipped.yml b/.github/workflows/test-monitor-regular-skipped.yml index 74736a00431..d9f696ab87c 100644 --- a/.github/workflows/test-monitor-regular-skipped.yml +++ b/.github/workflows/test-monitor-regular-skipped.yml @@ -15,7 +15,7 @@ env: BIGQUERY_DATASET: production_src_flow_test_metrics BIGQUERY_TABLE: skipped_tests BIGQUERY_TABLE2: test_results - GO_VERSION: 1.19 + GO_VERSION: "1.20" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 2e297adb6ff..9f228f215ba 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.19' + go-version: "1.20" - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v1 with: diff --git a/cmd/Dockerfile b/cmd/Dockerfile index fc4bcf7badb..d9d7800546c 100644 --- a/cmd/Dockerfile +++ b/cmd/Dockerfile @@ -3,7 +3,7 @@ #################################### ## (1) Setup the build environment -FROM golang:1.19-bullseye AS build-setup +FROM golang:1.20-bullseye AS build-setup RUN apt-get update RUN apt-get -y install cmake zip @@ -71,7 +71,7 @@ RUN --mount=type=ssh \ RUN chmod a+x /app/app ## (4) Add the statically linked debug binary to a distroless image configured for debugging -FROM golang:1.19-bullseye as debug +FROM golang:1.20-bullseye as debug RUN go install github.com/go-delve/delve/cmd/dlv@latest diff --git a/cmd/testclient/go.mod b/cmd/testclient/go.mod index 0a02e69ad42..dbe66a78fb5 100644 --- a/cmd/testclient/go.mod +++ b/cmd/testclient/go.mod @@ -1,6 +1,6 @@ module github.com/onflow/flow-go/cmd/testclient -go 1.19 +go 1.20 require ( github.com/onflow/flow-go-sdk v0.4.1 diff --git a/crypto/Dockerfile b/crypto/Dockerfile index 37a0b373171..d75e9543de4 100644 --- a/crypto/Dockerfile +++ b/crypto/Dockerfile @@ -1,6 +1,6 @@ # gcr.io/dl-flow/golang-cmake -FROM golang:1.19-buster +FROM golang:1.20-buster RUN apt-get update RUN apt-get -y install cmake zip RUN go install github.com/axw/gocov/gocov@latest diff --git a/crypto/go.mod b/crypto/go.mod index c7fe54f9ff5..9895e1c35db 100644 --- a/crypto/go.mod +++ b/crypto/go.mod @@ -1,6 +1,6 @@ module github.com/onflow/flow-go/crypto -go 1.19 +go 1.20 require ( github.com/btcsuite/btcd/btcec/v2 v2.2.1 diff --git a/engine/access/state_stream/backend_executiondata_test.go b/engine/access/state_stream/backend_executiondata_test.go index b619a94e322..361cb64aa80 100644 --- a/engine/access/state_stream/backend_executiondata_test.go +++ b/engine/access/state_stream/backend_executiondata_test.go @@ -3,7 +3,6 @@ package state_stream import ( "context" "fmt" - "math/rand" "testing" "time" @@ -65,8 +64,6 @@ func TestBackendExecutionDataSuite(t *testing.T) { } func (s *BackendExecutionDataSuite) SetupTest() { - rand.Seed(time.Now().UnixNano()) - logger := unittest.Logger() s.state = protocolmock.NewState(s.T()) diff --git a/fvm/crypto/hash_test.go b/fvm/crypto/hash_test.go index bb9bb64172b..58d15d19b17 100644 --- a/fvm/crypto/hash_test.go +++ b/fvm/crypto/hash_test.go @@ -1,7 +1,7 @@ package crypto_test import ( - "math/rand" + "crypto/rand" "testing" "crypto/sha256" diff --git a/go.mod b/go.mod index c0fa1246b03..bfffd710b20 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/onflow/flow-go -go 1.19 +go 1.20 require ( cloud.google.com/go/compute/metadata v0.2.3 diff --git a/insecure/go.mod b/insecure/go.mod index b5d9f36ac1e..3b5415815f6 100644 --- a/insecure/go.mod +++ b/insecure/go.mod @@ -1,6 +1,6 @@ module github.com/onflow/flow-go/insecure -go 1.19 +go 1.20 require ( github.com/golang/protobuf v1.5.3 diff --git a/integration/benchmark/cmd/manual/Dockerfile b/integration/benchmark/cmd/manual/Dockerfile index 1ad38985a43..58f2b71d42b 100644 --- a/integration/benchmark/cmd/manual/Dockerfile +++ b/integration/benchmark/cmd/manual/Dockerfile @@ -1,7 +1,7 @@ # syntax = docker/dockerfile:experimental # NOTE: Must be run in the context of the repo's root directory -FROM golang:1.19-buster AS build-setup +FROM golang:1.20-buster AS build-setup RUN apt-get update RUN apt-get -y install cmake zip diff --git a/integration/go.mod b/integration/go.mod index d2b994cc9f1..290acf6ccc5 100644 --- a/integration/go.mod +++ b/integration/go.mod @@ -1,6 +1,6 @@ module github.com/onflow/flow-go/integration -go 1.19 +go 1.20 require ( cloud.google.com/go/bigquery v1.50.0 diff --git a/ledger/common/testutils/testutils.go b/ledger/common/testutils/testutils.go index ab30000c47c..e0e100ee46c 100644 --- a/ledger/common/testutils/testutils.go +++ b/ledger/common/testutils/testutils.go @@ -206,7 +206,7 @@ func RandomValues(n int, minByteSize, maxByteSize int) []l.Value { byteSize = minByteSize + rand.Intn(maxByteSize-minByteSize) } value := make([]byte, byteSize) - _, err := rand.Read(value) + _, err := crand.Read(value) if err != nil { panic("random generation failed") } diff --git a/utils/unittest/fixtures.go b/utils/unittest/fixtures.go index f5d454d01b0..5f3d5f86e95 100644 --- a/utils/unittest/fixtures.go +++ b/utils/unittest/fixtures.go @@ -9,8 +9,6 @@ import ( "testing" "time" - blocks "github.com/ipfs/go-block-format" - "github.com/ipfs/go-cid" "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/require" @@ -415,12 +413,6 @@ func BlockHeaderFixture(opts ...func(header *flow.Header)) *flow.Header { return header } -func CidFixture() cid.Cid { - data := make([]byte, 1024) - _, _ = rand.Read(data) - return blocks.NewBlock(data).Cid() -} - func BlockHeaderFixtureOnChain( chainID flow.ChainID, opts ...func(header *flow.Header), @@ -2451,7 +2443,7 @@ func ChunkExecutionDataFixture(t *testing.T, minSize int, opts ...func(*executio } v := make([]byte, size) - _, err := rand.Read(v) + _, err := crand.Read(v) require.NoError(t, err) k, err := ced.TrieUpdate.Payloads[0].Key()