Skip to content

Commit

Permalink
feat: implement kurtosis package to run litmus parachain local (#28)
Browse files Browse the repository at this point in the history
* feat: implement kurtosis package to run litmus parachain locally

* refactor: change port key to ws and rpc
  • Loading branch information
shanithkk authored Oct 31, 2023
1 parent 62fd343 commit 0c3dc17
Show file tree
Hide file tree
Showing 22 changed files with 179 additions and 158 deletions.
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
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
54 changes: 40 additions & 14 deletions parachain/litentry.star
Original file line number Diff line number Diff line change
@@ -1,29 +1,55 @@
def run_litentry(plan):
exec_command = [
"--chain=litentry-dev",
"--chain=litentry-dev",
"--rpc-port=9933",
"--rpc-external",
"--rpc-cors=all",
"--rpc-methods=unsafe",
"--execution=wasm",
"--tmp",
"--rpc-external",
"--rpc-cors=all",
"--rpc-methods=unsafe",
"--execution=wasm",
"--tmp",
"--unsafe-ws-external",
"--",
"--chain=/app/rococo-local.json",
"--execution=wasm"
"--",
"--chain=/app/rococo-local.json",
"--execution=wasm",
]
litentry_service_config = ServiceConfig(
image = "litentry/litentry-parachain: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"),
},
cmd = exec_command,
)

service_details = plan.add_service(name="litentry-node", config=litentry_service_config)
service_details = plan.add_service(name = "litentry-node", config = litentry_service_config)

return service_details
return service_details

def run_litmus(plan, args):
exec_command = [
"--chain=litmus-dev",
"--rpc-port=9933",
"--rpc-external",
"--rpc-cors=all",
"--rpc-methods=unsafe",
"--execution=wasm",
"--unsafe-ws-external",
"--tmp",
"--",
"--chain=/app/rococo-local.json",
"--execution=wasm",
]
plan.add_service(name = "litmus-node", config = ServiceConfig(
image = "litentry/litentry-parachain:latest",
files = {
"/app": "configs",
},
ports = {
"ws": PortSpec(9944, transport_protocol = "TCP"),
"rpc": PortSpec(9933, transport_protocol = "TCP"),
},
cmd = exec_command,
))
4 changes: 2 additions & 2 deletions parachain/manta.star
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def run_manta(plan, args):
"/app": "configs",
},
ports = {
"parachain": PortSpec(9944, transport_protocol = "TCP"),
"ws": PortSpec(9944, transport_protocol = "TCP"),
},
entrypoint = exec_command,
),
Expand All @@ -32,7 +32,7 @@ def run_calamari(plan, args):
"/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/moonbeam.star
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ def run_moonbeam(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
Loading

0 comments on commit 0c3dc17

Please sign in to comment.