Update nightly version

This commit is contained in:
Luke Parker
2025-02-04 00:53:22 -05:00
parent 22e411981a
commit 5a7b815e2e
8 changed files with 15 additions and 16 deletions

View File

@@ -9,7 +9,7 @@ pub(crate) fn merkle(hash_args: &[[u8; 32]]) -> [u8; 32] {
let zero = [0; 32];
let mut interim;
while hashes.len() > 1 {
interim = Vec::with_capacity((hashes.len() + 1) / 2);
interim = Vec::with_capacity(hashes.len().div_ceil(2));
let mut i = 0;
while i < hashes.len() {

View File

@@ -61,7 +61,7 @@ impl Topic {
attempt: attempt + 1,
round: SigningProtocolRound::Preprocess,
}),
Topic::SlashReport { .. } => None,
Topic::SlashReport => None,
Topic::Sign { id, attempt, round: _ } => {
Some(Topic::Sign { id, attempt: attempt + 1, round: SigningProtocolRound::Preprocess })
}
@@ -83,7 +83,7 @@ impl Topic {
}
SigningProtocolRound::Share => None,
},
Topic::SlashReport { .. } => None,
Topic::SlashReport => None,
Topic::Sign { id, attempt, round } => match round {
SigningProtocolRound::Preprocess => {
let attempt = attempt + 1;
@@ -102,7 +102,7 @@ impl Topic {
match self {
Topic::RemoveParticipant { .. } => None,
Topic::DkgConfirmation { .. } => None,
Topic::SlashReport { .. } => None,
Topic::SlashReport => None,
Topic::Sign { id, attempt, round: _ } => Some(SignId { session: set.session, id, attempt }),
}
}
@@ -129,7 +129,7 @@ impl Topic {
};
SignId { session: set.session, id, attempt }
}),
Topic::SlashReport { .. } => None,
Topic::SlashReport => None,
Topic::Sign { .. } => None,
}
}
@@ -147,7 +147,7 @@ impl Topic {
Some(Topic::DkgConfirmation { attempt, round: SigningProtocolRound::Preprocess })
}
},
Topic::SlashReport { .. } => None,
Topic::SlashReport => None,
Topic::Sign { id, attempt, round } => match round {
SigningProtocolRound::Preprocess => None,
SigningProtocolRound::Share => {
@@ -170,7 +170,7 @@ impl Topic {
}
SigningProtocolRound::Share => None,
},
Topic::SlashReport { .. } => None,
Topic::SlashReport => None,
Topic::Sign { id, attempt, round } => match round {
SigningProtocolRound::Preprocess => {
Some(Topic::Sign { id, attempt, round: SigningProtocolRound::Share })
@@ -189,7 +189,7 @@ impl Topic {
// We don't require recognition for the first attempt, solely the re-attempts
Topic::DkgConfirmation { attempt, .. } => *attempt != 0,
// We don't require recognition for the slash report
Topic::SlashReport { .. } => false,
Topic::SlashReport => false,
// We do require recognition for every sign protocol
Topic::Sign { .. } => true,
}
@@ -206,7 +206,7 @@ impl Topic {
match self {
Topic::RemoveParticipant { .. } => Participating::Everyone,
Topic::DkgConfirmation { .. } => Participating::Participated,
Topic::SlashReport { .. } => Participating::Everyone,
Topic::SlashReport => Participating::Everyone,
Topic::Sign { .. } => Participating::Participated,
}
}