[AHM] Poke deposits: Indices pallet (#7587)
# Description
* This PR adds a new extrinsic `reconsider` to `pallet-indices`. This
extrinsic will be used to re-adjust the deposits made in the pallet.
* Part of #5591
## Review Notes
* Added a new extrinsic `reconsider` in `pallet-indices`.
* Added a new event `DepositReconsidered` to be emitted upon a
successful call of the extrinsic.
* Although the immediate use of the extrinsic will be to give back some
of the deposit after the AH-migration, the extrinsic is written such
that it can work if the deposit decreases or increases (both).
* The call to the extrinsic would be `free` if an actual adjustment is
made to the deposit and `paid` otherwise.
* Added tests to test all scenarios.
* Added a benchmark to test the "worst case" (maximum compute) flow of
the extrinsic which is when the deposit amount is updated to a new
value.
## TO-DOs
* [x] Run CI cmd bot to benchmark
---------
Co-authored-by:
cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
parent
42e9de7f
Showing
- polkadot/runtime/rococo/src/weights/pallet_indices.rs 35 additions, 22 deletionspolkadot/runtime/rococo/src/weights/pallet_indices.rs
- polkadot/runtime/westend/src/weights/pallet_indices.rs 55 additions, 42 deletionspolkadot/runtime/westend/src/weights/pallet_indices.rs
- prdoc/pr_7587.prdoc 11 additions, 0 deletionsprdoc/pr_7587.prdoc
- substrate/frame/indices/src/benchmarking.rs 54 additions, 0 deletionssubstrate/frame/indices/src/benchmarking.rs
- substrate/frame/indices/src/lib.rs 65 additions, 0 deletionssubstrate/frame/indices/src/lib.rs
- substrate/frame/indices/src/mock.rs 10 additions, 3 deletionssubstrate/frame/indices/src/mock.rs
- substrate/frame/indices/src/tests.rs 117 additions, 1 deletionsubstrate/frame/indices/src/tests.rs
- substrate/frame/indices/src/weights.rs 87 additions, 43 deletionssubstrate/frame/indices/src/weights.rs
Please register or sign in to comment