Skip to content

Commit

Permalink
Merge branch 'master' into uci/copy-templates
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh authored Aug 18, 2023
2 parents 64764a1 + a2591e7 commit bd5ebb7
Show file tree
Hide file tree
Showing 79 changed files with 350 additions and 435 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
go-test:
uses: libp2p/uci/.github/workflows/[email protected]
with:
go-versions: '["1.19.x", "1.20.x"]'
go-versions: '["1.20.x", "1.21.x"]'
3 changes: 1 addition & 2 deletions core/crypto/ecdsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import (

pb "github.com/libp2p/go-libp2p/core/crypto/pb"
"github.com/libp2p/go-libp2p/core/internal/catch"

"github.com/minio/sha256-simd"
"github.com/libp2p/go-libp2p/internal/sha256"
)

// ECDSAPrivateKey is an implementation of an ECDSA private key
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import (
. "github.com/libp2p/go-libp2p/core/crypto"
pb "github.com/libp2p/go-libp2p/core/crypto/pb"
"github.com/libp2p/go-libp2p/core/test"
"github.com/libp2p/go-libp2p/internal/sha256"

"github.com/decred/dcrd/dcrec/secp256k1/v4"
secp256k1ecdsa "github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
"github.com/minio/sha256-simd"
)

func TestKeys(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions core/crypto/rsa_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import (

pb "github.com/libp2p/go-libp2p/core/crypto/pb"
"github.com/libp2p/go-libp2p/core/internal/catch"

"github.com/minio/sha256-simd"
"github.com/libp2p/go-libp2p/internal/sha256"
)

// RsaPrivateKey is a rsa private key
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/secp256k1.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/decred/dcrd/dcrec/secp256k1/v4"
"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
"github.com/minio/sha256-simd"
"github.com/libp2p/go-libp2p/internal/sha256"
)

// Secp256k1PrivateKey is a Secp256k1 private key
Expand Down
2 changes: 2 additions & 0 deletions examples/chat-with-mdns/flags.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/chat-with-mdns/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/chat-with-mdns/mdns.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/chat-with-rendezvous/chat.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/chat-with-rendezvous/flags.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/chat/chat.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

/*
*
* The MIT License (MIT)
Expand Down
2 changes: 2 additions & 0 deletions examples/chat/chat_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/echo/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/echo/main_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
8 changes: 8 additions & 0 deletions examples/go_121_workaround_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build go1.21

package main

import "testing"

// Needed so that we run at least one test in Go 1.21 so that our go test command exits successfully
func TestNothing(t *testing.T) {}
2 changes: 2 additions & 0 deletions examples/http-proxy/proxy.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/01-Transports/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/02-Multiaddrs/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/03-Muxing-Encryption/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/05-Discovery/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/05-Discovery/protocol.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/06-Pubsub/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/06-Pubsub/protocol.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/07-Messaging/chat.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/07-Messaging/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/07-Messaging/protocol.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/07-Messaging/pubsub.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/08-End/chat.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/08-End/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/08-End/protocol.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/08-End/pubsub.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
8 changes: 8 additions & 0 deletions examples/ipfs-camp-2019/go_121_workaround_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build go1.21

package main

import "testing"

// Needed so that we run at least one test in Go 1.21 so that our go test command exits successfully
func TestNothing(t *testing.T) {}
2 changes: 2 additions & 0 deletions examples/libp2p-host/host.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/libp2p-host/host_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/metrics-and-dashboards/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/multipro/echo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/multipro/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/multipro/main_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/multipro/node.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/multipro/pb/p2p.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions examples/multipro/ping.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build go1.21

package main

import "testing"

// Needed so that we run at least one test in Go 1.21 so that our go test command exits successfully
func TestNothing(t *testing.T) {}
2 changes: 2 additions & 0 deletions examples/pubsub/basic-chat-with-rendezvous/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/pubsub/chat/chatroom.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
8 changes: 8 additions & 0 deletions examples/pubsub/chat/go_121_workaround_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build go1.21

package main

import "testing"

// Needed so that we run at least one test in Go 1.21 so that our go test command exits successfully
func TestNothing(t *testing.T) {}
2 changes: 2 additions & 0 deletions examples/pubsub/chat/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/pubsub/chat/ui.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/relay/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/relay/main_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/routed-echo/bootstrap.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/routed-echo/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/testutils/logharness.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package testutils

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/testutils/net.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package testutils

import (
Expand Down
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ require (
github.com/libp2p/go-flow-metrics v0.1.0
github.com/libp2p/go-libp2p-asn-util v0.3.0
github.com/libp2p/go-libp2p-testing v0.12.0
github.com/libp2p/go-mplex v0.7.0
github.com/libp2p/go-msgio v0.3.0
github.com/libp2p/go-nat v0.2.0
github.com/libp2p/go-netroute v0.2.1
Expand All @@ -48,7 +47,7 @@ require (
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.4.0
github.com/quic-go/quic-go v0.36.3
github.com/quic-go/quic-go v0.37.5
github.com/quic-go/webtransport-go v0.5.3
github.com/raulk/go-watchdog v1.3.0
github.com/stretchr/testify v1.8.4
Expand Down Expand Up @@ -103,8 +102,7 @@ require (
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-19 v0.3.3 // indirect
github.com/quic-go/qtls-go1-20 v0.2.3 // indirect
github.com/quic-go/qtls-go1-20 v0.3.1 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/syndtr/goleveldb v1.0.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
Expand Down
12 changes: 4 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,6 @@ github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLE
github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w=
github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA=
github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg=
github.com/libp2p/go-mplex v0.7.0 h1:BDhFZdlk5tbr0oyFq/xv/NPGfjbnrsDam1EvutpBDbY=
github.com/libp2p/go-mplex v0.7.0/go.mod h1:rW8ThnRcYWft/Jb2jeORBmPd6xuG3dGxWN/W168L9EU=
github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0=
github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM=
github.com/libp2p/go-nat v0.2.0 h1:Tyz+bUFAYqGyJ/ppPPymMGbIgNRH+WqC5QrT5fKrrGk=
Expand Down Expand Up @@ -434,12 +432,10 @@ github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
github.com/quic-go/qtls-go1-19 v0.3.3 h1:wznEHvJwd+2X3PqftRha0SUKmGsnb6dfArMhy9PeJVE=
github.com/quic-go/qtls-go1-19 v0.3.3/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI=
github.com/quic-go/qtls-go1-20 v0.2.3 h1:m575dovXn1y2ATOb1XrRFcrv0F+EQmlowTkoraNkDPI=
github.com/quic-go/qtls-go1-20 v0.2.3/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM=
github.com/quic-go/quic-go v0.36.3 h1:f+yOqeGhMoRX7/M3wmEw/djhzKWr15FtQysox85/834=
github.com/quic-go/quic-go v0.36.3/go.mod h1:qxQumdeKw5GmWs1OsTZZnOxzSI+RJWuhf1O8FN35L2o=
github.com/quic-go/qtls-go1-20 v0.3.1 h1:O4BLOM3hwfVF3AcktIylQXyl7Yi2iBNVy5QsV+ySxbg=
github.com/quic-go/qtls-go1-20 v0.3.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k=
github.com/quic-go/quic-go v0.37.5 h1:pzkYe8AgaxHi+7KJrYBMF+u2rLO5a9kwyCp2dAsljzk=
github.com/quic-go/quic-go v0.37.5/go.mod h1:YsbH1r4mSHPJcLF4k4zruUkLBqctEMBDR6VPvcYjIsU=
github.com/quic-go/webtransport-go v0.5.3 h1:5XMlzemqB4qmOlgIus5zB45AcZ2kCgCy2EptUrfOPWU=
github.com/quic-go/webtransport-go v0.5.3/go.mod h1:OhmmgJIzTTqXK5xvtuX0oBpLV2GkLWNDA+UeTGJXErU=
github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk=
Expand Down
Loading

0 comments on commit bd5ebb7

Please sign in to comment.