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

Fix max_signers retrieval in CLIComms #463

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dkg/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub async fn cli_for_processed_args<C: Ciphersuite + 'static + MaybeIntoEvenY>(

let rng = thread_rng();

let (identifier, max_signers) = comms.get_identifier(input, logger).await?;
let (identifier, max_signers) = comms.get_identifier_and_max_signers(input, logger).await?;

let (round1_secret_package, round1_package) =
frost::keys::dkg::part1(identifier, max_signers, pargs.min_signers, rng)?;
Expand Down
2 changes: 1 addition & 1 deletion dkg/src/comms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use frost::Identifier;
pub trait Comms<C: Ciphersuite> {
/// Return this participant's identifier (in case it's derived from other
/// information) and the number of participants in the signing session.
async fn get_identifier(
async fn get_identifier_and_max_signers(
&mut self,
input: &mut dyn BufRead,
output: &mut dyn Write,
Expand Down
6 changes: 4 additions & 2 deletions dkg/src/comms/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<C> Comms<C> for CLIComms<C>
where
C: Ciphersuite + 'static,
{
async fn get_identifier(
async fn get_identifier_and_max_signers(
&mut self,
_input: &mut dyn BufRead,
_output: &mut dyn Write,
Expand All @@ -54,7 +54,9 @@ where
self.args
.identifier
.ok_or_eyre("identifier must be specified")?,
0,
self.args
.max_signers
.ok_or_eyre("max_signers must be specified")?,
))
}

Expand Down
2 changes: 1 addition & 1 deletion dkg/src/comms/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ impl<C: Ciphersuite> HTTPComms<C> {

#[async_trait(?Send)]
impl<C: Ciphersuite + 'static> Comms<C> for HTTPComms<C> {
async fn get_identifier(
async fn get_identifier_and_max_signers(
&mut self,
_input: &mut dyn BufRead,
_output: &mut dyn Write,
Expand Down
Loading