Skip to content

Commit 02af2fc

Browse files
authored
feat(crypto): CRP-2624 Create tECDSA/tSchnorr/vetKD mock canister (#1029)
* feat(crypto): CRP-2624 Create tECDSA/tSchnorr/vetKD mock canister * sign_digest_with_ecdsa instead of sign_message_with_ecdsa * Add Schnorr tests * Add build/test in Makefile * Add vetKD tests * sign_message_with_ecdsa * Adapt register_custom_getrandom documentation * Simplify dfx.json * Add call counts * Update README * Update CODEOWNERS * Update README * Dependency cleanup * sign_digest_with_ecdsa * Prepare for publishing * Cleanup
1 parent c38f9bc commit 02af2fc

17 files changed

+3944
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
/rust/send_http_post/ @dfinity/growth
7070
/rust/simd/ @dfinity/execution
7171
/rust/threshold-ecdsa/ @dfinity/crypto-team
72+
/rust/threshold-mock/ @dfinity/crypto-team
7273
/rust/threshold-schnorr/ @dfinity/crypto-team
7374
/rust/token_transfer/ @dfinity/growth
7475
/rust/token_transfer_from/ @dfinity/growth
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: rust-threshold-mock
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
paths:
8+
- rust/threshold-mock/**
9+
- .github/workflows/provision-darwin.sh
10+
- .github/workflows/provision-linux.sh
11+
- .github/workflows/rust-threshold-mock-example.yml
12+
- .ic-commit
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
jobs:
17+
rust-threshold-mock-darwin:
18+
runs-on: macos-12
19+
steps:
20+
- uses: actions/checkout@v1
21+
- name: Provision Darwin
22+
run: bash .github/workflows/provision-darwin.sh
23+
- name: Install PocketIC server Darwin
24+
uses: dfinity/pocketic@main
25+
with:
26+
pocket-ic-server-version: "6.0.0"
27+
- name: Build threshold-mock Darwin
28+
run: |
29+
pushd rust/threshold-mock
30+
cargo build --target wasm32-unknown-unknown --release
31+
popd
32+
- name: Lint threshold-mock Darwin
33+
run: |
34+
pushd rust/threshold-mock
35+
cargo fmt --all -- --check && cargo clippy --all-targets --all-features -- -D warnings
36+
popd
37+
- name: Test threshold-mock Darwin
38+
run: |
39+
pushd rust/threshold-mock
40+
cargo test
41+
popd
42+
rust-threshold-mock-linux:
43+
runs-on: ubuntu-20.04
44+
steps:
45+
- uses: actions/checkout@v1
46+
- name: Provision Linux
47+
run: bash .github/workflows/provision-linux.sh
48+
- name: Install PocketIC server Linux
49+
uses: dfinity/pocketic@main
50+
with:
51+
pocket-ic-server-version: "6.0.0"
52+
- name: Build threshold-mock Linux
53+
run: |
54+
pushd rust/threshold-mock
55+
cargo build --target wasm32-unknown-unknown --release
56+
popd
57+
- name: Lint threshold-mock Linux
58+
run: |
59+
pushd rust/threshold-mock
60+
cargo fmt --all -- --check && cargo clippy --all-targets --all-features -- -D warnings
61+
popd
62+
- name: Test threshold-mock Linux
63+
run: |
64+
pushd rust/threshold-mock
65+
cargo test
66+
popd

rust/threshold-mock/.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Various IDEs and Editors
2+
.vscode/
3+
.idea/
4+
**/*~
5+
6+
# Mac OSX temporary files
7+
.DS_Store
8+
**/.DS_Store
9+
10+
# dfx temporary files
11+
.dfx/
12+
13+
# rust
14+
target/
15+
16+
# environment variables
17+
.env

rust/threshold-mock/CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Contributing
2+
3+
## Contributing code changes
4+
5+
This repository is currently not open to direct contributions. However, if you want to contribute a feature or bug fix, please **reach out to us** so that we can discuss feasibility and implementation strategies. You can reach out to us:
6+
7+
- on the [forum]
8+
- by opening [GitHub issues]
9+
10+
Make sure to read the [README] and [LICENSE] first.
11+
12+
## Bug reports
13+
14+
We always appreciate bug reports through [GitHub issues].
15+
16+
[GitHub issues]: https://github.com/dfinity/TODO/issues
17+
[forum]: https://forum.dfinity.org/
18+
[LICENSE]: LICENSE
19+
[HACKING]: HACKING.md
20+
[README]: README.md

0 commit comments

Comments
 (0)