This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[pallet_assets] How to destroy an asset with potentially u32::MAX
accounts?
#12275
Labels
J2-unconfirmed
Issue might be valid, but it’s not yet known.
Z7-question
Issue is a question. Closer should answer.
Comments
github-actions
bot
added
the
J2-unconfirmed
Issue might be valid, but it’s not yet known.
label
Sep 15, 2022
cc @jsidorenko |
cc @tonyalaribe |
What if we change the assets deletion process a bit:
|
|
It's a bit of an edge case, but |
So an alternate solution would be to destroy the maximum number of accounts, and then emit a PartiallyDestroyed event to encourage reexecuting the action to complete destroying the asset. Like the refund and dissolve pattern in crowdloans [Joe edit: changed master to commit to save in the future] |
yeah, that could work as well |
I'll create a PR for this. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
J2-unconfirmed
Issue might be valid, but it’s not yet known.
Z7-question
Issue is a question. Closer should answer.
Hey valuable Substrate maintainers,
I found out, that the witness limits the number of deletions here, but when there are too many accounts for one asset, then a sufficiently high number for the accounts in the witness param would lead to a weight which exceeds the maximum block limit. What could be done, if there are
u32::MAX
accounts with non-zero balances? Then, we couldn't destroy the asset right? Or is the consumed weight withu32::MAX
below the maximum block limit? I don't think so.What can I do to destroy a portion of all accounts? For example one could call an extrinsic multiple times with a small witness to destroy all
u32::MAX
accounts.u32::MAX
should only be an example to get a better understanding of this problemThe text was updated successfully, but these errors were encountered: