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
53 commits
Select commit Hold shift + click to select a range
265add0
Rebuild runtime
gavofyork Dec 22, 2018
e589358
Remove invalid value from chainspec (#68)
gavofyork Jan 9, 2019
2024df8
service: use grandpa block import for locally sealed aura blocks (#85)
andresilva Jan 16, 2019
6112021
bump version to v0.3.1
andresilva Jan 17, 2019
29020a4
Merge branch 'v0.3' of github.com:paritytech/polkadot into v0.3
gavofyork Jan 18, 2019
fada3aa
Merge branch 'master' into v0.3
gavofyork Jan 18, 2019
dde0b5e
Update lock file.
gavofyork Jan 18, 2019
a35186d
limit number of transactions when building blocks (#91)
rphmeier Jan 18, 2019
4c7fe32
Update to latest Substrate
gavofyork Jan 18, 2019
8e0b074
Bump to 0.3.2
gavofyork Jan 18, 2019
b328153
Actually bump.
gavofyork Jan 18, 2019
b28ff9e
v0.3.2 (#98)
rphmeier Jan 21, 2019
a6f647a
point to alexander-backports of substrate
rphmeier Jan 23, 2019
3a88e24
bump version
rphmeier Jan 23, 2019
e837443
cli: fix node shutdown (#100)
andresilva Jan 22, 2019
b80733a
update to latest substrate, change to v0.3.4
rphmeier Jan 23, 2019
afbfee4
update to latest substrate, bump version to 0.3.5
andresilva Jan 25, 2019
d77698b
v0.3.6
rphmeier Jan 25, 2019
628ad2f
try to build on every v0.3 commit and update alexander-backports
rphmeier Jan 27, 2019
ab5d7ba
bump to v0.3.7
rphmeier Jan 31, 2019
c082b6b
bump to 0.3.8
rphmeier Jan 31, 2019
a9d2048
Bump to 0.3.9: network and pruning improvements
rphmeier Feb 1, 2019
cfa0d43
Bump to 0.3.10: reduce network bandwidth usage
andresilva Feb 6, 2019
0f12e0c
Use libp2p-kad 0.3.2 (#122)
tomaka Feb 6, 2019
ef8343e
Bump libp2p-identify to 0.3.1 (#123)
tomaka Feb 7, 2019
fe96cda
Bump to 0.3.12 (#127)
tomaka Feb 7, 2019
dae7c67
Update Substrate again (#128)
tomaka Feb 7, 2019
f94368b
update substrate and bump version to v0.3.13
andresilva Feb 11, 2019
2a5e8fc
bump version to v0.3.14: fix --reserved-nodes
andresilva Feb 11, 2019
05a7b52
add a manually curated grandpa module (#136)
rphmeier Feb 13, 2019
461ea31
updating v0.3 to use substrate v0.10 (#146)
gterzian Feb 25, 2019
c03d1cd
config: fix wrong ip for alexander bootnode (#161)
andresilva Feb 26, 2019
2dd861f
fix curated-grandpa and rebuild wasm (#162)
rphmeier Feb 26, 2019
8b07458
[v0.3] Integrates new gossip system into Polkadot (#166)
rphmeier Mar 4, 2019
3f23eb8
network: guard validation network future under exit signal (#168)
andresilva Mar 4, 2019
6d48897
bump version to v0.3.15: substrate v0.10
andresilva Mar 4, 2019
849b04b
[v0.3] update to substrate master (#175)
rphmeier Mar 13, 2019
fcf98ae
service: fix telemetry endpoints on alexander chainspec (#169) (#178)
andresilva Mar 19, 2019
b64e3cc
Update v0.3 to latest Substrate master (#177)
rphmeier Mar 20, 2019
a01bb1a
replace sr25519 accountid with anysigner
rphmeier Mar 20, 2019
e1b97b2
bump version to v0.3.17
andresilva Mar 20, 2019
4501a48
Some PoC-3 GRANDPA tweaks (#181)
rphmeier Mar 22, 2019
001f9aa
use authorities when calculating duty roster (#185)
rphmeier Mar 22, 2019
7296ba6
[v0.3] Update to substrate master (#183)
andresilva Mar 22, 2019
37bf8b4
update to substrate master: bump version to v0.3.19 (#188)
andresilva Mar 25, 2019
06fe5cc
polkadot v0.3.20 (#190)
andresilva Mar 26, 2019
d854250
bump spec version (#191)
andresilva Mar 26, 2019
71d9c0c
Merge remote-tracking branch 'origin/v0.3' into update-substrate
bkchr Mar 27, 2019
82e156a
Fix compilation
bkchr Mar 27, 2019
e3e599a
Update version to 0.4.0
bkchr Mar 28, 2019
7ed879e
Switch to use `polkadot-master` branch from substrate
bkchr Mar 28, 2019
2e6ea76
Remove unused struct
bkchr Mar 28, 2019
14751a7
Remove `grandpa::SyncedAuthorities` from `OnSessionChange`
bkchr Mar 28, 2019
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
Update v0.3 to latest Substrate master (#177)
* update substrate v0.3 to latest master

* bump spec version

* update to latest master: remove fees module

* update runtime blobs

* bump version to 0.3.16
  • Loading branch information
rphmeier authored and andresilva committed Mar 20, 2019
commit b64e3ccc7875c15c6ce71f7b1c6679abb933673d
1,550 changes: 780 additions & 770 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ path = "src/main.rs"

[package]
name = "polkadot"
version = "0.3.15"
version = "0.3.16"
authors = ["Parity Technologies <[email protected]>"]
build = "build.rs"

Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polkadot-cli"
version = "0.3.15"
version = "0.3.16"
authors = ["Parity Technologies <[email protected]>"]
description = "Polkadot node implementation in Rust."

Expand Down
13 changes: 4 additions & 9 deletions collator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ use std::time::Duration;

use futures::{future, stream, Stream, Future, IntoFuture};
use client::BlockchainEvents;
use primitives::ed25519;
use polkadot_primitives::{AccountId, BlockId, SessionKey};
use primitives::{ed25519, Pair};
use polkadot_primitives::{BlockId, SessionKey};
use polkadot_primitives::parachain::{self, BlockData, DutyRoster, HeadData, ConsolidatedIngress, Message, Id as ParaId};
use polkadot_cli::{PolkadotService, CustomConfiguration, CoreApi, ParachainHost};
use polkadot_cli::{Worker, IntoExit, ProvideRuntimeApi};
Expand Down Expand Up @@ -127,11 +127,6 @@ pub trait RelayChainContext {
fn unrouted_egress(&self, id: ParaId) -> Self::FutureEgress;
}

fn key_to_account_id(key: &ed25519::Pair) -> AccountId {
let pubkey_bytes: [u8; 32] = key.public().into();
pubkey_bytes.into()
}

/// Collate the necessary ingress queue using the given context.
pub fn collate_ingress<'a, R>(relay_context: R)
-> impl Future<Item=ConsolidatedIngress, Error=R::Error> + 'a
Expand Down Expand Up @@ -195,7 +190,7 @@ pub fn collate<'a, R, P>(

let receipt = parachain::CandidateReceipt {
parachain_index: local_id,
collator: key_to_account_id(&*key),
collator: key.public(),
signature,
head_data,
balance_uploads: Vec::new(),
Expand Down Expand Up @@ -253,7 +248,7 @@ impl<P, E> Worker for CollationNode<P, E> where
fn configuration(&self) -> CustomConfiguration {
let mut config = CustomConfiguration::default();
config.collating_for = Some((
key_to_account_id(&*self.key),
self.key.public(),
self.para_id.clone(),
));
config
Expand Down
6 changes: 3 additions & 3 deletions consensus/src/collation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

use std::sync::Arc;

use polkadot_primitives::{Block, Hash, AccountId, BlockId};
use polkadot_primitives::parachain::{Id as ParaId, Collation, Extrinsic};
use polkadot_primitives::{Block, Hash, BlockId};
use polkadot_primitives::parachain::{Id as ParaId, Collation, Extrinsic, CollatorId};
use polkadot_primitives::parachain::ParachainHost;
use runtime_primitives::traits::ProvideRuntimeApi;

Expand All @@ -47,7 +47,7 @@ pub trait Collators: Clone {
fn collate(&self, parachain: ParaId, relay_parent: Hash) -> Self::Collation;

/// Note a bad collator. TODO: take proof
fn note_bad_collator(&self, collator: AccountId);
fn note_bad_collator(&self, collator: CollatorId);
}

/// A future which resolves when a collation is available.
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

//! Errors that can occur during the consensus process.

use primitives::Ed25519AuthorityId as AuthorityId;
use primitives::ed25519::Public as AuthorityId;
use runtime_primitives::RuntimeString;

error_chain! {
Expand Down
18 changes: 9 additions & 9 deletions consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ use parking_lot::Mutex;
use polkadot_primitives::{
Hash, Block, BlockId, BlockNumber, Header, SessionKey
};
use polkadot_primitives::parachain::{Id as ParaId, Chain, DutyRoster, BlockData, Extrinsic as ParachainExtrinsic, CandidateReceipt, CandidateSignature};
use polkadot_primitives::parachain::{Id as ParaId, Chain, DutyRoster, BlockData, Extrinsic as ParachainExtrinsic, CandidateReceipt, CollatorSignature};
use polkadot_primitives::parachain::{AttestedCandidate, ParachainHost, Statement as PrimitiveStatement};
use primitives::{Ed25519AuthorityId as AuthorityId, ed25519};
use primitives::{Pair, ed25519::{self, Public as AuthorityId}};
use runtime_primitives::traits::ProvideRuntimeApi;
use tokio::runtime::TaskExecutor;
use tokio::timer::{Delay, Interval};
Expand Down Expand Up @@ -163,7 +163,7 @@ pub struct GroupInfo {
/// Sign a table statement against a parent hash.
/// The actual message signed is the encoded statement concatenated with the
/// parent hash.
pub fn sign_table_statement(statement: &Statement, key: &ed25519::Pair, parent_hash: &Hash) -> CandidateSignature {
pub fn sign_table_statement(statement: &Statement, key: &ed25519::Pair, parent_hash: &Hash) -> CollatorSignature {
// we sign using the primitive statement type because that's what the runtime
// expects. These types probably encode the same way so this clone could be optimized
// out in the future.
Expand All @@ -174,7 +174,7 @@ pub fn sign_table_statement(statement: &Statement, key: &ed25519::Pair, parent_h
}

/// Check signature on table statement.
pub fn check_statement(statement: &Statement, signature: &CandidateSignature, signer: SessionKey, parent_hash: &Hash) -> bool {
pub fn check_statement(statement: &Statement, signature: &CollatorSignature, signer: SessionKey, parent_hash: &Hash) -> bool {
use runtime_primitives::traits::Verify;

let mut encoded = PrimitiveStatement::from(statement.clone()).encode();
Expand Down Expand Up @@ -756,17 +756,17 @@ impl<C, TxApi> Future for CreateProposal<C, TxApi> where
#[cfg(test)]
mod tests {
use super::*;
use substrate_keyring::Keyring;
use substrate_keyring::AuthorityKeyring;

#[test]
fn sign_and_check_statement() {
let statement: Statement = GenericStatement::Valid([1; 32].into());
let parent_hash = [2; 32].into();

let sig = sign_table_statement(&statement, &Keyring::Alice.pair(), &parent_hash);
let sig = sign_table_statement(&statement, &AuthorityKeyring::Alice.pair(), &parent_hash);

assert!(check_statement(&statement, &sig, Keyring::Alice.to_raw_public().into(), &parent_hash));
assert!(!check_statement(&statement, &sig, Keyring::Alice.to_raw_public().into(), &[0xff; 32].into()));
assert!(!check_statement(&statement, &sig, Keyring::Bob.to_raw_public().into(), &parent_hash));
assert!(check_statement(&statement, &sig, AuthorityKeyring::Alice.into(), &parent_hash));
assert!(!check_statement(&statement, &sig, AuthorityKeyring::Alice.into(), &[0xff; 32].into()));
assert!(!check_statement(&statement, &sig, AuthorityKeyring::Bob.into(), &parent_hash));
}
}
39 changes: 21 additions & 18 deletions consensus/src/shared_table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use futures::{future, prelude::*};

use super::{GroupInfo, TableRouter};
use self::includable::IncludabilitySender;
use primitives::ed25519;
use primitives::{ed25519, Pair};

mod includable;

Expand Down Expand Up @@ -500,7 +500,8 @@ impl SharedTable {
#[cfg(test)]
mod tests {
use super::*;
use substrate_keyring::Keyring;
use substrate_keyring::AuthorityKeyring;
use primitives::crypto::UncheckedInto;

#[derive(Clone)]
struct DummyRouter;
Expand All @@ -525,15 +526,16 @@ mod tests {
let mut groups = HashMap::new();

let para_id = ParaId::from(1);
let local_id = Keyring::Alice.to_raw_public().into();
let local_key = Arc::new(Keyring::Alice.pair());

let validity_other = Keyring::Bob.to_raw_public().into();
let validity_other_key = Keyring::Bob.pair();
let parent_hash = Default::default();

let local_key = Arc::new(AuthorityKeyring::Alice.pair());
let local_id = local_key.public();

let validity_other_key = AuthorityKeyring::Bob.pair();
let validity_other = validity_other_key.public();

groups.insert(para_id, GroupInfo {
validity_guarantors: [local_id, validity_other].iter().cloned().collect(),
validity_guarantors: [local_id, validity_other.clone()].iter().cloned().collect(),
availability_guarantors: Default::default(),
needed_validity: 2,
needed_availability: 0,
Expand All @@ -548,7 +550,7 @@ mod tests {

let candidate = CandidateReceipt {
parachain_index: para_id,
collator: [1; 32].into(),
collator: [1; 32].unchecked_into(),
signature: Default::default(),
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
balance_uploads: Vec::new(),
Expand Down Expand Up @@ -580,15 +582,16 @@ mod tests {
let mut groups = HashMap::new();

let para_id = ParaId::from(1);
let local_id = Keyring::Alice.to_raw_public().into();
let local_key = Arc::new(Keyring::Alice.pair());

let validity_other = Keyring::Bob.to_raw_public().into();
let validity_other_key = Keyring::Bob.pair();
let parent_hash = Default::default();

let local_key = Arc::new(AuthorityKeyring::Alice.pair());
let local_id = local_key.public();

let validity_other_key = AuthorityKeyring::Bob.pair();
let validity_other = validity_other_key.public();

groups.insert(para_id, GroupInfo {
validity_guarantors: [validity_other].iter().cloned().collect(),
validity_guarantors: [validity_other.clone()].iter().cloned().collect(),
availability_guarantors: [local_id].iter().cloned().collect(),
needed_validity: 1,
needed_availability: 1,
Expand All @@ -603,7 +606,7 @@ mod tests {

let candidate = CandidateReceipt {
parachain_index: para_id,
collator: [1; 32].into(),
collator: [1; 32].unchecked_into(),
signature: Default::default(),
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
balance_uploads: Vec::new(),
Expand Down Expand Up @@ -640,7 +643,7 @@ mod tests {

let candidate = CandidateReceipt {
parachain_index: para_id,
collator: [1; 32].into(),
collator: [1; 32].unchecked_into(),
signature: Default::default(),
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
balance_uploads: Vec::new(),
Expand Down Expand Up @@ -684,7 +687,7 @@ mod tests {

let candidate = CandidateReceipt {
parachain_index: para_id,
collator: [1; 32].into(),
collator: [1; 32].unchecked_into(),
signature: Default::default(),
head_data: ::polkadot_primitives::parachain::HeadData(vec![1, 2, 3, 4]),
balance_uploads: Vec::new(),
Expand Down
Loading