Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pub from fields, add getters #401

Merged
merged 3 commits into from
Jun 23, 2023
Merged

Remove pub from fields, add getters #401

merged 3 commits into from
Jun 23, 2023

Conversation

conradoplg
Copy link
Contributor

Depends on #398

This removes pub from fields and adds getters instead, which combined with the new() methods from #398 allow recreating structs, which in turn allows using arbitrary encoding schemes.

This also adds tests for them.

The sample-values-building functions introduced in those tests will be backported to the serde tests, allowing creating ciphersuite-generic tests.

Finally this switches to BTreeMap for signing commitments, which I had to touch anyway to introduce a getter for it and IMO makes the code a lot of simpler. (This was also done in #397 )

@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Patch coverage: 60.86% and project coverage change: +0.84 🎉

Comparison is base (4712153) 69.81% compared to head (94d5676) 70.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #401      +/-   ##
==========================================
+ Coverage   69.81%   70.65%   +0.84%     
==========================================
  Files          30       30              
  Lines        2650     2614      -36     
==========================================
- Hits         1850     1847       -3     
+ Misses        800      767      -33     
Impacted Files Coverage Δ
frost-rerandomized/src/lib.rs 0.80% <0.00%> (ø)
frost-core/src/frost.rs 79.72% <100.00%> (-0.37%) ⬇️
frost-core/src/frost/keys.rs 91.20% <100.00%> (+2.80%) ⬆️
frost-core/src/frost/keys/dkg.rs 97.46% <100.00%> (+10.54%) ⬆️
frost-core/src/frost/round1.rs 85.36% <100.00%> (-1.00%) ⬇️
frost-core/src/frost/round2.rs 69.07% <100.00%> (+6.07%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@natalieesk natalieesk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be synced with main to avoid duplication from other PRs. Otherwise it's all good!

Copy link
Contributor

@natalieesk natalieesk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@mergify mergify bot merged commit c851bbb into main Jun 23, 2023
@mergify mergify bot deleted the add-getters branch June 23, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants