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

Hinted scheduler improvements #4312

Merged
merged 13 commits into from
Oct 17, 2023

Conversation

pwojcikdev
Copy link
Contributor

This is a PR for an improved election hinting mechanism. The difference it brings seems to be quite significant, especially under heavily desynchronised network conditions, where timestamps discrepancies between nodes make it impossible to rely on the normal election scheduling system.

baseline vs improved hinting

The current problem for the network is that under high load, elections sooner or later degrade to the point when part of the network has block dependencies confirmed, while the rest does not. I guess it's because some votes get dropped, but it's a separate problem and debugging is still ongoing. To workaround this issue, a new hinted scheduler design tries to 'detect' cases where our node falls back behind the network and activate elections for blocks that were missed.

image

When working on this solution, I received incredible help from @gr0vity-dev which brought my prototype from good enough to something that should be really robust and efficient. Thanks!

@pwojcikdev pwojcikdev linked an issue Oct 9, 2023 that may be closed by this pull request
@pwojcikdev pwojcikdev added this to the V26.0 milestone Oct 9, 2023
@pwojcikdev pwojcikdev force-pushed the hinted-fixing-2-develop branch from d751b38 to 91ffaf2 Compare October 9, 2023 23:20
{
// Check if there is space inside AEC for a new hinted election
if (active.vacancy (nano::election_behavior::hinted) > 0)
{
// Check if there is any vote cache entry surpassing our minimum vote tally threshold
Copy link
Contributor

Choose a reason for hiding this comment

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

Agree this should be removed.

@pwojcikdev pwojcikdev merged commit 5cd0355 into nanocurrency:develop Oct 17, 2023
14 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vote hinting improvements for unconfirmed predecessors
2 participants