Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@rphmeier
Copy link
Contributor

@rphmeier rphmeier commented Aug 9, 2018

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=60 seconds, 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.

@rphmeier rphmeier added the A0-please_review Pull request needs code review. label Aug 9, 2018
@rphmeier rphmeier closed this Aug 9, 2018
@rphmeier rphmeier reopened this Aug 9, 2018
@rphmeier rphmeier added A3-in_progress Pull request is in progress. No review needed at this stage. and removed A0-please_review Pull request needs code review. labels Aug 9, 2018
@rphmeier rphmeier changed the title notify when an authority appears to have missed their block vote out offline authorities Aug 10, 2018
} 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;
Copy link
Contributor Author

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())

let session_index = <session::Module<T>>::current_index();
let early_exit_era = bad_validators.len() > 0;

if bad_validators.len() > 0 {
Copy link
Contributor Author

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

@gnunicorn
Copy link
Contributor

refs #491

@rphmeier rphmeier added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Aug 10, 2018
@gavofyork gavofyork changed the title vote out offline authorities Vote out offline authorities Aug 10, 2018
@gavofyork gavofyork added A9-buythatmanabeer and removed A0-please_review Pull request needs code review. labels Aug 10, 2018
@gavofyork gavofyork merged commit 25f0c07 into master Aug 11, 2018
@gavofyork gavofyork deleted the rh-note-offline-validator branch August 11, 2018 09:29
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.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants