Skip to content
Snippets Groups Projects

update srtool build instructions

Merged Hugo Trentesaux requested to merge hugo-runtime-801-instructions into master
1 unresolved thread
1 file
+ 7
2
Compare changes
  • Side-by-side
  • Inline
@@ -2,14 +2,18 @@
@@ -2,14 +2,18 @@
When voting for a runtime upgrade, you should check that the proposed hash actually corresponds to the published code you reviewed. Otherwise, a malicious runtime upgrade could be advertised as a legitimate one.
When voting for a runtime upgrade, you should check that the proposed hash actually corresponds to the published code you reviewed. Otherwise, a malicious runtime upgrade could be advertised as a legitimate one.
```docker
```sh
 
mkdir runtime/gdev/target
 
chmod o+w runtime/gdev/target
 
# Workaround see !239
 
echo -e "[toolchain]\nchannel = \"1.74.0\"\ncomponents = [ \"rust-std\", \"rust-src\" ]" > runtime/gdev/rust-toolchain.toml
docker run \
docker run \
    • Cette commande fonctionne-t-elle toujours en local ? En tout cas sur la CI j'ai un échec :

      Cannot compile the WASM runtime: the `wasm32-unknown-unknown` target is not installed!

      Plus précisément les commandes à jouer sont :

      echo -e "[toolchain]\nchannel = \"`curl -s https://raw.githubusercontent.com/paritytech/srtool/master/RUSTC_VERSION`\"\ncomponents = [ \"rust-std\", \"rust-src\" ]\ntargets = [ \"wasm32-unknown-unknown\" ]" > gdev/rust-toolchain.toml
      docker run \
        -i \
        --rm \
        -e PACKAGE=gdev-runtime \
        -e RUNTIME_DIR=runtime/gdev \
        -v $PWD:/build \
        paritytech/srtool:1.77.0-0.15.0 build --app --json -cM

      cc @bgallois

      • Evidemment il suffit que j'écrive le message pour trouver le contournement : il suffit de retirer la partie targets =, voici l'instruction qui fonctionne en local :

        echo -e "[toolchain]\nchannel = \"`curl -s https://raw.githubusercontent.com/paritytech/srtool/master/RUSTC_VERSION`\"\ncomponents = [ \"rust-std\", \"rust-src\" ]" > gdev/rust-toolchain.toml
      • Please register or sign in to reply
Please register or sign in to reply
-i \
-i \
--rm \
--rm \
-e PACKAGE=gdev-runtime \
-e PACKAGE=gdev-runtime \
-e RUNTIME_DIR=runtime/gdev \
-e RUNTIME_DIR=runtime/gdev \
-v $PWD:/build \
-v $PWD:/build \
paritytech/srtool:1.60.0 build --app --json -cM
paritytech/srtool:1.74.0-0.13.0 build --app --json -cM
```
```
Then, the runtime wasm bytecode is generated in this location:
Then, the runtime wasm bytecode is generated in this location:
@@ -19,5 +23,6 @@ runtime/gdev/target/srtool/release/wbuild/gdev-runtime/gdev_runtime.compact.comp
@@ -19,5 +23,6 @@ runtime/gdev/target/srtool/release/wbuild/gdev-runtime/gdev_runtime.compact.comp
```
```
To compare it to last official :
To compare it to last official :
 
- download it here : https://git.duniter.org/nodes/rust/duniter-v2s/-/releases
- download it here : https://git.duniter.org/nodes/rust/duniter-v2s/-/releases
- compare `sha256sum` of it and of the one you've built
- compare `sha256sum` of it and of the one you've built
Loading