Skip to content

Commit

Permalink
Enhance local setup/launch with python script (#2534)
Browse files Browse the repository at this point in the history
Enhance local setup/launch with python script

---------

Co-authored-by: Verin1005 <104152026+Verin1005@users.noreply.github.com>
  • Loading branch information
Traf333 and 0xverin committed Mar 5, 2024
1 parent e561757 commit 5534947
Show file tree
Hide file tree
Showing 40 changed files with 219 additions and 1,837 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.githooks/
**/target
**/ts-tests
**/local-setup

# stuff under tee-worker/
tee-worker/.dockerignore
Expand All @@ -13,7 +14,6 @@ tee-worker/bin/spid.txt
tee-worker/bin/sidechain_db/
tee-worker/docker/*.yml
tee-worker/docs/
tee-worker/local-setup/
tee-worker/scripts/
tee-worker/target/
tee-worker/tmp/
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ rococo-fork.json
gethdata

*.patch
/log
/log-backup
**/__pycache__/
**/.env
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,25 +172,25 @@ pip install python-dotenv pycurl docker toml

In order to create a local docker setup, you can run the following command
```
./local-setup/launch.py --config ./local-setup/development-worker.json
./local-setup/launch.py
```
This will create three docker containers, 2 relay chain validators and 1 parachain Collator. However, it will use the default ports as present in .env.dev. If you want to run the system by offsetting the default ports, you can run this command instead:
This will run node in local-binary-standalone mode. However, it will use the default ports as present in .env.dev. If you want to run the system by offsetting the default ports, you can run this command instead:

```
./local-setup/launch.py --config local-setup/development-worker.json --offset 100
./local-setup/launch.py --offset 100
```
This will run the same containers and use the offset value of 100.

### 2. Start a local binary setup

In order to create a local binary setup, using default ports, you can run the following command:
```
./local-setup/launch.py --config ./local-setup/development-worker.json --parachain local-binary
./local-setup/launch.py --parachain local-binary
```

If you want to launch the same system by offsetting the port values, you can use this command:
```
./local-setup/launch.py --config ./local-setup/development-worker.json --parachain local-binary --offset 100
./local-setup/launch.py --parachain local-binary --offset 100
```

In case you receive the following error:
Expand All @@ -202,7 +202,7 @@ Fix it manually by installing pycurl using pip3.

Similar to 2, but it launches a standalone parachain node, see [Launch a standalone parachain node](#launch-a-standalone-parachain-node):
```
./local-setup/launch.py --config ./local-setup/development-worker.json --parachain local-binary-standalone
./local-setup/launch.py --parachain local-binary-standalone
```

It will dramatically reduce the waiting time and the tee-worker should be ready to use very soon.
Expand Down Expand Up @@ -252,7 +252,7 @@ In logs, you’ll see the sidechain starts to produce blocks

### Additional Info:

1. Change the RUST_LOG level: `litentry-parachain/tee-worker/local-setup/py/worker.py`
1. Change the RUST_LOG level: `litentry-parachain/local-setup/py/worker.py`
2. Check existing ts-tests: `litentry-parachain/tee-worker/ts-tests/package.json`
3. JSON config parameters: `litentry-parachain/tee-worker/service/src/cli.yml`

Expand Down
13 changes: 0 additions & 13 deletions bitacross-worker/local-setup/.env.example

This file was deleted.

44 changes: 0 additions & 44 deletions bitacross-worker/local-setup/config/benchmark.json

This file was deleted.

49 changes: 0 additions & 49 deletions bitacross-worker/local-setup/config/one-worker.json

This file was deleted.

94 changes: 0 additions & 94 deletions bitacross-worker/local-setup/config/three-nodes-one-worker.json

This file was deleted.

76 changes: 0 additions & 76 deletions bitacross-worker/local-setup/config/three-workers.json

This file was deleted.

0 comments on commit 5534947

Please sign in to comment.