Skip to content

Commit 607128e

Browse files
added script to test mkvvm
1 parent c2993af commit 607128e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

scripts/mkvvm-test.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
PORT=:8080
2+
GRPC_PORT=:8081
3+
4+
#hash of minikvvm
5+
MINI_KVVM_HASH=qBnAKUQ2mxiB1JdqsPPU7Ufuj1XmPLpnPTRvZEpkYZBmK6UjE
6+
MINI_KVVM_PATH=${HOME}/Documents/avalanche/avalancherust/mini-kvvm-rs
7+
8+
kill -9 $(lsof -t -i$PORT)
9+
10+
# build new version of mini-kvvm
11+
rm ${AVALANCHEGO_PLUGIN_PATH}/${MINI_KVVM_HASH}
12+
cd $MINI_KVVM_PATH
13+
cargo build \
14+
--release \
15+
--bin mini-kvvm
16+
cp target/release/mini-kvvm ${AVALANCHEGO_PLUGIN_PATH}/${MINI_KVVM_HASH}
17+
18+
#Start the network runner
19+
avalanche-network-runner server \
20+
--log-level debug \
21+
--port=$PORT \
22+
--grpc-gateway-port=$GRPC_PORT &
23+
NETWORK_RUNNER_PID=${!}
24+
sleep 5
25+
26+
#Make a new instance of mini-kvvm
27+
avalanche-network-runner control start \
28+
--log-level all \
29+
--endpoint="0.0.0.0:8080" \
30+
--number-of-nodes=5 \
31+
--avalanchego-path ${AVALANCHEGO_EXEC_PATH} \
32+
--plugin-dir ${AVALANCHEGO_PLUGIN_PATH} \
33+
--blockchain-specs '[{"vm_name":"minikvvm","genesis":"/tmp/mini-kvvm.genesis.json"}]' \

0 commit comments

Comments
 (0)