1

Frontier(pallet-ethereum) project failed to compile after updating from polkadot-v0.9.17 to v0.9.18

    Compiling polkadot-runtime v0.9.18 (https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c982)
   Compiling kusama-runtime v0.9.18 (https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c982)
   Compiling p-chain-runtime v0.0.1 (/mnt/sda3/polkadot/1pchain/runtime)
    Checking ethereum v0.12.0
error[E0277]: the trait bound `H256: TypeInfo` is not satisfied
   --> /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.rs:10:39
    |
10  |     derive(codec::Encode, codec::Decode, scale_info::TypeInfo)
    |                                          ^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H256`
    |
note: required by a bound in `FieldBuilder::<N>::ty`
   --> /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.1.1/src/build.rs:382:13
    |
382 |         TY: TypeInfo + 'static + ?Sized,
    |             ^^^^^^^^ required by this bound in `FieldBuilder::<N>::ty`
    = note: this error originates in the derive macro `scale_info::TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `H160: TypeInfo` is not satisfied
   --> /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.rs:10:39
    |
10  |     derive(codec::Encode, codec::Decode, scale_info::TypeInfo)
    |                                          ^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H160`
    |
note: required by a bound in `FieldBuilder::<N>::ty`
   --> /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.1.1/src/build.rs:382:13
    |
382 |         TY: TypeInfo + 'static + ?Sized,
    |             ^^^^^^^^ required by this bound in `FieldBuilder::<N>::ty`
    = note: this error originates in the derive macro `scale_info::TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Bloom: TypeInfo` is not satisfied
   --> /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.rs:10:39
    |
10  |     derive(codec::Encode, codec::Decode, scale_info::TypeInfo)
    |                                          ^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `Bloom`
    |
note: required by a bound in `FieldBuilder::<N>::ty`
   --> /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.1.1/src/build.rs:382:13
    |
382 |         TY: TypeInfo + 'static + ?Sized,
    |             ^^^^^^^^ required by this bound in `FieldBuilder::<N>::ty`
    = note: this error originates in the derive macro `scale_info::TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `ethereum_types::U256: TypeInfo` is not satisfied
   --> /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.

My Rust tool-chain

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/user2038/.rustup
installed toolchains
stable-x86_64-unknown-linux-gnu
nightly-2021-09-10-x86_64-unknown-linux-gnu
nightly-2021-11-12-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu
bpf
1.59.0-x86_64-unknown-linux-gnu (default)

active toolchain
1.59.0-x86_64-unknown-linux-gnu (default)
rustc 1.59.0 (9d1b2106e 2022-02-23)

1 Answer 1

2

This looks like mismatching versions. cargo tree -p scale-info will show you.

ethereum-types has very permissive requirements for scale-info, so maybe a cargo update -p scale-info will fix the mismatch.

cargo tree
cargo tree -p scale-info:1.0.0
cargo tree -p scale-info:2.1.1

cargo update -p scale-info
cargo update -p scale-info:2.1.1
cargo update -p scale-info:1.0.0

https://github.com/paritytech/scale-info/issues/153

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.