Skip to content

Conversation

@UtkarshBhardwaj007
Copy link
Member

@UtkarshBhardwaj007 UtkarshBhardwaj007 commented Mar 4, 2025

Description

  • This PR adds a new extrinsic poke_deposit to pallet-proxy. This extrinsic will be used to re-adjust the deposits made in the pallet to create a proxy or to create an announcement.
  • Part of Re-consideration poke for Deposits  #5591

Review Notes

  • Added a new extrinsic poke_deposit in pallet-proxy.
  • This extrinsic checks and adjusts the deposits made for either creating a proxy or creating an announcement or both.
  • Added a new event DepositPoked 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 for creating a proxy or to the deposit for creating an announcement or both and paid otherwise (when no deposit is changed).
  • Added a new enum DepositKind to differentiate between proxy deposit adjusted and announcement deposit adjusted when emitting events.
  • Added tests to test all scenarios.

TO-DOs

  • Run CI cmd bot to benchmark

@UtkarshBhardwaj007 UtkarshBhardwaj007 added T1-FRAME This PR/Issue is related to core FRAME, the framework. T2-pallets This PR/Issue is related to a particular pallet. labels Mar 4, 2025
@UtkarshBhardwaj007 UtkarshBhardwaj007 requested a review from a team as a code owner March 4, 2025 17:57
@UtkarshBhardwaj007
Copy link
Member Author

/cmd fmt

@UtkarshBhardwaj007
Copy link
Member Author

/cmd prdoc

@UtkarshBhardwaj007
Copy link
Member Author

/cmd bench --pallet pallet_proxy

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2025

Command "bench --pallet pallet_proxy" has started 🚀 See logs here

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2025

Command "bench --pallet pallet_proxy" has finished ✅ See logs here

Subweight results:
File Extrinsic Old New Change [%]
substrate/frame/proxy/src/weights.rs proxy 90.81us 101.12us +11.35
substrate/frame/proxy/src/weights.rs remove_proxies 144.63us 151.88us +5.01
substrate/frame/proxy/src/weights.rs poke_deposit 422.97us Added
polkadot/runtime/westend/src/weights/pallet_proxy.rs poke_deposit 425.37us Added
polkadot/runtime/rococo/src/weights/pallet_proxy.rs poke_deposit 420.40us Added
cumulus/parachains/runtimes/people/people-westend/src/weights/pallet_proxy.rs poke_deposit 420.64us Added
cumulus/parachains/runtimes/people/people-rococo/src/weights/pallet_proxy.rs poke_deposit 419.49us Added
cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/pallet_proxy.rs poke_deposit 419.10us Added
cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/pallet_proxy.rs poke_deposit 420.02us Added
cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/pallet_proxy.rs poke_deposit 426.12us Added
cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_proxy.rs poke_deposit 420.42us Added
cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/pallet_proxy.rs poke_deposit 423.69us Added
Command output:

✅ Successful benchmarks of runtimes/pallets:
-- dev: ['pallet_proxy']
-- westend: ['pallet_proxy']
-- rococo: ['pallet_proxy']
-- asset-hub-westend: ['pallet_proxy']
-- asset-hub-rococo: ['pallet_proxy']
-- collectives-westend: ['pallet_proxy']
-- coretime-rococo: ['pallet_proxy']
-- coretime-westend: ['pallet_proxy']
-- people-rococo: ['pallet_proxy']
-- people-westend: ['pallet_proxy']

Copy link
Contributor

@re-gius re-gius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@ggwpez ggwpez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@UtkarshBhardwaj007
Copy link
Member Author

/cmd fmt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T1-FRAME This PR/Issue is related to core FRAME, the framework. T2-pallets This PR/Issue is related to a particular pallet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants