Skip to content

Latest commit

 

History

History

tee-worker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

litentry tee-worker

Quickly launch parachain, tee worker and run ts-test against tee-worker

# uncomment below line if you haven't add below to your bash profile
# source "$HOME/.cargo/env"
# replace below '/opt/intel/sgxsdk/environment' with the sgxsdk environment file path in your system
source /opt/intel/sgxsdk/environment
# run clean if only SGX_MODE change
make clean
make SGX_MODE=SW WORKER_DEV=1
./local-setup/launch.py --config local-setup/development-worker.json --parachain local-docker
# run the ts test script below if container started
cd ./tee-worker/ts-tests
nvm use
corepack enable pnpm
pnpm install
pnpm --filter integration-tests run test-ii-identity:local
# other ts test

tee worker

This tee-worker is based on Integritee's worker

The following is based on the original README from integritee-worker.

If you think parachain-node launch too slowly, can use this branch: litentry-runtime and need to use the following command to build

# build integritee-node(not parachain-node)
cargo build --release --features "skip-extrinsic-filtering"

Build and Run

Please see our Integritee Book to learn how to build and run this.

To start multiple worker and a node with one simple command: Check out this README.

Docker

See docker/README.md.

Tests

There are 3 types of tests:

  • cargo tests
  • enclave tests
  • integration tests

Cargo Tests

Run

cargo test

Enclave Tests

Run

make
./bin/litentry-worker test --all

Integration Tests

See docker/README.md

Direct calls scalability

For direct calls, a worker runs a web-socket server inside the enclave. An important factor for scalability is the transaction throughput of a single worker instance, which is in part defined by the maximum number of concurrent socket connections possible. On Linux by default, a process can have a maximum of 1024 concurrent file descriptors (show by ulimit -n). If the web-socket server hits that limit, incoming connections will be declined until one of the established connections is closed. Permanently changing the ulimit -n value can be done in the /etc/security/limits.conf configuration file. See this guide for more information.