Skip to content

Commit

Permalink
feat: add archival node fro relay chain (#171)
Browse files Browse the repository at this point in the history
* chore: Add archive node for relay chain

* fix:  bifrost port issue
  • Loading branch information
shanithkk authored Jan 8, 2024
1 parent ae8bf7b commit f98579e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package_io/utils.star
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def check_config_validity(plan, args):
if len(args["relaychain"]) != 0:
for node in args["relaychain"]["nodes"]:
if len(node) != 0:
if node["node-type"] in ["validator", "full"]:
if node["node-type"] in ["validator", "full", "archive"]:
plan.print("config for relaynodes is valid")
else:
return fail("relaychain node-type can be only validator/full")
Expand Down
2 changes: 1 addition & 1 deletion parachain/node_setup.star
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def run_testnet_node_with_command(plan, image, chain_name, execute_command):
service_config = ServiceConfig(
image = image,
ports = {
"ws": PortSpec(9944, transport_protocol = "TCP"),
"ws": PortSpec(9947, transport_protocol = "TCP"),
"metrics": PortSpec(9615, transport_protocol = "TCP", application_protocol = "http"),
"lib": PortSpec(30333),
},
Expand Down
2 changes: 1 addition & 1 deletion parachain/parachain.star
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def run_testnet_mainnet(plan, parachain, args):
common_command = [
"--chain={0}".format(base),
"--port=30333",
"--rpc-port=9944",
"--rpc-port=9947",
"--prometheus-external",
"--rpc-cors=all",
"--rpc-external",
Expand Down
14 changes: 13 additions & 1 deletion relaychain/relay-chain.star
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,19 @@ def start_relay_chain(plan, args):
final_details = {}

for relay_node in args["relaychain"]["nodes"]:
exec_command = ["bin/sh", "-c", "polkadot --rpc-external --rpc-cors=all --rpc-methods=unsafe --chain {0} --name={1} --execution=wasm --prometheus-external".format(chain, relay_node["name"])]


command = "polkadot --rpc-external --rpc-cors=all --rpc-methods=unsafe --chain {0} --name={1} --execution=wasm --prometheus-external".format(chain, relay_node["name"])

if relay_node["node-type"] == "validator":
command = command + " --validator --insecure-validator-i-know-what-i-do"
elif relay_node["node-type"] == "archive":
command = command + " --pruning=archive"

plan.print(command)

exec_command = ["bin/sh", "-c", command]

service_details = plan.add_service(
name = "{0}-{1}-{2}".format(name, chain, relay_node["name"]),
config = ServiceConfig(
Expand Down

0 comments on commit f98579e

Please sign in to comment.