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
+25-29Lines changed: 25 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,15 @@ Coretime can be purchased in bulk for a period of 28 days, providing access to P
13
13
14
14
The bulk sale process consists of three distinct phases:
15
15
16
-
-**Interlude phase** - the period between bulk sales when renewals are prioritized
17
-
-**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
18
-
-**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
16
+
1.**Interlude phase** - the period between bulk sales when renewals are prioritized
17
+
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
18
+
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
19
19
20
20
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.
21
21
22
22
## Renewal Timing
23
23
24
-
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.
24
+
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.
25
25
26
26
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).
27
27
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.
47
+
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.
48
48
49
-
## AutoRenewal
49
+
## Auto-Renewal
50
50
51
-
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.
51
+
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.
52
52
53
53
When auto-renewal is enabled, the system follows this process at the start of each sale:
54
54
55
55
1. The system scans all registered auto-renewal records
56
-
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)
56
+
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)
57
57
3. Upon successful payment, the system emits a `Renewed` event and secures the core for the next period
58
58
4. If payment fails due to insufficient funds or other issues, the system emits an `AutoRenewalFailed` event
59
59
60
-
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.
60
+
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.
61
61
62
-
To enable auto-renewal for your parachain, you'll need to configure several components as detailed in the following sections.
62
+
To enable auto-renewal for your parachain, you must configure several components, as detailed in the following sections.
63
63
64
-
### Set Up HRMP Channel
64
+
### Set Up an HRMP Channel
65
65
66
-
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.
66
+
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.
67
67
68
68
For instructions on establishing this connection, consult the [Opening HRMP Channels with System Parachains](/tutorials/interoperability/xcm-channels/para-to-system/){target=\_blank} guide.
69
69
@@ -73,7 +73,7 @@ The [sovereign account](https://github.com/polkadot-fellows/xcm-format/blob/1072
73
73
74
74
To determine your parachain's sovereign account address, you can:
75
75
76
-
- Use the "Para ID" to Address section in [Substrate Utilities](https://www.shawntabrizi.com/substrate-js-utilities/){target=\_blank} with the **Sibling** option selected
76
+
- Use the **"Para ID" to Address** section in [Substrate Utilities](https://www.shawntabrizi.com/substrate-js-utilities/){target=\_blank} with the **Sibling** option selected
77
77
78
78
- Calculate it manually:
79
79
@@ -94,7 +94,7 @@ To determine your parachain's sovereign account address, you can:
94
94
95
95
The Coretime chain provides two primary extrinsics for managing the auto-renewal functionality:
96
96
97
-
-[`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
97
+
-[**`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
98
98
99
99
**Parameters:**
100
100
@@ -112,16 +112,16 @@ The Coretime chain provides two primary extrinsics for managing the auto-renewal
112
112
113
113
**Parameters:**
114
114
115
-
-**`core`**: the core currently assigned to the task
116
-
-**`task`**: the task for which auto-renewal is enabled
115
+
-**`core`** - the core currently assigned to the task
116
+
-**`task`** - the task for which auto-renewal is enabled
117
117
118
-
### Construct the Enable AutoRenewal Extrinsic
118
+
### Construct the Enable Auto-Renewal Extrinsic
119
119
120
120
To configure auto-renewal, you'll need to gather specific information for the `enable_auto_renew` extrinsic parameters:
121
121
122
122
-**`core`** - identify which core your parachain is assigned to when the it expires. This requires checking both current assignments and planned future assignments:
123
-
- For current period - query `broker.workload()`
124
-
- For next period - query `broker.workplan()`
123
+
-**For current period** - query `broker.workload()`
124
+
-**For next period** - query `broker.workplan()`
125
125
126
126
**Example for parachain `2000`:**
127
127
@@ -152,9 +152,7 @@ To configure auto-renewal, you'll need to gather specific information for the `e
152
152
- **`task`** - use your parachain ID, which can be verified by connecting to your parachain and querying `parachainInfo.parachainId()`
153
153
154
154
- **`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:
155
-
- If the parachain uses bulk coretime:
156
-
157
-
Query `broker.saleinfo`. You’ll get a result like:
155
+
- If the parachain uses bulk coretime, query `broker.saleinfo`. You’ll get a result like:
158
156
159
157
```json
160
158
{
@@ -176,9 +174,7 @@ To configure auto-renewal, you'll need to gather specific information for the `e
176
174
- 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`
177
175
178
176
179
-
- If the parachain has a lease:
180
-
181
-
Query `broker.leases`, which returns entries like:
177
+
- If the parachain has a lease, query `broker.leases`, which returns entries like:
182
178
183
179
```json
184
180
[
@@ -206,15 +202,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`
205
+
For parachain `2000` on core `48` with `workload_end_hint` `327885`, the **encoded call data** is:`0x32153000d007000001cd000500`
210
206
211
-
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:
207
+
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.
213
+
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.
0 commit comments