Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into NPG6325-integration-tests-earthly-integration
- Loading branch information
Showing
62 changed files
with
1,359 additions
and
680 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,3 +115,6 @@ result* | |
.prettierrc | ||
lefthook.yml | ||
treefmt.toml | ||
|
||
# local earthly Environments | ||
local/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
VERSION 0.7 | ||
|
||
build: | ||
FROM scratch | ||
COPY docker-compose.yml . | ||
SAVE ARTIFACT docker-compose.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
version: "3" | ||
|
||
services: | ||
db: | ||
image: postgres:14 | ||
restart: unless-stopped | ||
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
- POSTGRES_DB=CatalystEventDev | ||
- PGPASSWORD=postgres | ||
- PGUSER=catalyst-event-dev | ||
- PGDATABASE=CatalystEventDev | ||
healthcheck: | ||
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] | ||
interval: 2s | ||
timeout: 5s | ||
retries: 10 | ||
ports: | ||
- 5432:5432 | ||
volumes: | ||
- eventdb:/var/lib/postgresql/data | ||
|
||
migrations: | ||
image: migrations:latest | ||
environment: | ||
# Required environment variables for migrations | ||
- DB_HOST=db | ||
- DB_PORT=5432 | ||
- DB_NAME=CatalystEventDev | ||
- DB_SUPERUSER=postgres | ||
- DB_SUPERUSER_PASSWORD=postgres | ||
- DB_USER=catalyst-event-dev | ||
- DB_USER_PASSWORD=CHANGE_ME | ||
- ADMIN_ROLE_PASSWORD=CHANGE_ME | ||
- ADMIN_USER_PASSWORD=CHANGE_ME | ||
- ANON_ROLE_PASSWORD=CHANGE_ME | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
|
||
graphql: | ||
image: event-db-graphql:latest | ||
environment: | ||
- DATABASE_URL=postgres://catalyst-event-dev:CHANGE_ME@db/CatalystEventDev | ||
- JWT_SECRET=CHANGE_ME | ||
- GRAPHQL_PORT=5000 | ||
ports: | ||
- 5000:5000 | ||
depends_on: | ||
migrations: | ||
condition: service_completed_successfully | ||
|
||
cat-data-service: | ||
image: cat-data-service:latest | ||
environment: | ||
- DATABASE_URL=postgres://catalyst-event-dev:CHANGE_ME@db/CatalystEventDev | ||
depends_on: | ||
migrations: | ||
condition: service_completed_successfully | ||
ports: | ||
- 3030:3030 | ||
|
||
leader0: | ||
image: voting-node:latest | ||
hostname: leader0 | ||
depends_on: | ||
migrations: | ||
condition: service_completed_successfully | ||
environment: | ||
# Required env vars | ||
- IS_NODE_RELOADABLE=True | ||
- VOTING_HOST=0.0.0.0 | ||
- VOTING_PORT=8000 | ||
- VOTING_LOG_LEVEL=debug | ||
- VOTING_NODE_STORAGE=node_storage | ||
- EVENTDB_URL=postgres://catalyst-event-dev:CHANGE_ME@db/CatalystEventDev | ||
- JORM_PATH=jormungandr | ||
- JCLI_PATH=jcli | ||
### SECRET GENERATION | ||
# The CRS is used to generate committee members, this is only used by leader0 | ||
- COMMITTEE_CRS=COMMON-REFERENCE-STRING-USED-THAT-IS-SECRET | ||
- SECRET_SECRET=SUPER_SECRET_SECRET_THAT_MUST_BE_CHANGED | ||
### EXTERNAL DATA IMPORTER | ||
- IDEASCALE_API_TOKEN=USE-A-VALID-API-TOKEN-FROM-IDEASCALE | ||
- IDEASCALE_CAMPAIGN_GROUP=66 | ||
- IDEASCALE_STAGE_ID=4385 | ||
- IDEASCALE_CONFIG_PATH=/app/ideascale-importer-config.json | ||
- IDEASCALE_API_URL=https://cardano.ideascale.com | ||
### SNAPSHOT TOOL DATA IMPORTER | ||
- SNAPSHOT_INTERVAL_SECONDS=1800 | ||
- SNAPSHOT_OUTPUT_DIR=/tmp/snapshot-output | ||
- SNAPSHOT_NETWORK_ID=testnet | ||
- DBSYNC_URL=postgres://user:password@host:port/dbname | ||
- GVC_API_URL=https://cardano.ideascale.com | ||
volumes: | ||
- leader0_store:/node_storage | ||
- leader0_store:/tmp/snapshot-output | ||
- ./ideascale-importer-config.json:/app/ideascale-importer-config.json | ||
|
||
volumes: | ||
eventdb: | ||
leader0_store: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
set -exuo pipefail | ||
|
||
if [ "$#" -ne 1 ]; then | ||
echo "Script is expecting voteplan id " | ||
echo "./private.sh 9a278b6f788278e5cd8dfd6de8b8b8699a7f6b4847c680843de6c02d5b3169b2" | ||
exit -1 | ||
fi | ||
|
||
VOTE_PLAN_ID=$1 | ||
COMMITTEE_KEY=committee_1 | ||
COMMITTEE_PK=$(jcli key to-public < "$COMMITTEE_KEY") | ||
MEMBER_SECRET_KEY=$(printf "./%s_committees/%s/member_secret_key.sk" $VOTE_PLAN_ID $COMMITTEE_PK) | ||
|
||
jcli "votes" "tally" "decryption-shares" "--vote-plan" "active_plans.json" "--vote-plan-id" "$VOTE_PLAN_ID" "--key" "$MEMBER_SECRET_KEY" > decryption_share.json | ||
jcli "votes" "tally" "merge-shares" "decryption_share.json" > shares.json | ||
jcli "votes" "tally" "decrypt-results" "--vote-plan" "active_plans.json" "--vote-plan-id" "$VOTE_PLAN_ID" "--shares" "shares.json" "--threshold" "1" "--output-format" "json" > result.json |
Oops, something went wrong.