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

Support optional cheater detection #564

Merged
merged 8 commits into from
Oct 25, 2023
Merged

Support optional cheater detection #564

merged 8 commits into from
Oct 25, 2023

Conversation

natalieesk
Copy link
Contributor

Adds cheater detection feature which gives the option to use cheater detection in the aggregate function or not.

This closes #355

@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3d25db1) 81.72% compared to head (4d26417) 81.78%.

❗ Current head 4d26417 differs from pull request most recent head be1e444. Consider uploading reports for the commit be1e444 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #564      +/-   ##
==========================================
+ Coverage   81.72%   81.78%   +0.05%     
==========================================
  Files          30       30              
  Lines        3076     3086      +10     
==========================================
+ Hits         2514     2524      +10     
  Misses        562      562              
Files Coverage Δ
frost-core/src/frost.rs 92.44% <100.00%> (+0.08%) ⬆️
frost-core/src/frost/round2.rs 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@conradoplg conradoplg left a comment

Choose a reason for hiding this comment

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

I assumed that this would be a runtime thing, not compile time. Sorry for not clearly communicating that. (To do at runtime it could check if the verifying shares map is empty, and disable it if it is)

However, this is a valid way to do it. I'm not sure about it though. One advantage of being compile-time is that it's harder to accidentally disable it (assuming we enable it by default, which this PR doesn't do yet, but it's a simple change).

On the other hand we could find a way to do it at runtime while making it harder to disable by accident. For example, with a new aggregate_without_cheater_detection() function (that would call an e.g. refactored out private aggregate_inner() function that is also called by aggregate()).

But I'm not sure if we need to do it at runtime.

What do you think?

@canewsin
Copy link

is it PR title vague or I'm reading it wrong? pr gates existing cheater detection under a feature gate but titled as like cheater detection functionality?

@conradoplg conradoplg changed the title Cheater detection Support optional cheater detection Oct 18, 2023
@conradoplg
Copy link
Contributor

is it PR title vague or I'm reading it wrong? pr gates existing cheater detection under a feature gate but titled as like cheater detection functionality?

Yes, if you look at the matching issue, it's about making cheater detection optional. I've updated the PR title to match it.

Copy link
Contributor

@conradoplg conradoplg left a comment

Choose a reason for hiding this comment

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

I comitted a suggestion and there are some comments.

The PR will unbreak after #551 merges

frost-core/Cargo.toml Show resolved Hide resolved
frost-core/src/frost.rs Outdated Show resolved Hide resolved
frost-ed25519/Cargo.toml Show resolved Hide resolved
frost-ed25519/tests/integration_tests.rs Outdated Show resolved Hide resolved
frost-ed25519/tests/integration_tests.rs Outdated Show resolved Hide resolved
frost-ed25519/tests/integration_tests.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@conradoplg conradoplg 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, thanks!

@mergify mergify bot merged commit e0db615 into main Oct 25, 2023
13 checks passed
@mergify mergify bot deleted the cheater_detection_355 branch October 25, 2023 13:23
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.

Support optional cheater detection
3 participants