-
Notifications
You must be signed in to change notification settings - Fork 700
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for 0 existential deposit in benchmarks for
pallet_staking
, `…
…pallet_session`, and `pallet_balances` (#4346) This PR ensures non-zero values are available in benchmarks for `pallet_staking`, `pallet_session`, and `pallet_balances` where required for them to run. This small change makes it possible to run the benchmarks for `pallet_staking`, `pallet_session`, and `pallet_balances` in a runtime for which existential deposit is set to 0. The benchmarks for `pallet_staking` and `pallet_session` will still fail in runtimes that use `U128CurrencyToVote`, but that is easy to work around by creating a new `CurrencyToVote` implementation for benchmarking. The changes are implemented by checking if existential deposit equals 0 and using 1 if so. --------- Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <git@kchr.de>
- Loading branch information
1 parent
6580101
commit a9aeabe
Showing
3 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Allow for 0 existential deposit in benchmarks for pallet_staking, pallet_session, and pallet_balances | ||
|
||
doc: | ||
- audience: Runtime Dev | ||
description: | | ||
Changes were made to benchmarks for `pallet_staking`, `pallet_session`, and `pallet-balances` to accommodate runtimes with 0 existential deposit. This should not affect the vast majority of runtimes. For runtimes with 0 existential deposit, the benchmarks for `pallet_staking` and `pallet_session` will still fail when using `U128CurrencyToVote` in the `pallet-staking` config; developers can use or write another `CurrencyToVote` implementation for benchmarking to work around this. | ||
|
||
crates: | ||
- name: pallet-staking | ||
bump: patch | ||
- name: pallet-session-benchmarking | ||
bump: patch | ||
- name: pallet-balances | ||
bump: patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters