-
Notifications
You must be signed in to change notification settings - Fork 42
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
js-peer: add ability to connect via peerID #210
base: main
Are you sure you want to change the base?
Conversation
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 PR, Neha.
Before a proper review:
- Can you please run prettier on the files you edited in this PR to format changes (I've opened js-peer: add prettier for consistent styling #211 to address this). A lot of changes in this PR are code style changes adding unnecessary noise that makes reviewing harder.
- Can you please remove any commented out code that isn't relevant for this.
Roger that! @2color |
Hey, @2color |
Hey, kindly review and provide guidance--
• Connection Handling:
• Transport Protocol Validation:
• Connection Flow:
• UI Improvements:
|
@2color any updates/guidance? |
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.
This is starting to take shape nicely. See comments.
Main points:
- Please remove redundant logic that's already in js-libp2p as explained in https://github.com/libp2p/universal-connectivity/pull/210/files#r1952594020
- Try to keep the new components as UI focused (with as little libp2p specific logic as possible)
- See comment about the libp2p context.
@2color Thanks a bunch for reviewing it. |
…ectivity into connect-via-peerId
…universal-connectivity into connect-via-peerId
Hello there, @2color
https://www.loom.com/share/8d3333d1d316419b8a882e4cb4f648f3?sid=b65f2e97-a290-424a-a0ad-1a6b608965c0 |
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 @Nkovaturient.
I just took a look at this and think we can simplify this further. Instead of adding a new component to connect to PeerIDs, let's repurpose the existing multiaddr
input and also allow PeerIDs there too.
In the handler (what's now called handleConnectToMultiaddr
), you can use heuristics (like inspecting the first char /
) or just try parsing as PeerID and if that fails, try creating a Multiaddr.
Final note, before committing, please run npm run format
.
Sure @2color , that would be an efficient approach, lemme modify it as desired |
Hey @2color , why was the |
Got it, okay 👍 |
@2color , websockets connections are failing to establish connections on Chrome and Edge browser. I have tried refreshing a lot but to no avail ...?? |
@Nkovaturient Are you getting these errors with the latest main branch too? Can you also share the result of https://test-ipv6.com/? I pushed a fix (34b6b35) that may cause be related to this. |
Yeah, I have updated with the main branch yet the same errors. pkg update and fix (34b6b35) seems okay, I have not been able to open the server since the bootstraplistenaddr were removed and replaced by ipv4 and websockets nonetheless the relaylistenaddr |
The latest changes undo the functionality intended to be introduced by this PR |
Issue: #177
Aims:
Description:
1)findByPeerId function aims to find through PeerStore or DHT Lookup
2)DHT response and peerResponse as fallback
Fix needed:
peerInfo response is retrieving a list of mutiaddrs alongwith bootstrap addrs, however on clicking connect thru either of them, an error of
NoValidAddressesError: The dial request has no valid addresses
or"DHT lookup failed"
OUTPUT from PEERINFO obj(mainly thru Known Peer, not DHT)