You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: develop/parachains/deployment/coretime-renewal.md
+28-23Lines changed: 28 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ description: Learn how to renew coretime manually or automatically to ensure uni
7
7
8
8
## Introduction
9
9
10
-
Coretime can be purchased in bulk for a period of 28 days, providing access to Polkadot's shared security and interoperability for Polkadot Rollups (Parachains). The bulk purchase of coretime includes a rent-control mechanism that keeps future purchases within a predictable price range of the initial purchase. This allows cores to be renewed at a known price without competing against other participants in the open market.
10
+
Coretime can be purchased in bulk for a period of 28 days, providing access to Polkadot's shared security and interoperability for Polkadot parachains. The bulk purchase of coretime includes a rent-control mechanism that keeps future purchases within a predictable price range of the initial purchase. This allows cores to be renewed at a known price without competing against other participants in the open market.
11
11
12
12
## Bulk Sale Phases
13
13
@@ -125,27 +125,27 @@ To configure auto-renewal, you'll need to gather specific information for the `e
125
125
126
126
**Example for parachain `2000`:**
127
127
128
-
Current assignment (workload)
129
-
```
130
-
[
131
-
[50]
132
-
[{
133
-
mask: 0xffffffffffffffffffff
134
-
assignment: {Task: 2,000}
135
-
}]
136
-
]
137
-
```
138
-
139
-
Future assignment (workplan)
140
-
```
141
-
[
142
-
[[322,845, 48]]
143
-
[{
144
-
mask: 0xffffffffffffffffffff
145
-
assignment: {Task: 2,000}
146
-
}]
147
-
]
148
-
```
128
+
-Current assignment (workload)
129
+
```txt
130
+
[
131
+
[50]
132
+
[{
133
+
mask: 0xffffffffffffffffffff
134
+
assignment: {Task: 2,000}
135
+
}]
136
+
]
137
+
```
138
+
139
+
- Future assignment (workplan)
140
+
```txt
141
+
[
142
+
[[322,845, 48]]
143
+
[{
144
+
mask: 0xffffffffffffffffffff
145
+
assignment: {Task: 2,000}
146
+
}]
147
+
]
148
+
```
149
149
150
150
**Note:** use the core from workplan (`48` in this example) if your task appears there. Only use the core from workload if it's not listed in workplan.
151
151
@@ -246,6 +246,11 @@ Here's how to submit this XCM using Acala (Parachain 2000) as an example:
After successful execution, your parachain should have auto-renewal enabled. To verify this, check the events emitted in the Coretime chain. You should see confirmation events similar to:
249
+
After successful execution, your parachain should have auto-renewal enabled. To verify this, check the events emitted in the Coretime chain. You should see a confirmation event named `broker.AutoRenewalEnabled`, which includes two parameters:
250
+
251
+
- **core** - the core currently assigned to your task, in this example, `48`
252
+
- **task** - the task for which auto-renewal was enabled, in this example, `2000`
253
+
254
+
You can find this event in the list of recent events. It should look similar to the following:
Copy file name to clipboardExpand all lines: llms.txt
+52-51Lines changed: 52 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -3870,21 +3870,21 @@ description: Learn how to renew coretime manually or automatically to ensure uni
3870
3870
3871
3871
## Introduction
3872
3872
3873
-
Coretime can be purchased in bulk for a period of 28 days, providing access to Polkadot's shared security and interoperability for Polkadot Rollups (Parachains). The bulk purchase of coretime includes a rent-control mechanism that keeps future purchases within a predictable price range of the initial purchase. This allows cores to be renewed at a known price without competing against other participants in the open market.
3873
+
Coretime can be purchased in bulk for a period of 28 days, providing access to Polkadot's shared security and interoperability for Polkadot parachains. The bulk purchase of coretime includes a rent-control mechanism that keeps future purchases within a predictable price range of the initial purchase. This allows cores to be renewed at a known price without competing against other participants in the open market.
3874
3874
3875
3875
## Bulk Sale Phases
3876
3876
3877
3877
The bulk sale process consists of three distinct phases:
3878
3878
3879
-
- **Interlude phase** - the period between bulk sales when renewals are prioritized
3880
-
- **Lead-in phase** - following the interlude phase, a new `start_price` is set, and a Dutch auction begins, lasting for `leadin_length` blocks. During this phase, prices experience downward pressure as the system aims to find market equilibrium. The final price at the end of this phase becomes the `regular_price`, which will be used in the subsequent fixed price phase
3881
-
- **Fixed price phase** - the final phase where remaining cores are sold at the `regular_price` established during the leading phase. This provides a stable and predictable pricing environment for participants who did not purchase during the price discovery period
3879
+
1. **Interlude phase** - the period between bulk sales when renewals are prioritized
3880
+
2. **Lead-in phase** - following the interlude phase, a new `start_price` is set, and a Dutch auction begins, lasting for `leadin_length` blocks. During this phase, prices experience downward pressure as the system aims to find market equilibrium. The final price at the end of this phase becomes the `regular_price`, which will be used in the subsequent fixed price phase
3881
+
3. **Fixed price phase** - the final phase where remaining cores are sold at the `regular_price` established during the lead-in phase. This provides a stable and predictable pricing environment for participants who did not purchase during the price discovery period
3882
3882
3883
3883
For more comprehensive information about the coretime sales process, refer to the [Coretime Sales](https://wiki.polkadot.network/learn/learn-agile-coretime/#coretime-sales){target=\_blank} section in the Polkadot Wiki.
3884
3884
3885
3885
## Renewal Timing
3886
3886
3887
-
While renewals can technically be made during any phase, it is strongly recommended to complete renewals during the interlude phase. Delaying renewal introduces the risk that the core could be sold to another participant in the market, preventing successful renewal. Renewals must be initiated well in advance to avoid the aforementioned scenario.
3887
+
While renewals can technically be made during any phase, it is strongly recommended that they be completed during the interlude phase. Delaying renewal introduces the risk that the core could be sold to another market participant, preventing successful renewal. Renewals must be initiated well in advance to avoid the scenario above.
3888
3888
3889
3889
For example, if you purchase a core in bulk sale #1, you obtain coretime for the upcoming bulk period (during which bulk sale #2 takes place).
3890
3890
Your renewal must be completed during bulk sale #2, ideally during its interlude phase, to secure coretime for the subsequent period.
For optimal results, the renewal should be performed during the interlude phase. Upon successful submission, your core will be renewed for the next coretime period, ensuring continued operation of your parachain.
3910
+
For optimal results, the renewal should be performed during the interlude phase. Upon successful submission, your core will be renewed for the next coretime period, ensuring the continued operation of your parachain.
3911
3911
3912
-
## AutoRenewal
3912
+
## Auto-Renewal
3913
3913
3914
-
The coretime auto-renewal feature simplifies the process of maintaining continuous coretime allocation by automatically renewing cores at the beginning of each sale period. This eliminates the need for parachains to manually renew their cores for each bulk period, reducing operational overhead and the risk of missing renewal deadlines.
3914
+
The coretime auto-renewal feature simplifies maintaining continuous coretime allocation by automatically renewing cores at the beginning of each sale period. This eliminates the need for parachains to manually renew their cores for each bulk period, reducing operational overhead and the risk of missing renewal deadlines.
3915
3915
3916
3916
When auto-renewal is enabled, the system follows this process at the start of each sale:
3917
3917
3918
3918
1. The system scans all registered auto-renewal records
3919
-
2. For each record, it attempts to process renewal payments from the task's [sovereign account](/polkadot-protocol/glossary/#sovereign-account){target=\_blank} (which is the sibling account on the Coretime chain derived from the Parachain ID)
3919
+
2. For each record, it attempts to process renewal payments from the task's [sovereign account](/polkadot-protocol/glossary/#sovereign-account){target=\_blank} (which is the sibling account on the Coretime chain derived from the parachain ID)
3920
3920
3. Upon successful payment, the system emits a `Renewed` event and secures the core for the next period
3921
3921
4. If payment fails due to insufficient funds or other issues, the system emits an `AutoRenewalFailed` event
3922
3922
3923
-
Even if an auto-renewal attempt fails, the auto-renewal setting remains active for subsequent sales. This means once you've configured auto-renewal, the setting persists across multiple periods.
3923
+
Even if an auto-renewal attempt fails, the auto-renewal setting remains active for subsequent sales. This means the setting persists across multiple periods once you've configured auto-renewal.
3924
3924
3925
-
To enable auto-renewal for your parachain, you'll need to configure several components as detailed in the following sections.
3925
+
To enable auto-renewal for your parachain, you must configure several components, as detailed in the following sections.
3926
3926
3927
-
### Set Up HRMP Channel
3927
+
### Set Up an HRMP Channel
3928
3928
3929
-
A Horizontal Relay-routed Message Passing (HRMP) channel must be open between your parachain and the Coretime System Chain before auto-renewal can be configured.
3929
+
A Horizontal Relay-routed Message Passing (HRMP) channel must be opened between your parachain and the Coretime system chain before auto-renewal can be configured.
3930
3930
3931
3931
For instructions on establishing this connection, consult the [Opening HRMP Channels with System Parachains](/tutorials/interoperability/xcm-channels/para-to-system/){target=\_blank} guide.
3932
3932
@@ -3936,7 +3936,7 @@ The [sovereign account](https://github.com/polkadot-fellows/xcm-format/blob/1072
3936
3936
3937
3937
To determine your parachain's sovereign account address, you can:
3938
3938
3939
-
- Use the "Para ID" to Address section in [Substrate Utilities](https://www.shawntabrizi.com/substrate-js-utilities/){target=\_blank} with the **Sibling** option selected
3939
+
- Use the **"Para ID" to Address** section in [Substrate Utilities](https://www.shawntabrizi.com/substrate-js-utilities/){target=\_blank} with the **Sibling** option selected
3940
3940
3941
3941
- Calculate it manually:
3942
3942
@@ -3957,7 +3957,7 @@ To determine your parachain's sovereign account address, you can:
3957
3957
3958
3958
The Coretime chain provides two primary extrinsics for managing the auto-renewal functionality:
3959
3959
3960
-
- [`enable_auto_renew(core, task, workload_end_hint)`](https://paritytech.github.io/polkadot-sdk/master/pallet_broker/pallet/struct.Pallet.html#method.enable_auto_renew){target=\_blank} - use this extrinsic to activate automatic renewals for a specific core. This transaction must originate from the sovereign account of the parachain task
3960
+
- [**`enable_auto_renew(core, task, workload_end_hint)`**](https://paritytech.github.io/polkadot-sdk/master/pallet_broker/pallet/struct.Pallet.html#method.enable_auto_renew){target=\_blank} - use this extrinsic to activate automatic renewals for a specific core. This transaction must originate from the sovereign account of the parachain task
3961
3961
3962
3962
**Parameters:**
3963
3963
@@ -3975,49 +3975,47 @@ The Coretime chain provides two primary extrinsics for managing the auto-renewal
3975
3975
3976
3976
**Parameters:**
3977
3977
3978
-
- **`core`**: the core currently assigned to the task
3979
-
- **`task`**: the task for which auto-renewal is enabled
3978
+
- **`core`** - the core currently assigned to the task
3979
+
- **`task`** - the task for which auto-renewal is enabled
3980
3980
3981
-
### Construct the Enable AutoRenewal Extrinsic
3981
+
### Construct the Enable Auto-Renewal Extrinsic
3982
3982
3983
3983
To configure auto-renewal, you'll need to gather specific information for the `enable_auto_renew` extrinsic parameters:
3984
3984
3985
3985
- **`core`** - identify which core your parachain is assigned to when the it expires. This requires checking both current assignments and planned future assignments:
3986
-
- For current period - query `broker.workload()`
3987
-
- For next period - query `broker.workplan()`
3986
+
- **For current period** - query `broker.workload()`
3987
+
- **For next period** - query `broker.workplan()`
3988
3988
3989
3989
**Example for parachain `2000`:**
3990
3990
3991
-
Current assignment (workload)
3992
-
```
3993
-
[
3994
-
[50]
3995
-
[{
3996
-
mask: 0xffffffffffffffffffff
3997
-
assignment: {Task: 2,000}
3998
-
}]
3999
-
]
4000
-
```
3991
+
- Current assignment (workload)
3992
+
```txt
3993
+
[
3994
+
[50]
3995
+
[{
3996
+
mask: 0xffffffffffffffffffff
3997
+
assignment: {Task: 2,000}
3998
+
}]
3999
+
]
4000
+
```
4001
4001
4002
-
Future assignment (workplan)
4003
-
```
4004
-
[
4005
-
[[322,845, 48]]
4006
-
[{
4007
-
mask: 0xffffffffffffffffffff
4008
-
assignment: {Task: 2,000}
4009
-
}]
4010
-
]
4011
-
```
4002
+
- Future assignment (workplan)
4003
+
```txt
4004
+
[
4005
+
[[322,845, 48]]
4006
+
[{
4007
+
mask: 0xffffffffffffffffffff
4008
+
assignment: {Task: 2,000}
4009
+
}]
4010
+
]
4011
+
```
4012
4012
4013
4013
**Note:** use the core from workplan (`48` in this example) if your task appears there. Only use the core from workload if it's not listed in workplan.
4014
4014
4015
4015
- **`task`** - use your parachain ID, which can be verified by connecting to your parachain and querying `parachainInfo.parachainId()`
4016
4016
4017
4017
- **`workload_end_hint`** - you should always set it explicitly to avoid misbehavior. This value indicates when your assigned core will expire. Here's how to calculate the correct value based on how your core is assigned:
4018
-
- If the parachain uses bulk coretime:
4019
-
4020
-
Query `broker.saleinfo`. You’ll get a result like:
4018
+
- If the parachain uses bulk coretime, query `broker.saleinfo`. You’ll get a result like:
4021
4019
4022
4020
```json
4023
4021
{
@@ -4039,9 +4037,7 @@ To configure auto-renewal, you'll need to gather specific information for the `e
4039
4037
- If the core has already been renewed and will expire in the next sale, use the `regionEnd` value. In this example, that would be `327885`
4040
4038
4041
4039
4042
-
- If the parachain has a lease:
4043
-
4044
-
Query `broker.leases`, which returns entries like:
4040
+
- If the parachain has a lease, query `broker.leases`, which returns entries like:
4045
4041
4046
4042
```json
4047
4043
[
@@ -4069,15 +4065,15 @@ Once you have these values, construct the extrinsic:
For parachain `2000` on core `48` with `workload_end_hint` `327885`, the encoded call data would be:`0x32153000d007000001cd000500`
4068
+
For parachain `2000` on core `48` with `workload_end_hint` `327885`, the **encoded call data** is:`0x32153000d007000001cd000500`
4073
4069
4074
-
3. Check the transaction weight for executing the call. You can estimate this by executing the `transactionPaymentCallApi.queryCallInfo` runtime call with the encoded call data previously obtained:
4070
+
3. Check the transaction weight for executing the call. You can estimate this by executing the `transactionPaymentCallApi.queryCallInfo` runtime call with the encoded call data previously obtained
To activate auto-renewal, you must submit an XCM from your parachain to the Coretime chain using Root origin. This can be done either through the sudo pallet (if available) or through your parachain's governance system.
4076
+
To activate auto-renewal, you must submit an XCM from your parachain to the Coretime chain using Root origin. This can be done through the sudo pallet (if available) or your parachain's governance system.
4081
4077
4082
4078
The XCM needs to execute these operations:
4083
4079
@@ -4113,7 +4109,12 @@ Here's how to submit this XCM using Acala (Parachain 2000) as an example:
After successful execution, your parachain should have auto-renewal enabled. To verify this, check the events emitted in the Coretime chain. You should see confirmation events similar to:
4112
+
After successful execution, your parachain should have auto-renewal enabled. To verify this, check the events emitted in the Coretime chain. You should see a confirmation event named `broker.AutoRenewalEnabled`, which includes two parameters:
4113
+
4114
+
- **core** - the core currently assigned to your task, in this example, `48`
4115
+
- **task** - the task for which auto-renewal was enabled, in this example, `2000`
4116
+
4117
+
You can find this event in the list of recent events. It should look similar to the following:
0 commit comments