Skip to content

Commit

Permalink
add running instructions (#3145)
Browse files Browse the repository at this point in the history
* add running instructions
  • Loading branch information
kziemianek authored Oct 29, 2024
1 parent 303623d commit bc68f41
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 50 deletions.
2 changes: 1 addition & 1 deletion tee-worker/omni-executor/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ target/
**/*.bin

cache

omni-executor.manifest
8 changes: 4 additions & 4 deletions tee-worker/omni-executor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)

SELF_EXE = target/release/omni-executor
SELF_EXE = target/release/executor-worker

.PHONY: all
all: $(SELF_EXE) omni-executor.manifest
Expand Down Expand Up @@ -51,7 +51,7 @@ endif

.PHONY: start-gramine-server
start-gramine-server: all
$(GRAMINE) tee-bridge
$(GRAMINE) omni-executor ${ARGS}

.PHONY: clean
clean:
Expand All @@ -67,11 +67,11 @@ build-docker:

.PHONY: start-local
start-local:
docker-compose up
docker compose up

.PHONY: stop-local
stop-local:
docker-compose down
docker compose down

.PHONY: get-omni-pallet-metadata
get-omni-pallet-metadata:
Expand Down
18 changes: 17 additions & 1 deletion tee-worker/omni-executor/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Omni-executor worker

! Connect to trusted RPC endpoints !
! Connect to trusted RPC endpoints !

## Running inside TEE

Gramine is required for running inside TEE, please refer to [installation options](https://gramine.readthedocs.io/en/stable/installation.html).

1. `make SGX=1` to build and sign application
2. `RUST_LOG=info gramine-sgx omni-executor -- <parentchain-rpc-url> <ethereum-rpc-url>`


## Running whole setup locally

Build omni-executor docker image first `make build-docker`.
Start local environment using `make start-local` command.


First service run will generate substrate account, it needs to set as omni executor in `omniAccount` pallet.
44 changes: 0 additions & 44 deletions tee-worker/omni-executor/omni-executor.manifest

This file was deleted.

4 changes: 4 additions & 0 deletions tee-worker/omni-executor/omni-executor.manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ sgx.trusted_files = [
# - helper threads internal to Gramine — see:
# https://gramine.readthedocs.io/en/stable/manifest-syntax.html#number-of-threads
sgx.max_threads = {{ '1' if env.get('EDMM', '0') == '1' else '64' }}

# for easy demo setup
loader.insecure__use_cmdline_argv = true
loader.insecure__use_host_env = true

0 comments on commit bc68f41

Please sign in to comment.