Skip to content
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

[CATCHUP] Fetch Proposals in Dependecny Task #3339

Merged
merged 6 commits into from
Jun 19, 2024
Merged

[CATCHUP] Fetch Proposals in Dependecny Task #3339

merged 6 commits into from
Jun 19, 2024

Conversation

bfish713
Copy link
Collaborator

@bfish713 bfish713 commented Jun 19, 2024

Closes #3244

This PR:

  1. Fetches proposals if we can from the vote task if the parent proposal is missing
  2. Fetches proposals from the proposal task if we form a QC for a proposal we don't have
  3. Emits the validated state event after updating state in the fetch_proposal function

This PR does not:

Key places to review:

@bfish713 bfish713 marked this pull request as ready for review June 19, 2024 18:39
Copy link
Contributor

@jparr721 jparr721 left a comment

Choose a reason for hiding this comment

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

LGTM

let sender = self.sender.clone();
let consensus = Arc::clone(&self.consensus);
async_spawn(async move {
fetch_proposal(high_qc_view_number, sender, memberhsip, consensus).await
Copy link
Contributor

Choose a reason for hiding this comment

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

How come this is an async spawn instead of just calling? It looks like the method doesn't do anything long-running?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The fetch could be potentially very slow (500ms) and this caller isn't expecting the result directly back, in the mean time we might get the ValidatedStateUpdated event we need before the request for proposal ever even finishes

@bfish713 bfish713 merged commit 4c506d1 into main Jun 19, 2024
36 checks passed
@bfish713 bfish713 deleted the bf/dep-catchup branch June 19, 2024 18:55
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.

[CATCHUP] - Inegrate Proposal Fetching Into Dependency Task
2 participants