Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jasl committed Aug 29, 2023
1 parent e0df331 commit f22b6cb
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build_and_push_pt3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
BUILD_ONLY = false

COMMON_CHAIN_NAME = "khala-pt3"
COMMON_TAG = "22092001"
COMMON_TAG = "23073101"

DEV_NODE_DOCKER_REPO = "#{COMMON_CHAIN_NAME}-node"
DEV_NODE_DOCKER_TAG = COMMON_TAG

REGISTRIES = [
"jasl123",
# "jasl123",
"phalanetwork",
# "swr.cn-east-3.myhuaweicloud.com/phala",
]
Expand Down
66 changes: 66 additions & 0 deletions misc/start_node.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash

WORK_PATH=$(dirname $(readlink -f "$0"))
DATA_PATH="$HOME/data"

NODE_NAME="${NODE_NAME:-"khala-dev-node"}"
NODE_ROLE="${NODE_ROLE:-""}"

PARACHAIN="$WORK_PATH/thala-local-2004-raw.chain_spec.json"
RELAYCHAIN="$WORK_PATH/rococo-local-raw.chain_spec.json"

case ${NODE_ROLE} in
"")
echo "You must set NODE_ROLE env"
echo "accept values (case sensitive): <Empty> | FULL | ARCHIVE | COLLATOR | MINER"
exit 1
;;
"FULL")
PARACHAIN_ROLE_ARGS=""
RELAYCHAIN_ROLE_ARGS=""
;;
"ARCHIVE")
PARACHAIN_ROLE_ARGS="--pruning archive"
RELAYCHAIN_ROLE_ARGS=""
;;
"COLLATOR")
PARACHAIN_ROLE_ARGS="--collator --rpc-external --rpc-methods Unsafe"
RELAYCHAIN_ROLE_ARGS=""
;;
"MINER")
PARACHAIN_ROLE_ARGS="--pruning archive --rpc-external --rpc-methods Unsafe"
RELAYCHAIN_ROLE_ARGS="--pruning archive --rpc-external --rpc-methods Unsafe"
;;
*)
echo "Unknown NODE_ROLE ${NODE_ROLE}"
echo "accept values (case sensitive): <Empty> | FULL | ARCHIVE | COLLATOR | MINER"
exit 1
;;
esac

echo "Starting Khala node as role '${NODE_ROLE}' with extra parachain args '${PARACHAIN_EXTRA_ARGS}' extra relaychain args '${RELAYCHAIN_EXTRA_ARGS}'"

$WORK_PATH/khala-node \
--chain $PARACHAIN \
--base-path $DATA_PATH \
--name $NODE_NAME \
--port 30333 \
--prometheus-port 9615 \
--rpc-port 9933 \
--ws-port 9944 \
--prometheus-external \
--ws-external \
--rpc-cors all \
$PARACHAIN_ROLE_ARGS \
$PARACHAIN_EXTRA_ARGS \
-- \
--chain $RELAYCHAIN \
--port 30334 \
--prometheus-port 9616 \
--rpc-port 9934 \
--ws-port 9945 \
--prometheus-external \
--ws-external \
--rpc-cors all \
$RELAYCHAIN_ROLE_ARGS \
$RELAYCHAIN_EXTRA_ARGS
2 changes: 0 additions & 2 deletions prebuilt_pt3_node.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ ENV PARACHAIN_BOOTNODE='/dns4/pc-test-3.phala.network/tcp/30333/ws/p2p/12D3KooWN
ENV RELAYCHAIN_BOOTNODE='/dns4/pc-test-3.phala.network/tcp/30334/ws/p2p/12D3KooWNcARLswVpKJsGK8v4krZNQQ3unbhxrZAk4YV5TX2rdos'

EXPOSE 9615
EXPOSE 9933
EXPOSE 9944
EXPOSE 30333
EXPOSE 9616
EXPOSE 9934
EXPOSE 9945
EXPOSE 30334

Expand Down

0 comments on commit f22b6cb

Please sign in to comment.