Skip to content

Commit

Permalink
Merge branch 'main' into feature/abstain-logic-proposers-rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
coire1 authored Feb 7, 2024
2 parents 171dfd5 + b9c4e64 commit c16d020
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
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
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

0 comments on commit c16d020

Please sign in to comment.