Skip to content

Commit

Permalink
Update Proposal Hash to Whitelist Hash (#1448)
Browse files Browse the repository at this point in the history
* Update Proposal Hash to Whitelist Hash

* Detect whitelist pallet index
  • Loading branch information
fewensa authored Mar 11, 2024
1 parent ee0321d commit 9670563
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/note-template/runtime.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## {{ .Env.CHAIN | strings.Title }}
<h4 align="right">Upgrade Priority LOW :green_circle:</h4>

#### Proposal Hash
#### Whitelist Hash
```
{{ (ds "srtool").runtimes.compressed.subwasm.proposal_hash }}
{{ .Env.WHITELIST_HASH }}
```
#### Blake2 256 Hash
```
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ jobs:
curl -LO ${{ env.GOMPLATE_URL }}/${{ env.GOMPLATE_VERSION }}/${{ env.GOMPLATE }}
chmod u+x ${{ env.GOMPLATE }}
sudo mv ${{ env.GOMPLATE }} /usr/bin/gomplate
- name: Setup wuh
run: |
curl -LO https://github.com/darwinia-network/darwinia-releases/releases/download/v0.1.0/wuh.zst
zstd -d wuh.zst
chmod u+x ./wuh
sudo mv ./wuh /usr/bin/wuh
- name: Filter
run: |
SKIP_BUILD=${{ env.SKIP_BUILD }}
Expand Down Expand Up @@ -146,7 +152,15 @@ jobs:
if [ "$FILTER" == "true" ]; then
echo '${{ steps.srtool_build.outputs.json }}' | jq > build/${CHAIN}-srtool.json
mv ${{ steps.srtool_build.outputs.wasm_compressed }} build/
WASM_FILE='${{ steps.srtool_build.outputs.wasm_compressed }}'
WHITELIST_PALLET_INDEX=0x33
if [ "$CHAIN" == "crab" ]; then
WHITELIST_PALLET_INDEX=0x2f
fi
export WHITELIST_HASH=$(wuh ${WASM_FILE} ${WHITELIST_PALLET_INDEX} 0x01)
mv ${WASM_FILE} build/
cat .github/note-template/runtime.md \
| gomplate -d srtool=build/${CHAIN}-srtool.json \
Expand Down

0 comments on commit 9670563

Please sign in to comment.