From ead3b93dea08f425d3fb793df7d112d2fb9152d9 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Wed, 19 Jul 2023 15:48:21 +0200 Subject: [PATCH] CI: healthy params for teeracle testing --- cli/demo_teeracle_whitelist.sh | 14 +++++++------- docker/demo-teeracle.yml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cli/demo_teeracle_whitelist.sh b/cli/demo_teeracle_whitelist.sh index 5da2637fb5..d56b01728e 100755 --- a/cli/demo_teeracle_whitelist.sh +++ b/cli/demo_teeracle_whitelist.sh @@ -70,12 +70,12 @@ echo "Using client binary ${CLIENT_BIN}" echo "Using node uri ${NODEURL}:${NPORT}" echo "Using trusted-worker uri ${WORKER1URL}:${WORKER1PORT}" echo "Using worker market data update interval ${INTERVAL}" -echo "Count the update events for ${DURATION}" +echo "Count the update events for ${DURATION} blocks" echo "" COIN_GECKO="https://api.coingecko.com/" COIN_MARKET_CAP="https://pro-api.coinmarketcap.com/" -let "MIN_EXPECTED_NUM_OF_EVENTS=$DURATION/$INTERVAL-3" +let "MIN_EXPECTED_NUM_OF_EVENTS=$DURATION*6/$INTERVAL-3" echo "Minimum expected number of events with a single oracle source: ${MIN_EXPECTED_NUM_OF_EVENTS}" let "MIN_EXPECTED_NUM_OF_EVENTS_2 = 2*$MIN_EXPECTED_NUM_OF_EVENTS" @@ -94,7 +94,7 @@ echo "Reading MRENCLAVE from worker list: ${MRENCLAVE}" [[ -z $MRENCLAVE ]] && { echo "MRENCLAVE is empty. cannot continue" ; exit 1; } echo "" -echo "Listen to ExchangeRateUpdated events for ${DURATION} seconds. There should be no trusted oracle source!" +echo "Listen to ExchangeRateUpdated events for ${DURATION} blocks. There should be no trusted oracle source!" #${CLIENT} ${LISTEN_TO_EXCHANGE_RATE_EVENTS_CMD} ${DURATION} #echo "" @@ -107,12 +107,12 @@ ${CLIENT} ${ADD_TO_WHITELIST_CMD} //Alice ${COIN_GECKO} ${MRENCLAVE} echo "MRENCLAVE in whitelist for ${COIN_GECKO}" echo "" -echo "Listen to ExchangeRateUpdated events for ${DURATION} seconds, after a trusted oracle source has been added to the whitelist." +echo "Listen to ExchangeRateUpdated events for ${DURATION} blocks, after a trusted oracle source has been added to the whitelist." #${CLIENT} ${LISTEN_TO_EXCHANGE_RATE_EVENTS_CMD} ${DURATION} #echo "" read EVENTS_COUNT <<< $($CLIENT ${LISTEN_TO_EXCHANGE_RATE_EVENTS_CMD} ${DURATION} | awk '/ EVENTS_COUNT: / { print $2; exit }') -echo "Got ${EVENTS_COUNT} exchange rate updates from the trusted oracle source in ${DURATION} second(s)" +echo "Got ${EVENTS_COUNT} exchange rate updates from the trusted oracle source in ${DURATION} blocks(s)" echo "" echo "Add ${COIN_MARKET_CAP} for ${MRENCLAVE} as trusted oracle source" @@ -120,12 +120,12 @@ ${CLIENT} ${ADD_TO_WHITELIST_CMD} //Alice ${COIN_MARKET_CAP} ${MRENCLAVE} echo "MRENCLAVE in whitelist for ${COIN_MARKET_CAP}" echo "" -echo "Listen to ExchangeRateUpdated events for ${DURATION} seconds, after a second trusted oracle source has been added to the whitelist." +echo "Listen to ExchangeRateUpdated events for ${DURATION} blocks, after a second trusted oracle source has been added to the whitelist." #${CLIENT} ${LISTEN_TO_EXCHANGE_RATE_EVENTS_CMD} ${DURATION} #echo "" read EVENTS_COUNT_2 <<< $($CLIENT ${LISTEN_TO_EXCHANGE_RATE_EVENTS_CMD} ${DURATION} | awk '/ EVENTS_COUNT: / { print $2; exit }') -echo "Got ${EVENTS_COUNT_2} exchange rate updates from 2 trusted oracle sources in ${DURATION} second(s)" +echo "Got ${EVENTS_COUNT_2} exchange rate updates from 2 trusted oracle sources in ${DURATION} blocks(s)" echo "" echo "Results :" diff --git a/docker/demo-teeracle.yml b/docker/demo-teeracle.yml index 99dcb1c98d..e0bbd2a20f 100644 --- a/docker/demo-teeracle.yml +++ b/docker/demo-teeracle.yml @@ -63,7 +63,7 @@ services: "/usr/local/worker-cli/demo_teeracle_whitelist.sh -u ws://integritee-node -p 9912 -V wss://integritee-teeracle-worker -P 2011 - -d 21 -i ${TEERACLE_INTERVAL_SECONDS} + -d 7 -i ${TEERACLE_INTERVAL_SECONDS} -C /usr/local/bin/integritee-cli 2>&1" restart: "no" networks: