Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump golang from 1.20 to 1.21 #3438

Merged
merged 9 commits into from
Aug 31, 2023
2 changes: 1 addition & 1 deletion Dockerfile.staging
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20
FROM golang:1.21

ARG chain="polkadot"
ARG basepath="~/.gossamer"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ help: Makefile

.PHONY: lint
lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54
golangci-lint run

clean:
Expand Down
11 changes: 5 additions & 6 deletions dot/network/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ import (
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/core/peerstore"
"github.com/libp2p/go-libp2p/core/protocol"
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoreds"
mempstore "github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem"
rm "github.com/libp2p/go-libp2p/p2p/host/resource-manager"
rmObs "github.com/libp2p/go-libp2p/p2p/host/resource-manager/obs"
ma "github.com/multiformats/go-multiaddr"
"github.com/prometheus/client_golang/prometheus"
)
Expand Down Expand Up @@ -176,7 +175,7 @@ func newHost(ctx context.Context, cfg *Config) (*host, error) {
return nil, fmt.Errorf("failed to create libp2p datastore: %w", err)
}

ps, err := pstoreds.NewPeerstore(ctx, ds, pstoreds.DefaultOpts())
ps, err := mempstore.NewPeerstore()
if err != nil {
return nil, fmt.Errorf("failed to create peerstore: %w", err)
}
Expand All @@ -185,8 +184,8 @@ func newHost(ctx context.Context, cfg *Config) (*host, error) {
var managerOptions []rm.Option

if cfg.Metrics.Publish {
rmObs.MustRegisterWith(prometheus.DefaultRegisterer)
reporter, err := rmObs.NewStatsTraceReporter()
rm.MustRegisterWith(prometheus.DefaultRegisterer)
reporter, err := rm.NewStatsTraceReporter()
if err != nil {
return nil, fmt.Errorf("while creating resource manager stats trace reporter: %w", err)
}
Expand All @@ -209,7 +208,7 @@ func newHost(ctx context.Context, cfg *Config) (*host, error) {
libp2p.Peerstore(ps),
libp2p.ConnectionManager(cm),
libp2p.AddrsFactory(func(as []ma.Multiaddr) []ma.Multiaddr {
addrs := []ma.Multiaddr{}
var addrs []ma.Multiaddr
for _, addr := range as {
if !privateIPs.AddrBlocked(addr) {
addrs = append(addrs, addr)
Expand Down
6 changes: 3 additions & 3 deletions dot/network/service_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func TestService_Health(t *testing.T) {
require.Equal(t, false, h.IsSyncing)
}

func TestPersistPeerStore(t *testing.T) {
func TestInMemoryPeerStore(t *testing.T) {
t.Parallel()

nodes := createServiceHelper(t, 2)
Expand All @@ -229,9 +229,9 @@ func TestPersistPeerStore(t *testing.T) {
err = nodeA.Stop()
require.NoError(t, err)

// Since nodeAA uses the persistent peerstore of nodeA, it should be have nodeB in it's peerstore.
// Should be empty since peerstore is kept in memory
nodeAA := createTestService(t, nodeA.cfg)
require.NotEmpty(t, nodeAA.host.p2pHost.Peerstore().PeerInfo(nodeB.host.id()).Addrs)
require.Empty(t, nodeAA.host.p2pHost.Peerstore().PeerInfo(nodeB.host.id()).Addrs)
}

func TestHandleConn(t *testing.T) {
Expand Down
40 changes: 19 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/ipfs/go-ds-badger2 v0.1.3
github.com/jpillora/ipfilter v1.2.9
github.com/klauspost/compress v1.16.7
github.com/libp2p/go-libp2p v0.27.7
github.com/libp2p/go-libp2p v0.30.0
github.com/libp2p/go-libp2p-kad-dht v0.24.2
github.com/minio/sha256-simd v1.0.1
github.com/multiformats/go-multiaddr v0.11.0
Expand All @@ -39,7 +39,7 @@ require (
github.com/tetratelabs/wazero v1.1.0
github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9
golang.org/x/crypto v0.12.0
golang.org/x/exp v0.0.0-20230810033253-352e893a4cad
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63
golang.org/x/term v0.11.0
google.golang.org/protobuf v1.31.0
)
Expand Down Expand Up @@ -86,12 +86,13 @@ require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 // indirect
github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b // indirect
github.com/gtank/ristretto255 v0.1.2 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/golang-lru/v2 v2.0.2 // indirect
github.com/hashicorp/golang-lru/arc/v2 v2.0.5 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.5 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/holiman/uint256 v1.2.3 // indirect
github.com/huin/goupnp v1.2.0 // indirect
Expand Down Expand Up @@ -120,16 +121,16 @@ require (
github.com/libp2p/go-libp2p-record v0.2.0 // indirect
github.com/libp2p/go-libp2p-routing-helpers v0.7.0 // indirect
github.com/libp2p/go-msgio v0.3.0 // indirect
github.com/libp2p/go-nat v0.1.0 // indirect
github.com/libp2p/go-nat v0.2.0 // indirect
github.com/libp2p/go-netroute v0.2.1 // indirect
github.com/libp2p/go-reuseport v0.3.0 // indirect
github.com/libp2p/go-yamux/v4 v4.0.0 // indirect
github.com/libp2p/go-reuseport v0.4.0 // indirect
github.com/libp2p/go-yamux/v4 v4.0.1 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/miekg/dns v1.1.54 // indirect
github.com/miekg/dns v1.1.55 // indirect
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b // indirect
Expand All @@ -144,8 +145,8 @@ require (
github.com/multiformats/go-multihash v0.2.3 // indirect
github.com/multiformats/go-multistream v0.4.1 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/onsi/ginkgo/v2 v2.9.7 // indirect
github.com/opencontainers/runtime-spec v1.0.2 // indirect
github.com/onsi/ginkgo/v2 v2.11.0 // indirect
github.com/opencontainers/runtime-spec v1.1.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
Expand All @@ -157,9 +158,8 @@ require (
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-19 v0.3.2 // indirect
github.com/quic-go/qtls-go1-20 v0.2.2 // indirect
github.com/quic-go/quic-go v0.33.0 // indirect
github.com/quic-go/qtls-go1-20 v0.3.3 // indirect
github.com/quic-go/quic-go v0.38.1 // indirect
github.com/quic-go/webtransport-go v0.5.3 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
Expand All @@ -182,25 +182,23 @@ require (
go.opentelemetry.io/otel v1.16.0 // indirect
go.opentelemetry.io/otel/metric v1.16.0 // indirect
go.opentelemetry.io/otel/trace v1.16.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/dig v1.17.0 // indirect
go.uber.org/fx v1.19.2 // indirect
go.uber.org/fx v1.20.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/mod v0.11.0 // indirect
golang.org/x/net v0.10.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/tools v0.9.1 // indirect
golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect
gonum.org/v1/gonum v0.13.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
nhooyr.io/websocket v1.8.7 // indirect
)

go 1.20
go 1.21

replace github.com/tetratelabs/wazero => github.com/ChainSafe/wazero v0.0.0-20230710171859-39a4c235ec1f
Loading
Loading