Skip to content

Add deposit for setting session keys#7953

Merged
kianenigma merged 71 commits intoparitytech:masterfrom
Krayt78:add-deposit-for-setting-session-keys
Jun 14, 2025
Merged

Add deposit for setting session keys#7953
kianenigma merged 71 commits intoparitytech:masterfrom
Krayt78:add-deposit-for-setting-session-keys

Conversation

@Krayt78
Copy link
Copy Markdown
Contributor

@Krayt78 Krayt78 commented Mar 18, 2025

Description

closes #1625

Implement hold balance tracking for test accounts in the session pallet. Requires pallet_session::Config to specify:
* type Currency, assigned to an instance of pallet_balances.
* type RuntimeHoldReason, almost always set to RuntimeHoldReason.
* type KeyDeposit, the amount of deposit. Set to () to assert no deposit amount is needed.

Krayt78 added 3 commits March 18, 2025 09:44
…pallet. Update KeyDeposit type to use BalanceOf. Add tests for setting and purging keys to verify fund reservation and unreservation.
…undant storage reads and improve efficiency in the session pallet.
Copy link
Copy Markdown
Contributor

@xlc xlc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we really need to deprecate unnamed reserves. should use names reserve instead

@Krayt78
Copy link
Copy Markdown
Contributor Author

Krayt78 commented Mar 18, 2025

we really need to deprecate unnamed reserves. should use names reserve instead

i wil l change to use named reserve instead then, but from what i can see i still need to use ReservableCurrency for the can_reserve function since NamedReservableCurrency doesnt seem to implement it

…functionality for key management. Update related types and events to reflect changes from reservation to holding of funds.
@Krayt78 Krayt78 requested a review from kianenigma April 23, 2025 07:54
@Krayt78
Copy link
Copy Markdown
Contributor Author

Krayt78 commented Jun 11, 2025

@kianenigma its good besides CI complaining that PRdoc should be Major instead of Patch

@kianenigma
Copy link
Copy Markdown
Contributor

/tip medium

@substrate-tip-bot
Copy link
Copy Markdown

@kianenigma Could not submit tip :( The team has been notified. Alternatively open an issue here.

@kianenigma kianenigma enabled auto-merge June 14, 2025 08:35
@kianenigma kianenigma added this pull request to the merge queue Jun 14, 2025
Merged via the queue into paritytech:master with commit 4a40095 Jun 14, 2025
243 of 244 checks passed
@Krayt78 Krayt78 deleted the add-deposit-for-setting-session-keys branch June 14, 2025 09:58
@Krayt78
Copy link
Copy Markdown
Contributor Author

Krayt78 commented Jun 15, 2025

@kianenigma maybe try the tip again, i removed the address from the description since i already have it in my bio. (might be conflicting)

@mordamax
Copy link
Copy Markdown
Contributor

/tip medium

@substrate-tip-bot
Copy link
Copy Markdown

@mordamax A referendum for a medium (80 DOT) tip was successfully submitted for @Krayt78 (14AgwoPjcRiEEJgjfHmvAqkjdERCG26WEvQUoGLuBzcXKMS2 on polkadot).

Referendum number: 1628.
tip

@substrate-tip-bot
Copy link
Copy Markdown

The referendum has appeared on Polkassembly.

fellowship-merge-bot bot pushed a commit to polkadot-fellows/runtimes that referenced this pull request Aug 15, 2025
This brings in `unstable2507` Polkadot SDK, and integrates new features.

Integrated breaking changes to be verified by the original authors:

- [ ] paritytech/polkadot-sdk#7953 @kianenigma
@Ank4n acatangiu#13
- [x] paritytech/polkadot-sdk#8684 @nkpar
- [x] paritytech/polkadot-sdk#8693 @tiagobndr
@franciscoaguirre
- [x] paritytech/polkadot-sdk#9137
@franciscoaguirre

fixes #837

---------

Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: kianenigma <kian@parity.io>
Co-authored-by: Christian Langenbacher <clangenb+gh@protonmail.ch>
alvicsam pushed a commit that referenced this pull request Oct 17, 2025
# Description
closes #1625

Implement hold balance tracking for test accounts in the session pallet.
Requires `pallet_session::Config` to specify:
    * `type Currency`, assigned to an instance of `pallet_balances`.
* `type RuntimeHoldReason`, almost always set to `RuntimeHoldReason`.
* `type KeyDeposit`, the amount of deposit. Set to `()` to assert no
deposit amount is needed.
    
Polkadot address: 14AgwoPjcRiEEJgjfHmvAqkjdERCG26WEvQUoGLuBzcXKMS2

---------

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: kianenigma <kian@parity.io>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
khssnv added a commit to QuantumFusion-network/qf-solochain that referenced this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T2-pallets This PR/Issue is related to a particular pallet.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[AHM] Requires a deposit for setting session keys

10 participants