Skip to content

Commit

Permalink
Merge branch 'main' into DIVE-190-Localnet-setup-for-Kintsugi-BTC-Kusama
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasbhat0 authored Oct 31, 2023
2 parents 16dbfb5 + 0c3dc17 commit 9509393
Show file tree
Hide file tree
Showing 25 changed files with 228 additions and 164 deletions.
9 changes: 7 additions & 2 deletions main.star
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
parachain = import_module("./parachain/parachain.star")
relay_chain = import_module("./relaychain/relay-chain.star")
litentry = import_module("./parachain/litentry.star")
clover = import_module("./parachain/clover.star")

def run(plan, args):
plan.upload_files(src = "./parachain/static_files/configs", name = "configs")
service_details = {"relaychains": {}, "parachains": {}}
if args["chain-type"] == "local":
relay_chain.spawn_multiple_relay(plan, 2)
litentry.run_litentry(plan)
service_details["relaychains"] = relay_chain.start_relay_chains_local(plan, args)
service_details["parachains"] = clover.run_clover(plan)

else:
relay_chain.start_relay_chain(plan, args)

return service_details
8 changes: 4 additions & 4 deletions parachain/acala.star
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ def run_acala(plan):
"/app": "configs",
},
ports = {
"9944": PortSpec(9944, transport_protocol = "TCP"),
"9933": PortSpec(9933, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
"rpc": PortSpec(9933, transport_protocol = "TCP"),
},
public_ports = {
"9944": PortSpec(9432, transport_protocol = "TCP"),
"9933": PortSpec(9431, transport_protocol = "TCP"),
"ws": PortSpec(9432, transport_protocol = "TCP"),
"rpc": PortSpec(9431, transport_protocol = "TCP"),
},
cmd = exec_command,
)
Expand Down
4 changes: 2 additions & 2 deletions parachain/ajuna.star
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def run_bajun(plan, args):
"/app": "configs",
},
ports = {
"parachain": PortSpec(9944, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
},
cmd = exec_command,
),
Expand Down Expand Up @@ -48,7 +48,7 @@ def run_ajuna(plan, args):
"/app": "configs",
},
ports = {
"parachain": PortSpec(9944, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
},
cmd = exec_command,
),
Expand Down
31 changes: 15 additions & 16 deletions parachain/altair.star
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
def run_altair(plan):
exec_command = [
"--chain=altair-local",
"--chain=altair-local",
"--rpc-port=9933",
"--rpc-external",
"--rpc-cors=all",
"--rpc-methods=unsafe",
"--execution=wasm",
"--tmp",
"--",
"--chain=/app/rococo-local.json",
"--execution=wasm"
"--rpc-external",
"--rpc-cors=all",
"--rpc-methods=unsafe",
"--execution=wasm",
"--tmp",
"--",
"--chain=/app/rococo-local.json",
"--execution=wasm",
]
altair_service_config = ServiceConfig(
image = "centrifugeio/centrifuge-chain:test-main-latest",
files = {
"/app":"configs"
"/app": "configs",
},
ports = {
"9944": PortSpec(9944, transport_protocol="TCP"),
"9933": PortSpec(9933, transport_protocol="TCP")
"ws": PortSpec(9944, transport_protocol = "TCP"),
"rpc": PortSpec(9933, transport_protocol = "TCP"),
},
public_ports = {
"9944": PortSpec(9432, transport_protocol="TCP"),
"9933": PortSpec(9431, transport_protocol="TCP")

"ws": PortSpec(9432, transport_protocol = "TCP"),
"rpc": PortSpec(9431, transport_protocol = "TCP"),
},
cmd = exec_command,
)
plan.add_service(name="altair-node", config=altair_service_config)
plan.add_service(name = "altair-node", config = altair_service_config)
4 changes: 2 additions & 2 deletions parachain/bifrost.star
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
def run_bifrost(plan):
exec_command = ["bin/sh", "-c", "/usr/local/bin/bifrost --base-path=/data --chain=/app/bifrost-local-2001.json --ws-external --rpc-external --rpc-cors=all --name=parachain-2001-0 --collator --rpc-methods=unsafe --force-authoring --execution=wasm --alice --node-key=15f888e12fe354ac310399c7126ff43db1a58453784ea1784e26edc0bee3c965 --listen-addr=/ip4/0.0.0.0/tcp/30333 -- --chain=/app/rococo-local.json --execution=wasm"]
plan.add_service(
name = "parachain",
name = "bifrost",
config = ServiceConfig(
image = "bifrostnetwork/bifrost:bifrost-v0.9.66",
files = {
"/app": "configs",
},
ports = {
"parachain": PortSpec(9944, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
},
entrypoint = exec_command,
),
Expand Down
8 changes: 4 additions & 4 deletions parachain/centriguge.star
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ def run_centriguge(plan, args):
"/app": "configs",
},
ports = {
"9944": PortSpec(9944, transport_protocol = "TCP"),
"9933": PortSpec(9933, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
"rpc": PortSpec(9933, transport_protocol = "TCP"),
},
public_ports = {
"9944": PortSpec(9432, transport_protocol = "TCP"),
"9933": PortSpec(9431, transport_protocol = "TCP"),
"ws": PortSpec(9432, transport_protocol = "TCP"),
"rpc": PortSpec(9431, transport_protocol = "TCP"),
},
cmd = exec_command,
)
Expand Down
30 changes: 30 additions & 0 deletions parachain/clover.star
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
def run_clover(plan):
exec_command = [
"--chain=dev",
"--rpc-port=9933",
"--rpc-external",
"--rpc-cors=all",
"--rpc-methods=unsafe",
"--execution=wasm",
"--tmp",
"--unsafe-ws-external",
"--",
"--chain=/app/rococo-local.json",
"--execution=wasm"
]
clover_service_config = ServiceConfig(
image = "cloverio/clover-para:v0.1.24",
files = {
"/app":"configs"
},
ports = {
"ws": PortSpec(9944, transport_protocol="TCP"),
"tcp": PortSpec(9933, transport_protocol="TCP")
},
cmd = exec_command,
entrypoint=["/opt/clover/bin/clover"]
)

service_details = plan.add_service(name="clover-node", config=clover_service_config)

return service_details
2 changes: 1 addition & 1 deletion parachain/encointer.star
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def run_encointer(plan, args):
"/app": "configs",
},
ports = {
"parachain": PortSpec(9944, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
},
entrypoint = exec_command,
),
Expand Down
2 changes: 1 addition & 1 deletion parachain/frequency.star
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def run_frequency(plan):
"/app": "configs",
},
ports = {
"parachain": PortSpec(9944, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
},
entrypoint = exec_command,
),
Expand Down
8 changes: 4 additions & 4 deletions parachain/integritee.star
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ def run_integritee(plan, args):
"/app": "configs",
},
ports = {
"9944": PortSpec(9944, transport_protocol = "TCP"),
"9933": PortSpec(9933, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
"rpc": PortSpec(9933, transport_protocol = "TCP"),
},
public_ports = {
"9944": PortSpec(9432, transport_protocol = "TCP"),
"9933": PortSpec(9431, transport_protocol = "TCP"),
"ws": PortSpec(9432, transport_protocol = "TCP"),
"rpc": PortSpec(9431, transport_protocol = "TCP"),
},
cmd = exec_command,
)
Expand Down
19 changes: 9 additions & 10 deletions parachain/interlay.star
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
def interrelay_run(plan,args):

exec_command = [ "bin/sh","-c","/usr/local/bin/interbtc-parachain --chain=dev --wasm-execution=compiled --force-authoring --port 30333 --rpc-port 9944 --rpc-external --rpc-cors all --rpc-methods=Unsafe -- --wasm-execution=compiled --chain=/app/rococo-local.json"]
def interrelay_run(plan, args):
exec_command = ["bin/sh", "-c", "/usr/local/bin/interbtc-parachain --chain=dev --wasm-execution=compiled --force-authoring --port 30333 --rpc-port 9944 --rpc-external --rpc-cors all --rpc-methods=Unsafe -- --wasm-execution=compiled --chain=/app/rococo-local.json"]
parachain = plan.add_service(
name="interrelay",
config= ServiceConfig(
name = "interrelay",
config = ServiceConfig(
image = "interlayhq/interbtc:latest",
files={
"/app":"configs"
files = {
"/app": "configs",
},
ports = {
"parachain" : PortSpec(9944, transport_protocol="TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
},
entrypoint=exec_command
)
entrypoint = exec_command,
),
)
26 changes: 13 additions & 13 deletions parachain/karura.star
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
def run_karura(plan):
exec_command = [
"--chain=dev",
"--collator",
"--rpc-external",
"--rpc-cors=all",
"--rpc-methods=unsafe",
"--tmp",
"--",
"--chain=/app/rococo-local.json",
"--execution=wasm"
"--chain=dev",
"--collator",
"--rpc-external",
"--rpc-cors=all",
"--rpc-methods=unsafe",
"--tmp",
"--",
"--chain=/app/rococo-local.json",
"--execution=wasm",
]

karura_service_config = ServiceConfig(
Expand All @@ -17,12 +17,12 @@ def run_karura(plan):
"/app": "configs",
},
ports = {
"9944": PortSpec(9944, transport_protocol = "TCP"),
"9933": PortSpec(9933, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
"rpc": PortSpec(9933, transport_protocol = "TCP"),
},
public_ports = {
"9944": PortSpec(9432, transport_protocol = "TCP"),
"9933": PortSpec(9431, transport_protocol = "TCP"),
"ws": PortSpec(9432, transport_protocol = "TCP"),
"rpc": PortSpec(9431, transport_protocol = "TCP"),
},
cmd = exec_command,
)
Expand Down
4 changes: 2 additions & 2 deletions parachain/khala.star
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def run_khala(plan, args):
config = ServiceConfig(
image = "phalanetwork/khala-node:latest",
ports = {
"parachain": PortSpec(9944, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
},
files = {
"/app": "configs",
Expand All @@ -29,7 +29,7 @@ def run_phala(plan, args):
config = ServiceConfig(
image = "phalanetwork/phala-node:latest",
ports = {
"parachain": PortSpec(9944, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
},
files = {
"/app": "configs",
Expand Down
36 changes: 17 additions & 19 deletions parachain/kilt.star
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
def run_kilt(plan):

exec_command = [
"--chain=dev",
"--alice",
"--rpc-port=9933",
"--rpc-external",
"--rpc-cors=all",
"--rpc-methods=unsafe",
"--execution=wasm",
"--tmp",
"--",
"--chain=/app/rococo-local.json",
"--execution=wasm"
"--chain=dev",
"--alice",
"--rpc-port=9933",
"--rpc-external",
"--rpc-cors=all",
"--rpc-methods=unsafe",
"--execution=wasm",
"--tmp",
"--",
"--chain=/app/rococo-local.json",
"--execution=wasm",
]

kilt_service_config = ServiceConfig(
image = "kiltprotocol/kilt-node:latest",
files = {
"/app":"config"
"/app": "config",
},
ports = {
"9944": PortSpec(9944, transport_protocol="TCP"),
"9933": PortSpec(9933, transport_protocol="TCP")
"ws": PortSpec(9944, transport_protocol = "TCP"),
"rpc": PortSpec(9933, transport_protocol = "TCP"),
},
public_ports = {
"9944": PortSpec(9432, transport_protocol="TCP"),
"9933": PortSpec(9431, transport_protocol="TCP")

"ws": PortSpec(9432, transport_protocol = "TCP"),
"rpc": PortSpec(9431, transport_protocol = "TCP"),
},
cmd = exec_command,
)
plan.add_service(name="kilt-node", config=kilt_service_config)
plan.add_service(name = "kilt-node", config = kilt_service_config)
2 changes: 1 addition & 1 deletion parachain/kylin.star
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def run_kylin(plan, args):
"/app": "configs",
},
ports = {
"parachain": PortSpec(9944, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
},
cmd = exec_command,
),
Expand Down
Loading

0 comments on commit 9509393

Please sign in to comment.