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

Warp sync state machine refactoring #1060

Merged
merged 62 commits into from
Sep 21, 2023
Merged

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Aug 23, 2023

Close #67
Close #119
cc #864

@tomaka
Copy link
Contributor Author

tomaka commented Sep 5, 2023

It's unclear to me how to manage malicious sources the correct way.
Presently we do it with a very naive banning system where one error results in a ban, and all bans are reset if all sources are banned.

@tomaka
Copy link
Contributor Author

tomaka commented Sep 5, 2023

The difficulty in designing many aspects of the warp sync state machine comes from #1109

In this PR, I'm going to remove the concept of "successful warp sync" from the warp sync state machine, and instead modify the AllSync to treat the first successful warp sync as a trigger to switch to "all forks syncing". This way, #1109 consists only in modifying AllSync.

@tomaka
Copy link
Contributor Author

tomaka commented Sep 6, 2023

It's unclear to me how to manage malicious sources the correct way.

I think the best approach is to first query only the source(s) with the highest finalized block, but if requests fail progressively broaden the search to all sources.

The high-level code must also be involved as it should kick out sources that don't answer properly.

@tomaka tomaka marked this pull request as ready for review September 21, 2023 11:07
@tomaka tomaka added this pull request to the merge queue Sep 21, 2023
Merged via the queue into smol-dot:main with commit f9fefae Sep 21, 2023
21 checks passed
@tomaka tomaka deleted the warp-sync-refactor branch September 21, 2023 13:35
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.

GrandPa warp sync robustness to empty responses Properly handle warp syncing failures
1 participant