diff --git a/go-libp2p-blossomsub/comm.go b/go-libp2p-blossomsub/comm.go index b5d37e8..578956e 100644 --- a/go-libp2p-blossomsub/comm.go +++ b/go-libp2p-blossomsub/comm.go @@ -3,7 +3,6 @@ package blossomsub import ( "context" "encoding/binary" - "fmt" "io" "net" "time" @@ -12,8 +11,6 @@ import ( "github.com/multiformats/go-multiaddr" mn "github.com/multiformats/go-multiaddr/net" "github.com/multiformats/go-varint" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" "google.golang.org/protobuf/proto" "github.com/libp2p/go-libp2p/core/network" @@ -167,29 +164,6 @@ func (p *PubSub) handleNewPeer(ctx context.Context, pid peer.ID, outgoing <-chan if isTCP { c, err := net.Dial("tcp", addr) - if err != nil { - s.Close() - fmt.Println("peer unreachable: ", err, pid) - - select { - case p.newPeerError <- pid: - case <-ctx.Done(): - } - - return - } - c.Close() - } else if isQUIC { - c, err := grpc.Dial( - addr, - grpc.WithTransportCredentials( - insecure.NewCredentials(), - ), - grpc.WithDefaultCallOptions( - grpc.MaxCallSendMsgSize(10*1024*1024), - grpc.MaxCallRecvMsgSize(10*1024*1024), - ), - ) if err != nil { s.Close() log.Debug("peer unreachable: ", err, pid) @@ -202,17 +176,9 @@ func (p *PubSub) handleNewPeer(ctx context.Context, pid peer.ID, outgoing <-chan return } c.Close() - } else { - s.Close() - log.Debug("peer unreachable: ", pid) - - select { - case p.newPeerError <- pid: - case <-ctx.Done(): - } - - return - } + } else if isQUIC { + // skip test for QUIC + } // Other options include relays, don't bother those go p.handleSendingMessages(ctx, s, outgoing) go p.handlePeerDead(s) diff --git a/go-libp2p/p2p/protocol/identify/obsaddr.go b/go-libp2p/p2p/protocol/identify/obsaddr.go index acc8b17..6bfbc15 100644 --- a/go-libp2p/p2p/protocol/identify/obsaddr.go +++ b/go-libp2p/p2p/protocol/identify/obsaddr.go @@ -19,7 +19,7 @@ import ( // can be contacted on. The "seen" events expire by default after 40 minutes // (OwnObservedAddressTTL * ActivationThreshold). The are cleaned up during // the GC rounds set by GCInterval. -var ActivationThresh = 4 +var ActivationThresh = 1 // observedAddrManagerWorkerChannelSize defines how many addresses can be enqueued // for adding to an ObservedAddrManager. diff --git a/node/config/config.go b/node/config/config.go index e28d2d3..f6515b7 100644 --- a/node/config/config.go +++ b/node/config/config.go @@ -63,7 +63,7 @@ var BootstrapPeers = []string{ "/ip4/70.36.102.32/udp/8336/quic-v1/p2p/QmYriGRXCUiwFodqSoS4GgEcD7UVyxXPeCgQKmYne3iLSF", "/ip4/204.12.220.2/udp/8336/quic-v1/p2p/QmRw5Tw4p5v2vLPvVSAkQEiRPQGnWk9HM4xiSvgxF82CCw", "/ip4/209.159.149.14/udp/8336/quic-v1/p2p/Qmcq4Lmw45tbodvdRWZ8iGgy3rUcR3dikHTj1fBXP8VJqv", - "/dns/bravo-1.qcommander.sh/udp/8336/quic-v1/p2p/QmWFK1gVuhEqZdr8phTo3QbyLwjYmyivx31Zubqt7oR4XB", + "/dns/bravo-1.qcommander.sh/udp/8336/quic-v1/p2p/QmURj4qEB9vNdCCKzSMq4ESEgz13nJrqazgMdGi2DBSeeC", "/ip4/109.199.100.108/udp/8336/quic-v1/p2p/Qma9fgugQc17MDu4YRSvnhfhVre6AYZ3nZdW8dSUYbsWvm", "/ip4/47.251.49.193/udp/8336/quic-v1/p2p/QmP6ADPmMCsB8y82oFbrKTrwYWXt1CTMJ3jGNDXRHyYJgR", "/ip4/138.201.203.208/udp/8336/quic-v1/p2p/QmbNhSTd4Y64ZCbV2gAXYR4ZFDdfRBMfrgWsNg99JHxsJo",