Skip to content

Commit

Permalink
[WIP] Signing Manager V2 (#577)
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Braun <braunth@oregonstate.edu>

* add better logging: split offline and voting, include unsigned proposal hash

* Update dkg-gadget/src/signing_manager/mod.rs

* add pipeline tests for harness

* point to temp dir, do not clean

* remove backoff logic

* Remove unused code

* add message enqueueing mechanism

* allow message enqueuing for initialized protocols

* add filtering of messages for async protocols based on block number

* [WIP] Signing Manager V2: Fix message loss bug (#620)

* move debug logger to dkg-logging, add checkpoint-based logging (based on env var)

* get 0 message loss for j=10,k=11

* get 1000 running in parallel successfully

* eradicate message loss entirely

* adjust parallelism in job manager to j=4

* adjust parameters, remove bottlenecks, improve stalling logic

* update multi-party ecdsa

---------

Co-authored-by: drewstone <drewstone329@gmail.com>
Co-authored-by: 1xstj <106580853+1xstj@users.noreply.github.com>
Co-authored-by: shekohex <dev+github@shadykhalifa.me>
  • Loading branch information
4 people authored Jun 5, 2023
1 parent efb068b commit db3f86d
Show file tree
Hide file tree
Showing 63 changed files with 3,373 additions and 1,929 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches: [master]
pull_request:
branches:
- "**"

workflow_dispatch:

env:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

workflow_dispatch:

env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: git

jobs:
# code coverage job; moved to own workflow file due to running out of disk space.
# code coverage job; moved to own workflow file due to running out of disk space.
# The runner will stop working when the machine runs out of disk space. Free space left: 72 MB
coverage:
name: coverage
Expand Down Expand Up @@ -46,7 +44,7 @@ jobs:

- name: Run Tarpaulin
run : cargo tarpaulin --out Xml -p pallet-dkg-metadata -p pallet-dkg-proposal-handler -p pallet-dkg-proposals -p dkg-primitives -p dkg-runtime-primitives --locked --jobs 16 --timeout 3600 --skip-clean -- --test-threads 16

- name: Upload CodeCov
uses: codecov/codecov-action@v2

Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches: [master]
pull_request:
branches: [master]

workflow_dispatch:

env:
Expand Down Expand Up @@ -74,8 +72,6 @@ jobs:
run: dvc pull

- name: Build Standalone Node for E2E Tests (Release)
env:
CARGO_INCREMENTAL: 1
run: cargo build --release -p dkg-standalone-node --features integration-tests

- name: Run E2E Tests
Expand Down Expand Up @@ -152,8 +148,6 @@ jobs:
run: dvc pull

- name: Build Standalone Node for Integration Tests (Release)
env:
CARGO_INCREMENTAL: 1
run: cargo build --release -p dkg-standalone-node

- name: Run Proposals E2E Tests
Expand Down
85 changes: 85 additions & 0 deletions .github/workflows/harness_stress_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: harness stress tests

on:
push:
branches: [master]
pull_request:
workflow_dispatch:

env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: git
RUST_LOG: "dkg=trace"

jobs:
# dkg-substrate integration tests
harness:
name: harness stress tests
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

- name: Checkout Code
uses: actions/checkout@v3

- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3

- name: Restore Cache
if: always()
uses: actions/cache/restore@v3
with:
path: |
~/.cargo/registry
target/release
target/debug
key: ${{ runner.os }}-cargo-index-${{ github.ref_name }}-harness-stress-tests

- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly

- name: Setup DVC
uses: iterative/setup-dvc@v1

- name: Populate fixtures
run: dvc pull

- name: Install Protobuf
run: sudo apt-get install protobuf-compiler

- name: Setup DVC
uses: iterative/setup-dvc@v1

- name: Populate Fixtures
run: dvc pull

- name: t2n3 && 1 proposal per session
run: cargo run --package dkg-test-orchestrator --features=debug-tracing -- --tmp /tmp --threshold 2 --n 3 --bind 127.0.0.1:7777 --n-tests 10 -p 1

- name: t2n3 && 2 proposals per session
run: cargo run --package dkg-test-orchestrator --features=debug-tracing -- --tmp /tmp --threshold 2 --n 3 --bind 127.0.0.1:7777 --n-tests 10 -p 2

- name: t3n5 && 1 proposal per session
run: cargo run --package dkg-test-orchestrator --features=debug-tracing -- --tmp /tmp --threshold 3 --n 5 --bind 127.0.0.1:7777 --n-tests 10 -p 1

- name: t3n5 && 2 proposals per session
run: cargo run --package dkg-test-orchestrator --features=debug-tracing -- --tmp /tmp --threshold 3 --n 5 --bind 127.0.0.1:7777 --n-tests 10 -p 2

- name: Save Cache
if: ${{ !cancelled() }}
uses: actions/cache/save@v3
with:
path: |
~/.cargo/registry
target/release
target/debug
key: ${{ runner.os }}-cargo-index-${{ github.ref_name }}-harness-stress-tests
7 changes: 3 additions & 4 deletions .github/workflows/publish-rust-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
branches:
- master
pull_request:
branches:
- master

env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: git

Expand All @@ -17,7 +16,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Install apt dependencies
run: |
sudo apt-get update && \
Expand All @@ -30,7 +29,7 @@ jobs:
toolchain: nightly

- name: Build documentation
run: cargo doc --no-deps
run: cargo doc --no-deps
- name: Publish documentation
run: |
cd target/doc
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches: [master]
pull_request:
branches:
- "**" # matches every branch

workflow_dispatch:

env:
Expand Down Expand Up @@ -61,8 +58,6 @@ jobs:
run: sudo apt-get install protobuf-compiler

- name: Run tests
env:
CARGO_INCREMENTAL: 1
run: cargo nextest run

- name: Save Cache
Expand Down
Loading

0 comments on commit db3f86d

Please sign in to comment.