-
Notifications
You must be signed in to change notification settings - Fork 798
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
Coretime auto renew #4351
Comments
CC @seadanda |
Would be a welcome improvement based on feedback from several teams |
Would like to work on this over the weekend if available. |
This should be a two step process, otherwise a parachain could set any account as target without requiring the @bkchr did you have something else in mind maybe? |
No. Just didn't thought enough :D Probably the best is to not have |
But this can be just any account? For example, I could set myself as the payment account, drain my account, and then upon the next renewal, it would fail. Given that the broker pallet is quite abstract, it doesn't assume that cores are assigned to parachains. But would it be acceptable to assume each 'task' has an account associated with it? (basically each parachain has its sovereign account) I would probably add a new type to the broker pallet config which would implement conversion from |
Yes that is right 🙈
Sounds like a reasonable approach and probably the best we can do. |
This PR adds functionality that allows tasks to enable auto-renewal. Each task eligible for renewal can enable auto-renewal. A new storage value is added to track all the cores with auto-renewal enabled and the associated task running on the core. The `BoundedVec` is sorted by `CoreIndex` to make disabling auto-renewal more efficient. Cores are renewed at the start of a new bulk sale. If auto-renewal fails(e.g. due to the sovereign account of the task not holding sufficient balance), an event will be emitted, and the renewal will continue for the other cores. The two added extrinsics are: - `enable_auto_renew`: Extrinsic for enabling auto renewal. - `disable_auto_renew`: Extrinsic for disabling auto renewal. TODOs: - [x] Write benchmarks for the newly added extrinsics. Closes: #4351 --------- Co-authored-by: Dónal Murray <donalm@seadanda.dev>
This PR adds functionality that allows tasks to enable auto-renewal. Each task eligible for renewal can enable auto-renewal. A new storage value is added to track all the cores with auto-renewal enabled and the associated task running on the core. The `BoundedVec` is sorted by `CoreIndex` to make disabling auto-renewal more efficient. Cores are renewed at the start of a new bulk sale. If auto-renewal fails(e.g. due to the sovereign account of the task not holding sufficient balance), an event will be emitted, and the renewal will continue for the other cores. The two added extrinsics are: - `enable_auto_renew`: Extrinsic for enabling auto renewal. - `disable_auto_renew`: Extrinsic for disabling auto renewal. TODOs: - [x] Write benchmarks for the newly added extrinsics. Closes: paritytech#4351 --------- Co-authored-by: Dónal Murray <donalm@seadanda.dev>
Currently parachains that want to renew their slot need to do this every sale in the first week. They can also do this afterwards, but then all cores could already have been sold. It would be nice to support an auto renew. Parachains could opt-in to this auto renew and then only would need to ensure that the account for doing the auto renew has enough funds.
Basically the following transaction should be added:
First time this is called, the core should be renewed automatically (maybe it was already and we need to check "the future") and then the core & account is to some list. When rotating the sales this list should be iterated and all cores should be automatically renewed.
The text was updated successfully, but these errors were encountered: