From 54e33c11ff7ea0735b4daaabd77fd7808fa2e933 Mon Sep 17 00:00:00 2001 From: Shanith K K Date: Fri, 27 Oct 2023 17:31:32 +0530 Subject: [PATCH 1/6] chore: implement the kurtosis package to run parallel parachain local --- parachain/parallel.star | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 parachain/parallel.star diff --git a/parachain/parallel.star b/parachain/parallel.star new file mode 100644 index 0000000..f9f1778 --- /dev/null +++ b/parachain/parallel.star @@ -0,0 +1,16 @@ +def parallel_run(plan,args): + + exec_command = [ "--chain=kerria-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( + image = "parallelfinance/parallel:latest", + files={ + "/app":"output" + }, + ports = { + "parachain" : PortSpec(9944, transport_protocol="TCP"), + }, + cmd=exec_command + ) + ) \ No newline at end of file From a011fd2a65ff62ac9ac8dcfd3af47238fa71774d Mon Sep 17 00:00:00 2001 From: Shanith K K Date: Mon, 30 Oct 2023 11:09:36 +0530 Subject: [PATCH 2/6] refactor: change function name from parallel_run to run_parallel --- parachain/parallel.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parachain/parallel.star b/parachain/parallel.star index f9f1778..feb8a1a 100644 --- a/parachain/parallel.star +++ b/parachain/parallel.star @@ -1,4 +1,4 @@ -def parallel_run(plan,args): +def run_parallel(plan,args): exec_command = [ "--chain=kerria-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( From 943875441f0ad4ace52f6d36fbd51c384d1cb7fc Mon Sep 17 00:00:00 2001 From: Shanith K K Date: Mon, 30 Oct 2023 11:52:50 +0530 Subject: [PATCH 3/6] chore: remove unused variable 'parachain' --- parachain/parallel.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parachain/parallel.star b/parachain/parallel.star index feb8a1a..32bc2ef 100644 --- a/parachain/parallel.star +++ b/parachain/parallel.star @@ -1,7 +1,7 @@ def run_parallel(plan,args): exec_command = [ "--chain=kerria-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( + plan.add_service( name="interrelay", config= ServiceConfig( image = "parallelfinance/parallel:latest", From cc2c9450f813cd6d2f1f59c0b9de9ae24254422b Mon Sep 17 00:00:00 2001 From: Shanith K K Date: Mon, 30 Oct 2023 12:09:16 +0530 Subject: [PATCH 4/6] style: format code --- parachain/kylin.star | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 parachain/kylin.star diff --git a/parachain/kylin.star b/parachain/kylin.star new file mode 100644 index 0000000..2feafdc --- /dev/null +++ b/parachain/kylin.star @@ -0,0 +1,15 @@ +def run_kylin(plan, args): + exec_command = ["--base-path=/kylin/data", "--chain=dev", "--ws-external", "--rpc-external", "--rpc-cors=all", "--name=parachain-2010-0", "--collator", "--rpc-methods=unsafe", "--force-authoring", "--execution=wasm", "--alice", "--node-key=52194369e4c881e4157b74fd00dff4241e50b8100b823273e25c868a70e5cde8", "--", "--chain=/app/rococo-local.json", "--execution=wasm"] + plan.add_service( + name = "kylin", + config = ServiceConfig( + image = "kylinnetworks/kylin-collator:ro-v0.9.30", + files = { + "/app": "output", + }, + ports = { + "parachain": PortSpec(9944, transport_protocol = "TCP"), + }, + cmd = exec_command, + ), + ) From 6a194ae7971d7ab229464c4c69c65bfe7224d9e8 Mon Sep 17 00:00:00 2001 From: Shanith K K Date: Mon, 30 Oct 2023 12:38:06 +0530 Subject: [PATCH 5/6] style: code format --- parachain/kylin.star | 15 --------------- parachain/parallel.star | 36 +++++++++++++++++++++++++----------- 2 files changed, 25 insertions(+), 26 deletions(-) delete mode 100644 parachain/kylin.star diff --git a/parachain/kylin.star b/parachain/kylin.star deleted file mode 100644 index 2feafdc..0000000 --- a/parachain/kylin.star +++ /dev/null @@ -1,15 +0,0 @@ -def run_kylin(plan, args): - exec_command = ["--base-path=/kylin/data", "--chain=dev", "--ws-external", "--rpc-external", "--rpc-cors=all", "--name=parachain-2010-0", "--collator", "--rpc-methods=unsafe", "--force-authoring", "--execution=wasm", "--alice", "--node-key=52194369e4c881e4157b74fd00dff4241e50b8100b823273e25c868a70e5cde8", "--", "--chain=/app/rococo-local.json", "--execution=wasm"] - plan.add_service( - name = "kylin", - config = ServiceConfig( - image = "kylinnetworks/kylin-collator:ro-v0.9.30", - files = { - "/app": "output", - }, - ports = { - "parachain": PortSpec(9944, transport_protocol = "TCP"), - }, - cmd = exec_command, - ), - ) diff --git a/parachain/parallel.star b/parachain/parallel.star index 32bc2ef..7b5729e 100644 --- a/parachain/parallel.star +++ b/parachain/parallel.star @@ -1,16 +1,30 @@ -def run_parallel(plan,args): - - exec_command = [ "--chain=kerria-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 run_parallel(plan, args): + exec_command = [ + "--chain=kerria-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", + ] plan.add_service( - name="interrelay", - config= ServiceConfig( + name = "parallel", + config = ServiceConfig( image = "parallelfinance/parallel:latest", - files={ - "/app":"output" + files = { + "/app": "output", }, ports = { - "parachain" : PortSpec(9944, transport_protocol="TCP"), + "parachain": PortSpec(9944, transport_protocol = "TCP"), }, - cmd=exec_command - ) - ) \ No newline at end of file + cmd = exec_command, + ), + ) From 904893a261bb301bfab0e0c0fff7be86ef152921 Mon Sep 17 00:00:00 2001 From: Shanith K K Date: Mon, 30 Oct 2023 12:53:54 +0530 Subject: [PATCH 6/6] fix: upload file path issue --- parachain/parallel.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parachain/parallel.star b/parachain/parallel.star index 7b5729e..71ca338 100644 --- a/parachain/parallel.star +++ b/parachain/parallel.star @@ -20,7 +20,7 @@ def run_parallel(plan, args): config = ServiceConfig( image = "parallelfinance/parallel:latest", files = { - "/app": "output", + "/app": "configs", }, ports = { "parachain": PortSpec(9944, transport_protocol = "TCP"),