-
Notifications
You must be signed in to change notification settings - Fork 834
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
Migrate parachain swaps to Coretime + cancel auctions #3552
Comments
And then for how long will we keep this functionality around? If we inform teams early that they need to swap before the upgrade, what would be the issue? I mean if the lease would not have started, we already refund it. This means that we only speak about leases that are already started, so teams could directly switch. Thus, I don't see any reason why we should implement this |
Worst case as long as there are leases.
The leases might have started already ... although this means, if they perfectly time it they could do the swap before the migration. 😬 For swaps that only become relevant later, you are right the to be swapped para will be refunded. So in total, people have to fear the migration less: It can not happen that you missed the coretime launch and suddenly your planned swap no longer works. Given the simplicity of making this friction free, I don't see why we would not want to do this. Developer Experience is priority. |
Because we add useless code that at some point we need to remove again. We are adding code that increases the likelihood of adding bugs etc. While we could just inform the less than 10 teams to do the swap before the upgrade. Coordinating this takes for sure less time than writing all this code etc. |
The code is already written and is trivial and we have to remove quite a lot of code anyways once leases expired. If automation is that easy, I would always go for automation - it is less error prone. Coordinating those teams is definitely more likely to fail, then this simple piece of code - also it is just a better experience, if things just work. I really want to provide as smooth of an experience as possible. Don't break things, if there is no need. The Coretime upgrade in itself is disruptive enough. Teams are already worried a lot. |
This PR notifies broker pallet for any parachain slot swaps performed on the relay chain. This is achieved by registering an `OnSwap` for the the `coretime` pallet. The hook sends XCM message to the broker chain and invokes a new extrinsic `swap_leases` which updates `Leases` storage item (which keeps the legacy parachain leases). I made two assumptions in this PR: 1. [`Leases`](https://github.com/paritytech/polkadot-sdk/blob/4987d7982461e2e5ffe219cdf71ec697284cea7c/substrate/frame/broker/src/lib.rs#L120) in `broker` pallet and [`Leases`](https://github.com/paritytech/polkadot-sdk/blob/4987d7982461e2e5ffe219cdf71ec697284cea7c/polkadot/runtime/common/src/slots/mod.rs#L118) in `slots` pallet are in sync. 2. `swap_leases` extrinsic from `broker` pallet can be triggered only by root or by the XCM message from the relay chain. If not - the extrinsic will generate an error and do nothing. As a side effect from the changes `OnSwap` trait is moved from runtime/common/traits.rs to runtime/parachains. Otherwise it is not accessible from `broker` pallet. Closes #3552 TODOs: - [x] Weights - [x] Tests --------- Co-authored-by: command-bot <> Co-authored-by: eskimor <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
Reopening because it's still not enabled on Polkadot |
This PR notifies broker pallet for any parachain slot swaps performed on the relay chain. This is achieved by registering an `OnSwap` for the the `coretime` pallet. The hook sends XCM message to the broker chain and invokes a new extrinsic `swap_leases` which updates `Leases` storage item (which keeps the legacy parachain leases). I made two assumptions in this PR: 1. [`Leases`](https://github.com/paritytech/polkadot-sdk/blob/4987d7982461e2e5ffe219cdf71ec697284cea7c/substrate/frame/broker/src/lib.rs#L120) in `broker` pallet and [`Leases`](https://github.com/paritytech/polkadot-sdk/blob/4987d7982461e2e5ffe219cdf71ec697284cea7c/polkadot/runtime/common/src/slots/mod.rs#L118) in `slots` pallet are in sync. 2. `swap_leases` extrinsic from `broker` pallet can be triggered only by root or by the XCM message from the relay chain. If not - the extrinsic will generate an error and do nothing. As a side effect from the changes `OnSwap` trait is moved from runtime/common/traits.rs to runtime/parachains. Otherwise it is not accessible from `broker` pallet. Closes paritytech#3552 TODOs: - [x] Weights - [x] Tests --------- Co-authored-by: command-bot <> Co-authored-by: eskimor <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
Added to Polkadot runtime. |
Teams bid for one para id, only to swap it later on for another one. This is not supported by Coretime, thus they will have a lease on Coretime for the "wrong" para and can not use it. To fix this, I am suggesting the following:
The text was updated successfully, but these errors were encountered: