Skip to content

Commit c7c3295

Browse files
committed
Merge branch 'main' of https://github.com/ZcashFoundation/frost into change-randomizer-generation
2 parents dab3f14 + 504ef20 commit c7c3295

File tree

215 files changed

+11594
-1487
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+11594
-1487
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ updates:
33
- package-ecosystem: github-actions
44
directory: "/"
55
schedule:
6-
interval: daily
6+
interval: monthly
77
timezone: America/New_York
88
open-pull-requests-limit: 10
99
- package-ecosystem: cargo
1010
directory: "/"
11+
# Update only the lockfile. We shouldn't update Cargo.toml unless it's for
12+
# a security issue, or if we need a new feature of the dependency.
13+
versioning-strategy: lockfile-only
1114
schedule:
12-
interval: daily
15+
interval: monthly
1316
timezone: America/New_York
1417
open-pull-requests-limit: 10

.github/workflows/coverage.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,13 @@ jobs:
2323
RUST_BACKTRACE: full
2424

2525
steps:
26-
- uses: actions/checkout@v4.1.7
26+
- uses: actions/checkout@v6.0.0
2727
with:
2828
persist-credentials: false
2929

30-
- uses: actions-rs/toolchain@v1.0.7
30+
- uses: dtolnay/rust-toolchain@stable
3131
with:
32-
toolchain: stable
33-
override: true
34-
profile: minimal
35-
components: llvm-tools-preview
32+
components: llvm-tools
3633

3734
- name: Install cargo-llvm-cov cargo command
3835
run: cargo install cargo-llvm-cov
@@ -44,4 +41,4 @@ jobs:
4441
run: cargo llvm-cov report --lcov --ignore-filename-regex '.*(tests).*|benches.rs|gencode|helpers.rs|interoperability_tests.rs' --output-path lcov.info
4542

4643
- name: Upload coverage report to Codecov
47-
uses: codecov/codecov-action@v4.5.0
44+
uses: codecov/codecov-action@v5.5.1

.github/workflows/docs.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,12 @@ jobs:
3636
runs-on: ubuntu-latest
3737
steps:
3838
- name: Checkout the source code
39-
uses: actions/checkout@v4.1.7
39+
uses: actions/checkout@v6.0.0
4040
with:
4141
persist-credentials: false
4242

4343
- name: Install latest beta
44-
uses: actions-rs/toolchain@v1
45-
with:
46-
toolchain: beta
47-
components: rust-docs
48-
override: true
44+
uses: dtolnay/rust-toolchain@beta
4945

5046
- uses: Swatinem/rust-cache@v2
5147

.github/workflows/main.yml

Lines changed: 37 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,30 @@ on:
99
- main
1010

1111
jobs:
12-
1312
build_default:
1413
name: build with default features
1514
runs-on: ubuntu-latest
1615

1716
steps:
18-
- uses: actions/checkout@v4.1.7
19-
- uses: actions-rs/toolchain@v1.0.7
20-
with:
21-
toolchain: beta
22-
override: true
23-
- uses: actions-rs/cargo@v1.0.3
24-
with:
25-
command: build
17+
- uses: actions/checkout@v6.0.0
18+
- uses: dtolnay/rust-toolchain@beta
19+
- run: cargo build
20+
21+
build_latest:
22+
name: build with latest versions of dependencies
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/checkout@v6.0.0
27+
- uses: dtolnay/rust-toolchain@stable
28+
- run: cargo update && cargo build --all-features
2629

2730
build_msrv:
28-
name: build with MSRV (1.66.1)
31+
name: build with MSRV (1.81)
2932
runs-on: ubuntu-latest
3033

3134
steps:
32-
- uses: actions/checkout@v4.1.7
35+
- uses: actions/checkout@v6.0.0
3336
# Re-resolve Cargo.lock with minimal versions.
3437
# This only works with nightly. We pin to a specific version because
3538
# newer versions use lock file version 4, but the MSRV cargo does not
@@ -40,7 +43,7 @@ jobs:
4043
- run: cargo update -Z minimal-versions
4144
# Now check that `cargo build` works with respect to the oldest possible
4245
# deps and the stated MSRV
43-
- uses: dtolnay/rust-toolchain@1.66.1
46+
- uses: dtolnay/rust-toolchain@1.81
4447
- run: cargo build --all-features
4548

4649
# TODO: this is filling up the disk space in CI. See if there is a way to
@@ -51,7 +54,7 @@ jobs:
5154
# runs-on: ubuntu-latest
5255

5356
# steps:
54-
# - uses: actions/checkout@v4.1.7
57+
# - uses: actions/checkout@v6.0.0
5558
# - uses: dtolnay/rust-toolchain@stable
5659
# - run: cargo install cargo-all-features
5760
# # We check and then test because some test dependencies could help
@@ -69,9 +72,9 @@ jobs:
6972
# Skip ed448 which does not support it.
7073
strategy:
7174
matrix:
72-
crate: [ristretto255, ed25519, p256, secp256k1, rerandomized]
75+
crate: [ristretto255, ed25519, p256, secp256k1, secp256k1-tr, rerandomized]
7376
steps:
74-
- uses: actions/checkout@v4.1.7
77+
- uses: actions/checkout@v6.0.0
7578
- uses: dtolnay/rust-toolchain@master
7679
with:
7780
toolchain: stable
@@ -84,29 +87,22 @@ jobs:
8487
runs-on: ubuntu-latest
8588

8689
steps:
87-
- uses: actions/checkout@v4.1.7
88-
- uses: actions-rs/toolchain@v1.0.7
89-
with:
90-
toolchain: beta
91-
override: true
92-
- uses: actions-rs/cargo@v1.0.3
93-
with:
94-
command: test
95-
args: --release --all-features
90+
- uses: actions/checkout@v6.0.0
91+
- uses: dtolnay/rust-toolchain@beta
92+
- run: cargo test --release --all-features
9693

9794
clippy:
9895
name: Clippy
9996
runs-on: ubuntu-latest
10097

10198
steps:
102-
- uses: actions/checkout@v4.1.7
99+
- uses: actions/checkout@v6.0.0
103100
with:
104101
persist-credentials: false
105102

106-
- uses: actions-rs/toolchain@v1.0.7
103+
- uses: dtolnay/rust-toolchain@stable
107104
with:
108-
toolchain: stable
109-
override: true
105+
components: clippy
110106

111107
- name: Check workflow permissions
112108
id: check_permissions
@@ -117,12 +113,9 @@ jobs:
117113
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118114

119115
- name: Run clippy action to produce annotations
120-
uses: actions-rs/clippy-check@v1.0.7
116+
uses: clechasseur/rs-clippy-check@v5
121117
if: ${{ steps.check_permissions.outputs.has-permission }}
122118
with:
123-
# GitHub displays the clippy job and its results as separate entries
124-
name: Clippy (stable) Results
125-
token: ${{ secrets.GITHUB_TOKEN }}
126119
args: --all-features --all-targets -- -D warnings
127120

128121
- name: Run clippy manually without annotations
@@ -134,44 +127,34 @@ jobs:
134127
runs-on: ubuntu-latest
135128

136129
steps:
137-
- uses: actions/checkout@v4.1.7
130+
- uses: actions/checkout@v6.0.0
138131
with:
139132
persist-credentials: false
140133

141-
- uses: actions-rs/toolchain@v1.0.7
134+
- uses: dtolnay/rust-toolchain@stable
142135
with:
143-
toolchain: stable
144136
components: rustfmt
145-
override: true
146137

147138
- uses: Swatinem/rust-cache@v2
148139

149-
- uses: actions-rs/cargo@v1.0.3
150-
with:
151-
command: fmt
152-
args: --all -- --check
140+
- run: cargo fmt --all -- --check
153141

154142
gencode:
155143
name: Check if automatically generated code is up to date
156144
runs-on: ubuntu-latest
157145

158146
steps:
159-
- uses: actions/checkout@v4.1.7
147+
- uses: actions/checkout@v6.0.0
160148
with:
161149
persist-credentials: false
162150

163-
- uses: actions-rs/toolchain@v1.0.7
151+
- uses: dtolnay/rust-toolchain@stable
164152
with:
165-
toolchain: stable
166153
components: rustfmt
167-
override: true
168154

169155
- uses: Swatinem/rust-cache@v2
170156

171-
- uses: actions-rs/cargo@v1.0.3
172-
with:
173-
command: run
174-
args: --bin gencode -- --check
157+
- run: cargo run --bin gencode -- --check
175158

176159
docs:
177160
name: Check Rust doc
@@ -180,27 +163,20 @@ jobs:
180163
RUSTDOCFLAGS: -D warnings
181164

182165
steps:
183-
- uses: actions/checkout@v4.1.7
166+
- uses: actions/checkout@v6.0.0
184167
with:
185168
persist-credentials: false
186169

187-
- uses: actions-rs/toolchain@v1.0.7
188-
with:
189-
toolchain: stable
190-
profile: minimal
191-
override: true
170+
- uses: dtolnay/rust-toolchain@stable
192171

193-
- uses: actions-rs/cargo@v1.0.3
194-
with:
195-
command: doc
196-
args: --no-deps --document-private-items --all-features
172+
- run: cargo doc --no-deps --document-private-items --all-features
197173

198174
actionlint:
199175
runs-on: ubuntu-latest
200176
continue-on-error: true
201177
steps:
202-
- uses: actions/checkout@v4.1.7
203-
- uses: reviewdog/action-actionlint@v1.54.0
178+
- uses: actions/checkout@v6.0.0
179+
- uses: reviewdog/action-actionlint@v1.69.0
204180
with:
205181
level: warning
206-
fail_on_error: false
182+
fail_level: none

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/target
22
**/*.rs.bk
3-
Cargo.lock
43
*~
54
**/.DS_Store
65
.vscode/*

.mergify.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
11
queue_rules:
22
- name: main
3-
allow_inplace_checks: True
4-
allow_checks_interruption: True
5-
speculative_checks: 1
6-
batch_size: 2
7-
# Wait for a few minutes to embark 2 tickets together in a merge train
8-
batch_max_wait_time: "3 minutes"
9-
conditions:
3+
queue_conditions:
4+
- base=main
5+
- -draft
6+
- label!=do-not-merge
7+
merge_conditions:
108
# Mergify automatically applies status check, approval, and conversation rules,
119
# which are the same as the GitHub main branch protection rules
1210
# https://docs.mergify.com/conditions/#about-branch-protection
1311
- base=main
12+
batch_size: 2
13+
# Wait for a few minutes to embark 2 tickets together in a merge train
14+
batch_max_wait_time: "3 minutes"
15+
merge_method: squash
1416

1517
pull_request_rules:
1618
- name: main queue triggered when CI passes with 1 review
19+
conditions: []
20+
actions:
21+
queue:
22+
23+
priority_rules:
24+
- name: Priority rule from queue `main`
1725
conditions:
18-
# This queue handles a PR if:
19-
# - it targets main
20-
# - is not in draft
21-
# including automated dependabot PRs.
2226
- base=main
2327
- -draft
2428
- label!=do-not-merge
25-
actions:
26-
queue:
27-
name: main
28-
method: squash
29+
allow_checks_interruption: true
30+
31+
merge_queue:
32+
max_parallel_checks: 1

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Contributing
2+
3+
* [Running and Debugging](#running-and-debugging)
4+
* [Bug Reports](#bug-reports)
5+
* [Pull Requests](#pull-requests)
6+
7+
## Running and Debugging
8+
[running-and-debugging]: #running-and-debugging
9+
10+
See the [user documentation](https://frost.zfnd.org/user.html) for details on
11+
how to build, run, and use the FROST Rust reference implementation.
12+
13+
## Bug Reports
14+
[bug-reports]: #bug-reports
15+
16+
Please [create an issue](https://github.com/ZcashFoundation/frost/issues/new) on the FROST issue tracker.
17+
18+
## Pull Requests
19+
[pull-requests]: #pull-requests
20+
21+
PRs are welcome for small and large changes, but please don't make large PRs
22+
without coordinating with us via the [issue tracker](https://github.com/ZcashFoundation/frost/issues) or [Discord](https://discord.gg/muKwd2F83D). This helps
23+
increase development coordination and makes PRs easier to merge. Low-effort PRs, including but not limited to fixing typos and grammatical corrections, will generally be redone by us to dissuade metric farming.
24+
25+
Check out the [help wanted][hw] label if you're looking for a place to get started!
26+
27+
FROST follows the [conventional commits][conventional] standard for the commits
28+
merged to main. Since PRs are squashed before merging to main, the PR titles
29+
should follow the conventional commits standard so that the merged commits
30+
are conformant.
31+
32+
[hw]: https://github.com/ZcashFoundation/frost/labels/E-help-wanted
33+
[conventional]: https://www.conventionalcommits.org/en/v1.0.0/#specification

0 commit comments

Comments
 (0)