Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
4689acf
Shielding parentchain transfers (#1378)
coax1d Nov 15, 2023
4e4de90
Ab/shield from shard vault (#1497)
brenzi Nov 20, 2023
9672c7e
expose shard and shard vault rpc call (#1498)
brenzi Nov 20, 2023
922e873
[CI] test shielding/unshielding using shard vault (#1499)
brenzi Nov 20, 2023
d2db3e0
fix unresolved imports
m-yahya Nov 22, 2023
636ed10
import String
m-yahya Nov 22, 2023
1eeef4d
reorder imports
m-yahya Nov 22, 2023
a07aad4
fix path
m-yahya Nov 22, 2023
06d312d
fix path
m-yahya Nov 22, 2023
690fe70
comment orders dir path
m-yahya Nov 22, 2023
25ef717
remove comment
m-yahya Nov 23, 2023
882e394
Clean up cargo dependencies (#1503)
Kailai-Wang Nov 28, 2023
b8c6dc6
TargetA shielding unshielding sidechain by event (#1502)
brenzi Nov 29, 2023
60ad5cf
run tests on ubuntu-latest
m-yahya Nov 29, 2023
60ef825
Specify return type in `perform_trusted_operation` (#1500)
kziemianek Nov 30, 2023
4625871
run tests on self-hosted runner
m-yahya Nov 30, 2023
597c787
Fix OOM error in large parentchain syncs with sidechain feature. (#1493)
clangenb Nov 30, 2023
5cb95fe
bump version 0.12.1
brenzi Nov 30, 2023
a36ae4b
support json-rpc request string id (#1512)
kziemianek Dec 1, 2023
642aece
fix matrix host
m-yahya Dec 1, 2023
e40355f
Return encoded extrinsics without padding (#1505)
Kailai-Wang Dec 4, 2023
66223ce
ensure extrinsic success for enclave RA registration and fix #1515 (#…
brenzi Dec 6, 2023
88bf275
rename scripts
m-yahya Dec 7, 2023
b70c116
fix file name
m-yahya Dec 7, 2023
8a3ea6e
skip indirect invocations for initial sync of integritee parentchain …
brenzi Dec 8, 2023
3d31fa7
use envsubst
m-yahya Dec 9, 2023
3c13d36
remove test for BEST-Energy
m-yahya Dec 12, 2023
5f82ff5
automatically init shard if primary worker and no shard exists onchai…
brenzi Dec 13, 2023
c76c688
Hopefully fix of the service test
mosonyi Dec 15, 2023
af4080e
rename test
m-yahya Dec 15, 2023
c5d61cc
peer discovery by shard status with flexible url prefix (#1532)
brenzi Dec 17, 2023
9aa5d60
fix comment
m-yahya Dec 18, 2023
ea55416
comment enclave test
m-yahya Dec 18, 2023
b7c72bb
custom dependencies on parentchain runtimes to decode L1 Events (#1528)
brenzi Dec 21, 2023
78b1356
tiny mods to ease testing and log readability (#1549)
brenzi Dec 21, 2023
7e91475
Ab/fix light client provisioning and unshielding (#1541)
brenzi Dec 21, 2023
7ff60be
got rid of runtime dependencies (#1550)
brenzi Dec 21, 2023
455c3b7
cosmetics (#1551)
brenzi Dec 26, 2023
b85cabb
more robust sidechain block import logic (#1558)
brenzi Dec 29, 2023
c640ddc
make rococo relaychain work as shielding target (#1546)
brenzi Jan 10, 2024
061aff2
propagate parentchain(s) timestamps (#1572)
brenzi Jan 15, 2024
5df0a13
fast-sync targetA/B (#1573)
brenzi Jan 17, 2024
17aae85
add comment
m-yahya Jan 23, 2024
6aa384d
dummy commit to start CI tests
m-yahya Jan 23, 2024
95681ea
Merge tag 'v0.12.11' into my/fix-merged-conflicts
m-yahya Feb 12, 2024
9b840f0
update cargo lock
m-yahya Feb 12, 2024
10f98b4
fix clippy error
m-yahya Feb 12, 2024
f8995bf
update with upstream
m-yahya Feb 12, 2024
05cf25d
update toml_datetime
m-yahya Feb 12, 2024
d1ce9a1
manually set toml_datetime to 0.6.3
m-yahya Feb 12, 2024
0d4734b
update lock files with upstream
m-yahya Feb 12, 2024
f7d5069
update toml_datetime with correct command
m-yahya Feb 12, 2024
6c7c29c
specify the taplo version
m-yahya Feb 14, 2024
297674b
add missing dependencies
m-yahya Feb 14, 2024
11f0aaa
fix args, type mismatches, and inference error
m-yahya Feb 14, 2024
0249a18
fix unreachable pattern
m-yahya Feb 15, 2024
9f10430
fix mismatched types
m-yahya Feb 15, 2024
ebe771f
fix decode response error
m-yahya Feb 21, 2024
487c01a
comment EVM test
m-yahya Feb 21, 2024
fb3c623
test gh runner
m-yahya Apr 3, 2024
2654bac
comment teeracle test
m-yahya Apr 4, 2024
4fdb5e5
comment teeracle tests
m-yahya Apr 4, 2024
e83f47d
comment teeracle test
m-yahya Apr 4, 2024
a7c12af
test commit
m-yahya Apr 4, 2024
8f8c35f
test commit
m-yahya Apr 24, 2024
1a30c25
comment Teeracle test
m-yahya Apr 24, 2024
a5af265
comment teeracle test
m-yahya Apr 24, 2024
5e98531
comment teeracle release
m-yahya Apr 25, 2024
8ae1066
comment tests
m-yahya Apr 25, 2024
1d1f453
Update build_and_test.yml
muhammadumairsabir Apr 26, 2024
355ad4f
Update build_and_test.yml
muhammadumairsabir Apr 26, 2024
c82f277
Update build_and_test.yml
muhammadumairsabir May 28, 2024
9455db5
remove retry option
m-yahya Jul 31, 2024
ac07d62
use actions v3
m-yahya Jul 31, 2024
d98153f
update CI with upstream and comment EVM and Teeracle tests
m-yahya Jul 31, 2024
3734a61
add debug info and use actions v4
m-yahya Jul 31, 2024
3a413d3
use artifact actions v4
m-yahya Jul 31, 2024
a18f4bd
use actions v3 and comment benchmark test
m-yahya Aug 1, 2024
6c5c68f
comment M6, M8, M6 tests
m-yahya Aug 1, 2024
b9c6957
run benchmark with self-hosted runner
m-yahya Aug 1, 2024
733f461
use test-runner-sgx
m-yahya Aug 1, 2024
46bc615
add steps to upload worker artifacts
m-yahya Aug 1, 2024
04b0736
update download worker artifacts
m-yahya Aug 1, 2024
398c718
update with the upstream
m-yahya Aug 1, 2024
8e574ff
fix artifact not found error
m-yahya Aug 1, 2024
f6539d5
run build test on self-hosted runner
m-yahya Aug 1, 2024
27187f1
fix artifact not found
m-yahya Aug 1, 2024
15d0865
update to fix artifact not found
m-yahya Aug 1, 2024
28d3ab0
fix artifacts not found
m-yahya Aug 1, 2024
e5c3f73
fix artifact not found error
m-yahya Aug 1, 2024
fba497f
fix artifact not found
m-yahya Aug 1, 2024
6391a2b
comment download sidechain image
m-yahya Aug 2, 2024
ac8aac3
comment download worker image
m-yahya Aug 2, 2024
46ff609
update with the upstream
m-yahya Aug 2, 2024
e772ec6
update to fix artifact not found error
m-yahya Aug 2, 2024
26eac61
uncomment M6 test
m-yahya Aug 2, 2024
20e3527
uncomment M6 offchain-worker
m-yahya Aug 2, 2024
0b61872
uncomment Release Build of teeracle
m-yahya Aug 2, 2024
a8fc453
add tests
m-yahya Aug 2, 2024
c68f6b6
runs on ubuntu-latest
m-yahya Aug 2, 2024
8437042
use self-hosted to trigger expected checks
m-yahya Aug 2, 2024
9bc265d
update to use ubuntu-latest
m-yahya Aug 2, 2024
9f75a13
update to use ubuntu-latest
m-yahya Aug 2, 2024
fb479c2
run integration-tests on ubuntu-latest
m-yahya Aug 2, 2024
d295fcd
use matrix.host
m-yahya Aug 2, 2024
b0fdc0b
run release-build on integritee-builder-sgx
m-yahya Aug 2, 2024
992f4f7
run M6 on ubuntu-latest
m-yahya Aug 2, 2024
40a2f4d
add host for BestEnergy test
m-yahya Aug 2, 2024
d73e296
run BestEnergy on ubuntu-latest
m-yahya Aug 2, 2024
1c1bacc
update actions version
m-yahya Aug 2, 2024
6cc3d06
fix artifacts not found error
m-yahya Aug 2, 2024
4ace537
correct name for download sidechain image
m-yahya Aug 2, 2024
ec771ec
add M6 test
m-yahya Aug 2, 2024
76a9a9b
use test-runner-sgx
m-yahya Aug 2, 2024
527f98e
remove test yml
m-yahya Aug 2, 2024
558a38f
remove diff file
m-yahya Aug 2, 2024
44b1c6d
use selft hosted
m-yahya Aug 3, 2024
f2b7b2c
use ubuntu latest
m-yahya Aug 3, 2024
4b6ad71
update with upstream
m-yahya Aug 3, 2024
8e1fefd
Merge branch 'my/fix-merged-conflicts' of https://github.com/olisyste…
m-yahya Aug 3, 2024
642946a
use ubuntu latest
m-yahya Aug 3, 2024
d816ba0
use artifact v4 for cli client
m-yahya Aug 3, 2024
2dd4d08
uncomment tests
m-yahya Aug 3, 2024
b95d613
comment script
m-yahya Aug 3, 2024
bc7dfa0
use SW
m-yahya Aug 3, 2024
8c77b9c
add energy market demo
m-yahya Aug 3, 2024
3e316c5
comment tests
m-yahya Aug 3, 2024
dfc8ef4
manually add worker node 1
m-yahya Aug 3, 2024
cc247bd
comment demo
m-yahya Aug 3, 2024
d9d70c4
add tests without demo
m-yahya Aug 3, 2024
c92f8b9
run on ubuntu-latest
m-yahya Aug 3, 2024
5ccde13
run with HW
m-yahya Aug 3, 2024
6f23768
remove bin output files
m-yahya Aug 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[CI] test shielding/unshielding using shard vault (integritee-network…
…#1499)

* now shielding from vault instead of alice. breaks sidechain block production

* fix

* fix unit testing

* fix clippy

* clean up rpc api definitions

* rpc works

* added cli commands for new rpc methods

* get-shard and get-shard-vault subcommands work

* cargo fix

* fix clippy

* prepare CI and docker for testing shard vault too

* skip shard vault tests for offchain-worker which doesn't support that feature (yet)
  • Loading branch information
brenzi authored Nov 20, 2023
commit 922e8733ff5bbd120a1c5b3f32b2b3deb24861f3
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ jobs:
include:
- test: M6
flavor_id: sidechain
demo_name: demo-indirect-invocation
demo_name: demo-shielding-unshielding-multiworker
host: test-runner-sgx
sgx_mode: HW
- test: M8
Expand All @@ -287,7 +287,7 @@ jobs:
sgx_mode: HW
- test: M6
flavor_id: offchain-worker
demo_name: demo-indirect-invocation
demo_name: demo-shielding-unshielding-multiworker
host: test-runner-sgx
sgx_mode: HW
- test: Teeracle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,12 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
"${SCRIPT_DIR}"/demo_shielding_unshielding.sh -p "${INTEGRITEE_RPC_PORT}" -u "${INTEGRITEE_RPC_URL}" -V "${WORKER_1_URL}" -P "${WORKER_1_PORT}" -C "${CLIENT_BIN}" -t first
"${SCRIPT_DIR}"/demo_shielding_unshielding.sh -p "${INTEGRITEE_RPC_PORT}" -u "${INTEGRITEE_RPC_URL}" -V "${WORKER_2_URL}" -P "${WORKER_2_PORT}" -C "${CLIENT_BIN}" -t second

if [ "$FLAVOR_ID" = offchain-worker ]; then
echo "offchain-worker does not support shard vault shielding, therefore we skip those tests"
exit 0
fi

"${SCRIPT_DIR}"/demo_shielding_unshielding_using_shard_vault.sh -p "${INTEGRITEE_RPC_PORT}" -u "${INTEGRITEE_RPC_URL}" -V "${WORKER_1_URL}" -P "${WORKER_1_PORT}" -C "${CLIENT_BIN}" -t first
"${SCRIPT_DIR}"/demo_shielding_unshielding_using_shard_vault.sh -p "${INTEGRITEE_RPC_PORT}" -u "${INTEGRITEE_RPC_URL}" -V "${WORKER_2_URL}" -P "${WORKER_2_PORT}" -C "${CLIENT_BIN}" -t second

exit 0
265 changes: 265 additions & 0 deletions cli/demo_shielding_unshielding_using_shard_vault.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
#!/bin/bash

# to make sure the script aborts when (sub-)function exits abnormally
set -e

# Demonstrates how to shield tokens from the parentchain into the sidechain.
#
# setup:
# run all on localhost:
# integritee-node purge-chain --dev
# integritee-node --dev -lruntime=debug
# rm light_client_db.bin
# export RUST_LOG=integritee_service=info,ita_stf=debug
# integritee-service init_shard
# integritee-service shielding-key
# integritee-service signing-key
# integritee-service run
#
# then run this script

# usage:
# demo_shielding_unshielding.sh -p <NODEPORT> -P <WORKERPORT> -t <TEST_BALANCE_RUN> -m file
#
# TEST_BALANCE_RUN is either "first" or "second"
# if -m file is set, the mrenclave will be read from file

while getopts ":m:p:P:t:u:V:C:" opt; do
case $opt in
t)
TEST=$OPTARG
;;
m)
READ_MRENCLAVE=$OPTARG
;;
p)
INTEGRITEE_RPC_PORT=$OPTARG
;;
P)
WORKER_1_PORT=$OPTARG
;;
u)
INTEGRITEE_RPC_URL=$OPTARG
;;
V)
WORKER_1_URL=$OPTARG
;;
C)
CLIENT_BIN=$OPTARG
;;
*)
echo "invalid arg ${OPTARG}"
exit 1
esac
done

# Using default port if none given as arguments.
INTEGRITEE_RPC_PORT=${INTEGRITEE_RPC_PORT:-9944}
INTEGRITEE_RPC_URL=${INTEGRITEE_RPC_URL:-"ws://127.0.0.1"}

WORKER_1_PORT=${WORKER_1_PORT:-2000}
WORKER_1_URL=${WORKER_1_URL:-"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 ${INTEGRITEE_RPC_URL}:${INTEGRITEE_RPC_PORT}"
echo "Using trusted-worker uri ${WORKER_1_URL}:${WORKER_1_PORT}"
echo ""

# the parentchain token is 12 decimal
UNIT=$(( 10 ** 12 ))

# make these amounts greater than ED
AMOUNT_SHIELD=$(( 6 * UNIT ))
AMOUNT_TRANSFER=$(( 2 * UNIT ))
AMOUNT_UNSHIELD=$(( 1 * UNIT ))

CLIENT="${CLIENT_BIN} -p ${INTEGRITEE_RPC_PORT} -P ${WORKER_1_PORT} -u ${INTEGRITEE_RPC_URL} -U ${WORKER_1_URL}"

# offchain-worker only suppports indirect calls
CALLTYPE=
case "$FLAVOR_ID" in
sidechain) CALLTYPE="--direct" ;;
offchain-worker) : ;;
*) CALLTYPE="--direct" ;;
esac
echo "using call type: ${CALLTYPE} (empty means indirect)"

# interval and max rounds to wait to check the given account balance in sidechain
WAIT_INTERVAL_SECONDS=10
WAIT_ROUNDS=20

# Poll and assert the given account's state is equal to expected,
# with timeout WAIT_INTERVAL_SECONDS * WAIT_ROUNDS
# usage:
# wait_assert_state <mrenclave> <account> <state-name> <expected-state>
# the `state-name` has to be the supported subcommand, e.g. `balance`, `nonce`
function wait_assert_state()
{
for i in $(seq 1 $WAIT_ROUNDS); do
sleep $WAIT_INTERVAL_SECONDS
state=$(${CLIENT} trusted --mrenclave "$1" "$3" "$2")
if [ $state -eq "$4" ]; then
return
else
:
fi
done
echo
echo "Assert $2 $3 failed, expected = $4, actual = $state"
exit 1
}

# Do a live query and assert the given account's state is equal to expected
# usage:
# assert_state <mrenclave> <account> <state-name> <expected-state>
function assert_state()
{
state=$(${CLIENT} trusted --mrenclave "$1" "$3" "$2")
if [ -z "$state" ]; then
echo "Query $2 $3 failed"
exit 1
fi

if [ $state -eq "$4" ]; then
return
fi
echo
echo "Assert $2 $3 failed, expected = $4, actual = $state"
exit 1
}

echo "* Query on-chain enclave registry:"
${CLIENT} list-workers
echo ""

if [ "$READ_MRENCLAVE" = "file" ]
then
read MRENCLAVE <<< $(cat ~/mrenclave.b58)
echo "Reading MRENCLAVE from file: ${MRENCLAVE}"
else
# this will always take the first MRENCLAVE found in the registry !!
read MRENCLAVE <<< $($CLIENT list-workers | awk '/ MRENCLAVE: / { print $2; exit }')
echo "Reading MRENCLAVE from worker list: ${MRENCLAVE}"
fi
[[ -z $MRENCLAVE ]] && { echo "MRENCLAVE is empty. cannot continue" ; exit 1; }


echo "* Create a new incognito account for Bob"
ICGACCOUNTBOB=$(${CLIENT} trusted --mrenclave ${MRENCLAVE} new-account)
echo " Bob's incognito account = ${ICGACCOUNTBOB}"
echo ""

echo "* Query shard vault account"
VAULT=$(${CLIENT} trusted get-shard-vault)
echo " shard vault account = ${VAULT}"
echo ""

# Asssert the initial balance of Charlie incognito
# The initial balance of Bob incognito should always be 0, as Bob is newly created
BALANCE_INCOGNITO_CHARLIE=0
case $TEST in
first)
wait_assert_state ${MRENCLAVE} //Charlie balance 0 ;;
second)
wait_assert_state ${MRENCLAVE} //Charlie balance $(( AMOUNT_SHIELD - AMOUNT_TRANSFER - AMOUNT_UNSHIELD ))
BALANCE_INCOGNITO_CHARLIE=$(( AMOUNT_SHIELD - AMOUNT_TRANSFER - AMOUNT_UNSHIELD )) ;;
*)
echo "assuming first run of test"
wait_assert_state ${MRENCLAVE} //Charlie balance 0 ;;
esac

echo "* Shield ${AMOUNT_SHIELD} tokens to Charlie's account on L2"
${CLIENT} transfer //Charlie ${VAULT} ${AMOUNT_SHIELD}
echo ""

echo "* Wait and assert Charlie's L2 account balance... "
wait_assert_state ${MRENCLAVE} //Charlie balance $(( BALANCE_INCOGNITO_CHARLIE + AMOUNT_SHIELD ))
echo "✔ ok"

echo "* Wait and assert Bob's incognito account balance... "
wait_assert_state ${MRENCLAVE} ${ICGACCOUNTBOB} balance 0
echo "✔ ok"
echo ""

echo "* Send ${AMOUNT_TRANSFER} funds from Charlie's L2 account to Bob's incognito account"
$CLIENT trusted --mrenclave ${MRENCLAVE} transfer //Charlie ${ICGACCOUNTBOB} ${AMOUNT_TRANSFER}
echo ""

echo "* Wait and assert Charlie's L2 account balance... "
wait_assert_state ${MRENCLAVE} //Charlie balance $(( BALANCE_INCOGNITO_CHARLIE + AMOUNT_SHIELD - AMOUNT_TRANSFER ))
echo "✔ ok"

echo "* Wait and assert Bob's incognito account balance... "
wait_assert_state ${MRENCLAVE} ${ICGACCOUNTBOB} balance ${AMOUNT_TRANSFER}
echo "✔ ok"
echo ""

echo "* Un-shield ${AMOUNT_UNSHIELD} tokens from Charlie's incognito account to Ferie's L1 account"
${CLIENT} trusted --mrenclave ${MRENCLAVE} unshield-funds //Charlie //Ferdie ${AMOUNT_UNSHIELD}
echo ""

echo "* Wait and assert Charlie's incognito account balance... "
wait_assert_state ${MRENCLAVE} //Charlie balance $(( BALANCE_INCOGNITO_CHARLIE + AMOUNT_SHIELD - AMOUNT_TRANSFER - AMOUNT_UNSHIELD ))
echo "✔ ok"

echo "* Wait and assert Bob's incognito account balance... "
wait_assert_state ${MRENCLAVE} ${ICGACCOUNTBOB} balance ${AMOUNT_TRANSFER}
echo "✔ ok"

# Test the nonce handling, using Bob's incognito account as the sender as Charlie's
# balance needs to be verified in the second round while Bob is newly created each time

echo "* Create a new incognito account for Charlie"
ICGACCOUNTCHARLIE=$(${CLIENT} trusted --mrenclave ${MRENCLAVE} new-account)
echo " Charlie's incognito account = ${ICGACCOUNTCHARLIE}"
echo ""

echo "* Assert Bob's incognito initial nonce..."
assert_state ${MRENCLAVE} ${ICGACCOUNTBOB} nonce 0
echo "✔ ok"
echo ""

echo "* Send 3 consecutive 0.2 UNIT balance Transfer Bob -> Charlie"
for i in $(seq 1 3); do
# use direct calls so they are submitted to the top pool synchronously
$CLIENT trusted $CALLTYPE --mrenclave ${MRENCLAVE} transfer ${ICGACCOUNTBOB} ${ICGACCOUNTCHARLIE} $(( AMOUNT_TRANSFER / 10 ))
done
echo ""

echo "* Assert Bob's incognito current nonce..."
wait_assert_state ${MRENCLAVE} ${ICGACCOUNTBOB} nonce 3
echo "✔ ok"
echo ""

echo "* Send a 2 UNIT balance Transfer Bob -> Charlie (that will fail)"
$CLIENT trusted $CALLTYPE --mrenclave ${MRENCLAVE} transfer ${ICGACCOUNTBOB} ${ICGACCOUNTCHARLIE} ${AMOUNT_TRANSFER}
echo ""

echo "* Assert Bob's incognito nonce..."
# the nonce should be increased nontheless, even for the failed tx
wait_assert_state ${MRENCLAVE} ${ICGACCOUNTBOB} nonce 4
echo "✔ ok"
echo ""

echo "* Send another 0.2 UNIT balance Transfer Bob -> Charlie"
$CLIENT trusted $CALLTYPE --mrenclave ${MRENCLAVE} transfer ${ICGACCOUNTBOB} ${ICGACCOUNTCHARLIE} $(( AMOUNT_TRANSFER / 10 ))
echo ""

echo "* Assert Bob's incognito nonce..."
wait_assert_state ${MRENCLAVE} ${ICGACCOUNTBOB} nonce 5
echo "✔ ok"
echo ""

echo "* Wait and assert Bob's incognito account balance... "
# in total 4 balance transfer should go through => 1.2 UNIT remaining
wait_assert_state ${MRENCLAVE} ${ICGACCOUNTBOB} balance $(( AMOUNT_TRANSFER * 6 / 10 ))
echo "✔ ok"

echo ""
echo "-----------------------"
echo "✔ The $TEST test passed!"
echo "-----------------------"
echo ""
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ Starts all services (node and workers), using the `integritee-worker:dev` images
### Demo indirect invocation (M6)
Build
```
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose -f <(envsubst < docker-compose.yml) -f <(envsubst < demo-indirect-invocation.yml) build --build-arg WORKER_MODE_ARG=offchain-worker
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose -f <(envsubst < docker-compose.yml) -f <(envsubst < demo-shielding-unshielding-multiworker.yml) build --build-arg WORKER_MODE_ARG=offchain-worker
```
Run
```
FLAVOR_ID=offchain-worker docker compose -f <(envsubst < docker-compose.yml) -f <(envsubst < demo-indirect-invocation.yml) up demo-indirect-invocation --exit-code-from demo-indirect-invocation
FLAVOR_ID=offchain-worker docker compose -f <(envsubst < docker-compose.yml) -f <(envsubst < demo-shielding-unshielding-multiworker.yml) up demo-shielding-unshielding-multiworker --exit-code-from demo-shielding-unshielding-multiworker
```
### Demo direct call (M8)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
demo-indirect-invocation:
demo-shielding-unshielding-multiworker:
image: integritee-cli:${VERSION:-dev}
devices:
- "${SGX_PROVISION:-/dev/null}:/dev/sgx/provision"
Expand All @@ -24,9 +24,9 @@ services:
networks:
- integritee-test-network
entrypoint:
"/usr/local/worker-cli/demo_indirect_invocation.sh -p 9912 -u ws://integritee-node
"/usr/local/worker-cli/demo_shielding_unshielding_multiworker.sh -p 9912 -u ws://integritee-node
-V wss://integritee-worker-1 -A 2011 -W wss://integritee-worker-2 -B 2012 -C /usr/local/bin/integritee-cli 2>&1"
restart: "no"
networks:
integritee-test-network:
driver: bridge
driver: bridge
Loading