Skip to content

Commit

Permalink
zombienet fixes (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgunozerk authored Sep 13, 2024
1 parent 9fb5abb commit 9e76661
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 27 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ docs/node_modules
docs/build

# zombienet stuff
**/zombienet-macos
**/zombienet-macos-arm64
**/zombienet-macos-x64
**/zombienet-linux-arm64
**/zombienet-linux-x64
**/bin-*
27 changes: 24 additions & 3 deletions evm-template/scripts/zombienet.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,41 @@
#!/bin/bash

ZOMBIENET_V=v1.3.91
ZOMBIENET_V=v1.3.106
POLKADOT_V=v1.6.0

# Detect the operating system
case "$(uname -s)" in
Linux*) MACHINE=Linux;;
Darwin*) MACHINE=Mac;;
*) exit 1
esac

# Detect the architecture
ARCH=$(uname -m)

# Set the executable name based on the OS and architecture
if [ $MACHINE = "Linux" ]; then
ZOMBIENET_BIN=zombienet-linux-x64
if [ $ARCH = "x86_64" ]; then
ZOMBIENET_BIN=zombienet-linux-x64
elif [ $ARCH = "arm64" ] || [ $ARCH = "aarch64" ]; then
ZOMBIENET_BIN=zombienet-linux-arm64
else
echo "Unsupported Linux architecture: $ARCH"
exit 1
fi
elif [ $MACHINE = "Mac" ]; then
ZOMBIENET_BIN=zombienet-macos
if [ $ARCH = "x86_64" ]; then
ZOMBIENET_BIN=zombienet-macos-x86
elif [ $ARCH = "arm64" ]; then
ZOMBIENET_BIN=zombienet-macos-arm64
else
echo "Unsupported macOS architecture: $ARCH"
exit 1
fi
fi

echo "Using binary: $ZOMBIENET_BIN"

BIN_DIR=bin-$POLKADOT_V

build_polkadot() {
Expand Down
37 changes: 19 additions & 18 deletions evm-template/zombienet-config/devnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,31 @@
chain = "rococo-local"
default_command = "./bin-v1.6.0/polkadot"

[[relaychain.nodes]]
name = "alice"
validator = true
[[relaychain.nodes]]
name = "alice"
validator = true

[[relaychain.nodes]]
name = "bob"
validator = true
[[relaychain.nodes]]
name = "bob"
validator = true

[[parachains]]
id = 1000
addToGenesis = true
cumulus_based = true
chain = "dev"
force_decorator = "generic-evm"

[[parachains.collators]]
name = "collator01"
command = "./target/release/parachain-template-node"
ws_port = 9933
rpc_port = 8833
args = ["--rpc-max-connections 10000"]
[[parachains.collators]]
name = "collator01"
command = "./target/release/evm-template-node"
ws_port = 9933
rpc_port = 8833
args = ["--rpc-max-connections 10000"]

[[parachains.collators]]
name = "collator02"
ws_port = 9822
rpc_port = 8822
command = "./target/release/parachain-template-node"
args = ["--rpc-max-connections 10000"]
[[parachains.collators]]
name = "collator02"
ws_port = 9822
rpc_port = 8822
command = "./target/release/evm-template-node"
args = ["--rpc-max-connections 10000"]
27 changes: 24 additions & 3 deletions generic-template/scripts/zombienet.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,41 @@
#!/bin/bash

ZOMBIENET_V=v1.3.91
ZOMBIENET_V=v1.3.106
POLKADOT_V=v1.6.0

# Detect the operating system
case "$(uname -s)" in
Linux*) MACHINE=Linux;;
Darwin*) MACHINE=Mac;;
*) exit 1
esac

# Detect the architecture
ARCH=$(uname -m)

# Set the executable name based on the OS and architecture
if [ $MACHINE = "Linux" ]; then
ZOMBIENET_BIN=zombienet-linux-x64
if [ $ARCH = "x86_64" ]; then
ZOMBIENET_BIN=zombienet-linux-x64
elif [ $ARCH = "arm64" ] || [ $ARCH = "aarch64" ]; then
ZOMBIENET_BIN=zombienet-linux-arm64
else
echo "Unsupported Linux architecture: $ARCH"
exit 1
fi
elif [ $MACHINE = "Mac" ]; then
ZOMBIENET_BIN=zombienet-macos
if [ $ARCH = "x86_64" ]; then
ZOMBIENET_BIN=zombienet-macos-x86
elif [ $ARCH = "arm64" ]; then
ZOMBIENET_BIN=zombienet-macos-arm64
else
echo "Unsupported macOS architecture: $ARCH"
exit 1
fi
fi

echo "Using binary: $ZOMBIENET_BIN"

BIN_DIR=bin-$POLKADOT_V

build_polkadot() {
Expand Down
4 changes: 2 additions & 2 deletions generic-template/zombienet-config/devnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ chain = "dev"

[[parachains.collators]]
name = "collator01"
command = "./target/release/parachain-template-node"
command = "./target/release/generic-template-node"
ws_port = 9933
rpc_port = 8833
args = ["--rpc-max-connections 10000"]
Expand All @@ -27,5 +27,5 @@ args = ["--rpc-max-connections 10000"]
name = "collator02"
ws_port = 9822
rpc_port = 8822
command = "./target/release/parachain-template-node"
command = "./target/release/generic-template-node"
args = ["--rpc-max-connections 10000"]

0 comments on commit 9e76661

Please sign in to comment.