Skip to content

append round evidence to decrypter worker payload #362

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

Merged
merged 3 commits into from
Jun 4, 2025

Conversation

alxiong
Copy link
Contributor

@alxiong alxiong commented Jun 4, 2025

Closes https://app.asana.com/1/1208976916964769/project/1209394409339229/task/1210279951025506

This PR:

  • add Payload.evidence field
    • during order_vertices(), data: payload + evidence
  • add evidence to Includer::inclusion_list(&mut self, round, evidence, lists: Vec<CandidateList>) -> Outcome
  • add InclusionList.evidence field
  • add evidence check during insert_shares,
    • during decrypter's worker construction, we pass in Committee info for the evidence check later, this committee will be updated via Decrypter's request when we have dynamic committee (future PR)

@alxiong alxiong requested a review from twittner June 4, 2025 05:36
Comment on lines 364 to 367
round = payload.round();
if payload.evidence().round() > evidence.round() {
evidence = payload.evidence().clone()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it makes sense to move this into the Ok(data) branch below so the values are only updated if the corresponding candidate list has been successfully decoded.

Once done, using a hypothetical Payload::into_evidence method would save a clone.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good suggestion, done in a7404cc

@alxiong alxiong requested a review from twittner June 4, 2025 10:20
@@ -350,13 +356,19 @@ impl Task {
let mut candidates = Vec::new();
while !actions.is_empty() {
let mut round = RoundNumber::genesis();
let mut evidence = Evidence::Genesis;
let mut lists = Vec::new();
while let Some(action) = actions.pop_front() {
match action {
Action::Deliver(payload) => {
round = payload.round();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this update also be moved into the Ok(data) branch? I think we should either use all or none of the payload values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good, done in 8a34dd4

@alxiong alxiong requested a review from twittner June 4, 2025 11:06
Copy link
Contributor

@twittner twittner left a comment

Choose a reason for hiding this comment

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

👍

@alxiong alxiong merged commit a645745 into main Jun 4, 2025
6 checks passed
@alxiong alxiong deleted the ax/dec-justify-round branch June 4, 2025 11:48
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.

2 participants