- Aug 15, 2024
-
-
Iker authored
Update Identity pallet README.md according to the up-to-date docs, particularly to explain the _username_ concept of the pallet. --------- Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
Bastian Köcher <git@kchr.de>
-
Ankan authored
closes https://github.com/paritytech-secops/srlabs_findings/issues/408. This fixes how ProxyDelegator accounts are derived but may cause issues in Westend since it would use the old derivative accounts. Does not affect Polkadot/Kusama as this pallet is not deployed to them yet. --------- Co-authored-by:
Gonçalo Pestana <g6pestana@gmail.com>
-
- Aug 14, 2024
-
-
Ankan authored
## Context Pool members using the old `TransferStake` strategy were able to transfer all their funds to the pool. With `DelegateStake` changes, we want to ensure similar behaviour by allowing members to delegate all their stake to the pool. ## Changes - Ensure all the balance including ED of an account can be delegated (and used in the pool) by adding a provider for delegators. - Gates calls that mutates the pool or pool member if they are in unmigrated state. Closes https://github.com/paritytech-secops/srlabs_findings/issues/409. - Adds remote test to migrate all pools and members to `DelegateStake` which can be used with `Kusama` and `Polkadot` runtime state. closes https://github.com/paritytech/polkadot-sdk/issues/4629. - Add new runtime apis to read pool and member balance. ## Addressing possible migration errors Pool members migrating can run into two types of errors: - Already Staking: If the pool member is already staking, we cannot migrate them to `DelegateStake` since this may mean they are able to use the same staked funds in the pool. Users would need to withdraw all their funds from staking, in order to migrate their pool funds. - Pool contribution below ED: For these cases transfer from pool account to member account would fail. The affected users can top up their accounts and redo migration. Another error that was earlier possible was when member's free balance is below ED. This PR adds a provider to delegator allowing all user balance including ED can be contributed towards the pool. This helps `1095` accounts in Polkadot and `41` accounts in Kusama to migrate now which would have earlier failed. ## Results from RemoteExternalities Tests. ### Kusama `Migration stats: success: 3017, direct_stakers: 361, unexpected_errors: 0` ### Polkadot `Migration stats: success: 42859, direct_stakers: 643, unexpected_errors: 0` ## TODO - [x] Add runtime api for member total balance. - [x] New [issue](https://github.com/paritytech/polkadot-sdk/issues/5009) to reap pool members with contribution below ED. - [x] Add provider for delegators so whole balance including ED can be held while contributing to pools. - [x] Gate all pool extrinsics if pool/member is in non-migrated state. --------- Co-authored-by:
Gonçalo Pestana <g6pestana@gmail.com>
-
Serban Iorga authored
Related to #4523 This PR adds benchmarks for `report_fork_voting()`. **Important: Even though the benchmarks are now available, we still use `Weight::MAX`. That's because I realized while working on this PR that there's still one missing piece. We should also check that the ancestry proof is optimal. I plan to do this in a future PR, hopefully the last one related to #4523.** --------- Co-authored-by:
Branislav Kontur <bkontur@gmail.com> Co-authored-by: command-bot <>
-
Muharem Ismailov authored
Make ticket non-optional and add ensure_successful method to Consideration trait. Reverts the optional return ticket type for the new function introduced in [polkadot-sdk/4596](https://github.com/paritytech/polkadot-sdk/pull/4596) and adds a helper `ensure_successful` function for the runtime benchmarks. Since the existing FRAME pallet represents zero cost with a zero balance rather than `None` in an option, maintaining the ticket type as a non-optional balance is beneficial for backward compatibility and helps avoid unnecessary migrations.
-
Francisco Aguirre authored
In the move from XCMv3 to XCMv4, the `AssetId` for `ForeignAssets` in `asset-hub-rococo` and `asset-hub-westend` was left as `v3::Location` to be later migrated to `v4::Location`. This is that migration PR. Because the encoding of `v3::Location` and `v4::Location` is the same, we don't need to do any data migration, the keys will still be decodable. The [original idea by Jan](https://github.com/paritytech/polkadot/pull/7236) was to make the v4 changes in v3 since the ABI (the encoding/decoding) didn't change. Corroborated the ABI is the same iterating over all storage, the code is on [another branch](https://github.com/paritytech/polkadot-sdk/blob/cisco-assert-v3-v4-encodings-equal/cumulus/parachains/runtimes/assets/migrations/src/foreign_assets_to_v4/mod.rs). We will need a data migration when we want to update from `v4::Location` to `v5::Location` because of [the accepted RFC changing the NetworkId enum](https://github.com/polkadot-fellows/RFCs/pull/108). I'll configure MBMs (Multi-Block Migrations) then and make the actual migration. Fixes https://github.com/paritytech/polkadot-sdk/issues/4128 --------- Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: command-bot <>
-
- Aug 13, 2024
-
-
Ankan authored
Resolves https://github.com/paritytech-secops/srlabs_findings/issues/412 ## Changes - Clear any dangling delegation when member is removed. - Agents need to be killed explicitly when pools are destroyed. - Member withdraw amount is max of their locked funds and the value of their points. --------- Co-authored-by:
Gonçalo Pestana <g6pestana@gmail.com> Co-authored-by: command-bot <>
-
Sebastian Kunert authored
This PR adds an additional defensive check to the reclaim SE. Since it can happen that we miss some storage accesses on other SEs pre-dispatch, we should double check that the bookkeeping of the runtime stays ahead of the node-side pov-size. If we discover a mismatch and the node-side pov-size is indeed higher, we should set the runtime bookkeeping to the node-side value. In cases such as #5229, we would stop including extrinsics and not run `on_idle` at least. cc @gui1117 --------- Co-authored-by: command-bot <>
-
- Aug 08, 2024
-
-
joe petrowski authored
https://github.com/paritytech/polkadot-sdk/pull/4527/files#r1706673828
-
- Aug 07, 2024
-
-
Pablo Andrés Dorado Suárez authored
Closes #4517 Polkadot address: 12gMhxHw8QjEwLQvnqsmMVY1z5gFa54vND74aMUbhhwN6mJR --------- Co-authored-by:
joe petrowski <25483142+joepetrowski@users.noreply.github.com>
-
- Aug 06, 2024
-
-
Oliver Tale-Yazdi authored
Test currently failing, therefore improving to include a file from the same crate to not trip up the caching. R0 silent since this is only modifying unpublished crates. --------- Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
Dónal Murray <donal.murray@parity.io>
-
Sebastian Miasojed authored
[pallet_contracts] Increase the weight of the deposit_event host function to limit the memory used by events. (#4973) This PR updates the weight of the `deposit_event` host function by adding a fixed ref_time of 60,000 picoseconds per byte. Given a block time of 2 seconds and this specified ref_time, the total allocation size is 32MB. --------- Co-authored-by:
Alexander Theißen <alex.theissen@me.com>
-
- Aug 05, 2024
-
-
Sergej Sakac authored
This PR adds functionality that allows tasks to enable auto-renewal. Each task eligible for renewal can enable auto-renewal. A new storage value is added to track all the cores with auto-renewal enabled and the associated task running on the core. The `BoundedVec` is sorted by `CoreIndex` to make disabling auto-renewal more efficient. Cores are renewed at the start of a new bulk sale. If auto-renewal fails(e.g. due to the sovereign account of the task not holding sufficient balance), an event will be emitted, and the renewal will continue for the other cores. The two added extrinsics are: - `enable_auto_renew`: Extrinsic for enabling auto renewal. - `disable_auto_renew`: Extrinsic for disabling auto renewal. TODOs: - [x] Write benchmarks for the newly added extrinsics. Closes: #4351 --------- Co-authored-by:
Dónal Murray <donalm@seadanda.dev>
-
Kian Paimani authored
-
- Aug 02, 2024
-
-
Francisco Aguirre authored
Added a new adapter to xcm-builder, the `SingleAssetExchangeAdapter`. This adapter makes it easy to use `pallet-asset-conversion` for configuring the `AssetExchanger` XCM config item. I also took the liberty of adding a new function to the `AssetExchange` trait, with the following signature: ```rust fn quote_exchange_price(give: &Assets, want: &Assets, maximal: bool) -> Option<Assets>; ``` The signature is meant to be fairly symmetric to that of `exchange_asset`. The way they interact can be seen in the doc comment for it in the `AssetExchange` trait. This is a breaking change but is needed for https://github.com/paritytech/polkadot-sdk/pull/5131. Another idea is to create a new trait for this but that would require setting it in the XCM config which is also breaking. Old PR: https://github.com/paritytech/polkadot-sdk/pull/4375. --------- Co-authored-by:
Adrian Catangiu <adrian@parity.io>
-
- Aug 01, 2024
-
-
Khaled Fouad authored
This PR replaces env_logger with sp_tracing because of an issue with env_logger and gum #4660 --------- Co-authored-by:
Adrian Catangiu <adrian@parity.io> Co-authored-by:
Andrei Eres <eresav@me.com>
-
- Jul 31, 2024
-
-
thiolliere authored
The test name is `test-frame-ui` I don't know if I can also change it to `test-ui` without breaking other stuff. So I kept the name unchanged. --------- Co-authored-by:
Bastian Köcher <git@kchr.de>
-
- Jul 30, 2024
-
-
Parth Mittal authored
As per #3326, removes usage of the `pallet::getter` macro from the balances pallet. The syntax `StorageItem::<T, I>::get()` should be used instead. Also, adds public functions for compatibility. cc @muraca polkadot address: 5GsLutpKjbzsbTphebs9Uy4YK6gTN47MAaz6njPktidjR5cp --------- Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
Gonçalo Pestana authored
This PR reverts the removal of an [`if` statement](https://github.com/paritytech/polkadot-sdk/commit/7ecf3f75#diff-8bf31ba8d9ebd6377983fd7ecc7f4e41cb1478a600db1a15a578d1ae0e8ed435L370) merged recently, which affected test output verbosity of several pallets (e.g. staking, EPM, and potentially others). More generally, the `UnixTime::now` implementation of the timestamp pallet should log an error *only* when called at the genesis block.
-
- Jul 29, 2024
-
-
Pankaj authored
ISSUE Link to the issue: https://github.com/paritytech/polkadot-sdk/issues/3326 Deliverables [Deprecation] remove pallet::getter usage from pallet-proxy --------- Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
polka.dom authored
As per #3326, removes pallet::getter macro usage from the election-provider-multi-phase pallet. The syntax `StorageItem::<T, I>::get()` should be used instead. cc @muraca --------- Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
girazoki authored
Add the possibility of injecting session-keys in genesis for non-validators. Currently all keys injected in genesis were considered as part of the initial validators set, this PR allows to inject a new vector with non-authority keys --------- Co-authored-by:
Bastian Köcher <git@kchr.de>
-
Przemek Rzad authored
An attempt to improve [the docs](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/index.html) by applying various corrections: - grammar/stylistics, - formatting, - broken links, - broken markdown table, - outdated vscode setting name, - typos, - consistency, - etc. Part of https://github.com/paritytech/eng-automation/issues/10
-
Sebastian Miasojed authored
[pallet_contracts] Modify the storage host function benchmarks to run on an unbalanced storage trie. (#5036) This PR modifies the storage host function benchmarks. Previously, they were run on an empty storage trie. Now, they are run on an unbalanced storage trie to reflect worst case scenario. This approach increases the storage host function weights and decreases the probability of DoS attacks. --------- Co-authored-by: command-bot <> Co-authored-by:
PG Herveou <pgherveou@gmail.com>
-
- Jul 26, 2024
-
-
Kian Paimani authored
A bit of a controversial move, but a good preparation for even further reducing the traffic on outdated content of `substrate.io`. Current status: <img width="728" alt="Screenshot 2024-07-15 at 11 32 48" src="https://github.com/user-attachments/assets/df33b164-0ce7-4ac4-bc97-a64485f12571"> Previously, I was in favor of changing the domain of the rust-docs to something like `polkadot-sdk.parity.io` or similar, but I think the current format is pretty standard and has a higher chance of staying put over the course of time: `<org-name>.github.io/<repo-name>` -> `https://paritytech.github.io/polkadot-sdk/` part of https://github.com/paritytech/eng-automation/issues/10
-
Sergej Sakac authored
The problem with the current implementation is that minting will cause the region coremask to be set to `Coremask::complete` regardless of the actual coremask. This PR fixes that. More details about the nonfungible implementation can be found here: https://github.com/paritytech/polkadot-sdk/pull/3455 --------- Co-authored-by:
Dónal Murray <donalm@seadanda.dev> Co-authored-by:
Branislav Kontur <bkontur@gmail.com> Co-authored-by:
Francisco Aguirre <franciscoaguirreperez@gmail.com> Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
thiolliere authored
Fix warnings for rust 1.80
-
Shawn Tabrizi authored
We may want to construct a `Footprint` by taking the `max_encoded_len` of a type, without having to construct the type. This impl allows easy access to that. --------- Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by: command-bot <>
-
- Jul 24, 2024
-
-
Shree Vatsa N authored
- What does this PR do? This PR separates `membership` pallet into separate files for `lib`, `mock` & `tests`. - Why are these changes needed? Currently `membership` pallet consists of `lib`, `mock` & `tests` written into a single file. Refactor it into separate files which makes it inline to other pallets and improves readability. - How were these changes implemented and what do they affect? The PR will not have any affect. Signed-off-by:
Shreevatsa N <i.mnshreevatsa@gmail.com> --------- Signed-off-by:
Shreevatsa N <i.mnshreevatsa@gmail.com> Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by:
Bastian Köcher <info@kchr.de>
-
Muharem Ismailov authored
Drop the Existential Deposit (ED) requirement for the asset amount exchangeable for the fee asset (eg. DOT/KSM) during transaction payments. This achieved by using `SwapCredit` implementation of swap, which works with imbalances and does not require a temporary balance account within the transaction payment. ### Problem Currently, every swap during transaction payment, processed with asset `A` for native asset, must be for an amount greater than the ED of a native asset if the user lacks a native asset account. Since fees are typically smaller, the current implementation necessitates additional swaps to meet the ED during `pre_dispatch`, with refunds for excess ED swap occurring during `post_dispatch`. Further details can be found [here](https://github.com/paritytech/polkadot-sdk/blob/115c2477 /substrate/frame/transaction-payment/asset-conversion-tx-payment/src/payment.rs#L115). This setup presents an issue where a user is unable to transfer their entire balance and close the account. Instead, the user must transfer slightly less of asset `A` to ensure there is enough not only for the fee payment but also some extra to meet the ED requirement for their native account during `pre_dispatch`. In some cases during `post_dispatch`, the user will have the excess ED swapped back to asset `A`, while in other cases, it may not be sufficient to meet the ED requirement for asset `A`, leading it being left in the user's 'temporary' native asset account. --------- Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
Parth Mittal authored
As per #3326, removes usage of the `pallet::getter` macro from the `transaction-payment` pallet. The syntax `StorageItem::<T, I>::get()` should be used instead. Also, adds public functions for compatibility. NOTE: The `Releases` enum has been made public to transition `StorageVersion` from `pub(super) type` to `pub type`. cc @muraca polkadot address: 5GsLutpKjbzsbTphebs9Uy4YK6gTN47MAaz6njPktidjR5cp --------- Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
thiolliere authored
pallet macro: do not generate try-runtime related code when frame-support doesn't have try-runtime. (#5099) Status: Ready for review Fix https://github.com/paritytech/polkadot-sdk/issues/5092 Introduce a new macro in frame-support which discard content if `try-runtime` is not enabled. Use this macro inside `frame-support-procedural` to generate code only when `frame-support` is compiled with `try-runtime`. --------- Co-authored-by:
Bastian Köcher <git@kchr.de>
-
dharjeezy authored
closes https://github.com/paritytech/polkadot-sdk/issues/143 Polkadot address: 12GyGD3QhT4i2JJpNzvMf96sxxBLWymz4RdGCxRH5Rj5agKW --------- Co-authored-by:
Muharem <ismailov.m.h@gmail.com>
-
- Jul 23, 2024
-
-
Oliver Tale-Yazdi authored
Pallet tx-pause and safe-mode are both audited, see: #4445 --------- Signed-off-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
polka.dom authored
As per #3326, removes pallet::getter macro usage from the pallet-identity. The syntax `StorageItem::<T, I>::get()` should be used instead. Also makes all storage values public cc @muraca --------- Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by: command-bot <>
-
Serban Iorga authored
Related to https://github.com/paritytech/polkadot-sdk/issues/4523 Add runtime API methods for: - generating the ancestry proof - submiting a fork voting report - submitting a future voting report
-
Muharem Ismailov authored
Make `on_unbalanceds` work with `fungibles` `imbalances`. The `fungibles` `imbalances` cannot be handled by the default implementation of `on_unbalanceds` from the `OnUnbalanced` trait. This is because the `fungibles` `imbalances` types do not implement the `Imbalance` trait (and cannot with its current semantics). The `on_unbalanceds` function requires only the `merge` function for the imbalance type. In this PR, we provide the `TryMerge` trait, which can be implemented by all imbalance types and make `OnUnbalanced` require it instead `Imbalance`. ### Migration for `OnUnbalanced` trait implementations: In case if you have a custom implementation of `on_unbalanceds` trait function, remove it's `<B>` type argument. ### Migration for custom imbalance types: If you have your own imbalance types implementations, implement the `TryMerge` trait for it introduced with this update. The applicability of the `on_unbalanceds` function to fungibles imbalances is useful in cases like - [link](https://github.com/paritytech/polkadot-sdk/blob/3a8e675e /substrate/frame/transaction-payment/asset-conversion-tx-payment/src/payment.rs#L267) from https://github.com/paritytech/polkadot-sdk/pull/4488. --------- Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
-
- Jul 22, 2024
-
-
gupnik authored
This PR fixes the documentation for FRAME Macros when pointed from `polkadot_sdk_docs` crate. This is achieved by referring to the examples in the `procedural` crate, embedded via `docify`. --------- Co-authored-by:
Kian Paimani <5588131+kianenigma@users.noreply.github.com>
-
- Jul 19, 2024
-
-
Parth Mittal authored
# Description Previously, in the `Currency` impl, the implementation of `pallet_balances` was not emitting any instances of `Issued` and `Rescinded` events, even though the `Fungible` equivalent was. This PR adds the `Issued` and `Rescinded` events in appropriate places in `impl_currency` along with tests. Closes #4028 polkadot address: 5GsLutpKjbzsbTphebs9Uy4YK6gTN47MAaz6njPktidjR5cp --------- Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by:
Bastian Köcher <info@kchr.de>
-
Ankan authored
## Changes - `fn update_payee` is renamed to `fn set_payee` in the trait `StakingInterface` since there is also a call `Staking::update_payee` which does something different, ie used for migrating deprecated `Controller` accounts. - `set_payee` does not re-dispatch, only mutates ledger. - Fix rustdocs for `NominationPools::join`. - Add an implementation note about why we cannot allow existing stakers to join/bond_extra into the pool.
-