-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Allow configuration option for minimum commission of validators #10347
Conversation
/benchmark runtime pallet pallet-staking |
Benchmark Runtime Pallet for branch "kiz-min-comission" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet-staking --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame//src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
ERROR: Unable to commit file ./frame//src/weights.rs |
Should we grandfather in existing validators? Or just compute everyone's commission as |
I don't think it is a good idea to change the preferences on the fly. Enforcing them upon "validate" should be enough to ensure all validators eventually comply. That being said, we can wrote a migration for that as well. But it will need to be a separate PR. |
/benchmark runtime pallet pallet_staking |
Benchmark Runtime Pallet for branch "kiz-min-comission" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
|
… kiz-min-comission
…path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
/benchmark runtime pallet pallet_staking |
Benchmark Runtime Pallet for branch "kiz-min-comission" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs Results
|
…path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
bot merge |
Error: Github API says paritytech/polkadot#4413 is not mergeable |
bot merge |
* Minimum commission for validators * rename * Fix benchmakrs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Update frame/staking/src/pallet/mod.rs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Minimum commission for validators * rename * Fix benchmakrs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Update frame/staking/src/pallet/mod.rs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This PR will add a new configurable storage item to staking that allows setting the minimum amount of commission for validators.
As of now, this is not enforced in already existing validators at all. Only those that wish to become one, or update their prefs, will need to comply with this limit, if set. The default is
0%
, which means all values comply with it.Renames the previous
set_staking_limits
toset_staking_configs
and reuses that as the governance entry point.A technical dilemma is that
set_staking_configs
is becoming increasingly bloated. Ideally, I can see an instantiablepallet-configurations
that can contain these configurations, and provide easy transactions to set them. As of now, if you want to tweak just one of these configs, you have to set all of them. Any mistake in the process can be fatal. I think it is fair to say whoever is calling that function must be super careful. But, long term we can improve this.Polkadot companion: paritytech/polkadot#4413
skip check-dependent-cumulus