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

Merge upstream #32

Merged
merged 47 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
193eab6
chore: update deps
Stebalien Jul 28, 2021
4a80b37
Merge pull request #257 from libp2p/chore/update-deps
Stebalien Jul 28, 2021
907de78
fix: fix deprecated call
Stebalien Jul 28, 2021
124530a
Merge pull request #258 from libp2p/fix/deprecated
Stebalien Jul 28, 2021
68cf13b
bump go.mod to Go 1.16 and run go fix
web3-bot Aug 17, 2021
71d1bb6
run go mod tidy
web3-bot Aug 17, 2021
897cc23
run gofmt -s
web3-bot Aug 17, 2021
9e91c1c
update .github/workflows/automerge.yml
web3-bot Aug 17, 2021
ec5520d
update .github/workflows/go-test.yml
web3-bot Aug 17, 2021
fb1babc
update .github/workflows/go-check.yml
web3-bot Aug 17, 2021
c68a598
Merge pull request #260 from libp2p/web3-bot/sync
Stebalien Sep 15, 2021
713737c
sync: update CI config files (#264)
web3-bot Dec 13, 2021
d759e0e
chore: Update .github/workflows/stale.yml [skip ci]
libp2p-mgmt-read-write[bot] Sep 19, 2022
6b8f310
bump go.mod to Go 1.18 and run go fix
web3-bot Jan 16, 2023
0dbad9e
stop using the deprecated io/ioutil package
web3-bot Jan 16, 2023
ec90f99
update .github/workflows/automerge.yml
web3-bot Jan 16, 2023
35b7dcb
update .github/workflows/go-test.yml
web3-bot Jan 16, 2023
fc86950
update .github/workflows/go-check.yml
web3-bot Jan 16, 2023
d77d36d
Merge pull request #265 from libp2p/web3-bot/sync
MarcoPolo Jan 19, 2023
463841b
update go-libp2p version
ckousik Jan 6, 2023
ccc975d
enable relay v2
ckousik Jan 18, 2023
e6d6550
add test for relayv2
ckousik Jan 18, 2023
dccd1f3
Update test/integration_test.go
MarcoPolo Jan 19, 2023
9550eb2
Add workaround for test
MarcoPolo Jan 19, 2023
53a4347
Add workaround for flaky test
MarcoPolo Jan 19, 2023
1cd89d7
Fix static checks
MarcoPolo Jan 19, 2023
a692969
Merge pull request #273 from ckousik/update-libp2p
MarcoPolo Jan 20, 2023
6ff7c29
feat: allow selecting muxer
ckousik Jan 31, 2023
f2c2844
default strictsign
ckousik Jan 31, 2023
8d13b57
revert pubsub api
ckousik Jan 31, 2023
85e032e
remove QUIC flag
ckousik Jan 31, 2023
9b04088
Merge pull request #274 from ckousik/ckousik/muxer-support
MarcoPolo Feb 1, 2023
d8d0ae9
Update version.json
MarcoPolo Feb 1, 2023
59f643c
Merge pull request #275 from libp2p/MarcoPolo-patch-1
MarcoPolo Feb 1, 2023
146967d
fix: allow using transient connections
ckousik Feb 3, 2023
dfcc4da
Merge pull request #276 from ckousik/ckousik/transient
MarcoPolo Feb 6, 2023
1161834
Update to v0.4.1
MarcoPolo Feb 6, 2023
3eb4ea4
Merge pull request #277 from libp2p/MarcoPolo-patch-2
MarcoPolo Feb 6, 2023
b164e56
feat: update go-libp2p to 0.27.1 (#281)
achingbrain May 22, 2023
454e908
sync: update CI config files (#278)
web3-bot Jun 3, 2023
dd87487
deps: update go-libp2p to 0.27.5 (#282)
achingbrain Jun 3, 2023
89021d8
Release v0.5.0 (#284)
achingbrain Jun 3, 2023
a6c0787
chore: Update .github/workflows/stale.yml [skip ci]
web-flow Jun 14, 2023
653b78c
chore: Update .github/workflows/stale.yml [skip ci]
web-flow Jun 28, 2023
d9cb154
chore: delete templates [skip ci] (#286)
web3-bot Aug 13, 2023
84bdf7a
ci: uci/copy-templates (#287)
web3-bot Aug 14, 2023
2b0a35f
Merge branch 'master' of github.com:libp2p/go-libp2p-daemon into libp…
dvmazur Nov 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/go-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,13 @@ jobs:
set -o pipefail
staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g'

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
go-check:
uses: pl-strflt/uci/.github/workflows/[email protected]
19 changes: 19 additions & 0 deletions .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Checker

on:
pull_request_target:
paths: [ 'version.json' ]
types: [ opened, synchronize, reopened, labeled, unlabeled ]
workflow_dispatch:

permissions:
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
release-check:
uses: pl-strflt/uci/.github/workflows/[email protected]
17 changes: 17 additions & 0 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Releaser

on:
push:
paths: [ 'version.json' ]
workflow_dispatch:

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true

jobs:
releaser:
uses: pl-strflt/uci/.github/workflows/[email protected]
13 changes: 13 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Close and mark stale issue

on:
schedule:
- cron: '0 0 * * *'

permissions:
issues: write
pull-requests: write

jobs:
stale:
uses: pl-strflt/.github/.github/workflows/[email protected]
18 changes: 18 additions & 0 deletions .github/workflows/tagpush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tag Push Checker

on:
push:
tags:
- v*

permissions:
contents: read
issues: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
releaser:
uses: pl-strflt/uci/.github/workflows/[email protected]
1 change: 1 addition & 0 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ func (d *Daemon) doStreamOpen(req *pb.Request) (*pb.Response, network.Stream) {
}

log.Debugf("opening stream", "to", pid)
ctx = network.WithUseTransient(ctx, "allow testing over relayed connections")
s, err := d.host.NewStream(ctx, pid, protos...)
if err != nil {
log.Debugw("error opening stream", "to", pid, "error", err)
Expand Down
8 changes: 8 additions & 0 deletions daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/libp2p/go-libp2p/core/protocol"
"github.com/libp2p/go-libp2p/core/routing"
"github.com/libp2p/go-libp2p/p2p/host/resource-manager"
"github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/relay"

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

func (d *Daemon) EnableRelayV2() error {
_, err := relay.New(d.host)
return err
}

func (d *Daemon) EnablePubsub(router string, sign, strict bool) error {
var opts []ps.Option

if !sign {
opts = append(opts, ps.WithMessageSigning(false))
} else if !strict {
opts = append(opts, ps.WithStrictSignatureVerification(false))
} else {
opts = append(opts, ps.WithMessageSignaturePolicy(ps.StrictSign))
}

switch router {
Expand Down
72 changes: 36 additions & 36 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ module github.com/learning-at-home/go-libp2p-daemon
go 1.20

require (
github.com/cenkalti/backoff/v4 v4.2.0
github.com/cenkalti/backoff/v4 v4.2.1
github.com/gogo/protobuf v1.3.2
github.com/google/uuid v1.3.0
github.com/google/uuid v1.4.0
github.com/hashicorp/go-multierror v1.1.1
github.com/ipfs/go-cid v0.4.1
github.com/ipfs/go-log v1.0.5
github.com/libp2p/go-libp2p v0.32.0
github.com/libp2p/go-libp2p-kad-dht v0.25.0
github.com/libp2p/go-libp2p v0.32.1
github.com/libp2p/go-libp2p-kad-dht v0.25.1
github.com/libp2p/go-libp2p-pubsub v0.10.0
github.com/multiformats/go-multiaddr v0.12.0
github.com/multiformats/go-multihash v0.2.3
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_golang v1.17.0
github.com/stretchr/testify v1.8.4
)

Expand All @@ -31,43 +31,43 @@ require (
github.com/elastic/gosigar v0.14.2 // indirect
github.com/flynn/noise v1.0.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.5 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/ipfs/boxo v0.10.0 // indirect
github.com/ipfs/boxo v0.15.0 // indirect
github.com/ipfs/go-datastore v0.6.0 // indirect
github.com/ipfs/go-log/v2 v2.5.1 // indirect
github.com/ipld/go-ipld-prime v0.20.0 // indirect
github.com/ipld/go-ipld-prime v0.21.0 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/jbenet/goprocess v0.1.4 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/klauspost/compress v1.17.3 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/koron/go-ssdp v0.0.4 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-cidranger v1.1.0 // indirect
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
github.com/libp2p/go-libp2p-asn-util v0.3.0 // indirect
github.com/libp2p/go-libp2p-kbucket v0.6.3 // indirect
github.com/libp2p/go-libp2p-record v0.2.0 // indirect
github.com/libp2p/go-libp2p-routing-helpers v0.7.2 // indirect
github.com/libp2p/go-msgio v0.3.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.4.0 // indirect
github.com/libp2p/go-yamux/v4 v4.0.1 // indirect
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/miekg/dns v1.1.56 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/miekg/dns v1.1.57 // indirect
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
Expand All @@ -80,42 +80,42 @@ require (
github.com/multiformats/go-multicodec v0.9.0 // indirect
github.com/multiformats/go-multistream v0.5.0 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/onsi/ginkgo/v2 v2.13.0 // indirect
github.com/onsi/ginkgo/v2 v2.13.1 // 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/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polydawn/refmt v0.89.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-20 v0.3.4 // indirect
github.com/quic-go/quic-go v0.39.3 // indirect
github.com/quic-go/qtls-go1-20 v0.4.1 // indirect
github.com/quic-go/quic-go v0.40.0 // indirect
github.com/quic-go/webtransport-go v0.6.0 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect
go.opencensus.io v0.24.0 // indirect
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.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.uber.org/dig v1.17.1 // indirect
go.uber.org/fx v1.20.1 // indirect
go.uber.org/mock v0.3.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.14.0 // indirect
gonum.org/v1/gonum v0.13.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.15.0 // indirect
gonum.org/v1/gonum v0.14.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
)
Loading
Loading