-
Notifications
You must be signed in to change notification settings - Fork 28
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
A0-2846: aleph-bft shouldn't quit after creator's graceful exit #314
Merged
fixxxedpoint
merged 24 commits into
Cardinal-Cryptography:main
from
fixxxedpoint:A0-2846_purge_unit-backup_error
Aug 7, 2023
Merged
A0-2846: aleph-bft shouldn't quit after creator's graceful exit #314
fixxxedpoint
merged 24 commits into
Cardinal-Cryptography:main
from
fixxxedpoint:A0-2846_purge_unit-backup_error
Aug 7, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nish early, which might happen if unit-backup was purged.
…ld panic (which happened during tests).
…f some custom oneshot channel, to allow await task completion.
…ator won't stop whole AlephBFT
…nstead of some custom oneshot channel, to allow await task completion." This reverts commit ef90f0f.
…is version also works, but kind of against the description of the SpawnHandle returned by substrate. Probably it is caused by setting a global panic handler on substrate's runner initialization.
…nics. This version also works, but kind of against the description of the SpawnHandle returned by substrate. Probably it is caused by setting a global panic handler on substrate's runner initialization." This reverts commit b8f4601.
…ied about exit from our parent, we continue to disable our offspring tasks, but without communicating it to our parent.
…ntil it has not panicked.
…was used for debugging)
Please make sure the following happened
|
ghost
added
the
pending
label
Aug 4, 2023
…as panicking without returning error, since oneshot::Receiver returned by Terminator was already implementing FusedFuture that behaved that way.
fixxxedpoint
force-pushed
the
A0-2846_purge_unit-backup_error
branch
2 times, most recently
from
August 6, 2023 09:57
4e9fd09
to
9988830
Compare
kostekIV
reviewed
Aug 7, 2023
kostekIV
approved these changes
Aug 7, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one. LGTM
lesniak43
approved these changes
Aug 7, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool
fixxxedpoint
force-pushed
the
A0-2846_purge_unit-backup_error
branch
from
August 7, 2023 10:27
9988830
to
3ff040d
Compare
fixxxedpoint
force-pushed
the
A0-2846_purge_unit-backup_error
branch
from
August 7, 2023 10:32
3ff040d
to
4f46254
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Creator of aleph-bft might decide to gracefully exit when it discovers inconsistency of its units backup compared to knowledge collected from network. In that case, aleph-bft's session should be allowed to continue instead of panicking.
Type of change
FusedStream
. When used withfutures::select!
it could cause that select to panic, since its implementation returnsis_terminated() == true
before it return an error (after we drop parents Terminator).