-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for 0 existential deposit in benchmarks for pallet_staking
, pallet_session
, and pallet_balances
#4346
Conversation
User @krisbitney, please sign the CLA here. |
For additional context: The changes ensure that the minimum values used in benchmarks are never less than one. This is achieved by using the .max() function to set a floor value of 1u32 for balances and 1u64 for amounts, respectively. |
bot fmt |
@bkchr https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6109389 was started for your command Comment |
@bkchr Command |
@krisbitney could you please write a prdoc |
Review required! Latest push from author must always be reviewed |
Done! |
prdoc/pr_4346.prdoc
Outdated
- name: pallet-session | ||
bump: patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe I am missing something, but I don't see any changes to pallet-session here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just pushed a commit changing it to pallet-session-benchmarking
, which depends on pallet_staking::test_utils
. Thanks for the correction.
a9aeabe
* 'master' of https://github.com/metaspan/polkadot-sdk: (65 commits) Introduces `TypeWithDefault<T, D: Get<T>>` (paritytech#4034) Publish `polkadot-sdk-frame` crate (paritytech#4370) Add validate field to prdoc (paritytech#4368) State trie migration on asset-hub westend and collectives westend (paritytech#4185) Fix: dust unbonded for zero existential deposit (paritytech#4364) Bridge: added subcommand to relay single parachain header (paritytech#4365) Bridge: fix zombienet tests (paritytech#4367) [WIP][CI] Add more GHA jobs (paritytech#4270) Allow for 0 existential deposit in benchmarks for `pallet_staking`, `pallet_session`, and `pallet_balances` (paritytech#4346) Deprecate `NativeElseWasmExecutor` (paritytech#4329) More `xcm::v4` cleanup and `xcm_fee_payment_runtime_api::XcmPaymentApi` nits (paritytech#4355) sc-tracing: enable env-filter feature (paritytech#4357) deps: update jsonrpsee to v0.22.5 (paritytech#4330) Add PoV-reclaim enablement guide to polkadot-sdk-docs (paritytech#4244) cargo: Update experimental litep2p to latest version (paritytech#4344) Bridge: ignore client errors when calling recently added `*_free_headers_interval` methods (paritytech#4350) Make parachain template great again (and async backing ready) (paritytech#4295) [Backport] Version bumps and reorg prdocs from 1.11.0 (paritytech#4336) HRMP - set `DefaultChannelSizeAndCapacityWithSystem` with dynamic values according to the `ActiveConfig` (paritytech#4332) Statement Distribution Per Peer Rate Limit (paritytech#3444) ...
…pallet_session`, and `pallet_balances` (paritytech#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 <[email protected]>
This PR ensures non-zero values are available in benchmarks for
pallet_staking
,pallet_session
, andpallet_balances
where required for them to run.This small change makes it possible to run the benchmarks for
pallet_staking
,pallet_session
, andpallet_balances
in a runtime for which existential deposit is set to 0.The benchmarks for
pallet_staking
andpallet_session
will still fail in runtimes that useU128CurrencyToVote
, but that is easy to work around by creating a newCurrencyToVote
implementation for benchmarking.The changes are implemented by checking if existential deposit equals 0 and using 1 if so.