-
Notifications
You must be signed in to change notification settings - Fork 48
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
fix: do not write tcp port 0 and remove 100 chars length limit for multiaddresses #1129
Conversation
Jenkins BuildsClick to see older builds (5)
|
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.
Looks like tests and compilation is failing, that needs fixing
@chaitanyaprem I fixed a race codnition in this PR that is probably affecting your other open PR. You can cherry pick that commit if needed to get past CI. |
edeae3d
to
22a0c73
Compare
22a0c73
to
e04b052
Compare
I was also wondering why i am getting a lot of NO_RESERVATION errors when i try to connect via circuit-relay. Could it be possible that nodes announcing circuit-relay addresses via a peer are not reserving themselves with the peer?
I don't see the use of reserve function in go-waku anywhere. Is my understanding correct @richard-ramos or am i missing something? |
It's because the reservation process is handled by Autorelay in https://github.com/libp2p/go-libp2p/blob/6cebdd88366696a19b61dc209768c932a8f1ec4b/p2p/host/autorelay/relay_finder.go#L610 which in go-waku is setup here: https://github.com/waku-org/go-waku/blob/master/waku/v2/node/wakunode2.go#L217-L242 In the example from go-libp2p Autorelay is not used, I guess to ilustrate what's the process to follow to use circuit relay manually. |
Got it, makes sense. But in that case i am wondering why connectivity fails with NO_RESERVATION error towards peers that advertise circuit-relay. Will require more testing to understand. Hopefully the peer address reported in ENR and circuit-relay reservation are always in sync. |
We have to test, but I'm thinking the problem is that the escenario we are seeing is the following:
|
True that is also possible. |
e04b052
to
192991c
Compare
@chaitanyaprem I fixed the issues and got green lights in the CI. |
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.
Tested this locally and ENR generated doesn't fail to decode and doesn't include address with port 0.
Only minor thing we can probably improve is to not fill private IP address in ENR if present. It is not a major issue though as long as we include other addresses as part of Waku Multiaddrs field.
The reason why i removed the condition of checking for the length of the multiaddress is that we can just let the error handling determine whether writing to the enr was succesful or not.