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

Rewrite with async/await #127

Closed
wants to merge 14 commits into from
Closed

Rewrite with async/await #127

wants to merge 14 commits into from

Conversation

rakanalh
Copy link

@rakanalh rakanalh commented Dec 4, 2020

This is my attempt at trying to upgrade this crate from using futures into async-await. The reason behind this change is to be able to convert substrate's consensus including finality-grandpa's Environment methods to async ones where await can be used on calls to the keystore.

The status of this PR is WIP. The following tests need to be fixed before this branch can be merged:

test voter::tests::broadcast_commit ... FAILED
test voter::tests::exposing_voter_state ... FAILED

and

test voter::tests::broadcast_commit_only_if_newer ... test voter::tests::broadcast_commit_only_if_newer has been running for over 60 seconds
test voter::tests::finalizing_at_fault_threshold ... test voter::tests::finalizing_at_fault_threshold has been running for over 60 seconds
test voter::tests::import_commit_for_any_round ... test voter::tests::import_commit_for_any_round has been running for over 60 seconds
test voter::tests::pick_up_from_prior_with_grandparent_state ... test voter::tests::pick_up_from_prior_with_grandparent_state has been running for over 60 seconds
test voter::tests::pick_up_from_prior_without_grandparent_state ... test voter::tests::pick_up_from_prior_without_grandparent_state has been running for over 60 seconds
test voter::tests::skips_to_latest_round_after_catch_up ... test voter::tests::skips_to_latest_round_after_catch_up has been running for over 60 seconds
test voter::tests::talking_to_myself ... test voter::tests::talking_to_myself has been running for over 60 seconds

I am going to keep this draft PR around to be picked up later by someone knowledgable in finality-grandpa's logic to make the needed fixes and maybe get this PR to a mergable state.

Resolves #124

@andresilva
Copy link
Contributor

Closing this one as stale. The approach from this PR won't work as we need to refactor the existing structure to group all inputs into some kind of loop that drives the process (inputs being: messages, timers, etc.)

@andresilva andresilva closed this Apr 28, 2021
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.

Refactor to async / await
2 participants