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

[TECH-DEBT] Add View Sync Timeout to Config #2777

Merged
merged 3 commits into from
Mar 15, 2024
Merged

Conversation

bfish713
Copy link
Collaborator

Closes #1472

This PR:

Adds a view sync timeout duration to the config and makes the default a less time than the view timeout.

This PR does not:

Shouldn't change anything else

Key places to review:

Are the defaults reasonable

jparr721
jparr721 previously approved these changes Mar 15, 2024
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.

This looks great. Though I think I'll need to re-approve after your types PR goes in.

Cargo.toml Outdated
"uds",
"websocket",
"yamux",
"macros",
Copy link
Contributor

Choose a reason for hiding this comment

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

What did you run to format this? Is it a vscode command?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually been trying out neovim and it was doing the toml formatting

Copy link
Contributor

Choose a reason for hiding this comment

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

Oooh I might bug you for your config later

let randomized_view_number: u64 = rng.gen();
let index = (randomized_view_number % self.nodes_with_stake.len() as u64) as usize;
let mut rng: StdRng = rand::SeedableRng::seed_from_u64(*view_number);
let randomized_view_number: usize = rng.gen();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice.

@bfish713
Copy link
Collaborator Author

This looks great. Though I think I'll need to re-approve after your types PR goes in.

Mind taking a look at the other PR?

@bfish713 bfish713 merged commit f13ccb3 into main Mar 15, 2024
9 of 11 checks passed
@bfish713 bfish713 deleted the bf/view-sync-conf branch March 15, 2024 17:49
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.

Add Timeout Config to View Sync Task
2 participants