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
+41-6Lines changed: 41 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ The Coretime chain provides two primary extrinsics for managing the auto-renewal
110
110
111
111
- If a lease is active, use the timeslice when the lease ends
112
112
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
114
114
115
115
**Parameters:**
116
116
@@ -153,10 +153,46 @@ To configure auto-renewal, you'll need to gather specific information for the `e
153
153
154
154
- **`task`** - use your parachain ID, which can be verified by connecting to your parachain and querying `parachainInfo.parachainId()`
155
155
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`
160
196
161
197
Once you have these values, construct the extrinsic:
162
198
@@ -178,7 +214,6 @@ Once you have these values, construct the extrinsic:
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.
Copy file name to clipboardExpand all lines: llms.txt
+45-10Lines changed: 45 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -3891,7 +3891,7 @@ Your renewal must be completed during bulk sale #2, ideally during its interlude
3891
3891
3892
3892
## Manual Renewal
3893
3893
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.
3895
3895
3896
3896
To manually renew a core:
3897
3897
@@ -3922,7 +3922,7 @@ When auto-renewal is enabled, the system follows this process at the start of ea
3922
3922
3923
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.
3924
3924
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).
3926
3926
3927
3927
To enable auto-renewal for your parachain, you'll need to configure several components as detailed in the following sections.
3928
3928
@@ -3944,7 +3944,7 @@ To determine your parachain's sovereign account address, you can:
3944
3944
3945
3945
1. Identify the appropriate prefix:
3946
3946
3947
-
- For sibling chains: `0x7369626c` (decodes to `b"sibl"`)
3947
+
- For sibling chains - `0x7369626c` (decodes to `b"sibl"`)
3948
3948
3949
3949
2. Encode your parachain ID as a u32 [SCALE](https://docs.polkadot.com/polkadot-protocol/basics/data-encoding/#data-types){target=\_blank} value:
3950
3950
@@ -3959,7 +3959,7 @@ To determine your parachain's sovereign account address, you can:
3959
3959
3960
3960
The Coretime chain provides two primary extrinsics for managing the auto-renewal functionality:
3961
3961
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
3963
3963
3964
3964
**Parameters:**
3965
3965
@@ -3973,7 +3973,7 @@ The Coretime chain provides two primary extrinsics for managing the auto-renewal
3973
3973
3974
3974
- If a lease is active, use the timeslice when the lease ends
3975
3975
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
3977
3977
3978
3978
**Parameters:**
3979
3979
@@ -4016,10 +4016,46 @@ To configure auto-renewal, you'll need to gather specific information for the `e
4016
4016
4017
4017
- **`task`** - use your parachain ID, which can be verified by connecting to your parachain and querying `parachainInfo.parachainId()`
4018
4018
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`
4023
4059
4024
4060
Once you have these values, construct the extrinsic:
4025
4061
@@ -4041,7 +4077,6 @@ Once you have these values, construct the extrinsic:
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