Skip to content

Commit

Permalink
Merge branch 'main' into fix/ideascale-importer-args
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman authored Mar 29, 2024
2 parents 6252e55 + f1b1acc commit a6894bf
Show file tree
Hide file tree
Showing 23 changed files with 1,626 additions and 264 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ jobs:
aws_ecr_registry: 332405224602.dkr.ecr.eu-central-1.amazonaws.com
aws_role_arn: arn:aws:iam::332405224602:role/ci
aws_region: eu-central-1
deployment_images: |
cat-data-service
fragment-exporter
migrations
voting-node
publish_docs: false
secrets:
deployment_token: ${{ secrets.CI_BOT_TOKEN }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
earthly_runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
Expand Down
99 changes: 0 additions & 99 deletions .github/workflows/nix.yml

This file was deleted.

22 changes: 11 additions & 11 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ jobs:
uses: taiki-e/install-action@nextest

- name: Install cargo-make
run: cargo install --force cargo-make
run: cargo install --force cargo-make --locked

- name: Install refinery
run: cargo install refinery_cli
run: cargo install refinery_cli --version 0.8.7 --locked

- name: Install dependencies
run:
Expand Down Expand Up @@ -268,16 +268,16 @@ jobs:
--exclude wallet-uniffi \
--archive-file nextest-archive.tar.zst
- name: Run Catalyst Core tests
env:
TEST_DATABASE_URL: postgres://postgres:123456@localhost
EVENT_DB_URL: postgres://catalyst-event-dev:CHANGE_ME@localhost/CatalystEventDev
## - name: Run Catalyst Core tests
## env:
## TEST_DATABASE_URL: postgres://postgres:123456@localhost
## EVENT_DB_URL: postgres://catalyst-event-dev:CHANGE_ME@localhost/CatalystEventDev
## removing test ui_test because of bug https://github.com/rust-lang/cargo/issues/10352
run: |
cargo nextest run \
-E "not (test(ui_test))" \
--archive-file nextest-archive.tar.zst --extract-to ${{ github.workspace }} \
--extract-overwrite --partition hash:${{ matrix.partition }}/10 --profile ci
## run: |
## cargo nextest run \
## -E "not (test(ui_test))" \
## --archive-file nextest-archive.tar.zst --extract-to ${{ github.workspace }} \
## --extract-overwrite --partition hash:${{ matrix.partition }}/10 --profile ci

test-results:
if: always()
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,8 @@ tests/tmp/
lefthook.yml
treefmt.toml

# local earthly Environments
local/*
# local earthly environments
local/*
tests/wallet-automation/typhon/usrdatadir/*
tests/wallet-automation/node_modules/*
tests/wallet-automation/typhon/extensions/*
2 changes: 1 addition & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rust-toolchain:
# Installs Cargo chef
install-chef:
FROM +rust-toolchain
RUN cargo install --debug cargo-chef
RUN cargo install --debug --version 0.1.59 cargo-chef --locked

# Prepares the local cache
prepare-cache:
Expand Down
9 changes: 5 additions & 4 deletions scripts/tally/private_offline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
set -exuo pipefail

if [ "$#" -ne 1 ]; then
echo "Script is expecting voteplan id "
echo "./private.sh 9a278b6f788278e5cd8dfd6de8b8b8699a7f6b4847c680843de6c02d5b3169b2"
echo "Script is expecting voteplan index "
echo "./private.sh 0"
exit -1
fi

VOTE_PLAN_ID=$1
VOTE_PLAN_INDEX=$1
VOTE_PLAN_ID=$(jq -r --arg VOTE_PLAN_INDEX "$VOTE_PLAN_INDEX" '.[$VOTE_PLAN_INDEX|tonumber].id' active_plans.json)
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" > "$VOTE_PLAN_ID"_decryption_share.json
jcli "votes" "tally" "merge-shares" $VOTE_PLAN_ID"_decryption_share.json" > "$VOTE_PLAN_ID"_shares.json
jcli "votes" "tally" "decrypt-results" "--vote-plan" "active_plans.json" "--vote-plan-id" "$VOTE_PLAN_ID" "--shares" $VOTE_PLAN_ID"_shares.json" "--threshold" "1" "--output-format" "json" > "$VOTE_PLAN_ID"_result.json
jcli "votes" "tally" "decrypt-results" "--vote-plan" "active_plans.json" "--vote-plan-id" "$VOTE_PLAN_ID" "--shares" $VOTE_PLAN_ID"_shares.json" "--threshold" "1" "--output-format" "json" > results"$VOTE_PLAN_INDEX".json
1 change: 0 additions & 1 deletion services/voting-node/voting_node/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ async def snapshot_import(self, event_id: int):
network_ids=network_ids,
snapshot_tool_path=os.environ.get("SNAPSHOT_TOOL_PATH", "snapshot_tool"),
catalyst_toolbox_path=os.environ.get("CATALYST_TOOLBOX_PATH", "catalyst-toolbox"),
gvc_api_url=os.environ["GVC_API_URL"],
ssh_config=ssh_config,
)
try:
Expand Down
Loading

0 comments on commit a6894bf

Please sign in to comment.