Bump versions, tweak deposit costs. (#1252)

* Bump versions, tweak deposit costs.

* Version

* Lock

* Make test work ok when numbers are not round.

* Bump Substrate

* Lock
This commit is contained in:
Gavin Wood
2020-06-12 16:08:31 +02:00
committed by GitHub
parent d7e17fc612
commit 4317d1b980
27 changed files with 210 additions and 194 deletions
+156 -156
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -4,7 +4,7 @@ path = "src/main.rs"
[package] [package]
name = "polkadot" name = "polkadot"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,7 +1,7 @@
[package] [package]
name = "polkadot-availability-store" name = "polkadot-availability-store"
description = "Persistent database for parachain data" description = "Persistent database for parachain data"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-cli" name = "polkadot-cli"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Polkadot Relay-chain Client Node" description = "Polkadot Relay-chain Client Node"
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-collator" name = "polkadot-collator"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Collator node implementation" description = "Collator node implementation"
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-erasure-coding" name = "polkadot-erasure-coding"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-network" name = "polkadot-network"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Polkadot-specific networking protocol" description = "Polkadot-specific networking protocol"
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-network-test" name = "polkadot-network-test"
version = "0.8.7" version = "0.8.8-dev"
license = "GPL-3.0" license = "GPL-3.0"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-parachain" name = "polkadot-parachain"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Types and utilities for creating and working with parachains" description = "Types and utilities for creating and working with parachains"
edition = "2018" edition = "2018"
@@ -1,6 +1,6 @@
[package] [package]
name = "test-parachain-adder" name = "test-parachain-adder"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Test parachain which adds to a number as its state transition" description = "Test parachain which adds to a number as its state transition"
edition = "2018" edition = "2018"
@@ -1,6 +1,6 @@
[package] [package]
name = "test-parachain-halt" name = "test-parachain-halt"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
description = "Test parachain which executes forever" description = "Test parachain which executes forever"
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-primitives" name = "polkadot-primitives"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-rpc" name = "polkadot-rpc"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-runtime-common" name = "polkadot-runtime-common"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "kusama-runtime" name = "kusama-runtime"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
+9 -5
View File
@@ -19,12 +19,12 @@ pub mod currency {
use primitives::Balance; use primitives::Balance;
pub const DOTS: Balance = 1_000_000_000_000; pub const DOTS: Balance = 1_000_000_000_000;
pub const DOLLARS: Balance = DOTS; pub const DOLLARS: Balance = DOTS / 6;
pub const CENTS: Balance = DOLLARS / 100; pub const CENTS: Balance = DOLLARS / 100;
pub const MILLICENTS: Balance = CENTS / 1_000; pub const MILLICENTS: Balance = CENTS / 1_000;
pub const fn deposit(items: u32, bytes: u32) -> Balance { pub const fn deposit(items: u32, bytes: u32) -> Balance {
items as Balance * 15 * CENTS + (bytes as Balance) * 6 * CENTS items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS
} }
} }
@@ -97,14 +97,16 @@ mod tests {
use frame_support::weights::WeightToFeePolynomial; use frame_support::weights::WeightToFeePolynomial;
use runtime_common::{MaximumBlockWeight, ExtrinsicBaseWeight}; use runtime_common::{MaximumBlockWeight, ExtrinsicBaseWeight};
use super::fee::WeightToFee; use super::fee::WeightToFee;
use super::currency::{CENTS, DOLLARS}; use super::currency::{CENTS, DOLLARS, MILLICENTS};
#[test] #[test]
// This function tests that the fee for `MaximumBlockWeight` of weight is correct // This function tests that the fee for `MaximumBlockWeight` of weight is correct
fn full_block_fee_is_correct() { fn full_block_fee_is_correct() {
// A full block should cost 16 DOLLARS // A full block should cost 16 DOLLARS
println!("Base: {}", ExtrinsicBaseWeight::get()); println!("Base: {}", ExtrinsicBaseWeight::get());
assert_eq!(WeightToFee::calc(&MaximumBlockWeight::get()), 16 * DOLLARS) let x = WeightToFee::calc(&MaximumBlockWeight::get());
let y = 16 * DOLLARS;
assert!(x.max(y) - x.min(y) < MILLICENTS);
} }
#[test] #[test]
@@ -112,6 +114,8 @@ mod tests {
fn extrinsic_base_fee_is_correct() { fn extrinsic_base_fee_is_correct() {
// `ExtrinsicBaseWeight` should cost 1/10 of a CENT // `ExtrinsicBaseWeight` should cost 1/10 of a CENT
println!("Base: {}", ExtrinsicBaseWeight::get()); println!("Base: {}", ExtrinsicBaseWeight::get());
assert_eq!(WeightToFee::calc(&ExtrinsicBaseWeight::get()), CENTS / 10) let x = WeightToFee::calc(&ExtrinsicBaseWeight::get());
let y = CENTS / 10;
assert!(x.max(y) - x.min(y) < MILLICENTS);
} }
} }
+1 -1
View File
@@ -85,7 +85,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("kusama"), spec_name: create_runtime_str!("kusama"),
impl_name: create_runtime_str!("parity-kusama"), impl_name: create_runtime_str!("parity-kusama"),
authoring_version: 2, authoring_version: 2,
spec_version: 2007, spec_version: 2008,
impl_version: 0, impl_version: 0,
apis: RUNTIME_API_VERSIONS, apis: RUNTIME_API_VERSIONS,
transaction_version: 1, transaction_version: 1,
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-runtime" name = "polkadot-runtime"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
+11 -5
View File
@@ -24,7 +24,7 @@ pub mod currency {
pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000 pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000
pub const fn deposit(items: u32, bytes: u32) -> Balance { pub const fn deposit(items: u32, bytes: u32) -> Balance {
items as Balance * 15 * CENTS + (bytes as Balance) * 6 * CENTS items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS
} }
} }
@@ -86,22 +86,28 @@ pub mod fee {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use frame_support::weights::WeightToFeePolynomial;
use runtime_common::{MaximumBlockWeight, ExtrinsicBaseWeight}; use runtime_common::{MaximumBlockWeight, ExtrinsicBaseWeight};
use super::fee::WeightToFee; use super::fee::WeightToFee;
use super::currency::{CENTS, DOLLARS}; use super::currency::{CENTS, DOLLARS, MILLICENTS};
use frame_support::weights::WeightToFeePolynomial;
#[test] #[test]
// This function tests that the fee for `MaximumBlockWeight` of weight is correct // This function tests that the fee for `MaximumBlockWeight` of weight is correct
fn full_block_fee_is_correct() { fn full_block_fee_is_correct() {
// A full block should cost 16 DOLLARS // A full block should cost 16 DOLLARS
assert_eq!(WeightToFee::calc(&MaximumBlockWeight::get()), 16 * DOLLARS) println!("Base: {}", ExtrinsicBaseWeight::get());
let x = WeightToFee::calc(&MaximumBlockWeight::get());
let y = 16 * DOLLARS;
assert!(x.max(y) - x.min(y) < MILLICENTS);
} }
#[test] #[test]
// This function tests that the fee for `ExtrinsicBaseWeight` of weight is correct // This function tests that the fee for `ExtrinsicBaseWeight` of weight is correct
fn extrinsic_base_fee_is_correct() { fn extrinsic_base_fee_is_correct() {
// `ExtrinsicBaseWeight` should cost 1/10 of a CENT // `ExtrinsicBaseWeight` should cost 1/10 of a CENT
assert_eq!(WeightToFee::calc(&ExtrinsicBaseWeight::get()), CENTS / 10) println!("Base: {}", ExtrinsicBaseWeight::get());
let x = WeightToFee::calc(&ExtrinsicBaseWeight::get());
let y = CENTS / 10;
assert!(x.max(y) - x.min(y) < MILLICENTS);
} }
} }
+1 -1
View File
@@ -90,7 +90,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("polkadot"), spec_name: create_runtime_str!("polkadot"),
impl_name: create_runtime_str!("parity-polkadot"), impl_name: create_runtime_str!("parity-polkadot"),
authoring_version: 0, authoring_version: 0,
spec_version: 7, spec_version: 8,
impl_version: 0, impl_version: 0,
apis: RUNTIME_API_VERSIONS, apis: RUNTIME_API_VERSIONS,
transaction_version: 0, transaction_version: 0,
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-test-runtime" name = "polkadot-test-runtime"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "westend-runtime" name = "westend-runtime"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
build = "build.rs" build = "build.rs"
+11 -5
View File
@@ -24,7 +24,7 @@ pub mod currency {
pub const MILLICENTS: Balance = CENTS / 1_000; pub const MILLICENTS: Balance = CENTS / 1_000;
pub const fn deposit(items: u32, bytes: u32) -> Balance { pub const fn deposit(items: u32, bytes: u32) -> Balance {
items as Balance * 15 * CENTS + (bytes as Balance) * 6 * CENTS items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS
} }
} }
@@ -86,22 +86,28 @@ pub mod fee {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use frame_support::weights::WeightToFeePolynomial;
use runtime_common::{MaximumBlockWeight, ExtrinsicBaseWeight}; use runtime_common::{MaximumBlockWeight, ExtrinsicBaseWeight};
use super::fee::WeightToFee; use super::fee::WeightToFee;
use super::currency::{CENTS, DOLLARS}; use super::currency::{CENTS, DOLLARS, MILLICENTS};
use frame_support::weights::WeightToFeePolynomial;
#[test] #[test]
// This function tests that the fee for `MaximumBlockWeight` of weight is correct // This function tests that the fee for `MaximumBlockWeight` of weight is correct
fn full_block_fee_is_correct() { fn full_block_fee_is_correct() {
// A full block should cost 16 DOLLARS // A full block should cost 16 DOLLARS
assert_eq!(WeightToFee::calc(&MaximumBlockWeight::get()), 16 * DOLLARS) println!("Base: {}", ExtrinsicBaseWeight::get());
let x = WeightToFee::calc(&MaximumBlockWeight::get());
let y = 16 * DOLLARS;
assert!(x.max(y) - x.min(y) < MILLICENTS);
} }
#[test] #[test]
// This function tests that the fee for `ExtrinsicBaseWeight` of weight is correct // This function tests that the fee for `ExtrinsicBaseWeight` of weight is correct
fn extrinsic_base_fee_is_correct() { fn extrinsic_base_fee_is_correct() {
// `ExtrinsicBaseWeight` should cost 1/10 of a CENT // `ExtrinsicBaseWeight` should cost 1/10 of a CENT
assert_eq!(WeightToFee::calc(&ExtrinsicBaseWeight::get()), CENTS / 10) println!("Base: {}", ExtrinsicBaseWeight::get());
let x = WeightToFee::calc(&ExtrinsicBaseWeight::get());
let y = CENTS / 10;
assert!(x.max(y) - x.min(y) < MILLICENTS);
} }
} }
+1 -1
View File
@@ -82,7 +82,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("westend"), spec_name: create_runtime_str!("westend"),
impl_name: create_runtime_str!("parity-westend"), impl_name: create_runtime_str!("parity-westend"),
authoring_version: 2, authoring_version: 2,
spec_version: 27, spec_version: 28,
impl_version: 0, impl_version: 0,
apis: RUNTIME_API_VERSIONS, apis: RUNTIME_API_VERSIONS,
transaction_version: 1, transaction_version: 1,
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-service" name = "polkadot-service"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-statement-table" name = "polkadot-statement-table"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "polkadot-validation" name = "polkadot-validation"
version = "0.8.7" version = "0.8.8-dev"
authors = ["Parity Technologies <admin@parity.io>"] authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018" edition = "2018"