Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.8.7 #597

Merged
merged 10 commits into from
Jan 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
344 changes: 135 additions & 209 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ homepage = "https://darwinia.network/"
license = "GPL-3.0"
name = "darwinia"
repository = "https://github.com/darwinia-network/darwinia/"
version = "0.8.6"
version = "0.8.7"

[[bin]]
name = "darwinia"
Expand All @@ -23,11 +23,6 @@ parity-util-mem = { version = "*", default-features = false, features = ["jemall
darwinia-cli = { path = "cli" }
darwinia-service = { path = "node/service" }

[dev-dependencies]
assert_cmd = { version = "1.0.1" }
nix = { version = "0.19.0" }
tempfile = { version = "3.1.0" }

[features]
default = ["darwinia-cli/wasmtime"]
dev = [
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ homepage = "https://darwinia.network/"
license = "GPL-3.0"
name = "darwinia-cli"
repository = "https://github.com/darwinia-network/darwinia/"
version = "0.8.6"
version = "0.8.7"

[package.metadata.wasm-pack.profile.release]
# `wasm-opt` has some problems on linux, see
Expand Down
2 changes: 1 addition & 1 deletion node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ homepage = "https://darwinia.network/"
license = "GPL-3.0"
name = "darwinia-service"
repository = "https://github.com/darwinia-network/darwinia/"
version = "0.8.6"
version = "0.8.7"

[dependencies]
# crates
Expand Down
2 changes: 2 additions & 0 deletions node/service/src/chain_spec/darwinia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ pub fn darwinia_build_spec_genesis() -> GenesisConfig {
backed_ring: 90_403_994_952_547_849_178_882_078_u128 / COIN + 1,
backed_kton: 1_357_120_581_926_771_954_238_u128 / COIN + 1,
}),
darwinia_democracy: Some(Default::default()),
}
}

Expand Down Expand Up @@ -433,6 +434,7 @@ pub fn darwinia_testnet_genesis(
backed_ring: 1 << 56,
backed_kton: 1 << 56,
}),
darwinia_democracy: Some(Default::default()),
}
}

Expand Down
2 changes: 1 addition & 1 deletion primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ homepage = "https://darwinia.network/"
license = "GPL-3.0"
name = "darwinia-primitives"
repository = "https://github.com/darwinia-network/darwinia/"
version = "0.8.6"
version = "0.8.7"

[dependencies]
# crates
Expand Down
2 changes: 1 addition & 1 deletion rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ homepage = "https://darwinia.network/"
license = "GPL-3.0"
name = "darwinia-rpc"
repository = "https://github.com/darwinia-network/darwinia/"
version = "0.8.6"
version = "0.8.7"

[dependencies]
# crates
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ homepage = "https://darwinia.network/"
license = "GPL-3.0"
name = "darwinia-runtime-common"
repository = "https://github.com/darwinia-network/darwinia/"
version = "0.8.6"
version = "0.8.7"

[dependencies]
# crates
Expand Down
4 changes: 2 additions & 2 deletions runtime/crab/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ homepage = "https://darwinia.network/"
license = "GPL-3.0"
name = "crab-runtime"
repository = "https://github.com/darwinia-network/darwinia/"
version = "0.8.6"
version = "0.8.7"

[dependencies]
# crates
codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false, features = ["derive"] }
serde = { version = "1.0.118", optional = true }
smallvec = { version = "1.6.0" }
smallvec = { version = "1.6.1" }
static_assertions = { version = "1.1.0" }
# darwinia frame
darwinia-balances = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" }
Expand Down
33 changes: 23 additions & 10 deletions runtime/crab/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllModules,
// CustomOnRuntimeUpgrade,
CustomOnRuntimeUpgrade,
>;
/// The payload being signed in transactions.
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
Expand All @@ -137,7 +137,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("Crab"),
impl_name: create_runtime_str!("Darwinia Crab"),
authoring_version: 0,
spec_version: 31,
spec_version: 32,
impl_version: 0,
#[cfg(not(feature = "disable-runtime-api"))]
apis: RUNTIME_API_VERSIONS,
Expand Down Expand Up @@ -1315,12 +1315,25 @@ impl_runtime_apis! {
}
}

// pub struct CustomOnRuntimeUpgrade;
// impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
// fn on_runtime_upgrade() -> frame_support::weights::Weight {
// // --- substrate ---
// use frame_support::{migration::*, traits::Currency};
pub struct CustomOnRuntimeUpgrade;
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
// --- substrate ---
use frame_support::migration::*;

if let Some(term) = take_storage_value::<darwinia_relay_primitives::relay_authorities::Term>(
b"Instance0DarwiniaRelayAuthorities",
b"AuthorityTerm",
&[],
) {
put_storage_value(
b"Instance0DarwiniaRelayAuthorities",
b"AuthorityTerm",
&[],
term - 1,
);
}

// <Runtime as frame_system::Trait>::MaximumBlockWeight::get()
// }
// }
<Runtime as frame_system::Trait>::MaximumBlockWeight::get()
}
}
6 changes: 6 additions & 0 deletions runtime/crab/src/weights/darwinia_staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ impl<T: frame_system::Trait> darwinia_staking::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
}
fn rebond(l: u32, ) -> Weight {
(44_834_000 as Weight)
.saturating_add((103_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn set_history_depth(e: u32) -> Weight {
(0 as Weight)
.saturating_add((36_641_000 as Weight).saturating_mul(e as Weight))
Expand Down
6 changes: 4 additions & 2 deletions runtime/darwinia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ homepage = "https://darwinia.network/"
license = "GPL-3.0"
name = "darwinia-runtime"
repository = "https://github.com/darwinia-network/darwinia/"
version = "0.8.6"
version = "0.8.7"

[dependencies]
# crates
array-bytes = { version = "0.3.0" }
codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false, features = ["derive"] }
serde = { version = "1.0.118", optional = true }
serde_json = { version = "1.0.61", optional = true }
smallvec = { version = "1.6.0" }
smallvec = { version = "1.6.1" }
static_assertions = { version = "1.1.0" }
# darwinia frame
darwinia-balances = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" }
darwinia-balances-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" }
darwinia-crab-backing = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" }
darwinia-democracy = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" }
darwinia-elections-phragmen = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" }
darwinia-ethereum-backing = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" }
darwinia-ethereum-relay = { default-features = false, git = "https://github.com/darwinia-network/darwinia-common.git", branch = "master" }
Expand Down Expand Up @@ -95,6 +96,7 @@ std = [
"darwinia-balances/std",
"darwinia-balances-rpc-runtime-api/std",
"darwinia-crab-backing/std",
"darwinia-democracy/std",
"darwinia-elections-phragmen/std",
"darwinia-ethereum-backing/std",
"darwinia-ethereum-relay/std",
Expand Down
Loading