Conversation
| /// Stockpile triples if the amount of unspent triples is below the minimum | ||
| /// and the maximum number of all ongoing generation protocols is below the maximum. | ||
| async fn stockpile(&mut self, participants: &[Participant], cfg: &ProtocolConfig) { | ||
| if participants.len() < self.threshold { |
There was a problem hiding this comment.
This check is already done before calling the stockpile() function
| self.ongoing_owned.remove(&id); | ||
| let _ = ongoing_gen_tx.send(self.ongoing.len()); | ||
| } | ||
| _ = stockpile_interval.tick(), if active.len() >= self.threshold => { |
There was a problem hiding this comment.
Logic is the same here. I've only added logging.
jakmeier
left a comment
There was a problem hiding this comment.
LGTM but let's wait for @ChaoticTempest to see if the presiganture burning issue is still present.
ChaoticTempest
left a comment
There was a problem hiding this comment.
I'm not entirely sure if this issue is still present. @volovyks can you add a test where we have 100 presignatures with 100 signature requests. If we can get through with ~95% of the signatures produced, then it'd be great. Ideally it should be as close to 100% chance as possible but we don't have to guarantee that with this PR
|
I do not think that having loose tests is a good idea. I've created a couple of very strict tests here: #710 |
|
@ChaoticTempest @jakmeier do not lose triples, and presignatures tests are passing |
|
I would like to hold off merging this PR until #723 is merged since that race conditions causes some sign requests to go through several 1000s of rounds |
It was a part of the State Sync PR initially, but it does not belong there.
Recycling is not part of our design; rather, it's the opposite.
It can cause or hide issues, more motivation here: #472 (comment)