Skip to content

Commit 7fad330

Browse files
0xLuccaeshaben
andauthored
Apply suggestions from code review
Co-authored-by: Erin Shaben <[email protected]>
1 parent ed58cf5 commit 7fad330

File tree

1 file changed

+25
-29
lines changed

1 file changed

+25
-29
lines changed

develop/parachains/deployment/coretime-renewal.md

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ Coretime can be purchased in bulk for a period of 28 days, providing access to P
1313

1414
The bulk sale process consists of three distinct phases:
1515

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
1919

2020
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.
2121

2222
## Renewal Timing
2323

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.
2525

2626
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).
2727
Your renewal must be completed during bulk sale #2, ideally during its interlude phase, to secure coretime for the subsequent period.
@@ -44,26 +44,26 @@ To manually renew a core:
4444

4545
![](/images/develop/parachains/deployment/coretime-renewal/coretime-renewal-2.webp)
4646

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 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.
4848

49-
## Auto Renewal
49+
## Auto-Renewal
5050

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.
5252

5353
When auto-renewal is enabled, the system follows this process at the start of each sale:
5454

5555
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)
5757
3. Upon successful payment, the system emits a `Renewed` event and secures the core for the next period
5858
4. If payment fails due to insufficient funds or other issues, the system emits an `AutoRenewalFailed` event
5959

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.
6161

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.
6363

64-
### Set Up HRMP Channel
64+
### Set Up an HRMP Channel
6565

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.
6767

6868
For instructions on establishing this connection, consult the [Opening HRMP Channels with System Parachains](/tutorials/interoperability/xcm-channels/para-to-system/){target=\_blank} guide.
6969

@@ -73,7 +73,7 @@ The [sovereign account](https://github.com/polkadot-fellows/xcm-format/blob/1072
7373

7474
To determine your parachain's sovereign account address, you can:
7575

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
7777

7878
- Calculate it manually:
7979

@@ -94,7 +94,7 @@ To determine your parachain's sovereign account address, you can:
9494

9595
The Coretime chain provides two primary extrinsics for managing the auto-renewal functionality:
9696

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
9898

9999
**Parameters:**
100100

@@ -112,16 +112,16 @@ The Coretime chain provides two primary extrinsics for managing the auto-renewal
112112

113113
**Parameters:**
114114

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
117117

118-
### Construct the Enable Auto Renewal Extrinsic
118+
### Construct the Enable Auto-Renewal Extrinsic
119119

120120
To configure auto-renewal, you'll need to gather specific information for the `enable_auto_renew` extrinsic parameters:
121121

122122
- **`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()`
125125

126126
**Example for parachain `2000`:**
127127

@@ -152,9 +152,7 @@ To configure auto-renewal, you'll need to gather specific information for the `e
152152
- **`task`** - use your parachain ID, which can be verified by connecting to your parachain and querying `parachainInfo.parachainId()`
153153
154154
- **`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:
158156
159157
```json
160158
{
@@ -176,9 +174,7 @@ To configure auto-renewal, you'll need to gather specific information for the `e
176174
- 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`
177175
178176
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:
182178
183179
```json
184180
[
@@ -206,15 +202,15 @@ Once you have these values, construct the extrinsic:
206202
207203
![](/images/develop/parachains/deployment/coretime-renewal/coretime-renewal-3.webp)
208204
209-
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`
210206
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
212208
213209
![](/images/develop/parachains/deployment/coretime-renewal/coretime-renewal-4.webp)
214210
215-
### Submit the XCM from your Parachain
211+
### Submit the XCM from Your Parachain
216212
217-
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.
218214
219215
The XCM needs to execute these operations:
220216

0 commit comments

Comments
 (0)