From eb66a52e27febec54e4aaaac52621177d7787b55 Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Wed, 22 Feb 2023 11:15:22 +0100 Subject: [PATCH 1/5] [local-setup] use default ports for the node and worker1 --- local-setup/simple-config.json | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/local-setup/simple-config.json b/local-setup/simple-config.json index 743fc1c46d..cbdeb6683d 100644 --- a/local-setup/simple-config.json +++ b/local-setup/simple-config.json @@ -6,11 +6,13 @@ "--dev", "-lruntime=info", "--ws-port", - "9990", + "9944", "--port", "30390", "--rpc-port", - "8990" + "9933", + "--ws-external", + "--rpc-external" ] }, "workers": [ @@ -19,13 +21,13 @@ "flags": [ "--clean-reset", "-P", - "2090", + "2000", "-p", - "9990", + "9944", "-r", "3490", "-w", - "2091", + "2001", "-h", "4545" ], @@ -39,13 +41,13 @@ "flags": [ "--clean-reset", "-P", - "3090", + "3000", "-p", - "9990", + "9944", "-r", - "3590", + "4490", "-w", - "3091", + "3001", "-h", "4546" ], From 1099852e4c32ed7b825f26ba5d14cad0634ee368 Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Wed, 22 Feb 2023 11:21:57 +0100 Subject: [PATCH 2/5] [local-setup] re-organize configs and use default ports in configs. --- .../benchmark.json} | 0 .../one-worker.json} | 29 +++-------- .../two-workers.json} | 0 local-setup/github-action-config.json | 49 ------------------- scripts/benchmark_local-setup.sh | 2 +- 5 files changed, 8 insertions(+), 72 deletions(-) rename local-setup/{benchmark-config.json => config/benchmark.json} (100%) rename local-setup/{tutorial-config.json => config/one-worker.json} (61%) rename local-setup/{simple-config.json => config/two-workers.json} (100%) delete mode 100644 local-setup/github-action-config.json diff --git a/local-setup/benchmark-config.json b/local-setup/config/benchmark.json similarity index 100% rename from local-setup/benchmark-config.json rename to local-setup/config/benchmark.json diff --git a/local-setup/tutorial-config.json b/local-setup/config/one-worker.json similarity index 61% rename from local-setup/tutorial-config.json rename to local-setup/config/one-worker.json index c653ce63b5..f43dabc615 100644 --- a/local-setup/tutorial-config.json +++ b/local-setup/config/one-worker.json @@ -10,7 +10,9 @@ "--port", "30390", "--rpc-port", - "8990" + "9933", + "--ws-external", + "--rpc-external" ] }, "workers": [ @@ -22,34 +24,17 @@ "2000", "-p", "9944", + "-r", + "3490", "-w", "2001", - "-r", - "3443" + "-h", + "4545" ], "subcommand_flags": [ "--skip-ra", "--dev" ] - }, - { - "source": "bin", - "flags": [ - "--clean-reset", - "-P", - "3000", - "-p", - "9944", - "-w", - "3001", - "-r", - "3444" - ], - "subcommand_flags": [ - "--skip-ra", - "--dev", - "--request-state" - ] } ] } diff --git a/local-setup/simple-config.json b/local-setup/config/two-workers.json similarity index 100% rename from local-setup/simple-config.json rename to local-setup/config/two-workers.json diff --git a/local-setup/github-action-config.json b/local-setup/github-action-config.json deleted file mode 100644 index f534bacbe0..0000000000 --- a/local-setup/github-action-config.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "node": { - "bin": "./node/integritee-node", - "flags": [ - "--tmp", - "--dev", - "-lruntime=info" - ] - }, - "workers": [ - { - "source": "bin", - "flags": [ - "--clean-reset", - "-P", - "2000", - "-w", - "2001", - "-r", - "3443", - "-h", - "4545" - ], - "subcommand_flags": [ - "--skip-ra", - "--dev" - ] - }, - { - "source": "bin", - "flags": [ - "--clean-reset", - "-P", - "3000", - "-w", - "3001", - "-r", - "3444", - "-h", - "4546" - ], - "subcommand_flags": [ - "--skip-ra", - "--dev", - "--request-state" - ] - } - ] -} diff --git a/scripts/benchmark_local-setup.sh b/scripts/benchmark_local-setup.sh index d5e1c462b2..10edc69ed9 100644 --- a/scripts/benchmark_local-setup.sh +++ b/scripts/benchmark_local-setup.sh @@ -9,7 +9,7 @@ popd ulimit -S -n 4096 -python3 local-setup/launch.py local-setup/benchmark-config.json & +python3 local-setup/launch.py local-setup/config/benchmark.json & PID=$! echo $PID > ./benchmark.pid echo "Benchmark PID: $PID" From 2b10dbbc073187e6043c44f821eeb6c1fd901c04 Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Wed, 22 Feb 2023 11:24:33 +0100 Subject: [PATCH 3/5] [local-setup] update readme --- local-setup/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/local-setup/README.md b/local-setup/README.md index 0c9d986d9e..af35e2146b 100644 --- a/local-setup/README.md +++ b/local-setup/README.md @@ -8,15 +8,15 @@ In case you have - a sgx hardware and compile the worker with `SGX_MODE=HW` (default mode) - a valid intel IAS key (development key is fine) -you can omit the `--features skip-ias-check` when building the node, but you must not use the subcommand flag `--skip-ra` in the json file (see [`simple-config.json`](simple-config.json)) you're using to start the worker. +you can omit the `--features skip-ias-check` when building the node, but you must not use the subcommand flag `--skip-ra` in the json file (see [`two-workers.json`](./config/two-workers.json)) you're using to start the worker. ## Steps -Adapt or create your own config file, as in the example of [`simple-config.json`](simple-config.json). Be mindful of the ports in case you're running the script on a server multiple people are working on. +Adapt or create your own config file, as in the example of [`two-workers.json`](./config/two-workers.json). Be mindful of the ports in case you're running the script on a server multiple people are working on. ### Launch worker and node in terminal one You can launch the workers and the node with: ```bash -./local-setup/launch.py ./local-setup/simple-config.json +./local-setup/launch.py ./local-setup/config/two-workers.json ``` wait a little until all workers have been launched. You can stop the worker and node simply by pressing `Ctrl + c`. From a5ebd63cab8bf8e5da7c10bbdf6993910b6b8e4d Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Wed, 22 Feb 2023 11:27:10 +0100 Subject: [PATCH 4/5] [local-setup] also add external flags for the node in the benchmark settings --- local-setup/config/benchmark.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/local-setup/config/benchmark.json b/local-setup/config/benchmark.json index 369df363e8..bc539de8d7 100644 --- a/local-setup/config/benchmark.json +++ b/local-setup/config/benchmark.json @@ -10,7 +10,9 @@ "--port", "30330", "--rpc-port", - "8930" + "8930", + "--ws-external", + "--rpc-external" ] }, "workers": [ From 4abce1ae0ee68a58338be4019242cfde44854efc Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Wed, 22 Feb 2023 11:29:30 +0100 Subject: [PATCH 5/5] [local-setup] also add external flags for the worker --- local-setup/config/benchmark.json | 3 ++- local-setup/config/one-worker.json | 3 ++- local-setup/config/two-workers.json | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/local-setup/config/benchmark.json b/local-setup/config/benchmark.json index bc539de8d7..38caa5998e 100644 --- a/local-setup/config/benchmark.json +++ b/local-setup/config/benchmark.json @@ -29,7 +29,8 @@ "-w", "2031", "-h", - "4530" + "4530", + "--ws-external" ], "subcommand_flags": [ "--skip-ra", diff --git a/local-setup/config/one-worker.json b/local-setup/config/one-worker.json index f43dabc615..1119abbaaa 100644 --- a/local-setup/config/one-worker.json +++ b/local-setup/config/one-worker.json @@ -29,7 +29,8 @@ "-w", "2001", "-h", - "4545" + "4545", + "--ws-external" ], "subcommand_flags": [ "--skip-ra", diff --git a/local-setup/config/two-workers.json b/local-setup/config/two-workers.json index cbdeb6683d..daf7b05677 100644 --- a/local-setup/config/two-workers.json +++ b/local-setup/config/two-workers.json @@ -29,7 +29,8 @@ "-w", "2001", "-h", - "4545" + "4545", + "--ws-external" ], "subcommand_flags": [ "--skip-ra", @@ -49,7 +50,8 @@ "-w", "3001", "-h", - "4546" + "4546", + "--ws-external" ], "subcommand_flags": [ "--skip-ra",