Skip to content

Commit

Permalink
Merge pull request #182 from HugoByte/remove-ws-port
Browse files Browse the repository at this point in the history
chore: remove ws port for parachains
  • Loading branch information
Mr-Nobody21 authored Jan 16, 2024
2 parents fe220d4 + 0117033 commit c934fdd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 37 deletions.
1 change: 0 additions & 1 deletion package_io/constant.star
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ CURL_JQ_IMAGE = "badouralix/curl-jq"
NODE_IMAGE = "hugobyte/parachain-node-modules"
PARA_SLOT_REGISTER_SERVICE_NAME = "para-slot-registration"
BINARY_COMMAND_CHAINS = ["manta", "khala", "phala", "clover", "calamari", "subzero", "robonomics"]
NO_WS_PORT = ["acala", "frequency", "moonbeam", "karura", "ajuna", "bajun", "centrifuge", "moonsama", "encointer", "moonriver", "altair", "mangata", "khala", "phala", "turing", "bifrost", "nodle", "calamari", "manta", "clover", "polkadex", "parallel", "litmus", "litentry", "zeitgeist", "pendulum", "subzero", "kylin", "subsocial", "robonomics", "kilt"]

DIFFERENT_IMAGES_FOR_MAINNET = {
"centrifuge": "centrifugeio/centrifuge-chain:main-latest",
Expand Down
50 changes: 14 additions & 36 deletions parachain/parachain.star
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,11 @@ def start_local_parachain_node(plan, chain_type, parachain, para_id):
lib2lib_port = None
prometheus_port = None

if chain_name in constant.NO_WS_PORT:
exec_comexec_commandmand = [
"/bin/bash",
"-c",
"{0} --base-path=/tmp/{1} --chain=/build/{1}-raw.json --rpc-port=9946 --port=30333 --rpc-external --rpc-cors=all --prometheus-external --{2} --collator --rpc-methods=unsafe --force-authoring --execution=wasm --trie-cache-size=0 -- --chain=/app/raw-polkadot.json --execution=wasm".format(binary, chain_name, node["name"]),
]
else:
exec_comexec_commandmand = [
"/bin/bash",
"-c",
"{0} --base-path=/tmp/{1} --chain=/build/{1}-raw.json --ws-port=9946 --port=30333 --rpc-port=9933 --ws-external --rpc-external --prometheus-external --rpc-cors=all --{2} --collator --rpc-methods=unsafe --force-authoring --execution=wasm -- --chain=/app/raw-polkadot.json --execution=wasm".format(binary, chain_name, node["name"]),
]
exec_comexec_commandmand = [
"/bin/bash",
"-c",
"{0} --base-path=/tmp/{1} --chain=/build/{1}-raw.json --rpc-port=9946 --port=30333 --rpc-external --rpc-cors=all --prometheus-external --{2} --collator --rpc-methods=unsafe --force-authoring --execution=wasm --trie-cache-size=0 -- --chain=/app/raw-polkadot.json --execution=wasm".format(binary, chain_name, node["name"]),
]

build_file = raw_service.name
parachain_spawn_detail = node_setup.spawn_parachain(plan, node["prometheus"], image, "{0}-{1}-{2}".format(chain_name, node["name"], chain_type), exec_comexec_commandmand, build_file, rpc_port, prometheus_port, lib2lib_port)
Expand Down Expand Up @@ -125,30 +118,15 @@ def run_testnet_mainnet(plan, chain_type, relaychain_name, parachain):
if base == None:
fail("Tesnet is not there for {}".format(parachain["name"]))

if parachain["name"] in constant.NO_WS_PORT:
common_command = [
"--chain={0}".format(base),
"--port=30333",
"--rpc-port=9947",
"--prometheus-external",
"--rpc-cors=all",
"--rpc-external",
"--rpc-methods=unsafe",
"--unsafe-rpc-external",
]
else:
common_command = [
"--chain={0}".format(base),
"--port=30333",
"--ws-port=9944",
"--rpc-port=9933",
"--prometheus-external",
"--rpc-cors=all",
"--rpc-external",
"--ws-external",
"--rpc-methods=unsafe",
"--unsafe-rpc-external",
"--unsafe-ws-external",
common_command = [
"--chain={0}".format(base),
"--port=30333",
"--rpc-port=9947",
"--prometheus-external",
"--rpc-cors=all",
"--rpc-external",
"--rpc-methods=unsafe",
"--unsafe-rpc-external",
]

parachain_info = {parachain["name"]: {}}
Expand Down

0 comments on commit c934fdd

Please sign in to comment.