Skip to content

Commit

Permalink
Merge pull request #55 from olisystems/merge-upstream
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
m-yahya authored Sep 1, 2023
2 parents 7989d6b + 942b5a6 commit 5156e1d
Show file tree
Hide file tree
Showing 34 changed files with 1,586 additions and 89 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
clippy:
runs-on: ubuntu-latest
container: "integritee/integritee-dev:0.2.1"
container: "integritee/integritee-dev:0.2.2"
steps:
- uses: actions/checkout@v3
- name: init rust
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
echo "PROJECT=${{ matrix.flavor_id }}-${{ matrix.demo_name }}" >> $GITHUB_ENV
echo "VERSION=dev.$version" >> $GITHUB_ENV
echo "WORKER_IMAGE_TAG=integritee-worker:dev.$version" >> $GITHUB_ENV
echo "INTEGRITEE_NODE=integritee-node-dev-ias:1.1.0.$version" >> $GITHUB_ENV
echo "INTEGRITEE_NODE=integritee-node-dev:1.1.0.$version" >> $GITHUB_ENV
echo "CLIENT_IMAGE_TAG=integritee-cli:dev.$version" >> $GITHUB_ENV
if [[ ${{ matrix.sgx_mode }} == 'HW' ]]; then
echo "SGX_PROVISION=/dev/sgx/provision" >> $GITHUB_ENV
Expand Down Expand Up @@ -227,8 +227,8 @@ jobs:
fi
docker tag integritee-worker-${{ matrix.flavor_id }}-${{ github.sha }} ${{ env.WORKER_IMAGE_TAG }}
docker tag integritee-cli-client-${{ matrix.flavor_id }}-${{ github.sha }} ${{ env.CLIENT_IMAGE_TAG }}
docker pull integritee/integritee-node-dev-ias:1.1.0
docker tag integritee/integritee-node-dev-ias:1.1.0 ${{ env.INTEGRITEE_NODE }}
docker pull integritee/integritee-node-dev:1.1.0
docker tag integritee/integritee-node-dev:1.1.0 ${{ env.INTEGRITEE_NODE }}
docker images --all
##
Expand Down
35 changes: 19 additions & 16 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ dependencies = [
[[package]]
name = "claims-primitives"
version = "0.1.0"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"parity-scale-codec",
"rustc-hex",
Expand Down Expand Up @@ -839,7 +839,7 @@ dependencies = [
[[package]]
name = "common-primitives"
version = "0.1.0"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"derive_more",
"parity-scale-codec",
Expand Down Expand Up @@ -1339,7 +1339,7 @@ dependencies = [
[[package]]
name = "enclave-bridge-primitives"
version = "0.1.0"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"common-primitives",
"log 0.4.19",
Expand Down Expand Up @@ -2754,7 +2754,7 @@ dependencies = [

[[package]]
name = "integritee-cli"
version = "0.9.0"
version = "0.12.0"
dependencies = [
"array-bytes 6.1.0",
"base58",
Expand Down Expand Up @@ -2805,7 +2805,7 @@ dependencies = [
[[package]]
name = "integritee-node-runtime"
version = "1.1.34"
source = "git+https://github.com/integritee-network/integritee-node.git?branch=polkadot-v0.9.42#31b72e13596c36c4963ed6caf631377b68d34754"
source = "git+https://github.com/integritee-network/integritee-node.git?branch=sdk-v0.12.0-polkadot-v0.9.42#1fb7b051ca3b3ce63fcb1ae2f898aa067f8b3a1d"
dependencies = [
"frame-executive",
"frame-support",
Expand Down Expand Up @@ -2850,7 +2850,7 @@ dependencies = [

[[package]]
name = "integritee-service"
version = "0.9.0"
version = "0.12.0"
dependencies = [
"anyhow",
"async-trait",
Expand Down Expand Up @@ -3184,11 +3184,13 @@ dependencies = [
"itp-node-api",
"itp-ocall-api",
"itp-sgx-crypto",
"itp-sgx-runtime-primitives",
"itp-stf-executor",
"itp-stf-primitives",
"itp-test",
"itp-top-pool-author",
"itp-types",
"itp-utils",
"log 0.4.19",
"parity-scale-codec",
"sgx_tstd",
Expand Down Expand Up @@ -5399,7 +5401,7 @@ dependencies = [
[[package]]
name = "pallet-claims"
version = "0.9.12"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"claims-primitives",
"frame-support",
Expand Down Expand Up @@ -5469,7 +5471,7 @@ dependencies = [
[[package]]
name = "pallet-enclave-bridge"
version = "0.10.0"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"enclave-bridge-primitives",
"frame-support",
Expand Down Expand Up @@ -5567,7 +5569,7 @@ dependencies = [
[[package]]
name = "pallet-parentchain"
version = "0.9.0"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"frame-support",
"frame-system",
Expand Down Expand Up @@ -5652,7 +5654,7 @@ dependencies = [
[[package]]
name = "pallet-sidechain"
version = "0.10.0"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"enclave-bridge-primitives",
"frame-support",
Expand Down Expand Up @@ -5711,7 +5713,7 @@ dependencies = [
[[package]]
name = "pallet-teeracle"
version = "0.1.0"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"frame-support",
"frame-system",
Expand All @@ -5731,10 +5733,11 @@ dependencies = [
[[package]]
name = "pallet-teerex"
version = "0.10.0"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"frame-support",
"frame-system",
"hex",
"log 0.4.19",
"pallet-timestamp",
"parity-scale-codec",
Expand Down Expand Up @@ -7216,7 +7219,7 @@ dependencies = [
[[package]]
name = "sgx-verify"
version = "0.1.4"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"base64 0.13.1",
"chrono 0.4.26",
Expand Down Expand Up @@ -7503,7 +7506,7 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
[[package]]
name = "sidechain-primitives"
version = "0.1.0"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"parity-scale-codec",
"scale-info",
Expand Down Expand Up @@ -8449,7 +8452,7 @@ checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5"
[[package]]
name = "teeracle-primitives"
version = "0.1.0"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"common-primitives",
"sp-std",
Expand All @@ -8459,7 +8462,7 @@ dependencies = [
[[package]]
name = "teerex-primitives"
version = "0.1.0"
source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662"
source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.12.0-polkadot-v0.9.42#eaf611b79bc9d56b20c155150e99b549bf98436b"
dependencies = [
"common-primitives",
"derive_more",
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM integritee/integritee-dev:0.1.13
FROM integritee/integritee-dev:0.2.2
LABEL maintainer="[email protected]"

# By default we warp the service
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pipeline {
agent {
docker {
image 'integritee/integritee-dev:0.1.7'
image 'integritee/integritee-dev:0.2.2'
args '''
-u root
--privileged
Expand Down
2 changes: 1 addition & 1 deletion app-libs/sgx-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ sp-version = { default-features = false, git = "https://github.com/paritytech/su

# Integritee dependencies
pallet-evm = { default-features = false, optional = true, git = "https://github.com/integritee-network/frontier.git", branch = "bar/polkadot-v0.9.42" }
pallet-parentchain = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" }
pallet-parentchain = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "sdk-v0.12.0-polkadot-v0.9.42" }

[features]
default = ["std"]
Expand Down
4 changes: 2 additions & 2 deletions app-libs/stf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ sp-core = { default-features = false, features = ["full_crypto"], git = "https:/
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }

# scs / integritee
my-node-runtime = { package = "integritee-node-runtime", optional = true, git = "https://github.com/integritee-network/integritee-node.git", branch = "polkadot-v0.9.42" }
pallet-parentchain = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" }
my-node-runtime = { package = "integritee-node-runtime", optional = true, git = "https://github.com/integritee-network/integritee-node.git", branch = "sdk-v0.12.0-polkadot-v0.9.42" }
pallet-parentchain = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "sdk-v0.12.0-polkadot-v0.9.42" }

# simplyR
binary-merkle-tree = { default-features = false, git = "https://github.com/paritytech/substrate.git" }
Expand Down
24 changes: 17 additions & 7 deletions build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
### Cached Builder Stage
##################################################
# For the OLI guys, we removed the sccache part is it makes the native GA runners run out of space.
FROM integritee/integritee-dev:0.2.1 AS builder
# A builder stage that uses sccache to speed up local builds with docker
# Installation and setup of sccache should be moved to the integritee-dev image, so we don't
# always need to compile and install sccache on CI (where we have no caching so far).
FROM integritee/integritee-dev:0.2.2 AS builder
LABEL maintainer="[email protected]"

# set environment variables
Expand All @@ -40,6 +43,13 @@ ENV SGX_PRODUCTION=$SGX_PRODUCTION
ENV WORKHOME=/home/ubuntu/work
ENV HOME=/home/ubuntu

# RUN rustup default stable
# RUN cargo install sccache --locked

# ENV SCCACHE_CACHE_SIZE="20G"
# ENV SCCACHE_DIR=$HOME/.cache/sccache
# ENV RUSTC_WRAPPER="/opt/rust/bin/sccache"

ARG WORKER_MODE_ARG
ARG ADDITIONAL_FEATURES_ARG
ENV WORKER_MODE=$WORKER_MODE_ARG
Expand Down Expand Up @@ -74,12 +84,12 @@ RUN apt-get install -y \
libsgx-aesm-quote-ex-plugin \
libsgx-dcap-default-qpl \
libsgx-dcap-ql \
libsgx-dcap-quote-verify \
libsgx-epid \
libsgx-headers \
libsgx-quote-ex \
libsgx-ra-network \
libsgx-ra-uefi \
libsgx-dcap-quote-verify \
libsgx-epid \
libsgx-headers \
libsgx-quote-ex \
libsgx-ra-network \
libsgx-ra-uefi \
libsgx-uae-service

### Deployed CLI client
Expand Down
10 changes: 5 additions & 5 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "integritee-cli"
version = "0.9.0"
version = "0.12.0"
authors = ["Integritee AG <[email protected]>"]
edition = "2021"

Expand All @@ -25,12 +25,12 @@ thiserror = "1.0"
ws = { version = "0.9.1", features = ["ssl"] }

# scs / integritee
my-node-runtime = { package = "integritee-node-runtime", git = "https://github.com/integritee-network/integritee-node.git", branch = "polkadot-v0.9.42" }
pallet-enclave-bridge = { git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" }
my-node-runtime = { package = "integritee-node-runtime", git = "https://github.com/integritee-network/integritee-node.git", branch = "sdk-v0.12.0-polkadot-v0.9.42" }
pallet-enclave-bridge = { git = "https://github.com/integritee-network/pallets.git", branch = "sdk-v0.12.0-polkadot-v0.9.42" }
pallet-evm = { optional = true, git = "https://github.com/integritee-network/frontier.git", branch = "bar/polkadot-v0.9.42" }
pallet-teerex = { git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" }
pallet-teerex = { git = "https://github.com/integritee-network/pallets.git", branch = "sdk-v0.12.0-polkadot-v0.9.42" }
# `default-features = false` to remove the jsonrpsee dependency.
enclave-bridge-primitives = { git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" }
enclave-bridge-primitives = { git = "https://github.com/integritee-network/pallets.git", branch = "sdk-v0.12.0-polkadot-v0.9.42" }
substrate-api-client = { default-features = false, features = ["std", "ws-client"], git = "https://github.com/scs/substrate-api-client.git", branch = "polkadot-v0.9.42-tag-v0.10.0" }
substrate-client-keystore = { git = "https://github.com/scs/substrate-api-client.git", branch = "polkadot-v0.9.42-tag-v0.10.0" }

Expand Down
2 changes: 2 additions & 0 deletions cli/demo_direct_call.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ WORKER1URL=${WORKER1URL:-"wss://127.0.0.1"}
CLIENT_BIN=${CLIENT_BIN:-"./../bin/integritee-cli"}

echo "Using client binary ${CLIENT_BIN}"
${CLIENT_BIN} --version
echo "Using node uri ${NODEURL}:${NPORT}"
echo "Using trusted-worker uri ${WORKER1URL}:${WORKER1PORT}"
echo ""


AMOUNTSHIELD=50000000000
AMOUNTTRANSFER=40000000000

Expand Down
9 changes: 8 additions & 1 deletion cli/demo_direct_call_2_workers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,16 @@ WORKER2URL=${WORKER2URL:-"wss://127.0.0.1"}

CLIENT_BIN=${CLIENT_BIN:-"./../bin/integritee-cli"}

echo "Using client binary ${CLIENT_BIN}"
${CLIENT_BIN} --version
echo "Using node uri ${NODEURL}:${NPORT}"
echo "Using trusted-worker uri 1 ${WORKER1URL}:${WORKER1PORT}"
echo "Using trusted-worker uri 2 ${WORKER2URL}:${WORKER2PORT}"
echo ""

SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)

"${SCRIPT_DIR}"/demo_direct_call.sh -p "${NPORT}" -u "${NODEURL}" -V "${WORKER1URL}" -P "${WORKER1PORT}" -C "${CLIENT_BIN}" -t first
"${SCRIPT_DIR}"/demo_direct_call.sh -p "${NPORT}" -u "${NODEURL}" -V "${WORKER2URL}" -P "${WORKER2PORT}" -C "${CLIENT_BIN}" -t second

exit 0
exit 0
9 changes: 8 additions & 1 deletion cli/demo_indirect_invocation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,16 @@ WORKER2URL=${WORKER2URL:-"wss://127.0.0.1"}

CLIENT_BIN=${CLIENT_BIN:-"./../bin/integritee-cli"}

echo "Using client binary ${CLIENT_BIN}"
${CLIENT_BIN} --version
echo "Using node uri ${NODEURL}:${NPORT}"
echo "Using trusted-worker 1 uri ${WORKER1URL}:${WORKER1PORT}"
echo "Using trusted-worker 2 uri ${WORKER2URL}:${WORKER2PORT}"
echo ""

SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)

"${SCRIPT_DIR}"/demo_shielding_unshielding.sh -p "${NPORT}" -u "${NODEURL}" -V "${WORKER1URL}" -P "${WORKER1PORT}" -C "${CLIENT_BIN}" -t first
"${SCRIPT_DIR}"/demo_shielding_unshielding.sh -p "${NPORT}" -u "${NODEURL}" -V "${WORKER2URL}" -P "${WORKER2PORT}" -C "${CLIENT_BIN}" -t second

exit 0
exit 0
1 change: 1 addition & 0 deletions cli/demo_shielding_unshielding.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ WORKER1URL=${WORKER1URL:-"wss://127.0.0.1"}
CLIENT_BIN=${CLIENT_BIN:-"./../bin/integritee-cli"}

echo "Using client binary ${CLIENT_BIN}"
${CLIENT_BIN} --version
echo "Using node uri ${NODEURL}:${NPORT}"
echo "Using trusted-worker uri ${WORKER1URL}:${WORKER1PORT}"
echo ""
Expand Down
5 changes: 3 additions & 2 deletions cli/demo_sidechain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ WORKER2URL=${WORKER2URL:-"wss://127.0.0.1"}
CLIENT_BIN=${CLIENT_BIN:-"./../bin/integritee-cli"}

echo "Using client binary ${CLIENT_BIN}"
${CLIENT_BIN} --version
echo "Using node uri ${NODEURL}:${NPORT}"
echo "Using trusted-worker uri ${WORKER1URL}:${WORKER1PORT}"
echo "Using trusted-worker-2 uri ${WORKER2URL}:${WORKER2PORT}"
echo "Using trusted-worker 1 uri ${WORKER1URL}:${WORKER1PORT}"
echo "Using trusted-worker 2 uri ${WORKER2URL}:${WORKER2PORT}"

INITIALFUNDS=50000000000
AMOUNTTRANSFER=20000000000
Expand Down
1 change: 1 addition & 0 deletions cli/demo_smart_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ WORKERURL=${WORKERURL:-"wss://127.0.0.1"}
CLIENT_BIN=${CLIENT_BIN:-"./../bin/integritee-cli"}

echo "Using client binary ${CLIENT_BIN}"
${CLIENT_BIN} --version
echo "Using node uri ${NODEURL}:${NPORT}"
echo "Using trusted-worker uri ${WORKERURL}:${WORKERPORT}"

Expand Down
1 change: 1 addition & 0 deletions cli/demo_teeracle_generic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ LISTEN_TO_ORACLE_EVENTS_CMD="oracle listen-to-oracle-events"
ADD_TO_WHITELIST_CMD="oracle add-to-whitelist"

echo "Using client binary ${CLIENT_BIN}"
${CLIENT_BIN} --version
echo "Using node uri ${NODEURL}:${NPORT}"
echo "Using trusted-worker uri ${WORKER1URL}:${WORKER1PORT}"
echo "Using worker data update interval ${INTERVAL}"
Expand Down
1 change: 1 addition & 0 deletions cli/demo_teeracle_whitelist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ LISTEN_TO_EXCHANGE_RATE_EVENTS_CMD="oracle listen-to-exchange-rate-events"
ADD_TO_WHITELIST_CMD="oracle add-to-whitelist"

echo "Using client binary ${CLIENT_BIN}"
${CLIENT_BIN} --version
echo "Using node uri ${NODEURL}:${NPORT}"
echo "Using trusted-worker uri ${WORKER1URL}:${WORKER1PORT}"
echo "Using worker market data update interval ${INTERVAL}"
Expand Down
Loading

0 comments on commit 5156e1d

Please sign in to comment.