GRANDPA finality proof draft (#1268)

* grandpa finality proof

* prove GrandpaApi::grandpa_authorities using parent block + some docs

* create justification when consensus data is changed

* generate justifications periodically

* test for ConsensusChanges
This commit is contained in:
Svyatoslav Nikolsky
2019-01-11 21:25:03 +03:00
committed by Gav Wood
parent 677b79765b
commit 616716cb4b
18 changed files with 786 additions and 113 deletions
+4 -1
View File
@@ -50,6 +50,9 @@ use primitives::traits::{
use substrate_primitives::storage::well_known_keys;
use system::{ensure_signed, ensure_inherent};
#[cfg(any(feature = "std", test))]
use substrate_primitives::Ed25519AuthorityId;
mod mock;
mod tests;
@@ -143,7 +146,7 @@ impl<SessionKey: Member> RawLog<SessionKey> {
// Implementation for tests outside of this crate.
#[cfg(any(feature = "std", test))]
impl<N> From<RawLog<N>> for primitives::testing::DigestItem where N: Into<substrate_primitives::Ed25519AuthorityId> {
impl<N> From<RawLog<N>> for primitives::testing::DigestItem where N: Into<Ed25519AuthorityId> {
fn from(log: RawLog<N>) -> primitives::testing::DigestItem {
match log {
RawLog::AuthoritiesChange(authorities) =>