-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: add deposit reclaim extrinsic for delegations #295
Conversation
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.
LGTM
It's all there, tests, doc, functionality. Love it!
But I'm triggered by reclaiming back
and returning back
! 🍠
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.
LGTM! Two super minor things you could resolve.
I am wondering whether we should keep fn remove_delegation
at all since it is pretty redundant with adding the reclaiming.
@wischli I think we should keep both as each of them gives "power" to a different user type, and if we remove the |
/bench runtime spiritnet-runtime delegation |
/bench runtime spiritnet-runtime delegation |
Benchmark Runtime Pallet for branch "aa-delegation-deposit-claiming" with command cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=spiritnet-dev --steps=50 --repeat=20 --pallet=delegation --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/spiritnet/src/weights/delegation.rs --template=.maintain/runtime-weight-template.hbs Results
|
…hmarks -- benchmark --chain=spiritnet-dev --steps=50 --repeat=20 --pallet=delegation --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/spiritnet/src/weights/delegation.rs --template=.maintain/runtime-weight-template.hbs
/bench runtime peregrine-runtime delegation |
Error running benchmark: aa-delegation-deposit-claiming stdoutCaught exception in benchmarkRuntime: TypeError: Cannot read properties of undefined (reading 'benchCommand') |
/bench runtime pallet delegation |
Benchmark Runtime Pallet for branch "aa-delegation-deposit-claiming" with command cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=delegation --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=pallets/delegation/src/default_weights.rs --template=.maintain/weight-template.hbs Results
|
/bench runtime peregrine delegation |
…hmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=delegation --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=pallets/delegation/src/default_weights.rs --template=.maintain/weight-template.hbs
Benchmark Runtime Substrate Pallet for branch "aa-delegation-deposit-claiming" with command cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=delegation --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/delegation.rs --template=.maintain/runtime-weight-template.hbs Results
|
…hmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=delegation --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/delegation.rs --template=.maintain/runtime-weight-template.hbs
fixes KILTProtocol/ticket#1628
Adds the
reclaim_deposit
extrinsic to the delegation pallet, callable only by a signed origin which must be the deposit owner. Added tests and benchmarks, which will have to be re-run after review.An SDK companion PR will follow.
M
Checklist: