OpenZeppelin / polkadot-runtime-templates

Runtime Templates for Polkadot Parachains
GNU General Public License v3.0
66 stars 22 forks source link

🏗️ [Core Feature]: Implement automatic renewal of coretime slots #187

Open ozgunozerk opened 7 months ago

ozgunozerk commented 7 months ago

What is the key feature we're aiming to implement?

Follow up on OpenZeppelin/polkadot-generic-runtime-template#186 .

After enabling coretime feature, we should implement auto-renewal feature.

The first acquisition should be manual, but the acquisitions after the first one should be automated.

Contribution Guidelines

ozgunozerk commented 5 months ago

This is enabled on the polkadot/relay-chain side by the broker pallet. Parachains do not need to change their code for automatic renewal.

ggonzalez94 commented 2 months ago

Reopening this issue so we can tackle it in the future. While it is true that renewal is implemented by the broker pallet we still haven't incorporated that into our templates. The goal of this issue would be: Incorporate auto renewal. I think this would involve adding the broker pallet to our templates and using the enable_auto_renew and disable_auto_renew extrinsics. The feature should be optional, and the default should not be renewals, since market price for coretime will always be cheaper than renewal price. Renewals are expected to be used only by bigger projects that want to ensure they get their coretime allocation in the next region

kianenigma commented 1 month ago

The successful user journeys would be:

  1. your template deployed on the template's local RC setup, easily let the user select auto-renewal or not
  2. Same for the template's preferred test network (Paseo? Rococo?)
  3. Same on Kusama and Polkadot

But I am not sure if the former is possible. A new RC+Para setup by zombienet uses some root calls under the hood that will force-register the parachain in the RC. While this method is easier, it is a bit far from reality.

Ideally I would wish to see a test setup created by zombienet resemble reality as much as possible. The benefit of this would be that it would allow teams to test their renewal process on their local test setup as well.