-
Notifications
You must be signed in to change notification settings - Fork 23
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
Libp2p 0.51 upgrade #46
base: master
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 work! No high-level concerns from the libp2p side.
pub struct BitswapProtocol; | ||
|
||
impl ProtocolName for BitswapProtocol { | ||
fn protocol_name(&self) -> &[u8] { | ||
b"/ipfs-embed/bitswap/1.0.0" | ||
} | ||
fn protocol_name(&self) -> &[u8] { | ||
b"/ipfs-embed/bitswap/1.0.0" | ||
} | ||
} |
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.
With the upcoming release, namely v0.52.0
you can use StreamProtocol
here. See libp2p/rust-libp2p#3746.
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.
While I appreciate the upgrade, please refrain from gratuitous whitespace changes — this codebase uses four-space-indentation.
multihash = { version = "0.17.0", default-features = false, features = ["blake3", "sha2"] } | ||
libipld = { version = "0.16.0", default-features = false, features = ["dag-cbor"] } | ||
libp2p = { version = "0.51.3", features = ["tcp", "noise", "yamux", "rsa", "async-std"] } | ||
multihash = { version = "0.18", default-features = false, features = ["blake3", "sha2"] } |
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.
Note that rust-libp2p still uses multihash v0.17.0. See comment here https://github.com/ipfs-rust/libp2p-bitswap/pull/43/files#r1200305495.
An update to use libp2p 0.51.3, as it is necessary for our recently upgraded project which is based on the latest version. To avoid breaking issues, I have updated the version to 0.26.0, as this may cause compatibility problems for projects depending on/using libp2p 0.50.0.