0

I was trying to add Frontier as a dependency of my parachain(Substrate Cumulus based) project...

$ cargo build -r       
    Updating git repository `https://github.com/PNetwork/frontier`
    Updating git repository `https://github.com/paritytech/frontier`
    Updating crates.io index
error: failed to select a version for `parity-db`.
    ... required by package `fc-db v2.0.0-dev (https://github.com/PNetwork/frontier?branch=patch3-polkadot-v0.9.25#2e4daa4e)`
    ... which satisfies git dependency `fc-db` of package `fc-cli v1.0.0-dev (https://github.com/PNetwork/frontier?branch=patch3-polkadot-v0.9.25#2e4daa4e)`
    ... which satisfies git dependency `fc-cli` of package `parachain-template-node v0.1.0 (/mnt/sda3/polkadot/substrate-parachain-template-evm/node)`
versions that meet the requirements `^0.3.14` are: 0.3.16, 0.3.15, 0.3.14

all possible versions conflict with previously selected packages.

  previously selected package `parity-db v0.3.13`
    ... which satisfies dependency `parity-db = "^0.3.13"` (locked to 0.3.13) of package `polkadot-node-subsystem-util v0.9.25 (https://github.com/paritytech/polkadot?branch=release-v0.9.25#5174e9ae)`
    ... which satisfies git dependency `polkadot-node-subsystem-util` (locked to 0.9.25) of package `polkadot-approval-distribution v0.9.25 (https://github.com/paritytech/polkadot?branch=release-v0.9.25#5174e9ae)`
    ... which satisfies git dependency `polkadot-approval-distribution` (locked to 0.9.25) of package `polkadot-service v0.9.25 (https://github.com/paritytech/polkadot?branch=release-v0.9.25#5174e9ae)`
    ... which satisfies git dependency `polkadot-service` (locked to 0.9.25) of package `cumulus-relay-chain-inprocess-interface v0.1.0 (https://github.com/paritytech/cumulus?branch=polkadot-v0.9.25#390042a0)`
    ... which satisfies git dependency `cumulus-relay-chain-inprocess-interface` (locked to 0.1.0) of package `parachain-template-node v0.1.0 (/mnt/sda3/polkadot/substrate-parachain-template-evm/node)`

failed to select a version for `parity-db` which could resolve this conflict

I was using https://github.com/PNetwork/frontier repo to replace https://github.com/paritytech/frontier because I need to change the Frontier repo's substrate version to polkadot-v0.9.25, which is the same substrate version in my parachain.

My project/node/Cargo.toml

# Frontier
fc-cli = { git = "https://github.com/paritytech/frontier", branch = "master" }
fc-consensus = { git = "https://github.com/paritytech/frontier", branch = "master" }
fc-db = { git = "https://github.com/paritytech/frontier", branch = "master" }
fc-mapping-sync = { git = "https://github.com/paritytech/frontier", branch = "master" }
fc-rpc = { git = "https://github.com/paritytech/frontier", branch = "master" }
fc-rpc-core = { git = "https://github.com/paritytech/frontier", branch = "master" }
fp-consensus = { git = "https://github.com/paritytech/frontier", branch = "master" }
fp-dynamic-fee = { git = "https://github.com/paritytech/frontier", branch = "master" }
fp-evm = { git = "https://github.com/paritytech/frontier", branch = "master" }
fp-rpc = { git = "https://github.com/paritytech/frontier", branch = "master" }
fp-storage = { git = "https://github.com/paritytech/frontier", branch = "master" }

# Cumulus
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }
cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.25" }

then I tried to fix this parity-db version:

cargo update -p parity-db --precise 0.3.14

then it became error: failed to select a version for tokio then I tried to fix it:

cargo update -p tokio --precise 1.19.2

then it went back to error: failed to select a version for parity-db

I cannot change the dependency at https://github.com/PNetwork/frontier, so I think I need to somehow specify the version of cumulus-relay-chain-inprocess-interface. Right?

How can I do that so the parity-db is somehow pumped up in version?

1 Answer 1

1

Check Updating Dependency for ORML.


And this is what we do https://github.com/darwinia-network/darwinia/blob/main/runtime/darwinia/Cargo.toml.

Lock all the different repositories' Substrate to a single version darwinia-v0.12.3.

In your code, that master branch not always matches polkadot-v0.9.25.

1
  • Thank you. I was also patching dependencies and use other project's Cargo.lock... After removing target folder and Cargo.lock for file regeneration, it works
    – Russo
    Aug 5, 2022 at 10:26

Your Answer

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

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