Skip to content

Commit 8e41a9f

Browse files
committed
Apply suggestions
1 parent 8a47738 commit 8e41a9f

File tree

2 files changed

+86
-16
lines changed

2 files changed

+86
-16
lines changed

develop/parachains/deployment/coretime-renewal.md

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ The Coretime chain provides two primary extrinsics for managing the auto-renewal
110110

111111
- If a lease is active, use the timeslice when the lease ends
112112

113-
- `disable_auto_renew(core, task)` - use this extrinsic to stop automatic renewals. This extrinsic also requires that the origin is the sovereign account of the parachain task
113+
- [`disable_auto_renew(core, task)`](https://paritytech.github.io/polkadot-sdk/master/pallet_broker/pallet/struct.Pallet.html#method.disable_auto_renew){target=\_blank} - use this extrinsic to stop automatic renewals. This extrinsic also requires that the origin is the sovereign account of the parachain task
114114

115115
**Parameters:**
116116

@@ -153,10 +153,46 @@ To configure auto-renewal, you'll need to gather specific information for the `e
153153
154154
- **`task`** - use your parachain ID, which can be verified by connecting to your parachain and querying `parachainInfo.parachainId()`
155155
156-
- **workload_end_hint** - if your task only appears in workload, you can leave this value empty. Otherwise, calculate the timeslice when your future assignment ends:
157-
1. Each bulk period is 5040 timeslices (28 days)
158-
2. Add 5040 to the `regionBegin` value, which in this case it `322845` as you can see in the workplan output
159-
3. The value you will put is `327,885 = 322,845 + 5040`
156+
- **`workload_end_hint`** - you should always set it explicitly to avoid misbehavior. This value indicate when your assigned core will expire. Here's how to calculate the correct value based on how your core is assigned:
157+
- If the parachain uses bulk coretime:
158+
159+
Query `broker.saleinfo`. You’ll get a result like:
160+
161+
```json
162+
{
163+
"saleStart": 1544949,
164+
"leadinLength": 100800,
165+
"endPrice": 922760076,
166+
"regionBegin": 322845,
167+
"regionEnd": 327885,
168+
"idealCoresSold": 18,
169+
"coresOffered": 18,
170+
"firstCore": 44,
171+
"selloutPrice": 92272712073,
172+
"coresSold": 18
173+
}
174+
```
175+
176+
- If the core expires in the current sale, use the `regionBegin` value, which in this case is `322845`
177+
178+
- 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`
179+
180+
181+
- If the parachain has a lease:
182+
183+
Query `broker.leases`, which returns entries like:
184+
185+
```json
186+
[
187+
{
188+
"until": 359280,
189+
"task": 2035
190+
},
191+
...
192+
]
193+
```
194+
195+
- Use the `until` value of the lease corresponding to your task. For example, `359280` would be the value for `workload_end_hint` in the case of task `2035`
160196
161197
Once you have these values, construct the extrinsic:
162198
@@ -178,7 +214,6 @@ Once you have these values, construct the extrinsic:
178214
179215
![](/images/develop/parachains/deployment/coretime-renewal/coretime-renewal-4.webp)
180216
181-
182217
### Submit the XCM from your Parachain
183218
184219
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.

llms.txt

Lines changed: 45 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3891,7 +3891,7 @@ Your renewal must be completed during bulk sale #2, ideally during its interlude
38913891

38923892
## Manual Renewal
38933893

3894-
Cores can be renewed by issuing the `broker.renew(core)` extrinsic during the coretime sale period. While this process is straightforward, it requires manual action that must not be overlooked. Failure to complete this renewal step before all available cores are sold could result in your parachain being unable to secure a core for the next operational period.
3894+
Cores can be renewed by issuing the [`broker.renew(core)`](https://paritytech.github.io/polkadot-sdk/master/pallet_broker/pallet/struct.Pallet.html#method.renew){target=\_blank} extrinsic during the coretime sale period. While this process is straightforward, it requires manual action that must not be overlooked. Failure to complete this renewal step before all available cores are sold could result in your parachain being unable to secure a core for the next operational period.
38953895

38963896
To manually renew a core:
38973897

@@ -3922,7 +3922,7 @@ When auto-renewal is enabled, the system follows this process at the start of ea
39223922

39233923
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.
39243924

3925-
There is a limit on the total number of auto-renewals allowed, specified at the runtime level as `T::MaxAutoRenewals` (which is currently set to 100).
3925+
There is a limit on the total number of auto-renewals allowed, specified at the runtime level as [`T::MaxAutoRenewals`](https://paritytech.github.io/polkadot-sdk/master/pallet_broker/pallet/trait.Config.html#associatedtype.MaxAutoRenewals){target=\_blank} (which is currently set to 100).
39263926

39273927
To enable auto-renewal for your parachain, you'll need to configure several components as detailed in the following sections.
39283928

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

39453945
1. Identify the appropriate prefix:
39463946

3947-
- For sibling chains: `0x7369626c` (decodes to `b"sibl"`)
3947+
- For sibling chains - `0x7369626c` (decodes to `b"sibl"`)
39483948

39493949
2. Encode your parachain ID as a u32 [SCALE](https://docs.polkadot.com/polkadot-protocol/basics/data-encoding/#data-types){target=\_blank} value:
39503950

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

39603960
The Coretime chain provides two primary extrinsics for managing the auto-renewal functionality:
39613961

3962-
- `enable_auto_renew(core, task, workload_end_hint)` - use this extrinsic to activate automatic renewals for a specific core. This transaction must originate from the sovereign account of the parachain task
3962+
- [`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
39633963

39643964
**Parameters:**
39653965

@@ -3973,7 +3973,7 @@ The Coretime chain provides two primary extrinsics for managing the auto-renewal
39733973

39743974
- If a lease is active, use the timeslice when the lease ends
39753975

3976-
- `disable_auto_renew(core, task)` - use this extrinsic to stop automatic renewals. This extrinsic also requires that the origin is the sovereign account of the parachain task
3976+
- [`disable_auto_renew(core, task)`](https://paritytech.github.io/polkadot-sdk/master/pallet_broker/pallet/struct.Pallet.html#method.disable_auto_renew){target=\_blank} - use this extrinsic to stop automatic renewals. This extrinsic also requires that the origin is the sovereign account of the parachain task
39773977

39783978
**Parameters:**
39793979

@@ -4016,10 +4016,46 @@ To configure auto-renewal, you'll need to gather specific information for the `e
40164016

40174017
- **`task`** - use your parachain ID, which can be verified by connecting to your parachain and querying `parachainInfo.parachainId()`
40184018

4019-
- **workload_end_hint** - if your task only appears in workload, you can leave this value empty. Otherwise, calculate the timeslice when your future assignment ends:
4020-
1. Each bulk period is 5040 timeslices (28 days)
4021-
2. Add 5040 to the `regionBegin` value, which in this case it `322845` as you can see in the workplan output
4022-
3. The value you will put is `327,885 = 322,845 + 5040`
4019+
- **`workload_end_hint`** - you should always set it explicitly to avoid misbehavior. This value indicate when your assigned core will expire. Here's how to calculate the correct value based on how your core is assigned:
4020+
- If the parachain uses bulk coretime:
4021+
4022+
Query `broker.saleinfo`. You’ll get a result like:
4023+
4024+
```json
4025+
{
4026+
"saleStart": 1544949,
4027+
"leadinLength": 100800,
4028+
"endPrice": 922760076,
4029+
"regionBegin": 322845,
4030+
"regionEnd": 327885,
4031+
"idealCoresSold": 18,
4032+
"coresOffered": 18,
4033+
"firstCore": 44,
4034+
"selloutPrice": 92272712073,
4035+
"coresSold": 18
4036+
}
4037+
```
4038+
4039+
- If the core expires in the current sale, use the `regionBegin` value, which in this case is `322845`
4040+
4041+
- 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`
4042+
4043+
4044+
- If the parachain has a lease:
4045+
4046+
Query `broker.leases`, which returns entries like:
4047+
4048+
```json
4049+
[
4050+
{
4051+
"until": 359280,
4052+
"task": 2035
4053+
},
4054+
...
4055+
]
4056+
```
4057+
4058+
- Use the `until` value of the lease corresponding to your task. For example, `359280` would be the value for `workload_end_hint` in the case of task `2035`
40234059

40244060
Once you have these values, construct the extrinsic:
40254061

@@ -4041,7 +4077,6 @@ Once you have these values, construct the extrinsic:
40414077

40424078
![](/images/develop/parachains/deployment/coretime-renewal/coretime-renewal-4.webp)
40434079

4044-
40454080
### Submit the XCM from your Parachain
40464081

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

0 commit comments

Comments
 (0)