Skip to content

Commit

Permalink
Use workspace dependencies for tee-worker(s) (#3097)
Browse files Browse the repository at this point in the history
* init

* update Makefile

* update files

* update path

* fix docker

* fix docker

* fix docker

* try to fix more scripts

* try to fix

* init ws dep

* update tomls

* update tomls

* bitacross app and cli compiles

* bitacross app and cli compiles

* bitacross compiles

* restore toml

* update toml

* fmt

* fix ci

* update dockerignore

* add bin/README.md

* try to fix todo

* Hot fix create release draft: further-fix parachain-test (#3093)

* update path

* further fix

* Hot fix create release draft (#3094)

* update path

* further fix

* need image for testing

* init id-worker

* fix compile

* fix ci

* fix ci

* fix ci

* update type info for bc-worker

---------

Co-authored-by: BillyWooo <yang@trustcomputing.de>
  • Loading branch information
Kailai-Wang and BillyWooo authored Sep 27, 2024
1 parent 0fd1018 commit fe22fd9
Show file tree
Hide file tree
Showing 703 changed files with 6,649 additions and 39,642 deletions.
22 changes: 11 additions & 11 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

# stuff under tee-worker/
tee-worker/.dockerignore
tee-worker/bin/*.bin
tee-worker/bin/key.txt
tee-worker/bin/spid.txt
tee-worker/bin/sidechain_db/
tee-worker/docker/*.yml
tee-worker/docs/
tee-worker/scripts/
tee-worker/target/
tee-worker/tmp/
tee-worker/*.Dockerfile
tee-worker/Dockerfile
tee-worker/**/bin/*.bin
tee-worker/**/bin/key.txt
tee-worker/**/bin/spid.txt
tee-worker/**/bin/sidechain_db/
tee-worker/**/docker/*.yml
tee-worker/**/docs/
tee-worker/**/scripts/
tee-worker/**/target/
tee-worker/**/tmp/
tee-worker/**/*.Dockerfile
tee-worker/**/Dockerfile
12 changes: 7 additions & 5 deletions .github/file-filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
parachain_src: &parachain_src
- 'parachain/node/**'
- 'parachain/pallets/**'
- 'primitives/**'
- 'common/**'
- 'parachain/runtime/**'
- 'parachain/docker/Dockerfile'
- 'parachain/Cargo.*'
Expand All @@ -23,17 +23,19 @@ coverage_src: &coverage_src
- '.github/workflows/coverage.yml'

identity_src: &identity_src
- 'common/**'
- 'tee-worker/Cargo.toml'
- 'tee-worker/Cargo.lock'
- 'tee-worker/identity/**/*.rs'
- 'tee-worker/identity/**/Cargo.toml'
- 'tee-worker/identity/**/Cargo.lock'
- 'tee-worker/identity/**/rust-toolchain.toml'
- 'tee-worker/identity/build.Dockerfile'
- 'tee-worker/identity/enclave-runtime/**'

bitacross_src: &bitacross_src
- 'common/**'
- 'tee-worker/Cargo.toml'
- 'tee-worker/Cargo.lock'
- 'tee-worker/bitacross/**/*.rs'
- 'tee-worker/bitacross/**/Cargo.toml'
- 'tee-worker/bitacross/**/Cargo.lock'
- 'tee-worker/bitacross/**/rust-toolchain.toml'
- 'tee-worker/bitacross/build.Dockerfile'
- 'tee-worker/bitacross/enclave-runtime/**'
Expand Down
55 changes: 19 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ jobs:
cargo fmt --all -- --check
taplo fmt --check
- name: identity-worker fmt check
working-directory: ./tee-worker/identity
- name: tee-worker fmt check
working-directory: ./tee-worker
run: |
cargo fmt --all -- --check
taplo fmt --check
Expand All @@ -186,12 +186,6 @@ jobs:
run: |
cargo fmt --all -- --check
- name: bitacross-worker fmt check
working-directory: ./tee-worker/bitacross
run: |
cargo fmt --all -- --check
taplo fmt --check
- name: bitacross-worker enclave-runtime fmt check
working-directory: ./tee-worker/bitacross/enclave-runtime
run: |
Expand Down Expand Up @@ -258,12 +252,6 @@ jobs:
- set-condition
- sequentialise
container: "litentry/litentry-tee-dev:latest"
strategy:
matrix:
type:
- identity
- bitacross
name: ${{ matrix.type }}
steps:
- uses: actions/checkout@v4

Expand All @@ -273,15 +261,15 @@ jobs:
sudo apt-get install -yq openssl clang libclang-dev cmake protobuf-compiler
- name: Cargo test
working-directory: ./tee-worker/${{ matrix.type }}
working-directory: ./tee-worker
run: |
cargo test --release
- name: Worker common clippy
working-directory: ./tee-worker/${{ matrix.type }}
- name: Check clippy
working-directory: ./tee-worker
shell: bash
run: |
for d in . enclave-runtime; do
for d in . identity/enclave-runtime bitacross/enclave-runtime; do
pushd "$d"
echo "::group::cargo clippy all"
cargo clippy --release -- -D warnings
Expand All @@ -298,26 +286,21 @@ jobs:
done
- name: Identity-worker specific clippy
if: matrix.type == 'identity'
working-directory: ./tee-worker/identity
working-directory: ./tee-worker/identity/enclave-runtime
shell: bash
run: |
for d in . enclave-runtime; do
pushd "$d"
echo "::group::cargo clippy sidechain"
cargo clippy --release --features sidechain -- -D warnings
echo "::endgroup::"
echo "::group::cargo clippy evm"
cargo clippy --release --features evm -- -D warnings
echo "::endgroup::"
echo "::group::cargo clippy sidechain development"
cargo clippy --release --features sidechain,development -- -D warnings
echo "::endgroup::"
echo "::group::cargo clippy evm development"
cargo clippy --release --features evm,development -- -D warnings
echo "::endgroup::"
popd
done
echo "::group::cargo clippy sidechain"
cargo clippy --release --features sidechain -- -D warnings
echo "::endgroup::"
echo "::group::cargo clippy evm"
cargo clippy --release --features evm -- -D warnings
echo "::endgroup::"
echo "::group::cargo clippy sidechain development"
cargo clippy --release --features sidechain,development -- -D warnings
echo "::endgroup::"
echo "::group::cargo clippy evm development"
cargo clippy --release --features evm,development -- -D warnings
echo "::endgroup::"
- name: Fail early
if: failure()
Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,14 @@ fmt: fmt-cargo fmt-taplo fmt-ts
.PHONY: fmt-cargo ## cargo fmt
fmt-cargo:
@cd parachain && cargo fmt --all
@cd tee-worker/identity && cargo fmt --all
@cd tee-worker && cargo fmt --all
@cd tee-worker/identity/enclave-runtime && cargo fmt --all
@cd tee-worker/bitacross && cargo fmt --all
@cd tee-worker/bitacross/enclave-runtime && cargo fmt --all

.PHONY: fmt-taplo ## taplo fmt
fmt-taplo:
@cd parachain && RUST_LOG=error taplo fmt
@cd tee-worker/identity && RUST_LOG=error taplo fmt
@cd tee-worker/identity/enclave-runtime && RUST_LOG=error taplo fmt
@cd tee-worker && RUST_LOG=error taplo fmt

.PHONY: fmt-ts ## ts fmt
fmt-ts:
Expand Down
21 changes: 13 additions & 8 deletions local-setup/worker-log-level-config.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
[litentry-worker]
RUST_LOG="info"
litentry_worker="debug"
ws="warn"
ws="info"
sp_io="error"
substrate_api_client="warn"
itc_parentchain_light_client="info"
jsonrpsee_ws_client="warn"
jsonrpsee_ws_server="warn"
enclave_runtime="debug"
ita_stf="debug"
id_ita_stf="debug"
its_rpc_handler="warn"
itc_rpc_client="warn"
its_consensus_common="debug"
its_state="warn"
its_consensus_aura="warn"
"aura*"="warn"
its_consensus_slots="warn"
itc_direct_rpc_server="debug"
id_itc_direct_rpc_server="debug"
bc_itc_direct_rpc_server="debug"
itp_attestation_handler="debug"
http_req="debug"
lc_mock_server="warn"
Expand All @@ -26,17 +27,21 @@ lc_identity_verification="debug"
lc_stf_task_receiver="debug"
lc_stf_task_sender="debug"
lc_data_providers="debug"
itp_top_pool="debug"
itc_parentchain_indirect_calls_executor="debug"
itc_direct_rpc_client="debug"
itp_top_pool_author="debug"
id_itp_top_pool="debug"
bc_itp_top_pool="debug"
id_itc_parentchain_indirect_calls_executor="debug"
bc_itc_parentchain_indirect_calls_executor="debug"
id_itc_direct_rpc_client="debug"
bc_itc_direct_rpc_client="debug"
id_itp_top_pool_author="debug"
bc_itp_top_pool_author="debug"
bc_musig2_runner="debug"
bc_musig2_ceremony="debug"
bc_task_receiver="debug"

[litentry-cli]
RUST_LOG="debug"
ws="warn"
ws="info"
sp_io="warn"
substrate_api_client="warn"
enclave="debug"
File renamed without changes.
Loading

0 comments on commit fe22fd9

Please sign in to comment.