Skip to content

Commit 3762261

Browse files
Merge pull request #33 from learning-at-home/merge-upstream
Merge upstream
2 parents 7e1cf46 + 2b0a35f commit 3762261

File tree

14 files changed

+300
-120
lines changed

14 files changed

+300
-120
lines changed

.github/workflows/go-check.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,13 @@ jobs:
4848
set -o pipefail
4949
staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g'
5050
51+
permissions:
52+
contents: read
53+
54+
concurrency:
55+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
56+
cancel-in-progress: true
57+
58+
jobs:
59+
go-check:
60+
uses: pl-strflt/uci/.github/workflows/[email protected]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release Checker
2+
3+
on:
4+
pull_request_target:
5+
paths: [ 'version.json' ]
6+
types: [ opened, synchronize, reopened, labeled, unlabeled ]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
release-check:
19+
uses: pl-strflt/uci/.github/workflows/[email protected]

.github/workflows/releaser.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Releaser
2+
3+
on:
4+
push:
5+
paths: [ 'version.json' ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.sha }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
releaser:
17+
uses: pl-strflt/uci/.github/workflows/[email protected]

.github/workflows/stale.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Close and mark stale issue
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
11+
jobs:
12+
stale:
13+
uses: pl-strflt/.github/.github/workflows/[email protected]

.github/workflows/tagpush.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Tag Push Checker
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
permissions:
9+
contents: read
10+
issues: write
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
releaser:
18+
uses: pl-strflt/uci/.github/workflows/[email protected]

conn.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ func (d *Daemon) doStreamOpen(req *pb.Request) (*pb.Response, network.Stream) {
254254
}
255255

256256
log.Debugf("opening stream", "to", pid)
257+
ctx = network.WithUseTransient(ctx, "allow testing over relayed connections")
257258
s, err := d.host.NewStream(ctx, pid, protos...)
258259
if err != nil {
259260
log.Debugw("error opening stream", "to", pid, "error", err)

daemon.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"github.com/libp2p/go-libp2p/core/protocol"
1818
"github.com/libp2p/go-libp2p/core/routing"
1919
"github.com/libp2p/go-libp2p/p2p/host/resource-manager"
20+
"github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/relay"
2021

2122
multierror "github.com/hashicorp/go-multierror"
2223
logging "github.com/ipfs/go-log"
@@ -139,13 +140,20 @@ func (d *Daemon) DHTRoutingFactory(opts []dhtopts.Option) func(host.Host) (routi
139140
return makeRouting
140141
}
141142

143+
func (d *Daemon) EnableRelayV2() error {
144+
_, err := relay.New(d.host)
145+
return err
146+
}
147+
142148
func (d *Daemon) EnablePubsub(router string, sign, strict bool) error {
143149
var opts []ps.Option
144150

145151
if !sign {
146152
opts = append(opts, ps.WithMessageSigning(false))
147153
} else if !strict {
148154
opts = append(opts, ps.WithStrictSignatureVerification(false))
155+
} else {
156+
opts = append(opts, ps.WithMessageSignaturePolicy(ps.StrictSign))
149157
}
150158

151159
switch router {

go.mod

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ module github.com/learning-at-home/go-libp2p-daemon
33
go 1.20
44

55
require (
6-
github.com/cenkalti/backoff/v4 v4.2.0
6+
github.com/cenkalti/backoff/v4 v4.2.1
77
github.com/gogo/protobuf v1.3.2
8-
github.com/google/uuid v1.3.0
8+
github.com/google/uuid v1.4.0
99
github.com/hashicorp/go-multierror v1.1.1
1010
github.com/ipfs/go-cid v0.4.1
1111
github.com/ipfs/go-log v1.0.5
12-
github.com/libp2p/go-libp2p v0.32.0
13-
github.com/libp2p/go-libp2p-kad-dht v0.25.0
12+
github.com/libp2p/go-libp2p v0.32.1
13+
github.com/libp2p/go-libp2p-kad-dht v0.25.1
1414
github.com/libp2p/go-libp2p-pubsub v0.10.0
1515
github.com/multiformats/go-multiaddr v0.12.0
1616
github.com/multiformats/go-multihash v0.2.3
17-
github.com/prometheus/client_golang v1.14.0
17+
github.com/prometheus/client_golang v1.17.0
1818
github.com/stretchr/testify v1.8.4
1919
)
2020

@@ -31,43 +31,43 @@ require (
3131
github.com/elastic/gosigar v0.14.2 // indirect
3232
github.com/flynn/noise v1.0.0 // indirect
3333
github.com/francoispqt/gojay v1.2.13 // indirect
34-
github.com/go-logr/logr v1.2.4 // indirect
34+
github.com/go-logr/logr v1.3.0 // indirect
3535
github.com/go-logr/stdr v1.2.2 // indirect
3636
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
3737
github.com/godbus/dbus/v5 v5.1.0 // indirect
38-
github.com/golang/protobuf v1.5.3 // indirect
3938
github.com/google/gopacket v1.1.19 // indirect
40-
github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b // indirect
41-
github.com/gorilla/websocket v1.5.0 // indirect
39+
github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a // indirect
40+
github.com/gorilla/websocket v1.5.1 // indirect
4241
github.com/hashicorp/errwrap v1.1.0 // indirect
43-
github.com/hashicorp/golang-lru v0.5.4 // indirect
44-
github.com/hashicorp/golang-lru/v2 v2.0.5 // indirect
42+
github.com/hashicorp/golang-lru v1.0.2 // indirect
43+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
4544
github.com/huin/goupnp v1.3.0 // indirect
46-
github.com/ipfs/boxo v0.10.0 // indirect
45+
github.com/ipfs/boxo v0.15.0 // indirect
4746
github.com/ipfs/go-datastore v0.6.0 // indirect
4847
github.com/ipfs/go-log/v2 v2.5.1 // indirect
49-
github.com/ipld/go-ipld-prime v0.20.0 // indirect
48+
github.com/ipld/go-ipld-prime v0.21.0 // indirect
5049
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
5150
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
5251
github.com/jbenet/goprocess v0.1.4 // indirect
53-
github.com/klauspost/compress v1.17.2 // indirect
54-
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
52+
github.com/klauspost/compress v1.17.3 // indirect
53+
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
5554
github.com/koron/go-ssdp v0.0.4 // indirect
5655
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
5756
github.com/libp2p/go-cidranger v1.1.0 // indirect
5857
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
5958
github.com/libp2p/go-libp2p-asn-util v0.3.0 // indirect
6059
github.com/libp2p/go-libp2p-kbucket v0.6.3 // indirect
6160
github.com/libp2p/go-libp2p-record v0.2.0 // indirect
61+
github.com/libp2p/go-libp2p-routing-helpers v0.7.2 // indirect
6262
github.com/libp2p/go-msgio v0.3.0 // indirect
6363
github.com/libp2p/go-nat v0.2.0 // indirect
6464
github.com/libp2p/go-netroute v0.2.1 // indirect
6565
github.com/libp2p/go-reuseport v0.4.0 // indirect
6666
github.com/libp2p/go-yamux/v4 v4.0.1 // indirect
6767
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
6868
github.com/mattn/go-isatty v0.0.20 // indirect
69-
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
70-
github.com/miekg/dns v1.1.56 // indirect
69+
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
70+
github.com/miekg/dns v1.1.57 // indirect
7171
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
7272
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
7373
github.com/minio/sha256-simd v1.0.1 // indirect
@@ -80,42 +80,42 @@ require (
8080
github.com/multiformats/go-multicodec v0.9.0 // indirect
8181
github.com/multiformats/go-multistream v0.5.0 // indirect
8282
github.com/multiformats/go-varint v0.0.7 // indirect
83-
github.com/onsi/ginkgo/v2 v2.13.0 // indirect
83+
github.com/onsi/ginkgo/v2 v2.13.1 // indirect
8484
github.com/opencontainers/runtime-spec v1.1.0 // indirect
8585
github.com/opentracing/opentracing-go v1.2.0 // indirect
8686
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
8787
github.com/pkg/errors v0.9.1 // indirect
8888
github.com/pmezard/go-difflib v1.0.0 // indirect
8989
github.com/polydawn/refmt v0.89.0 // indirect
90-
github.com/prometheus/client_model v0.4.0 // indirect
91-
github.com/prometheus/common v0.42.0 // indirect
92-
github.com/prometheus/procfs v0.9.0 // indirect
90+
github.com/prometheus/client_model v0.5.0 // indirect
91+
github.com/prometheus/common v0.45.0 // indirect
92+
github.com/prometheus/procfs v0.12.0 // indirect
9393
github.com/quic-go/qpack v0.4.0 // indirect
94-
github.com/quic-go/qtls-go1-20 v0.3.4 // indirect
95-
github.com/quic-go/quic-go v0.39.3 // indirect
94+
github.com/quic-go/qtls-go1-20 v0.4.1 // indirect
95+
github.com/quic-go/quic-go v0.40.0 // indirect
9696
github.com/quic-go/webtransport-go v0.6.0 // indirect
9797
github.com/raulk/go-watchdog v1.3.0 // indirect
9898
github.com/spaolacci/murmur3 v1.1.0 // indirect
9999
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect
100100
go.opencensus.io v0.24.0 // indirect
101-
go.opentelemetry.io/otel v1.16.0 // indirect
102-
go.opentelemetry.io/otel/metric v1.16.0 // indirect
103-
go.opentelemetry.io/otel/trace v1.16.0 // indirect
101+
go.opentelemetry.io/otel v1.21.0 // indirect
102+
go.opentelemetry.io/otel/metric v1.21.0 // indirect
103+
go.opentelemetry.io/otel/trace v1.21.0 // indirect
104104
go.uber.org/dig v1.17.1 // indirect
105105
go.uber.org/fx v1.20.1 // indirect
106106
go.uber.org/mock v0.3.0 // indirect
107107
go.uber.org/multierr v1.11.0 // indirect
108108
go.uber.org/zap v1.26.0 // indirect
109-
golang.org/x/crypto v0.14.0 // indirect
110-
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
111-
golang.org/x/mod v0.13.0 // indirect
112-
golang.org/x/net v0.17.0 // indirect
113-
golang.org/x/sync v0.4.0 // indirect
114-
golang.org/x/sys v0.13.0 // indirect
115-
golang.org/x/text v0.13.0 // indirect
116-
golang.org/x/tools v0.14.0 // indirect
117-
gonum.org/v1/gonum v0.13.0 // indirect
118-
google.golang.org/protobuf v1.30.0 // indirect
109+
golang.org/x/crypto v0.15.0 // indirect
110+
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
111+
golang.org/x/mod v0.14.0 // indirect
112+
golang.org/x/net v0.18.0 // indirect
113+
golang.org/x/sync v0.5.0 // indirect
114+
golang.org/x/sys v0.14.0 // indirect
115+
golang.org/x/text v0.14.0 // indirect
116+
golang.org/x/tools v0.15.0 // indirect
117+
gonum.org/v1/gonum v0.14.0 // indirect
118+
google.golang.org/protobuf v1.31.0 // indirect
119119
gopkg.in/yaml.v3 v3.0.1 // indirect
120120
lukechampine.com/blake3 v1.2.1 // indirect
121121
)

0 commit comments

Comments
 (0)