diff --git a/.circleci/config.yml b/.circleci/config.yml
index 34828ef5e6..b911cafed1 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -198,7 +198,7 @@ commands:
shell: bash.exe
command: |
choco install -y msys2 pacman make wget --force
- choco install -y golang --version=1.16.15 --force
+ choco install -y golang --version=1.17.9 --force
choco install -y python3 --version=3.7.3 --force
export msys2='cmd //C RefreshEnv.cmd '
export msys2+='& set MSYS=winsymlinks:nativestrict '
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4cc8eaba40..825056b1e1 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -20,7 +20,7 @@ jobs:
- name: Install golang
uses: actions/setup-go@v2
with:
- go-version: '1.16.15'
+ go-version: '1.17.9'
- name: Build Test
run: |
export ALGORAND_DEADLOCK=enable
diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml
index 134685fc6e..6cc82a6e55 100644
--- a/.github/workflows/reviewdog.yml
+++ b/.github/workflows/reviewdog.yml
@@ -44,7 +44,7 @@ jobs:
- name: Install specific golang
uses: actions/setup-go@v2
with:
- go-version: '1.16.15'
+ go-version: '1.17.9'
- name: Create folders for golangci-lint
run: mkdir -p cicdtmp/golangci-lint
- name: Check if custom golangci-lint is already built
diff --git a/agreement/msgp_gen_test.go b/agreement/msgp_gen_test.go
index 4bfe9d0280..8d886e6562 100644
--- a/agreement/msgp_gen_test.go
+++ b/agreement/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package agreement
diff --git a/cmd/partitiontest_linter/go.mod b/cmd/partitiontest_linter/go.mod
index 17a694f6de..3e9db30e99 100644
--- a/cmd/partitiontest_linter/go.mod
+++ b/cmd/partitiontest_linter/go.mod
@@ -1,6 +1,6 @@
module github.com/algorand/go-algorand/cmd/partitiontest_linter
-go 1.16
+go 1.17
require golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
require golang.org/x/sys v0.0.0-20210510120138-977fb7262007
diff --git a/compactcert/msgp_gen_test.go b/compactcert/msgp_gen_test.go
index 88c8395a37..52cbb5a3e4 100644
--- a/compactcert/msgp_gen_test.go
+++ b/compactcert/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package compactcert
diff --git a/crypto/compactcert/msgp_gen_test.go b/crypto/compactcert/msgp_gen_test.go
index 23ebb5a3fd..f2a43f572d 100644
--- a/crypto/compactcert/msgp_gen_test.go
+++ b/crypto/compactcert/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package compactcert
diff --git a/crypto/merklearray/msgp_gen_test.go b/crypto/merklearray/msgp_gen_test.go
index fbcc81970a..7715f75df3 100644
--- a/crypto/merklearray/msgp_gen_test.go
+++ b/crypto/merklearray/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package merklearray
diff --git a/crypto/merklesignature/msgp_gen_test.go b/crypto/merklesignature/msgp_gen_test.go
index 9c73788c54..3ea42c77f0 100644
--- a/crypto/merklesignature/msgp_gen_test.go
+++ b/crypto/merklesignature/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package merklesignature
diff --git a/crypto/msgp_gen_test.go b/crypto/msgp_gen_test.go
index 21be375fad..8a74a2852a 100644
--- a/crypto/msgp_gen_test.go
+++ b/crypto/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package crypto
diff --git a/crypto/secp256k1/dummy.go b/crypto/secp256k1/dummy.go
index 7c86a7f42a..479e07dc8e 100644
--- a/crypto/secp256k1/dummy.go
+++ b/crypto/secp256k1/dummy.go
@@ -1,3 +1,4 @@
+//go:build dummy
// +build dummy
// This file is part of a workaround for `go mod vendor` which won't vendor
diff --git a/crypto/secp256k1/libsecp256k1/contrib/dummy.go b/crypto/secp256k1/libsecp256k1/contrib/dummy.go
index fda594be99..2c946210c5 100644
--- a/crypto/secp256k1/libsecp256k1/contrib/dummy.go
+++ b/crypto/secp256k1/libsecp256k1/contrib/dummy.go
@@ -1,3 +1,4 @@
+//go:build dummy
// +build dummy
// Package c contains only a C file.
diff --git a/crypto/secp256k1/libsecp256k1/dummy.go b/crypto/secp256k1/libsecp256k1/dummy.go
index 379b16992f..04bbe3d76e 100644
--- a/crypto/secp256k1/libsecp256k1/dummy.go
+++ b/crypto/secp256k1/libsecp256k1/dummy.go
@@ -1,3 +1,4 @@
+//go:build dummy
// +build dummy
// Package c contains only a C file.
diff --git a/crypto/secp256k1/libsecp256k1/include/dummy.go b/crypto/secp256k1/libsecp256k1/include/dummy.go
index 5af540c73c..64c71b8451 100644
--- a/crypto/secp256k1/libsecp256k1/include/dummy.go
+++ b/crypto/secp256k1/libsecp256k1/include/dummy.go
@@ -1,3 +1,4 @@
+//go:build dummy
// +build dummy
// Package c contains only a C file.
diff --git a/crypto/secp256k1/libsecp256k1/src/dummy.go b/crypto/secp256k1/libsecp256k1/src/dummy.go
index 65868f38a8..2df270adc3 100644
--- a/crypto/secp256k1/libsecp256k1/src/dummy.go
+++ b/crypto/secp256k1/libsecp256k1/src/dummy.go
@@ -1,3 +1,4 @@
+//go:build dummy
// +build dummy
// Package c contains only a C file.
diff --git a/crypto/secp256k1/libsecp256k1/src/modules/dummy.go b/crypto/secp256k1/libsecp256k1/src/modules/dummy.go
index 3c7a696439..99c538db51 100644
--- a/crypto/secp256k1/libsecp256k1/src/modules/dummy.go
+++ b/crypto/secp256k1/libsecp256k1/src/modules/dummy.go
@@ -1,3 +1,4 @@
+//go:build dummy
// +build dummy
// Package c contains only a C file.
diff --git a/crypto/secp256k1/libsecp256k1/src/modules/ecdh/dummy.go b/crypto/secp256k1/libsecp256k1/src/modules/ecdh/dummy.go
index b6fc38327e..48c2e0aa54 100644
--- a/crypto/secp256k1/libsecp256k1/src/modules/ecdh/dummy.go
+++ b/crypto/secp256k1/libsecp256k1/src/modules/ecdh/dummy.go
@@ -1,3 +1,4 @@
+//go:build dummy
// +build dummy
// Package c contains only a C file.
diff --git a/crypto/secp256k1/libsecp256k1/src/modules/recovery/dummy.go b/crypto/secp256k1/libsecp256k1/src/modules/recovery/dummy.go
index b9491f0cb9..8efbd7abe7 100644
--- a/crypto/secp256k1/libsecp256k1/src/modules/recovery/dummy.go
+++ b/crypto/secp256k1/libsecp256k1/src/modules/recovery/dummy.go
@@ -1,3 +1,4 @@
+//go:build dummy
// +build dummy
// Package c contains only a C file.
diff --git a/crypto/secp256k1/panic_cb.go b/crypto/secp256k1/panic_cb.go
index 5da2bea376..a30b04f51b 100644
--- a/crypto/secp256k1/panic_cb.go
+++ b/crypto/secp256k1/panic_cb.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be found in
// the LICENSE file.
-// +build !gofuzz
-// +build cgo
+//go:build !gofuzz && cgo
+// +build !gofuzz,cgo
package secp256k1
diff --git a/crypto/secp256k1/scalar_mult_cgo.go b/crypto/secp256k1/scalar_mult_cgo.go
index 8e29d65b04..d1b4c8b20e 100644
--- a/crypto/secp256k1/scalar_mult_cgo.go
+++ b/crypto/secp256k1/scalar_mult_cgo.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be found in
// the LICENSE file.
-// +build !gofuzz
-// +build cgo
+//go:build !gofuzz && cgo
+// +build !gofuzz,cgo
package secp256k1
diff --git a/crypto/secp256k1/scalar_mult_nocgo.go b/crypto/secp256k1/scalar_mult_nocgo.go
index 55756b5be8..22f53ac6ae 100644
--- a/crypto/secp256k1/scalar_mult_nocgo.go
+++ b/crypto/secp256k1/scalar_mult_nocgo.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be found in
// the LICENSE file.
+//go:build gofuzz || !cgo
// +build gofuzz !cgo
package secp256k1
diff --git a/crypto/secp256k1/secp256.go b/crypto/secp256k1/secp256.go
index 067b5e6c50..7fbce862e1 100644
--- a/crypto/secp256k1/secp256.go
+++ b/crypto/secp256k1/secp256.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be found in
// the LICENSE file.
-// +build !gofuzz
-// +build cgo
+//go:build !gofuzz && cgo
+// +build !gofuzz,cgo
// Package secp256k1 wraps the bitcoin secp256k1 C library.
package secp256k1
diff --git a/daemon/algod/api/spec/v2/msgp_gen_test.go b/daemon/algod/api/spec/v2/msgp_gen_test.go
index 57bda723cf..2d3a842a22 100644
--- a/daemon/algod/api/spec/v2/msgp_gen_test.go
+++ b/daemon/algod/api/spec/v2/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package v2
diff --git a/data/account/msgp_gen_test.go b/data/account/msgp_gen_test.go
index 9bde0e5d83..ae68f3769f 100644
--- a/data/account/msgp_gen_test.go
+++ b/data/account/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package account
diff --git a/data/basics/msgp_gen_test.go b/data/basics/msgp_gen_test.go
index 8756c3c4e1..90f62698a0 100644
--- a/data/basics/msgp_gen_test.go
+++ b/data/basics/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package basics
diff --git a/data/bookkeeping/msgp_gen_test.go b/data/bookkeeping/msgp_gen_test.go
index 8bad965935..2315516af8 100644
--- a/data/bookkeeping/msgp_gen_test.go
+++ b/data/bookkeeping/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package bookkeeping
diff --git a/data/committee/msgp_gen_test.go b/data/committee/msgp_gen_test.go
index 7a8946a6cb..084952c31c 100644
--- a/data/committee/msgp_gen_test.go
+++ b/data/committee/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package committee
diff --git a/data/hashable/msgp_gen_test.go b/data/hashable/msgp_gen_test.go
index 131eaebe03..429712bd87 100644
--- a/data/hashable/msgp_gen_test.go
+++ b/data/hashable/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package hashable
diff --git a/data/transactions/msgp_gen_test.go b/data/transactions/msgp_gen_test.go
index d92a29cf8f..0a916da82a 100644
--- a/data/transactions/msgp_gen_test.go
+++ b/data/transactions/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package transactions
diff --git a/go.mod b/go.mod
index c917e62adf..30e8b145de 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/algorand/go-algorand
-go 1.16
+go 1.17
require (
github.com/algorand/falcon v0.0.0-20220130164023-c9e1d466f123
@@ -14,12 +14,15 @@ require (
github.com/aws/aws-sdk-go v1.16.5
github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e
github.com/cpuguy83/go-md2man v1.0.8 // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018
github.com/dchest/siphash v1.2.1
+ github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/fatih/color v1.7.0
github.com/fortytw2/leaktest v1.3.0 // indirect
github.com/gen2brain/beeep v0.0.0-20180718162406-4e430518395f
github.com/getkin/kin-openapi v0.22.0
+ github.com/ghodss/yaml v1.0.0 // indirect
github.com/godbus/dbus v0.0.0-20181101234600-2ff6f7ffd60f // indirect
github.com/gofrs/flock v0.7.0
github.com/google/go-querystring v1.0.0
@@ -28,26 +31,39 @@ require (
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/mux v1.6.2
github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
github.com/jmoiron/sqlx v1.2.0
+ github.com/josharian/intern v1.0.0 // indirect
github.com/karalabe/usb v0.0.2
github.com/labstack/echo/v4 v4.1.17
+ github.com/labstack/gommon v0.3.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
+ github.com/mattn/go-colorable v0.1.7 // indirect
+ github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mattn/go-sqlite3 v1.10.0
github.com/miekg/dns v1.1.27
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
github.com/olivere/elastic v6.2.14+incompatible
+ github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday v1.5.2 // indirect
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.7.1
+ github.com/valyala/bytebufferpool v1.0.0 // indirect
+ github.com/valyala/fasttemplate v1.2.1 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
+ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654
+ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
golang.org/x/text v0.3.7
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/sohlich/elogrus.v3 v3.0.0-20180410122755-1fa29e2f2009
gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2 // indirect
+ gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
)
diff --git a/ledger/ledgercore/msgp_gen_test.go b/ledger/ledgercore/msgp_gen_test.go
index 99ad64e4de..dbb017a491 100644
--- a/ledger/ledgercore/msgp_gen_test.go
+++ b/ledger/ledgercore/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package ledgercore
diff --git a/ledger/msgp_gen_test.go b/ledger/msgp_gen_test.go
index 92b54bc521..fb1dac5a29 100644
--- a/ledger/msgp_gen_test.go
+++ b/ledger/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package ledger
diff --git a/libgoal/lockedFileLinux.go b/libgoal/lockedFileLinux.go
index 989972873c..9c60ca028d 100644
--- a/libgoal/lockedFileLinux.go
+++ b/libgoal/lockedFileLinux.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with go-algorand. If not, see .
+//go:build linux
// +build linux
package libgoal
diff --git a/libgoal/lockedFileUnix.go b/libgoal/lockedFileUnix.go
index 70262a15ca..b32af5def4 100644
--- a/libgoal/lockedFileUnix.go
+++ b/libgoal/lockedFileUnix.go
@@ -17,6 +17,7 @@
// Support all unix system except linux
// in https://github.com/golang/sys/blob/master/unix/syscall_unix.go
+//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd netbsd openbsd solaris
package libgoal
diff --git a/libgoal/lockedFileWindows.go b/libgoal/lockedFileWindows.go
index efc6de0ade..c89785d80a 100644
--- a/libgoal/lockedFileWindows.go
+++ b/libgoal/lockedFileWindows.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with go-algorand. If not, see .
+//go:build windows
// +build windows
package libgoal
diff --git a/network/messagetracer/graphtrace.go b/network/messagetracer/graphtrace.go
index 8a92698011..68c465914b 100644
--- a/network/messagetracer/graphtrace.go
+++ b/network/messagetracer/graphtrace.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with go-algorand. If not, see .
//
+//go:build msgtrace
// +build msgtrace
package messagetracer
diff --git a/node/msgp_gen_test.go b/node/msgp_gen_test.go
index e72b128ee6..bbfb4732a3 100644
--- a/node/msgp_gen_test.go
+++ b/node/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package node
diff --git a/node/node.go b/node/node.go
index f173853d48..2fa540e6a7 100644
--- a/node/node.go
+++ b/node/node.go
@@ -93,7 +93,7 @@ func (status StatusReport) TimeSinceLastRound() time.Duration {
// AlgorandFullNode specifies and implements a full Algorand node.
type AlgorandFullNode struct {
- mu deadlock.Mutex
+ mu deadlock.RWMutex
ctx context.Context
cancelCtx context.CancelFunc
config config.Local
@@ -405,13 +405,15 @@ func (node *AlgorandFullNode) Start() {
func (node *AlgorandFullNode) startMonitoringRoutines() {
node.monitoringRoutinesWaitGroup.Add(3)
+ doneCh := node.ctx.Done()
+
// PKI TODO: Remove this with #2596
// Periodically check for new participation keys
- go node.checkForParticipationKeys()
+ go node.checkForParticipationKeys(doneCh)
- go node.txPoolGaugeThread()
+ go node.txPoolGaugeThread(doneCh)
// Delete old participation keys
- go node.oldKeyDeletionThread()
+ go node.oldKeyDeletionThread(doneCh)
// TODO re-enable with configuration flag post V1
//go logging.UsageLogThread(node.ctx, node.log, 100*time.Millisecond, nil)
@@ -782,9 +784,10 @@ func ensureParticipationDB(genesisDir string, log logging.Logger) (account.Parti
}
// Reload participation keys from disk periodically
-func (node *AlgorandFullNode) checkForParticipationKeys() {
+func (node *AlgorandFullNode) checkForParticipationKeys(done <-chan struct{}) {
defer node.monitoringRoutinesWaitGroup.Done()
ticker := time.NewTicker(node.config.ParticipationKeysRefreshInterval)
+ defer ticker.Stop()
for {
select {
case <-ticker.C:
@@ -792,8 +795,7 @@ func (node *AlgorandFullNode) checkForParticipationKeys() {
if err != nil {
node.log.Errorf("Could not refresh participation keys: %v", err)
}
- case <-node.ctx.Done():
- ticker.Stop()
+ case <-done:
return
}
}
@@ -1032,7 +1034,7 @@ func insertStateProofToRegistry(part account.PersistedParticipation, node *Algor
var txPoolGuage = metrics.MakeGauge(metrics.MetricName{Name: "algod_tx_pool_count", Description: "current number of available transactions in pool"})
-func (node *AlgorandFullNode) txPoolGaugeThread() {
+func (node *AlgorandFullNode) txPoolGaugeThread(done <-chan struct{}) {
defer node.monitoringRoutinesWaitGroup.Done()
ticker := time.NewTicker(10 * time.Second)
defer ticker.Stop()
@@ -1040,7 +1042,7 @@ func (node *AlgorandFullNode) txPoolGaugeThread() {
select {
case <-ticker.C:
txPoolGuage.Set(float64(node.transactionPool.PendingCount()), nil)
- case <-node.ctx.Done():
+ case <-done:
return
}
}
@@ -1071,11 +1073,11 @@ func (node *AlgorandFullNode) OnNewBlock(block bookkeeping.Block, delta ledgerco
// oldKeyDeletionThread keeps deleting old participation keys.
// It runs in a separate thread so that, during catchup, we
// don't have to delete key for each block we received.
-func (node *AlgorandFullNode) oldKeyDeletionThread() {
+func (node *AlgorandFullNode) oldKeyDeletionThread(done <-chan struct{}) {
defer node.monitoringRoutinesWaitGroup.Done()
for {
select {
- case <-node.ctx.Done():
+ case <-done:
return
case <-node.oldKeyDeletionNotify:
}
diff --git a/nodecontrol/kmdControl_common.go b/nodecontrol/kmdControl_common.go
index a73c75746f..151ea79633 100644
--- a/nodecontrol/kmdControl_common.go
+++ b/nodecontrol/kmdControl_common.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with go-algorand. If not, see .
+//go:build !windows
// +build !windows
package nodecontrol
diff --git a/protocol/msgp_gen_test.go b/protocol/msgp_gen_test.go
index 4bdc805908..e9cbe36b16 100644
--- a/protocol/msgp_gen_test.go
+++ b/protocol/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package protocol
diff --git a/protocol/test/msgp_gen_test.go b/protocol/test/msgp_gen_test.go
index d87b778e07..6704fc95bb 100644
--- a/protocol/test/msgp_gen_test.go
+++ b/protocol/test/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package test
diff --git a/rpcs/msgp_gen_test.go b/rpcs/msgp_gen_test.go
index 46ec99aaf3..58d5d0de6c 100644
--- a/rpcs/msgp_gen_test.go
+++ b/rpcs/msgp_gen_test.go
@@ -1,3 +1,4 @@
+//go:build !skip_msgp_testing
// +build !skip_msgp_testing
package rpcs
diff --git a/scripts/buildtools/go.mod b/scripts/buildtools/go.mod
index cf29e9304c..96142dc63c 100644
--- a/scripts/buildtools/go.mod
+++ b/scripts/buildtools/go.mod
@@ -1,6 +1,6 @@
module github.com/algorand/go-algorand/scripts/buildtools
-go 1.16
+go 1.17
require (
github.com/algorand/msgp v1.1.50
diff --git a/scripts/configure_dev.sh b/scripts/configure_dev.sh
index 6eb00df3d4..0af2798fee 100755
--- a/scripts/configure_dev.sh
+++ b/scripts/configure_dev.sh
@@ -28,6 +28,7 @@ done
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
OS=$("$SCRIPTPATH"/ostype.sh)
+ARCH=$("$SCRIPTPATH"/archtype.sh)
function install_or_upgrade {
if ${FORCE} ; then
@@ -72,6 +73,10 @@ if [ "${OS}" = "linux" ]; then
sudo "$SCRIPTPATH/install_linux_deps.sh"
fi
elif [ "${OS}" = "darwin" ]; then
+ if [ "${ARCH}" = "arm64" ]; then
+ export CPATH=/opt/homebrew/include
+ export LIBRARY_PATH=/opt/homebrew/lib
+ fi
if [ "${CIRCLECI}" != "true" ]; then
brew update
brew tap homebrew/cask
diff --git a/scripts/get_golang_version.sh b/scripts/get_golang_version.sh
index 1dd22eda46..390847ed4d 100755
--- a/scripts/get_golang_version.sh
+++ b/scripts/get_golang_version.sh
@@ -11,9 +11,9 @@
# Our build task-runner `mule` will refer to this script and will automatically
# build a new image whenever the version number has been changed.
-BUILD=1.16.15
- MIN=1.16
- GO_MOD_SUPPORT=1.16
+BUILD=1.17.9
+ MIN=1.17
+ GO_MOD_SUPPORT=1.17
if [ "$1" = all ]
then
diff --git a/tools/network/dnssec/config_unix.go b/tools/network/dnssec/config_unix.go
index bb328cde6a..4a8c574de1 100644
--- a/tools/network/dnssec/config_unix.go
+++ b/tools/network/dnssec/config_unix.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with go-algorand. If not, see .
+//go:build !windows
// +build !windows
package dnssec
diff --git a/tools/network/dnssec/config_unix_test.go b/tools/network/dnssec/config_unix_test.go
index c6699e67f8..c757b5369f 100644
--- a/tools/network/dnssec/config_unix_test.go
+++ b/tools/network/dnssec/config_unix_test.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with go-algorand. If not, see .
+//go:build !windows
// +build !windows
package dnssec
diff --git a/tools/network/dnssec/config_windows.go b/tools/network/dnssec/config_windows.go
index 357f1aa1f1..41d6950070 100644
--- a/tools/network/dnssec/config_windows.go
+++ b/tools/network/dnssec/config_windows.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with go-algorand. If not, see .
+//go:build windows
// +build windows
package dnssec
diff --git a/util/process_common.go b/util/process_common.go
index 5685b06a51..b2c1bc7081 100644
--- a/util/process_common.go
+++ b/util/process_common.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with go-algorand. If not, see .
+//go:build !windows
// +build !windows
package util
diff --git a/util/process_windows.go b/util/process_windows.go
index b7a5c6b65d..4cad60df7e 100644
--- a/util/process_windows.go
+++ b/util/process_windows.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with go-algorand. If not, see .
+//go:build windows
// +build windows
package util
diff --git a/util/util.go b/util/util.go
index c4c7a7385c..a19a5b0690 100644
--- a/util/util.go
+++ b/util/util.go
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with go-algorand. If not, see .
+//go:build !windows
// +build !windows
package util