mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-10 18:07:21 +00:00
45c3e40a62
* candidate statement importing * import votes on validity * import availability votes * candidate receipt type * make table mod public * test context for table * add harness for tests * some tests for misbehavior * produce proposal from table * count candidate issuance as implicit vote * keep track of messages known by validators * fix primitives compilation * simple BFT agreement * kill unused macro_use annotation * tests for BFT agreement * test for not concluding on different prepares * return summary upon statement import * accept bft agreement on proposal not locally submitted * check justification set for BFT * BFT rewrite: vote accumulator with tests * squash some warnings * a few more tests for the accumulator * add sender to table's signed statement * implement honest node strategy for BFT * inex -> index * import and broadcast lock proofs * poll repeatedly when state changes * don't broadcast advance vote immediately if locked * do not check validity of locked candidate * basic tests for the strategy * remove unused context trait and fix warning * address some review grumbles * address some more review nits * fix lock import logic and add a test * fix spaces * fix a couple more style grumbles * more type-safe justifications * rename Communication enum variants * improve some panic guard proofs * add trailing comma
37 lines
1.5 KiB
Rust
37 lines
1.5 KiB
Rust
// Copyright 2017 Parity Technologies (UK) Ltd.
|
|
// This file is part of Polkadot.
|
|
|
|
// Polkadot is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
|
|
// Polkadot is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
//! Propagation and agreement of candidates.
|
|
//!
|
|
//! Validators are split into groups by parachain, and each validator might come
|
|
//! up its own candidate for their parachain. Within groups, validators pass around
|
|
//! their candidates and produce statements of validity.
|
|
//!
|
|
//! Any candidate that receives majority approval by the validators in a group
|
|
//! may be subject to inclusion, unless any validators flag that candidate as invalid.
|
|
//!
|
|
//! Wrongly flagging as invalid should be strongly disincentivized, so that in the
|
|
//! equilibrium state it is not expected to happen. Likewise with the submission
|
|
//! of invalid blocks.
|
|
//!
|
|
//! Groups themselves may be compromised by malicious validators.
|
|
|
|
extern crate futures;
|
|
extern crate polkadot_primitives as primitives;
|
|
|
|
pub mod bft;
|
|
pub mod table;
|