Possible interoperability problem with js-libp2p (WS transport)
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 366
- Forks
- 85
- Avg merge
- 2d 39m
- Merged PRs (30d)
- 6
Description
I stumbled across a possible interoperability problem with js-libp2p.
While playing around with a browser instance of js-libp2p, I tried to ping my jvm-libp2p instance over WS transport.
The JS version uses the multiaddress including the p2p protocol prefix and the peer id to call other peers.
This is not the case for the JVM version.
Since I see no possibility to set the peer id of the node in the host builder, I used the following multiaddress for listening on the JVM side:
/ip4/127.0.0.1/tcp/PORT/ws/
Where PORT is my port.
It seems like the WebSocket is opened at ws://127.0.0.1:PORT/
The call ws://127.0.0.1:PORT/p2p/PEER_ID leads to nowhere.
The JS version calls the URL above if the following multiaddress is given:
/ip4/127.0.0.1/tcp/PORT/ws/ipfs/PEER_ID
Am I doing something wrong or is there a fix for this problem?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the interoperability case using the JVM listener address and the JS multiaddresses shown in the issue, comparing the WebSocket paths with and without the peer ID. Trace the JVM WebSocket transport's handling of the /p2p/PEER_ID path and peer identity configuration. Done means the JVM endpoint interoperates with the JS address format, or the incompatibility is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, kotlin
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100