-
Notifications
You must be signed in to change notification settings - Fork 6
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
WIP Update Libp2p to v0.27.6 #11
WIP Update Libp2p to v0.27.6 #11
Conversation
All chapters refactored to libp2p v0.27.6 |
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.
@prateekreddy awesome work!
I ran the bootstrap code 2.2-finished-code.js
and then ran the code 2.3-finished-code.js
which just dials to the bootstrap. It throws this error:
(node:67986) UnhandledPromiseRejectionWarning: AggregateError:
Error: protocol selection failed
at module.exports (/Users/shresthagrawal/Desktop/study/libp2p/jslibp2p-chat-tutorial/assets/node_modules/multistream-select/src/select.js:50:17)
at async Upgrader._encryptOutbound (/Users/shresthagrawal/Desktop/study/libp2p/jslibp2p-chat-tutorial/assets/node_modules/libp2p/src/upgrader.js:361:36)
at async Upgrader.upgradeOutbound (/Users/shresthagrawal/Desktop/study/libp2p/jslibp2p-chat-tutorial/assets/node_modules/libp2p/src/upgrader.js:168:11)
at async ClassIsWrapper.dial (/Users/shresthagrawal/Desktop/study/libp2p/jslibp2p-chat-tutorial/assets/node_modules/libp2p-tcp/src/index.js:42:18)
at async TransportManager.dial (/Users/shresthagrawal/Desktop/study/libp2p/jslibp2p-chat-tutorial/assets/node_modules/libp2p/src/transport-manager.js:87:14)
at async /Users/shresthagrawal/Desktop/study/libp2p/jslibp2p-chat-tutorial/assets/node_modules/libp2p/src/dialer/dial-request.js:58:18
at async /Users/shresthagrawal/Desktop/study/libp2p/jslibp2p-chat-tutorial/assets/node_modules/p-some/index.js:53:19
at maybeSettle (/Users/shresthagrawal/Desktop/study/libp2p/jslibp2p-chat-tutorial/assets/node_modules/p-some/index.js:31:11)
at /Users/shresthagrawal/Desktop/study/libp2p/jslibp2p-chat-tutorial/assets/node_modules/p-some/index.js:69:23
(node:67986) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:67986) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The error seems to disappear once we add secio in the next chapter. Is the support for plaintext removed in the latest version?
can you check it out why?
Yes looks like encryption is mandatory now. |
Other than the package version issue noted in my above comment, this looks great! |
"it-pipe": "^1.1.0", | ||
"libp2p": "^0.27.6", | ||
"libp2p-bootstrap": "^0.10.4", | ||
"libp2p-gossipsub": "^0.3.0", | ||
"libp2p-kad-dht": "^0.18.6", | ||
"libp2p-mdns": "^0.13.3", | ||
"libp2p-mplex": "^0.9.5", | ||
"libp2p-secio": "^0.12.4", | ||
"libp2p-tcp": "^0.14.4", | ||
"libp2p-webrtc-star": "^0.17.9", | ||
"libp2p-websockets": "^0.13.6", | ||
"multiaddr": "^7.4.3", | ||
"peer-info": "^0.17.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.
pull-mplex
is missing?
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.
Shouldn't need it since it's been replaced by it-pipe
right? I thought pull-mplex
was part of the set of dependencies if you're working with pull-streams.
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.
Nice work, can you check out why does the code 6.2-finished-code.js
doesn't work? the code until chapter 5 works perfectly
Per here, this can be fixed but you have to specify
|
Oops looks like I missed chapter 6 completely. Let me update the code in the chapter as well. |
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.
Add
connEncryption: [Plaintext]
This will resolve the protocol selection failed
error that @shresthagrawal mentioned.
Fired up 2 nodes using the 6.2 finished code and it works great. Thanks for this! |
@shresthagrawal @jjperezaguinaga Hey guys, any chance one of you can give this a final look so we can get it merged? I'd love to have it merged this weekend if possible so we can start merging the content updates in the other PRs. |
No description provided.