Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into jeremy-spawn-cc-on-…
Browse files Browse the repository at this point in the history
…assignment
  • Loading branch information
nanocryk committed Sep 6, 2024
2 parents 1f1b95e + 1e69d2a commit cf2bd36
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/flashbox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub mod weights;
mod tests;

use {
cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases,
cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases,
cumulus_primitives_core::{relay_chain::SessionIndex, BodyId, ParaId},
frame_support::{
construct_runtime,
Expand Down Expand Up @@ -504,7 +504,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime {
type ReservedDmpWeight = ();
type XcmpMessageHandler = ();
type ReservedXcmpWeight = ();
type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases;
type CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases;
type ConsensusHook = ConsensusHook;
}

Expand Down
78 changes: 78 additions & 0 deletions test/moonwall.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,45 @@
}
]
},
{
"name": "zombie_simple_template_upgrade_with_latest_releases",
"testFileDir": ["suites/rt-upgrade-templates-zombienet"],
"runScripts": [
"download-latest-rt-binaries.sh",
"build-spec-single-container.sh tmp container-chain-simple-node flashbox-local",
"download-polkadot.sh",
"download-latest-binaries.sh ../target/release",
"compile-wasm.ts compile -b tmp/tanssi-node -o wasm -c specs/single-container-tanssi-1000.json",
"compile-wasm.ts compile -b tmp/container-chain-simple-node -o wasm -c specs/single-container-template-container-2000.json"
],

"timeout": 900000,
"foundation": {
"rtUpgradePath": "../target/release/wbuild/container-chain-template-simple-runtime/container_chain_template_simple_runtime.compact.compressed.wasm",
"type": "zombie",
"zombieSpec": {
"configPath": "./configs/zombieTemplateUpgradeSimple.json",
"disableDefaultEthProviders": true
}
},
"connections": [
{
"name": "Relay",
"type": "polkadotJs",
"endpoints": ["ws://127.0.0.1:9947"]
},
{
"name": "Tanssi",
"type": "polkadotJs",
"endpoints": ["ws://127.0.0.1:9948"]
},
{
"name": "parachain",
"type": "polkadotJs",
"endpoints": ["ws://127.0.0.1:9949"]
}
]
},
{
"name": "zombie_frontier_template_upgrade",
"testFileDir": ["suites/rt-upgrade-templates-zombienet"],
Expand Down Expand Up @@ -602,6 +641,45 @@
}
]
},
{
"name": "zombie_frontier_template_upgrade_with_latest_releases",
"testFileDir": ["suites/rt-upgrade-templates-zombienet"],
"runScripts": [
"download-latest-rt-binaries.sh",
"build-spec-single-container.sh tmp container-chain-frontier-node flashbox-local",
"download-polkadot.sh",
"download-latest-binaries.sh ../target/release",
"compile-wasm.ts compile -b tmp/tanssi-node -o wasm -c specs/single-container-tanssi-1000.json",
"compile-wasm.ts compile -b tmp/container-chain-frontier-node -o wasm -c specs/single-container-template-container-2000.json"
],

"timeout": 900000,
"foundation": {
"rtUpgradePath": "../target/release/wbuild/container-chain-template-frontier-runtime/container_chain_template_frontier_runtime.compact.compressed.wasm",
"type": "zombie",
"zombieSpec": {
"configPath": "./configs/zombieTemplateUpgradeFrontier.json",
"disableDefaultEthProviders": true
}
},
"connections": [
{
"name": "Relay",
"type": "polkadotJs",
"endpoints": ["ws://127.0.0.1:9947"]
},
{
"name": "Tanssi",
"type": "polkadotJs",
"endpoints": ["ws://127.0.0.1:9948"]
},
{
"name": "parachain",
"type": "polkadotJs",
"endpoints": ["ws://127.0.0.1:9949"]
}
]
},
{
"name": "zombie_tanssi_relay",
"timeout": 600000,
Expand Down
55 changes: 55 additions & 0 deletions test/scripts/download-latest-binaries.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

# Exit on any error
set -e

# Always run the commands from the "test" dir
cd $(dirname $0)/..

if [[ -z "${1}" || ${1} == "undefined" ]]; then
OUTPUT_FOLDER="tmp"
else
OUTPUT_FOLDER="${1}"
fi

LATEST_NODE_RELEASE=$(curl -s https://api.github.com/repos/moondance-labs/tanssi/releases | jq -r '.[] | select(.name | test("v0.";"i")) | .tag_name' | head -n 1 | tr -d '[:blank:]') && [[ ! -z "${LATEST_NODE_RELEASE}" ]]
ENDPOINT="https://api.github.com/repos/moondance-labs/tanssi/git/refs/tags/$LATEST_NODE_RELEASE"
RESPONSE=$(curl -s -H "Accept: application/vnd.github.v3+json" $ENDPOINT)
TYPE=$(echo $RESPONSE | jq -r '.object.type')
if [[ $TYPE == "commit" ]]
then
LATEST_NODE_SHA8=$(echo $RESPONSE | jq -r '.object.sha' | cut -c -8)
elif [[ $TYPE == "tag" ]]
then
URL=$(echo $RESPONSE | jq -r '.object.url')
TAG_RESPONSE=$(curl -s -H "Accept: application/vnd.github.v3+json" $URL)
TAG_RESPONSE_CLEAN=$(echo $TAG_RESPONSE | tr -d '\000-\037')
LATEST_NODE_SHA8=$(echo $TAG_RESPONSE_CLEAN | jq -r '.object.sha' | cut -c -8)
fi

DOCKER_TAG_TANSSI="moondancelabs/tanssi:sha-$LATEST_NODE_SHA8"

docker rm -f tanssi_container 2> /dev/null | true
docker create --name tanssi_container $DOCKER_TAG_TANSSI bash
docker cp tanssi_container:tanssi/tanssi-node $OUTPUT_FOLDER/tanssi-node
docker rm -f tanssi_container
chmod uog+x ../target/release/tanssi-node
chmod uog+x $OUTPUT_FOLDER/tanssi-node

DOCKER_TAG_CONTAINER_SIMPLE="moondancelabs/container-chain-simple-template:sha-$LATEST_NODE_SHA8"

docker rm -f tanssi_container_simple 2> /dev/null | true
docker create --name tanssi_container_simple $DOCKER_TAG_CONTAINER_SIMPLE bash
docker cp tanssi_container_simple:container-chain-template-simple/container-chain-simple-node $OUTPUT_FOLDER/container-chain-simple-node
docker rm -f tanssi_container_simple
chmod uog+x ../target/release/container-chain-simple-node
chmod uog+x $OUTPUT_FOLDER/container-chain-simple-node

DOCKER_TAG_CONTAINER_FRONTIER="moondancelabs/container-chain-evm-template:sha-$LATEST_NODE_SHA8"

docker rm -f tanssi_container_frontier 2> /dev/null | true
docker create --name tanssi_container_frontier $DOCKER_TAG_CONTAINER_FRONTIER bash
docker cp tanssi_container_frontier:container-chain-template-evm/container-chain-frontier-node $OUTPUT_FOLDER/container-chain-frontier-node
docker rm -f tanssi_container_frontier
chmod uog+x ../target/release/container-chain-frontier-node
chmod uog+x $OUTPUT_FOLDER/container-chain-frontier-node

0 comments on commit cf2bd36

Please sign in to comment.