Skip to content

Commit 4873967

Browse files
committed
Extract snippets
1 parent 680903b commit 4873967

File tree

5 files changed

+78
-70
lines changed

5 files changed

+78
-70
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"collatorSelection": {
3+
"candidacyBond": 16000000000,
4+
"desiredCandidates": 0,
5+
"invulnerables": [
6+
"INSERT_ACCOUNT_ID_COLLATOR_1",
7+
"INSERT_ACCOUNT_ID_COLLATOR_2",
8+
"INSERT_ACCOUNT_ID_COLLATOR_3"
9+
]
10+
}
11+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div id="termynal" data-termynal>
2+
<span data-ty="input"><span class="file-path"></span>docker run -it parity/subkey:latest generate --scheme sr25519</span>
3+
<span> <br />Secret phrase: lemon play remain picture leopard frog mad bridge hire hazard best buddy <br />Network ID: substrate <br />Secret seed: 0xb748b501de061bae1fcab1c0b814255979d74d9637b84e06414a57a1a149c004 <br />Public key (hex): 0xf4ec62ec6e70a3c0f8dcbe0531e2b1b8916cf16d30635bbe9232f6ed3f0bf422 <br />Account ID: 0xf4ec62ec6e70a3c0f8dcbe0531e2b1b8916cf16d30635bbe9232f6ed3f0bf422 <br />Public key (SS58): 5HbqmBBJ5ALUzho7tw1k1jEgKBJM7dNsQwrtfSfUskT1a3oe <br />SS58 Address: 5HbqmBBJ5ALUzho7tw1k1jEgKBJM7dNsQwrtfSfUskT1a3oe </span>
4+
</div>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"session": {
3+
"keys": [
4+
[
5+
"INSERT_ACCOUNT_ID_COLLATOR_1",
6+
"INSERT_ACCOUNT_ID_COLLATOR_1",
7+
{
8+
"aura": "INSERT_SESSION_KEY_COLLATOR_1"
9+
}
10+
],
11+
[
12+
"INSERT_ACCOUNT_ID_COLLATOR_2",
13+
"INSERT_ACCOUNT_ID_COLLATOR_2",
14+
{
15+
"aura": "INSERT_SESSION_KEY_COLLATOR_2"
16+
}
17+
],
18+
[
19+
"INSERT_ACCOUNT_ID_COLLATOR_3",
20+
"INSERT_ACCOUNT_ID_COLLATOR_3",
21+
{
22+
"aura": "INSERT_SESSION_KEY_COLLATOR_3"
23+
}
24+
]
25+
],
26+
"nonAuthorityKeys": []
27+
}
28+
}

develop/parachains/deployment/generate-chain-specs.md

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ docker run -it parity/subkey:latest generate --scheme sr25519
140140

141141
The output should look similar to the following:
142142

143-
--8<-- 'code/tutorials/polkadot-sdk/parachains/zero-to-hero/deploy-to-testnet/key.html'
143+
--8<-- 'code/develop/parachains/deployment/generate-chain-specs/key.html'
144144

145145
Ensure that this command is executed twice to generate the keys for both the account and session keys. Save them for future reference.
146146

@@ -151,15 +151,7 @@ After generating the plain chain specification, you need to edit this file by in
151151
In the `collatorSelection.invulnerables` array, add the SS58 addresses (account keys) of your collators. These addresses will be automatically included in the active collator set:
152152

153153
```json
154-
"collatorSelection": {
155-
"candidacyBond": 16000000000,
156-
"desiredCandidates": 0,
157-
"invulnerables": [
158-
"INSERT_ACCOUNT_ID_COLLATOR_1",
159-
"INSERT_ACCOUNT_ID_COLLATOR_2",
160-
"INSERT_ACCOUNT_ID_COLLATOR_3"
161-
]
162-
}
154+
--8<-- 'code/develop/parachains/deployment/generate-chain-specs/invulnerables.json:2:10'
163155
```
164156

165157
- **candidacyBond**: Minimum stake required for collator candidates (in planck units)
@@ -173,32 +165,7 @@ In the `collatorSelection.invulnerables` array, add the SS58 addresses (account
173165
For each invulnerable collator, add a corresponding entry in the `session.keys` array. This maps each collator's account ID to their session keys:
174166

175167
```json
176-
"session": {
177-
"keys": [
178-
[
179-
"INSERT_ACCOUNT_ID_COLLATOR_1",
180-
"INSERT_ACCOUNT_ID_COLLATOR_1",
181-
{
182-
"aura": "INSERT_SESSION_KEY_COLLATOR_1"
183-
}
184-
],
185-
[
186-
"INSERT_ACCOUNT_ID_COLLATOR_2",
187-
"INSERT_ACCOUNT_ID_COLLATOR_2",
188-
{
189-
"aura": "INSERT_SESSION_KEY_COLLATOR_2"
190-
}
191-
],
192-
[
193-
"INSERT_ACCOUNT_ID_COLLATOR_3",
194-
"INSERT_ACCOUNT_ID_COLLATOR_3",
195-
{
196-
"aura": "INSERT_SESSION_KEY_COLLATOR_3"
197-
}
198-
]
199-
],
200-
"nonAuthorityKeys": []
201-
}
168+
--8<-- 'code/develop/parachains/deployment/generate-chain-specs/session-keys.json:2:27'
202169
```
203170

204171
## Where to Go Next

llms.txt

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4466,15 +4466,14 @@ After generating the plain chain specification, you need to edit this file by in
44664466
In the `collatorSelection.invulnerables` array, add the SS58 addresses (account keys) of your collators. These addresses will be automatically included in the active collator set:
44674467

44684468
```json
4469-
"collatorSelection": {
4470-
"candidacyBond": 16000000000,
4471-
"desiredCandidates": 0,
4472-
"invulnerables": [
4473-
"INSERT_ACCOUNT_ID_COLLATOR_1",
4474-
"INSERT_ACCOUNT_ID_COLLATOR_2",
4475-
"INSERT_ACCOUNT_ID_COLLATOR_3"
4476-
]
4477-
}
4469+
"candidacyBond": 16000000000,
4470+
"desiredCandidates": 0,
4471+
"invulnerables": [
4472+
"INSERT_ACCOUNT_ID_COLLATOR_1",
4473+
"INSERT_ACCOUNT_ID_COLLATOR_2",
4474+
"INSERT_ACCOUNT_ID_COLLATOR_3"
4475+
]
4476+
}
44784477
```
44794478

44804479
- **candidacyBond**: Minimum stake required for collator candidates (in planck units)
@@ -4488,32 +4487,31 @@ In the `collatorSelection.invulnerables` array, add the SS58 addresses (account
44884487
For each invulnerable collator, add a corresponding entry in the `session.keys` array. This maps each collator's account ID to their session keys:
44894488

44904489
```json
4491-
"session": {
4492-
"keys": [
4493-
[
4494-
"INSERT_ACCOUNT_ID_COLLATOR_1",
4495-
"INSERT_ACCOUNT_ID_COLLATOR_1",
4496-
{
4497-
"aura": "INSERT_SESSION_KEY_COLLATOR_1"
4498-
}
4499-
],
4500-
[
4501-
"INSERT_ACCOUNT_ID_COLLATOR_2",
4502-
"INSERT_ACCOUNT_ID_COLLATOR_2",
4503-
{
4504-
"aura": "INSERT_SESSION_KEY_COLLATOR_2"
4505-
}
4490+
"keys": [
4491+
[
4492+
"INSERT_ACCOUNT_ID_COLLATOR_1",
4493+
"INSERT_ACCOUNT_ID_COLLATOR_1",
4494+
{
4495+
"aura": "INSERT_SESSION_KEY_COLLATOR_1"
4496+
}
4497+
],
4498+
[
4499+
"INSERT_ACCOUNT_ID_COLLATOR_2",
4500+
"INSERT_ACCOUNT_ID_COLLATOR_2",
4501+
{
4502+
"aura": "INSERT_SESSION_KEY_COLLATOR_2"
4503+
}
4504+
],
4505+
[
4506+
"INSERT_ACCOUNT_ID_COLLATOR_3",
4507+
"INSERT_ACCOUNT_ID_COLLATOR_3",
4508+
{
4509+
"aura": "INSERT_SESSION_KEY_COLLATOR_3"
4510+
}
4511+
]
45064512
],
4507-
[
4508-
"INSERT_ACCOUNT_ID_COLLATOR_3",
4509-
"INSERT_ACCOUNT_ID_COLLATOR_3",
4510-
{
4511-
"aura": "INSERT_SESSION_KEY_COLLATOR_3"
4512-
}
4513-
]
4514-
],
4515-
"nonAuthorityKeys": []
4516-
}
4513+
"nonAuthorityKeys": []
4514+
}
45174515
```
45184516

45194517
## Where to Go Next

0 commit comments

Comments
 (0)