-
Notifications
You must be signed in to change notification settings - Fork 0
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
New libp2p versions #42
Conversation
iulianpascalau
commented
Jun 7, 2023
•
edited
Loading
edited
- updated libp2p libraries to the following versions & golang v1.20.3 compiler accommodations:
libp2p/netMessenger_test.go
Outdated
assert.Equal(t, "/ip4/127.0.0.1/tcp/100", addresses[0]) | ||
assert.Nil(t, err) | ||
}) | ||
t.Run("without port reuse, should work", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t.Run("without port reuse, should work", func(t *testing.T) { | |
t.Run("with port reuse, should work", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
require.Nil(t, err) | ||
addressToConnect = getAddressMatching(seeder.Addresses(), "/quic-v1/", "") | ||
err = webTransportPeer.ConnectToPeer(addressToConnect) | ||
fmt.Println(webTransportPeer.ID().Pretty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed or debug purpose only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial debug. Removed
|
||
mutMessages.Unlock() | ||
|
||
defer func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove defer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, removed
libp2p/netMessenger.go
Outdated
} | ||
} | ||
|
||
quickAddress := configs.QUICAddress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quickAddress := configs.QUICAddress | |
quicAddress := configs.QUICAddress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
quicPeerArgs := createBaseArgs() | ||
quicPeerArgs.P2pConfig.Node.Transports = config.TransportConfig{ | ||
QUICAddress: "/ip4/127.0.0.1/udp/%d/quic", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Hi, I discovered this PR from this tweet
It is awesome to see QUIC and WebTransport being added!
A drive-by suggestion I have is to use quic-v1
for QUIC multiaddresses. /quic/
is the draft-29 version of the address and go-libp2p is planning on removing support for it in the next release libp2p/go-libp2p#2369
So it would make sense for any new QUIC deployment to use quic-v1
right away
Also, you are already using quic-v1
for your WebTransport addresses; using it in both places would enable inferring WebTransport listen addrs from observation (via Identify) of quic-v1 addrs libp2p/go-libp2p#2251
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads-up!
Will change the mutiaddress to use quic-v1
instead of plain quic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done & pushed
- removed unnecessary replace in go.mod
libp2p/peersOnChannel.go
Outdated
@@ -102,6 +103,9 @@ func (poc *peersOnChannel) refreshPeersOnAllKnownTopics(ctx context.Context) { | |||
case <-time.After(poc.refreshInterval): | |||
} | |||
|
|||
//TODO remove this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the TODO meant to be done in a future PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rechecking all PR
- removed TODOs
.github/workflows/pr-tests.yml
Outdated
@@ -11,10 +11,10 @@ jobs: | |||
name: Unit tests without race detector | |||
runs-on: ubuntu-latest | |||
steps: | |||
- name: Set up Go 1.17.6 | |||
- name: Set up Go 1.20.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe update to 1.20.5, latest stable.
Also all workflows should be updated.
libp2p/netMessenger.go
Outdated
@@ -37,7 +41,7 @@ import ( | |||
|
|||
const ( | |||
// TestListenAddrWithIp4AndTcp defines the local host listening ip v.4 address and TCP used in testing | |||
TestListenAddrWithIp4AndTcp = "/ip4/127.0.0.1/tcp/" | |||
TestListenAddrWithIp4AndTcp = "/ip4/127.0.0.1/tcp/%d" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this be moved to a test file?
38ba79c