Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove ws port for parachains #182

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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