Problem Description I cloned the polkadot-v1.8.0 branch of the Frontier repository and am attempting to build the Substrate chain using Cargo. However, I'm encountering issues with mismatched library versions and Rust toolchain compatibility.
Steps to Reproduce
- git clone --branch polkadot-v1.8.0 https://github.com/polkadot-evm/frontier.git
- Remove the Cargo.lock file Or Add new library e.g,
pallet-insecure-radomness-collective-flip
- Run
cargo build --release
to build the project
Error Details
When I run the build, Cargo fetches the latest version of some dependencies, including scale-codec, which updates to version 3.7.0. However, the Cargo.toml file for the polkadot-v1.8.0
branch specifies a specific version, scale-codec = "3.6.4"
. This version mismatch is causing build issues, as the newer version of scale-codec requires Rust 1.79, while the rust-toolchain.toml file for this branch specifies Rust 1.77.
Error Encountered: When using Rust 1.77 (as specified in the rust-toolchain.toml file), the dependencies are resolved incorrectly (fetching version 3.7.0 instead of 3.6.4). When I manually upgrade to Rust 1.79 (by modifying the rust-toolchain.toml file), I encounter the following error:
error[E0658]: use of unstable library feature 'error_in_core'
The Cargo.toml specifies that the version for scale-codec should be 3.6.4:
scale-codec = { package = "parity-scale-codec", version = "3.6.4", default-features = false, features = ["derive"] }
However, when I build the project, Cargo pulls in version 3.7.0, causing the Rust version mismatch.