-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
timeboost-sequencer/src/lib.rs
Outdated
round = payload.round(); | ||
if payload.evidence().round() > evidence.round() { | ||
evidence = payload.evidence().clone() | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
timeboost-sequencer/src/lib.rs
Outdated
@@ -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(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Closes https://app.asana.com/1/1208976916964769/project/1209394409339229/task/1210279951025506
This PR:
Payload.evidence
fieldorder_vertices()
, data: payload + evidenceevidence
toIncluder::inclusion_list(&mut self, round, evidence, lists: Vec<CandidateList>) -> Outcome
InclusionList.evidence
fieldinsert_shares
,Committee
info for the evidence check later, this committee will be updated via Decrypter's request when we have dynamic committee (future PR)