0

While I am trying to write code for implementing pow algorithm in Substrate I have been getting some version issue with sp-core. The error says "failed to select a version for the requirement sp-core = "^4.0.0-dev" candidate versions found which didn't match: 5.0.0" I have tried to change the version multiple times but this error persist on compiling. Can someone point what how to fix this error or guide me where to look for the solution enter image description here

1
  • Try where possible to copy the output into the question rather than pictures so people can search and copy and paste.
    – Squirrel
    Apr 26, 2022 at 20:53

1 Answer 1

2

You are most likely using sp-core = 4.0.0 in your Cargo.toml. The version has become outdated, the current is 6.0.0 (https://github.com/paritytech/substrate/blob/master/primitives/core/Cargo.toml)

If you are not directly using it, check your Cargo.lock to see which crate is importing sp-core and update that crate. A good starting point for substrate project is the node template (https://github.com/substrate-developer-hub/substrate-node-template)

1
  • Thanks for answering. After your answer I found that somehow the repo I cloned was slightly old version. I used the one you shared and this problem got fixed. Apr 29, 2022 at 11:06

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.