├── .github └── workflows │ ├── manual-acala.yml │ ├── manual-fellow-runtimes.yml │ ├── manual-moonbeam.yml │ ├── manual-polkadot-sdk.yml │ ├── manual-shiden.yml │ ├── manual.yml │ ├── quick-test.yml │ ├── release.yml │ └── tests.yml ├── .gitignore ├── .vscode └── settings.json ├── Dockerfile ├── LICENSE ├── README.md ├── README_src.adoc ├── RUSTC_VERSION ├── VERSION ├── doc ├── build.adoc ├── index.adoc ├── replay_json_1.53.0.txt ├── sample-output-compact-only.json ├── sample-output-compressed.json ├── sample-output-zip.json ├── sample-output.json ├── sample-output.txt ├── scan.adoc └── zsh.adoc ├── justfile ├── resources ├── Frame 1_256.png ├── Frame 1_512.png ├── logo-white.png ├── logo.png ├── srtool-docker_128px.png └── srtool-docker_512px.png ├── scripts ├── analyse.sh ├── build ├── getBuildOpts.sh ├── getContext.sh ├── help ├── help.txt ├── info ├── lib.sh ├── scan └── version ├── templates ├── changelog.md ├── output.txt └── release.md └── tests ├── acl.yaml ├── commands.yaml ├── long.yaml └── quick.yaml /.github/workflows/manual-acala.yml: -------------------------------------------------------------------------------- 1 | name: Manual Build - Acala 2 | 3 | env: 4 | SUBWASM_VERSION: 0.21.0 5 | 6 | on: 7 | workflow_dispatch: 8 | inputs: 9 | srtool_tag: 10 | description: The SRTOOL tag to use 11 | default: 1.84.0 12 | required: false 13 | ref: 14 | description: The ref to be used for the repo 15 | default: master 16 | required: false 17 | schedule: 18 | - cron: "00 03 * * 1" # 3AM weekly on mondays 19 | 20 | jobs: 21 | build: 22 | name: Build ${{ matrix.chain }} ${{ github.event.inputs.ref }} 23 | strategy: 24 | matrix: 25 | chain: ["karura"] 26 | runs-on: ubuntu-latest 27 | steps: 28 | - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 29 | with: 30 | repository: AcalaNetwork/Acala 31 | ref: ${{ github.event.inputs.ref }} 32 | fetch-depth: 0 33 | submodules: true 34 | 35 | - name: Srtool build 36 | id: srtool_build 37 | uses: chevdor/srtool-actions@v0.9.2 38 | with: 39 | chain: ${{ matrix.chain }} 40 | tag: ${{ github.event.inputs.srtool_tag }} 41 | 42 | - name: Summary 43 | run: | 44 | echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.chain }}-srtool-digest.json 45 | cat ${{ matrix.chain }}-srtool-digest.json 46 | echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}" 47 | 48 | # it takes a while to build the runtime, so let's save the artifact as soon as we have it 49 | - name: Archive Artifacts for ${{ matrix.chain }} 50 | uses: actions/upload-artifact@v4 51 | with: 52 | name: ${{ matrix.chain }}-runtime 53 | path: | 54 | ${{ steps.srtool_build.outputs.wasm }} 55 | ${{ steps.srtool_build.outputs.wasm_compressed }} 56 | ${{ matrix.chain }}-srtool-digest.json 57 | 58 | # We now get extra information thanks to subwasm, 59 | - name: Install subwasm ${{ env.SUBWASM_VERSION }} 60 | run: | 61 | wget https://github.com/chevdor/subwasm/releases/download/v${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb 62 | sudo dpkg -i subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb 63 | subwasm --version 64 | - name: Show Runtime information 65 | run: | 66 | subwasm info ${{ steps.srtool_build.outputs.wasm }} 67 | subwasm info ${{ steps.srtool_build.outputs.wasm_compressed }} 68 | subwasm --json info ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.chain }}-info.json 69 | subwasm --json info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ matrix.chain }}-info_compressed.json 70 | - name: Extract the metadata 71 | run: | 72 | subwasm meta ${{ steps.srtool_build.outputs.wasm }} 73 | subwasm --json meta ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.chain }}-metadata.json 74 | - name: Check the metadata diff 75 | run: | 76 | subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.chain }} | tee ${{ matrix.chain }}-diff.txt 77 | 78 | - name: Archive Subwasm results 79 | uses: actions/upload-artifact@v4 80 | with: 81 | name: ${{ matrix.chain }}-runtime-info 82 | path: | 83 | ${{ matrix.chain }}-info.json 84 | ${{ matrix.chain }}-info_compressed.json 85 | ${{ matrix.chain }}-metadata.json 86 | ${{ matrix.chain }}-diff.txt 87 | -------------------------------------------------------------------------------- /.github/workflows/manual-fellow-runtimes.yml: -------------------------------------------------------------------------------- 1 | name: Manual Build - Fellowship 2 | 3 | env: 4 | SUBWASM_VERSION: 0.21.0 5 | TOML_CLI_VERSION: 0.2.4 6 | 7 | on: 8 | workflow_dispatch: 9 | inputs: 10 | image: 11 | description: The SRTOOL image to use use 12 | default: paritytech/srtool 13 | srtool_tag: 14 | description: The SRTOOL tag to use 15 | default: 1.84.0 16 | required: false 17 | repo: 18 | description: The repo to be used to build runtimes from 19 | default: polkadot-fellows/runtimes 20 | required: false 21 | ref: 22 | description: The ref to be used for the repo 23 | default: main 24 | required: false 25 | cache: 26 | description: By default, caching will be used but you can turn it off here if you provide 'false' 27 | default: true 28 | schedule: 29 | - cron: "00 04 * * 1" 30 | 31 | jobs: 32 | find-runtimes: 33 | name: Scan repo ${{ inputs.repo }} ${{ inputs.ref }} 34 | outputs: 35 | runtime: ${{ steps.get_runtimes_list.outputs.runtime }} 36 | commit_hash: ${{ steps.get_commit_hash.outputs.commit_hash }} 37 | runs-on: ubuntu-latest 38 | steps: 39 | - name: Checkout the srtool repo 40 | uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 41 | with: 42 | fetch-depth: 0 43 | path: srtool 44 | 45 | - name: Checkout repo ${{ inputs.repo }} 46 | uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 47 | with: 48 | repository: ${{ inputs.repo }} 49 | ref: ${{ inputs.ref }} 50 | fetch-depth: 0 51 | path: fellows-runtimes 52 | 53 | - name: Get commit hash for ${{ inputs.repo }} ${{ inputs.ref }} 54 | id: get_commit_hash 55 | working-directory: fellows-runtimes 56 | run: | 57 | echo "commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT 58 | 59 | - name: Cache runtimes list for ${{ steps.get_commit_hash.outputs.commit_hash }} 60 | id: cache_runtimes_list 61 | if: inputs.cache == 'true' 62 | uses: actions/cache@v4 63 | with: 64 | key: runtimes-list-${{ steps.get_commit_hash.outputs.commit_hash }} 65 | path: | 66 | fellows-runtimes/runtimes_list.json 67 | 68 | - name: Install tooling 69 | if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} 70 | run: | 71 | URL=https://github.com/chevdor/toml-cli/releases/download/v${{ env.TOML_CLI_VERSION }}/toml_linux_amd64_v${{ env.TOML_CLI_VERSION }}.deb 72 | curl -L $URL --output toml.deb 73 | sudo dpkg -i toml.deb 74 | toml --version; jq --version 75 | 76 | - name: Scan runtimes 77 | if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} 78 | 79 | run: | 80 | . ./srtool/scripts/lib.sh 81 | 82 | echo "Github workspace: ${{ github.workspace }}" 83 | echo "Current folder: $(pwd)"; ls -al 84 | cd fellows-runtimes; ls -al 85 | 86 | MATRIX=$(find_runtimes | tee runtimes_list.json) 87 | echo $MATRIX 88 | 89 | - name: Get runtimes list 90 | id: get_runtimes_list 91 | run: | 92 | cd fellows-runtimes; ls -al 93 | MATRIX=$(cat runtimes_list.json) 94 | echo $MATRIX 95 | echo "runtime=$MATRIX" >> $GITHUB_OUTPUT 96 | 97 | build: 98 | name: Build ${{ matrix.chain }} ${{ inputs.ref }} 99 | needs: 100 | - find-runtimes 101 | strategy: 102 | fail-fast: false 103 | matrix: ${{ fromJSON(needs.find-runtimes.outputs.runtime) }} 104 | runs-on: ubuntu-latest 105 | steps: 106 | - name: Cache ${{ matrix.chain }} runtime for ${{ needs.find-runtimes.outputs.commit_hash }} 107 | id: cache_runtime 108 | if: inputs.cache == 'true' 109 | uses: actions/cache@v4 110 | with: 111 | key: ${{ matrix.chain }}-${{ needs.find-runtimes.outputs.commit_hash }} 112 | path: | 113 | fellows-runtimes/${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime 114 | 115 | - name: Checkout 116 | uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 117 | if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} 118 | with: 119 | repository: ${{ inputs.repo }} 120 | ref: ${{ inputs.ref }} 121 | fetch-depth: 0 122 | path: fellows-runtimes 123 | 124 | - name: Srtool build 125 | id: srtool_build 126 | if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} 127 | uses: chevdor/srtool-actions@v0.9.2 128 | with: 129 | workdir: fellows-runtimes 130 | chain: ${{ matrix.chain }} 131 | runtime_dir: ${{ matrix.runtime_dir }} 132 | image: ${{ github.event.inputs.image }} 133 | tag: ${{ github.event.inputs.srtool_tag }} 134 | 135 | # This is done to allow caching 136 | - name: Store build artifacts to disk 137 | id: cache_digest 138 | if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} 139 | working-directory: fellows-runtimes 140 | run: | 141 | cached_output=${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime/ 142 | digest_file=${cached_output}/${{ matrix.chain }}-srtool-digest.json 143 | echo '${{ steps.srtool_build.outputs.json }}' | jq > ${digest_file} 144 | cat ${digest_file} 145 | echo "digest_file=$digest_file" >> "$GITHUB_OUTPUT" 146 | 147 | - name: Retrieve WASM paths 148 | id: get_values 149 | run: | 150 | runtime_package=${{ matrix.chain }}-runtime 151 | runtime_filename=${runtime_package//-/_} 152 | 153 | wasm="${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${runtime_package}/${runtime_filename}.compact.wasm" 154 | 155 | wasm_compressed="${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${runtime_package}/${runtime_filename}.compact.compressed.wasm" 156 | 157 | # we need wasm and wasm_compressed 158 | echo "wasm=$wasm" >> "$GITHUB_OUTPUT" 159 | echo "wasm_compressed=$wasm_compressed" >> "$GITHUB_OUTPUT" 160 | 161 | - name: Summary 162 | working-directory: fellows-runtimes 163 | run: | 164 | cached_output=${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime/ 165 | digest_file=${cached_output}/${{ matrix.chain }}-srtool-digest.json 166 | ls -al ${digest_file} 167 | cat ${digest_file} 168 | echo "WASM location: ${{ steps.get_values.outputs.wasm }}" 169 | echo "WASM Compressed location: ${{ steps.get_values.outputs.wasm_compressed }}" 170 | 171 | # it takes a while to build the runtime, so let's save the artifact as soon as we have it 172 | - name: Archive Artifacts for ${{ matrix.chain }} 173 | uses: actions/upload-artifact@v4 174 | with: 175 | name: ${{ matrix.chain }}-runtime 176 | path: | 177 | fellows-runtimes/${{ steps.get_values.outputs.wasm }} 178 | fellows-runtimes/${{ steps.get_values.outputs.wasm_compressed }} 179 | fellows-runtimes/${{ matrix.chain }}-srtool-digest.json 180 | 181 | # We now get extra information thanks to subwasm, 182 | - name: Install subwasm ${{ env.SUBWASM_VERSION }} 183 | run: | 184 | wget https://github.com/chevdor/subwasm/releases/download/v${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb 185 | sudo dpkg -i subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb 186 | subwasm --version 187 | 188 | - name: Show Runtime information 189 | working-directory: fellows-runtimes 190 | run: | 191 | subwasm info ${{ steps.get_values.outputs.wasm }} 192 | subwasm info ${{ steps.get_values.outputs.wasm_compressed }} 193 | subwasm --json info ${{ steps.get_values.outputs.wasm }} > ${{ matrix.chain }}-info.json 194 | subwasm --json info ${{ steps.get_values.outputs.wasm_compressed }} > ${{ matrix.chain }}-info_compressed.json 195 | 196 | - name: Extract the metadata 197 | working-directory: fellows-runtimes 198 | run: | 199 | subwasm meta ${{ steps.get_values.outputs.wasm }} 200 | subwasm --json meta ${{ steps.get_values.outputs.wasm }} > ${{ matrix.chain }}-metadata.json 201 | 202 | - name: Check the metadata diff 203 | working-directory: fellows-runtimes 204 | run: | 205 | subwasm diff ${{ steps.get_values.outputs.wasm }} --chain-b ${{ matrix.chain }} | tee ${{ matrix.chain }}-diff.txt 206 | 207 | - name: Archive Subwasm results 208 | uses: actions/upload-artifact@v4 209 | with: 210 | name: ${{ matrix.chain }}-runtime-info 211 | path: | 212 | fellows-runtimes/${{ matrix.chain }}-info.json 213 | fellows-runtimes/${{ matrix.chain }}-info_compressed.json 214 | fellows-runtimes/${{ matrix.chain }}-metadata.json 215 | fellows-runtimes/${{ matrix.chain }}-diff.txt 216 | -------------------------------------------------------------------------------- /.github/workflows/manual-moonbeam.yml: -------------------------------------------------------------------------------- 1 | name: Manual Build - Moonbeam 2 | 3 | env: 4 | SUBWASM_VERSION: 0.21.0 5 | 6 | on: 7 | workflow_dispatch: 8 | inputs: 9 | srtool_tag: 10 | description: The SRTOOL tag to use 11 | default: 1.84.0 12 | required: false 13 | ref: 14 | description: The ref to be used for the repo 15 | default: master 16 | required: false 17 | schedule: 18 | - cron: "00 03 * * 1" # 3AM weekly on mondays 19 | 20 | jobs: 21 | build: 22 | name: Build ${{ matrix.chain }} ${{ github.event.inputs.ref }} 23 | strategy: 24 | matrix: 25 | chain: ["moonriver"] 26 | runs-on: ubuntu-latest 27 | steps: 28 | - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 29 | with: 30 | repository: PureStake/moonbeam 31 | ref: ${{ github.event.inputs.ref }} 32 | fetch-depth: 0 33 | 34 | - name: Srtool build 35 | id: srtool_build 36 | uses: chevdor/srtool-actions@v0.9.2 37 | with: 38 | chain: ${{ matrix.chain }} 39 | tag: ${{ github.event.inputs.srtool_tag }} 40 | 41 | - name: Summary 42 | run: | 43 | echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.chain }}-srtool-digest.json 44 | cat ${{ matrix.chain }}-srtool-digest.json 45 | echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}" 46 | 47 | # it takes a while to build the runtime, so let's save the artifact as soon as we have it 48 | - name: Archive Artifacts for ${{ matrix.chain }} 49 | uses: actions/upload-artifact@v4 50 | with: 51 | name: ${{ matrix.chain }}-runtime 52 | path: | 53 | ${{ steps.srtool_build.outputs.wasm }} 54 | ${{ steps.srtool_build.outputs.wasm_compressed }} 55 | ${{ matrix.chain }}-srtool-digest.json 56 | 57 | # We now get extra information thanks to subwasm, 58 | - name: Install subwasm ${{ env.SUBWASM_VERSION }} 59 | run: | 60 | wget https://github.com/chevdor/subwasm/releases/download/v${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb 61 | sudo dpkg -i subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb 62 | subwasm --version 63 | - name: Show Runtime information 64 | run: | 65 | subwasm info ${{ steps.srtool_build.outputs.wasm }} 66 | subwasm info ${{ steps.srtool_build.outputs.wasm_compressed }} 67 | subwasm --json info ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.chain }}-info.json 68 | subwasm --json info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ matrix.chain }}-info_compressed.json 69 | - name: Extract the metadata 70 | run: | 71 | subwasm meta ${{ steps.srtool_build.outputs.wasm }} 72 | subwasm --json meta ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.chain }}-metadata.json 73 | - name: Check the metadata diff 74 | run: | 75 | # subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.chain }} | tee ${{ matrix.chain }}-diff.txt 76 | echo "No live chain to compare" > ${{ matrix.chain }}-diff.txt 77 | 78 | - name: Archive Subwasm results 79 | uses: actions/upload-artifact@v4 80 | with: 81 | name: ${{ matrix.chain }}-runtime-info 82 | path: | 83 | ${{ matrix.chain }}-info.json 84 | ${{ matrix.chain }}-info_compressed.json 85 | ${{ matrix.chain }}-metadata.json 86 | ${{ matrix.chain }}-diff.txt 87 | -------------------------------------------------------------------------------- /.github/workflows/manual-polkadot-sdk.yml: -------------------------------------------------------------------------------- 1 | name: Manual Build - Polkadot SDK 2 | 3 | env: 4 | SUBWASM_VERSION: 0.21.0 5 | TOML_CLI_VERSION: 0.2.4 6 | 7 | on: 8 | workflow_dispatch: 9 | inputs: 10 | image: 11 | description: The SRTOOL image to use use 12 | default: paritytech/srtool 13 | srtool_tag: 14 | description: The SRTOOL tag to use 15 | default: 1.84.0 16 | repo: 17 | description: The repo to be used to build runtimes from 18 | default: paritytech/polkadot-sdk 19 | required: false 20 | ref: 21 | description: The ref to be used for the repo 22 | default: master 23 | cache: 24 | description: By default, caching will be used but you can turn it off here if you provide 'false' 25 | default: true 26 | build_opts: 27 | description: The build options to be used to build runtime (can be left empty) 28 | default: --features on-chain-release-build 29 | required: false 30 | profile: 31 | description: The profile to be used for the runtime build 32 | default: release 33 | required: false 34 | schedule: 35 | - cron: "00 03 * * 1" # 3AM weekly on mondays 36 | 37 | jobs: 38 | find-runtimes: 39 | name: Scan repo ${{ inputs.repo }} ${{ inputs.ref }} 40 | outputs: 41 | runtime: ${{ steps.get_runtimes_list.outputs.runtime }} 42 | commit_hash: ${{ steps.get_commit_hash.outputs.commit_hash }} 43 | runs-on: ubuntu-latest 44 | steps: 45 | - name: Checkout the srtool repo 46 | uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 47 | with: 48 | fetch-depth: 0 49 | path: srtool 50 | 51 | - name: Checkout repo ${{ inputs.repo }} 52 | uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 53 | with: 54 | repository: paritytech/polkadot-sdk 55 | ref: ${{ github.event.inputs.ref }} 56 | fetch-depth: 0 57 | path: sdk 58 | 59 | - name: Get commit hash for ${{ inputs.repo }} ${{ inputs.ref }} 60 | id: get_commit_hash 61 | working-directory: sdk 62 | run: | 63 | echo "commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT 64 | 65 | - name: Cache runtimes list for ${{ steps.get_commit_hash.outputs.commit_hash }} 66 | id: cache_runtimes_list 67 | if: github.event.inputs.cache == 'true' 68 | uses: actions/cache@v4 69 | with: 70 | key: runtimes-list-${{ steps.get_commit_hash.outputs.commit_hash }} 71 | path: | 72 | sdk/runtimes_list.json 73 | 74 | - name: Install tooling 75 | if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} 76 | run: | 77 | URL=https://github.com/chevdor/toml-cli/releases/download/v${{ env.TOML_CLI_VERSION }}/toml_linux_amd64_v${{ env.TOML_CLI_VERSION }}.deb 78 | curl -L $URL --output toml.deb 79 | sudo dpkg -i toml.deb 80 | toml --version; jq --version 81 | 82 | - name: Scan runtimes 83 | if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} 84 | 85 | env: 86 | EXCLUDED_RUNTIMES: "asset-hub-rococo bridge-hub-rococo contracts-rococo coretime-rococo people-rococo rococo rococo-parachain substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template polkadot-sdk-docs-first" 87 | run: | 88 | . ./srtool/scripts/lib.sh 89 | 90 | echo "Github workspace: ${{ github.workspace }}" 91 | echo "Current folder: $(pwd)"; ls -al 92 | cd sdk; ls -al 93 | 94 | MATRIX=$(find_runtimes | tee runtimes_list.json) 95 | echo $MATRIX 96 | 97 | - name: Get runtimes list 98 | id: get_runtimes_list 99 | run: | 100 | cd sdk; ls -al 101 | MATRIX=$(cat runtimes_list.json) 102 | echo $MATRIX 103 | echo "runtime=$MATRIX" >> $GITHUB_OUTPUT 104 | 105 | srtool-build: 106 | runs-on: ubuntu-latest 107 | needs: 108 | - find-runtimes 109 | strategy: 110 | fail-fast: false 111 | matrix: ${{ fromJSON(needs.find-runtimes.outputs.runtime) }} 112 | 113 | steps: 114 | - name: Checkout 115 | uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 116 | with: 117 | repository: paritytech/polkadot-sdk 118 | fetch-depth: 0 119 | ref: ${{ github.event.inputs.ref }} 120 | path: sdk 121 | 122 | - name: Debug 123 | run: | 124 | echo "github.workspace: ${{ github.workspace }}" 125 | echo "GITHUB_WORKSPACE: ${GITHUB_WORKSPACE}" 126 | echo "Current folder:"; pwd 127 | ls -al 128 | ls -al sdk 129 | 130 | - name: Cache ${{ matrix.chain }} runtime for ${{ needs.find-runtimes.outputs.commit_hash }} 131 | id: cache_runtime 132 | if: github.event.inputs.cache == 'true' 133 | uses: actions/cache@v4 134 | with: 135 | key: ${{ matrix.chain }}-${{ needs.find-runtimes.outputs.commit_hash }} 136 | path: | 137 | sdk/${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${{ matrix.chain }}-runtime 138 | 139 | - name: Srtool build 140 | id: srtool_build 141 | if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} 142 | uses: chevdor/srtool-actions@v0.9.2 143 | env: 144 | BUILD_OPTS: ${{ inputs.build_opts }} 145 | with: 146 | workdir: sdk 147 | chain: ${{ matrix.chain }} 148 | runtime_dir: ${{ matrix.runtime_dir }} 149 | image: ${{ github.event.inputs.image }} 150 | tag: ${{ github.event.inputs.srtool_tag }} 151 | profile: ${{ github.event.inputs.profile }} 152 | 153 | # This is done to allow caching 154 | - name: Store build artifacts to disk 155 | id: cache_digest 156 | if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} 157 | working-directory: sdk 158 | run: | 159 | cached_output=${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${{ matrix.chain }}-runtime/ 160 | digest_file=${cached_output}/${{ matrix.chain }}-srtool-digest.json 161 | echo '${{ steps.srtool_build.outputs.json }}' | jq > ${digest_file} 162 | cat ${digest_file} 163 | echo "digest_file=$digest_file" >> "$GITHUB_OUTPUT" 164 | 165 | - name: Retrieve WASM paths 166 | id: get_values 167 | run: | 168 | runtime_package=${{ matrix.chain }}-runtime 169 | runtime_filename=${runtime_package//-/_} 170 | 171 | wasm="${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${runtime_package}/${runtime_filename}.compact.wasm" 172 | 173 | wasm_compressed="${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${runtime_package}/${runtime_filename}.compact.compressed.wasm" 174 | 175 | # we need wasm and wasm_compressed 176 | echo "wasm=$wasm" >> "$GITHUB_OUTPUT" 177 | echo "wasm_compressed=$wasm_compressed" >> "$GITHUB_OUTPUT" 178 | 179 | - name: Summary 180 | working-directory: sdk 181 | run: | 182 | cached_output=${{ matrix.runtime_dir }}/target/srtool/${{ inputs.profile }}/wbuild/${{ matrix.chain }}-runtime/ 183 | digest_file=${cached_output}/${{ matrix.chain }}-srtool-digest.json 184 | ls -al ${digest_file} 185 | cat ${digest_file} 186 | echo "WASM location: ${{ steps.get_values.outputs.wasm }}" 187 | echo "WASM Compressed location: ${{ steps.get_values.outputs.wasm_compressed }}" 188 | 189 | # it takes a while to build the runtime, so let's save the artifact as soon as we have it 190 | - name: Archive Artifacts for ${{ matrix.chain }} 191 | uses: actions/upload-artifact@v4 192 | with: 193 | name: ${{ matrix.chain }}-runtime 194 | path: | 195 | sdk/${{ steps.get_values.outputs.wasm }} 196 | sdk/${{ steps.get_values.outputs.wasm_compressed }} 197 | sdk/${{ matrix.chain }}-srtool-digest.json 198 | 199 | # We now get extra information thanks to subwasm, 200 | - name: Install subwasm ${{ env.SUBWASM_VERSION }} 201 | run: | 202 | wget https://github.com/chevdor/subwasm/releases/download/v${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb 203 | sudo dpkg -i subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb 204 | subwasm --version 205 | 206 | - name: Show Runtime information 207 | working-directory: sdk 208 | run: | 209 | subwasm info ${{ steps.get_values.outputs.wasm }} 210 | subwasm info ${{ steps.get_values.outputs.wasm_compressed }} 211 | subwasm --json info ${{ steps.get_values.outputs.wasm }} > ${{ matrix.chain }}-info.json 212 | subwasm --json info ${{ steps.get_values.outputs.wasm_compressed }} > ${{ matrix.chain }}-info_compressed.json 213 | 214 | - name: Extract the metadata 215 | working-directory: sdk 216 | run: | 217 | subwasm meta --format=json ${{ steps.get_values.outputs.wasm }} | tee ${{ matrix.chain }}-metadata.json 218 | 219 | - name: Archive Subwasm information 220 | uses: actions/upload-artifact@v4 221 | with: 222 | name: ${{ matrix.chain }}-runtime-info 223 | path: | 224 | sdk/${{ matrix.chain }}-info.json 225 | sdk/${{ matrix.chain }}-info_compressed.json 226 | sdk/${{ matrix.chain }}-metadata.json 227 | 228 | - name: Check for reference chain 229 | id: check-reference-chain 230 | continue-on-error: true 231 | run: | 232 | echo "Checking for reference chain: ${{ matrix.chain }} " 233 | ref_found=$(subwasm info --chain ${{ matrix.chain }} || echo "Reference chain not found") 234 | 235 | if ! [[ "$ref_found" =~ (not found) ]]; then 236 | echo "Reference chain found." 237 | echo "ref_chain_found=true" >> "$GITHUB_OUTPUT" 238 | else 239 | echo "Reference chain not found." 240 | echo "Next steps will be skipped" 241 | echo "ref_chain_found=false" >> "$GITHUB_OUTPUT" 242 | fi 243 | 244 | - name: Check the metadata diff 245 | if: steps.check-reference-chain.outputs.ref_chain_found == 'true' 246 | working-directory: sdk 247 | run: | 248 | subwasm diff ${{ steps.get_values.outputs.wasm }} --chain-b ${{ matrix.chain }} | tee ${{ matrix.chain }}-diff.txt 249 | 250 | - name: Archive Subwasm diff 251 | if: steps.check-reference-chain.outputs.ref_chain_found == 'true' 252 | uses: actions/upload-artifact@v4 253 | with: 254 | name: ${{ matrix.chain }}-runtime-diff 255 | path: | 256 | sdk/${{ matrix.chain }}-diff.txt 257 | -------------------------------------------------------------------------------- /.github/workflows/manual-shiden.yml: -------------------------------------------------------------------------------- 1 | name: Manual Build - Shiden 2 | 3 | env: 4 | SUBWASM_VERSION: 0.21.0 5 | 6 | on: 7 | workflow_dispatch: 8 | inputs: 9 | srtool_tag: 10 | description: The SRTOOL tag to use 11 | default: 1.84.0 12 | required: false 13 | ref: 14 | description: The ref to be used for the repo 15 | default: master 16 | required: false 17 | schedule: 18 | - cron: "00 03 * * 1" # 3AM weekly on mondays 19 | 20 | jobs: 21 | build: 22 | name: Build ${{ matrix.chain }} ${{ github.event.inputs.ref }} 23 | strategy: 24 | matrix: 25 | chain: ["shiden"] 26 | runs-on: ubuntu-latest 27 | steps: 28 | - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 29 | with: 30 | repository: AstarNetwork/Astar 31 | ref: ${{ github.event.inputs.ref }} 32 | fetch-depth: 0 33 | submodules: true 34 | 35 | - name: Srtool build 36 | id: srtool_build 37 | uses: chevdor/srtool-actions@v0.9.2 38 | with: 39 | chain: ${{ matrix.chain }} 40 | tag: ${{ github.event.inputs.srtool_tag }} 41 | 42 | - name: Summary 43 | run: | 44 | echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.chain }}-srtool-digest.json 45 | cat ${{ matrix.chain }}-srtool-digest.json 46 | echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}" 47 | 48 | # it takes a while to build the runtime, so let's save the artifact as soon as we have it 49 | - name: Archive Artifacts for ${{ matrix.chain }} 50 | uses: actions/upload-artifact@v4 51 | with: 52 | name: ${{ matrix.chain }}-runtime 53 | path: | 54 | ${{ steps.srtool_build.outputs.wasm }} 55 | ${{ steps.srtool_build.outputs.wasm_compressed }} 56 | ${{ matrix.chain }}-srtool-digest.json 57 | 58 | # We now get extra information thanks to subwasm, 59 | - name: Install subwasm ${{ env.SUBWASM_VERSION }} 60 | run: | 61 | wget https://github.com/chevdor/subwasm/releases/download/v${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb 62 | sudo dpkg -i subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb 63 | subwasm --version 64 | - name: Show Runtime information 65 | run: | 66 | subwasm info ${{ steps.srtool_build.outputs.wasm }} 67 | subwasm info ${{ steps.srtool_build.outputs.wasm_compressed }} 68 | subwasm --json info ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.chain }}-info.json 69 | subwasm --json info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ matrix.chain }}-info_compressed.json 70 | - name: Extract the metadata 71 | run: | 72 | subwasm meta ${{ steps.srtool_build.outputs.wasm }} 73 | subwasm --json meta ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.chain }}-metadata.json 74 | - name: Check the metadata diff 75 | run: | 76 | # subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.chain }} | tee ${{ matrix.chain }}-diff.txt 77 | echo "No live chain to compare" > ${{ matrix.chain }}-diff.txt 78 | 79 | - name: Archive Subwasm results 80 | uses: actions/upload-artifact@v4 81 | with: 82 | name: ${{ matrix.chain }}-runtime-info 83 | path: | 84 | ${{ matrix.chain }}-info.json 85 | ${{ matrix.chain }}-info_compressed.json 86 | ${{ matrix.chain }}-metadata.json 87 | ${{ matrix.chain }}-diff.txt 88 | -------------------------------------------------------------------------------- /.github/workflows/manual.yml: -------------------------------------------------------------------------------- 1 | name: Manual Build 2 | 3 | env: 4 | SUBWASM_VERSION: 0.21.0 5 | 6 | on: 7 | workflow_dispatch: 8 | inputs: 9 | srtool_tag: 10 | description: The SRTOOL tag to use 11 | default: 1.84.0 12 | required: false 13 | srtool_image: 14 | description: The SRTOOL image to use 15 | default: paritytech/srtool 16 | required: false 17 | chain: 18 | description: The chain to use 19 | default: westend-runtime 20 | required: false 21 | package: 22 | description: The package to be used 23 | default: westend-runtime 24 | required: true 25 | repository: 26 | description: The repository to be used 27 | default: paritytech/polkadot-sdk 28 | required: true 29 | runtime_dir: 30 | description: The runtime_dir to be used 31 | default: polkadot/runtime/westend 32 | required: true 33 | ref: 34 | description: The ref to be used for the repo 35 | default: master 36 | required: false 37 | build_opts: 38 | description: The build options to be used to build runtime (can be left empty) 39 | default: --features on-chain-release-build 40 | required: false 41 | profile: 42 | description: The profile to be used for the runtime build 43 | default: release 44 | required: false 45 | 46 | jobs: 47 | build: 48 | name: Build ${{ github.event.inputs.repository }}/${{ github.event.inputs.package }} ${{ github.event.inputs.ref }} 49 | runs-on: ubuntu-latest 50 | steps: 51 | - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 52 | with: 53 | repository: ${{ github.event.inputs.repository }} 54 | ref: ${{ github.event.inputs.ref }} 55 | fetch-depth: 0 56 | 57 | - name: Srtool build 58 | id: srtool_build 59 | uses: chevdor/srtool-actions@v0.9.2 60 | env: 61 | BUILD_OPTS: ${{ inputs.build_opts }} 62 | with: 63 | chain: ${{ github.event.inputs.chain }} 64 | package: ${{ github.event.inputs.package }} 65 | image: ${{ github.event.inputs.srtool_image }} 66 | tag: ${{ github.event.inputs.srtool_tag }} 67 | runtime_dir: ${{ github.event.inputs.runtime_dir }} 68 | profile: ${{ github.event.inputs.profile }} 69 | 70 | - name: Summary 71 | run: | 72 | echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ github.event.inputs.chain }}-srtool-digest.json 73 | cat ${{ github.event.inputs.chain }}-srtool-digest.json 74 | echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}" 75 | 76 | # it takes a while to build the runtime, so let's save the artifact as soon as we have it 77 | - name: Archive Artifacts for ${{ github.event.inputs.chain }} 78 | uses: actions/upload-artifact@v4 79 | with: 80 | name: ${{ github.event.inputs.chain }}-runtime 81 | path: | 82 | ${{ steps.srtool_build.outputs.wasm }} 83 | ${{ steps.srtool_build.outputs.wasm_compressed }} 84 | ${{ github.event.inputs.chain }}-srtool-digest.json 85 | 86 | # We now get extra information thanks to subwasm, 87 | - name: Install subwasm ${{ env.SUBWASM_VERSION }} 88 | run: | 89 | wget https://github.com/chevdor/subwasm/releases/download/v${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb 90 | sudo dpkg -i subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb 91 | subwasm --version 92 | - name: Show Runtime information 93 | run: | 94 | subwasm info ${{ steps.srtool_build.outputs.wasm }} 95 | subwasm info ${{ steps.srtool_build.outputs.wasm_compressed }} 96 | subwasm --json info ${{ steps.srtool_build.outputs.wasm }} > ${{ github.event.inputs.chain }}-info.json 97 | subwasm --json info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ github.event.inputs.chain }}-info_compressed.json 98 | - name: Extract the metadata 99 | run: | 100 | subwasm meta ${{ steps.srtool_build.outputs.wasm }} 101 | subwasm --json meta ${{ steps.srtool_build.outputs.wasm }} > ${{ github.event.inputs.chain }}-metadata.json 102 | - name: Check the metadata diff 103 | run: | 104 | subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ github.event.inputs.chain }} | tee ${{ github.event.inputs.chain }}-diff.txt 105 | 106 | - name: Archive Subwasm results 107 | uses: actions/upload-artifact@v4 108 | with: 109 | name: ${{ github.event.inputs.chain }}-runtime-info 110 | path: | 111 | ${{ github.event.inputs.chain }}-info.json 112 | ${{ github.event.inputs.chain }}-info_compressed.json 113 | ${{ github.event.inputs.chain }}-metadata.json 114 | ${{ github.event.inputs.chain }}-diff.txt 115 | -------------------------------------------------------------------------------- /.github/workflows/quick-test.yml: -------------------------------------------------------------------------------- 1 | name: Quick Test 2 | on: 3 | push: 4 | branches: 5 | - master 6 | tags: 7 | - "!v*" 8 | 9 | pull_request: 10 | 11 | workflow_dispatch: 12 | 13 | concurrency: 14 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 15 | cancel-in-progress: true 16 | 17 | jobs: 18 | build: 19 | name: Build Srtool Docker image 20 | runs-on: ubuntu-latest 21 | continue-on-error: false 22 | steps: 23 | - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 24 | with: 25 | ref: ${{ github.event.pull_request.head.sha }} 26 | 27 | - name: Build image 28 | run: | 29 | SRTOOL_VERSION=$(cat VERSION) 30 | RUSTC_VERSION=$(cat RUSTC_VERSION) 31 | echo Building tag $RUSTC_VERSION:$SRTOOL_VERSION 32 | echo "SRTOOL_VERSION=$SRTOOL_VERSION" >> $GITHUB_ENV 33 | echo "RUSTC_VERSION=$RUSTC_VERSION" >> $GITHUB_ENV 34 | docker --version 35 | docker build $@ --build-arg RUSTC_VERSION=$RUSTC_VERSION -t srtool . 36 | docker run -t --rm srtool version -cM 37 | 38 | - name: Export docker image 39 | run: | 40 | docker save srtool | gzip > srtool.tar.gz 41 | 42 | - name: Cache the image 43 | uses: actions/cache@v4 44 | with: 45 | key: srtool-docker-image-${{ github.sha }} 46 | path: | 47 | srtool.tar.gz 48 | 49 | common: 50 | runs-on: ubuntu-latest 51 | needs: build 52 | continue-on-error: false 53 | steps: 54 | - name: Cache the image 55 | uses: actions/cache@v4 56 | with: 57 | key: srtool-docker-image-${{ github.sha }} 58 | path: | 59 | srtool.tar.gz 60 | 61 | - name: Load Docker image 62 | run: | 63 | docker load -i srtool.tar.gz 64 | docker images --digests 65 | 66 | - name: Check the version 67 | run: | 68 | VERSION=$(docker run -t --rm srtool version -cM) 69 | if [[ \ 70 | $( echo $VERSION | jq .name -cMr | wc -c ) -le 5 || 71 | $( echo $VERSION | jq .version -cMr | wc -c ) -le 5 || 72 | $( echo $VERSION | jq .rustc -cMr | wc -c ) -le 5 \ 73 | ]] ; then 74 | echo "Invalid version output" 75 | exit 1 76 | else 77 | echo $VERSION 78 | fi 79 | 80 | container-structure-test: 81 | runs-on: ubuntu-latest 82 | needs: build 83 | continue-on-error: false 84 | steps: 85 | - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 86 | with: 87 | ref: ${{ github.event.pull_request.head.sha }} 88 | 89 | - name: Show files 90 | run: | 91 | ls -al 92 | 93 | - name: Cache the image 94 | uses: actions/cache@v4 95 | with: 96 | key: srtool-docker-image-${{ github.sha }} 97 | path: | 98 | srtool.tar.gz 99 | 100 | - name: Install tooling 101 | run: | 102 | curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 && \ 103 | chmod +x container-structure-test-linux-amd64 && \ 104 | mkdir -p $HOME/bin && \ 105 | export PATH=$PATH:$HOME/bin && \ 106 | mv container-structure-test-linux-amd64 $HOME/bin/container-structure-test 107 | echo "Installed version:" 108 | container-structure-test version 109 | 110 | - name: Load Docker image 111 | run: | 112 | docker load -i srtool.tar.gz 113 | docker images --digests 114 | 115 | - name: Run the tests 116 | run: | 117 | export PATH=$PATH:$HOME/bin 118 | TESTS=$(find tests -type f | sed -e 's/^/ --config /g' | tr -d '\n') 119 | echo "Running tests:" 120 | find tests -type f 121 | container-structure-test test --image srtool --verbosity info ${TESTS} 122 | 123 | polkadot: 124 | runs-on: ubuntu-latest 125 | needs: build 126 | continue-on-error: false 127 | strategy: 128 | fail-fast: false 129 | matrix: 130 | chain: ["westend"] 131 | steps: 132 | - name: Cache the image 133 | uses: actions/cache@v4 134 | with: 135 | key: srtool-docker-image-${{ github.sha }} 136 | path: | 137 | srtool.tar.gz 138 | 139 | - name: Load Docker image 140 | run: | 141 | docker load -i srtool.tar.gz 142 | docker images --digests 143 | 144 | - name: Check out the Polkadot SDK repo 145 | uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 146 | with: 147 | repository: paritytech/polkadot-sdk 148 | ref: ${{ github.event.inputs.ref }} 149 | fetch-depth: 0 150 | path: sdk 151 | 152 | - name: Run srtool info 153 | env: 154 | PACKAGE: ${{ matrix.chain }}-runtime 155 | RUNTIME_DIR: polkadot/runtime/${{ matrix.chain }} 156 | working-directory: sdk 157 | run: | 158 | INFO=$(docker run --rm -i \ 159 | -e PACKAGE=$PACKAGE \ 160 | -e RUNTIME_DIR=$RUNTIME_DIR \ 161 | -v "${PWD}":/build \ 162 | srtool info -cM) 163 | 164 | if [ $( echo $INFO | jq .src -r ) != "git" ] ; then 165 | echo Invalid info output, got $( echo $INFO | jq .src -r ) 166 | exit 1 167 | else 168 | echo $INFO 169 | fi 170 | 171 | - name: Debug information 172 | env: 173 | PACKAGE: ${{ matrix.chain }}-runtime 174 | RUNTIME_DIR: polkadot/runtime/${{ matrix.chain }} 175 | working-directory: sdk 176 | run: | 177 | echo "::group::Runtimes" 178 | ls -al polkadot/runtime || true 179 | echo "::endgroup::" 180 | 181 | echo "::group::${{ matrix.chain }}" 182 | ls -al polkadot/runtime/${{ matrix.chain }} || true 183 | echo "::endgroup::" 184 | 185 | echo "::group::IDs and Docker" 186 | id -u runner || true 187 | id -g runner || true 188 | id -u docker || true 189 | docker info --format "{{ .ClientInfo.Context }}" 190 | echo "::endgroup::" 191 | 192 | - name: Run srtool build for ${{ matrix.chain }} 193 | id: srtool_build 194 | env: 195 | PACKAGE: ${{ matrix.chain }}-runtime 196 | RUNTIME_DIR: polkadot/runtime/${{ matrix.chain }} 197 | working-directory: sdk 198 | run: | 199 | CMD="docker run --rm -i \ 200 | -e PACKAGE=$PACKAGE \ 201 | -e RUNTIME_DIR=$RUNTIME_DIR \ 202 | -e WASM_BUILD_STD=0 \ 203 | -v ${PWD}:/build \ 204 | srtool build --app --json" 205 | echo ::debug::build::docker_run $CMD 206 | 207 | echo "::group::SRTOOL Build Output" 208 | stdbuf -oL $CMD | { 209 | while IFS= read -r line 210 | do 211 | echo ║ $line 212 | JSON="$line" 213 | done 214 | 215 | echo "json=$JSON" >> $GITHUB_OUTPUT 216 | echo "JSON=$JSON" >> $GITHUB_ENV 217 | 218 | echo $JSON 219 | 220 | WASM=`echo $JSON | jq -r .runtimes.compact.wasm` 221 | echo "wasm=$WASM" >> $GITHUB_OUTPUT 222 | 223 | Z_WASM=`echo $JSON | jq -r .runtimes.compressed.wasm` 224 | echo "wasm_compressed=$Z_WASM" >> $GITHUB_OUTPUT 225 | } 226 | echo "::endgroup::" 227 | 228 | - name: Summary for ${{ matrix.chain }} 229 | working-directory: sdk 230 | run: | 231 | echo "::group::JSON digest" 232 | echo $JSON | jq . | tee ${{ matrix.chain }}-srtool-digest.json 233 | echo "::endgroup::" 234 | 235 | echo "::group::Runtimes paths" 236 | echo "Compact Runtime: ${{ steps.srtool_build.outputs.wasm }}" 237 | echo "Compressed Runtime: ${{ steps.srtool_build.outputs.wasm_compressed }}" 238 | echo "::endgroup::" 239 | 240 | echo "::group::Debugging" 241 | pwd; ls -al 242 | ls -al ${{ steps.srtool_build.outputs.wasm_compressed }} 243 | ls -al ${{ steps.srtool_build.outputs.wasm_compressed }} 244 | echo "::endgroup::" 245 | 246 | - name: Archive Artifacts for ${{ matrix.chain }} 247 | uses: actions/upload-artifact@v4 248 | with: 249 | name: ${{ matrix.chain }}-runtime 250 | path: | 251 | polkadot/${{ steps.srtool_build.outputs.wasm }} 252 | polkadot/${{ steps.srtool_build.outputs.wasm_compressed }} 253 | polkadot/${{ matrix.chain }}-srtool-digest.json 254 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | on: 3 | push: 4 | tags: 5 | - "v*" 6 | 7 | jobs: 8 | build: 9 | name: Build Srtool Docker image 10 | runs-on: ubuntu-latest 11 | continue-on-error: false 12 | steps: 13 | - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 14 | 15 | - name: Build image 16 | run: | 17 | RUSTC_VERSION=$(cat RUSTC_VERSION) 18 | echo "RUSTC_VERSION=$RUSTC_VERSION" >> $GITHUB_ENV 19 | docker --version 20 | docker build $@ --build-arg RUSTC_VERSION=$RUSTC_VERSION -t srtool . 21 | docker run -t --rm srtool version -cM 22 | 23 | - name: Export docker image 24 | run: | 25 | docker save srtool | gzip > srtool.tar.gz 26 | 27 | - name: Cache the image 28 | uses: actions/cache@v4 29 | with: 30 | key: srtool-docker-image-${{ github.sha }} 31 | path: | 32 | srtool.tar.gz 33 | 34 | create_draft: 35 | needs: ["build"] 36 | name: Create Draft 37 | runs-on: ubuntu-latest 38 | outputs: 39 | release_url: ${{ steps.create-release.outputs.html_url }} 40 | asset_upload_url: ${{ steps.create-release.outputs.upload_url }} 41 | steps: 42 | - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 43 | with: 44 | fetch-depth: 0 45 | - name: Get Release Version 46 | run: | 47 | echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV 48 | echo "SHORT_SHA=${GITHUB_SHA::8}" >> $GITHUB_ENV 49 | 50 | SRTOOL_VERSION=$(cat VERSION) 51 | RUSTC_VERSION=$(cat RUSTC_VERSION) 52 | echo "SRTOOL_VERSION=$SRTOOL_VERSION" >> $GITHUB_ENV 53 | echo "RUSTC_VERSION=$RUSTC_VERSION" >> $GITHUB_ENV 54 | - name: Cache the image 55 | uses: actions/cache@v4 56 | with: 57 | key: srtool-docker-image-${{ github.sha }} 58 | path: | 59 | srtool.tar.gz 60 | 61 | - name: Install tera-cli 62 | run: | 63 | URL=https://github.com/chevdor/tera-cli/releases/download/v0.1.3/tera-cli_linux_amd64.deb 64 | wget $URL 65 | sudo dpkg -i tera-cli_linux_amd64.deb 66 | tera --version 67 | 68 | - name: Generate changelog 69 | id: change_log 70 | run: | 71 | LAST_TAG=$(git describe --tags --abbrev=0 ${{ env.RELEASE_VERSION }}^ ) 72 | JSON=$(git log $LAST_TAG..HEAD \ 73 | --pretty=format:'{ "commit": "%H", "short_sha": "%h", "author": "%an", "date": "%ad", "message": "%s"},' \ 74 | $@ | \ 75 | perl -pe 'BEGIN{print "{ \"since\": \"'${LAST_TAG}'\", \"commits\": ["}; END{print "]}"}' | \ 76 | perl -pe 's/},]/}]/') 77 | echo $JSON | tera --template templates/changelog.md --stdin > changelog.md 78 | 79 | - name: Render release notes 80 | run: | 81 | export CHANGELOG=$(cat changelog.md) 82 | export REPO=${{ github.REPOSITORY }} 83 | export TAG=$RUSTC_VERSION-$SRTOOL_VERSION 84 | tera --env --env-only --template templates/release.md > RELEASE_NOTES.md 85 | 86 | - name: Create Release 87 | id: create-release 88 | uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4 89 | env: 90 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 91 | with: 92 | tag_name: ${{ env.RELEASE_VERSION }} 93 | release_name: Srtool ${{ env.RUSTC_VERSION }}-${{ env.SRTOOL_VERSION }} (${{ env.SHORT_SHA }}) 94 | body_path: ./RELEASE_NOTES.md 95 | draft: true 96 | 97 | publish-docker-image: 98 | runs-on: ubuntu-latest 99 | needs: ["create_draft"] 100 | steps: 101 | - name: Cache the image 102 | uses: actions/cache@v4 103 | with: 104 | key: srtool-docker-image-${{ github.sha }} 105 | path: | 106 | srtool.tar.gz 107 | 108 | - name: Load Docker image 109 | run: | 110 | docker load -i srtool.tar.gz 111 | docker images --digests 112 | 113 | - name: Get Release Version 114 | run: | 115 | echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV 116 | echo "SHORT_SHA=${GITHUB_SHA::8}" >> $GITHUB_ENV 117 | 118 | SRTOOL_VERSION=$(docker run --rm -i srtool version -cM | jq | jq -r .version) 119 | RUSTC_VERSION=$(docker run --rm -i srtool version -cM | jq | jq -r .rustc) 120 | echo "SRTOOL_VERSION=$SRTOOL_VERSION" >> $GITHUB_ENV 121 | echo "RUSTC_VERSION=$RUSTC_VERSION" >> $GITHUB_ENV 122 | 123 | - name: Tag image 124 | env: 125 | REPO: ${{ github.REPOSITORY }} 126 | run: | 127 | docker tag srtool $REPO:$RUSTC_VERSION-$SRTOOL_VERSION 128 | docker tag srtool $REPO:$RUSTC_VERSION 129 | docker tag srtool $REPO:latest 130 | docker images 131 | 132 | - name: Log into Docker Hub 133 | uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 134 | with: 135 | username: ${{ secrets.DOCKER_USERNAME }} 136 | password: ${{ secrets.DOCKER_PASSWORD }} 137 | 138 | - name: Push Docker image 139 | env: 140 | REPO: ${{ github.REPOSITORY }} 141 | run: | 142 | docker push $REPO:$RUSTC_VERSION-$SRTOOL_VERSION 143 | docker push $REPO:$RUSTC_VERSION 144 | docker push $REPO:latest 145 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Build & Tests 2 | on: 3 | push: 4 | branches: 5 | - master 6 | tags: 7 | - "!v*" 8 | 9 | pull_request: 10 | 11 | workflow_dispatch: 12 | 13 | schedule: 14 | - cron: "00 05 * * 1" # 5AM weekly on mondays 15 | 16 | concurrency: 17 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 18 | cancel-in-progress: true 19 | 20 | jobs: 21 | build: 22 | name: Build Srtool Docker image 23 | runs-on: ubuntu-latest 24 | continue-on-error: false 25 | steps: 26 | - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 27 | with: 28 | ref: ${{ github.event.pull_request.head.sha }} 29 | 30 | - name: Build image 31 | run: | 32 | SRTOOL_VERSION=$(cat VERSION) 33 | RUSTC_VERSION=$(cat RUSTC_VERSION) 34 | echo Building tag $RUSTC_VERSION:$SRTOOL_VERSION 35 | echo "SRTOOL_VERSION=$SRTOOL_VERSION" >> $GITHUB_ENV 36 | echo "RUSTC_VERSION=$RUSTC_VERSION" >> $GITHUB_ENV 37 | docker --version 38 | docker build $@ --build-arg RUSTC_VERSION=$RUSTC_VERSION -t srtool . 39 | docker run -t --rm srtool version -cM 40 | 41 | - name: Export docker image 42 | run: | 43 | docker save srtool | gzip > srtool.tar.gz 44 | 45 | - name: Cache the image 46 | uses: actions/cache@v4 47 | with: 48 | key: srtool-docker-image-${{ github.sha }} 49 | path: | 50 | srtool.tar.gz 51 | 52 | common: 53 | runs-on: ubuntu-latest 54 | needs: build 55 | continue-on-error: false 56 | steps: 57 | - name: Cache the image 58 | uses: actions/cache@v4 59 | with: 60 | key: srtool-docker-image-${{ github.sha }} 61 | path: | 62 | srtool.tar.gz 63 | 64 | - name: Load Docker image 65 | run: | 66 | docker load -i srtool.tar.gz 67 | docker images --digests 68 | 69 | - name: Check the version 70 | run: | 71 | VERSION=$(docker run -t --rm srtool version -cM) 72 | if [[ \ 73 | $( echo $VERSION | jq .name -cMr | wc -c ) -le 5 || 74 | $( echo $VERSION | jq .version -cMr | wc -c ) -le 5 || 75 | $( echo $VERSION | jq .rustc -cMr | wc -c ) -le 5 \ 76 | ]] ; then 77 | echo "Invalid version output" 78 | exit 1 79 | else 80 | echo $VERSION 81 | fi 82 | 83 | container-structure-test: 84 | runs-on: ubuntu-latest 85 | needs: build 86 | continue-on-error: false 87 | steps: 88 | - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 89 | with: 90 | ref: ${{ github.event.pull_request.head.sha }} 91 | 92 | - name: Show files 93 | run: | 94 | ls -al 95 | 96 | - name: Cache the image 97 | uses: actions/cache@v4 98 | with: 99 | key: srtool-docker-image-${{ github.sha }} 100 | path: | 101 | srtool.tar.gz 102 | 103 | - name: Install tooling 104 | run: | 105 | curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 && \ 106 | chmod +x container-structure-test-linux-amd64 && \ 107 | mkdir -p $HOME/bin && \ 108 | export PATH=$PATH:$HOME/bin && \ 109 | mv container-structure-test-linux-amd64 $HOME/bin/container-structure-test 110 | echo "Installed version:" 111 | container-structure-test version 112 | 113 | - name: Load Docker image 114 | run: | 115 | docker load -i srtool.tar.gz 116 | docker images --digests 117 | 118 | - name: Run the tests 119 | run: | 120 | export PATH=$PATH:$HOME/bin 121 | TESTS=$(find tests -type f | sed -e 's/^/ --config /g' | tr -d '\n') 122 | echo "Running tests:" 123 | find tests -type f 124 | container-structure-test test --image srtool --verbosity info ${TESTS} 125 | 126 | polkadot: 127 | runs-on: ubuntu-latest 128 | needs: build 129 | continue-on-error: false 130 | strategy: 131 | fail-fast: false 132 | matrix: 133 | chain: ["westend"] 134 | steps: 135 | - name: Cache the image 136 | uses: actions/cache@v4 137 | with: 138 | key: srtool-docker-image-${{ github.sha }} 139 | path: | 140 | srtool.tar.gz 141 | 142 | - name: Load Docker image 143 | run: | 144 | docker load -i srtool.tar.gz 145 | docker images --digests 146 | 147 | - name: Check out the Polkadot repo 148 | uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 149 | with: 150 | repository: paritytech/polkadot-sdk 151 | ref: ${{ github.event.inputs.ref }} 152 | fetch-depth: 0 153 | path: sdk 154 | 155 | - name: Run srtool info 156 | env: 157 | PACKAGE: ${{ matrix.chain }}-runtime 158 | RUNTIME_DIR: polkadot/runtime/${{ matrix.chain }} 159 | working-directory: sdk 160 | run: | 161 | INFO=$(docker run --rm -i \ 162 | -e PACKAGE=$PACKAGE \ 163 | -e RUNTIME_DIR=$RUNTIME_DIR \ 164 | -v "${PWD}":/build \ 165 | srtool info -cM) 166 | 167 | if [ $( echo $INFO | jq .src -r ) != "git" ] ; then 168 | echo Invalid info output, got $( echo $INFO | jq .src -r ) 169 | exit 1 170 | else 171 | echo $INFO 172 | fi 173 | 174 | - name: Debugging 175 | env: 176 | PACKAGE: ${{ matrix.chain }}-runtime 177 | RUNTIME_DIR: polkadot/runtime/${{ matrix.chain }} 178 | working-directory: sdk 179 | run: | 180 | ls -al runtime || true 181 | ls -al runtime/${{ matrix.chain }} || true 182 | id -u runner || true 183 | id -g runner || true 184 | id -u docker || true 185 | docker info --format "{{ .ClientInfo.Context }}" 186 | 187 | - name: Run srtool build for ${{ matrix.chain }} 188 | id: srtool_build 189 | env: 190 | PACKAGE: ${{ matrix.chain }}-runtime 191 | RUNTIME_DIR: polkadot/runtime/${{ matrix.chain }} 192 | working-directory: sdk 193 | run: | 194 | CMD="docker run --rm -i \ 195 | -e PACKAGE=$PACKAGE \ 196 | -e RUNTIME_DIR=$RUNTIME_DIR \ 197 | -e WASM_BUILD_STD=0 \ 198 | -v ${PWD}:/build \ 199 | srtool build --app --json" 200 | echo ::debug::build::docker_run $CMD 201 | 202 | echo "::group::SRTOOL Build Output" 203 | stdbuf -oL $CMD | { 204 | while IFS= read -r line 205 | do 206 | echo ║ $line 207 | JSON="$line" 208 | done 209 | 210 | echo "json=$JSON" >> $GITHUB_OUTPUT 211 | echo "JSON=$JSON" >> $GITHUB_ENV 212 | 213 | echo $JSON | jq . 214 | 215 | WASM=`echo $JSON | jq -r .runtimes.compact.wasm` 216 | echo "wasm=$WASM" >> $GITHUB_OUTPUT 217 | 218 | Z_WASM=`echo $JSON | jq -r .runtimes.compressed.wasm` 219 | echo "wasm_compressed=$Z_WASM" >> $GITHUB_OUTPUT 220 | } 221 | echo "::endgroup::" 222 | 223 | - name: Summary for ${{ matrix.chain }} 224 | working-directory: sdk 225 | run: | 226 | echo "::group::JSON digest" 227 | echo $JSON | jq . | tee ${{ matrix.chain }}-srtool-digest.json 228 | echo "::endgroup::" 229 | 230 | echo "::group::Runtimes paths" 231 | echo "Compact Runtime: ${{ steps.srtool_build.outputs.wasm }}" 232 | echo "Compressed Runtime: ${{ steps.srtool_build.outputs.wasm_compressed }}" 233 | echo "::endgroup::" 234 | 235 | echo "::group::Debugging" 236 | pwd; ls -al 237 | ls -al ${{ steps.srtool_build.outputs.wasm_compressed }} 238 | ls -al ${{ steps.srtool_build.outputs.wasm_compressed }} 239 | echo "::endgroup::" 240 | 241 | - name: Archive Artifacts for ${{ matrix.chain }} 242 | uses: actions/upload-artifact@v4 243 | with: 244 | name: ${{ matrix.chain }}-runtime 245 | path: | 246 | polkadot/${{ steps.srtool_build.outputs.wasm }} 247 | polkadot/${{ steps.srtool_build.outputs.wasm_compressed }} 248 | polkadot/${{ matrix.chain }}-srtool-digest.json 249 | 250 | fellowship: 251 | runs-on: ubuntu-latest 252 | needs: build 253 | continue-on-error: false 254 | strategy: 255 | fail-fast: false 256 | matrix: 257 | include: 258 | # Relay 259 | - runtime_dir: relay/kusama 260 | runtime: staging-kusama-runtime 261 | chain: staging-kusama 262 | - runtime_dir: relay/polkadot 263 | runtime: polkadot-runtime 264 | chain: polkadot 265 | 266 | # System parachains / Asset Hub 267 | - runtime_dir: system-parachains/asset-hubs/asset-hub-kusama 268 | runtime: asset-hub-kusama-runtime 269 | chain: asset-hub-kusama 270 | - runtime_dir: system-parachains/asset-hubs/asset-hub-polkadot 271 | runtime: asset-hub-polkadot-runtime 272 | chain: asset-hub-polkadot 273 | 274 | # System parachains / Bridge Hub 275 | - runtime_dir: system-parachains/bridge-hubs/bridge-hub-kusama 276 | runtime: bridge-hub-kusama-runtime 277 | chain: bridge-hub-kusama 278 | - runtime_dir: system-parachains/bridge-hubs/bridge-hub-polkadot 279 | runtime: bridge-hub-polkadot-runtime 280 | chain: bridge-hub-polkadot 281 | 282 | # System parachains / Collectives 283 | - runtime_dir: system-parachains/collectives/collectives-polkadot 284 | runtime: collectives-polkadot-runtime 285 | chain: collectives-polkadot 286 | 287 | steps: 288 | - name: Cache the image 289 | uses: actions/cache@v4 290 | with: 291 | key: srtool-docker-image-${{ github.sha }} 292 | path: | 293 | srtool.tar.gz 294 | 295 | - name: Load Docker image 296 | run: | 297 | docker load -i srtool.tar.gz 298 | docker images --digests 299 | 300 | - name: Check out the Fellowship repo 301 | uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 302 | with: 303 | repository: polkadot-fellows/runtimes 304 | ref: ${{ github.event.inputs.ref }} 305 | fetch-depth: 0 306 | path: fellowship 307 | 308 | - name: Run srtool info 309 | env: 310 | PACKAGE: ${{ matrix.runtime }} 311 | RUNTIME_DIR: ${{ matrix.runtime_dir }} 312 | working-directory: fellowship 313 | run: | 314 | INFO=$(docker run --rm -i \ 315 | -e PACKAGE=$PACKAGE \ 316 | -e RUNTIME_DIR=$RUNTIME_DIR \ 317 | -v "${PWD}":/build \ 318 | srtool info -cM) 319 | 320 | if [ $( echo $INFO | jq .src -r ) != "git" ] ; then 321 | echo Invalid info output, got $( echo $INFO | jq .src -r ) 322 | exit 1 323 | else 324 | echo $INFO 325 | fi 326 | 327 | - name: Debugging 328 | env: 329 | PACKAGE: ${{ matrix.runtime }} 330 | RUNTIME_DIR: ${{ matrix.runtime_dir }} 331 | working-directory: fellowship 332 | run: | 333 | ls -al runtime || true 334 | ls -al runtime/${{ matrix.chain }} || true 335 | id -u runner || true 336 | id -g runner || true 337 | id -u docker || true 338 | docker info --format "{{ .ClientInfo.Context }}" 339 | 340 | - name: Run srtool build for ${{ matrix.chain }} 341 | id: srtool_build 342 | env: 343 | PACKAGE: ${{ matrix.runtime }} 344 | RUNTIME_DIR: ${{ matrix.runtime_dir }} 345 | working-directory: fellowship 346 | run: | 347 | CMD="docker run --rm -i \ 348 | -e PACKAGE=$PACKAGE \ 349 | -e RUNTIME_DIR=$RUNTIME_DIR \ 350 | -e RUSTC_VERSION=1.81.0 \ 351 | -e WASM_BUILD_STD=0 \ 352 | -v ${PWD}:/build \ 353 | srtool build --app --json" 354 | 355 | echo ::debug::build::docker_run $CMD 356 | 357 | echo "::group::SRTOOL Build Output" 358 | stdbuf -oL $CMD | { 359 | while IFS= read -r line 360 | do 361 | echo ║ $line 362 | JSON="$line" 363 | done 364 | 365 | echo "json=$JSON" >> $GITHUB_OUTPUT 366 | echo "JSON=$JSON" >> $GITHUB_ENV 367 | 368 | echo $JSON | jq . 369 | 370 | WASM=`echo $JSON | jq -r .runtimes.compact.wasm` 371 | echo "wasm=$WASM" >> $GITHUB_OUTPUT 372 | 373 | Z_WASM=`echo $JSON | jq -r .runtimes.compressed.wasm` 374 | echo "wasm_compressed=$Z_WASM" >> $GITHUB_OUTPUT 375 | } 376 | echo "::endgroup::" 377 | 378 | - name: Summary for ${{ matrix.chain }} 379 | working-directory: fellowship 380 | run: | 381 | echo "::group::JSON digest" 382 | echo $JSON | jq . | tee ${{ matrix.chain }}-srtool-digest.json 383 | echo "::endgroup::" 384 | 385 | echo "::group::Runtimes paths" 386 | echo "Compact Runtime: ${{ steps.srtool_build.outputs.wasm }}" 387 | echo "Compressed Runtime: ${{ steps.srtool_build.outputs.wasm_compressed }}" 388 | echo "::endgroup::" 389 | 390 | echo "::group::Debugging" 391 | pwd; ls -al 392 | ls -al ${{ steps.srtool_build.outputs.wasm_compressed }} 393 | ls -al ${{ steps.srtool_build.outputs.wasm_compressed }} 394 | echo "::endgroup::" 395 | 396 | - name: Archive Artifacts for ${{ matrix.chain }} 397 | uses: actions/upload-artifact@v4 398 | with: 399 | name: ${{ matrix.runtime }} 400 | path: | 401 | polkadot/${{ steps.srtool_build.outputs.wasm }} 402 | polkadot/${{ steps.srtool_build.outputs.wasm_compressed }} 403 | polkadot/${{ matrix.chain }}-srtool-digest.json 404 | 405 | cumulus: 406 | runs-on: ubuntu-latest 407 | needs: build 408 | continue-on-error: true 409 | strategy: 410 | fail-fast: false 411 | matrix: 412 | include: 413 | - category: collectives 414 | chain: collectives-westend 415 | - category: assets 416 | chain: asset-hub-westend 417 | - category: bridge-hubs 418 | chain: bridge-hub-westend 419 | steps: 420 | - name: Cache the image 421 | uses: actions/cache@v4 422 | with: 423 | key: srtool-docker-image-${{ github.sha }} 424 | path: | 425 | srtool.tar.gz 426 | 427 | - name: Load Docker image 428 | run: | 429 | docker load -i srtool.tar.gz 430 | docker images --digests 431 | 432 | - name: Check out the Cumulus repo 433 | uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 434 | with: 435 | repository: paritytech/polkadot-sdk 436 | ref: ${{ github.event.inputs.ref }} 437 | fetch-depth: 0 438 | path: sdk 439 | 440 | - name: Run srtool info 441 | env: 442 | PACKAGE: ${{ matrix.chain }}-runtime 443 | RUNTIME_DIR: cumulus/parachains/runtimes/${{ matrix.category }}/${{ matrix.chain }} 444 | working-directory: sdk 445 | run: | 446 | INFO=$(docker run --rm -i \ 447 | -e PACKAGE=$PACKAGE \ 448 | -e RUNTIME_DIR=$RUNTIME_DIR \ 449 | -v "${PWD}":/build \ 450 | srtool info -cM) 451 | 452 | if [ $( echo $INFO | jq .src -r ) != "git" ] ; then 453 | echo Invalid info output, got $( echo $INFO | jq .src -r ) 454 | exit 1 455 | else 456 | echo $INFO 457 | fi 458 | 459 | - name: Run srtool build for ${{ matrix.chain }} 460 | id: srtool_build 461 | env: 462 | PACKAGE: ${{ matrix.chain }}-runtime 463 | RUNTIME_DIR: cumulus/parachains/runtimes/${{ matrix.category }}/${{ matrix.chain }} 464 | working-directory: sdk 465 | run: | 466 | CMD="docker run --rm -i \ 467 | -e PACKAGE=$PACKAGE \ 468 | -e RUNTIME_DIR=$RUNTIME_DIR \ 469 | -e WASM_BUILD_STD=0 \ 470 | -v ${PWD}:/build \ 471 | srtool build --app --json" 472 | echo ::debug::build::docker_run $CMD 473 | 474 | echo "::group::SRTOOL Build Output" 475 | stdbuf -oL $CMD | { 476 | while IFS= read -r line 477 | do 478 | echo ║ $line 479 | JSON="$line" 480 | done 481 | 482 | echo "json=$JSON" >> $GITHUB_OUTPUT 483 | echo "JSON=$JSON" >> $GITHUB_ENV 484 | 485 | echo $JSON | jq . 486 | 487 | WASM=`echo $JSON | jq -r .runtimes.compact.wasm` 488 | echo "wasm=$WASM" >> $GITHUB_OUTPUT 489 | 490 | Z_WASM=`echo $JSON | jq -r .runtimes.compressed.wasm` 491 | echo "wasm_compressed=$Z_WASM" >> $GITHUB_OUTPUT 492 | } 493 | echo "::endgroup::" 494 | 495 | - name: Summary for ${{ matrix.chain }} 496 | working-directory: sdk 497 | run: | 498 | echo "::group::JSON digest" 499 | echo $JSON | jq . | tee ${{ matrix.chain }}-srtool-digest.json 500 | echo "::endgroup::" 501 | 502 | echo "::group::Runtimes paths" 503 | echo "Compact Runtime: ${{ steps.srtool_build.outputs.wasm }}" 504 | echo "Compressed Runtime: ${{ steps.srtool_build.outputs.wasm_compressed }}" 505 | echo "::endgroup::" 506 | 507 | echo "::group::Debugging" 508 | pwd; ls -al 509 | ls -al ${{ steps.srtool_build.outputs.wasm_compressed }} 510 | ls -al ${{ steps.srtool_build.outputs.wasm_compressed }} 511 | echo "::endgroup::" 512 | 513 | - name: Archive Artifacts for ${{ matrix.chain }} 514 | uses: actions/upload-artifact@v4 515 | with: 516 | name: ${{ matrix.chain }}-runtime 517 | path: | 518 | cumulus/${{ steps.srtool_build.outputs.wasm }} 519 | cumulus/${{ steps.srtool_build.outputs.wasm_compressed }} 520 | cumulus/${{ matrix.chain }}-srtool-digest.json 521 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | digests 3 | .idea 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "paritytech", 4 | "RUSTC", 5 | "srtool", 6 | "wbuild", 7 | "workdir" 8 | ], 9 | "asciidoc.antora.enableAntoraSupport": false 10 | } 11 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/library/ubuntu:22.04 2 | 3 | LABEL maintainer "chevdor@gmail.com" 4 | LABEL description="This image contains tools for Substrate blockchains runtimes." 5 | 6 | ARG RUSTC_VERSION="1.84.0" 7 | ENV RUSTC_VERSION=$RUSTC_VERSION 8 | ENV DOCKER_IMAGE="paritytech/srtool" 9 | ENV PROFILE=release 10 | ENV PACKAGE=polkadot-runtime 11 | ENV BUILDER=builder 12 | ARG UID=1001 13 | ARG GID=1001 14 | 15 | ENV SRTOOL_TEMPLATES=/srtool/templates 16 | 17 | RUN groupadd -g $GID $BUILDER && \ 18 | useradd --no-log-init -m -u $UID -s /bin/bash -d /home/$BUILDER -r -g $BUILDER $BUILDER 19 | RUN mkdir -p ${SRTOOL_TEMPLATES} && \ 20 | mkdir /build && chown -R $BUILDER /build && \ 21 | mkdir /out && chown -R $BUILDER /out 22 | 23 | WORKDIR /tmp 24 | ENV DEBIAN_FRONTEND=noninteractive 25 | 26 | # Tooling 27 | ARG SUBWASM_VERSION=0.21.0 28 | ARG TERA_CLI_VERSION=0.2.4 29 | ARG TOML_CLI_VERSION=0.2.4 30 | 31 | COPY ./templates ${SRTOOL_TEMPLATES}/ 32 | RUN apt update && \ 33 | apt upgrade -y && \ 34 | apt install --no-install-recommends -y \ 35 | cmake pkg-config libssl-dev make protobuf-compiler \ 36 | git clang bsdmainutils ca-certificates curl && \ 37 | curl -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 --output /usr/bin/jq && chmod a+x /usr/bin/jq && \ 38 | rm -rf /var/lib/apt/lists/* /tmp/* && apt clean 39 | 40 | RUN curl -L https://github.com/chevdor/subwasm/releases/download/v${SUBWASM_VERSION}/subwasm_linux_amd64_v${SUBWASM_VERSION}.deb --output subwasm.deb && dpkg -i subwasm.deb && subwasm --version && \ 41 | curl -L https://github.com/chevdor/tera-cli/releases/download/v${TERA_CLI_VERSION}/tera-cli_linux_amd64.deb --output tera_cli.deb && dpkg -i tera_cli.deb && tera --version && \ 42 | curl -L https://github.com/chevdor/toml-cli/releases/download/v${TOML_CLI_VERSION}/toml_linux_amd64_v${TOML_CLI_VERSION}.deb --output toml.deb && dpkg -i toml.deb && toml --version && \ 43 | rm -rf /tmp/* 44 | 45 | COPY ./scripts/* /srtool/ 46 | COPY VERSION /srtool/ 47 | COPY RUSTC_VERSION /srtool/ 48 | 49 | USER $BUILDER 50 | ENV RUSTUP_HOME="/home/${BUILDER}/rustup" 51 | ENV CARGO_HOME="/home/${BUILDER}/cargo" 52 | ENV PATH="/srtool:$PATH" 53 | 54 | RUN echo $SHELL && \ 55 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ 56 | . $CARGO_HOME/env && \ 57 | rustup toolchain add stable ${RUSTC_VERSION} && \ 58 | rustup target add wasm32-unknown-unknown --toolchain $RUSTC_VERSION && \ 59 | rustup target add wasm32v1-none --toolchain $RUSTC_VERSION && \ 60 | rustup component add rust-src --toolchain $RUSTC_VERSION && \ 61 | chmod -R a+w $RUSTUP_HOME $CARGO_HOME && \ 62 | rustup show && rustc -V 63 | 64 | RUN git config --global --add safe.directory /build && \ 65 | /srtool/version && \ 66 | echo 'PATH=".:$HOME/cargo/bin:$PATH"' >> $HOME/.bashrc 67 | 68 | VOLUME [ "/build", "$CARGO_HOME", "/out" ] 69 | WORKDIR /srtool 70 | 71 | CMD ["/srtool/build"] 72 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2021 Wilfried Kopp aka. Chevdor 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Substrate Runtime Toolbox: srtool v0.18.2 2 | 3 | ![srtool docker 128px](resources/srtool-docker_128px.png) 4 | 5 | ## Intro 6 | 7 | `srtool` is a collection of containerized tools helping with building WASM Runtimes for the 8 | [Polkadot Network](https://polkadot.network). `srtool` especially allows building WASM runtimes in a 9 | **deterministic** way, allowing CIs and users, with various machines and OS, to produce a strictly identical WASM runtime. 10 | 11 | `srtool` can run on various Operating Systems supporting Podman or Docker. That includes Linux, MacOS and Windows. 12 | 13 | `srtool` helps building and verifying WASM Runtimes. The Docker image is named `paritytech/srtool`. You can find the project’s repository at . 14 | 15 | ## Docker image naming scheme 16 | 17 | The Docker images are tagged with both the rustc version used internally as well as the version of the build script. 18 | 19 | You may find for instance the following: 20 | 21 | - `paritytech/srtool:1.84.1-0.18.2` 22 | 23 | - `paritytech/srtool:1.84.1` 24 | 25 | The tags not mentioning the build version always point to the latest one. In the example above, `paritytech/srtool:1.84.1` is the same image than `paritytech/srtool:1.84.1-0.18.2`. 26 | 27 | ## Related tools 28 | 29 | There are a few other helpers you may want to check out when using `srtool`: 30 | 31 | - [srtool-cli](https://github.com/chevdor/srtool-cli): This Rust executable supersedes the previously recommended alias solution. It brings many benefits and is much easier to use. 32 | 33 | - [srtool-app](https://gitlab.com/chevdor/srtool-app): The basic features of `srtool` in a simple GUI, available on multiple platforms. 34 | 35 | - [srtool-actions](https://github.com/chevdor/srtool-actions): This Github actions makes it much easier to integrate `srtool` in your CI. 36 | 37 | - …​ and more to come 38 | 39 | ![Frame 1 256](resources/Frame%201_256.png) 40 | 41 | `srtool` is a tool for chain builders, it is widely used in CI such as Github Actions, it can also be used by anyone who wants to independently check and audit the runtime of a chain or a parachain. 42 | 43 | You may also want to have a look at [subwasm](https://github.com/chevdor/subwasm) as it is now part of the tooling included in `srtool`. `subwasm` can also be used independently upon building your wasm with `srtool`. 44 | 45 | ## History 46 | 47 | The project was initially developed by . 48 | It has now moved to Github under the [Parity Technologies](https://www.github.com/paritytech) organisation to simplify the developement and the integration with other Parity products such as Polkadot and Kusama. 49 | 50 | The last version hosted on Gitlab has been built using Rust Stable 1.84.1. It is tagged as v0.18.2 and there is no plan on updating the Gitlab repository further. New versions will be available from [this repository](https://www.github.com/paritytech/srtool) only. The functionalities remain the same so you can (and should!) simply swap `chevdor/srtool` for `paritytech/srtool` in your workflows. The [srtool-actions](https://github.com/chevdor/srtool-actions) will remain available as `chevdor/srtool-actions@` and will be updated to point at the paritytech image. 51 | 52 | ## Install 53 | 54 | ### Install the srtool-cli 55 | 56 | Since the [`srtool-cli`](https://github.com/chevdor/srtool-cli) exists, there is no reason to be using an alias anymore. Using the cli over the alias brings many advantages and will save you time. 57 | 58 | The `srtool-cli` is a command line utility written in Rust. You can read more about the installation process [here](https://github.com/chevdor/srtool-cli). 59 | 60 | ### Using an alias 61 | 62 | This method is legacy and deprecated. It is recommended to use the `srtool-cli` utility mentioned above. This information is left here for documentation purposes only — all the functions are now availabe in the `srtool-cli`. 63 | 64 | Creating an alias helps hiding the docker complexity behind one simple command. We will see more powerful options but this one is simple enough. 65 | 66 | export RUSTC_VERSION=1.84.0; export PACKAGE=kusama-runtime; alias srtool='docker run --rm -it -e PACKAGE=$PACKAGE -v $PWD:/build -v $TMPDIR/cargo:/cargo-home paritytech/srtool:$RUSTC_VERSION' 67 | 68 | Note that defining the alias as done above will hardcode the runtime. Using `kusama-runtime` as shown above means you will **always** check the Kusama runtime. If you need more, check the next chapter. 69 | 70 | If you want to check what your alias is, use `type srtool` 71 | 72 | The command to invoke a build will then be `srtool build`. 73 | 74 | ## Use 75 | 76 | Now that you have defined the srtool alias, you can use it as shown below: 77 | 78 | **See the help** 79 | 80 | $ srtool help 81 | 82 | **Build the runtime** 83 | 84 | $ srtool build 85 | 86 | **Typical run** 87 | 88 | Invoking `srtool build` with 89 | 90 | $ srtool build 91 | 92 | will output something that looks like this: 93 | 94 | 🧰 Substrate Runtime Toolbox - srtool v0.18.1 🧰 95 | - by Chevdor - 96 | 🏗 Building polkadot-runtime as release using rustc 1.84.0 97 | ⏳ That can take a little while, be patient... subsequent builds will be faster. 98 | Since you have to wait a little, you may want to learn more about Substrate runtimes: 99 | https://docs.substrate.io/learn/architecture/ 100 | 101 | Finished release [optimized] target(s) in 37.43s 102 | 103 | and finally …​ 104 | 105 | ✨ Your Substrate WASM Runtime is ready! ✨ 106 | Summary: 107 | Generator : srtool v0.18.1 108 | Version : null 109 | GIT commit : 56b9e95a9b634695f59a7c699bc68a5cfb695f03 110 | GIT tag : moonriver-genesis 111 | GIT branch : master 112 | Rustc : rustc 1.53.0-nightly (657bc0188 2021-05-31) 113 | Package : moonriver-runtime 114 | Time : 2021-06-15T17:44:58Z 115 | === Compact: 116 | Size : 2032 KB (2081495 bytes) 117 | Proposal : 0x63a4e0751531b190a910a1d5ae3e7d196f26451014c71455dd708eac05a9d5d6 118 | IPFS : QmVAVAHMak2zTm3sjNiZXmrZHofQBTxQx7PBooPsRp22R1 119 | SHA256 : 0x9d00f4c83ad2bbec37e6d9e9bc2a4aecaeeebbf24f68b69766ba6851b4745173 120 | Wasm : runtime/moonriver/target/srtool/release/wbuild/moonriver-runtime/moonriver_runtime.compact.wasm 121 | === Compressed: 122 | Size : 2032 KB (2081495 bytes) 123 | Proposal : 0x63a4e0751531b190a910a1d5ae3e7d196f26451014c71455dd708eac05a9d5d6 124 | IPFS : QmVAVAHMak2zTm3sjNiZXmrZHofQBTxQx7PBooPsRp22R1 125 | SHA256 : 0x9d00f4c83ad2bbec37e6d9e9bc2a4aecaeeebbf24f68b69766ba6851b4745173 126 | Wasm : runtime/moonriver/target/srtool/release/wbuild/moonriver-runtime/moonriver_runtime.compact.wasm 127 | 128 | **JSON output** 129 | 130 | If you prefer a json output, srtool has you covered: 131 | 132 | $ srtool build --json 133 | 134 | The output will look something like: 135 | 136 | { 137 | "gen": "srtool v0.18.1", 138 | "src": "git", 139 | "version": "1.0.0", 140 | "commit": "85cad2ef48f123d7475385b00d113bc900324ad6", 141 | "tag": "statemine-v1.0.0", 142 | "branch": "wk-gh-actions", 143 | "rustc": "rustc 1.84.0 (...)", 144 | "pkg": "statemine-runtime", 145 | "tmsp": "2021-06-22T18:08:50Z", 146 | "size": "1538747", 147 | "prop": "0xaf313fb7d1fb37d75080de43d0a0a3c06801c2be302d16f560b1acf1bda53c28", 148 | "ipfs": "QmRkiTxXEhT8Goxx7Vv2RwRuHV3ZD3AAQhFBovYFuKtaCE", 149 | "sha256": "0x0fa6fc0110e95bcf61a828d146d1e5a683664415d2c10755875ad3943f42b001", 150 | "wasm": "polkadot-parachains/statemine-runtime/target/srtool/release/wbuild/statemine-runtime/statemine_runtime.compact.wasm", 151 | "info": { 152 | "generator": { 153 | "name": "srtool", 154 | "version": "0.18.1" 155 | }, 156 | "src": "git", 157 | "version": "1.0.0", 158 | "git": { 159 | "commit": "85cad2ef48f123d7475385b00d113bc900324ad6", 160 | "tag": "statemine-v1.0.0", 161 | "branch": "wk-gh-actions" 162 | }, 163 | "rustc": "rustc 1.84.0 (...)", 164 | "pkg": "statemine-runtime", 165 | "profile": "release" 166 | }, 167 | "context": { 168 | "package": "statemine-runtime", 169 | "runtime_dir": "polkadot-parachains/statemine-runtime", 170 | "docker": { 171 | "image": "chevdor/srtool", 172 | "tag": "nightly-2021-06-20" 173 | }, 174 | "profile": "release" 175 | }, 176 | "runtimes": { 177 | "compact": { 178 | "tmsp": "2021-06-22T18:08:30Z", 179 | "size": "1538747", 180 | "prop": "0xaf313fb7d1fb37d75080de43d0a0a3c06801c2be302d16f560b1acf1bda53c28", 181 | "blake2_256": "0x9cf51f8803bc2181ffbc6a9b9c91cd3471e6050b2fb3ed6146d1cad21ad4dd4d", 182 | "ipfs": "QmRkiTxXEhT8Goxx7Vv2RwRuHV3ZD3AAQhFBovYFuKtaCE", 183 | "sha256": "0x0fa6fc0110e95bcf61a828d146d1e5a683664415d2c10755875ad3943f42b001", 184 | "wasm": "/build/polkadot-parachains/statemine-runtime/target/srtool/release/wbuild/statemine-runtime/statemine_runtime.compact.wasm", 185 | "subwasm": { 186 | "size": 1538747, 187 | "compression": { 188 | "size_compressed": 1538747, 189 | "size_decompressed": 1538747, 190 | "compressed": false 191 | }, 192 | "reserved_meta": [ 193 | 109, 194 | 101, 195 | 116, 196 | 97 197 | ], 198 | "reserved_meta_valid": true, 199 | "metadata_version": 13, 200 | "core_version": "statemine-1 (statemine-1.tx1.au1)", 201 | "proposal_hash": "0xaf313fb7d1fb37d75080de43d0a0a3c06801c2be302d16f560b1acf1bda53c28", 202 | "ipfs_hash": "QmRkiTxXEhT8Goxx7Vv2RwRuHV3ZD3AAQhFBovYFuKtaCE", 203 | "blake2_256": "0x9cf51f8803bc2181ffbc6a9b9c91cd3471e6050b2fb3ed6146d1cad21ad4dd4d" 204 | } 205 | }, 206 | "compressed": { 207 | "tmsp": "2021-06-22T18:08:30Z", 208 | "size": "452258", 209 | "prop": "0xaf313fb7d1fb37d75080de43d0a0a3c06801c2be302d16f560b1acf1bda53c28", 210 | "blake2_256": "0x9cf51f8803bc2181ffbc6a9b9c91cd3471e6050b2fb3ed6146d1cad21ad4dd4d", 211 | "ipfs": "QmRkiTxXEhT8Goxx7Vv2RwRuHV3ZD3AAQhFBovYFuKtaCE", 212 | "sha256": "0x90d8a93bfa6d69ea0a2ac1c8983e5777f3af10b0ca8506cd86c8de9ec0f462b8", 213 | "wasm": "/build/polkadot-parachains/statemine-runtime/target/srtool/release/wbuild/statemine-runtime/statemine_runtime.compact.compressed.wasm", 214 | "subwasm": { 215 | "size": 1538747, 216 | "compression": { 217 | "size_compressed": 452258, 218 | "size_decompressed": 1538747, 219 | "compressed": true 220 | }, 221 | "reserved_meta": [ 222 | 109, 223 | 101, 224 | 116, 225 | 97 226 | ], 227 | "reserved_meta_valid": true, 228 | "metadata_version": 13, 229 | "core_version": "statemine-1 (statemine-1.tx1.au1)", 230 | "proposal_hash": "0xaf313fb7d1fb37d75080de43d0a0a3c06801c2be302d16f560b1acf1bda53c28", 231 | "ipfs_hash": "QmRkiTxXEhT8Goxx7Vv2RwRuHV3ZD3AAQhFBovYFuKtaCE", 232 | "blake2_256": "0x9cf51f8803bc2181ffbc6a9b9c91cd3471e6050b2fb3ed6146d1cad21ad4dd4d" 233 | } 234 | } 235 | } 236 | } 237 | 238 | ## Troubleshooting 239 | 240 | ### Outdated repo 241 | 242 | If you run into issues while running `srtool`, make sure you’re using a decently recent version of Polkadot/Substrate: 243 | 244 | Then run the following commands: 245 | 246 | rm -rf target/srtool 247 | cargo clean 248 | cargo update 249 | 250 | You can now try running `srtool build` again. 251 | 252 | ### `srtool` tells me the folder is not a cargo project 253 | 254 | The error is probably: `` !!! The folder on your host computer does not look like a Cargo project. Are you really in your repo?` `` 255 | 256 | Run the following command: 257 | 258 | alias srtool 259 | 260 | And make sure that you see `$PWD:/build/` and not `/home/your_name/:/build`. 261 | If you’re running into this issue, your `.bash_profile` likely contains double quotes (") where you should have used single ones ('). 262 | 263 | ### Other cases 264 | 265 | If you still run into any trouble, please open a new issue and describe the error you see and the steps you took. 266 | 267 | ## Proposal field 268 | 269 | What is important in the output of srtool is the `Proposal` field: 270 | 271 | 🧰 Substrate Runtime Toolbox 🧰 272 | ... Bla bla ... 273 | Proposal : 0x5931690e71e9d3d9f04a43d8c15e45e0968e563858dd87ad6485b2368a286a8f 274 | ... more blabla ... 275 | 276 | The `Proposal` field value should match the value of the proposal you can see in the Polkadot UI. 277 | 278 | ## IPFS Hash 279 | 280 | Starting with version 0.9.8, the IPFS hash is computed and added to the output. `srtool` is only computing the hash. It neither publishes the file to IPFS nor connects to IPFS. 281 | 282 | **Advanced usage** 283 | 284 | If you’re feeling fancy, you may also run: 285 | 286 | srtool bash 287 | 288 | and look around the `/srtool` folder. 289 | 290 | ## User Scripts 291 | 292 | You can see the list of available scripts in the `/scripts` folder: 293 | 294 | - `help`: Show some help. 295 | 296 | - `version`: Show some version. 297 | 298 | - `info`: Show available system info before running a build. 299 | 300 | - `build`: Run the actual build. 301 | 302 | - `scan`: Scan a repo for runtimes 303 | 304 | The `info` and `version` scripts pass any arguments you pass to the script to `jq`. So you can play with `c` (compact), `-M` (monochrome), `-C` color output. For instance `docker run --rm -it -v $PWD:/build chevdor/srtool:1.84.0 info -cM` shows a monochrome output on a single line. 305 | 306 | ## Build your custom chain / parachain 307 | 308 | Building the runtime for your custom chain may not work with the default used for Kusama, Polkadot and Co. 309 | You can however help `srtool` make the right choices using ENV VARs. You will need to make a new alias as shown below. 310 | 311 | Here’s how to build the runtime for the substrate-node-template, for instance: 312 | 313 | alias mysrtool='docker run --rm -it --name mysrtool -e RUNTIME_DIR=runtime -e BUILD_OPTS=" " -e PACKAGE=$PACKAGE -v $PWD:/build -v /tmp/cargo:/cargo-home chevdor/srtool:$RUSTC_VERSION' 314 | 315 | `BUILD_OPTS` is set to a space, not an empty string. 316 | 317 | Using `srtool-cli` makes the above much easier…​ 318 | 319 | ## Export the runtime 320 | 321 | To easily export your runtime, it will be copied in the container into the `/out` folder. 322 | If you mount this docker volume, you will find the wasm on your local filesystem once the run is complete. 323 | 324 | docker run ... -v /tmp/out:/out ... 325 | 326 | ## Scan 327 | 328 | `srtool` includes a command that helps finding runtimes in a repo. 329 | 330 | REPO=/projects/polkadot-sdk 331 | # or 332 | # REPO=fellowship-runtimes 333 | podman run --rm -it \ 334 | -v $REPO:/build \ 335 | `paritytech/srtool:1.84.0-0.18.1` scan 336 | 337 | ## ZSH/ Zinit users 338 | 339 | If you’re using `zsh` and `zinit`, you may benefit from using the srtool snippet maintained [here](https://gitlab.com/chevdor/dotfiles/-/tree/master/zsh-plugins). 340 | 341 | To do so, add the following to your `zshconfig`: 342 | 343 | MY_REPO="https://gitlab.com/chevdor/dotfiles/-/raw/master/zsh-plugins" 344 | for plugin (git cargo srtool); { 345 | SNIPPET="$MY_REPO/$plugin/$plugin.plugin.zsh" 346 | zinit snippet $SNIPPET 347 | } 348 | 349 | - Chose the snippets you want, the one called `srtool` here is the interesting one. 350 | 351 | After that, make sure to: 352 | - upgrade your snippets: `zplugin update --all` 353 | - restart/source your shell: `. ~/.zshrc` 354 | 355 | ## Build the Docker image 356 | 357 | While you don’t have to build the image yourself, you still may! 358 | 359 | First you may want to double check what rustc versions are available as you will HAVE to build an image for a given version: 360 | 361 | rustup check 362 | 363 | So say you want to build a builder for rustc 1.84.0: 364 | 365 | RUSTC_VERSION=1.84.0 && docker build --build-arg RUSTC_VERSION=$RUSTC_VERSION -t paritytech/srtool:$RUSTC_VERSION . 366 | -------------------------------------------------------------------------------- /README_src.adoc: -------------------------------------------------------------------------------- 1 | :name: paritytech/srtool 2 | :rsversion: 1.84.0 3 | :version: 0.18.1 4 | // :rsversion: pass:m[include:RUSTC_VERSION[]] // TODO: not working... 5 | :toc: right 6 | :sectnums: 7 | 8 | = Substrate Runtime Toolbox: srtool v{version} 9 | 10 | image::resources/srtool-docker_128px.png[align=center, width=128px] 11 | 12 | == Intro 13 | 14 | `srtool` is a collection of containerized tools helping with building WASM Runtimes for the 15 | https://polkadot.network[Polkadot Network]. `srtool` especially allows building WASM runtimes in a 16 | **deterministic** way, allowing CIs and users, with various machines and OS, to produce a strictly identical WASM runtime. 17 | 18 | `srtool` can run on various Operating Systems supporting Podman or Docker. That includes Linux, MacOS and Windows. 19 | 20 | `srtool` helps building and verifying WASM Runtimes. The Docker image is named `{name}`. You can find the project's repository at https://hub.docker.com/r/{name}. 21 | 22 | == Docker image naming scheme 23 | 24 | The Docker images are tagged with both the rustc version used internally as well as the version of the build script. 25 | 26 | You may find for instance the following: 27 | 28 | - `{name}:{rsversion}-{version}` 29 | - `{name}:{rsversion}` 30 | 31 | The tags not mentioning the build version always point to the latest one. In the example above, `{name}:{rsversion}` is the same image than `{name}:{rsversion}-{version}`. 32 | 33 | == Related tools 34 | 35 | There are a few other helpers you may want to check out when using `srtool`: 36 | 37 | - https://github.com/chevdor/srtool-cli[srtool-cli]: This Rust executable supersedes the previously recommended alias solution. It brings many benefits and is much easier to use. 38 | - https://gitlab.com/chevdor/srtool-app[srtool-app]: The basic features of `srtool` in a simple GUI, available on multiple platforms. 39 | - https://github.com/chevdor/srtool-actions[srtool-actions]: This Github actions makes it much easier to integrate `srtool` in your CI. 40 | - ... and more to come 41 | 42 | image::resources/Frame 1_256.png[align=center] 43 | 44 | `srtool` is a tool for chain builders, it is widely used in CI such as Github Actions, it can also be used by anyone who wants to independently check and audit the runtime of a chain or a parachain. 45 | 46 | You may also want to have a look at https://github.com/chevdor/subwasm[subwasm] as it is now part of the tooling included in `srtool`. `subwasm` can also be used independently upon building your wasm with `srtool`. 47 | 48 | == History 49 | 50 | The project was initially developed by https://gitlab.com/chevdor. 51 | It has now moved to Github under the https://www.github.com/paritytech[Parity Technologies] organisation to simplify the developement and the integration with other Parity products such as Polkadot and Kusama. 52 | 53 | The last version hosted on Gitlab has been built using Rust Stable {rsversion}. It is tagged as v{version} and there is no plan on updating the Gitlab repository further. New versions will be available from https://www.github.com/paritytech/srtool[this repository] only. The functionalities remain the same so you can (and should!) simply swap `chevdor/srtool` for `paritytech/srtool` in your workflows. The https://github.com/chevdor/srtool-actions[srtool-actions] will remain available as `chevdor/srtool-actions@` and will be updated to point at the paritytech image. 54 | 55 | == Install 56 | 57 | === Install the srtool-cli 58 | 59 | Since the https://github.com/chevdor/srtool-cli[`srtool-cli`] exists, there is no reason to be using an alias anymore. Using the cli over the alias brings many advantages and will save you time. 60 | 61 | The `srtool-cli` is a command line utility written in Rust. You can read more about the installation process https://github.com/chevdor/srtool-cli[here]. 62 | 63 | === Using an alias 64 | 65 | IMPORTANT: This method is legacy and deprecated. It is recommended to use the `srtool-cli` utility mentioned above. This information is left here for documentation purposes only -- all the functions are now availabe in the `srtool-cli`. 66 | 67 | Creating an alias helps hiding the docker complexity behind one simple command. We will see more powerful options but this one is simple enough. 68 | 69 | [subs="attributes+"] 70 | ---- 71 | export RUSTC_VERSION={rsversion}; export PACKAGE=kusama-runtime; alias srtool='docker run --rm -it -e PACKAGE=$PACKAGE -v $PWD:/build -v $TMPDIR/cargo:/cargo-home {name}:$RUSTC_VERSION' 72 | ---- 73 | 74 | NOTE: Note that defining the alias as done above will hardcode the runtime. Using `kusama-runtime` as shown above means you will *always* check the Kusama runtime. If you need more, check the next chapter. 75 | 76 | NOTE: If you want to check what your alias is, use `type srtool` 77 | 78 | The command to invoke a build will then be `srtool build`. 79 | 80 | == Use 81 | 82 | Now that you have defined the srtool alias, you can use it as shown below: 83 | 84 | .See the help 85 | $ srtool help 86 | 87 | .Build the runtime 88 | $ srtool build 89 | 90 | .Typical run 91 | 92 | Invoking `srtool build` with 93 | 94 | $ srtool build 95 | 96 | will output something that looks like this: 97 | 98 | [subs="attributes+"] 99 | ---- 100 | 🧰 Substrate Runtime Toolbox - srtool v{version} 🧰 101 | - by Chevdor - 102 | 🏗 Building polkadot-runtime as release using rustc {rsversion} 103 | ⏳ That can take a little while, be patient... subsequent builds will be faster. 104 | Since you have to wait a little, you may want to learn more about Substrate runtimes: 105 | https://docs.substrate.io/learn/architecture/ 106 | 107 | Finished release [optimized] target(s) in 37.43s 108 | ---- 109 | 110 | and finally ... 111 | 112 | [subs="attributes+"] 113 | ---- 114 | include::doc/sample-output.txt[] 115 | ---- 116 | 117 | .JSON output 118 | If you prefer a json output, srtool has you covered: 119 | 120 | $ srtool build --json 121 | 122 | The output will look something like: 123 | 124 | [subs="attributes+"] 125 | ---- 126 | include::doc/sample-output.json[] 127 | ---- 128 | 129 | == Troubleshooting 130 | 131 | === Outdated repo 132 | 133 | If you run into issues while running `srtool`, make sure you're using a decently recent version of Polkadot/Substrate: 134 | 135 | Then run the following commands: 136 | 137 | rm -rf target/srtool 138 | cargo clean 139 | cargo update 140 | 141 | You can now try running `srtool build` again. 142 | 143 | === `srtool` tells me the folder is not a cargo project 144 | 145 | The error is probably: `!!! The folder on your host computer does not look like a Cargo project. Are you really in your repo?`` 146 | 147 | Run the following command: 148 | 149 | alias srtool 150 | 151 | And make sure that you see `$PWD:/build/` and not `/home/your_name/:/build`. 152 | If you're running into this issue, your `.bash_profile` likely contains double quotes (") where you should have used single ones ('). 153 | 154 | === Other cases 155 | 156 | If you still run into any trouble, please open a new issue and describe the error you see and the steps you took. 157 | 158 | == Proposal field 159 | 160 | What is important in the output of srtool is the `Proposal` field: 161 | 162 | [subs="attributes+"] 163 | ---- 164 | 🧰 Substrate Runtime Toolbox 🧰 165 | ... Bla bla ... 166 | Proposal : 0x5931690e71e9d3d9f04a43d8c15e45e0968e563858dd87ad6485b2368a286a8f 167 | ... more blabla ... 168 | ---- 169 | 170 | The `Proposal` field value should match the value of the proposal you can see in the Polkadot UI. 171 | 172 | == IPFS Hash 173 | 174 | Starting with version 0.9.8, the IPFS hash is computed and added to the output. `srtool` is only computing the hash. It neither publishes the file to IPFS nor connects to IPFS. 175 | 176 | .Advanced usage 177 | If you're feeling fancy, you may also run: 178 | 179 | srtool bash 180 | 181 | and look around the `/srtool` folder. 182 | 183 | == User Scripts 184 | 185 | You can see the list of available scripts in the `/scripts` folder: 186 | 187 | - `help`: Show some help. 188 | - `version`: Show some version. 189 | - `info`: Show available system info before running a build. 190 | - `build`: Run the actual build. 191 | - `scan`: Scan a repo for runtimes 192 | 193 | NOTE: The `info` and `version` scripts pass any arguments you pass to the script to `jq`. So you can play with `c` (compact), `-M` (monochrome), `-C` color output. For instance `docker run --rm -it -v $PWD:/build chevdor/srtool:{rsversion} info -cM` shows a monochrome output on a single line. 194 | 195 | == Build your custom chain / parachain 196 | 197 | Building the runtime for your custom chain may not work with the default used for Kusama, Polkadot and Co. 198 | You can however help `srtool` make the right choices using ENV VARs. You will need to make a new alias as shown below. 199 | 200 | Here's how to build the runtime for the substrate-node-template, for instance: 201 | 202 | alias mysrtool='docker run --rm -it --name mysrtool -e RUNTIME_DIR=runtime -e BUILD_OPTS=" " -e PACKAGE=$PACKAGE -v $PWD:/build -v /tmp/cargo:/cargo-home chevdor/srtool:$RUSTC_VERSION' 203 | 204 | NOTE: `BUILD_OPTS` is set to a space, not an empty string. 205 | 206 | NOTE: Using `srtool-cli` makes the above much easier... 207 | 208 | == Export the runtime 209 | 210 | To easily export your runtime, it will be copied in the container into the `/out` folder. 211 | If you mount this docker volume, you will find the wasm on your local filesystem once the run is complete. 212 | 213 | docker run ... -v /tmp/out:/out ... 214 | 215 | include::doc/index.adoc[] 216 | -------------------------------------------------------------------------------- /RUSTC_VERSION: -------------------------------------------------------------------------------- 1 | 1.84.1 2 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 0.18.2 2 | -------------------------------------------------------------------------------- /doc/build.adoc: -------------------------------------------------------------------------------- 1 | 2 | == Build the Docker image 3 | 4 | While you don't have to build the image yourself, you still may! 5 | 6 | First you may want to double check what rustc versions are available as you will HAVE to build an image for a given version: 7 | 8 | rustup check 9 | 10 | So say you want to build a builder for rustc {rsversion}: 11 | 12 | [subs="attributes+"] 13 | ---- 14 | RUSTC_VERSION={rsversion} && docker build --build-arg RUSTC_VERSION=$RUSTC_VERSION -t {name}:$RUSTC_VERSION . 15 | ---- 16 | -------------------------------------------------------------------------------- /doc/index.adoc: -------------------------------------------------------------------------------- 1 | 2 | include::scan.adoc[] 3 | 4 | include::zsh.adoc[] 5 | 6 | include::build.adoc[] 7 | -------------------------------------------------------------------------------- /doc/replay_json_1.53.0.txt: -------------------------------------------------------------------------------- 1 | 🧰 Substrate Runtime Toolbox - srtool v0.9.15 🧰 2 | - by Chevdor - 3 | info: using existing install for '1.53.0-x86_64-unknown-linux-gnu' 4 | info: override toolchain for '/build' set to '1.53.0-x86_64-unknown-linux-gnu' 5 | 6 | 1.53.0-x86_64-unknown-linux-gnu unchanged - rustc 1.53.0 (53cb7b09b 2021-06-17) 7 | 8 | 🏗 Building statemine-runtime as release using rustc 1.53.0 (53cb7b09b 2021-06-17) 9 | ⏳ That can take a little while, be patient... subsequent builds will be faster. 10 | Since you have to wait a little, you may want to learn more about Substrate runtimes: 11 | https://substrate.dev/docs/en/#architecture 12 | Updating git repository `https://github.com/paritytech/substrate` 13 | Updating git repository `https://github.com/paritytech/polkadot` 14 | Updating git repository `https://github.com/paritytech/grandpa-bridge-gadget` 15 | Downloading crates ... 16 | Downloaded aes v0.5.0 17 | Downloaded data-encoding-macro v0.1.10 18 | Downloaded ref-cast v1.0.6 19 | Downloaded rawpointer v0.2.1 20 | Downloaded atomic-waker v1.0.0 21 | Downloaded ctor v0.1.19 22 | Downloaded resolv-conf v0.7.0 23 | Downloaded sct v0.6.0 24 | Downloaded simba v0.1.5 25 | Downloaded ppv-lite86 v0.2.10 26 | Downloaded rand v0.8.3 27 | Downloaded snow v0.7.2 28 | Downloaded smallvec v1.6.1 29 | Downloaded stream-cipher v0.7.1 30 | Downloaded x25519-dalek v1.1.0 31 | Downloaded zeroize_derive v1.0.1 32 | Downloaded tracing-serde v0.1.2 33 | Downloaded tokio-timer v0.2.13 34 | Downloaded which v4.0.2 35 | Downloaded zstd v0.6.1+zstd.1.4.9 36 | Downloaded untrusted v0.7.1 37 | Downloaded tracing-attributes v0.1.15 38 | Downloaded tempfile v3.2.0 39 | Downloaded webpki v0.21.4 40 | Downloaded tracing v0.1.26 41 | Downloaded want v0.3.0 42 | Downloaded universal-hash v0.4.0 43 | Downloaded semver-parser v0.7.0 44 | Downloaded unicode-xid v0.2.1 45 | Downloaded wasmi-validation v0.4.0 46 | Downloaded smallvec v0.6.13 47 | Downloaded zeroize v1.2.0 48 | Downloaded sha-1 v0.8.2 49 | Downloaded threadpool v1.8.1 50 | Downloaded unicode-normalization v0.1.16 51 | Downloaded thiserror-impl v1.0.24 52 | Downloaded parking_lot v0.11.1 53 | Downloaded subtle v2.4.0 54 | Downloaded parity-ws v0.10.0 55 | Downloaded tiny-keccak v2.0.2 56 | Downloaded libm v0.2.1 57 | Downloaded yamux v0.9.0 58 | Downloaded convert_case v0.4.0 59 | Downloaded tokio-io v0.1.13 60 | Downloaded zstd-safe v3.0.1+zstd.1.4.9 61 | Downloaded tracing-subscriber v0.2.18 62 | Downloaded matchers v0.0.1 63 | Downloaded hash256-std-hasher v0.15.2 64 | Downloaded getrandom v0.1.16 65 | Downloaded wyz v0.2.0 66 | Downloaded hashbrown v0.9.1 67 | Downloaded tokio-buf v0.1.1 68 | Downloaded http v0.1.21 69 | Downloaded opaque-debug v0.2.3 70 | Downloaded zstd-sys v1.4.20+zstd.1.4.9 71 | Downloaded socket2 v0.3.19 72 | Downloaded futures-cpupool v0.1.8 73 | Downloaded wasm-bindgen v0.2.73 74 | Downloaded semver v0.11.0 75 | Downloaded salsa20 v0.7.2 76 | Downloaded linregress v0.4.0 77 | Downloaded parity-util-mem v0.9.0 78 | Downloaded parity-tokio-ipc v0.4.0 79 | Downloaded crossbeam-epoch v0.8.2 80 | Downloaded impl-serde v0.3.1 81 | Downloaded semver v0.9.0 82 | Downloaded winapi v0.3.9 83 | Downloaded regex v1.4.2 84 | Downloaded lru-cache v0.1.2 85 | Downloaded spin v0.5.2 86 | Downloaded schnorrkel v0.9.1 87 | Downloaded parking_lot_core v0.6.2 88 | Downloaded ip_network v0.3.4 89 | Downloaded ipnet v2.3.0 90 | Downloaded tiny-bip39 v0.8.0 91 | Downloaded rustls-native-certs v0.4.0 92 | Downloaded socket2 v0.4.0 93 | Downloaded pest v2.1.3 94 | Downloaded trie-root v0.16.0 95 | Downloaded base58 v0.1.0 96 | Downloaded memoffset v0.5.6 97 | Downloaded crunchy v0.2.2 98 | Downloaded jsonrpc-ipc-server v15.1.0 99 | Downloaded libz-sys v1.1.2 100 | Downloaded tokio-fs v0.1.7 101 | Downloaded digest v0.8.1 102 | Downloaded hyper-rustls v0.21.0 103 | Downloaded tokio-codec v0.1.2 104 | Downloaded same-file v1.0.6 105 | Downloaded semver v0.6.0 106 | Downloaded regex-automata v0.1.9 107 | Downloaded idna v0.2.0 108 | Downloaded cargo_metadata v0.13.1 109 | Downloaded block-padding v0.1.5 110 | Downloaded block-buffer v0.9.0 111 | Downloaded blake2s_simd v0.5.11 112 | Downloaded safe-mix v1.0.1 113 | Downloaded rw-stream-sink v0.2.1 114 | Downloaded pdqselect v0.1.0 115 | Downloaded pbkdf2 v0.3.0 116 | Downloaded libp2p-deflate v0.28.0 117 | Downloaded jsonrpc-server-utils v15.1.0 118 | Downloaded jsonrpc-derive v15.1.0 119 | Downloaded curve25519-dalek v3.0.0 120 | Downloaded libp2p-core v0.28.2 121 | Downloaded jsonrpc-core v15.1.0 122 | Downloaded string v0.2.1 123 | Downloaded jsonrpc-http-server v15.1.0 124 | Downloaded js-sys v0.3.50 125 | Downloaded sha3 v0.9.1 126 | Downloaded tokio-current-thread v0.1.7 127 | Downloaded strum v0.20.0 128 | Downloaded jsonrpc-core-client v15.1.0 129 | Downloaded prost-build v0.7.0 130 | Downloaded jsonrpc-pubsub v15.1.0 131 | Downloaded iovec v0.1.4 132 | Downloaded if-watch v0.2.0 133 | Downloaded cpuid-bool v0.2.0 134 | Downloaded bytes v1.0.1 135 | Downloaded bytes v0.4.12 136 | Downloaded percent-encoding v2.1.0 137 | Downloaded memory-db v0.26.0 138 | Downloaded hyper v0.13.9 139 | Downloaded data-encoding-macro-internal v0.1.9 140 | Downloaded bytes v0.5.6 141 | Downloaded byte-tools v0.3.1 142 | Downloaded hyper v0.12.35 143 | Downloaded httparse v1.3.4 144 | Downloaded cache-padded v1.1.1 145 | Downloaded byteorder v1.3.4 146 | Downloaded indexmap v1.6.1 147 | Downloaded integer-sqrt v0.1.5 148 | Downloaded impl-trait-for-tuples v0.2.1 149 | Downloaded impl-codec v0.5.0 150 | Downloaded block-cipher v0.8.0 151 | Downloaded blake2-rfc v0.2.18 152 | Downloaded async-channel v1.5.1 153 | Downloaded http v0.2.2 154 | Downloaded memchr v2.3.4 155 | Downloaded sha2 v0.8.2 156 | Downloaded paste v1.0.4 157 | Downloaded maybe-uninit v2.0.0 158 | Downloaded libp2p-tcp v0.28.0 159 | Downloaded digest v0.9.0 160 | Downloaded lock_api v0.3.4 161 | Downloaded linked-hash-map v0.5.3 162 | Downloaded libp2p-yamux v0.32.0 163 | Downloaded libp2p-swarm-derive v0.23.0 164 | Downloaded libp2p-kad v0.30.0 165 | Downloaded libp2p-dns v0.28.1 166 | Downloaded directories v3.0.1 167 | Downloaded byte-slice-cast v1.0.0 168 | Downloaded opaque-debug v0.3.0 169 | Downloaded fixedbitset v0.2.0 170 | Downloaded downcast-rs v1.2.0 171 | Downloaded arrayvec v0.7.0 172 | Downloaded parking_lot v0.9.0 173 | Downloaded parity-util-mem-derive v0.1.0 174 | Downloaded bitvec v0.20.1 175 | Downloaded atomic v0.5.0 176 | Downloaded async-trait v0.1.50 177 | Downloaded event-listener v2.5.1 178 | Downloaded ethereum-types v0.11.0 179 | Downloaded erased-serde v0.3.13 180 | Downloaded environmental v1.1.3 181 | Downloaded dns-parser v0.8.0 182 | Downloaded dirs-sys v0.3.5 183 | Downloaded base64 v0.13.0 184 | Downloaded async-lock v2.4.0 185 | Downloaded async-io v1.3.1 186 | Downloaded async-global-executor v2.0.2 187 | Downloaded impl-rlp v0.3.0 188 | Downloaded camino v1.0.4 189 | Downloaded base-x v0.2.8 190 | Downloaded backtrace v0.3.55 191 | Downloaded async-executor v1.4.0 192 | Downloaded libsecp256k1 v0.3.5 193 | Downloaded cpuid-bool v0.1.2 194 | Downloaded object v0.22.0 195 | Downloaded linked_hash_set v0.1.4 196 | Downloaded kv-log-macro v1.0.7 197 | Downloaded jobserver v0.1.21 198 | Downloaded crc32fast v1.2.1 199 | Downloaded cfg-if v0.1.10 200 | Downloaded generic-array v0.12.3 201 | Downloaded fnv v1.0.7 202 | Downloaded flate2 v1.0.19 203 | Downloaded asynchronous-codec v0.6.0 204 | Downloaded asynchronous-codec v0.5.0 205 | Downloaded lazycell v1.3.0 206 | Downloaded thread_local v1.0.1 207 | Downloaded serde_derive v1.0.126 208 | Downloaded parity-scale-codec v2.1.0 209 | Downloaded parity-multiaddr v0.11.2 210 | Downloaded kvdb-memorydb v0.9.0 211 | Downloaded crypto-mac v0.8.0 212 | Downloaded crossbeam-deque v0.7.3 213 | Downloaded crossbeam-utils v0.8.1 214 | Downloaded rand_chacha v0.3.0 215 | Downloaded match_cfg v0.1.0 216 | Downloaded futures-timer v3.0.2 217 | Downloaded futures-lite v1.11.3 218 | Downloaded ring v0.16.19 219 | Downloaded paste v0.1.18 220 | Downloaded futures-macro v0.3.15 221 | Downloaded arrayvec v0.4.12 222 | Downloaded hmac v0.8.1 223 | Downloaded bumpalo v3.4.0 224 | Downloaded crypto-mac v0.7.0 225 | Downloaded substrate-wasm-builder v3.0.0 226 | Downloaded num-complex v0.2.4 227 | Downloaded httpdate v0.3.2 228 | Downloaded http-body v0.3.1 229 | Downloaded hostname v0.3.1 230 | Downloaded hmac-drbg v0.2.0 231 | Downloaded hex_fmt v0.3.0 232 | Downloaded fastrand v1.4.0 233 | Downloaded blocking v1.0.2 234 | Downloaded approx v0.3.2 235 | Downloaded anyhow v1.0.40 236 | Downloaded ansi_term v0.12.1 237 | Downloaded ghash v0.3.1 238 | Downloaded futures-sink v0.3.15 239 | Downloaded arrayref v0.3.6 240 | Downloaded ahash v0.4.7 241 | Downloaded rand_pcg v0.2.1 242 | Downloaded futures-util v0.3.15 243 | Downloaded enum-as-inner v0.3.3 244 | Downloaded dyn-clone v1.0.4 245 | Downloaded futures-io v0.3.15 246 | Downloaded futures-core v0.3.15 247 | Downloaded futures-channel v0.3.15 248 | Downloaded ed25519-dalek v1.0.1 249 | Downloaded hash-db v0.15.2 250 | Downloaded h2 v0.2.7 251 | Downloaded h2 v0.1.26 252 | Downloaded generic-array v0.13.2 253 | Downloaded futures-timer v2.0.2 254 | Downloaded futures-rustls v0.21.1 255 | Downloaded form_urlencoded v1.0.0 256 | Downloaded gimli v0.23.0 257 | Downloaded fixed-hash v0.7.0 258 | Downloaded fake-simd v0.1.2 259 | Downloaded ethbloom v0.11.0 260 | Downloaded ct-logs v0.7.0 261 | Downloaded bs58 v0.4.0 262 | Downloaded aho-corasick v0.7.15 263 | Downloaded aes-soft v0.5.0 264 | Downloaded heck v0.3.2 265 | Downloaded async-std v1.9.0 266 | Downloaded async-process v1.0.1 267 | Downloaded async-mutex v1.4.0 268 | Downloaded adler v0.2.3 269 | Downloaded matches v0.1.8 270 | Downloaded libc v0.2.96 271 | Downloaded jsonrpc-ws-server v15.1.0 272 | Downloaded hmac v0.7.1 273 | Downloaded globset v0.4.6 274 | Downloaded thiserror v1.0.24 275 | Downloaded rustc_version v0.2.3 276 | Downloaded multibase v0.8.0 277 | Downloaded constant_time_eq v0.1.5 278 | Downloaded async-task v4.0.3 279 | Downloaded base64 v0.12.3 280 | Downloaded waker-fn v1.1.0 281 | Downloaded unsigned-varint v0.5.1 282 | Downloaded uint v0.9.0 283 | Downloaded trust-dns-resolver v0.20.1 284 | Downloaded tokio v0.2.24 285 | Downloaded rustls v0.18.1 286 | Downloaded rustc-hex v2.1.0 287 | Downloaded regex-syntax v0.6.21 288 | Downloaded ref-cast-impl v1.0.6 289 | Downloaded quicksink v0.1.2 290 | Downloaded pwasm-utils v0.18.0 291 | Downloaded parking_lot_core v0.8.2 292 | Downloaded mio-named-pipes v0.1.7 293 | Downloaded intervalier v0.4.0 294 | Downloaded enumflags2_derive v0.6.4 295 | Downloaded dyn-clonable-impl v0.9.0 296 | Downloaded dyn-clonable v0.9.0 297 | Downloaded ckb-merkle-mountain-range v0.3.1 298 | Downloaded cc v1.0.66 299 | Downloaded blake3 v0.3.7 300 | Downloaded blake2b_simd v0.5.11 301 | Downloaded blake2 v0.9.1 302 | Downloaded prost-types v0.7.0 303 | Downloaded async-std-resolver v0.20.1 304 | Downloaded multihash-derive v0.7.1 305 | Downloaded libp2p-swarm v0.29.0 306 | Downloaded libp2p-ping v0.29.0 307 | Downloaded libp2p-noise v0.30.0 308 | Downloaded libp2p-floodsub v0.29.0 309 | Downloaded libp2p v0.37.1 310 | Downloaded kvdb v0.9.0 311 | Downloaded enumn v0.1.3 312 | Downloaded signature v1.2.2 313 | Downloaded idna v0.1.5 314 | Downloaded futures v0.3.15 315 | Downloaded crossbeam-utils v0.7.2 316 | Downloaded parity-wasm v0.42.2 317 | Downloaded rustc-hash v1.1.0 318 | Downloaded proc-macro-crate v1.0.0 319 | Downloaded nodrop v0.1.14 320 | Downloaded mio-uds v0.6.8 321 | Downloaded derive_more v0.99.14 322 | Downloaded unicase v2.6.0 323 | Downloaded tokio v0.1.22 324 | Downloaded substrate-bip39 v0.4.2 325 | Downloaded secrecy v0.7.0 326 | Downloaded pbkdf2 v0.4.0 327 | Downloaded parking_lot v0.10.2 328 | Downloaded libp2p-uds v0.28.0 329 | Downloaded subtle v1.0.0 330 | Downloaded rustc-demangle v0.1.18 331 | Downloaded rand_distr v0.2.2 332 | Downloaded pin-project-lite v0.2.4 333 | Downloaded nb-connect v1.0.2 334 | Downloaded minicbor v0.8.0 335 | Downloaded miniz_oxide v0.4.3 336 | Downloaded libp2p-relay v0.2.0 337 | Downloaded block-buffer v0.7.3 338 | Downloaded walkdir v2.3.1 339 | Downloaded unicode-bidi v0.3.4 340 | Downloaded proc-macro-crate v0.1.5 341 | Downloaded itertools v0.9.0 342 | Downloaded aes-gcm v0.7.0 343 | Downloaded num-bigint v0.2.6 344 | Downloaded enumflags2 v0.6.4 345 | Downloaded block-padding v0.2.1 346 | Downloaded version_check v0.9.2 347 | Downloaded url v1.7.2 348 | Downloaded unsigned-varint v0.7.0 349 | Downloaded twox-hash v1.6.0 350 | Downloaded tokio-tcp v0.1.4 351 | Downloaded slog v2.7.0 352 | Downloaded num-rational v0.2.4 353 | Downloaded statrs v0.12.0 354 | Downloaded rustls v0.19.1 355 | Downloaded prost-derive v0.7.0 356 | Downloaded polling v2.0.2 357 | Downloaded pin-project-internal v0.4.27 358 | Downloaded prost v0.7.0 359 | Downloaded semver-parser v0.10.2 360 | Downloaded try-lock v0.2.3 361 | Downloaded scopeguard v1.1.0 362 | Downloaded rand v0.7.3 363 | Downloaded paste-impl v0.1.18 364 | Downloaded hex v0.4.3 365 | Downloaded openssl-probe v0.1.2 366 | Downloaded tracing-core v0.1.18 367 | Downloaded rand_core v0.5.1 368 | Downloaded pin-utils v0.1.0 369 | Downloaded petgraph v0.5.1 370 | Downloaded funty v1.1.0 371 | Downloaded num_cpus v1.13.0 372 | Downloaded net2 v0.2.37 373 | Downloaded generic-array v0.14.4 374 | Downloaded futures-task v0.3.15 375 | Downloaded futures-executor v0.3.15 376 | Downloaded pin-project-internal v1.0.7 377 | Downloaded mio-extras v2.0.6 378 | Downloaded bstr v0.2.14 379 | Downloaded signal-hook-registry v1.3.0 380 | Downloaded proc-macro-hack v0.5.19 381 | Downloaded webpki-roots v0.21.0 382 | Downloaded vec-arena v1.0.0 383 | Downloaded value-bag v1.0.0-alpha.6 384 | Downloaded unsigned-varint v0.6.0 385 | Downloaded toml v0.5.8 386 | Downloaded take_mut v0.2.2 387 | Downloaded soketto v0.4.2 388 | Downloaded slab v0.4.2 389 | Downloaded sharded-slab v0.1.0 390 | Downloaded sha2 v0.9.2 391 | Downloaded rand_core v0.6.1 392 | Downloaded prometheus v0.11.0 393 | Downloaded proc-macro-nested v0.1.6 394 | Downloaded pin-project-lite v0.1.11 395 | Downloaded once_cell v1.5.2 396 | Downloaded nohash-hasher v0.2.0 397 | Downloaded multihash v0.13.2 398 | Downloaded minicbor-derive v0.6.2 399 | Downloaded libp2p-websocket v0.29.0 400 | Downloaded libp2p-request-response v0.11.0 401 | Downloaded keccak v0.1.0 402 | Downloaded jsonrpc-client-transports v15.1.0 403 | Downloaded http-body v0.1.0 404 | Downloaded hex-literal v0.3.1 405 | Downloaded getrandom v0.2.1 406 | Downloaded futures v0.1.30 407 | Downloaded exit-future v0.2.0 408 | Downloaded ed25519 v1.0.3 409 | Downloaded asn1_der v0.7.4 410 | Downloaded tinyvec_macros v0.1.0 411 | Downloaded strum_macros v0.20.1 412 | Downloaded multimap v0.8.2 413 | Downloaded derivative v2.2.0 414 | Downloaded data-encoding v2.3.2 415 | Downloaded curve25519-dalek v2.1.0 416 | Downloaded tracing-log v0.1.2 417 | Downloaded tokio-udp v0.1.6 418 | Downloaded aead v0.3.2 419 | Downloaded addr2line v0.14.1 420 | Downloaded Inflector v0.11.4 421 | Downloaded wasm-timer v0.2.5 422 | Downloaded tracing-futures v0.2.5 423 | Downloaded mio v0.6.23 424 | Downloaded concurrent-queue v1.2.2 425 | Downloaded cid v0.6.0 426 | Downloaded chacha20poly1305 v0.6.0 427 | Downloaded cargo_metadata v0.12.3 428 | Downloaded wasmi v0.9.0 429 | Downloaded wasm-gc-api v0.1.11 430 | Downloaded wasm-bindgen-shared v0.2.73 431 | Downloaded wasm-bindgen-macro-support v0.2.73 432 | Downloaded wasm-bindgen-macro v0.2.73 433 | Downloaded wasm-bindgen-futures v0.4.19 434 | Downloaded wasm-bindgen-backend v0.2.73 435 | Downloaded want v0.2.0 436 | Downloaded url v2.2.0 437 | Downloaded ucd-trie v0.1.3 438 | Downloaded typenum v1.12.0 439 | Downloaded trust-dns-proto v0.20.1 440 | Downloaded trie-db v0.22.5 441 | Downloaded tower-service v0.3.0 442 | Downloaded tokio-util v0.3.1 443 | Downloaded tokio-uds v0.2.7 444 | Downloaded tokio-threadpool v0.1.18 445 | Downloaded tokio-sync v0.1.8 446 | Downloaded tokio-service v0.1.0 447 | Downloaded tokio-rustls v0.14.1 448 | Downloaded tokio-reactor v0.1.12 449 | Downloaded tokio-named-pipes v0.1.0 450 | Downloaded tokio-executor v0.1.10 451 | Downloaded tinyvec v1.1.1 452 | Downloaded tap v1.0.0 453 | Downloaded rlp v0.5.0 454 | Downloaded retain_mut v0.1.3 455 | Downloaded radium v0.6.2 456 | Downloaded primitive-types v0.9.0 457 | Downloaded polyval v0.4.5 458 | Downloaded poly1305 v0.6.2 459 | Downloaded pin-project v1.0.7 460 | Downloaded pin-project v0.4.27 461 | Downloaded percent-encoding v1.0.1 462 | Downloaded parking v2.0.0 463 | Downloaded parity-scale-codec-derive v2.1.0 464 | Downloaded miow v0.3.6 465 | Downloaded memory_units v0.3.0 466 | Downloaded libp2p-gossipsub v0.30.0 467 | Downloaded finality-grandpa v0.14.1 468 | Downloaded chacha20 v0.5.0 469 | Downloaded cargo-platform v0.1.1 470 | Downloaded build-helper v0.1.1 471 | Downloaded remove_dir_all v0.5.3 472 | Downloaded rand_chacha v0.2.2 473 | Downloaded instant v0.1.9 474 | Downloaded parity-send-wrapper v0.1.0 475 | Downloaded multistream-select v0.10.0 476 | Downloaded merlin v2.0.0 477 | Downloaded matrixmultiply v0.2.4 478 | Downloaded lru v0.6.5 479 | Downloaded lock_api v0.4.2 480 | Downloaded parking_lot_core v0.7.2 481 | Downloaded libp2p-wasm-ext v0.28.1 482 | Downloaded libp2p-pnet v0.20.0 483 | Downloaded libp2p-plaintext v0.28.0 484 | Downloaded libp2p-mplex v0.28.0 485 | Downloaded libp2p-mdns v0.30.0 486 | Downloaded libp2p-identify v0.29.0 487 | Downloaded cuckoofilter v0.5.0 488 | Downloaded cipher v0.2.5 489 | Downloaded crossbeam-queue v0.2.3 490 | Downloaded pkg-config v0.3.19 491 | Downloaded nalgebra v0.21.1 492 | Downloaded signal-hook v0.1.17 493 | Downloaded sha-1 v0.9.2 494 | Compiling proc-macro2 v1.0.27 495 | Compiling unicode-xid v0.2.1 496 | Compiling syn v1.0.73 497 | Compiling libc v0.2.96 498 | Compiling cfg-if v1.0.0 499 | Compiling autocfg v1.0.1 500 | Compiling value-bag v1.0.0-alpha.6 501 | Compiling log v0.4.14 502 | Compiling serde v1.0.126 503 | Compiling serde_derive v1.0.126 504 | Compiling byteorder v1.3.4 505 | Compiling scopeguard v1.1.0 506 | Compiling memchr v2.3.4 507 | Compiling futures v0.1.30 508 | Compiling typenum v1.12.0 509 | Compiling cfg-if v0.1.10 510 | Compiling getrandom v0.2.1 511 | Compiling version_check v0.9.2 512 | Compiling smallvec v1.6.1 513 | Compiling slab v0.4.2 514 | Compiling lazy_static v1.4.0 515 | Compiling futures-core v0.3.15 516 | Compiling ppv-lite86 v0.2.10 517 | Compiling pin-project-lite v0.2.4 518 | Compiling futures-io v0.3.15 519 | Compiling proc-macro-hack v0.5.19 520 | Compiling getrandom v0.1.16 521 | Compiling anyhow v1.0.40 522 | Compiling futures-sink v0.3.15 523 | Compiling proc-macro-nested v0.1.6 524 | Compiling futures-channel v0.3.15 525 | Compiling futures-task v0.3.15 526 | Compiling pin-utils v0.1.0 527 | Compiling subtle v2.4.0 528 | Compiling bytes v1.0.1 529 | Compiling static_assertions v1.1.0 530 | Compiling opaque-debug v0.3.0 531 | Compiling crunchy v0.2.2 532 | Compiling tinyvec_macros v0.1.0 533 | Compiling block-padding v0.2.1 534 | Compiling either v1.6.1 535 | Compiling arrayref v0.3.6 536 | Compiling byte-tools v0.3.1 537 | Compiling cpuid-bool v0.1.2 538 | Compiling keccak v0.1.0 539 | Compiling arrayvec v0.5.2 540 | Compiling fake-simd v0.1.2 541 | Compiling opaque-debug v0.2.3 542 | Compiling constant_time_eq v0.1.5 543 | Compiling subtle v1.0.0 544 | Compiling ryu v1.0.5 545 | Compiling radium v0.6.2 546 | Compiling serde_json v1.0.64 547 | Compiling itoa v0.4.7 548 | Compiling signature v1.2.2 549 | Compiling libm v0.2.1 550 | Compiling funty v1.1.0 551 | Compiling wyz v0.2.0 552 | Compiling ahash v0.4.7 553 | Compiling tap v1.0.0 554 | Compiling byte-slice-cast v1.0.0 555 | Compiling arrayvec v0.7.0 556 | Compiling regex-syntax v0.6.21 557 | Compiling rustc-hex v2.1.0 558 | Compiling hex v0.4.3 559 | Compiling tiny-keccak v2.0.2 560 | Compiling arrayvec v0.4.12 561 | Compiling parity-util-mem v0.9.0 562 | Compiling sp-std v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 563 | Compiling ref-cast v1.0.6 564 | Compiling parity-wasm v0.42.2 565 | Compiling slog v2.7.0 566 | Compiling adler v0.2.3 567 | Compiling zstd-safe v3.0.1+zstd.1.4.9 568 | Compiling memory_units v0.3.0 569 | Compiling downcast-rs v1.2.0 570 | Compiling ansi_term v0.12.1 571 | Compiling hash-db v0.15.2 572 | Compiling environmental v1.1.3 573 | Compiling nodrop v0.1.14 574 | Compiling rustc-hash v1.1.0 575 | Compiling async-trait v0.1.50 576 | Compiling dyn-clone v1.0.4 577 | Compiling base58 v0.1.0 578 | Compiling gimli v0.23.0 579 | Compiling object v0.22.0 580 | Compiling rustc-demangle v0.1.18 581 | Compiling convert_case v0.4.0 582 | Compiling paste v1.0.4 583 | Compiling fnv v1.0.7 584 | Compiling unicode-segmentation v1.7.1 585 | Compiling remove_dir_all v0.5.3 586 | Compiling fixedbitset v0.2.0 587 | Compiling multimap v0.8.2 588 | Compiling bitflags v1.2.1 589 | Compiling futures-timer v3.0.2 590 | Compiling matches v0.1.8 591 | Compiling semver-parser v0.7.0 592 | Compiling spin v0.5.2 593 | Compiling untrusted v0.7.1 594 | Compiling percent-encoding v2.1.0 595 | Compiling data-encoding v2.3.2 596 | Compiling pin-project-internal v0.4.27 597 | Compiling unsigned-varint v0.5.1 598 | Compiling bs58 v0.4.0 599 | Compiling asn1_der v0.7.4 600 | Compiling void v1.0.2 601 | Compiling cache-padded v1.1.1 602 | Compiling waker-fn v1.1.0 603 | Compiling parking v2.0.0 604 | Compiling fastrand v1.4.0 605 | Compiling vec-arena v1.0.0 606 | Compiling event-listener v2.5.1 607 | Compiling httparse v1.3.4 608 | Compiling bytes v0.5.6 609 | Compiling pin-project-lite v0.1.11 610 | Compiling wasm-bindgen-shared v0.2.73 611 | Compiling async-task v4.0.3 612 | Compiling atomic-waker v1.0.0 613 | Compiling pkg-config v0.3.19 614 | Compiling cpuid-bool v0.2.0 615 | Compiling ipnet v2.3.0 616 | Compiling bumpalo v3.4.0 617 | Compiling base64 v0.12.3 618 | Compiling crc32fast v1.2.1 619 | Compiling quick-error v1.2.3 620 | Compiling linked-hash-map v0.5.3 621 | Compiling try-lock v0.2.3 622 | Compiling wasm-bindgen v0.2.73 623 | Compiling match_cfg v0.1.0 624 | Compiling base64 v0.13.0 625 | Compiling nohash-hasher v0.2.0 626 | Compiling prometheus v0.11.0 627 | Compiling tower-service v0.3.0 628 | Compiling parity-send-wrapper v0.1.0 629 | Compiling httpdate v0.3.2 630 | Compiling hex_fmt v0.3.0 631 | Compiling rawpointer v0.2.1 632 | Compiling maybe-uninit v2.0.0 633 | Compiling hex-literal v0.3.1 634 | Compiling ucd-trie v0.1.3 635 | Compiling winapi v0.3.9 636 | Compiling base-x v0.2.8 637 | Compiling failure_derive v0.1.8 638 | Compiling take_mut v0.2.2 639 | Compiling same-file v1.0.6 640 | Compiling mio-named-pipes v0.1.7 641 | Compiling ip_network v0.3.4 642 | Compiling lazycell v1.3.0 643 | Compiling percent-encoding v1.0.1 644 | Compiling retain_mut v0.1.3 645 | Compiling sc-consensus-slots v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 646 | Compiling openssl-probe v0.1.2 647 | Compiling camino v1.0.4 648 | Compiling pdqselect v0.1.0 649 | Compiling futures-timer v2.0.2 650 | Compiling safe-mix v1.0.1 651 | Compiling instant v0.1.9 652 | Compiling futures-macro v0.3.15 653 | Compiling futures-util v0.3.15 654 | Compiling num-traits v0.2.14 655 | Compiling num-integer v0.1.44 656 | Compiling num-bigint v0.2.6 657 | Compiling num-rational v0.2.4 658 | Compiling miniz_oxide v0.4.3 659 | Compiling indexmap v1.6.1 660 | Compiling crossbeam-utils v0.8.1 661 | Compiling atomic v0.5.0 662 | Compiling num-complex v0.2.4 663 | Compiling crossbeam-utils v0.7.2 664 | Compiling memoffset v0.5.6 665 | Compiling crossbeam-epoch v0.8.2 666 | Compiling lock_api v0.4.2 667 | Compiling lock_api v0.3.4 668 | Compiling ckb-merkle-mountain-range v0.3.1 669 | Compiling tokio-service v0.1.0 670 | Compiling generic-array v0.14.4 671 | Compiling proc-macro-error-attr v1.0.4 672 | Compiling proc-macro-error v1.0.4 673 | Compiling unicase v2.6.0 674 | Compiling thread_local v1.0.1 675 | Compiling tracing-core v0.1.18 676 | Compiling sharded-slab v0.1.0 677 | Compiling tinyvec v1.1.1 678 | Compiling block-padding v0.1.5 679 | Compiling blake2b_simd v0.5.11 680 | Compiling blake2s_simd v0.5.11 681 | Compiling ed25519 v1.0.3 682 | Compiling hashbrown v0.9.1 683 | Compiling rlp v0.5.0 684 | Compiling wasmi-validation v0.4.0 685 | Compiling trie-root v0.16.0 686 | Compiling addr2line v0.14.1 687 | Compiling tokio-sync v0.1.8 688 | Compiling heck v0.3.2 689 | Compiling itertools v0.9.0 690 | Compiling unicode-bidi v0.3.4 691 | Compiling semver v0.9.0 692 | Compiling semver v0.6.0 693 | Compiling form_urlencoded v1.0.0 694 | Compiling concurrent-queue v1.2.2 695 | Compiling async-mutex v1.4.0 696 | Compiling async-lock v2.4.0 697 | Compiling http v0.2.2 698 | Compiling lru-cache v0.1.2 699 | Compiling linked_hash_set v0.1.4 700 | Compiling matrixmultiply v0.2.4 701 | Compiling pest v2.1.3 702 | Compiling walkdir v2.3.1 703 | Compiling unicode-normalization v0.1.16 704 | Compiling lru v0.6.5 705 | Compiling impl-rlp v0.3.0 706 | Compiling rustc_version v0.2.3 707 | Compiling build-helper v0.1.1 708 | Compiling http-body v0.3.1 709 | Compiling semver-parser v0.10.2 710 | Compiling quote v1.0.9 711 | Compiling parking_lot_core v0.8.2 712 | Compiling num_cpus v1.13.0 713 | Compiling parking_lot_core v0.7.2 714 | Compiling time v0.1.44 715 | Compiling iovec v0.1.4 716 | Compiling net2 v0.2.37 717 | Compiling nb-connect v1.0.2 718 | Compiling signal-hook-registry v1.3.0 719 | Compiling socket2 v0.3.19 720 | Compiling hostname v0.3.1 721 | Compiling socket2 v0.4.0 722 | Compiling atty v0.2.14 723 | Compiling dirs-sys v0.3.5 724 | Compiling jobserver v0.1.21 725 | Compiling regex-automata v0.1.9 726 | Compiling dns-parser v0.8.0 727 | Compiling aho-corasick v0.7.15 728 | Compiling bstr v0.2.14 729 | Compiling parity-wasm v0.32.0 730 | Compiling generic-array v0.12.3 731 | Compiling generic-array v0.13.2 732 | Compiling futures-lite v1.11.3 733 | Compiling async-channel v1.5.1 734 | Compiling quicksink v0.1.2 735 | Compiling paste-impl v0.1.18 736 | Compiling uint v0.9.0 737 | Compiling hash256-std-hasher v0.15.2 738 | Compiling idna v0.2.0 739 | Compiling idna v0.1.5 740 | Compiling bitvec v0.20.1 741 | Compiling blake2-rfc v0.2.18 742 | Compiling snow v0.7.2 743 | Compiling parking_lot_core v0.6.2 744 | Compiling parking_lot v0.9.0 745 | Compiling hyper v0.12.35 746 | Compiling smallvec v0.6.13 747 | Compiling parking_lot v0.11.1 748 | Compiling futures-cpupool v0.1.8 749 | Compiling threadpool v1.8.1 750 | Compiling rand_core v0.5.1 751 | Compiling rand_core v0.6.1 752 | Compiling parking_lot v0.10.2 753 | Compiling bytes v0.4.12 754 | Compiling signal-hook v0.1.17 755 | Compiling miow v0.3.6 756 | Compiling resolv-conf v0.7.0 757 | Compiling directories v3.0.1 758 | Compiling cc v1.0.66 759 | Compiling petgraph v0.5.1 760 | Compiling backtrace v0.3.55 761 | Compiling tokio-executor v0.1.10 762 | Compiling crossbeam-queue v0.2.3 763 | Compiling matchers v0.0.1 764 | Compiling regex v1.4.2 765 | Compiling digest v0.9.0 766 | Compiling block-buffer v0.9.0 767 | Compiling crypto-mac v0.8.0 768 | Compiling block-cipher v0.8.0 769 | Compiling universal-hash v0.4.0 770 | Compiling aead v0.3.2 771 | Compiling cipher v0.2.5 772 | Compiling digest v0.8.1 773 | Compiling block-buffer v0.7.3 774 | Compiling crypto-mac v0.7.0 775 | Compiling paste v0.1.18 776 | Compiling url v2.2.0 777 | Compiling url v1.7.2 778 | Compiling integer-sqrt v0.1.5 779 | Compiling approx v0.3.2 780 | Compiling once_cell v1.5.2 781 | Compiling synstructure v0.12.4 782 | Compiling rand_chacha v0.2.2 783 | Compiling rand_pcg v0.2.1 784 | Compiling rand_chacha v0.3.0 785 | Compiling http v0.1.21 786 | Compiling string v0.2.1 787 | Compiling tokio-buf v0.1.1 788 | Compiling ctor v0.1.19 789 | Compiling thiserror-impl v1.0.24 790 | Compiling tracing-attributes v0.1.15 791 | Compiling impl-trait-for-tuples v0.2.1 792 | Compiling sp-debug-derive v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 793 | Compiling ref-cast-impl v1.0.6 794 | Compiling dyn-clonable-impl v0.9.0 795 | Compiling derive_more v0.99.14 796 | Compiling prost-derive v0.7.0 797 | Compiling frame-support-procedural-tools-derive v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 798 | Compiling pin-project-internal v1.0.7 799 | Compiling enum-as-inner v0.3.3 800 | Compiling minicbor-derive v0.6.2 801 | Compiling libp2p-swarm-derive v0.23.0 802 | Compiling derivative v2.2.0 803 | Compiling data-encoding-macro-internal v0.1.9 804 | Compiling enumflags2_derive v0.6.4 805 | Compiling strum_macros v0.20.1 806 | Compiling enumn v0.1.3 807 | Compiling zstd-sys v1.4.20+zstd.1.4.9 808 | Compiling ring v0.16.19 809 | Compiling blake3 v0.3.7 810 | Compiling libz-sys v1.1.2 811 | Compiling sp-panic-handler v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 812 | Compiling tokio-current-thread v0.1.7 813 | Compiling tokio-timer v0.2.13 814 | Compiling crossbeam-deque v0.7.3 815 | Compiling Inflector v0.11.4 816 | Compiling sha2 v0.9.2 817 | Compiling sha3 v0.9.1 818 | Compiling sha-1 v0.9.2 819 | Compiling hmac v0.8.1 820 | Compiling pbkdf2 v0.4.0 821 | Compiling blake2 v0.9.1 822 | Compiling stream-cipher v0.7.1 823 | Compiling aes-soft v0.5.0 824 | Compiling polyval v0.4.5 825 | Compiling poly1305 v0.6.2 826 | Compiling salsa20 v0.7.2 827 | Compiling sha2 v0.8.2 828 | Compiling sha-1 v0.8.2 829 | Compiling hmac v0.7.1 830 | Compiling pbkdf2 v0.3.0 831 | Compiling chrono v0.4.19 832 | Compiling simba v0.1.5 833 | Compiling blocking v1.0.2 834 | Compiling async-executor v1.4.0 835 | Compiling zeroize_derive v1.0.1 836 | Compiling parity-util-mem-derive v0.1.0 837 | Compiling rand v0.7.3 838 | Compiling rand v0.8.3 839 | Compiling http-body v0.1.0 840 | Compiling thiserror v1.0.24 841 | Compiling dyn-clonable v0.9.0 842 | Compiling prost v0.7.0 843 | Compiling pin-project v1.0.7 844 | Compiling pin-project v0.4.27 845 | Compiling minicbor v0.8.0 846 | Compiling data-encoding-macro v0.1.10 847 | Compiling enumflags2 v0.6.4 848 | Compiling strum v0.20.0 849 | Compiling aes v0.5.0 850 | Compiling ghash v0.3.1 851 | Compiling hmac-drbg v0.2.0 852 | Compiling zeroize v1.2.0 853 | Compiling failure v0.1.8 854 | Compiling twox-hash v1.6.0 855 | Compiling cuckoofilter v0.5.0 856 | Compiling rand_distr v0.2.2 857 | Compiling statrs v0.12.0 858 | Compiling fixed-hash v0.7.0 859 | Compiling tempfile v3.2.0 860 | Compiling which v4.0.2 861 | Compiling impl-serde v0.3.1 862 | Compiling tracing-serde v0.1.2 863 | Compiling erased-serde v0.3.13 864 | Compiling toml v0.5.8 865 | Compiling cargo-platform v0.1.1 866 | Compiling semver v0.11.0 867 | Compiling prost-types v0.7.0 868 | Compiling futures-executor v0.3.15 869 | Compiling asynchronous-codec v0.6.0 870 | Compiling asynchronous-codec v0.5.0 871 | Compiling multibase v0.8.0 872 | Compiling aes-gcm v0.7.0 873 | Compiling libsecp256k1 v0.3.5 874 | Compiling wasmi v0.9.0 875 | Compiling curve25519-dalek v3.0.0 876 | Compiling curve25519-dalek v2.1.0 877 | Compiling merlin v2.0.0 878 | Compiling tiny-bip39 v0.8.0 879 | Compiling secrecy v0.7.0 880 | Compiling chacha20 v0.5.0 881 | Compiling nalgebra v0.21.1 882 | Compiling tracing v0.1.26 883 | Compiling tracing-log v0.1.2 884 | Compiling trie-db v0.22.5 885 | Compiling mio v0.6.23 886 | Compiling polling v2.0.2 887 | Compiling kv-log-macro v1.0.7 888 | Compiling trust-dns-proto v0.20.1 889 | Compiling want v0.3.0 890 | Compiling pwasm-utils v0.18.0 891 | Compiling tokio-io v0.1.13 892 | Compiling tokio-threadpool v0.1.18 893 | Compiling globset v0.4.6 894 | Compiling want v0.2.0 895 | Compiling wasm-bindgen-backend v0.2.73 896 | Compiling wasm-gc-api v0.1.11 897 | Compiling prost-build v0.7.0 898 | Compiling sp-serializer v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 899 | Compiling jsonrpc-core v15.1.0 900 | Compiling sp-chain-spec v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 901 | Compiling ethbloom v0.11.0 902 | Compiling proc-macro-crate v0.1.5 903 | Compiling proc-macro-crate v1.0.0 904 | Compiling cargo_metadata v0.12.3 905 | Compiling cargo_metadata v0.13.1 906 | Compiling futures v0.3.15 907 | Compiling unsigned-varint v0.7.0 908 | Compiling unsigned-varint v0.6.0 909 | Compiling sct v0.6.0 910 | Compiling webpki v0.21.4 911 | Compiling ed25519-dalek v1.0.1 912 | Compiling x25519-dalek v1.1.0 913 | Compiling schnorrkel v0.9.1 914 | Compiling chacha20poly1305 v0.6.0 915 | Compiling tracing-futures v0.2.5 916 | Compiling tracing-subscriber v0.2.18 917 | Compiling tokio v0.2.24 918 | Compiling mio-uds v0.6.8 919 | Compiling mio-extras v2.0.6 920 | Compiling async-io v1.3.1 921 | Compiling linregress v0.4.0 922 | Compiling trust-dns-resolver v0.20.1 923 | Compiling tokio-reactor v0.1.12 924 | Compiling tokio-codec v0.1.2 925 | Compiling h2 v0.1.26 926 | Compiling tokio-fs v0.1.7 927 | Compiling wasm-bindgen-macro-support v0.2.73 928 | Compiling jsonrpc-pubsub v15.1.0 929 | Compiling flate2 v1.0.19 930 | Compiling parity-scale-codec-derive v2.1.0 931 | Compiling multihash-derive v0.7.1 932 | Compiling jsonrpc-derive v15.1.0 933 | Compiling frame-support-procedural-tools v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 934 | Compiling max-encoded-len-derive v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 935 | Compiling sp-runtime-interface-proc-macro v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 936 | Compiling sp-api-proc-macro v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 937 | Compiling sp-npos-elections-compact v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 938 | Compiling sc-tracing-proc-macro v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 939 | Compiling sc-chain-spec-derive v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 940 | Compiling pallet-staking-reward-curve v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 941 | Compiling cumulus-pallet-parachain-system-proc-macro v0.1.0 (/build/pallets/parachain-system/proc-macro) 942 | Compiling substrate-wasm-builder v3.0.0 943 | Compiling wasm-timer v0.2.5 944 | Compiling rw-stream-sink v0.2.1 945 | Compiling yamux v0.9.0 946 | Compiling libp2p-pnet v0.20.0 947 | Compiling sp-utils v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 948 | Compiling intervalier v0.4.0 949 | Compiling exit-future v0.2.0 950 | Compiling multistream-select v0.10.0 951 | Compiling ct-logs v0.7.0 952 | Compiling rustls v0.19.1 953 | Compiling webpki-roots v0.21.0 954 | Compiling rustls v0.18.1 955 | Compiling substrate-bip39 v0.4.2 956 | Compiling tokio-util v0.3.1 957 | Compiling parity-ws v0.10.0 958 | Compiling async-global-executor v2.0.2 959 | Compiling async-process v1.0.1 960 | Compiling if-watch v0.2.0 961 | Compiling tokio-tcp v0.1.4 962 | Compiling tokio-udp v0.1.6 963 | Compiling tokio-uds v0.2.7 964 | Compiling wasm-bindgen-macro v0.2.73 965 | Compiling jsonrpc-client-transports v15.1.0 966 | Compiling soketto v0.4.2 967 | Compiling parity-scale-codec v2.1.0 968 | Compiling multihash v0.13.2 969 | Compiling frame-support-procedural v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 970 | Compiling polkadot-runtime v0.9.5 (https://github.com/paritytech/polkadot?branch=master#f094de23) 971 | Compiling futures-rustls v0.21.1 972 | Compiling rustls-native-certs v0.4.0 973 | Compiling tokio-rustls v0.14.1 974 | Compiling h2 v0.2.7 975 | Compiling async-std v1.9.0 976 | Compiling tokio v0.1.22 977 | Compiling jsonrpc-core-client v15.1.0 978 | Compiling libp2p-core v0.28.2 979 | Compiling libp2p-noise v0.30.0 980 | Compiling libp2p-floodsub v0.29.0 981 | Compiling libp2p-relay v0.2.0 982 | Compiling libp2p-identify v0.29.0 983 | Compiling libp2p-kad v0.30.0 984 | Compiling libp2p-gossipsub v0.30.0 985 | Compiling libp2p-plaintext v0.28.0 986 | Compiling sc-network v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 987 | Compiling impl-codec v0.5.0 988 | Compiling sp-storage v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 989 | Compiling sp-wasm-interface v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 990 | Compiling sp-tracing v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 991 | Compiling sp-arithmetic v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 992 | Compiling xcm v0.9.5 (https://github.com/paritytech/polkadot?branch=master#f094de23) 993 | Compiling fork-tree v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 994 | Compiling finality-grandpa v0.14.1 995 | Compiling sp-version-proc-macro v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 996 | Compiling parity-multiaddr v0.11.2 997 | Compiling cid v0.6.0 998 | Compiling hyper v0.13.9 999 | Compiling jsonrpc-server-utils v15.1.0 1000 | Compiling tokio-named-pipes v0.1.0 1001 | Compiling async-std-resolver v0.20.1 1002 | Compiling js-sys v0.3.50 1003 | Compiling primitive-types v0.9.0 1004 | Compiling sp-externalities v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1005 | Compiling substrate-prometheus-endpoint v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1006 | Compiling hyper-rustls v0.21.0 1007 | Compiling jsonrpc-ws-server v15.1.0 1008 | Compiling parity-tokio-ipc v0.4.0 1009 | Compiling jsonrpc-http-server v15.1.0 1010 | Compiling wasm-bindgen-futures v0.4.19 1011 | Compiling ethereum-types v0.11.0 1012 | Compiling max-encoded-len v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1013 | Compiling sp-runtime-interface v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1014 | Compiling jsonrpc-ipc-server v15.1.0 1015 | Compiling libp2p-swarm v0.29.0 1016 | Compiling libp2p-dns v0.28.1 1017 | Compiling libp2p-mplex v0.28.0 1018 | Compiling libp2p-wasm-ext v0.28.1 1019 | Compiling libp2p-yamux v0.32.0 1020 | Compiling libp2p-deflate v0.28.0 1021 | Compiling libp2p-uds v0.28.0 1022 | Compiling libp2p-tcp v0.28.0 1023 | Compiling libp2p-websocket v0.29.0 1024 | Compiling libp2p-request-response v0.11.0 1025 | Compiling libp2p-ping v0.29.0 1026 | Compiling libp2p-mdns v0.30.0 1027 | Compiling sp-core v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1028 | Compiling memory-db v0.26.0 1029 | Compiling kvdb v0.9.0 1030 | Compiling libp2p v0.37.1 1031 | Compiling sp-keystore v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1032 | Compiling frame-metadata v13.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1033 | Compiling sp-allocator v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1034 | Compiling sp-npos-elections v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1035 | Compiling sp-rpc v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1036 | Compiling sp-trie v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1037 | Compiling sp-database v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1038 | Compiling kvdb-memorydb v0.9.0 1039 | Compiling sc-telemetry v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1040 | Compiling sc-peerset v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1041 | Compiling sp-state-machine v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1042 | Compiling zstd v0.6.1+zstd.1.4.9 1043 | Compiling sp-maybe-compressed-blob v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1044 | Compiling substrate-wasm-builder v4.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1045 | Compiling statemine-runtime v1.0.0 (/build/polkadot-parachains/statemine-runtime) 1046 | Compiling sp-io v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1047 | Compiling sc-executor-common v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1048 | Compiling sp-application-crypto v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1049 | Compiling sp-tasks v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1050 | Compiling sc-executor-wasmi v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1051 | Compiling sp-runtime v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1052 | Compiling sc-keystore v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1053 | Compiling sp-version v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1054 | Compiling sp-inherents v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1055 | Compiling sp-staking v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1056 | Compiling sp-consensus-slots v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1057 | Compiling polkadot-core-primitives v0.9.5 (https://github.com/paritytech/polkadot?branch=master#f094de23) 1058 | Compiling sp-consensus-vrf v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1059 | Compiling sc-rpc-server v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1060 | Compiling slot-range-helper v0.9.5 (https://github.com/paritytech/polkadot?branch=master#f094de23) 1061 | Compiling sp-keyring v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1062 | Compiling sp-api v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1063 | Compiling sp-authorship v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1064 | Compiling sp-transaction-storage-proof v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1065 | Compiling frame-support v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1066 | Compiling polkadot-parachain v0.9.5 (https://github.com/paritytech/polkadot?branch=master#f094de23) 1067 | Compiling sp-consensus v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1068 | Compiling sp-timestamp v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1069 | Compiling sc-executor v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1070 | Compiling sp-session v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1071 | Compiling sp-authority-discovery v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1072 | Compiling sp-block-builder v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1073 | Compiling sp-finality-grandpa v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1074 | Compiling sp-offchain v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1075 | Compiling beefy-primitives v0.1.0 (https://github.com/paritytech/grandpa-bridge-gadget?branch=master#910a83de) 1076 | Compiling frame-system-rpc-runtime-api v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1077 | Compiling sp-blockchain v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1078 | Compiling sp-consensus-babe v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1079 | Compiling sp-consensus-aura v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1080 | Compiling frame-system v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1081 | Compiling xcm-executor v0.9.5 (https://github.com/paritytech/polkadot?branch=master#f094de23) 1082 | Compiling frame-try-runtime v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1083 | Compiling sp-transaction-pool v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1084 | Compiling frame-benchmarking v3.1.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1085 | Compiling polkadot-primitives v0.9.5 (https://github.com/paritytech/polkadot?branch=master#f094de23) 1086 | Compiling pallet-authorship v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1087 | Compiling frame-election-provider-support v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1088 | Compiling pallet-transaction-payment v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1089 | Compiling pallet-mmr-primitives v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1090 | Compiling pallet-vesting v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1091 | Compiling frame-executive v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1092 | Compiling pallet-elections-phragmen v4.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1093 | Compiling pallet-utility v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1094 | Compiling pallet-nicks v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1095 | Compiling pallet-proxy v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1096 | Compiling pallet-indices v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1097 | Compiling pallet-multisig v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1098 | Compiling pallet-randomness-collective-flip v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1099 | Compiling pallet-collective v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1100 | Compiling node-primitives v2.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1101 | Compiling pallet-sudo v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1102 | Compiling sc-client-api v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1103 | Compiling sc-transaction-graph v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1104 | Compiling sc-rpc-api v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1105 | Compiling pallet-timestamp v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1106 | Compiling pallet-balances v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1107 | Compiling pallet-identity v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1108 | Compiling pallet-democracy v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1109 | Compiling pallet-membership v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1110 | Compiling pallet-scheduler v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1111 | Compiling pallet-uniques v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1112 | Compiling pallet-assets v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1113 | Compiling pallet-xcm v0.1.0 (https://github.com/paritytech/polkadot?branch=master#f094de23) 1114 | Compiling cumulus-primitives-core v0.1.0 (/build/primitives/core) 1115 | Compiling pallet-im-online v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1116 | Compiling pallet-election-provider-multi-phase v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1117 | Compiling pallet-transaction-payment-rpc-runtime-api v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1118 | Compiling xcm-builder v0.9.5 (https://github.com/paritytech/polkadot?branch=master#f094de23) 1119 | Compiling pallet-mmr v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1120 | Compiling sc-block-builder v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1121 | Compiling sc-consensus v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1122 | Compiling sc-consensus-uncles v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1123 | Compiling sc-state-db v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1124 | Compiling sc-tracing v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1125 | Compiling sc-light v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1126 | Compiling sc-transaction-pool v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1127 | Compiling pallet-session v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1128 | Compiling pallet-treasury v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1129 | Compiling pallet-offences v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1130 | Compiling cumulus-test-relay-sproof-builder v0.1.0 (/build/test/relay-sproof-builder) 1131 | Compiling cumulus-pallet-xcm v0.1.0 (/build/pallets/xcm) 1132 | Compiling parachain-info v0.1.0 (/build/polkadot-parachains/pallets/parachain-info) 1133 | Compiling cumulus-primitives-timestamp v0.1.0 (/build/primitives/timestamp) 1134 | Compiling cumulus-pallet-dmp-queue v0.1.0 (/build/pallets/dmp-queue) 1135 | Compiling cumulus-primitives-utility v0.1.0 (/build/primitives/utility) 1136 | Compiling cumulus-pallet-xcmp-queue v0.1.0 (/build/pallets/xcmp-queue) 1137 | Compiling sc-consensus-epochs v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1138 | Compiling sc-client-db v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1139 | Compiling sc-rpc v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1140 | Compiling pallet-staking v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1141 | Compiling pallet-authority-discovery v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1142 | Compiling pallet-beefy v0.1.0 (https://github.com/paritytech/grandpa-bridge-gadget?branch=master#910a83de) 1143 | Compiling pallet-babe v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1144 | Compiling pallet-grandpa v3.1.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1145 | Compiling pallet-aura v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1146 | Compiling pallet-collator-selection v3.0.0 (/build/pallets/collator-selection) 1147 | Compiling cumulus-pallet-session-benchmarking v3.0.0 (/build/pallets/session-benchmarking) 1148 | Compiling pallet-tips v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1149 | Compiling pallet-bounties v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1150 | Compiling cumulus-ping v0.1.0 (/build/polkadot-parachains/pallets/ping) 1151 | Compiling sc-consensus-babe v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1152 | Compiling sc-network-gossip v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1153 | Compiling sc-offchain v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1154 | Compiling sc-informant v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1155 | Compiling polkadot-runtime-parachains v0.9.5 (https://github.com/paritytech/polkadot?branch=master#f094de23) 1156 | Compiling cumulus-pallet-aura-ext v0.1.0 (/build/pallets/aura-ext) 1157 | Compiling sc-finality-grandpa v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1158 | Compiling polkadot-runtime-common v0.9.5 (https://github.com/paritytech/polkadot?branch=master#f094de23) 1159 | Compiling sc-chain-spec v3.0.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1160 | Compiling statemint-common v1.0.0 (/build/polkadot-parachains/statemint-common) 1161 | Compiling sc-service v0.9.0 (https://github.com/paritytech/substrate?branch=master#4d9f03d3) 1162 | Compiling polkadot-client v0.9.3 (https://github.com/paritytech/polkadot?branch=master#f094de23) 1163 | Compiling cumulus-primitives-parachain-inherent v0.1.0 (/build/primitives/parachain-inherent) 1164 | Compiling cumulus-pallet-parachain-system v0.1.0 (/build/pallets/parachain-system) 1165 | Finished release [optimized] target(s) in 20m 33s 1166 | ✨ Your Substrate WASM Runtime is ready! ✨ 1167 | {"gen":"srtool v0.9.15","src":"git","version":"0.9.7","commit":"5d35bac7408a4cb12a578764217d06f3920b36aa","tag":"v0.9.7-rc3","branch":"heads/v0.9.7-rc3","rustc":"rustc 1.53.0 (53cb7b09b 2021-06-17)","pkg":"polkadot-runtime","tmsp":"2021-06-29T16:12:59Z","size":"2093380","prop":"0x424ac5063ce844b878cd418e7d4c0e5518a6323ec0c54f744b1fb44a2ab24dcd","ipfs":"QmeBgekBhZHNCkrayDgQaLXfAoLibS5Eq2fyEv4rzbttTo","sha256":"0x5f31cd25a9de645f278f18b008f38edad5b3253c1b94dc71a12da48c27dd1581","wasm":"runtime/polkadot/target/srtool/release/wbuild/polkadot-runtime/polkadot_runtime.compact.wasm","info":{"generator":{"name":"srtool","version":"0.9.15"},"src":"git","version":"0.9.7","git":{"commit":"5d35bac7408a4cb12a578764217d06f3920b36aa","tag":"v0.9.7-rc3","branch":"heads/v0.9.7-rc3"},"rustc":"rustc 1.53.0 (53cb7b09b 2021-06-17)","pkg":"polkadot-runtime","profile":"release"},"context":{"package":"polkadot-runtime","runtime_dir":"runtime/polkadot","docker":{"image":"chevdor/srtool","tag":"1.53.0"},"profile":"release"},"runtimes":{"compact":{"tmsp":"2021-06-29T16:12:24Z","size":"2093380","prop":"0x424ac5063ce844b878cd418e7d4c0e5518a6323ec0c54f744b1fb44a2ab24dcd","blake2_256":"0xc5daf28ebf7f23c8de92a99a6c15b84abeaf12d226542e7504febaf0d1484e05","ipfs":"QmeBgekBhZHNCkrayDgQaLXfAoLibS5Eq2fyEv4rzbttTo","sha256":"0x5f31cd25a9de645f278f18b008f38edad5b3253c1b94dc71a12da48c27dd1581","wasm":"runtime/polkadot/target/srtool/release/wbuild/polkadot-runtime/polkadot_runtime.compact.wasm","subwasm":{"size":2093380,"compression":{"size_compressed":2093380,"size_decompressed":2093380,"compressed":false},"reserved_meta":[109,101,116,97],"reserved_meta_valid":true,"metadata_version":13,"core_version":"polkadot-9070 (parity-polkadot-0.tx7.au0)","proposal_hash":"0x424ac5063ce844b878cd418e7d4c0e5518a6323ec0c54f744b1fb44a2ab24dcd","ipfs_hash":"QmeBgekBhZHNCkrayDgQaLXfAoLibS5Eq2fyEv4rzbttTo","blake2_256":"0xc5daf28ebf7f23c8de92a99a6c15b84abeaf12d226542e7504febaf0d1484e05"}},"compressed":{"tmsp":"2021-06-23T20:22:41Z","size":"613213","prop":"0x73470f4dcc83d491eac816248ac0c91557087f82d123db2c1a5ee098977b0d41","blake2_256":"0xb8708536646e506c95716bbbaa0a51edbaaf19070c8ba401ef4c0002b308224b","ipfs":"QmSX3Kho3TWrZUmywLiyWDwDgbuK9uvXixjuFjFREiaUGg","sha256":"0x9b30d5a053ce48f0ac5a3909a72fe9881a43c21d22f1462bb54f0de6e6e19288","wasm":"runtime/polkadot/target/srtool/release/wbuild/polkadot-runtime/polkadot_runtime.compact.compressed.wasm","subwasm":{"size":2087945,"compression":{"size_compressed":613213,"size_decompressed":2087945,"compressed":true},"reserved_meta":[109,101,116,97],"reserved_meta_valid":true,"metadata_version":13,"core_version":"polkadot-9051 (parity-polkadot-0.tx7.au0)","proposal_hash":"0x73470f4dcc83d491eac816248ac0c91557087f82d123db2c1a5ee098977b0d41","ipfs_hash":"QmSX3Kho3TWrZUmywLiyWDwDgbuK9uvXixjuFjFREiaUGg","blake2_256":"0xb8708536646e506c95716bbbaa0a51edbaaf19070c8ba401ef4c0002b308224b"}}}} 1168 | -------------------------------------------------------------------------------- /doc/sample-output-compact-only.json: -------------------------------------------------------------------------------- 1 | { 2 | "gen": "srtool v{version}", 3 | "src": "git", 4 | "version": "0.9.7", 5 | "commit": "5d35bac7408a4cb12a578764217d06f3920b36aa", 6 | "tag": "v0.9.7-rc3", 7 | "branch": "heads/v0.9.7-rc3", 8 | "rustc": "rustc {rsversion} (...)", 9 | "pkg": "polkadot-runtime", 10 | "tmsp": "2021-06-29T16:12:59Z", 11 | "size": "2093380", 12 | "prop": "0x424ac5063ce844b878cd418e7d4c0e5518a6323ec0c54f744b1fb44a2ab24dcd", 13 | "ipfs": "QmeBgekBhZHNCkrayDgQaLXfAoLibS5Eq2fyEv4rzbttTo", 14 | "sha256": "0x5f31cd25a9de645f278f18b008f38edad5b3253c1b94dc71a12da48c27dd1581", 15 | "wasm": "runtime/polkadot/target/srtool/release/wbuild/polkadot-runtime/polkadot_runtime.compact.wasm", 16 | "info": { 17 | "generator": { 18 | "name": "srtool", 19 | "version": "{version}" 20 | }, 21 | "src": "git", 22 | "version": "0.9.7", 23 | "git": { 24 | "commit": "5d35bac7408a4cb12a578764217d06f3920b36aa", 25 | "tag": "v0.9.7-rc3", 26 | "branch": "heads/v0.9.7-rc3" 27 | }, 28 | "rustc": "rustc {rsversion} (...)", 29 | "pkg": "polkadot-runtime", 30 | "profile": "release" 31 | }, 32 | "context": { 33 | "package": "polkadot-runtime", 34 | "runtime_dir": "runtime/polkadot", 35 | "docker": { 36 | "image": "chevdor/srtool", 37 | "tag": "1.53.0" 38 | }, 39 | "profile": "release" 40 | }, 41 | "runtimes": { 42 | "compact": { 43 | "tmsp": "2021-06-29T16:12:24Z", 44 | "size": "2093380", 45 | "prop": "0x424ac5063ce844b878cd418e7d4c0e5518a6323ec0c54f744b1fb44a2ab24dcd", 46 | "blake2_256": "0xc5daf28ebf7f23c8de92a99a6c15b84abeaf12d226542e7504febaf0d1484e05", 47 | "ipfs": "QmeBgekBhZHNCkrayDgQaLXfAoLibS5Eq2fyEv4rzbttTo", 48 | "sha256": "0x5f31cd25a9de645f278f18b008f38edad5b3253c1b94dc71a12da48c27dd1581", 49 | "wasm": "runtime/polkadot/target/srtool/release/wbuild/polkadot-runtime/polkadot_runtime.compact.wasm", 50 | "subwasm": { 51 | "size": 2093380, 52 | "compression": { 53 | "size_compressed": 2093380, 54 | "size_decompressed": 2093380, 55 | "compressed": false 56 | }, 57 | "reserved_meta": [ 58 | 109, 59 | 101, 60 | 116, 61 | 97 62 | ], 63 | "reserved_meta_valid": true, 64 | "metadata_version": 13, 65 | "core_version": "polkadot-9070 (parity-polkadot-0.tx7.au0)", 66 | "proposal_hash": "0x424ac5063ce844b878cd418e7d4c0e5518a6323ec0c54f744b1fb44a2ab24dcd", 67 | "ipfs_hash": "QmeBgekBhZHNCkrayDgQaLXfAoLibS5Eq2fyEv4rzbttTo", 68 | "blake2_256": "0xc5daf28ebf7f23c8de92a99a6c15b84abeaf12d226542e7504febaf0d1484e05" 69 | } 70 | }, 71 | "compressed": { } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /doc/sample-output-compressed.json: -------------------------------------------------------------------------------- 1 | { 2 | "gen": "srtool v{version}", 3 | "src": "git", 4 | "version": "0.9.7", 5 | "commit": "5d35bac7408a4cb12a578764217d06f3920b36aa", 6 | "tag": "v0.9.7-rc3", 7 | "branch": "heads/v0.9.7-rc3", 8 | "rustc": "rustc {rsversion} (...)", 9 | "pkg": "polkadot-runtime", 10 | "tmsp": "2021-06-29T16:12:59Z", 11 | "size": "2093380", 12 | "prop": "0x424ac5063ce844b878cd418e7d4c0e5518a6323ec0c54f744b1fb44a2ab24dcd", 13 | "ipfs": "QmeBgekBhZHNCkrayDgQaLXfAoLibS5Eq2fyEv4rzbttTo", 14 | "sha256": "0x5f31cd25a9de645f278f18b008f38edad5b3253c1b94dc71a12da48c27dd1581", 15 | "wasm": "runtime/polkadot/target/srtool/release/wbuild/polkadot-runtime/polkadot_runtime.compact.wasm", 16 | "info": { 17 | "generator": { 18 | "name": "srtool", 19 | "version": "{version}" 20 | }, 21 | "src": "git", 22 | "version": "0.9.7", 23 | "git": { 24 | "commit": "5d35bac7408a4cb12a578764217d06f3920b36aa", 25 | "tag": "v0.9.7-rc3", 26 | "branch": "heads/v0.9.7-rc3" 27 | }, 28 | "rustc": "rustc {rsversion} (...)", 29 | "pkg": "polkadot-runtime", 30 | "profile": "release" 31 | }, 32 | "context": { 33 | "package": "polkadot-runtime", 34 | "runtime_dir": "runtime/polkadot", 35 | "docker": { 36 | "image": "chevdor/srtool", 37 | "tag": "1.53.0" 38 | }, 39 | "profile": "release" 40 | }, 41 | "runtimes": { 42 | "compact": { 43 | "tmsp": "2021-06-29T16:12:24Z", 44 | "size": "2093380", 45 | "prop": "0x424ac5063ce844b878cd418e7d4c0e5518a6323ec0c54f744b1fb44a2ab24dcd", 46 | "blake2_256": "0xc5daf28ebf7f23c8de92a99a6c15b84abeaf12d226542e7504febaf0d1484e05", 47 | "ipfs": "QmeBgekBhZHNCkrayDgQaLXfAoLibS5Eq2fyEv4rzbttTo", 48 | "sha256": "0x5f31cd25a9de645f278f18b008f38edad5b3253c1b94dc71a12da48c27dd1581", 49 | "wasm": "runtime/polkadot/target/srtool/release/wbuild/polkadot-runtime/polkadot_runtime.compact.wasm", 50 | "subwasm": { 51 | "size": 2093380, 52 | "compression": { 53 | "size_compressed": 2093380, 54 | "size_decompressed": 2093380, 55 | "compressed": false 56 | }, 57 | "reserved_meta": [ 58 | 109, 59 | 101, 60 | 116, 61 | 97 62 | ], 63 | "reserved_meta_valid": true, 64 | "metadata_version": 13, 65 | "core_version": "polkadot-9070 (parity-polkadot-0.tx7.au0)", 66 | "proposal_hash": "0x424ac5063ce844b878cd418e7d4c0e5518a6323ec0c54f744b1fb44a2ab24dcd", 67 | "ipfs_hash": "QmeBgekBhZHNCkrayDgQaLXfAoLibS5Eq2fyEv4rzbttTo", 68 | "blake2_256": "0xc5daf28ebf7f23c8de92a99a6c15b84abeaf12d226542e7504febaf0d1484e05" 69 | } 70 | }, 71 | "compressed": { 72 | "tmsp": "2021-06-23T20:22:41Z", 73 | "size": "613213", 74 | "prop": "0x73470f4dcc83d491eac816248ac0c91557087f82d123db2c1a5ee098977b0d41", 75 | "blake2_256": "0xb8708536646e506c95716bbbaa0a51edbaaf19070c8ba401ef4c0002b308224b", 76 | "ipfs": "QmSX3Kho3TWrZUmywLiyWDwDgbuK9uvXixjuFjFREiaUGg", 77 | "sha256": "0x9b30d5a053ce48f0ac5a3909a72fe9881a43c21d22f1462bb54f0de6e6e19288", 78 | "wasm": "runtime/polkadot/target/srtool/release/wbuild/polkadot-runtime/polkadot_runtime.compact.compressed.wasm", 79 | "subwasm": { 80 | "size": 2087945, 81 | "compression": { 82 | "size_compressed": 613213, 83 | "size_decompressed": 2087945, 84 | "compressed": true 85 | }, 86 | "reserved_meta": [ 87 | 109, 88 | 101, 89 | 116, 90 | 97 91 | ], 92 | "reserved_meta_valid": true, 93 | "metadata_version": 13, 94 | "core_version": "polkadot-9051 (parity-polkadot-0.tx7.au0)", 95 | "proposal_hash": "0x73470f4dcc83d491eac816248ac0c91557087f82d123db2c1a5ee098977b0d41", 96 | "ipfs_hash": "QmSX3Kho3TWrZUmywLiyWDwDgbuK9uvXixjuFjFREiaUGg", 97 | "blake2_256": "0xb8708536646e506c95716bbbaa0a51edbaaf19070c8ba401ef4c0002b308224b" 98 | } 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /doc/sample-output-zip.json: -------------------------------------------------------------------------------- 1 | { 2 | "gen": "srtool v{version}", 3 | "src": "zip", 4 | "version": "1.2.3", 5 | "commit": "56b9e95a9b634695f59a7c699bc68a5cfb695f03", 6 | "tag": "moonriver-genesis", 7 | "branch": "master", 8 | "rustc": "rustc {rsversion} (...)", 9 | "docker_image": "chevdor/srtool", 10 | "docker_tag": "nightly-2021-06-20", 11 | "pkg": "moonriver-runtime", 12 | "tmsp": "2021-06-15T17:48:34Z", 13 | "size": "2081495", 14 | "prop": "0x63a4e0751531b190a910a1d5ae3e7d196f26451014c71455dd708eac05a9d5d6", 15 | "ipfs": "QmVAVAHMak2zTm3sjNiZXmrZHofQBTxQx7PBooPsRp22R1", 16 | "sha256": "0x9d00f4c83ad2bbec37e6d9e9bc2a4aecaeeebbf24f68b69766ba6851b4745173", 17 | "wasm": "runtime/moonriver/target/srtool/release/wbuild/moonriver-runtime/moonriver_runtime.compact.wasm", 18 | "runtimes": { 19 | "compact": { 20 | "tmsp": "2021-06-15T17:48:17Z", 21 | "size": "2081495", 22 | "prop": "0x63a4e0751531b190a910a1d5ae3e7d196f26451014c71455dd708eac05a9d5d6", 23 | "blake2_256": "0x6acb9ca6508efba0791551d4acaa3f2089b019c9a38434a9b1011d3a2dbf9453", 24 | "ipfs": "QmVAVAHMak2zTm3sjNiZXmrZHofQBTxQx7PBooPsRp22R1", 25 | "sha256": "0x9d00f4c83ad2bbec37e6d9e9bc2a4aecaeeebbf24f68b69766ba6851b4745173", 26 | "wasm": "/build/runtime/moonriver/target/srtool/release/wbuild/moonriver-runtime/moonriver_runtime.compact.wasm", 27 | "subwasm": { 28 | "size": 2081495, 29 | "compression": { 30 | "size_compressed": 2081495, 31 | "size_decompressed": 2081495, 32 | "compressed": false 33 | }, 34 | "reserved_meta": [ 35 | 109, 36 | 101, 37 | 116, 38 | 97 39 | ], 40 | "reserved_meta_valid": true, 41 | "metadata_version": 13, 42 | "core_version": "moonriver-51 (moonriver-1.tx2.au3)", 43 | "proposal_hash": "0x63a4e0751531b190a910a1d5ae3e7d196f26451014c71455dd708eac05a9d5d6", 44 | "ipfs_hash": "QmVAVAHMak2zTm3sjNiZXmrZHofQBTxQx7PBooPsRp22R1", 45 | "blake2_256": "0x6acb9ca6508efba0791551d4acaa3f2089b019c9a38434a9b1011d3a2dbf9453" 46 | } 47 | }, 48 | "compressed": { 49 | "tmsp": "2021-06-15T17:48:17Z", 50 | "size": "608158", 51 | "prop": "0x63a4e0751531b190a910a1d5ae3e7d196f26451014c71455dd708eac05a9d5d6", 52 | "blake2_256": "0x6acb9ca6508efba0791551d4acaa3f2089b019c9a38434a9b1011d3a2dbf9453", 53 | "ipfs": "QmVAVAHMak2zTm3sjNiZXmrZHofQBTxQx7PBooPsRp22R1", 54 | "sha256": "0x7659960c8e875f2a3fdcfd95ec029b28019344a88eeb7bfd278e0c1a39ce4546", 55 | "wasm": "/build/runtime/moonriver/target/srtool/release/wbuild/moonriver-runtime/moonriver_runtime.compact.compressed.wasm", 56 | "subwasm": { 57 | "size": 2081495, 58 | "compression": { 59 | "size_compressed": 608158, 60 | "size_decompressed": 2081495, 61 | "compressed": true 62 | }, 63 | "reserved_meta": [ 64 | 109, 65 | 101, 66 | 116, 67 | 97 68 | ], 69 | "reserved_meta_valid": true, 70 | "metadata_version": 13, 71 | "core_version": "moonriver-51 (moonriver-1.tx2.au3)", 72 | "proposal_hash": "0x63a4e0751531b190a910a1d5ae3e7d196f26451014c71455dd708eac05a9d5d6", 73 | "ipfs_hash": "QmVAVAHMak2zTm3sjNiZXmrZHofQBTxQx7PBooPsRp22R1", 74 | "blake2_256": "0x6acb9ca6508efba0791551d4acaa3f2089b019c9a38434a9b1011d3a2dbf9453" 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /doc/sample-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "gen": "srtool v{version}", 3 | "src": "git", 4 | "version": "1.0.0", 5 | "commit": "85cad2ef48f123d7475385b00d113bc900324ad6", 6 | "tag": "statemine-v1.0.0", 7 | "branch": "wk-gh-actions", 8 | "rustc": "rustc {rsversion} (...)", 9 | "pkg": "statemine-runtime", 10 | "tmsp": "2021-06-22T18:08:50Z", 11 | "size": "1538747", 12 | "prop": "0xaf313fb7d1fb37d75080de43d0a0a3c06801c2be302d16f560b1acf1bda53c28", 13 | "ipfs": "QmRkiTxXEhT8Goxx7Vv2RwRuHV3ZD3AAQhFBovYFuKtaCE", 14 | "sha256": "0x0fa6fc0110e95bcf61a828d146d1e5a683664415d2c10755875ad3943f42b001", 15 | "wasm": "polkadot-parachains/statemine-runtime/target/srtool/release/wbuild/statemine-runtime/statemine_runtime.compact.wasm", 16 | "info": { 17 | "generator": { 18 | "name": "srtool", 19 | "version": "{version}" 20 | }, 21 | "src": "git", 22 | "version": "1.0.0", 23 | "git": { 24 | "commit": "85cad2ef48f123d7475385b00d113bc900324ad6", 25 | "tag": "statemine-v1.0.0", 26 | "branch": "wk-gh-actions" 27 | }, 28 | "rustc": "rustc {rsversion} (...)", 29 | "pkg": "statemine-runtime", 30 | "profile": "release" 31 | }, 32 | "context": { 33 | "package": "statemine-runtime", 34 | "runtime_dir": "polkadot-parachains/statemine-runtime", 35 | "docker": { 36 | "image": "chevdor/srtool", 37 | "tag": "nightly-2021-06-20" 38 | }, 39 | "profile": "release" 40 | }, 41 | "runtimes": { 42 | "compact": { 43 | "tmsp": "2021-06-22T18:08:30Z", 44 | "size": "1538747", 45 | "prop": "0xaf313fb7d1fb37d75080de43d0a0a3c06801c2be302d16f560b1acf1bda53c28", 46 | "blake2_256": "0x9cf51f8803bc2181ffbc6a9b9c91cd3471e6050b2fb3ed6146d1cad21ad4dd4d", 47 | "ipfs": "QmRkiTxXEhT8Goxx7Vv2RwRuHV3ZD3AAQhFBovYFuKtaCE", 48 | "sha256": "0x0fa6fc0110e95bcf61a828d146d1e5a683664415d2c10755875ad3943f42b001", 49 | "wasm": "/build/polkadot-parachains/statemine-runtime/target/srtool/release/wbuild/statemine-runtime/statemine_runtime.compact.wasm", 50 | "subwasm": { 51 | "size": 1538747, 52 | "compression": { 53 | "size_compressed": 1538747, 54 | "size_decompressed": 1538747, 55 | "compressed": false 56 | }, 57 | "reserved_meta": [ 58 | 109, 59 | 101, 60 | 116, 61 | 97 62 | ], 63 | "reserved_meta_valid": true, 64 | "metadata_version": 13, 65 | "core_version": "statemine-1 (statemine-1.tx1.au1)", 66 | "proposal_hash": "0xaf313fb7d1fb37d75080de43d0a0a3c06801c2be302d16f560b1acf1bda53c28", 67 | "ipfs_hash": "QmRkiTxXEhT8Goxx7Vv2RwRuHV3ZD3AAQhFBovYFuKtaCE", 68 | "blake2_256": "0x9cf51f8803bc2181ffbc6a9b9c91cd3471e6050b2fb3ed6146d1cad21ad4dd4d" 69 | } 70 | }, 71 | "compressed": { 72 | "tmsp": "2021-06-22T18:08:30Z", 73 | "size": "452258", 74 | "prop": "0xaf313fb7d1fb37d75080de43d0a0a3c06801c2be302d16f560b1acf1bda53c28", 75 | "blake2_256": "0x9cf51f8803bc2181ffbc6a9b9c91cd3471e6050b2fb3ed6146d1cad21ad4dd4d", 76 | "ipfs": "QmRkiTxXEhT8Goxx7Vv2RwRuHV3ZD3AAQhFBovYFuKtaCE", 77 | "sha256": "0x90d8a93bfa6d69ea0a2ac1c8983e5777f3af10b0ca8506cd86c8de9ec0f462b8", 78 | "wasm": "/build/polkadot-parachains/statemine-runtime/target/srtool/release/wbuild/statemine-runtime/statemine_runtime.compact.compressed.wasm", 79 | "subwasm": { 80 | "size": 1538747, 81 | "compression": { 82 | "size_compressed": 452258, 83 | "size_decompressed": 1538747, 84 | "compressed": true 85 | }, 86 | "reserved_meta": [ 87 | 109, 88 | 101, 89 | 116, 90 | 97 91 | ], 92 | "reserved_meta_valid": true, 93 | "metadata_version": 13, 94 | "core_version": "statemine-1 (statemine-1.tx1.au1)", 95 | "proposal_hash": "0xaf313fb7d1fb37d75080de43d0a0a3c06801c2be302d16f560b1acf1bda53c28", 96 | "ipfs_hash": "QmRkiTxXEhT8Goxx7Vv2RwRuHV3ZD3AAQhFBovYFuKtaCE", 97 | "blake2_256": "0x9cf51f8803bc2181ffbc6a9b9c91cd3471e6050b2fb3ed6146d1cad21ad4dd4d" 98 | } 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /doc/sample-output.txt: -------------------------------------------------------------------------------- 1 | ✨ Your Substrate WASM Runtime is ready! ✨ 2 | Summary: 3 | Generator : srtool v{version} 4 | Version : null 5 | GIT commit : 56b9e95a9b634695f59a7c699bc68a5cfb695f03 6 | GIT tag : moonriver-genesis 7 | GIT branch : master 8 | Rustc : rustc 1.53.0-nightly (657bc0188 2021-05-31) 9 | Package : moonriver-runtime 10 | Time : 2021-06-15T17:44:58Z 11 | === Compact: 12 | Size : 2032 KB (2081495 bytes) 13 | Proposal : 0x63a4e0751531b190a910a1d5ae3e7d196f26451014c71455dd708eac05a9d5d6 14 | IPFS : QmVAVAHMak2zTm3sjNiZXmrZHofQBTxQx7PBooPsRp22R1 15 | SHA256 : 0x9d00f4c83ad2bbec37e6d9e9bc2a4aecaeeebbf24f68b69766ba6851b4745173 16 | Wasm : runtime/moonriver/target/srtool/release/wbuild/moonriver-runtime/moonriver_runtime.compact.wasm 17 | === Compressed: 18 | Size : 2032 KB (2081495 bytes) 19 | Proposal : 0x63a4e0751531b190a910a1d5ae3e7d196f26451014c71455dd708eac05a9d5d6 20 | IPFS : QmVAVAHMak2zTm3sjNiZXmrZHofQBTxQx7PBooPsRp22R1 21 | SHA256 : 0x9d00f4c83ad2bbec37e6d9e9bc2a4aecaeeebbf24f68b69766ba6851b4745173 22 | Wasm : runtime/moonriver/target/srtool/release/wbuild/moonriver-runtime/moonriver_runtime.compact.wasm 23 | -------------------------------------------------------------------------------- /doc/scan.adoc: -------------------------------------------------------------------------------- 1 | 2 | == Scan 3 | 4 | `srtool` includes a command that helps finding runtimes in a repo. 5 | 6 | [subs="attributes+"] 7 | ---- 8 | REPO=/projects/polkadot-sdk 9 | # or 10 | # REPO=fellowship-runtimes 11 | podman run --rm -it \ 12 | -v $REPO:/build \ 13 | `{name}:{rsversion}-{version}` scan 14 | ---- 15 | -------------------------------------------------------------------------------- /doc/zsh.adoc: -------------------------------------------------------------------------------- 1 | 2 | == ZSH/ Zinit users 3 | 4 | If you're using `zsh` and `zinit`, you may benefit from using the srtool snippet maintained https://gitlab.com/chevdor/dotfiles/-/tree/master/zsh-plugins[here]. 5 | 6 | To do so, add the following to your `zshconfig`: 7 | 8 | ``` 9 | MY_REPO="https://gitlab.com/chevdor/dotfiles/-/raw/master/zsh-plugins" 10 | for plugin (git cargo srtool); {<1> 11 | SNIPPET="$MY_REPO/$plugin/$plugin.plugin.zsh" 12 | zinit snippet $SNIPPET 13 | } 14 | ``` 15 | <1> Chose the snippets you want, the one called `srtool` here is the interesting one. 16 | 17 | After that, make sure to: 18 | - upgrade your snippets: `zplugin update --all` 19 | - restart/source your shell: `. ~/.zshrc` 20 | -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- 1 | set positional-arguments 2 | export RUSTC_VERSION:=`cat RUSTC_VERSION` 3 | export REGISTRY:="docker.io" 4 | export REPO:="paritytech/srtool" 5 | export TAG:=`cat VERSION` 6 | export COMMIT:=`git rev-parse --short HEAD` 7 | 8 | _default: 9 | @just --choose --chooser "fzf +s -x --tac --cycle" 10 | 11 | # Runs a system prune to ensure we have the resources to build the image 12 | cleanup: 13 | $ENGINE system prune -f 14 | 15 | # Build the container image 16 | build: 17 | @echo Building $REPO:$RUSTC_VERSION 18 | @echo If you encounter issues, try running \`just cleanup\` and try building again. 19 | @echo Any arg you pass is forward to 'podman build'... You can pass'`--no-cache' for instance 20 | $ENGINE build $@ --build-arg RUSTC_VERSION=$RUSTC_VERSION \ 21 | -t $REGISTRY/chevdor/srtool:$RUSTC_VERSION-$TAG-$COMMIT \ 22 | -t $REGISTRY/$REPO:$RUSTC_VERSION-$TAG \ 23 | -t $REGISTRY/$REPO \ 24 | -t $REGISTRY/${REPO#*/} \ 25 | . 26 | $ENGINE images | grep srtool 27 | 28 | # Build and Publish the container image 29 | publish: build 30 | @echo Pushing podman image $REPO:$RUSTC_VERSION 31 | $ENGINE push $REGISTRY/$REPO:$RUSTC_VERSION 32 | 33 | # Set a git tag 34 | tag: 35 | @echo Tagging v$TAG 36 | @git tag v$TAG -f 37 | @git tag | sort --version-sort -r | head 38 | 39 | # Push git tag 40 | tag_push: 41 | @echo Pushing tag v$TAG 42 | @git push origin v$TAG -f 43 | 44 | # Generate the readme as .md 45 | md: 46 | asciidoctor -b docbook -a leveloffset=+1 -o - README_src.adoc | pandoc --markdown-headings=atx --wrap=preserve -t markdown_strict -f docbook - > README.md 47 | 48 | # Show version 49 | info: 50 | @echo RUSTC_VERSION=$RUSTC_VERSION 51 | @echo REPO=$REPO 52 | @echo TAG=$TAG 53 | 54 | # Quick test 55 | test_quick *args='': 56 | container-structure-test test --image $REPO:$RUSTC_VERSION-$TAG --config tests/quick.yaml --verbosity debug "$@" 57 | 58 | # Test ACL 59 | test_acl *args='': 60 | container-structure-test test --image $REPO:$RUSTC_VERSION-$TAG --config tests/acl.yaml --verbosity debug "$@" 61 | 62 | # Container test that takes longer 63 | test_long *args='': 64 | container-structure-test test --image $REPO:$RUSTC_VERSION-$TAG --config tests/long.yaml --verbosity debug "$@" 65 | 66 | # Test commands 67 | test_commands *args='': 68 | container-structure-test test --image $REPO:$RUSTC_VERSION-$TAG --config tests/commands.yaml --verbosity debug "$@" 69 | 70 | # Test all 71 | test_all: 72 | #!/usr/bin/env bash 73 | TESTS=$(find tests -type f | sed -e 's/^/ --config /g' | tr -d '\n') 74 | container-structure-test test --image srtool --verbosity info ${TESTS} 75 | 76 | # Scan the srtool image for vuln 77 | scan: 78 | #!/usr/bin/env bash 79 | echo "scanning $REPO:$RUSTC_VERSION-$TAG" 80 | trivy image $REPO:$RUSTC_VERSION-$TAG 81 | -------------------------------------------------------------------------------- /resources/Frame 1_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paritytech/srtool/c046e2114ad8c190f044e16a58571db5a7bf3d2c/resources/Frame 1_256.png -------------------------------------------------------------------------------- /resources/Frame 1_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paritytech/srtool/c046e2114ad8c190f044e16a58571db5a7bf3d2c/resources/Frame 1_512.png -------------------------------------------------------------------------------- /resources/logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paritytech/srtool/c046e2114ad8c190f044e16a58571db5a7bf3d2c/resources/logo-white.png -------------------------------------------------------------------------------- /resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paritytech/srtool/c046e2114ad8c190f044e16a58571db5a7bf3d2c/resources/logo.png -------------------------------------------------------------------------------- /resources/srtool-docker_128px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paritytech/srtool/c046e2114ad8c190f044e16a58571db5a7bf3d2c/resources/srtool-docker_128px.png -------------------------------------------------------------------------------- /resources/srtool-docker_512px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paritytech/srtool/c046e2114ad8c190f044e16a58571db5a7bf3d2c/resources/srtool-docker_512px.png -------------------------------------------------------------------------------- /scripts/analyse.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | WASM=$1 4 | WASM_FULLPATH=/build/$WASM 5 | 6 | SZ=`du -sb $WASM_FULLPATH | awk '{print $1}'` 7 | PROP=`subwasm -j info $WASM_FULLPATH | jq -r .proposal_hash` 8 | AUTHORIZE_UPGRADE_PROP=`subwasm -j info $WASM_FULLPATH | jq -r .parachain_authorize_upgrade_hash` 9 | MULTIHASH=`subwasm -j info $WASM_FULLPATH | jq -r .ipfs_hash` 10 | SHA256=0x`shasum -a 256 $WASM_FULLPATH | awk '{print $1}'` 11 | TMSP=$(date --utc +%FT%TZ -d @$(stat -c "%Y" $WASM_FULLPATH)) 12 | BLAKE2_256=`subwasm -j info $WASM_FULLPATH | jq -r .blake2_256` 13 | SUBWASM=`subwasm -j info $WASM_FULLPATH` 14 | 15 | JSON=$( jq -n \ 16 | --arg tmsp "$TMSP" \ 17 | --arg size "$SZ" \ 18 | --arg prop "$PROP" \ 19 | --arg authorize_upgrade_prop "$AUTHORIZE_UPGRADE_PROP" \ 20 | --arg blake2_256 "$BLAKE2_256" \ 21 | --arg ipfs "$MULTIHASH" \ 22 | --arg sha256 "$SHA256" \ 23 | --arg wasm "$WASM" \ 24 | --argjson subwasm "$SUBWASM" \ 25 | '{ 26 | tmsp: $tmsp, 27 | size: $size, 28 | prop: $prop, 29 | authorize_upgrade_prop: $authorize_upgrade_prop, 30 | blake2_256: $blake2_256, 31 | ipfs: $ipfs, 32 | sha256: $sha256, 33 | wasm: $wasm, 34 | subwasm: $subwasm 35 | }' ) 36 | 37 | echo $JSON | jq -cM 38 | -------------------------------------------------------------------------------- /scripts/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | export CDIR=`dirname "$0"` 3 | . "$CARGO_HOME/env" 4 | . "$CDIR/lib.sh" 5 | 6 | # echo $PATH 7 | 8 | # If the user sends a SIGINT, we want to exit the entire script 9 | trap "exit" INT 10 | 11 | # This is where docker expects our substrate/polkadot repo to be 12 | cd /build 13 | 14 | export VERSION=`cat /srtool/VERSION || echo 0.0.0` 15 | export GEN="srtool v$VERSION" 16 | export LATEST_VERSION=$(curl -L -s https://github.com/paritytech/srtool/raw/master/VERSION) 17 | 18 | vercomp "$LATEST_VERSION" "$VERSION" 19 | 20 | case $? in 21 | 0) op='=';; 22 | 1) op='>';; 23 | 2) op='<';; 24 | esac 25 | 26 | if [[ "$op" == ">" && ! "$*" == *"--json"* ]]; then 27 | echo "_____________________________________________________________________________________" 28 | echo "" 29 | echo " You are using srtool v$VERSION. A newer version: v$LATEST_VERSION is now available." 30 | echo " You should upgrade asap with the following command:" 31 | echo " docker images | grep srtool | awk '{ print \$3 }' | xargs docker rmi --force" 32 | echo "_____________________________________________________________________________________" 33 | fi 34 | 35 | # echo $VERSION $op $LATEST_VERSION 36 | # if [[ "$op" == "=" ]]; then 37 | # echo "You are using the latest version of srtool: v$VERSION" 38 | # fi 39 | 40 | # if [[ "$op" == "<" ]]; then 41 | # echo "You are using srtool v$VERSION, it looks newer than the latest version :)" 42 | # fi 43 | 44 | if [[ ! "$*" =~ --json || "$*" =~ --app ]]; then 45 | echo "🧰 Substrate Runtime Toolbox - $GEN 🧰" 46 | echo " - by Chevdor -" 47 | fi 48 | 49 | if [ ! -z "$VERBOSE" ]; then 50 | echo "Checking cache size. Give it a few seconds..." 51 | echo -e "📦 Cache size:" `du -sh $HOME/.cargo` 52 | fi 53 | 54 | # The following is to prevent user's overrides to disturb srtool 55 | rustup override set $RUSTC_VERSION 56 | rustup target add wasm32-unknown-unknown 57 | rustup component add rust-src 58 | 59 | export RUSTCV=`rustc -V` 60 | 61 | if [[ ! "$*" =~ --json || "$*" =~ --app ]]; then 62 | echo -e "🏗 Building $PACKAGE as $PROFILE using $RUSTCV" 63 | echo -e "⏳ That can take a little while, be patient... subsequent builds may be faster." 64 | echo -e " Since you have to wait a little, you may want to learn more about Substrate runtimes:" 65 | echo -e " https://docs.substrate.io/learn/architecture/" 66 | fi 67 | 68 | # Build the runtime 69 | if [[ "$*" =~ --app ]]; then 70 | COLOR=never 71 | else 72 | COLOR=always 73 | fi 74 | 75 | # As of https://github.com/paritytech/polkadot/pull/2522 we need to cd to the 76 | # runtime directory itself 77 | export RUNTIME_NAME="${PACKAGE/-runtime/}" 78 | export GET_OPTS_CMD="/srtool/getBuildOpts.sh" 79 | export GET_OPTS=`$GET_OPTS_CMD` 80 | export BUILD_OPTS="${BUILD_OPTS:-${GET_OPTS}}" 81 | export PROFILE="${PROFILE:-release}" 82 | export RUNTIME_DIR="${RUNTIME_DIR:-runtime/$RUNTIME_NAME}" 83 | # export RUSTC_BOOTSTRAP=1 84 | 85 | # We check a few things before spending too much time building... 86 | 87 | # srtool only makes sense when called from a Cargo folder so we check that 88 | if [ ! -f "/build/$RUNTIME_DIR/Cargo.toml" ]; then 89 | echo "!!! The RUNTIME_DIR '$RUNTIME_DIR' does not look like a Cargo project. Is it pointing to the folder of your runtime crate?" 90 | exit 1 91 | fi 92 | 93 | CRATE_VERSION=$(get_runtime_package_version "$PACKAGE") 94 | CRATE_NAME=`toml get "/build/$RUNTIME_DIR/Cargo.toml" package.name | jq -r` 95 | 96 | if [[ $CRATE_NAME != "$PACKAGE" ]]; then 97 | echo "!!! The PACKAGE '$PACKAGE' does not match the crate name at '$RUNTIME_DIR'." 98 | if [ ! -z "$CRATE_NAME" ]; then 99 | echo "Did you mean '$CRATE_NAME'?" 100 | fi 101 | exit 1 102 | fi 103 | 104 | if [[ "$*" == *"--json"* && ! "$*" =~ --app ]]; then 105 | INT_OPTS="--quiet" 106 | else 107 | INT_OPTS="" 108 | fi 109 | 110 | if [[ "$*" == *"--json"* && ! "$*" =~ --app ]]; then 111 | INT_OPTS="--quiet" 112 | else 113 | INT_OPTS="" 114 | fi 115 | 116 | pushd "$RUNTIME_DIR" > /dev/null || exit 1 117 | # TODO: --out-dir /out would be handy but still unstable. 118 | # See https://doc.rust-lang.org/cargo/commands/cargo-build.html#output-options 119 | CMD="cargo build --locked ${INT_OPTS} ${BUILD_OPTS} --color=$COLOR --profile $PROFILE --target-dir target/srtool" 120 | if [ ! -z "$VERBOSE" ]; then 121 | echo "Command run:" 122 | echo "$CMD" 123 | time $CMD || exit 1 124 | else 125 | if [[ "$*" == *"--json"* && ! "$*" =~ --app ]]; then 126 | $CMD > /dev/null 2>&1 || exit 1 127 | else 128 | $CMD 2>&1 || exit 1 129 | fi 130 | fi 131 | PKG_FILENAME=${PACKAGE//-/_} 132 | WASM=`find "target/srtool/$PROFILE/wbuild/$PACKAGE" -type f -name "${PKG_FILENAME}.compact.wasm"` 133 | Z_WASM=`find "target/srtool/$PROFILE/wbuild/$PACKAGE" -type f -name "${PKG_FILENAME}.compact.compressed.wasm"` 134 | popd > /dev/null || exit 1 135 | 136 | if [[ ! "$*" =~ --json || "$*" =~ --app ]]; then 137 | echo "✨ Your Substrate WASM Runtime is ready! ✨" 138 | fi 139 | 140 | export WASM=$RUNTIME_DIR/$WASM 141 | cp -f "$WASM" /out/ 142 | if [ "$Z_WASM" ]; then 143 | export Z_WASM=$RUNTIME_DIR/$Z_WASM 144 | cp -f "$Z_WASM" /out/ 145 | fi 146 | 147 | if [[ ! "$*" =~ --json || "$*" =~ --app ]]; then 148 | echo "✨ WASM : $WASM" 149 | echo "✨ Z_WASM: $Z_WASM" 150 | fi 151 | 152 | Z_WASM_JSON=$(subwasm -j info "$Z_WASM") 153 | SZ=`du -sb "$Z_WASM" | awk '{print $1}'` 154 | TMSP=`date --utc +%FT%TZ` 155 | SHA256=0x`shasum -a 256 "$Z_WASM" | awk '{print $1}'` 156 | PROP=`echo "$Z_WASM_JSON" | jq -r .proposal_hash` 157 | AUTHORIZE_UPGRADE_PROP=`echo "$Z_WASM_JSON" | jq -r .parachain_authorize_upgrade_hash` 158 | MULTIHASH=`echo "$Z_WASM_JSON" | jq -r .ipfs_hash` 159 | 160 | # If we work on a snapshot, we will NOT get a .git folder to work on 161 | if [ -d ".git" ]; then 162 | SRC='git' 163 | GIT_TAG=`git describe --tags --abbrev=0` 164 | GIT_COMMIT_REF=`git rev-parse HEAD` 165 | GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` 166 | else 167 | SRC='zip' 168 | fi 169 | 170 | COMPACT_DETAILS=`/srtool/analyse.sh "$WASM" | tail -n 1` 171 | 172 | if [ "$Z_WASM" ]; then 173 | COMPRESSED_DETAILS=`/srtool/analyse.sh "$Z_WASM" | tail -n 1` 174 | else 175 | COMPRESSED_DETAILS={} 176 | fi 177 | 178 | INFO=$(/srtool/info -cM | tail -n 1) 179 | CONTEXT=$(/srtool/getContext.sh | tail -n 1) 180 | 181 | JSON=$( jq -n \ 182 | --arg gen "$GEN" \ 183 | --arg cargo_version "$CRATE_VERSION" \ 184 | --arg rustc "$RUSTCV" \ 185 | --arg pkg "$PACKAGE" \ 186 | --arg bytes "$SZ" \ 187 | --arg wasm "$WASM" \ 188 | --arg z_wasm "$Z_WASM" \ 189 | --arg prop "$PROP" \ 190 | --arg authorize_upgrade_prop "$AUTHORIZE_UPGRADE_PROP" \ 191 | --arg sha256 "$SHA256" \ 192 | --arg tmsp "$TMSP" \ 193 | --arg git_tag "$GIT_TAG" \ 194 | --arg git_commit_ref "$GIT_COMMIT_REF" \ 195 | --arg git_branch "$GIT_BRANCH" \ 196 | --arg src "$SRC" \ 197 | --arg ipfs "$MULTIHASH" \ 198 | --argjson info "$INFO" \ 199 | --argjson context "$CONTEXT" \ 200 | --argjson compact "$COMPACT_DETAILS" \ 201 | --argjson compressed "$COMPRESSED_DETAILS" \ 202 | '{ 203 | gen: $gen, 204 | src: $src, 205 | version: $cargo_version, 206 | commit: $git_commit_ref, 207 | tag: $git_tag, 208 | branch: $git_branch, 209 | rustc: $rustc, 210 | pkg: $pkg, 211 | tmsp: $tmsp, 212 | size: $bytes, 213 | prop: $prop, 214 | authorize_upgrade_prop: $authorize_upgrade_prop, 215 | ipfs: $ipfs, 216 | sha256: $sha256, 217 | wasm: $z_wasm, 218 | 219 | info: $info, 220 | context: $context, 221 | 222 | runtimes: { 223 | compact: $compact, 224 | compressed: $compressed 225 | } 226 | }' ) 227 | 228 | if [[ "$*" =~ --json || "$*" =~ --app ]]; then 229 | # if using --app, the json output fits on a single line 230 | if [[ "$*" == *"--app"* ]]; then 231 | echo "$JSON" | jq -cM 232 | else 233 | echo "$JSON" | jq 234 | fi 235 | 236 | if [[ "$*" == *"--save"* ]]; then 237 | REPORT="./target/srtool/srtool-wasm-report-$TMSP.txt" 238 | echo "$JSON" > $REPORT 239 | echo "Report saved in $REPORT" 240 | fi 241 | else 242 | echo $JSON | tera --template /srtool/templates/output.txt --stdin --env --fail-on-collision 243 | fi 244 | -------------------------------------------------------------------------------- /scripts/getBuildOpts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | CDIR=`dirname "$0"` 3 | source "/srtool/lib.sh" 4 | 5 | # This script helps since version v0.8.30. Starting with this version 6 | # a few feature has been introduced and is highly required to build 7 | # 0.8.30 and above for Polkadot and Kusama. 8 | # Lower version however, do not support this feature. 9 | # 10 | # This script checks the project version and return to stdout either: 11 | # - nothing for version up to 0.8.30 excluded 12 | # - --features on-chain-release-build for 0.8.30 and up for Kusama and Polkadot 13 | 14 | # NOTE: We start using the new feature only if Cargo.toml contains version 15 | # 0.8.30 or above. That means that commit after the feature was introduced 16 | # and until Cargo.toml is updated will likely not work. 17 | # srtool cannot count on the source to be a git repo. 18 | 19 | # PKG_VERSION=`toml get Cargo.toml package.version | jq -r` 20 | PKG_VERSION=$(get_runtime_package_version "$PACKAGE") 21 | 22 | REF_VERSION="0.8.30" 23 | DEFAULT_FEATURES="${DEFAULT_FEATURES:---features on-chain-release-build}" 24 | 25 | if [[ "$PACKAGE" =~ ^(kusama|polkadot)-runtime$ ]]; then 26 | vercomp "$PKG_VERSION" "$REF_VERSION" 27 | case $? in 28 | 0) opts="${DEFAULT_FEATURES}";; 29 | 1) opts="${DEFAULT_FEATURES}";; 30 | 2) opts="";; 31 | esac 32 | else 33 | opts="" 34 | fi 35 | 36 | echo -n $opts 37 | -------------------------------------------------------------------------------- /scripts/getContext.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script provide all context (usually from the ENV) and returns it as a piece 4 | # of json we can append to the srtool final output 5 | 6 | JSON=$( jq -n \ 7 | --arg package "$PACKAGE" \ 8 | --arg runtime_dir "$RUNTIME_DIR" \ 9 | --arg docker_image "$DOCKER_IMAGE" \ 10 | --arg docker_tag "$RUSTC_VERSION" \ 11 | --arg profile "$PROFILE" \ 12 | '{ 13 | package: $package, 14 | runtime_dir: $runtime_dir, 15 | docker: { 16 | image: $docker_image, 17 | tag: $docker_tag 18 | }, 19 | profile: $profile, 20 | }' ) 21 | 22 | echo $JSON | jq -cM -------------------------------------------------------------------------------- /scripts/help: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$HOME/.bashrc" 3 | 4 | cat /srtool/help.txt 5 | -------------------------------------------------------------------------------- /scripts/help.txt: -------------------------------------------------------------------------------- 1 | Welcome to srtool: the Substrate Runtime Toolbox 🧰 2 | 3 | First of all, make sure you are in your Substrate/Polkadot repo: 4 | 5 | cd /my/project/substrate 6 | 7 | Read the documentation at https://github.com/paritytech/srtool for more details. 8 | You may use one of the following commands: 9 | $ export PACKAGE=kusama-runtime 10 | $ srtool version 11 | $ srtool info 12 | $ srtool build 13 | 14 | The last one is when you can go grab a coffee. 15 | -------------------------------------------------------------------------------- /scripts/info: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | . "$CARGO_HOME/env" 4 | 5 | # This script returns all the build information available *BEFORE* having to run the build 6 | # So you get a summary of data such as git repo, package name, rustc version, etc... 7 | # but you will not get the runtime, its hash, etc... 8 | 9 | VERSION=`cat /srtool/VERSION || echo 0.0.0` 10 | RUSTCV=`rustc -V` 11 | PROFILE="${PROFILE:-release}" 12 | 13 | cd /build/ 14 | 15 | if git describe --all > /dev/null 2>&1; then 16 | SRC='git' 17 | GIT_TAG=`git describe --tags --abbrev=0 > /dev/null 2>&1;` 18 | GIT_COMMIT_REF=`git rev-parse HEAD` 19 | GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` 20 | else 21 | SRC='zip' 22 | fi 23 | 24 | # We use the Cargo.lock to benefit from workspace version inheritance when appropriate 25 | CARGO_VERSION=`toml get Cargo.lock . | jq -r '.package[] | select(.name == "'"$PACKAGE"'") | .version'` 26 | 27 | if [[ "$CARGO_VERSION" =~ 'workspace' ]]; then 28 | : 29 | fi 30 | 31 | JSON=$( jq -n \ 32 | --arg gen "srtool" \ 33 | --arg version "$VERSION" \ 34 | --arg rustc "$RUSTCV" \ 35 | --arg pkg "$PACKAGE" \ 36 | --arg profile "$PROFILE" \ 37 | --arg git_tag "$GIT_TAG" \ 38 | --arg git_commit_ref "$GIT_COMMIT_REF" \ 39 | --arg git_branch "$GIT_BRANCH" \ 40 | --arg cargo_version "$CARGO_VERSION" \ 41 | --arg src "$SRC" \ 42 | '{ 43 | generator: { 44 | name: $gen, 45 | version: $version 46 | }, 47 | src: $src, 48 | version: $cargo_version, 49 | git: { 50 | commit: $git_commit_ref, 51 | tag: $git_tag, 52 | branch: $git_branch, 53 | }, 54 | rustc: $rustc, 55 | pkg: $pkg, 56 | profile: $profile, 57 | }' ) 58 | 59 | echo "$JSON" | jq $@ 60 | -------------------------------------------------------------------------------- /scripts/lib.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # A function to compare semver versions 4 | vercomp() { 5 | if [[ $1 == $2 ]]; then 6 | return 0 7 | fi 8 | local IFS=. 9 | local i ver1=($1) ver2=($2) 10 | # fill empty fields in ver1 with zeros 11 | for ((i = ${#ver1[@]}; i < ${#ver2[@]}; i++)); do 12 | ver1[i]=0 13 | done 14 | for ((i = 0; i < ${#ver1[@]}; i++)); do 15 | if [[ -z ${ver2[i]} ]]; then 16 | # fill empty fields in ver2 with zeros 17 | ver2[i]=0 18 | fi 19 | if ((10#${ver1[i]} > 10#${ver2[i]})); then 20 | return 1 21 | fi 22 | if ((10#${ver1[i]} < 10#${ver2[i]})); then 23 | return 2 24 | fi 25 | done 26 | return 0 27 | } 28 | 29 | # Get the version of the runtime package 30 | get_runtime_package_version() { 31 | PACKAGE=$1 32 | toml get Cargo.lock . | jq -r '.package[] | select(.name == "'"$PACKAGE"'") | .version' 33 | } 34 | 35 | function relative_parent() { 36 | echo "$1" | sed -E 's/(.*)\/(.*)\/\.\./\1/g' 37 | } 38 | 39 | # Find all the runtimes, it returns the result as JSON object, compatible to be 40 | # used as Github Workflow Matrix. This call is exposed by the `scan` command and can be used as: 41 | # podman run --rm -it -v /.../fellowship-runtimes:/build docker.io/chevdor/srtool:1.70.0-0.11.1 scan 42 | function find_runtimes() { 43 | libs=($(git grep -I -r --cached --max-depth 20 --files-with-matches '[frame_support::runtime]!' -- '*lib.rs')) 44 | re=".*-runtime$" 45 | JSON=$(jq --null-input '{ "include": [] }') 46 | 47 | # EXCLUDED_RUNTIMES is a space separated list of runtime names (without the -runtime postfix) 48 | # EXCLUDED_RUNTIMES=${EXCLUDED_RUNTIMES:-"substrate-test"} 49 | IFS=' ' read -r -a exclusions <<< "$EXCLUDED_RUNTIMES" 50 | 51 | for lib in "${libs[@]}"; do 52 | crate_dir=$(dirname "$lib") 53 | cargo_toml="$crate_dir/../Cargo.toml" 54 | 55 | name=$(toml get -r $cargo_toml 'package.name') 56 | chain=${name//-runtime/} 57 | 58 | if [[ "$name" =~ $re ]] && ! [[ ${exclusions[@]} =~ $chain ]]; then 59 | lib_dir=$(dirname "$lib") 60 | runtime_dir=$(relative_parent "$lib_dir/..") 61 | ITEM=$(jq --null-input \ 62 | --arg chain "$chain" \ 63 | --arg name "$name" \ 64 | --arg runtime_dir "$runtime_dir" \ 65 | '{ "chain": $chain, "crate": $name, "runtime_dir": $runtime_dir }') 66 | JSON=$(echo $JSON | jq ".include += [$ITEM]") 67 | fi 68 | done 69 | echo $JSON 70 | } 71 | -------------------------------------------------------------------------------- /scripts/scan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | export CDIR=`dirname "$0"` 3 | . "$CARGO_HOME/env" 4 | . "$CDIR/lib.sh" 5 | 6 | # This script scans for runtimes. 7 | 8 | TARGET=${1:-/build/} 9 | cd "$TARGET" 10 | 11 | find_runtimes | jq 12 | -------------------------------------------------------------------------------- /scripts/version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source "$HOME/.bashrc" 3 | 4 | VERSION=`cat /srtool/VERSION` 5 | RUSTC_VERSION=`cat /srtool/RUSTC_VERSION` 6 | SUBWASM_VERSION=$(subwasm --version | awk '{ print $2}') 7 | TERA_VERSION=$(tera --version | awk '{ print $2}') 8 | TOML_VERSION=$(toml --version | awk '{ print $2}') 9 | 10 | jq -n $@ \ 11 | --arg name srtool \ 12 | --arg version "$VERSION" \ 13 | --arg rustc "$RUSTC_VERSION" \ 14 | --arg subwasm "$SUBWASM_VERSION" \ 15 | --arg tera "$TERA_VERSION" \ 16 | --arg toml "$TOML_VERSION" \ 17 | '{ 18 | name: $name, 19 | version: $version, 20 | rustc: $rustc, 21 | subwasm: $subwasm, 22 | tera: $tera, 23 | toml: $toml 24 | }' 25 | -------------------------------------------------------------------------------- /templates/changelog.md: -------------------------------------------------------------------------------- 1 | {% if commits | length %} 2 | ## Changes since {{ since }} 3 | 4 | {% for commit in commits %} 5 | {%- set s = commit.message | split(pat=":") -%} 6 | {% if s | length > 1 -%} 7 | - {{ commit.short_sha }}: {{ s.0 }} -{{ s.1 }} 8 | {% else -%} 9 | - {{ commit.short_sha }}: {{ commit.message }} 10 | {% endif -%} 11 | {%- endfor %} 12 | 13 | {% endif -%} 14 | -------------------------------------------------------------------------------- /templates/output.txt: -------------------------------------------------------------------------------- 1 | Summary generated with {{ gen }} using the docker image {{ context.docker.image }}:{{ context.docker.tag}}: 2 | Package : {{ pkg }} v{{ version }} 3 | {%- if src == 'git' %} 4 | GIT commit : {{ commit }} 5 | GIT tag : {{ tag }} 6 | GIT branch : {{ branch }} 7 | {%- else %} 8 | No GIT information. You are likely running srtool on an archive. 9 | {%- endif %} 10 | Rustc : {{ rustc }} 11 | Time : {{ tmsp }} 12 | 13 | == Compact 14 | Version : {{ runtimes.compact.subwasm.core_version.specName }}-{{ runtimes.compact.subwasm.core_version.specVersion }} ({{ runtimes.compact.subwasm.core_version.implName }}-{{ runtimes.compact.subwasm.core_version.implVersion }}.tx{{ runtimes.compact.subwasm.core_version.transactionVersion }}.au{{ runtimes.compact.subwasm.core_version.authoringVersion }}) 15 | Metadata : V{{ runtimes.compact.subwasm.metadata_version }} 16 | Size : {{ runtimes.compact.size | int | filesizeformat }} ({{ runtimes.compact.size }} bytes) 17 | setCode : {{ runtimes.compact.prop }} 18 | authorizeUpgrade : {{ runtimes.compact.authorize_upgrade_prop }} 19 | IPFS : {{ runtimes.compact.ipfs }} 20 | BLAKE2_256 : {{ runtimes.compact.blake2_256 }} 21 | Wasm : {{ runtimes.compact.wasm }} 22 | 23 | == Compressed 24 | {%- if runtimes.compressed %} 25 | {%- set ratio = 100 - (( runtimes.compressed.subwasm.compression.size_compressed / runtimes.compressed.subwasm.compression.size_decompressed) ) * 100 %} 26 | Version : {{ runtimes.compressed.subwasm.core_version.specName }}-{{ runtimes.compressed.subwasm.core_version.specVersion }} ({{ runtimes.compressed.subwasm.core_version.implName }}-{{ runtimes.compressed.subwasm.core_version.implVersion }}.tx{{ runtimes.compressed.subwasm.core_version.transactionVersion }}.au{{ runtimes.compressed.subwasm.core_version.authoringVersion }}) 27 | Metadata : V{{ runtimes.compressed.subwasm.metadata_version }} 28 | Size : {{ runtimes.compressed.size | int | filesizeformat }} ({{ runtimes.compressed.size }} bytes) 29 | Compression : {{ ratio | round(method="ceil", precision=2) }}% 30 | setCode : {{ runtimes.compressed.prop }} 31 | authorizeUpgrade : {{ runtimes.compressed.authorize_upgrade_prop }} 32 | IPFS : {{ runtimes.compressed.ipfs }} 33 | BLAKE2_256 : {{ runtimes.compressed.blake2_256 }} 34 | Wasm : {{ runtimes.compressed.wasm }} 35 | {% else %} 36 | No compressed runtime found 37 | {% endif %} 38 | -------------------------------------------------------------------------------- /templates/release.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | The SRTOOL Docker image has been tagged as: 4 | 5 | - `{{ REPO }}:{{ RUSTC_VERSION }}` 6 | - `{{ REPO }}:{{ RUSTC_VERSION }}-{{ SRTOOL_VERSION }}` 7 | 8 | You can find it on [Docker Hub](https://hub.docker.com/r/{{ REPO }}). 9 | 10 | Prefer using `{{ REPO }}:{{ RUSTC_VERSION }}` unless you **really must** pin a specific version or use an ancient version for some reason. Specifying the version (`{{ SRTOOL_VERSION }}`) is not recommended. 11 | 12 | {{ CHANGELOG }} 13 | -------------------------------------------------------------------------------- /tests/acl.yaml: -------------------------------------------------------------------------------- 1 | schemaVersion: '2.0.0' 2 | 3 | commandTests: 4 | - name: "rustup-home" 5 | setup: [] 6 | command: "bash" 7 | args: 8 | - -c 9 | - | 10 | cd /home/builder/rustup 11 | mkdir test 12 | exitCode: 0 13 | 14 | - name: "cargo-home" 15 | setup: [] 16 | command: "bash" 17 | args: 18 | - -c 19 | - | 20 | cd /home/builder/cargo 21 | mkdir test 22 | exitCode: 0 23 | 24 | - name: "/build" 25 | setup: [] 26 | command: "bash" 27 | args: 28 | - -c 29 | - | 30 | cd /build 31 | mkdir test 32 | exitCode: 0 33 | 34 | - name: "/out" 35 | setup: [] 36 | command: "bash" 37 | args: 38 | - -c 39 | - | 40 | cd /out 41 | mkdir test 42 | exitCode: 0 43 | 44 | - name: "polkadot-runtime" 45 | setup: [] 46 | command: "bash" 47 | args: 48 | - -c 49 | - | 50 | export TARGET=/build/runtime/polkadot 51 | mkdir -p $TARGET 52 | cd $TARGET 53 | mkdir target 54 | exitCode: 0 55 | -------------------------------------------------------------------------------- /tests/commands.yaml: -------------------------------------------------------------------------------- 1 | schemaVersion: '2.0.0' 2 | 3 | commandTests: 4 | - name: "version" 5 | setup: [] 6 | command: "version" 7 | args: 8 | - -cM 9 | expectedOutput: ["version"] 10 | - name: "info" 11 | setup: [] 12 | command: "info" 13 | args: 14 | - -cM 15 | expectedOutput: ["generator"] 16 | - name: "help" 17 | setup: [] 18 | command: "help" 19 | args: [] 20 | expectedOutput: ["documentation"] 21 | -------------------------------------------------------------------------------- /tests/long.yaml: -------------------------------------------------------------------------------- 1 | schemaVersion: '2.0.0' 2 | globalEnvVars: 3 | - key: RUSTC_VERSION 4 | value: 1.60.0 5 | - key: PACKAGE 6 | value: kusama-runtime 7 | 8 | commandTests: 9 | - name: Pwd 10 | command: pwd 11 | expectedOutput: ["/srtool"] 12 | - name: Git 13 | command: git 14 | args: ["--version"] 15 | expectedOutput: ["git version"] 16 | 17 | # - name: "Build" 18 | # # setup: [["echo", "setup"],["ls", "-al"], ["git","clone", "https://github.com/paritytech/polkadot", "/build/"]] 19 | # command: "bash" 20 | # args: 21 | # - -c 22 | # - | 23 | # set -e 24 | # git clone https://github.com/paritytech/polkadot /build/ 25 | # ls -al /build 26 | # exitCode: 0 27 | -------------------------------------------------------------------------------- /tests/quick.yaml: -------------------------------------------------------------------------------- 1 | schemaVersion: '2.0.0' 2 | 3 | # Quick set of tests 4 | fileExistenceTests: 5 | - name: 'Check srtool build script' 6 | path: '/srtool/build' 7 | shouldExist: true 8 | uid: 0 9 | gid: 0 10 | isExecutableBy: other 11 | commandTests: 12 | - name: "root" 13 | setup: [] 14 | command: "whoami" 15 | args: [] 16 | expectedOutput: ["builder"] 17 | - name: "uid" 18 | setup: [] 19 | command: "id" 20 | args: ["-u"] 21 | expectedOutput: ["1001"] 22 | - name: "gid" 23 | setup: [] 24 | command: "id" 25 | args: ["-g"] 26 | expectedOutput: ["1001"] 27 | - name: "apt-get upgrade" 28 | command: "apt-get" 29 | args: ["-qqs", "upgrade"] 30 | excludedOutput: [".*Inst.*Security.* | .*Security.*Inst.*"] 31 | excludedError: [".*Inst.*Security.* | .*Security.*Inst.*"] 32 | - name: Patch build 33 | command: "bash" 34 | args: ["-c", "echo foo >> /srtool/build"] 35 | exitCode: 1 36 | metadataTest: 37 | envVars: 38 | - key: DOCKER_IMAGE 39 | value: paritytech/srtool 40 | - key: RUSTC_VERSION 41 | value: '^\d+\.\d+\.\d+$' 42 | isRegex: true 43 | labels: 44 | - key: maintainer 45 | value: chevdor@gmail.com 46 | 47 | exposedPorts: [] 48 | volumes: [ "/build", 49 | "/home/builder/cargo", 50 | "/out" ] 51 | entrypoint: [] 52 | cmd: ["/srtool/build"] 53 | workdir: "/srtool" 54 | user: "builder" 55 | --------------------------------------------------------------------------------