remove quic test, update bootstrap list, obsaddr = 1

This commit is contained in:
Cassandra Heart 2024-10-18 16:39:28 -05:00
parent 2e71938eca
commit 1d493f96d7
No known key found for this signature in database
GPG Key ID: 6352152859385958
3 changed files with 5 additions and 39 deletions

View File

@ -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)

View File

@ -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.

View File

@ -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",