Switch elections to Phragmen, enable them in PoA (#492)

* Switch elections to Phragmen, enable them in PoA

* Remove superfluous code.

* Build fixes

* Update to substrate master

* Build fixes

* Add warning

* Disable authority discovery for now

* Remove commented code

* Fix warning
This commit is contained in:
Gavin Wood
2019-10-24 18:55:02 +02:00
committed by GitHub
parent dd2b43cd10
commit 425b884931
7 changed files with 181 additions and 229 deletions
+12 -8
View File
@@ -20,9 +20,8 @@
#![cfg_attr(not(feature = "std"), no_std)]
use runtime_primitives::{generic, AnySignature};
pub use runtime_primitives::traits::{BlakeTwo256, Hash as HashT, Verify};
use runtime_primitives::{generic, MultiSignature};
pub use runtime_primitives::traits::{BlakeTwo256, Hash as HashT, Verify, IdentifyAccount};
pub mod parachain;
@@ -35,12 +34,17 @@ pub type BlockNumber = u32;
/// An instant or duration in time.
pub type Moment = u64;
/// Alias to 512-bit hash when used in the context of a signature on the relay chain.
/// Equipped with logic for possibly "unsigned" messages.
pub type Signature = AnySignature;
/// Alias to type for a signature for a transaction on the relay chain. This allows one of several
/// kinds of underlying crypto to be used, so isn't a fixed size when encoded.
pub type Signature = MultiSignature;
/// Alias to an sr25519 or ed25519 key.
pub type AccountId = <Signature as Verify>::Signer;
/// Alias to the public key used for this chain, actually a `MultiSigner`. Like the signature, this
/// also isn't a fixed size when encoded, as different cryptos have different size public keys.
pub type AccountPublic = <Signature as Verify>::Signer;
/// Alias to the opaque account ID type for this chain, actually a `AccountId32`. This is always
/// 32 bytes.
pub type AccountId = <AccountPublic as IdentifyAccount>::AccountId;
/// The type for looking up accounts. We don't expect more than 4 billion of them.
pub type AccountIndex = u32;