Skip to content

Commit a436a7b

Browse files
committed
Merge remote-tracking branch 'origin/snapshot/livetest' into snapshot-gnosis-merge
2 parents c9f1b23 + 0472761 commit a436a7b

File tree

47 files changed

+9648
-1328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+9648
-1328
lines changed

.circleci/basis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
version: 2.1
22

33
commands:
4+
install-rsync:
5+
steps:
6+
- run:
7+
name: Install rsync
8+
command: |
9+
sudo apt update && sudo apt install rsync
410
install-asdf:
511
steps:
612
- run:

.circleci/rolling-shutter.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,29 @@ jobs:
6060
- restore_cache:
6161
keys:
6262
- rs-build-<< parameters.go-version >>-v4-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
63+
- install-rsync
6364
- install-asdf
6465
- run:
6566
name: "Install asdf plugins"
6667
command: |
6768
asdf plugin add tinygo https://github.com/schmir/asdf-tinygo.git || true
6869
asdf plugin add binaryen https://github.com/birros/asdf-binaryen.git || true
70+
asdf plugin add nodejs || true
6971
- run:
7072
name: "Install asdf managed executables"
7173
command: |
7274
asdf install tinygo
7375
asdf install binaryen
76+
asdf install nodejs
7477
- run: make build wasm
78+
- node/install-packages:
79+
app-dir: ../js/shutter-crypto
80+
override-ci-command: npm install
81+
- run: make wasm-js
82+
- run:
83+
name: "Run WASM tests"
84+
command: |
85+
make wasm-js-test
7586
- run:
7687
name: "Run unit tests with gotestsum"
7788
command: |

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
contracts/combined.json
22
contracts/node_modules
33
contracts/deployments
4-
docker/data
4+
docker/data*
55
play/work
6+
play/Dockerfile
67
rolling-shutter/bin
78
tools/snapshot/dummyserver/dist

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.direnv
44
.lsp
55
.vscode
6-
docker/data
6+
docker/data*
77
log
88
node_modules
99
result

docker/00-build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22

33
source ./common.sh
44

5-
$DC --profile dev down
65
$DC --profile dev build

docker/01-init-db.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
source ./common.sh
44

5+
mkdb() {
6+
$DC exec -T db createdb -U postgres $1
7+
$DC run -T --rm --no-deps $1 initdb --config /config/${1}.toml
8+
}
9+
510
$DC stop db
611
$DC rm -f db
712

@@ -11,8 +16,9 @@ $DC up -d db
1116
$DC run --rm --no-deps dockerize -wait tcp://db:5432 -timeout 40s
1217

1318
for cmd in snapshot keyper-0 keyper-1 keyper-2 keyper-3; do
14-
$DC exec db createdb -U postgres $cmd
15-
$DC run --rm --no-deps $cmd initdb --config /config/${cmd}.toml
19+
mkdb $cmd &
1620
done
1721

22+
wait
23+
1824
$DC stop db

docker/03-run.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ source ./common.sh
44

55
echo "Starting entire system"
66
$DC --profile dev up -d
7-
sleep 5
8-
$DC ps

docker/05-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo "Testing decryption key generation"
77
EPOCH_ID=$(LC_ALL=C tr -dc 'a-f0-9' </dev/urandom | head -c64)
88
json_body="{\"jsonrpc\": \"2.0\", \"method\": \"get_decryption_key\", \"id\": 1, \"params\": [\"1\", \"${EPOCH_ID}\"]}"
99
curl -XGET http://localhost:8754/api/v1/rpc -d "${json_body}"
10-
sleep 3
10+
sleep 5
1111
DECRYPTION_KEY_MSGS=$(${DC} logs snapshot | grep ${EPOCH_ID} | grep -c decryptionKey)
1212
if [[ $DECRYPTION_KEY_MSGS -gt 0 ]]; then
1313
echo "Decryption successful with $DECRYPTION_KEY_MSGS / 3 nodes"

docker/10-change-keyperset.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
source ./common.sh
44

5-
$DC run --rm --no-deps deploy-contracts run scripts/change-keypers.js
5+
TARGET_INDEX=${1:-1}
6+
7+
$DC run --rm --no-deps -e KEYPER_SET_INDEX=${TARGET_INDEX} deploy-contracts run scripts/change-keypers.js

docker/build-src/metrics/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ FROM victoriametrics/victoria-metrics
22

33
COPY targets.yaml /targets.yaml
44

5-
CMD ["-promscrape.config=/targets.yaml"]
5+
CMD ["-promscrape.config=/targets.yaml", "-search.latencyOffset=0s"]

0 commit comments

Comments
 (0)