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

cmd: move threshold check to CLI level #3297

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

KaloyanTanev
Copy link
Contributor

@KaloyanTanev KaloyanTanev commented Sep 19, 2024

A recent commit introduced a misbehavior when omitting the optional --threshold flag of create dkg and create cluster commands.
Because the threshold configuration is tested before the threshold variable is assigned to the default value ceil(2*n/3), the flag is not optional anymore.

This PR fixes this bug by moving the checks at the CLI level and by updating the corresponding tests accordingly.

It also adds an input validation check on the ThresholdSplit and ThresholdSplitInsecure functions to ensure they are called with a threshold parameter greater than 1.

category: bug
ticket: none

@KaloyanTanev KaloyanTanev marked this pull request as draft September 19, 2024 13:13
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 6 lines in your changes missing coverage. Please review.

Project coverage is 57.69%. Comparing base (a23fd53) to head (ee14d70).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tbls/herumi.go 0.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3297      +/-   ##
==========================================
+ Coverage   57.60%   57.69%   +0.08%     
==========================================
  Files         211      211              
  Lines       30604    30618      +14     
==========================================
+ Hits        17629    17664      +35     
+ Misses      11070    11047      -23     
- Partials     1905     1907       +2     

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

Copy link

sonarcloud bot commented Sep 20, 2024

@KaloyanTanev KaloyanTanev marked this pull request as ready for review September 20, 2024 10:32
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.

4 participants