This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
approval-voting: processed wakeups can also update approval state #3848
Merged
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
rphmeier
added
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
labels
Sep 14, 2021
* master: (21 commits) Add build with docker info to README (#3843) improve approval tracing (#3846) UMP: Support Overweight messages (#3575) Companion for substrate#9115 (#3265) Better error messages. (#3835) Put all authorities of a session into `SessionInfo`. (#3813) Bump tracing from 0.1.26 to 0.1.27 (#3841) Companion for substrate#9711 (#3801) fix complaints in CI (#3838) dockerfiles: upgrade to ubuntu:20.04; some chore (#3828) make polkadot-runtime optional feature (#3820) Companion for #9648 (#3757) Substrate Companion #9737 (#3830) Add logging for worker spawn failures (#3827) Add Canvas (#3823) Allow staking miner to use different election algorithms (#3752) Do not expire HRMP open channel requests (#3543) Bump tokio from 1.10.1 to 1.11.0 (#3821) Add words to the dictionnary (#3819) Add vault secrets to puplish-rustdoc job (#3816) ...
ordian
approved these changes
Sep 15, 2021
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.
Looks reasonable.
Comment on lines
+2561
to
+2570
// A, B are tranche 0. | ||
// C is tranche 1. | ||
// | ||
// All assignments imported at once, and B, C approvals imported immediately. | ||
// A no-shows, leading to being covered by C. | ||
// Technically, this is an approved block, but it will be approved | ||
// when the no-show timer hits, not as a response to an approval vote. | ||
// | ||
// Note that we have 6 validators, otherwise the 2nd approval triggers | ||
// the >1/3 insta-approval condition. |
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.
❤️ Thanks for the detailed comments!
Co-authored-by: Andronik Ordian <write@reusable.software>
drahnr
approved these changes
Sep 15, 2021
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.
LGTM, thanks for the explain-session :)
bot merge |
Waiting for commit status. |
Merge aborted: Checks failed for fd5bab0 |
bot merge |
Waiting for commit status. |
ghost
deleted the
rh-approval-wakeups-update
branch
September 15, 2021 19:30
ordian
added a commit
that referenced
this pull request
Sep 16, 2021
* master: Raised nits on #3813 (#3844) Don't try to connect to ourselves. (#3855) add dispute metrics, some chores (#3842) add type info derive to senderror (#3860) Companion for #8615: enrich metadata with type information (#3336) approval-voting: processed wakeups can also update approval state (#3848) Add build with docker info to README (#3843) improve approval tracing (#3846) UMP: Support Overweight messages (#3575) Companion for substrate#9115 (#3265) Better error messages. (#3835) Put all authorities of a session into `SessionInfo`. (#3813) Bump tracing from 0.1.26 to 0.1.27 (#3841) Companion for substrate#9711 (#3801) fix complaints in CI (#3838)
ordian
added a commit
that referenced
this pull request
Sep 17, 2021
* master: Raised nits on #3813 (#3844) Don't try to connect to ourselves. (#3855) add dispute metrics, some chores (#3842) add type info derive to senderror (#3860) Companion for #8615: enrich metadata with type information (#3336) approval-voting: processed wakeups can also update approval state (#3848) Add build with docker info to README (#3843) improve approval tracing (#3846) UMP: Support Overweight messages (#3575) Companion for substrate#9115 (#3265) Better error messages. (#3835) Put all authorities of a session into `SessionInfo`. (#3813)
This pull request was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
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.
Related to #3847: a no-show that is pre-covered should now be marked as approved in the DB.
A short summary of changes: I renamed
import_checked_approval
toadvance_approval_state
so we could reuse the same code for more purposes than just approval checking imports. I added a new kind of state transition which is "processed wakeup". I changed theprocess_wakeup
function to invokeadvance_approval_state
on every call. This means that if anything happens during regular wakeup processing to make the candidate approved, that it will be handled in the DB properly instead of dropped as it was before.I added a test which I can confirm fails on
master
and passes in this branch.