paritytech / srtool

A fork of chevdor's srtool
MIT License
64 stars 18 forks source link

Consistent Rust Version for benchmarks, development and WASM #41

Closed weichweich closed 2 years ago

weichweich commented 2 years ago

Hi, we want to ensure that we use the same Rust version across all our development processes. So far we could enforce that using the [rust-toolchain.toml](https://github.com/KILTprotocol/mashnet-node/blob/develop/rust-toolchain.toml). But the srtool ignores this file. So what would be the best approach to make sure the same rust version is used throughout the development process? Should be just put in the rust-toolchain.toml what ever is used by the latest srtool release or is there a way to configure the rust version for the srtool?

chevdor commented 2 years ago

The main goal of srtool is to pin a given version is disallow users to pick their own. This is done on purpose. Allowing breaking this defies the idea of using srtool in the first place and all your users would "panic" as their hashes don't match, just because they too want to use the version of their choice. And it would fail as well even if they would use your toolchain.

If you want, for testing purpose, to use a specific version of Rust to build your runtime locally, you should use cargo build ... directly but you should not use that runtime for production (if you care about your users being able to verify the runtime themselves).

I am closing but feel free to re-open as needed.