Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into no-std
Browse files Browse the repository at this point in the history
  • Loading branch information
conradoplg committed May 30, 2024
2 parents 412e168 + 3ebe7a1 commit e04b6cb
Show file tree
Hide file tree
Showing 14 changed files with 95 additions and 74 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
RUST_BACKTRACE: full

steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].6
with:
persist-credentials: false

Expand All @@ -44,4 +44,4 @@ jobs:
run: cargo llvm-cov report --lcov --ignore-filename-regex '.*(tests).*|benches.rs|gencode|helpers.rs' --output-path lcov.info

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4.0.1
uses: codecov/codecov-action@v4.4.0
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/[email protected].1
uses: actions/[email protected].6
with:
persist-credentials: false

Expand All @@ -50,7 +50,7 @@ jobs:
- uses: Swatinem/rust-cache@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1.2.0
uses: peaceiris/actions-mdbook@v2.0.0
with:
mdbook-version: '0.4.18'

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].6
- uses: actions-rs/[email protected]
with:
toolchain: beta
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].6
- uses: actions-rs/[email protected]
with:
toolchain: beta
Expand All @@ -60,7 +60,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].6
with:
persist-credentials: false

Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].6
with:
persist-credentials: false

Expand All @@ -117,7 +117,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].6
with:
persist-credentials: false

Expand All @@ -139,7 +139,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].6
with:
persist-credentials: false

Expand All @@ -158,8 +158,8 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/[email protected].1
- uses: reviewdog/action-actionlint@v1.41.0
- uses: actions/[email protected].6
- uses: reviewdog/action-actionlint@v1.46.0
with:
level: warning
fail_on_error: false
4 changes: 2 additions & 2 deletions book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ title = "The ZF FROST Book"

[preprocessor.admonish]
command = "mdbook-admonish"
assets_version = "3.0.0" # do not edit: managed by `mdbook-admonish install`
assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install`

[output]

[output.html]
additional-css = ["./mdbook-admonish.css"]
additional-css = ["./mdbook-admonish.css", "book/mdbook-admonish.css"]
39 changes: 23 additions & 16 deletions book/mdbook-admonish.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
@charset "UTF-8";
:root {
--md-admonition-icon--admonish-note: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z'/></svg>");
--md-admonition-icon--admonish-abstract: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M17 9H7V7h10m0 6H7v-2h10m-3 6H7v-2h7M12 3a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1m7 0h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z'/></svg>");
--md-admonition-icon--admonish-info: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2z'/></svg>");
--md-admonition-icon--admonish-tip: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M17.66 11.2c-.23-.3-.51-.56-.77-.82-.67-.6-1.43-1.03-2.07-1.66C13.33 7.26 13 4.85 13.95 3c-.95.23-1.78.75-2.49 1.32-2.59 2.08-3.61 5.75-2.39 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.23.1-.47.04-.66-.12a.58.58 0 0 1-.14-.17c-1.13-1.43-1.31-3.48-.55-5.12C5.78 10 4.87 12.3 5 14.47c.06.5.12 1 .29 1.5.14.6.41 1.2.71 1.73 1.08 1.73 2.95 2.97 4.96 3.22 2.14.27 4.43-.12 6.07-1.6 1.83-1.66 2.47-4.32 1.53-6.6l-.13-.26c-.21-.46-.77-1.26-.77-1.26m-3.16 6.3c-.28.24-.74.5-1.1.6-1.12.4-2.24-.16-2.9-.82 1.19-.28 1.9-1.16 2.11-2.05.17-.8-.15-1.46-.28-2.23-.12-.74-.1-1.37.17-2.06.19.38.39.76.63 1.06.77 1 1.98 1.44 2.24 2.8.04.14.06.28.06.43.03.82-.33 1.72-.93 2.27z'/></svg>");
--md-admonition-icon--admonish-success: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='m9 20.42-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z'/></svg>");
--md-admonition-icon--admonish-question: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='m15.07 11.25-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 0 0-2-2 2 2 0 0 0-2 2H8a4 4 0 0 1 4-4 4 4 0 0 1 4 4 3.2 3.2 0 0 1-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10c0-5.53-4.5-10-10-10z'/></svg>");
--md-admonition-icon--admonish-warning: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M13 14h-2V9h2m0 9h-2v-2h2M1 21h22L12 2 1 21z'/></svg>");
--md-admonition-icon--admonish-failure: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 6.91 17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z'/></svg>");
--md-admonition-icon--admonish-danger: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M11 15H6l7-14v8h5l-7 14v-8z'/></svg>");
--md-admonition-icon--admonish-bug: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 0 0-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 0 0-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z'/></svg>");
--md-admonition-icon--admonish-example: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 0 1 .75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z'/></svg>");
--md-admonition-icon--admonish-quote: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z'/></svg>");
--md-details-icon: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42Z'/></svg>");
}

:is(.admonition) {
display: flow-root;
margin: 1.5625em 0;
Expand Down Expand Up @@ -71,6 +55,8 @@ a.admonition-anchor-link::before {
padding-inline: 4.4rem 1.2rem;
font-weight: 700;
background-color: rgba(68, 138, 255, 0.1);
print-color-adjust: exact;
-webkit-print-color-adjust: exact;
display: flex;
}
:is(.admonition-title, summary.admonition-title) p {
Expand All @@ -86,6 +72,8 @@ html :is(.admonition-title, summary.admonition-title):last-child {
width: 2rem;
height: 2rem;
background-color: #448aff;
print-color-adjust: exact;
-webkit-print-color-adjust: exact;
mask-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"></svg>');
-webkit-mask-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"></svg>');
mask-repeat: no-repeat;
Expand Down Expand Up @@ -119,6 +107,25 @@ details[open].admonition > summary.admonition-title::after {
transform: rotate(90deg);
}

:root {
--md-details-icon: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42Z'/></svg>");
}

:root {
--md-admonition-icon--admonish-note: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z'/></svg>");
--md-admonition-icon--admonish-abstract: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M17 9H7V7h10m0 6H7v-2h10m-3 6H7v-2h7M12 3a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1m7 0h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z'/></svg>");
--md-admonition-icon--admonish-info: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2z'/></svg>");
--md-admonition-icon--admonish-tip: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M17.66 11.2c-.23-.3-.51-.56-.77-.82-.67-.6-1.43-1.03-2.07-1.66C13.33 7.26 13 4.85 13.95 3c-.95.23-1.78.75-2.49 1.32-2.59 2.08-3.61 5.75-2.39 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.23.1-.47.04-.66-.12a.58.58 0 0 1-.14-.17c-1.13-1.43-1.31-3.48-.55-5.12C5.78 10 4.87 12.3 5 14.47c.06.5.12 1 .29 1.5.14.6.41 1.2.71 1.73 1.08 1.73 2.95 2.97 4.96 3.22 2.14.27 4.43-.12 6.07-1.6 1.83-1.66 2.47-4.32 1.53-6.6l-.13-.26c-.21-.46-.77-1.26-.77-1.26m-3.16 6.3c-.28.24-.74.5-1.1.6-1.12.4-2.24-.16-2.9-.82 1.19-.28 1.9-1.16 2.11-2.05.17-.8-.15-1.46-.28-2.23-.12-.74-.1-1.37.17-2.06.19.38.39.76.63 1.06.77 1 1.98 1.44 2.24 2.8.04.14.06.28.06.43.03.82-.33 1.72-.93 2.27z'/></svg>");
--md-admonition-icon--admonish-success: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='m9 20.42-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z'/></svg>");
--md-admonition-icon--admonish-question: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='m15.07 11.25-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 0 0-2-2 2 2 0 0 0-2 2H8a4 4 0 0 1 4-4 4 4 0 0 1 4 4 3.2 3.2 0 0 1-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10c0-5.53-4.5-10-10-10z'/></svg>");
--md-admonition-icon--admonish-warning: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M13 14h-2V9h2m0 9h-2v-2h2M1 21h22L12 2 1 21z'/></svg>");
--md-admonition-icon--admonish-failure: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 6.91 17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z'/></svg>");
--md-admonition-icon--admonish-danger: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M11 15H6l7-14v8h5l-7 14v-8z'/></svg>");
--md-admonition-icon--admonish-bug: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 0 0-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 0 0-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z'/></svg>");
--md-admonition-icon--admonish-example: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 0 1 .75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z'/></svg>");
--md-admonition-icon--admonish-quote: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z'/></svg>");
}

:is(.admonition):is(.admonish-note) {
border-color: #448aff;
}
Expand Down
69 changes: 36 additions & 33 deletions book/src/zcash/ywallet-demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
This tutorial explaing how to run the FROST demo using Ywallet that was
[presented during Zcon4](https://www.youtube.com/watch?v=xvzESdDtczo).

## Information

1. The Trusted Dealer journey
2. RedPallas
3. YWallet
4. Sprout
5. [Sapling](https://docs.rs/reddsa/0.5.1/reddsa/sapling/index.html)
6. [frost-ed25519 crate](https://crates.io/crates/frost-ed25519)

Ywallet supports [offline
signing](https://ywallet.app/advanced/offline_signature/), which allows having a
view-only account that can generate a transaction plan, which can be signed by
Expand Down Expand Up @@ -58,11 +49,11 @@ cd frost-zcash-demo/
cargo run --bin trusted-dealer --features redpallas
```

Answer the prompts with `2` (minimum number of signers), `3`
(maximum) and empty, pressing enter to submit each.

A bunch of information will be printed. Copy and paste them somewhere to use
them later, or leave the terminal open.
This will by default generate a 2-of-3 key shares. The public key package
will be written to `public-key-package.json`, while key packages will be
written to `key-package-1.json` through `-3`. You can change the threhsold,
number of shares and file names using the command line; append `-- -h`
to the commend above for the command line help.

```admonish info
If you want to use DKG instead of Trusted Dealer, instead of the command above,
Expand Down Expand Up @@ -104,12 +95,11 @@ take a bit to compile. It will show a bunch of warnings which is normal.
cargo run --release --bin sign --features dotenv -- -g
```

When prompted for the `ak`, paste the `verifying_key` value that was printed in
the previous part, inside the Public Key Package. For example, in the following
package
When prompted for the `ak`, paste the `verifying_key` value that is listed
inside the Public Key Package in `public-key-package.json`. For example, in the
following package

```
Public key package:
{"verifying_shares": ...snip... ,"verifying_key":"d2bf40ca860fb97e9d6d15d7d25e4f17d2e8ba5dd7069188cbf30b023910a71b","ciphersuite":"FROST(Pallas, BLAKE2b-512)"}
```

Expand Down Expand Up @@ -177,42 +167,55 @@ In the first one, the Coordinator, run (in the same folder where key
generation was run):

```
cargo run --bin coordinator --features redpallas
cargo run --bin coordinator --features redpallas -- --cli
```

And then:

- Paste the JSON public key package generate during key generation (it's a single
line with a JSON object).
- It should read the public key package from `public-key-package.json`.
- Type `2` for the number of participants.
- Paste the identifier of the first participant, you can see it in the Secret
Share printed during key generation. If you used trusted dealer key
generation, it will be
- Paste the identifier of the first participant, you can see it in
`key-package-1.json`. If you used trusted dealer key generation, it will be
`0100000000000000000000000000000000000000000000000000000000000000`.
- Paste the second identifier, e.g.
`0200000000000000000000000000000000000000000000000000000000000000`.
- When prompted for the message to be signed, paste the SIGHASH printed by the
signer above (just the hex value, e.g.
``4d065453cfa4cfb4f98dbc9cff60c4a3904ed91c523b8ef8d67d28bea7f12ea3``).


Create a new terminal, for participant 1, and run:

```
cargo run --bin participant --features redpallas
cargo run --bin participant --features redpallas -- --cli --key-package key-package-1.json
```

And then:

- Paste the Secret Share printed during key generation (or Key Package if you
used DKG).
- Copy the SigningCommitments line and paste into the Coordinator CLI.

Do the same for participant 2.
Go back to the coordinator and:

- Paste the second identifier, e.g.
`0200000000000000000000000000000000000000000000000000000000000000`.

Create a new terminal, for participant 2, and run:

```
cargo run --bin participant --features redpallas -- --cli --key-package key-package-2.json
```

And then:

- Copy the SigningCommitments line and paste into the Coordinator CLI.
- When prompted for the message to be signed, paste the SIGHASH printed by the
signer above (just the hex value, e.g.
``4d065453cfa4cfb4f98dbc9cff60c4a3904ed91c523b8ef8d67d28bea7f12ea3``).

You should be at the Coordinator CLI. Paste the Randomizer generated by the
signer before and copy the Signing Package line that it was printed by the
Coordinator CLI before the Randomizer prompt.

```admonish warning
If you prefer to pass the randomizer as a file by using the `--randomizer`
argument, you will need to convert it to binary format.
```

Switch to participant 1 and:

- Paste the Signing Package
Expand Down
6 changes: 6 additions & 0 deletions frost-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ Entries are listed in reverse chronological order.

## Released

## 1.0.1

* Fixed `no-default-features`, previously it wouldn't compile.
* Fixed some feature handling that would include unneeded dependencies in some
cases.

## 1.0.0

* Exposed the `SigningKey::from_scalar()` and `to_scalar()` methods. This
Expand Down
4 changes: 2 additions & 2 deletions frost-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ byteorder = { version = "1.4", default-features = false }
const-crc32 = { version = "1.2.0", package = "const-crc32-nostd" }
document-features = "0.2.7"
debugless-unwrap = "0.0.4"
derive-getters = "0.3.0"
derive-getters = "0.4.0"
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
postcard = { version = "1.0.0", features = ["alloc"], optional = true }
rand_core = { version = "0.6", default-features = false }
Expand All @@ -36,7 +36,7 @@ thiserror-nostd-notrait = { version = "1.0", default-features = false }
thiserror = { version = "1.0", default-features = false, optional = true }
visibility = "0.1.0"
zeroize = { version = "1.5.4", default-features = false, features = ["derive"] }
itertools = { version = "0.12.0", default-features = false }
itertools = { version = "0.13.0", default-features = false }

# Test dependencies used with the test-impl feature
proptest = { version = "1.0", optional = true }
Expand Down
3 changes: 3 additions & 0 deletions frost-core/src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ use crate::serialization::{Deserialize, Serialize};
#[cfg(feature = "serde")]
use crate::serialization::{ElementSerialization, ScalarSerialization};

#[cfg(feature = "serialization")]
use crate::serialization::{Deserialize, Serialize};

Check failure on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / Clippy (stable) Results

unused imports: `Deserialize`, `Serialize`

error: unused imports: `Deserialize`, `Serialize` --> frost-core/src/keys.rs:30:28 | 30 | use crate::serialization::{Deserialize, Serialize}; | ^^^^^^^^^^^ ^^^^^^^^^ | = note: `-D unused-imports` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_imports)]`

Check failure on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / Clippy (stable) Results

unused imports: `Deserialize`, `Serialize`

error: unused imports: `Deserialize`, `Serialize` --> frost-core/src/keys.rs:30:28 | 30 | use crate::serialization::{Deserialize, Serialize}; | ^^^^^^^^^^^ ^^^^^^^^^ | = note: `-D unused-imports` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_imports)]`

Check failure on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / Clippy (stable) Results

the name `Serialize` is defined multiple times

error[E0252]: the name `Serialize` is defined multiple times --> frost-core/src/keys.rs:30:41 | 24 | use crate::serialization::{Deserialize, Serialize}; | --------- previous import of the trait `Serialize` here ... 30 | use crate::serialization::{Deserialize, Serialize}; | ^^^^^^^^^ `Serialize` reimported here | = note: `Serialize` must be defined only once in the type namespace of this module

Check failure on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / Clippy (stable) Results

the name `Serialize` is defined multiple times

error[E0252]: the name `Serialize` is defined multiple times --> frost-core/src/keys.rs:30:41 | 24 | use crate::serialization::{Deserialize, Serialize}; | --------- previous import of the trait `Serialize` here ... 30 | use crate::serialization::{Deserialize, Serialize}; | ^^^^^^^^^ `Serialize` reimported here | = note: `Serialize` must be defined only once in the type namespace of this module

Check failure on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / Clippy (stable) Results

the name `Deserialize` is defined multiple times

error[E0252]: the name `Deserialize` is defined multiple times --> frost-core/src/keys.rs:30:28 | 24 | use crate::serialization::{Deserialize, Serialize}; | ----------- previous import of the trait `Deserialize` here ... 30 | use crate::serialization::{Deserialize, Serialize}; | ^^^^^^^^^^^-- | | | `Deserialize` reimported here | help: remove unnecessary import | = note: `Deserialize` must be defined only once in the type namespace of this module

Check failure on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / Clippy (stable) Results

the name `Deserialize` is defined multiple times

error[E0252]: the name `Deserialize` is defined multiple times --> frost-core/src/keys.rs:30:28 | 24 | use crate::serialization::{Deserialize, Serialize}; | ----------- previous import of the trait `Deserialize` here ... 30 | use crate::serialization::{Deserialize, Serialize}; | ^^^^^^^^^^^-- | | | `Deserialize` reimported here | help: remove unnecessary import | = note: `Deserialize` must be defined only once in the type namespace of this module

Check failure on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / build with default features

the name `Deserialize` is defined multiple times

Check failure on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / build with default features

the name `Serialize` is defined multiple times

Check warning on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / build with default features

unused imports: `Deserialize`, `Serialize`

Check failure on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / Check Rust doc

the name `Deserialize` is defined multiple times

Check failure on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / Check Rust doc

the name `Serialize` is defined multiple times

Check warning on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / Check Rust doc

unused imports: `Deserialize`, `Serialize`

Check failure on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / test on beta

the name `Deserialize` is defined multiple times

Check failure on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / test on beta

the name `Serialize` is defined multiple times

Check warning on line 30 in frost-core/src/keys.rs

View workflow job for this annotation

GitHub Actions / test on beta

unused imports: `Deserialize`, `Serialize`

use super::compute_lagrange_coefficient;

pub mod dkg;
Expand Down
2 changes: 2 additions & 0 deletions frost-core/src/keys/dkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pub mod round1 {
use derive_getters::Getters;
use zeroize::Zeroize;

#[cfg(feature = "serialization")]
use super::*;

/// The package that must be broadcast by each participant to all other participants
Expand Down Expand Up @@ -171,6 +172,7 @@ pub mod round2 {
use derive_getters::Getters;
use zeroize::Zeroize;

#[cfg(feature = "serialization")]
#[cfg(feature = "serialization")]
use alloc::vec::Vec;

Expand Down
Loading

0 comments on commit e04b6cb

Please sign in to comment.