Don't pass validators' public keys with attestations (#186)

* Don't pass validators' public keys with attestations

* Update statement-table's Misbehaviour typedef

* Update network/router

* Expand MessageValidationData

* Try to fix tests

* Extend ApiContext

* Remove 'index_mapping' from the SessionParams

* Construct index_mapping from authorities

* Move index_mapping to TableContext

* Add test for index_mapping order
This commit is contained in:
Stanislav Tkach
2019-05-08 22:19:39 +03:00
committed by Robert Habermeier
parent 36dd42523d
commit e8fcb43fcf
10 changed files with 130 additions and 61 deletions
+3 -3
View File
@@ -187,9 +187,9 @@ pub trait Network {
#[derive(Debug, Clone, Default)]
pub struct GroupInfo {
/// Authorities meant to check validity of candidates.
pub validity_guarantors: HashSet<SessionKey>,
validity_guarantors: HashSet<SessionKey>,
/// Number of votes needed for validity.
pub needed_validity: usize,
needed_validity: usize,
}
/// Sign a table statement against a parent hash.
@@ -347,7 +347,7 @@ impl<C, N, P> ParachainValidation<C, N, P> where
debug!(target: "validation", "Active parachains: {:?}", active_parachains);
let table = Arc::new(SharedTable::new(group_info, sign_with.clone(), parent_hash, self.extrinsic_store.clone()));
let table = Arc::new(SharedTable::new(authorities, group_info, sign_with.clone(), parent_hash, self.extrinsic_store.clone()));
let router = self.network.communication_for(
table.clone(),
outgoing,