This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Vote out offline authorities #524
Merged
Merged
Conversation
This file contains hidden or 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
…kadot into rh-note-offline-validator
…kadot into rh-note-offline-validator
…kadot into rh-note-offline-validator
…kadot into rh-note-offline-validator
…kadot into rh-note-offline-validator
…kadot into rh-note-offline-validator
rphmeier
commented
Aug 10, 2018
substrate/runtime/session/src/lib.rs
Outdated
| } else if is_final_block || broken_validation { | ||
| Self::rotate_session(!broken_validation, is_final_block); | ||
| let bad_validators = <BadValidators<T>>::take(); | ||
| let should_end_session = <ForcingNewSession<T>>::take().is_some() || bad_validators.is_some() || is_final_block; |
Contributor
Author
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.
to avoid early exit on empty bad_validators should be bad_validators.map_or(false, |v| !is_empty())
rphmeier
commented
Aug 10, 2018
substrate/runtime/staking/src/lib.rs
Outdated
| let session_index = <session::Module<T>>::current_index(); | ||
| let early_exit_era = bad_validators.len() > 0; | ||
|
|
||
| if bad_validators.len() > 0 { |
Contributor
Author
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.
favor is_empty over bad_validators
Contributor
|
refs #491 |
gavofyork
approved these changes
Aug 10, 2018
dvdplm
added a commit
that referenced
this pull request
Aug 14, 2018
* master: Less verbosity (#546) Fetching storage proofs by light client (#252) Gitlab CI build file for linux. (#552) Vote out offline authorities (#524) fix block body fetch for availability pruning (#539) Continue sync after ancestry search (#538) Docs Typo Fixes (#534) don't wait for all futures to resolve before shutdown (#536) Update libp2p and some log (#532) Mh public key for telemetry (#526) Td bps (#527) Reserved peers CLI flag (#528)
pepyakin
pushed a commit
that referenced
this pull request
Aug 24, 2018
* notify when an authority appears to have missed their block * Runtime API * offline tracker * Move to consensus * generating reports of offline indices * stubbed-out evaluation logic * Slashing data pathwat * usize -> u32 * Slash bad validators. * update to rhododendron 0.3 * fix compilation of polkadot-consensus * Support offline noting in checked_block * include offline reports in block authorship voting * do not vote validators offline after some time * add test for offline-tracker * fix test build * bump spec version * update wasm * Only allow validators that are possible to slash * Fix grumble * More idiomatic * New Wasm. * update rhododendron * improve logging and reduce round time exponent * format offline validators in ss58
liuchengxu
pushed a commit
to chainx-org/substrate
that referenced
this pull request
Aug 23, 2021
* change time to blocknum * support block_or_time
liuchengxu
added a commit
to chainx-org/substrate
that referenced
this pull request
Aug 23, 2021
It's seemingly too noisy for ChainX.
helin6
pushed a commit
to boolnetwork/substrate
that referenced
this pull request
Jul 25, 2023
* macro: Reduce dependencies Signed-off-by: Alexandru Vasile <[email protected]> * macro: Remove dev-dependencies Signed-off-by: Alexandru Vasile <[email protected]> * codegen: Reduce dependencies Signed-off-by: Alexandru Vasile <[email protected]> * subxt: Reduce dependencies Signed-off-by: Alexandru Vasile <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Validators each maintain a view of which other validators appear offline. On every block, the proposer can optionally include indices of validators who they believe to be offline. Other validators will only prepare or commit for that block if they also believe all the validators in the list to be offline.
Since an adversary that controls communication can convince different validators that different other validators are offline, after
MAX_OFFLINE_VOTE_SECONDS=60seconds, honest validators will include an empty list. If we are actually dealing with an adversary or network which is in such a state, offline voting will probably not have the desired effect.