Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/update-snowbridge-versions' into…
Browse files Browse the repository at this point in the history
… update-snowbridge-versions
  • Loading branch information
claravanstaden authored and claravanstaden committed Jan 10, 2024
2 parents a6fdfda + 463936f commit e6e9895
Show file tree
Hide file tree
Showing 104 changed files with 5,081 additions and 1,770 deletions.
4 changes: 2 additions & 2 deletions .config/lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ exclude_all_private = true
# Treat these codes as success condition:
accept = [
# Ok
200,
"200",

# Rate limited - GitHub likes to throw this.
429,
"429",
]

exclude_path = ["./target"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.0 (22. Sep 2023)

- name: Lychee link checker
uses: lycheeverse/lychee-action@2ac9f030ccdea0033e2510a23a67da2a2da98492 # for v1.8.0 (15. May 2023)
uses: lycheeverse/lychee-action@fdea7032675810093199f485fe075f057cc37b3e # for v1.9.0 (5. Jan 2024)
with:
args: >-
--config .config/lychee.toml
Expand Down
8 changes: 8 additions & 0 deletions .gitlab/pipeline/zombienet/polkadot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ zombienet-polkadot-functional-0009-approval-voting-coalescing:
--local-dir="${LOCAL_DIR}/functional"
--test="0009-approval-voting-coalescing.zndsl"

zombienet-polkadot-functional-0010-validator-disabling:
extends:
- .zombienet-polkadot-common
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}/functional"
--test="0010-validator-disabling.zndsl"

zombienet-polkadot-smoke-0001-parachains-smoke-test:
extends:
- .zombienet-polkadot-common
Expand Down
19 changes: 10 additions & 9 deletions Cargo.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl Identity {
relay: IdentityInfo {
display: make_data(b"xcm-test", full),
legal: make_data(b"The Xcm Test, Esq.", full),
web: make_data(b"https://xcm-test.io", full),
web: make_data(b"https://visitme/", full),
riot: make_data(b"xcm-riot", full),
email: make_data(b"[email protected]", full),
pgp_fingerprint: Some(pgp_fingerprint),
Expand All @@ -106,7 +106,7 @@ impl Identity {
para: IdentityInfoParachain {
display: make_data(b"xcm-test", full),
legal: make_data(b"The Xcm Test, Esq.", full),
web: make_data(b"https://xcm-test.io", full),
web: make_data(b"https://visitme/", full),
matrix: make_data(b"xcm-matrix@server", full),
email: make_data(b"[email protected]", full),
pgp_fingerprint: Some(pgp_fingerprint),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl Identity {
relay: IdentityInfo {
display: make_data(b"xcm-test", full),
legal: make_data(b"The Xcm Test, Esq.", full),
web: make_data(b"https://xcm-test.io", full),
web: make_data(b"https://visitme/", full),
riot: make_data(b"xcm-riot", full),
email: make_data(b"[email protected]", full),
pgp_fingerprint: Some(pgp_fingerprint),
Expand All @@ -106,7 +106,7 @@ impl Identity {
para: IdentityInfoParachain {
display: make_data(b"xcm-test", full),
legal: make_data(b"The Xcm Test, Esq.", full),
web: make_data(b"https://xcm-test.io", full),
web: make_data(b"https://visitme/", full),
matrix: make_data(b"xcm-matrix@server", full),
email: make_data(b"[email protected]", full),
pgp_fingerprint: Some(pgp_fingerprint),
Expand Down
32 changes: 29 additions & 3 deletions cumulus/parachains/runtimes/people/people-rococo/src/people.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ use frame_support::{
RuntimeDebugNoBound,
};
use pallet_identity::{Data, IdentityInformationProvider};
use parachains_common::impls::ToParentTreasury;
use parachains_common::{impls::ToParentTreasury, DAYS};
use scale_info::TypeInfo;
use sp_runtime::{traits::AccountIdConversion, RuntimeDebug};
use sp_runtime::{
traits::{AccountIdConversion, Verify},
RuntimeDebug,
};
use sp_std::prelude::*;

parameter_types! {
Expand All @@ -51,6 +54,12 @@ impl pallet_identity::Config for Runtime {
type Slashed = ToParentTreasury<RelayTreasuryAccount, LocationToAccountId, Runtime>;
type ForceOrigin = EnsureRoot<Self::AccountId>;
type RegistrarOrigin = EnsureRoot<Self::AccountId>;
type OffchainSignature = Signature;
type SigningPublicKey = <Signature as Verify>::Signer;
type UsernameAuthorityOrigin = EnsureRoot<Self::AccountId>;
type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>;
type MaxSuffixLength = ConstU32<7>;
type MaxUsernameLength = ConstU32<32>;
type WeightInfo = weights::pallet_identity::WeightInfo<Runtime>;
}

Expand Down Expand Up @@ -84,7 +93,6 @@ pub enum IdentityField {
TypeInfo,
)]
#[codec(mel_bound())]
#[cfg_attr(test, derive(frame_support::DefaultNoBound))]
pub struct IdentityInfo {
/// A reasonable display name for the controller of the account. This should be whatever the
/// account is typically known as and should not be confusable with other entities, given
Expand Down Expand Up @@ -202,3 +210,21 @@ impl IdentityInfo {
res
}
}

/// A `Default` identity. This is given to users who get a username but have not set an identity.
impl Default for IdentityInfo {
fn default() -> Self {
IdentityInfo {
display: Data::None,
legal: Data::None,
web: Data::None,
matrix: Data::None,
email: Data::None,
pgp_fingerprint: None,
image: Data::None,
twitter: Data::None,
github: Data::None,
discord: Data::None,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,98 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Identity::UsernameAuthorities` (r:0 w:1)
/// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn add_username_authority() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 13_873_000 picoseconds.
Weight::from_parts(13_873_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::UsernameAuthorities` (r:0 w:1)
/// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
fn remove_username_authority() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 10_653_000 picoseconds.
Weight::from_parts(10_653_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::UsernameAuthorities` (r:1 w:1)
/// Proof: `Identity::UsernameAuthorities` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
/// Storage: `Identity::AccountOfUsername` (r:1 w:1)
/// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Identity::IdentityOf` (r:1 w:1)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`)
fn set_username_for() -> Weight {
// Proof Size summary in bytes:
// Measured: `80`
// Estimated: `11037`
// Minimum execution time: 75_928_000 picoseconds.
Weight::from_parts(75_928_000, 0)
.saturating_add(Weight::from_parts(0, 11037))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Identity::PendingUsernames` (r:1 w:1)
/// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
/// Storage: `Identity::IdentityOf` (r:1 w:1)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`)
/// Storage: `Identity::AccountOfUsername` (r:0 w:1)
/// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn accept_username() -> Weight {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `11037`
// Minimum execution time: 38_157_000 picoseconds.
Weight::from_parts(38_157_000, 0)
.saturating_add(Weight::from_parts(0, 11037))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Identity::PendingUsernames` (r:1 w:1)
/// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(77), added: 2552, mode: `MaxEncodedLen`)
fn remove_expired_approval() -> Weight {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `3542`
// Minimum execution time: 46_821_000 picoseconds.
Weight::from_parts(46_821_000, 0)
.saturating_add(Weight::from_parts(0, 3542))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::AccountOfUsername` (r:1 w:0)
/// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Identity::IdentityOf` (r:1 w:1)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`)
fn set_primary_username() -> Weight {
// Proof Size summary in bytes:
// Measured: `247`
// Estimated: `11037`
// Minimum execution time: 22_515_000 picoseconds.
Weight::from_parts(22_515_000, 0)
.saturating_add(Weight::from_parts(0, 11037))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Identity::AccountOfUsername` (r:1 w:1)
/// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Identity::IdentityOf` (r:1 w:0)
/// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`)
fn remove_dangling_username() -> Weight {
// Proof Size summary in bytes:
// Measured: `126`
// Estimated: `11037`
// Minimum execution time: 15_997_000 picoseconds.
Weight::from_parts(15_997_000, 0)
.saturating_add(Weight::from_parts(0, 11037))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
}
32 changes: 29 additions & 3 deletions cumulus/parachains/runtimes/people/people-westend/src/people.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ use frame_support::{
RuntimeDebugNoBound,
};
use pallet_identity::{Data, IdentityInformationProvider};
use parachains_common::impls::ToParentTreasury;
use parachains_common::{impls::ToParentTreasury, DAYS};
use scale_info::TypeInfo;
use sp_runtime::{traits::AccountIdConversion, RuntimeDebug};
use sp_runtime::{
traits::{AccountIdConversion, Verify},
RuntimeDebug,
};
use sp_std::prelude::*;

parameter_types! {
Expand All @@ -51,6 +54,12 @@ impl pallet_identity::Config for Runtime {
type Slashed = ToParentTreasury<RelayTreasuryAccount, LocationToAccountId, Runtime>;
type ForceOrigin = EnsureRoot<Self::AccountId>;
type RegistrarOrigin = EnsureRoot<Self::AccountId>;
type OffchainSignature = Signature;
type SigningPublicKey = <Signature as Verify>::Signer;
type UsernameAuthorityOrigin = EnsureRoot<Self::AccountId>;
type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>;
type MaxSuffixLength = ConstU32<7>;
type MaxUsernameLength = ConstU32<32>;
type WeightInfo = weights::pallet_identity::WeightInfo<Runtime>;
}

Expand Down Expand Up @@ -84,7 +93,6 @@ pub enum IdentityField {
TypeInfo,
)]
#[codec(mel_bound())]
#[cfg_attr(test, derive(frame_support::DefaultNoBound))]
pub struct IdentityInfo {
/// A reasonable display name for the controller of the account. This should be whatever it is
/// that it is typically known as and should not be confusable with other entities, given
Expand Down Expand Up @@ -202,3 +210,21 @@ impl IdentityInfo {
res
}
}

/// A `Default` identity. This is given to users who get a username but have not set an identity.
impl Default for IdentityInfo {
fn default() -> Self {
IdentityInfo {
display: Data::None,
legal: Data::None,
web: Data::None,
matrix: Data::None,
email: Data::None,
pgp_fingerprint: None,
image: Data::None,
twitter: Data::None,
github: Data::None,
discord: Data::None,
}
}
}
Loading

0 comments on commit e6e9895

Please sign in to comment.