I am trying to modify the chat-with-rendezvous example to use quic transport by borrowing some code from the server example. The combined changes:
...
priv, _, err := ic.GenerateECDSAKeyPair(rand.Reader)
if err != nil {
return nil, err
}
t, err := libp2pquic.NewTransport(priv, nil, nil, nil)
return t, err
// libp2p.New constructs a new libp2p Host. Other options can be added
// here.
host, err := libp2p.New(libp2p.ListenAddrs([]multiaddr.Multiaddr(config.ListenAddresses)...), libp2p.Transport(quicTransport))
if err != nil {
panic(err)
}
...
Running it:
term 1:
kmulvey@deepthought: chat-with-rendezvous (main)> go run *.go -rendezvous uvhcfUak036mLJDb7LVn -listen /ip4/127.0.0.1/udp/6666/quic
2022-05-20T11:31:48.003-0600 INFO rendezvous chat-with-rendezvous/chat.go:123 Host created. We are:QmNndqYhB6HSmUHbofiTMLprnSgR6WLLhDBYqnLRDwKuf3
2022-05-20T11:31:48.003-0600 INFO rendezvous chat-with-rendezvous/chat.go:124 [/ip4/127.0.0.1/udp/6666/quic]
2022-05-20T11:31:48.004-0600 WARN rendezvous chat-with-rendezvous/chat.go:156 no good addresses
2022-05-20T11:31:48.004-0600 WARN dht/RtRefreshManager rtrefresh/rt_refresh_manager.go:136 failed when refreshing routing table2 errors occurred:
* failed to query for self, err=failed to find any peer in table
* failed to refresh cpl=0, err=failed to find any peer in table
2022-05-20T11:31:48.009-0600 WARN dht/RtRefreshManager rtrefresh/rt_refresh_manager.go:199 failed when refreshing routing table {"error": "2 errors occurred:\n\t* failed to query for self, err=failed to find any peer in table\n\t* failed to refresh cpl=0, err=failed to find any peer in table\n\n"}
2022-05-20T11:31:48.162-0600 INFO rendezvous chat-with-rendezvous/chat.go:158 Connection established with bootstrap node:{QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa: [/dnsaddr/bootstrap.libp2p.io]}
2022-05-20T11:31:48.190-0600 INFO rendezvous chat-with-rendezvous/chat.go:158 Connection established with bootstrap node:{QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN: [/dnsaddr/bootstrap.libp2p.io]}
2022-05-20T11:31:48.330-0600 INFO rendezvous chat-with-rendezvous/chat.go:158 Connection established with bootstrap node:{QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb: [/dnsaddr/bootstrap.libp2p.io]}
2022-05-20T11:31:48.362-0600 INFO rendezvous chat-with-rendezvous/chat.go:158 Connection established with bootstrap node:{QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt: [/dnsaddr/bootstrap.libp2p.io]}
2022-05-20T11:31:48.362-0600 INFO rendezvous chat-with-rendezvous/chat.go:166 Announcing ourselves...
2022-05-20T11:31:48.566-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:31:48.566-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:31:48.566-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:31:48.566-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:31:48.566-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:31:48.566-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:31:48.567-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:31:48.567-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:31:48.567-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:31:48.567-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:31:48.567-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:31:48.567-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
term 2
kmulvey@deepthought: chat-with-rendezvous (main)> go run *.go -rendezvous uvhcfUak036mLJDb7LVn -listen /ip4/127.0.0.1/udp/6668/quic
2022-05-20T11:32:02.821-0600 INFO rendezvous chat-with-rendezvous/chat.go:123 Host created. We are:QmbWAjohYC53QYXvzPZRWzooWscG3U71ro1dsidTsBBY7x
2022-05-20T11:32:02.821-0600 INFO rendezvous chat-with-rendezvous/chat.go:124 [/ip4/127.0.0.1/udp/6668/quic]
2022-05-20T11:32:02.822-0600 WARN dht/RtRefreshManager rtrefresh/rt_refresh_manager.go:136 failed when refreshing routing table2 errors occurred:
* failed to query for self, err=failed to find any peer in table
* failed to refresh cpl=0, err=failed to find any peer in table
2022-05-20T11:32:02.822-0600 WARN rendezvous chat-with-rendezvous/chat.go:156 no good addresses
2022-05-20T11:32:02.830-0600 WARN dht/RtRefreshManager rtrefresh/rt_refresh_manager.go:199 failed when refreshing routing table {"error": "2 errors occurred:\n\t* failed to query for self, err=failed to find any peer in table\n\t* failed to refresh cpl=0, err=failed to find any peer in table\n\n"}
2022-05-20T11:32:02.926-0600 INFO rendezvous chat-with-rendezvous/chat.go:158 Connection established with bootstrap node:{QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN: [/dnsaddr/bootstrap.libp2p.io]}
2022-05-20T11:32:02.955-0600 INFO rendezvous chat-with-rendezvous/chat.go:158 Connection established with bootstrap node:{QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa: [/dnsaddr/bootstrap.libp2p.io]}
2022-05-20T11:32:03.089-0600 INFO rendezvous chat-with-rendezvous/chat.go:158 Connection established with bootstrap node:{QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb: [/dnsaddr/bootstrap.libp2p.io]}
2022-05-20T11:32:03.136-0600 INFO rendezvous chat-with-rendezvous/chat.go:158 Connection established with bootstrap node:{QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt: [/dnsaddr/bootstrap.libp2p.io]}
2022-05-20T11:32:03.136-0600 INFO rendezvous chat-with-rendezvous/chat.go:166 Announcing ourselves...
2022-05-20T11:32:03.377-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:32:03.377-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:32:03.377-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:32:03.378-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:32:03.378-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:32:03.378-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:32:03.378-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:32:03.378-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:32:03.378-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:32:03.378-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:32:03.378-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
2022-05-20T11:32:03.378-0600 WARN rendezvous chat-with-rendezvous/chat.go:189 Connection failed:no addresses
Nothing happens after this
Thanks in advance for any help