-
Notifications
You must be signed in to change notification settings - Fork 32
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
[VID] Vid Vote Logic in Consensus Task #2107
Conversation
…idCertSend, and VidCertRecv
…nly vote after getting shares
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.
Could we update the consensus_task unit tests to also test for receiving VID shares? I don't think they test that now, and after this change we'll want them to test that.
Really great work overall! Thank you turning this PR around so fast!
crates/task-impls/src/vid.rs
Outdated
.direct_message(stream_id, HotShotEvent::VidVoteRecv(vote)) | ||
.await; | ||
}; | ||
} | ||
HotShotEvent::VidDisperseRecv(disperse, sender) => { |
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.
Now that we have this event handler in the consensus task, we can remove it entirely from the vid task.
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.
The only thing remained is this comment at the end of original VidDisperseRecv
handler:
// Record the block we have promised to make available.
// TODO https://github.com/EspressoSystems/HotShot/issues/1692
// consensus.saved_payloads.insert(proposal.data.block_payload);
Do we still want to keep #1692 as a comment in the new handler for VidDisperseRecv
? cc @ggutoski
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.
I say yes but will defer to others.
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.
Looks good! Just a question about the endpoint.
@elliedavidson Good point! I know |
Yes, sounds good! This can be done in a separate issue. Let's get this merged first. |
Let's try updating the view timeout for the half_f failures timeout like we did for the merge yesterday. |
Created the issue here: #2148 |
Closes issue: #2067
This PR:
vote_if_able()
so that replicas don’t vote until they’ve seen a VIDShare(eventVIDDisperseRecv
in implementation).test_vid_task
.This PR does not:
Key places to review:
task-impls/src/consensus.rs
: addedvid_shares
to save received vid shares for each view, added one more condition invote_if_albe()
, dealt withHotShotEvent::VidDisperseRecv
.How to test this PR:
just async_std test_vid_task
just async_std test_success
Comments requested:
HotShotEvent::VidDisperseRecv
, and there is a high overlapping of codes in validating the received shares. We have to keep the one in consensus task to determine when can vote, but do we still want to keep the one in vid task?