I am trying to upgrade my parachain node from v1.12.0
to v1.13.0
using psvm but it does not compile successfully due to some mismatch conversion error of libp2p
. I believe this PR must cause that issue but not sure how to fix it. https://github.com/paritytech/polkadot-sdk/pull/4198
error[E0277]: the trait bound `sc_network_types::PeerId: From<libp2p::PeerId>` is not satisfied
--> /Users/chungquantin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sc-network-0.41.0/src/service.rs:1593:51
|
1593 | self.peer_store_handle.add_known_peer(peer_id.into());
| ^^^^ the trait `From<libp2p::PeerId>` is not implemented for `sc_network_types::PeerId`, which is required by `libp2p::PeerId: Into<_>`
|
= help: the following other types implement trait `From<T>`:
<sc_network_types::PeerId as From<libp2p_identity::peer_id::PeerId>>
<sc_network_types::PeerId as From<litep2p::peer_id::PeerId>>
<sc_network_types::PeerId as From<&libp2p_identity::peer_id::PeerId>>
<sc_network_types::PeerId as From<&litep2p::peer_id::PeerId>>
= note: required for `libp2p::PeerId` to implement `Into<sc_network_types::PeerId>`
error[E0277]: the trait bound `sc_network_types::PeerId: From<libp2p::PeerId>` is not satisfied
--> /Users/chungquantin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sc-network-0.41.0/src/service.rs:1596:51
|
1596 | self.peer_store_handle.add_known_peer(peer_id.into());
| ^^^^ the trait `From<libp2p::PeerId>` is not implemented for `sc_network_types::PeerId`, which is required by `libp2p::PeerId: Into<_>`
|
= help: the following other types implement trait `From<T>`:
<sc_network_types::PeerId as From<libp2p_identity::peer_id::PeerId>>
<sc_network_types::PeerId as From<litep2p::peer_id::PeerId>>
<sc_network_types::PeerId as From<&libp2p_identity::peer_id::PeerId>>
<sc_network_types::PeerId as From<&litep2p::peer_id::PeerId>>
= note: required for `libp2p::PeerId` to implement `Into<sc_network_types::PeerId>`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `sc-network` (lib) due to 106 previous errors
Dependency mismatch error with sc-network-type
After trying to update the crate using command cargo update --precise v0.12.0
, I got the another error with RPC crate.
Use of undeclared crate or module alloc
error[E0433]: failed to resolve: use of undeclared crate or module `alloc`
--> /Users/chungquantin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-benchmarking-35.0.0/src/v1.rs:1738:2
|
1738 | / sp_runtime::format_runtime_string!(
1739 | | "\n* Pallet: {}\n\
1740 | | * Benchmark: {}\n\
1741 | | * Components: {:?}\n\
... |
1750 | | error_message,
1751 | | )
| |_____^ use of undeclared crate or module `alloc`