How to Run Setup and Run Parachain + Worker
Building and Running a Parachain: A Step-by-Step Guide
source: https://github.com/litentry/litentry-parachain/tree/dev?tab=readme-ov-file#litentry-parachain
Introduction
Overall, our architecture is made of up Relaychains ( Polkadot and Kusama), Parachains (Litentry and Litmus), and the TEE sidechain which is supported by and enables the runtime to execute in an SGX secure run environment.
Setting Up The Environment
Before you can begin building the parachain, it's crucial to set up the environment correctly. To start with, it will require:
The latest version of Rust
Machine with intel chip (optional) and SGX SDK installed to build and run tee-enclave or use our worker with
SGX_MODE=SW
.(optional) installed Python in case you want to easily run the whole system with one command
pip install python-dotenv pycurl docker toml
Building Parachain
Simply run
to see the full lists of market targets and their short descriptions.
There are two methods to build a parachain: via Docker or raw binary.
To manually build the Litentry-parachain raw binary, execute the following script from the root of the project:
To build the litentry/litentry-parachain
Docker image locally, use one of the following commands:
These commands use the release
or production
cargo profile, respectively. Additionally, the parachain team has the latest Docker image published on Docker Hub. You can simply pull it using docker pull litentry/litentry-parachain:latest
to save time on building.
Building worker and enclave
To build enclave you can use the intel chip but make sure you’ve installed SGX SDK or use our worker with SGX_MODE=SW
.
Running Parachain and Tee-worker via Python Launch Script (recommended)
The simplest way to run the entire system is via a Python script. This method:
Checks port availability and sets different ports if required
Generates a config file for connecting a worker or running integration tests
Provides a flexible solution for running the system with multiple workers
Performs a cleanup after the program has been terminated
Running Parachain
The running parachain will depend on how it was built Docker - make launch-docker-rococo
Local Binary Standalone - make launch-standalone
Local Binary - make launch-binary-rococo
after a successful run, it would be possible to see details via polkadot
https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944#/explorer
Running Worker
Once the worker binary is successfully built, you'll be able to run it and connect it to the parachain.
If the worker runs successfully, a new teebag.ParentchainBlockProcessed
events will appear on the Polkadot Explorer at https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944#/explorer.
Last updated