Unverified Commit f570356d authored by Gavin Wood's avatar Gavin Wood Committed by GitHub
Browse files

Bump Substrate & versions (#747)

* Bump versions

* Update for tipping treasury

* Bump substrate

* Fixes

* Put send_consensus back in.

* Fix test

* Fixes

* Fixes

* Fix warning
parent c003d73c
Pipeline #74125 passed with stages
in 21 minutes and 46 seconds
This diff is collapsed.
......@@ -4,7 +4,7 @@ path = "src/main.rs"
[package]
name = "polkadot"
version = "0.7.16"
version = "0.7.17"
authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs"
edition = "2018"
......
[package]
name = "polkadot-availability-store"
description = "Persistent database for parachain data"
version = "0.7.16"
version = "0.7.17"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
......
[package]
name = "polkadot-cli"
version = "0.7.16"
version = "0.7.17"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Polkadot node implementation in Rust."
edition = "2018"
......
[package]
name = "polkadot-collator"
version = "0.7.16"
version = "0.7.17"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Collator node implementation"
edition = "2018"
......
[package]
name = "polkadot-erasure-coding"
version = "0.7.16"
version = "0.7.17"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
......
[package]
name = "polkadot-network"
version = "0.7.16"
version = "0.7.17"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Polkadot-specific networking protocol"
edition = "2018"
......@@ -22,6 +22,7 @@ log = "0.4.8"
exit-future = "0.2.0"
sc-client = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
wasm-timer = "0.2.4"
[dev-dependencies]
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
......
......@@ -23,7 +23,8 @@ use sc_network::PeerId;
use futures::channel::oneshot;
use std::collections::hash_map::{HashMap, Entry};
use std::time::{Duration, Instant};
use std::time::Duration;
use wasm_timer::Instant;
const COLLATION_LIFETIME: Duration = Duration::from_secs(60 * 5);
......
......@@ -22,7 +22,8 @@
use polkadot_primitives::{Hash, parachain::{ValidatorId}};
use crate::collator_pool::Role;
use std::collections::{HashMap, HashSet};
use std::time::{Duration, Instant};
use std::time::Duration;
use wasm_timer::Instant;
const LIVE_FOR: Duration = Duration::from_secs(60 * 5);
......
......@@ -47,8 +47,8 @@ struct TestContext {
impl Context<Block> for TestContext {
fn report_peer(&mut self, peer: PeerId, reputation: ReputationChange) {
let reputation = self.reputations.get(&peer).map_or(reputation.value, |v| v + reputation.value);
self.reputations.insert(peer.clone(), reputation);
let reputation = self.reputations.get(&peer).map_or(reputation.value, |v| v + reputation.value);
self.reputations.insert(peer.clone(), reputation);
match reputation {
i if i < -100 => self.disabled.push(peer),
......@@ -57,6 +57,10 @@ impl Context<Block> for TestContext {
}
}
fn send_consensus(&mut self, _who: PeerId, _consensus: Vec<ConsensusMessage>) {
unimplemented!()
}
fn send_chain_specific(&mut self, who: PeerId, message: Vec<u8>) {
self.messages.push((who, message))
}
......
[package]
name = "polkadot-parachain"
version = "0.7.16"
version = "0.7.17"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Types and utilities for creating and working with parachains"
edition = "2018"
......
......@@ -160,6 +160,7 @@ pub fn validate_candidate_internal<E: Externalities + 'static>(
validation_code,
// TODO: Make sure we don't use more than 1GB: https://github.com/paritytech/polkadot/issues/699
1024,
false,
)?;
ValidationResult::decode(&mut &res[..]).map_err(|_| Error::BadReturn.into())
......
[package]
name = "polkadot-primitives"
version = "0.7.16"
version = "0.7.17"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
......
[package]
name = "polkadot-rpc"
version = "0.7.16"
version = "0.7.17"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
......
[package]
name = "polkadot-runtime-common"
version = "0.7.16"
version = "0.7.17"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
......
......@@ -501,12 +501,13 @@ mod tests {
use std::{collections::HashMap, cell::RefCell};
use frame_support::{impl_outer_origin, assert_ok, assert_noop, parameter_types};
use frame_support::traits::Contains;
use sp_core::H256;
use primitives::parachain::{Info as ParaInfo, Id as ParaId};
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are requried.
use sp_runtime::{
Perbill, Permill, testing::Header, DispatchResult,
Perbill, Permill, Percent, testing::Header, DispatchResult,
traits::{BlakeTwo256, OnInitialize, OnFinalize, IdentityLookup},
};
use crate::registrar::Registrar;
......@@ -568,6 +569,15 @@ mod tests {
pub const ProposalBondMinimum: u64 = 1;
pub const SpendPeriod: u64 = 2;
pub const Burn: Permill = Permill::from_percent(50);
pub const TipCountdown: u64 = 1;
pub const TipFindersFee: Percent = Percent::from_percent(20);
pub const TipReportDepositBase: u64 = 1;
pub const TipReportDepositPerByte: u64 = 1;
}
pub struct Nobody;
impl Contains<u64> for Nobody {
fn contains(_: &u64) -> bool { false }
fn sorted_members() -> Vec<u64> { vec![] }
}
impl treasury::Trait for Test {
type Currency = balances::Module<Test>;
......@@ -579,6 +589,11 @@ mod tests {
type ProposalBondMinimum = ProposalBondMinimum;
type SpendPeriod = SpendPeriod;
type Burn = Burn;
type Tippers = Nobody;
type TipCountdown = TipCountdown;
type TipFindersFee = TipFindersFee;
type TipReportDepositBase = TipReportDepositBase;
type TipReportDepositPerByte = TipReportDepositPerByte;
}
thread_local! {
......
[package]
name = "kusama-runtime"
version = "0.7.16"
version = "0.7.17"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
build = "build.rs"
......
......@@ -35,7 +35,7 @@ use runtime_common::{attestations, claims, parachains, registrar, slots,
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
ApplyExtrinsicResult, Permill, Perbill, RuntimeDebug,
ApplyExtrinsicResult, Percent, Permill, Perbill, RuntimeDebug,
transaction_validity::{TransactionValidity, InvalidTransaction, TransactionValidityError},
curve::PiecewiseLinear,
traits::{BlakeTwo256, Block as BlockT, StaticLookup, SignedExtension, OpaqueKeys},
......@@ -77,8 +77,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("kusama"),
impl_name: create_runtime_str!("parity-kusama"),
authoring_version: 2,
spec_version: 1037,
impl_version: 2,
spec_version: 1038,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
};
......@@ -387,6 +387,11 @@ parameter_types! {
pub const ProposalBondMinimum: Balance = 20 * DOLLARS;
pub const SpendPeriod: BlockNumber = 6 * DAYS;
pub const Burn: Permill = Permill::from_percent(0);
pub const TipCountdown: BlockNumber = 1 * DAYS;
pub const TipFindersFee: Percent = Percent::from_percent(20);
pub const TipReportDepositBase: Balance = 1 * DOLLARS;
pub const TipReportDepositPerByte: Balance = 1 * CENTS;
}
impl treasury::Trait for Runtime {
......@@ -399,6 +404,11 @@ impl treasury::Trait for Runtime {
type ProposalBondMinimum = ProposalBondMinimum;
type SpendPeriod = SpendPeriod;
type Burn = Burn;
type Tippers = ElectionsPhragmen;
type TipCountdown = TipCountdown;
type TipFindersFee = TipFindersFee;
type TipReportDepositBase = TipReportDepositBase;
type TipReportDepositPerByte = TipReportDepositPerByte;
}
impl offences::Trait for Runtime {
......
[package]
name = "polkadot-runtime"
version = "0.7.16"
version = "0.7.17"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
build = "build.rs"
......
......@@ -35,7 +35,7 @@ use primitives::{
};
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
ApplyExtrinsicResult, Permill, Perbill, RuntimeDebug,
ApplyExtrinsicResult, Percent, Permill, Perbill, RuntimeDebug,
transaction_validity::{TransactionValidity, InvalidTransaction, TransactionValidityError},
curve::PiecewiseLinear,
traits::{BlakeTwo256, Block as BlockT, StaticLookup, SignedExtension, OpaqueKeys},
......@@ -391,6 +391,11 @@ parameter_types! {
pub const ProposalBondMinimum: Balance = 100 * DOLLARS;
pub const SpendPeriod: BlockNumber = 24 * DAYS;
pub const Burn: Permill = Permill::from_percent(1);
pub const TipCountdown: BlockNumber = 1 * DAYS;
pub const TipFindersFee: Percent = Percent::from_percent(20);
pub const TipReportDepositBase: Balance = 1 * DOLLARS;
pub const TipReportDepositPerByte: Balance = 1 * CENTS;
}
impl treasury::Trait for Runtime {
......@@ -403,6 +408,11 @@ impl treasury::Trait for Runtime {
type ProposalBondMinimum = ProposalBondMinimum;
type SpendPeriod = SpendPeriod;
type Burn = Burn;
type Tippers = ElectionsPhragmen;
type TipCountdown = TipCountdown;
type TipFindersFee = TipFindersFee;
type TipReportDepositBase = TipReportDepositBase;
type TipReportDepositPerByte = TipReportDepositPerByte;
}
impl offences::Trait for Runtime {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment