-
Notifications
You must be signed in to change notification settings - Fork 25
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
chore: downgrade peer-id to the same version used by libp2p #26
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.
LGTM!
Just left a minor comment, and I will merge and release this once the dependants are release
@@ -183,7 +186,7 @@ const embedPublicKey = async (publicKey, entry) => { | |||
*/ | |||
const extractPublicKey = (peerId, entry) => { | |||
if (!entry || !peerId) { | |||
const error = 'one or more of the provided parameters are not defined' | |||
const error = new Error('one or more of the provided parameters are not defined') |
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.
Should we do the new Error
only on throw?
Same applies on another case below
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.
There won't be a stack trace in the logs if we just log the message.
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.
I usually prefer to have clean logs and with the ERR CODE find and replicate the issue. But, I understand your point 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.
If there's only one place in the entire codebase a certain error code is emitted, and it's also only invoked from one place in the entire codebase I'd agree, but that's rarely the case so more verbose logs can only help.
This is to ensure you can dial other peers on the network, otherwise libp2p doesn't think peer-ids are peer-ids.
ce98789
to
9cf3110
Compare
Needed to upgrade
ipfs
to the latestlibp2p
, otherwise you end up with multiple versions ofpeer-id
in the dependency tree and then libp2p thinks peer-ids are not peer-ids and can't dial anything.Depends on libp2p/js-libp2p-crypto#158