update_roles for nomination pools#11373
Conversation
|
/benchmark runtime pallet pallet-nomination-pools |
|
Benchmark Runtime Pallet for branch "kiz-fix-unbond-reward-payout" with command cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet-nomination-pools --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame//src/weights.rs --template=./.maintain/frame-weight-template.hbs Toolchain: stable-x86_64-unknown-linux-gnu (default) ResultsERROR: Unable to commit file ./frame//src/weights.rs |
|
/benchmark runtime pallet pallet-nomination-pools |
|
Benchmark Runtime Pallet for branch "kiz-fix-unbond-reward-payout" with command cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet-nomination-pools --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame//src/weights.rs --template=./.maintain/frame-weight-template.hbs Toolchain: stable-x86_64-unknown-linux-gnu (default) ResultsERROR: Unable to commit file ./frame//src/weights.rs |
|
@athei do you know why this is failing? #11373 (comment) update: seems rust-verison related. |
Yes. Rust versions needs to be updated. |
|
/benchmark runtime pallet pallet-nomination-pools |
|
Benchmark Runtime Pallet for branch "kiz-fix-unbond-reward-payout" with command cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet-nomination-pools --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame//src/weights.rs --template=./.maintain/frame-weight-template.hbs Toolchain: stable-x86_64-unknown-linux-gnu (default) ResultsERROR: Unable to commit file ./frame//src/weights.rs |
frame/nomination-pools/src/lib.rs
Outdated
| let who = ensure_signed(origin)?; | ||
| let mut bonded_pool = BondedPool::<T>::get(pool_id).ok_or(Error::<T>::PoolNotFound)?; | ||
| ensure!(bonded_pool.roles.root == who, Error::<T>::DoesNotHavePermission); |
There was a problem hiding this comment.
if you can forsee it being useful, could also make this callable by ROOT origin too.
There was a problem hiding this comment.
good point, yeah I think it is.
|
/bench runtime pallet pallet_nomination_pools Somehow it uses the wrong output path: |
|
/benchmark runtime pallet pallet_nomination_pools |
|
Benchmark Runtime Pallet for branch "kiz-fix-unbond-reward-payout" with command cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools Somehow it uses the wrong output path: Somehow it uses the wrong output path: Toolchain: stable-x86_64-unknown-linux-gnu (default) ResultsERROR: Unable to commit file ./frame//src/weights.rs`. |
|
Benchmark Runtime Pallet for branch "kiz-fix-unbond-reward-payout" with command cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs Toolchain: stable-x86_64-unknown-linux-gnu (default) Results |
…--manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs
…-unbond-reward-payout
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
…substrate into kiz-fix-unbond-reward-payout
| let o2 = o1.clone(); | ||
|
|
||
| let is_pool_root = || -> Result<BondedPool<T>, sp_runtime::DispatchError> { | ||
| let mut bonded_pool = BondedPool::<T>::get(pool_id).ok_or(Error::<T>::PoolNotFound)?; |
There was a problem hiding this comment.
Ahh damn, I think unsigned extrinsics could now cause a DB-Read without paying for it?
There was a problem hiding this comment.
they still pay for the full transaction, as if it set all values.
There was a problem hiding this comment.
not an unsigned message though, since it wouldnt fail the extrinsic test until the origin check
|
bot merge |
|
Error: "Check reviews" status is not passing for paritytech/polkadot#5488 |
|
bot merge |
update_roles for nomination pools
* fix a few more things with nomination pools * add bench * use weight fn * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs * allow real root to also set roles * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * move out of the closure * fix a few more things Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fix a few more things with nomination pools * add bench * use weight fn * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs * allow real root to also set roles * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * move out of the closure * fix a few more things Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fix a few more things with nomination pools * add bench * use weight fn * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs * allow real root to also set roles * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/nomination-pools/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * move out of the closure * fix a few more things Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
update_rolestransactionpolkadot companion: paritytech/polkadot#5488