Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4f03019
update basic_add wasm
rphmeier Jul 18, 2018
82def8c
Merge remote-tracking branch 'upstream/master' into basic-add-collator
rphmeier Jul 18, 2018
6d7a112
wasm feature and collator feature
rphmeier Jul 18, 2018
7a2b86a
move test parachains around a little
rphmeier Jul 20, 2018
78c0226
fix wasm build for basic_add
rphmeier Jul 20, 2018
18dfc62
move basic_add to adder, introduce README
rphmeier Jul 20, 2018
2bdcaf9
minimal basic_add collator
rphmeier Jul 23, 2018
9083847
ensure collator messages are sent in the right order
rphmeier Jul 23, 2018
c157c4c
more logging
rphmeier Jul 23, 2018
6b5f5ff
route consensus statements to all peers
rphmeier Jul 23, 2018
957f69e
minor bugfixes for parachains
rphmeier Jul 23, 2018
d9e1c77
genesis builder accounts for parachain heads
rphmeier Jul 23, 2018
53889d7
Merge remote-tracking branch 'upstream/master' into rh-simple-parachain
rphmeier Jul 24, 2018
d628c3d
fix parachains tests
rphmeier Jul 24, 2018
5653984
targets for txpool
rphmeier Jul 24, 2018
6888a5b
tweak runtime + collator
rphmeier Jul 25, 2018
beded4c
Merge remote-tracking branch 'upstream/master' into rh-simple-parachain
rphmeier Jul 26, 2018
ec68919
fix version in adder-collator
rphmeier Jul 27, 2018
5c633ea
Merge remote-tracking branch 'upstream/master' into rh-simple-parachain
rphmeier Jul 27, 2018
5625a81
consistency for overflowing
rphmeier Jul 27, 2018
b8e9dfc
Merge branch 'master' into rh-simple-parachain
gavofyork Jul 29, 2018
2e7d5c8
Merge remote-tracking branch 'upstream/master' into rh-simple-parachain
rphmeier Jul 30, 2018
55cbde1
Merge branch 'rh-simple-parachain' of github.com:paritytech/polkadot …
rphmeier Jul 30, 2018
1ebdd12
adjust comment
rphmeier Jul 30, 2018
65112b3
fix stable test run
rphmeier Jul 30, 2018
5e50c6a
remove dummy registration test
rphmeier Jul 30, 2018
b393ae9
final grumbles
rphmeier Jul 31, 2018
b1e3250
Merge remote-tracking branch 'upstream/master' into rh-simple-parachain
rphmeier Aug 1, 2018
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
more logging
  • Loading branch information
rphmeier committed Jul 23, 2018
commit c157c4c399fd9ad6070daeef3c5917dff9e129dd
5 changes: 5 additions & 0 deletions polkadot/consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,13 @@ impl<C, N, P> bft::Environment<Block> for ProposerFactory<C, N, P>
sign_with.public().into(),
)?;

info!("Starting consensus session on top of parent {:?}. Local parachain duty is {:?}",
parent_hash, local_duty.validation);

let active_parachains = self.client.active_parachains(&id)?;

debug!(target: "consensus", "Active parachains: {:?}", active_parachains);

let n_parachains = active_parachains.len();
let table = Arc::new(SharedTable::new(group_info, sign_with.clone(), parent_hash));
let (router, input, output) = self.network.communication_for(
Expand Down
21 changes: 16 additions & 5 deletions polkadot/network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,12 +478,15 @@ impl PolkadotProtocol {
}
};

debug!(target: "p_net", "New collator role {:?} from {}", role, peer_id);

match info.validator_key {
None => ctx.disable_peer(
peer_id,
"Sent collator role without registering first as validator",
),
Some(key) => for (relay_parent, collation) in self.local_collations.note_validator_role(key, role) {
debug!(target: "p_net", "Broadcasting collation on relay parent {:?}", relay_parent);
send_polkadot_message(
ctx,
peer_id,
Expand Down Expand Up @@ -651,6 +654,7 @@ impl PolkadotProtocol {
Some((ref acc_id, ref para_id)) => {
let structurally_valid = para_id == &collation_para && acc_id == &collated_acc;
if structurally_valid && collation.receipt.check_signature().is_ok() {
debug!(target: "p_net", "Received collation for parachain {:?} from peer {}", para_id, from);
self.collators.on_collation(acc_id.clone(), relay_parent, collation)
} else {
ctx.disable_peer(from, "Sent malformed collation")
Expand All @@ -662,6 +666,7 @@ impl PolkadotProtocol {

fn await_collation(&mut self, relay_parent: Hash, para_id: ParaId) -> oneshot::Receiver<Collation> {
let (tx, rx) = oneshot::channel();
debug!(target: "p_net", "Attempting to get collation for parachain {:?} on relay parent {:?}", para_id, relay_parent);
self.collators.await_collation(relay_parent, para_id, tx);
rx
}
Expand Down Expand Up @@ -697,13 +702,19 @@ impl PolkadotProtocol {
targets: HashSet<SessionKey>,
collation: Collation,
) {
debug!(target: "p_net", "Importing local collation on relay parent {:?} and parachain {:?}",
relay_parent, collation.receipt.parachain_index);

for (primary, cloned_collation) in self.local_collations.add_collation(relay_parent, targets, collation.clone()) {
match self.validators.get(&primary) {
Some(peer_id) => send_polkadot_message(
ctx,
*peer_id,
Message::Collation(relay_parent, cloned_collation),
),
Some(peer_id) => {
debug!(target: "p_net", "Sending local collation to {:?}", primary);
send_polkadot_message(
ctx,
*peer_id,
Message::Collation(relay_parent, cloned_collation),
)
},
None =>
warn!(target: "polkadot_network", "Encountered tracked but disconnected validator {:?}", primary),
}
Expand Down
1 change: 1 addition & 0 deletions polkadot/test-parachains/adder/collator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ impl ParachainContext for AdderContext {
let encoded_head = HeadData(next_head.encode());
let encoded_body = BlockData(next_body.encode());

println!("Created collation.");
db.insert(next_head.clone(), next_body);
Ok((encoded_body, encoded_head))
}
Expand Down