Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c6be9e5
expunge legacy code from polkadot-network
rphmeier Feb 20, 2020
953e292
mostly rip out old legacy protocol from service
rphmeier Feb 24, 2020
7a19620
ensure validation work is spawned by incoming messages
rphmeier Feb 24, 2020
134f3e5
decouple availabliity store from network logic; clean up data flow
rphmeier Feb 25, 2020
eaef68f
av_store: test helpers and use futures-abort
rphmeier Feb 26, 2020
4e1feb8
update polkadot-validation to pass n_validators when submitting chunks
rphmeier Feb 26, 2020
bf4443c
fallible erasure-chunk fetching
rphmeier Feb 26, 2020
697c136
implement `ErasureNetworking` for new network prot
rphmeier Feb 26, 2020
3416863
API for registering availability store in network
rphmeier Feb 26, 2020
457d406
fully integrate new network service into service
rphmeier Feb 26, 2020
8c65487
fix validation tests
rphmeier Feb 27, 2020
81ecaef
scaffolding for porting collator over to new network
rphmeier Feb 29, 2020
f86c52e
track connected validators' peer IDs and distribute collators' collat…
rphmeier Mar 2, 2020
bbef84c
helper in network for fetching all checked statements
rphmeier Mar 2, 2020
8bf595f
Merge branch 'master' into rh-remove-legacy-network
rphmeier Mar 2, 2020
16b79f2
fix adder-collator
rphmeier Mar 2, 2020
22c97dd
actually register notifications protocol
rphmeier Mar 3, 2020
0f53937
Update service/src/lib.rs
rphmeier Mar 5, 2020
9e76603
Make needed changes to service
expenses Mar 5, 2020
71a2d56
Merge two companion PRs.
gavofyork Mar 5, 2020
a4696ca
Some effort towards compilation
gavofyork Mar 5, 2020
20da96b
Fix
gavofyork Mar 5, 2020
85accd3
Merge remote-tracking branch 'origin/rh-remove-legacy-network' into g…
gavofyork Mar 5, 2020
99c63ea
Merge branch 'master' into gav-upsub
rphmeier Mar 5, 2020
da6dab4
remove `NetworkSpecialization` references from network
rphmeier Mar 5, 2020
de2dde0
fix compilation errors in service and collator
rphmeier Mar 5, 2020
3bf1967
ensure protocol name is valid
rphmeier Mar 5, 2020
80adf68
Fixes
gavofyork Mar 5, 2020
3b7d923
Fix
gavofyork Mar 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix validation tests
  • Loading branch information
rphmeier committed Feb 27, 2020
commit 8c65487f2109a21691d89390655b0b0488128e59
35 changes: 19 additions & 16 deletions validation/src/shared_table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ mod tests {
BlockData, ErasureChunk, AvailableData,
};
use polkadot_erasure_coding::{self as erasure};
use availability_store::ProvideGossipMessages;
use availability_store::ErasureNetworking;
use futures::future;
use futures::executor::block_on;
use std::pin::Pin;
Expand All @@ -606,21 +606,22 @@ mod tests {
}

#[derive(Clone)]
struct DummyGossipMessages;
struct DummyErasureNetworking;

impl ProvideGossipMessages for DummyGossipMessages {
fn gossip_messages_for(
impl ErasureNetworking for DummyErasureNetworking {
type Error = String;

fn fetch_erasure_chunk(
&self,
_topic: Hash
) -> Pin<Box<dyn futures::Stream<Item = (Hash, Hash, ErasureChunk)> + Send>> {
futures::stream::empty().boxed()
_candidate_hash: &Hash,
_index: u32,
) -> Pin<Box<dyn Future<Output = Result<ErasureChunk, Self::Error>> + Send>> {
future::pending().boxed()
}

fn gossip_erasure_chunk(
fn distribute_erasure_chunk(
&self,
_relay_parent: Hash,
_candidate_hash: Hash,
_erasure_root: Hash,
_chunk: ErasureChunk,
) {}
}
Expand Down Expand Up @@ -669,7 +670,7 @@ mod tests {
groups,
Some(local_key.clone()),
parent_hash,
AvailabilityStore::new_in_memory(DummyGossipMessages),
AvailabilityStore::new_in_memory(DummyErasureNetworking),
None,
);

Expand Down Expand Up @@ -717,7 +718,7 @@ mod tests {
groups,
Some(local_key.clone()),
parent_hash,
AvailabilityStore::new_in_memory(DummyGossipMessages),
AvailabilityStore::new_in_memory(DummyErasureNetworking),
None,
);

Expand All @@ -742,7 +743,7 @@ mod tests {

#[test]
fn evaluate_makes_block_data_available() {
let store = AvailabilityStore::new_in_memory(DummyGossipMessages);
let store = AvailabilityStore::new_in_memory(DummyErasureNetworking);
let relay_parent = [0; 32].into();
let para_id = 5.into();
let pov_block = pov_block_with_data(vec![1, 2, 3]);
Expand Down Expand Up @@ -790,6 +791,7 @@ mod tests {
proof: vec![],
}).collect(),
commitments: Default::default(),
n_validators,
}
)).validate()).unwrap();

Expand All @@ -803,7 +805,7 @@ mod tests {

#[test]
fn full_availability() {
let store = AvailabilityStore::new_in_memory(DummyGossipMessages);
let store = AvailabilityStore::new_in_memory(DummyErasureNetworking);
let relay_parent = [0; 32].into();
let para_id = 5.into();
let pov_block = pov_block_with_data(vec![1, 2, 3]);
Expand Down Expand Up @@ -854,6 +856,7 @@ mod tests {
proof: vec![],
}).collect(),
commitments: Default::default(),
n_validators,
}
)).validate()).unwrap();

Expand Down Expand Up @@ -887,7 +890,7 @@ mod tests {
groups,
Some(local_key.clone()),
parent_hash,
AvailabilityStore::new_in_memory(DummyGossipMessages),
AvailabilityStore::new_in_memory(DummyErasureNetworking),
None,
);

Expand Down Expand Up @@ -946,7 +949,7 @@ mod tests {
groups,
Some(local_key.clone()),
parent_hash,
AvailabilityStore::new_in_memory(DummyGossipMessages),
AvailabilityStore::new_in_memory(DummyErasureNetworking),
None,
);

Expand Down