-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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) Results
ERROR: 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) Results
ERROR: 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) Results
ERROR: 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you can forsee it being useful, could also make this callable by ROOT
origin too.
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.
good point, yeah I think it is.
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.
/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) Results
ERROR: 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
) -> DispatchResult { | ||
let o1 = origin; | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh damn, I think unsigned extrinsics could now cause a DB-Read without paying for it?
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.
they still pay for the full transaction, as if it set all values.
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.
not an unsigned message though, since it wouldnt fail the extrinsic test until the origin check
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.
nit pick fix here #11391
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_roles
transactionpolkadot companion: paritytech/polkadot#5488