-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,6 @@ | |
set -eo pipefail | ||
|
||
ROOTDIR=$(git rev-parse --show-toplevel) | ||
|
||
# the script is used to simulate runtime upgrade, see: | ||
# https://github.com/litentry/litentry-parachain/issues/378 | ||
|
||
# The latest state of the blockchain is scraped and used to bootstrap a chain locally via fork-off-substrate, | ||
# see ./scripts/fork-parachain-and-launch.sh | ||
# | ||
# After that, this script: | ||
# 1. get the runtime wasm | ||
# 2. do runtime upgrade using wasm from step 1 | ||
# 3. verify if the runtime upgrade is successful | ||
|
||
new_wasm=/tmp/runtime.wasm | ||
|
||
function usage() { | ||
|
@@ -95,10 +83,12 @@ print_divider | |
echo "Do runtime upgrade and verify ..." | ||
|
||
nvm install 20 | ||
nvm use 20 | ||
echo "start chopsticks: $1" | ||
npx @acala-network/[email protected] --config=$ROOTDIR/parachain/scripts/$1.yml --allow-unresolved-imports=true #--wasm-override $new_wasm | ||
npx @acala-network/[email protected] --config=$ROOTDIR/parachain/scripts/$1.yml --allow-unresolved-imports=true --wasm-override $new_wasm & | ||
PID=$! | ||
echo "Started server with PID: $PID" | ||
|
||
echo "after chopsticks: $1" | ||
new_onchain_version=$(curl -s -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "state_getRuntimeVersion", "params": [] }' http://localhost:8000 | jq .result.specVersion) | ||
if [ -n "$new_onchain_version" ] && \ | ||
[ "$new_onchain_version" -ne "$release_version" ]; then | ||
|