-
Notifications
You must be signed in to change notification settings - Fork 2.6k
nomination-pools: allow pool-ids to be reused #12001
Comments
Hello @kianenigma would like to get a clear understanding of what this will accomplish. |
I think my description is pretty exact, don't have much to add to it after reading it again. What I would consider is just keeping this fully backwards compatible and creating a new transaction |
We would then need an |
Thinking out loud, I believe it shouldn't be too hard to to keep track of all the pools that are destroyed and ready to be claimed. In that case we would not really need another fn With current solution, we might need to expose an api to the frontend client to query a reclaimable |
Currently, pool ids only ever increase. While generally we suggest using a
MaxPools
limits, this allows one to spam the pool ids and consume a lot of them by creating a pool and immediately destroying it.This is not a cheap or fast process, so it is not a huge risk either. Nonetheless, it would be nice to have a simple id-reuse system.
A simple way to do it is that
create
can have anOption<PoolId>
. IfNone
, the sender wants to useLastPoolId + 1
. IfSome(claim)
, the sender is claiming that they knowclaim
is free.claim
must always be less thenLastPoolId
.The text was updated successfully, but these errors were encountered: