Development (#172)
* docs: Add CLAUDE_RULES.md with strict rebrand protection rules - Define immutable rebrand rules that cannot be violated - Prohibit reverting rebrand for cargo check convenience - Establish checkpoint and audit trail requirements - Document correct error handling approach * refactor: Complete kurdistan-sdk to pezkuwi-sdk rebrand - Update README.md with pezkuwi-sdk branding - Replace all kurdistan-sdk URL references with pezkuwi-sdk - Replace kurdistan-tech with pezkuwichain in workflows - Update email domains from @kurdistan-tech.io to @pezkuwichain.io - Rename tool references: kurdistan-tech-publish → pezkuwi-publish - Update runner names: kurdistan-tech-* → pezkuwichain-* - Update analytics/forum/matrix domains to pezkuwichain.io - Keep 'Kurdistan Tech Institute' as organization name - Keep tech@kurdistan.gov as official government contact
This commit is contained in:
@@ -238,7 +238,7 @@ pub(crate) fn new_test_ext() -> pezsp_io::TestExternalities {
|
||||
config.assimilate_storage(&mut storage).unwrap();
|
||||
|
||||
let mut ext: pezsp_io::TestExternalities = storage.into();
|
||||
// Clear thread local vars for https://github.com/pezkuwichain/kurdistan-sdk/issues/2.
|
||||
// Clear thread local vars for https://github.com/pezkuwichain/pezkuwi-sdk/issues/2.
|
||||
ext.execute_with(|| take_hooks());
|
||||
ext.execute_with(|| System::set_block_number(1));
|
||||
ext
|
||||
|
||||
@@ -1547,7 +1547,7 @@ fn freezer_should_work() {
|
||||
set_frozen_balance(0, 1, 50);
|
||||
|
||||
// Note: The amount to be transferred in this step changed deliberately from 20 to 30
|
||||
// (https://github.com/pezkuwichain/kurdistan-sdk/issues/119/commits/2ab35354d86904c035b21a2229452841b79b0457)
|
||||
// (https://github.com/pezkuwichain/pezkuwi-sdk/issues/119/commits/2ab35354d86904c035b21a2229452841b79b0457)
|
||||
// to reflect the change in how `reducible_balance` is calculated: from untouchable = ed +
|
||||
// frozen, to untouchalbe = max(ed, frozen)
|
||||
//
|
||||
|
||||
@@ -303,7 +303,7 @@ pub mod pezpallet {
|
||||
|
||||
/// The ID type for reserves.
|
||||
///
|
||||
/// Use of reserves is deprecated in favour of holds. See `https://github.com/pezkuwichain/kurdistan-sdk/issues/40/`
|
||||
/// Use of reserves is deprecated in favour of holds. See `https://github.com/pezkuwichain/pezkuwi-sdk/issues/40/`
|
||||
type ReserveIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy;
|
||||
|
||||
/// The ID type for freezes.
|
||||
@@ -312,13 +312,13 @@ pub mod pezpallet {
|
||||
/// The maximum number of locks that should exist on an account.
|
||||
/// Not strictly enforced, but used for weight estimation.
|
||||
///
|
||||
/// Use of locks is deprecated in favour of freezes. See `https://github.com/pezkuwichain/kurdistan-sdk/issues/40/`
|
||||
/// Use of locks is deprecated in favour of freezes. See `https://github.com/pezkuwichain/pezkuwi-sdk/issues/40/`
|
||||
#[pezpallet::constant]
|
||||
type MaxLocks: Get<u32>;
|
||||
|
||||
/// The maximum number of named reserves that can exist on an account.
|
||||
///
|
||||
/// Use of reserves is deprecated in favour of holds. See `https://github.com/pezkuwichain/kurdistan-sdk/issues/40/`
|
||||
/// Use of reserves is deprecated in favour of holds. See `https://github.com/pezkuwichain/pezkuwi-sdk/issues/40/`
|
||||
#[pezpallet::constant]
|
||||
type MaxReserves: Get<u32>;
|
||||
|
||||
@@ -507,7 +507,7 @@ pub mod pezpallet {
|
||||
/// Any liquidity locks on some account balances.
|
||||
/// NOTE: Should only be accessed when setting, changing and freeing a lock.
|
||||
///
|
||||
/// Use of locks is deprecated in favour of freezes. See `https://github.com/pezkuwichain/kurdistan-sdk/issues/40/`
|
||||
/// Use of locks is deprecated in favour of freezes. See `https://github.com/pezkuwichain/pezkuwi-sdk/issues/40/`
|
||||
#[pezpallet::storage]
|
||||
pub type Locks<T: Config<I>, I: 'static = ()> = StorageMap<
|
||||
_,
|
||||
@@ -519,7 +519,7 @@ pub mod pezpallet {
|
||||
|
||||
/// Named reserves on some account balances.
|
||||
///
|
||||
/// Use of reserves is deprecated in favour of holds. See `https://github.com/pezkuwichain/kurdistan-sdk/issues/40/`
|
||||
/// Use of reserves is deprecated in favour of holds. See `https://github.com/pezkuwichain/pezkuwi-sdk/issues/40/`
|
||||
#[pezpallet::storage]
|
||||
pub type Reserves<T: Config<I>, I: 'static = ()> = StorageMap<
|
||||
_,
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
// Most of the business logic in this pezpallet has been
|
||||
// originally contributed by "https://github.com/shamb0",
|
||||
// as part of the PR - https://github.com/pezkuwichain/kurdistan-sdk/issues/74.
|
||||
// as part of the PR - https://github.com/pezkuwichain/pezkuwi-sdk/issues/74.
|
||||
// The code has been moved here and then refactored in order to
|
||||
// extract child bounties as a separate pezpallet.
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
//! Don't rely on reserved balances keeping an account alive
|
||||
//! See <https://github.com/pezkuwichain/kurdistan-sdk/issues/44>.
|
||||
//! See <https://github.com/pezkuwichain/pezkuwi-sdk/issues/44>.
|
||||
|
||||
use crate::{
|
||||
exec::AccountIdOf,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
//! Overflowing bounded DeletionQueue.
|
||||
//! See <https://github.com/pezkuwichain/kurdistan-sdk/issues/47>.
|
||||
//! See <https://github.com/pezkuwichain/pezkuwi-sdk/issues/47>.
|
||||
|
||||
use crate::{
|
||||
migration::{IsFinished, MigrationStep},
|
||||
@@ -74,7 +74,7 @@ pub struct Migration<T: Config> {
|
||||
impl<T: Config> MigrationStep for Migration<T> {
|
||||
const VERSION: u16 = 11;
|
||||
|
||||
// It would be more correct to make our use the now removed [DeletionQueueDepth](https://github.com/pezkuwichain/kurdistan-sdk/issues/47/files#diff-70e9723e9db62816e35f6f885b6770a8449c75a6c2733e9fa7a245fe52c4656c)
|
||||
// It would be more correct to make our use the now removed [DeletionQueueDepth](https://github.com/pezkuwichain/pezkuwi-sdk/issues/47/files#diff-70e9723e9db62816e35f6f885b6770a8449c75a6c2733e9fa7a245fe52c4656c)
|
||||
// but in practice the queue is always empty, so 128 is a good enough approximation for not
|
||||
// underestimating the weight of our migration.
|
||||
fn max_step_weight() -> Weight {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
//! Add `delegate_dependencies` to `ContractInfo`.
|
||||
//! See <https://github.com/pezkuwichain/kurdistan-sdk/issues/49>.
|
||||
//! See <https://github.com/pezkuwichain/pezkuwi-sdk/issues/49>.
|
||||
|
||||
use crate::{
|
||||
migration::{IsFinished, MigrationStep},
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
//! Update the code owner balance, make the code upload deposit balance to be held instead of
|
||||
//! reserved. Since [`Currency`](pezframe_support::traits::Currency) has been
|
||||
//! [deprecated](https://github.com/pezkuwichain/kurdistan-sdk/issues/40), we need the deposits to be
|
||||
//! [deprecated](https://github.com/pezkuwichain/pezkuwi-sdk/issues/40), we need the deposits to be
|
||||
//! handled by the [`pezframe_support::traits::fungible`] traits.
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
//! Move contracts' _reserved_ balance from the `deposit_account` to be _held_ in the contract's
|
||||
//! account instead. Since [`Currency`](pezframe_support::traits::Currency) has been
|
||||
//! [deprecated](https://github.com/pezkuwichain/kurdistan-sdk/issues/40), we need the deposits to be
|
||||
//! [deprecated](https://github.com/pezkuwichain/pezkuwi-sdk/issues/40), we need the deposits to be
|
||||
//! handled by the [`pezframe_support::traits::fungible`] traits instead. For this transfer the
|
||||
//! balance from the deposit account to the contract's account and hold it in there.
|
||||
//! Then the deposit account is not needed anymore and we can get rid of it.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
//! Remove ED from storage base deposit.
|
||||
//! See <https://github.com/pezkuwichain/kurdistan-sdk/issues/116>.
|
||||
//! See <https://github.com/pezkuwichain/pezkuwi-sdk/issues/116>.
|
||||
|
||||
use crate::{
|
||||
migration::{IsFinished, MigrationStep},
|
||||
|
||||
@@ -1371,7 +1371,7 @@ pub mod pezpallet {
|
||||
|
||||
/// The in-code storage version.
|
||||
///
|
||||
/// v1: https://github.com/pezkuwichain/kurdistan-sdk/issues/38/
|
||||
/// v1: https://github.com/pezkuwichain/pezkuwi-sdk/issues/38/
|
||||
const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);
|
||||
|
||||
#[pezpallet::pezpallet]
|
||||
|
||||
@@ -250,7 +250,7 @@ fn continuous_slashes_below_offending_threshold() {
|
||||
/// be below ED. In that case, only the stash (or root) can kill the ledger entry by calling
|
||||
/// `withdraw_unbonded` after the bonding period has passed.
|
||||
///
|
||||
/// Related to <https://github.com/pezkuwichain/kurdistan-sdk/issues/16>.
|
||||
/// Related to <https://github.com/pezkuwichain/pezkuwi-sdk/issues/16>.
|
||||
fn ledger_consistency_active_balance_below_ed() {
|
||||
use pezpallet_staking::{Error, Event};
|
||||
|
||||
|
||||
@@ -699,7 +699,7 @@ pub fn roll_to(n: BlockNumber, delay_solution: bool) {
|
||||
Timestamp::set_timestamp(System::block_number() * BLOCK_TIME + INIT_TIMESTAMP);
|
||||
|
||||
// TODO(gpestana): implement a realistic OCW worker instead of simulating it
|
||||
// https://github.com/pezkuwichain/kurdistan-sdk/issues/10
|
||||
// https://github.com/pezkuwichain/pezkuwi-sdk/issues/10
|
||||
// if there's no solution queued and the solution should not be delayed, try mining and
|
||||
// queue a solution.
|
||||
if CurrentPhase::<Runtime>::get().is_signed() && !delay_solution {
|
||||
|
||||
@@ -49,7 +49,7 @@ pub(crate) fn syn_err(message: &'static str) -> syn::Error {
|
||||
/// compact encoding.
|
||||
/// - The accuracy of the ratios. This must be one of the `PerThing` types defined in
|
||||
/// `sp-arithmetic`.
|
||||
/// - The maximum number of voters. This must be of type `Get<u32>`. Check <https://github.com/pezkuwichain/kurdistan-sdk/issues/5>
|
||||
/// - The maximum number of voters. This must be of type `Get<u32>`. Check <https://github.com/pezkuwichain/pezkuwi-sdk/issues/5>
|
||||
/// for more details. This is used to bound the struct, by leveraging the fact that `votes1.len()
|
||||
/// < votes2.len() < ... < votesn.len()` (the details of the struct is explained further below).
|
||||
/// We know that `sum_i votes_i.len() <= MaxVoters`, and we know that the maximum size of the
|
||||
|
||||
@@ -379,7 +379,7 @@ pub trait ElectionDataProvider {
|
||||
/// [`Self::targets().len()`], since desiring a winner set larger than candidates is not
|
||||
/// feasible.
|
||||
///
|
||||
/// This is documented further in issue: <https://github.com/pezkuwichain/kurdistan-sdk/issues/35>
|
||||
/// This is documented further in issue: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/35>
|
||||
fn desired_targets() -> data_provider::Result<u32>;
|
||||
|
||||
/// Provide a best effort prediction about when the next election is about to happen.
|
||||
|
||||
@@ -9,7 +9,7 @@ and this crate adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h
|
||||
### Added
|
||||
|
||||
### Changed
|
||||
\[**Needs Migration**\] [migrate pezpallet-elections-phragmen to attribute macros](https://github.com/pezkuwichain/kurdistan-sdk/issues/75)
|
||||
\[**Needs Migration**\] [migrate pezpallet-elections-phragmen to attribute macros](https://github.com/pezkuwichain/pezkuwi-sdk/issues/75)
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -18,16 +18,16 @@ and this crate adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h
|
||||
## [3.0.0]
|
||||
|
||||
### Added
|
||||
[Add slashing events to elections-phragmen](https://github.com/pezkuwichain/kurdistan-sdk/issues/70)
|
||||
[Add slashing events to elections-phragmen](https://github.com/pezkuwichain/pezkuwi-sdk/issues/70)
|
||||
|
||||
### Changed
|
||||
|
||||
### Fixed
|
||||
[Don't slash all outgoing members](https://github.com/pezkuwichain/kurdistan-sdk/issues/68)
|
||||
[Fix wrong outgoing calculation in election](https://github.com/pezkuwichain/kurdistan-sdk/issues/67)
|
||||
[Don't slash all outgoing members](https://github.com/pezkuwichain/pezkuwi-sdk/issues/68)
|
||||
[Fix wrong outgoing calculation in election](https://github.com/pezkuwichain/pezkuwi-sdk/issues/67)
|
||||
|
||||
### Security
|
||||
\[**Needs Migration**\] [Fix elections-phragmen and proxy issue + Record deposits on-chain](https://github.com/pezkuwichain/kurdistan-sdk/issues/59)
|
||||
\[**Needs Migration**\] [Fix elections-phragmen and proxy issue + Record deposits on-chain](https://github.com/pezkuwichain/pezkuwi-sdk/issues/59)
|
||||
|
||||
## [2.0.0] - 2020-09-2020
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Run `cargo doc --package pezpallet-example-basic --open` to view this pezpallet'
|
||||
requires root, but without repeating the source code details.
|
||||
Capitalize the first word of each documentation comment and end it with
|
||||
a full stop. See
|
||||
<a href="https://github.com/pezkuwichain/kurdistan-sdk/blob/main/bizinikiwi/README.md#contributing-to-documentation-for-bizinikiwi-packages"
|
||||
<a href="https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/bizinikiwi/README.md#contributing-to-documentation-for-bizinikiwi-packages"
|
||||
target="_blank"> Generic example of annotating source code with documentation comments</a></li>
|
||||
<li>Self-documenting code - Try to refactor code to be self-documenting.</li>
|
||||
<li>Code comments - Supplement complex code with a brief explanation, not every line of code.</li>
|
||||
@@ -54,7 +54,7 @@ Copy and paste this template from frame/examples/basic/src/lib.rs into file
|
||||
|
||||
\## Overview
|
||||
|
||||
<!-- Original author of paragraph: Various. See https://github.com/pezkuwichain/kurdistan-sdk/issues/1 -->
|
||||
<!-- Original author of paragraph: Various. See https://github.com/pezkuwichain/pezkuwi-sdk/issues/1 -->
|
||||
// Short description of pezpallet's purpose.
|
||||
// Links to Traits that should be implemented.
|
||||
// What this pezpallet is for.
|
||||
@@ -64,8 +64,8 @@ Copy and paste this template from frame/examples/basic/src/lib.rs into file
|
||||
// Inputs it uses and the source of each input.
|
||||
// Outputs it produces.
|
||||
|
||||
<!-- Original author of paragraph: @Kianenigma in PR https://github.com/pezkuwichain/kurdistan-sdk/issues/52 -->
|
||||
<!-- and comment https://github.com/pezkuwichain/kurdistan-sdk/issues/1#issuecomment-471982710 -->
|
||||
<!-- Original author of paragraph: @Kianenigma in PR https://github.com/pezkuwichain/pezkuwi-sdk/issues/52 -->
|
||||
<!-- and comment https://github.com/pezkuwichain/pezkuwi-sdk/issues/1#issuecomment-471982710 -->
|
||||
|
||||
\## Terminology
|
||||
|
||||
@@ -76,17 +76,17 @@ Copy and paste this template from frame/examples/basic/src/lib.rs into file
|
||||
// "free balance" and "reserved balance" should be noted to give context to the pezpallet.
|
||||
// Please do not link to outside resources. The reference docs should be the ultimate source of truth.
|
||||
|
||||
<!-- Original author of heading: @Kianenigma in PR https://github.com/pezkuwichain/kurdistan-sdk/issues/52 -->
|
||||
<!-- Original author of heading: @Kianenigma in PR https://github.com/pezkuwichain/pezkuwi-sdk/issues/52 -->
|
||||
|
||||
\## Goals
|
||||
|
||||
// Add goals that the custom pezpallet is designed to achieve.
|
||||
|
||||
<!-- Original author of heading: @Kianenigma in PR https://github.com/pezkuwichain/kurdistan-sdk/issues/52 -->
|
||||
<!-- Original author of heading: @Kianenigma in PR https://github.com/pezkuwichain/pezkuwi-sdk/issues/52 -->
|
||||
|
||||
\### Scenarios
|
||||
|
||||
<!-- Original author of paragraph: @Kianenigma. Based on PR https://github.com/pezkuwichain/kurdistan-sdk/issues/52 -->
|
||||
<!-- Original author of paragraph: @Kianenigma. Based on PR https://github.com/pezkuwichain/pezkuwi-sdk/issues/52 -->
|
||||
|
||||
\#### <INSERT_SCENARIO_NAME>
|
||||
|
||||
@@ -105,7 +105,7 @@ Copy and paste this template from frame/examples/basic/src/lib.rs into file
|
||||
<code>\`inherent\`</code> <INSERT_DESCRIPTION>
|
||||
|
||||
<!-- Original author of paragraph: @Kianenigma in comment -->
|
||||
<!-- https://github.com/pezkuwichain/kurdistan-sdk/issues/1#issuecomment-471982710 -->
|
||||
<!-- https://github.com/pezkuwichain/pezkuwi-sdk/issues/1#issuecomment-471982710 -->
|
||||
|
||||
\### Types
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
//! preferred tool to test migrations is
|
||||
//! [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli). Support will be added to
|
||||
//! dry-run MBMs once they are stable
|
||||
//! (tracked: <https://github.com/pezkuwichain/kurdistan-sdk/issues/190>).
|
||||
//! (tracked: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/190>).
|
||||
|
||||
pub mod migrations;
|
||||
mod mock;
|
||||
|
||||
@@ -516,7 +516,7 @@ impl<T: Config> Pezpallet<T> {
|
||||
/// You should call this function with different seed values until the random
|
||||
/// number lies within `u32::MAX - u32::MAX % n`.
|
||||
/// TODO: deal with randomness freshness
|
||||
/// https://github.com/pezkuwichain/kurdistan-sdk/issues/33
|
||||
/// https://github.com/pezkuwichain/pezkuwi-sdk/issues/33
|
||||
fn generate_random_number(seed: u32) -> u32 {
|
||||
let (random_seed, _) = T::Randomness::random(&(T::PalletId::get(), seed).encode());
|
||||
let random_number = <u32>::decode(&mut random_seed.as_ref())
|
||||
|
||||
@@ -285,7 +285,7 @@ fn service_queues_low_weight_defensive() {
|
||||
});
|
||||
}
|
||||
|
||||
/// Regression test for <https://github.com/pezkuwichain/kurdistan-sdk/issues/109>.
|
||||
/// Regression test for <https://github.com/pezkuwichain/pezkuwi-sdk/issues/109>.
|
||||
#[test]
|
||||
fn service_queues_regression_1873() {
|
||||
use MessageOrigin::*;
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
//!
|
||||
//! To be fair to joiners, this implementation also need joining pools, which are actively staking,
|
||||
//! in addition to the unbonding pools. For maintenance simplicity these are not implemented.
|
||||
//! Related: <https://github.com/pezkuwichain/kurdistan-sdk/issues/4>
|
||||
//! Related: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/4>
|
||||
//!
|
||||
//! ### Limitations
|
||||
//!
|
||||
|
||||
@@ -841,7 +841,7 @@ pub mod v2 {
|
||||
}
|
||||
|
||||
/// Migrate the pool reward scheme to the new version, as per
|
||||
/// <https://github.com/pezkuwichain/kurdistan-sdk/issues/37.>.
|
||||
/// <https://github.com/pezkuwichain/pezkuwi-sdk/issues/37.>.
|
||||
pub struct MigrateToV2<T>(core::marker::PhantomData<T>);
|
||||
impl<T: Config> MigrateToV2<T> {
|
||||
fn run(current: StorageVersion) -> Weight {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
//! > Made with *Bizinikiwi*, for *DotSama*.
|
||||
//!
|
||||
//! [![github]](https://github.com/pezkuwichain/kurdistan-sdk/tree/main/bizinikiwi/pezframe/fast-unstake) -
|
||||
//! [![github]](https://github.com/pezkuwichain/pezkuwi-sdk/tree/main/bizinikiwi/pezframe/fast-unstake) -
|
||||
//! [![pezkuwi]](https://pezkuwichain.io)
|
||||
//!
|
||||
//! [pezkuwi]: https://img.shields.io/badge/polkadot-E6007A?style=for-the-badge&logo=polkadot&logoColor=white
|
||||
|
||||
@@ -140,7 +140,7 @@ pub const DEFAULT_MAX_TRACK_NAME_LEN: usize = 25;
|
||||
|
||||
/// Helper structure to treat a `[u8; N]` array as a string.
|
||||
///
|
||||
/// This is a temporary fix (see [#7671](https://github.com/pezkuwichain/kurdistan-sdk/issues/126)) in
|
||||
/// This is a temporary fix (see [#7671](https://github.com/pezkuwichain/pezkuwi-sdk/issues/126)) in
|
||||
/// order to stop `pezkuwi.js` apps to fail when trying to decode the `name` field in `TrackInfo`.
|
||||
#[derive(Clone, Eq, DecodeWithMemTracking, PartialEq, Debug)]
|
||||
pub struct StringLike<const N: usize>(pub [u8; N]);
|
||||
|
||||
@@ -60,7 +60,7 @@ impl BlockHashMap {
|
||||
|
||||
/// Provides information about a block,
|
||||
/// This is an abstratction on top of [`BizinikiwiBlock`] that can't be mocked in tests.
|
||||
/// Can be removed once <https://github.com/pezkuwichain/kurdistan-sdk/issues/188> is fixed.
|
||||
/// Can be removed once <https://github.com/pezkuwichain/pezkuwi-sdk/issues/188> is fixed.
|
||||
pub trait BlockInfo {
|
||||
/// Returns the block hash.
|
||||
fn hash(&self) -> H256;
|
||||
@@ -299,7 +299,7 @@ impl<B: BlockInfoProvider> ReceiptProvider<B> {
|
||||
|
||||
/// Insert receipts into the provider.
|
||||
///
|
||||
/// Note: Can be merged into `insert_block_receipts` once <https://github.com/pezkuwichain/kurdistan-sdk/issues/188> is fixed and subxt let
|
||||
/// Note: Can be merged into `insert_block_receipts` once <https://github.com/pezkuwichain/pezkuwi-sdk/issues/188> is fixed and subxt let
|
||||
/// us create Mock `BizinikiwiBlock`
|
||||
async fn insert(
|
||||
&self,
|
||||
|
||||
@@ -192,7 +192,7 @@ pub mod v4 {
|
||||
/// This migration cleans up empty agendas of the V4 scheduler.
|
||||
///
|
||||
/// This should be run on a scheduler that does not have
|
||||
/// <https://github.com/pezkuwichain/kurdistan-sdk/issues/41> since it piles up `None`-only agendas. This does not modify the pezpallet version.
|
||||
/// <https://github.com/pezkuwichain/pezkuwi-sdk/issues/41> since it piles up `None`-only agendas. This does not modify the pezpallet version.
|
||||
pub struct CleanupAgendas<T>(core::marker::PhantomData<T>);
|
||||
|
||||
impl<T: Config> OnRuntimeUpgrade for CleanupAgendas<T> {
|
||||
|
||||
@@ -803,7 +803,7 @@ pub mod pezpallet {
|
||||
let phrase = b"society_rotation";
|
||||
// we'll need a random seed here.
|
||||
// TODO: deal with randomness freshness
|
||||
// https://github.com/pezkuwichain/kurdistan-sdk/issues/34
|
||||
// https://github.com/pezkuwichain/pezkuwi-sdk/issues/34
|
||||
let (seed, _) = T::Randomness::random(phrase);
|
||||
// seed needs to be guaranteed to be 32 bytes.
|
||||
let seed = <[u8; 32]>::decode(&mut TrailingZeroInput::new(seed.as_ref()))
|
||||
|
||||
@@ -273,7 +273,7 @@ pub mod benchmarking {
|
||||
}
|
||||
|
||||
#[deprecated(
|
||||
note = "'The V1 benchmarking syntax is deprecated. Please use the V2 syntax. This warning may become a hard error any time after April 2025. For more info, see: https://github.com/pezkuwichain/kurdistan-sdk/issues/123"
|
||||
note = "'The V1 benchmarking syntax is deprecated. Please use the V2 syntax. This warning may become a hard error any time after April 2025. For more info, see: https://github.com/pezkuwichain/pezkuwi-sdk/issues/123"
|
||||
)]
|
||||
pub mod v1 {
|
||||
pub use super::shared::*;
|
||||
|
||||
@@ -257,7 +257,7 @@ parameter_types! {
|
||||
pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;
|
||||
pub const AssetsStringLimit: u32 = 50;
|
||||
/// Key = 32 bytes, Value = 36 bytes (32+1+1+1+1)
|
||||
// https://github.com/pezkuwichain/kurdistan-sdk/blob/main/bizinikiwi/pezframe/assets/src/lib.rs#L257L271
|
||||
// https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/bizinikiwi/pezframe/assets/src/lib.rs#L257L271
|
||||
pub const MetadataDepositBase: Balance = deposit(1, 68);
|
||||
pub const MetadataDepositPerByte: Balance = deposit(0, 1);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ parameter_types! {
|
||||
/// * Kusama: 16 (1.6m snapshot)
|
||||
///
|
||||
/// Reasoning: Both leads to around 700 nominators per-page, yielding the weights in
|
||||
/// https://github.com/pezkuwichain/kurdistan-sdk/issues/128, the maximum of which being around 1mb
|
||||
/// https://github.com/pezkuwichain/pezkuwi-sdk/issues/128, the maximum of which being around 1mb
|
||||
/// compressed PoV and 2mb uncompressed.
|
||||
///
|
||||
/// NOTE: in principle, there is nothing preventing us from stretching these values further, it
|
||||
|
||||
@@ -67,7 +67,7 @@ pub struct UnlockChunk<Balance: HasCompact + MaxEncodedLen> {
|
||||
///
|
||||
/// TODO: move struct definition and full implementation into `/src/ledger.rs`. Currently
|
||||
/// leaving here to enforce a clean PR diff, given how critical this logic is. Tracking issue
|
||||
/// <https://github.com/pezkuwichain/kurdistan-sdk/issues/21>.
|
||||
/// <https://github.com/pezkuwichain/pezkuwi-sdk/issues/21>.
|
||||
#[derive(
|
||||
PartialEqNoBound,
|
||||
EqNoBound,
|
||||
@@ -300,7 +300,7 @@ impl<T: Config> StakingLedger<T> {
|
||||
if let Some(bonded_ledger) = Ledger::<T>::get(&self.stash) {
|
||||
// there is a ledger bonded by the stash. In this case, the stash of the bonded ledger
|
||||
// should be the same as the ledger's stash. Otherwise fail to prevent data
|
||||
// inconsistencies. See <https://github.com/pezkuwichain/kurdistan-sdk/issues/117> for more
|
||||
// inconsistencies. See <https://github.com/pezkuwichain/pezkuwi-sdk/issues/117> for more
|
||||
// details.
|
||||
ensure!(bonded_ledger.stash == self.stash, Error::<T>::BadState);
|
||||
}
|
||||
|
||||
@@ -55,4 +55,4 @@ migrations.
|
||||
- Field `claimed_rewards` in item `Ledger` is renamed
|
||||
to `legacy_claimed_rewards` and can be removed after 84 eras.
|
||||
|
||||
[v14]: https://github.com/pezkuwichain/kurdistan-sdk/issues/46
|
||||
[v14]: https://github.com/pezkuwichain/pezkuwi-sdk/issues/46
|
||||
|
||||
@@ -238,7 +238,7 @@ impl<T: Config> StakingLedger<T> {
|
||||
if let Some(bonded_ledger) = Ledger::<T>::get(&self.stash) {
|
||||
// there is a ledger bonded by the stash. In this case, the stash of the bonded ledger
|
||||
// should be the same as the ledger's stash. Otherwise fail to prevent data
|
||||
// inconsistencies. See <https://github.com/pezkuwichain/kurdistan-sdk/issues/117> for more
|
||||
// inconsistencies. See <https://github.com/pezkuwichain/pezkuwi-sdk/issues/117> for more
|
||||
// details.
|
||||
ensure!(bonded_ledger.stash == self.stash, Error::<T>::BadState);
|
||||
}
|
||||
|
||||
@@ -495,7 +495,7 @@ pub struct UnlockChunk<Balance: HasCompact + MaxEncodedLen> {
|
||||
///
|
||||
/// TODO: move struct definition and full implementation into `/src/ledger.rs`. Currently
|
||||
/// leaving here to enforce a clean PR diff, given how critical this logic is. Tracking issue
|
||||
/// <https://github.com/pezkuwichain/kurdistan-sdk/issues/21>.
|
||||
/// <https://github.com/pezkuwichain/pezkuwi-sdk/issues/21>.
|
||||
#[derive(
|
||||
PartialEqNoBound,
|
||||
EqNoBound,
|
||||
|
||||
@@ -204,7 +204,7 @@ pub mod v15 {
|
||||
}
|
||||
|
||||
/// Migration of era exposure storage items to paged exposures.
|
||||
/// Changelog: [v14.](https://github.com/pezkuwichain/kurdistan-sdk/blob/main/bizinikiwi/pezframe/staking/CHANGELOG.md#14)
|
||||
/// Changelog: [v14.](https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/bizinikiwi/pezframe/staking/CHANGELOG.md#14)
|
||||
pub mod v14 {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -1526,7 +1526,7 @@ impl<T: Config> ElectionDataProvider for Pezpallet<T> {
|
||||
let targets = Self::get_npos_targets(bounds);
|
||||
|
||||
// We can't handle this case yet -- return an error. WIP to improve handling this case in
|
||||
// <https://github.com/pezkuwichain/kurdistan-sdk/issues/43>.
|
||||
// <https://github.com/pezkuwichain/pezkuwi-sdk/issues/43>.
|
||||
if bounds.exhausted(None, CountBound(T::TargetList::count()).into()) {
|
||||
return Err("Target snapshot too big");
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ pub mod pezpallet {
|
||||
/// keys which are then hashed and concatenated, resulting in arbitrarily long keys.
|
||||
///
|
||||
/// Use the *state migration RPC* to retrieve the length of the longest key in your
|
||||
/// storage: <https://github.com/pezkuwichain/kurdistan-sdk/issues/8>
|
||||
/// storage: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/8>
|
||||
///
|
||||
/// The migration will halt with a `Halted` event if this value is too small.
|
||||
/// Since there is no real penalty from over-estimating, it is advised to use a large
|
||||
|
||||
@@ -437,7 +437,7 @@ fn construct_runtime_final_expansion(
|
||||
"use `pezframe_system::Config` to set the `Block` type and delete this clause.
|
||||
It is planned to be removed in December 2023",
|
||||
)
|
||||
.help_links(&["https://github.com/pezkuwichain/kurdistan-sdk/issues/51"])
|
||||
.help_links(&["https://github.com/pezkuwichain/pezkuwi-sdk/issues/51"])
|
||||
.span(where_section.span)
|
||||
.build_or_panic(),
|
||||
)
|
||||
|
||||
@@ -106,8 +106,8 @@ pub fn expand_call(def: &mut Def) -> proc_macro2::TokenStream {
|
||||
.old("use implicit call indices")
|
||||
.new("ensure that all calls have a `pezpallet::call_index` attribute or put the pezpallet into `dev` mode")
|
||||
.help_links(&[
|
||||
"https://github.com/pezkuwichain/kurdistan-sdk/issues/39",
|
||||
"https://github.com/pezkuwichain/kurdistan-sdk/issues/36"
|
||||
"https://github.com/pezkuwichain/pezkuwi-sdk/issues/39",
|
||||
"https://github.com/pezkuwichain/pezkuwi-sdk/issues/36"
|
||||
])
|
||||
.span(method.name.span())
|
||||
.build_or_panic();
|
||||
|
||||
@@ -38,7 +38,7 @@ pub(crate) fn weight_witness_warning(
|
||||
let partial_warning = Warning::new_deprecated("UncheckedWeightWitness")
|
||||
.old("not check weight witness data")
|
||||
.new("ensure that all witness data for weight calculation is checked before usage")
|
||||
.help_link("https://github.com/pezkuwichain/kurdistan-sdk/issues/108");
|
||||
.help_link("https://github.com/pezkuwichain/pezkuwi-sdk/issues/108");
|
||||
|
||||
for (_, arg_ident, _) in method.args.iter() {
|
||||
if !arg_ident.to_string().starts_with('_') || !contains_ident(w.clone(), &arg_ident) {
|
||||
@@ -70,7 +70,7 @@ pub(crate) fn weight_constant_warning(
|
||||
.index(warnings.len())
|
||||
.old("use hard-coded constant as call weight")
|
||||
.new("benchmark all calls or put the pezpallet into `dev` mode")
|
||||
.help_link("https://github.com/pezkuwichain/kurdistan-sdk/issues/48")
|
||||
.help_link("https://github.com/pezkuwichain/pezkuwi-sdk/issues/48")
|
||||
.span(lit.span())
|
||||
.build_or_panic();
|
||||
|
||||
|
||||
@@ -436,7 +436,7 @@ impl ConfigDef {
|
||||
.old("have `RuntimeEvent` associated type in the pezpallet config")
|
||||
.new("remove it as it is redundant since associated bound gets appended automatically: \n
|
||||
pub trait Config: pezframe_system::Config<RuntimeEvent: From<Event<Self>>> { }")
|
||||
.help_link("https://github.com/pezkuwichain/kurdistan-sdk/issues/125")
|
||||
.help_link("https://github.com/pezkuwichain/pezkuwi-sdk/issues/125")
|
||||
.span(type_event.ident.span())
|
||||
.build_or_panic();
|
||||
|
||||
|
||||
@@ -1926,7 +1926,7 @@ pub mod pezpallet_macros {
|
||||
///
|
||||
/// ## Former Usage
|
||||
///
|
||||
/// Prior to <https://github.com/pezkuwichain/kurdistan-sdk/issues/50>, the following syntax was used.
|
||||
/// Prior to <https://github.com/pezkuwichain/pezkuwi-sdk/issues/50>, the following syntax was used.
|
||||
/// This is deprecated and will soon be removed.
|
||||
///
|
||||
/// ```
|
||||
|
||||
@@ -310,7 +310,7 @@ pub fn migrate_from_pallet_version_to_storage_version<
|
||||
/// If your pezpallet has too many keys to be removed in a single block, it is advised to wait for
|
||||
/// a multi-block scheduler currently under development which will allow for removal of storage
|
||||
/// items (and performing other heavy migrations) over multiple blocks
|
||||
/// (see <https://github.com/pezkuwichain/kurdistan-sdk/issues/11>).
|
||||
/// (see <https://github.com/pezkuwichain/pezkuwi-sdk/issues/11>).
|
||||
pub struct RemovePallet<P: Get<&'static str>, DbWeight: Get<RuntimeDbWeight>>(
|
||||
PhantomData<(P, DbWeight)>,
|
||||
);
|
||||
@@ -417,7 +417,7 @@ impl<P: Get<&'static str>, DbWeight: Get<RuntimeDbWeight>>
|
||||
/// If your storage has too many keys to be removed in a single block, it is advised to wait for
|
||||
/// a multi-block scheduler currently under development which will allow for removal of storage
|
||||
/// items (and performing other heavy migrations) over multiple blocks
|
||||
/// (see <https://github.com/pezkuwichain/kurdistan-sdk/issues/11>).
|
||||
/// (see <https://github.com/pezkuwichain/pezkuwi-sdk/issues/11>).
|
||||
pub struct RemoveStorage<P: Get<&'static str>, S: Get<&'static str>, DbWeight: Get<RuntimeDbWeight>>(
|
||||
PhantomData<(P, S, DbWeight)>,
|
||||
);
|
||||
|
||||
@@ -274,7 +274,7 @@ pub mod pezpallet {
|
||||
type SpendFunds: SpendFunds<Self, I>;
|
||||
|
||||
/// DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
|
||||
/// Refer to <https://github.com/pezkuwichain/kurdistan-sdk/issues/122> for migration to `spend`.
|
||||
/// Refer to <https://github.com/pezkuwichain/pezkuwi-sdk/issues/122> for migration to `spend`.
|
||||
///
|
||||
/// The maximum number of approvals that can wait in the spending queue.
|
||||
///
|
||||
@@ -329,14 +329,14 @@ pub mod pezpallet {
|
||||
}
|
||||
|
||||
/// DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
|
||||
/// Refer to <https://github.com/pezkuwichain/kurdistan-sdk/issues/122> for migration to `spend`.
|
||||
/// Refer to <https://github.com/pezkuwichain/pezkuwi-sdk/issues/122> for migration to `spend`.
|
||||
///
|
||||
/// Number of proposals that have been made.
|
||||
#[pezpallet::storage]
|
||||
pub type ProposalCount<T, I = ()> = StorageValue<_, ProposalIndex, ValueQuery>;
|
||||
|
||||
/// DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
|
||||
/// Refer to <https://github.com/pezkuwichain/kurdistan-sdk/issues/122> for migration to `spend`.
|
||||
/// Refer to <https://github.com/pezkuwichain/pezkuwi-sdk/issues/122> for migration to `spend`.
|
||||
///
|
||||
/// Proposals that have been made.
|
||||
#[pezpallet::storage]
|
||||
@@ -354,7 +354,7 @@ pub mod pezpallet {
|
||||
StorageValue<_, BalanceOf<T, I>, ValueQuery>;
|
||||
|
||||
/// DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
|
||||
/// Refer to <https://github.com/pezkuwichain/kurdistan-sdk/issues/122> for migration to `spend`.
|
||||
/// Refer to <https://github.com/pezkuwichain/pezkuwi-sdk/issues/122> for migration to `spend`.
|
||||
///
|
||||
/// Proposal indices that have been approved but not yet awarded.
|
||||
#[pezpallet::storage]
|
||||
|
||||
Reference in New Issue
Block a user