Skip to content

Commit

Permalink
Merge tag '1.5.0' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
weichweich committed Mar 10, 2022
2 parents b84dbda + e7f07c2 commit 2481221
Show file tree
Hide file tree
Showing 23 changed files with 56 additions and 54 deletions.
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nodes/parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build = "build.rs"
description = "KILT parachain"
edition = "2021"
name = "kilt-parachain"
version = "1.4.1"
version = "1.5.0"

[[bin]]
name = "kilt-parachain"
Expand Down
2 changes: 1 addition & 1 deletion nodes/standalone/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["KILT <info@kilt.io>"]
build = "build.rs"
edition = "2021"
name = "mashnet-node"
version = "1.4.1"
version = "1.5.0"

[[bin]]
name = "mashnet-node"
Expand Down
2 changes: 1 addition & 1 deletion pallets/attestation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Enables adding and revoking attestations."
edition = "2021"
name = "attestation"
repository = "https://github.com/KILTprotocol/mashnet-node"
version = "1.4.1"
version = "1.5.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 1 addition & 1 deletion pallets/ctype/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Enables adding CTypes."
edition = "2021"
name = "ctype"
repository = "https://github.com/KILTprotocol/mashnet-node"
version = "1.4.1"
version = "1.5.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 1 addition & 1 deletion pallets/delegation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Enables creating and revoking root nodes of delegation hierarchie
edition = "2021"
name = "delegation"
repository = "https://github.com/KILTprotocol/mashnet-node"
version = "1.4.1"
version = "1.5.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
17 changes: 9 additions & 8 deletions pallets/delegation/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub mod v3 {
use frame_support::{
generate_storage_alias,
pallet_prelude::Weight,
traits::{Get, OnRuntimeUpgrade, PalletInfoAccess},
traits::{Get, OnRuntimeUpgrade, PalletInfoAccess, StorageVersion as NewStorageVersion},
};
use log::info;
use sp_std::marker::PhantomData;
Expand All @@ -66,12 +66,6 @@ pub mod v3 {
fn pre_upgrade() -> Result<(), &'static str> {
assert!(StorageVersion::get() == Some(DelegationStorageVersion::V2));

// no migration needed
assert!(
Pallet::<T>::current_storage_version() == 3,
"New StorageVersion should be set via pallet macro already"
);

info!("👥 Delegation pallet to v3 passes PRE migrate checks ✅",);
Ok(())
}
Expand All @@ -80,8 +74,10 @@ pub mod v3 {
// remove deprecated storage versioning entry
frame_support::migration::remove_storage_prefix(Pallet::<T>::name().as_bytes(), b"StorageVersion", &[]);

NewStorageVersion::new(3).put::<Pallet<T>>();

info!("👥 completed Delegation pallet migration to v3 ✅",);
T::DbWeight::get().reads_writes(0, 1)
T::DbWeight::get().reads_writes(0, 2)
}

#[cfg(feature = "try-runtime")]
Expand All @@ -91,6 +87,11 @@ pub mod v3 {
!frame_support::migration::have_storage_value(Pallet::<T>::name().as_bytes(), b"StorageVersion", &[]),
"Old StorageVersion should not exist anymore"
);
assert_eq!(
Pallet::<T>::current_storage_version(),
3,
"StorageVersion should have migrated to new paradigm"
);

info!(
"👥 Delegation pallet migration to {:?} passes POST migrate checks ✅",
Expand Down
2 changes: 1 addition & 1 deletion pallets/did/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Enables adding and removing decentralized identifiers (DIDs)."
edition = "2021"
name = "did"
repository = "https://github.com/KILTprotocol/mashnet-node"
version = "1.4.1"
version = "1.5.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
17 changes: 9 additions & 8 deletions pallets/did/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub mod v4 {
use frame_support::{
generate_storage_alias,
pallet_prelude::Weight,
traits::{Get, OnRuntimeUpgrade, PalletInfoAccess},
traits::{Get, OnRuntimeUpgrade, PalletInfoAccess, StorageVersion as NewStorageVersion},
};
use log::info;
use sp_std::marker::PhantomData;
Expand All @@ -67,12 +67,6 @@ pub mod v4 {
fn pre_upgrade() -> Result<(), &'static str> {
assert!(StorageVersion::get() == Some(DidStorageVersion::V3));

// no migration needed
assert!(
Pallet::<T>::current_storage_version() == 4,
"New StorageVersion should be set via pallet macro already"
);

info!("👁 DID storage migration to v4 passes PRE migrate checks ✅",);
Ok(())
}
Expand All @@ -81,8 +75,10 @@ pub mod v4 {
// remove deprecated storage versioning entry
frame_support::migration::remove_storage_prefix(Pallet::<T>::name().as_bytes(), b"StorageVersion", &[]);

NewStorageVersion::new(4).put::<Pallet<T>>();

info!("👁 completed DID storage migration to v4 ✅",);
T::DbWeight::get().reads_writes(0, 1)
T::DbWeight::get().reads_writes(0, 2)
}

#[cfg(feature = "try-runtime")]
Expand All @@ -92,6 +88,11 @@ pub mod v4 {
!frame_support::migration::have_storage_value(Pallet::<T>::name().as_bytes(), b"StorageVersion", &[]),
"Old StorageVersion should not exist anymore"
);
assert_eq!(
Pallet::<T>::current_storage_version(),
4,
"StorageVersion should have migrated to new paradigm"
);

info!(
"👁 DID storage migration to {:?} passes POST migrate checks ✅",
Expand Down
2 changes: 1 addition & 1 deletion pallets/kilt-launch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Enables automatic unlocking of balance from genesis block"
edition = "2021"
name = "kilt-launch"
repository = "https://github.com/KILTprotocol/mashnet-node"
version = "1.4.1"
version = "1.5.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 1 addition & 1 deletion pallets/pallet-did-lookup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Lookup the DID for a blockchain account."
edition = "2021"
name = "pallet-did-lookup"
repository = "https://github.com/KILTprotocol/mashnet-node"
version = "1.4.1"
version = "1.5.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 1 addition & 1 deletion pallets/pallet-inflation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Substrate pallet issueing a pre-configured amount of tokens to th
edition = "2021"
name = "pallet-inflation"
repository = "https://github.com/KILTprotocol/mashnet-node"
version = "1.4.1"
version = "1.5.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 1 addition & 1 deletion pallets/pallet-web3-names/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Unique Web3 nicknames for KILT DIDs."
edition = "2021"
name = "pallet-web3-names"
repository = "https://github.com/KILTprotocol/mashnet-node"
version = "1.4.0"
version = "1.5.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 1 addition & 1 deletion pallets/parachain-staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["KILT <info@kilt.io>"]
description = "Parachain parachain-staking pallet for collator delegation and selection as well as reward distribution"
edition = "2021"
name = "parachain-staking"
version = "1.4.1"
version = "1.5.0"

[dev-dependencies]
pallet-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", default-features = false}
Expand Down
2 changes: 1 addition & 1 deletion runtimes/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["KILT <info@kilt.io>"]
edition = "2021"
name = "runtime-common"
version = "0.1.0"
version = "1.5.0"

[dev-dependencies]
sp-io = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.17"}
Expand Down
6 changes: 3 additions & 3 deletions runtimes/common/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub const MAX_VESTING_SCHEDULES: u32 = 28;
/// Calculate the storage deposit based on the number of storage items and the
/// combined byte size of those items.
pub const fn deposit(items: u32, bytes: u32) -> Balance {
items as Balance * 63 * MILLI_KILT + (bytes as Balance) * 50 * MICRO_KILT
items as Balance * 56 * MILLI_KILT + (bytes as Balance) * 50 * MICRO_KILT
}

/// The size of an index in the index pallet.
Expand Down Expand Up @@ -210,7 +210,7 @@ pub mod did {
use super::*;

/// The size is checked in the runtime by a test.
pub const MAX_DID_BYTE_LENGTH: u32 = 7418;
pub const MAX_DID_BYTE_LENGTH: u32 = 9918;

pub const DID_DEPOSIT: Balance = deposit(2 + MAX_NUMBER_OF_SERVICES_PER_DID, MAX_DID_BYTE_LENGTH);
pub const DID_FEE: Balance = 50 * MILLI_KILT;
Expand All @@ -228,7 +228,7 @@ pub mod did {
pub const MAX_SERVICE_ID_LENGTH: u32 = 50;
pub const MAX_SERVICE_TYPE_LENGTH: u32 = 50;
pub const MAX_NUMBER_OF_TYPES_PER_SERVICE: u32 = 1;
pub const MAX_SERVICE_URL_LENGTH: u32 = 100;
pub const MAX_SERVICE_URL_LENGTH: u32 = 200;
pub const MAX_NUMBER_OF_URLS_PER_SERVICE: u32 = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion runtimes/peregrine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["KILT <info@kilt.io>"]
edition = "2021"
name = "peregrine-runtime"
version = "1.4.1"
version = "1.5.0"

[build-dependencies]
substrate-wasm-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17"}
Expand Down
2 changes: 1 addition & 1 deletion runtimes/peregrine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("mashnet-node"),
impl_name: create_runtime_str!("mashnet-node"),
authoring_version: 4,
spec_version: 10410,
spec_version: 10500,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down
2 changes: 1 addition & 1 deletion runtimes/spiritnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["KILT <info@kilt.io>"]
edition = "2021"
name = "spiritnet-runtime"
version = "1.4.1"
version = "1.5.0"

[build-dependencies]
substrate-wasm-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17"}
Expand Down
Loading

0 comments on commit 2481221

Please sign in to comment.