Skip to content

Commit 31be435

Browse files
LGLOAmbientTea
andauthored
Apply suggestions from code review
Co-authored-by: Nikolaos Dymitriadis <[email protected]>
1 parent 57bfe69 commit 31be435

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

docs/user-guides/manual-setup.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Partner chains setup
22

33
Partner Chains provides text based CLIs, for setting up a partner chain and starting nodes, called wizards.
4-
In the [chain builder](./chain-builder.md), [permissioned node owner](./permissioned.md), and [registered node owner](./registered.md) guides these wizards are used.
4+
These wizards are used in the [chain builder](./chain-builder.md), [permissioned node owner](./permissioned.md), and [registered node owner](./registered.md) guides.
55

6-
This document explains what is performed by those wizards and how to perform such operations manually.
6+
This document explains what these wizards do and how to perform these operations manually.
77

88
For dependency setup please see the respective guide for your desired setup.
99

@@ -15,7 +15,7 @@ These 3 keys are:
1515
* GRANDPA, ed25519 scheme key, with "key-type" `gran`
1616
* cross-chain, ecdsa scheme key, with "key-type" `crch`
1717

18-
For each of these key commands that are two commands invoked by wizard.
18+
For each of these keys, two commands are invoked by the wizard.
1919
The first one is
2020
```bash
2121
<node-executable> key generate --scheme <scheme> --output-type json
@@ -32,7 +32,7 @@ that stores the generated key in the keystore.
3232
Commands above serve as instructions for generating and inserting required key in the keystore.
3333
If there is a need for keys of different schema or type, or in different location, the instructions above should be used to insert it.
3434

35-
The wizard can also generate node network key, using following commands
35+
The wizard can also generate node network key, using the following commands:
3636
```bash
3737
mkdir -p <base-path>/network
3838
mkdir key generate-node-key --file <base-path>/network/secret_ed25519
@@ -46,7 +46,7 @@ Please note that running node will require using `--base-path`, `--keystore-path
4646

4747
### Establishing partner chain on Cardano
4848

49-
Each partner chain is identified by the Genesis UTXO and it has some governance.
49+
Each partner chain is identified by the Genesis UTXO and has a governance authority.
5050
Use `<node-executable> smart-contracts governance init -c <GENESIS_UTXO> -g <GOVERNANCE_AUTHORITY> -t <THRESHOLD> -k <PAYMENT_KEY_FILE>`
5151
command to spend the UTXO that will become the Genesis UTXO of your chain.
5252
The Genesis UTXO has to be spendable by the payment key.
@@ -56,7 +56,7 @@ Note: for more details please read [smart-contracts commands documentation](../.
5656

5757
### Discover smart-contracts addresses and script hashes
5858

59-
Use `<node-executable> smart-contracts get-scripts -c <GENESIS_UTXO>` to obtain Cardano addresses and scripts hashes.
59+
Use `<node-executable> smart-contracts get-scripts -c <GENESIS_UTXO>` to obtain Cardano addresses and scripts hashes used by the partner chain smart contracts.
6060
This guide assumes that the output is saved to `addresses.json` file.
6161

6262
### Establish bootnodes
@@ -70,7 +70,7 @@ Partner chains do not add any requirements nor capabilities in regards to bootno
7070
`<node-executable> wizards create-chain-spec` uses data from the previous step to generate chain-spec file.
7171
It is important to understand that most of chain-spec file generation is delegated to `<node-exectuable>` itself.
7272
Specifically, the wizard sets some specific environment variables and assumes that `<node-executable> build-spec` will use and that it will not require any other variables.
73-
Because what `<node-exectuable> build-spec` uses and requires is finally in control of the chain builder, the following command can only be seens as an example:
73+
Because what `<node-exectuable> build-spec` uses and requires is ultimately up to the chain builder, the following command can only be seen as an example:
7474
```bash
7575
export COMMITTEE_CANDIDATE_ADDRESS=$(jq -r '.addresses.CommitteeCandidateValidator' addresses.json)
7676
export D_PARAMETER_POLICY_ID=$(jq -r '.policyIds.DParameter' addresses.json)
@@ -80,7 +80,7 @@ export NATIVE_TOKEN_POLICY_ID='0x00000000000000000000000000000000000000000000000
8080
export NATIVE_TOKEN_ASSET_NAME=''
8181
```
8282
Native token policy and asset name are out of partner chains control, they should be known by the chain builder.
83-
For chains that do not intent to use them, it is assumed that `<node-exectuable> build-spec` will not need them.
83+
For chains that do not intend to use them, it is assumed that `<node-exectuable> build-spec` will not need them.
8484

8585
Run `<node-executable> build-spec --disable-default-bootnode > chain-spec.json`.
8686
As stated above, the content of the file depends mostly on `<node-executable>`.
@@ -89,7 +89,7 @@ Please consult our [intro doc chain-spec](../intro.md#chain-spec.json) section a
8989
* `genesisUtxo` and `slotsPerEpoch` of Sidechain Pallet
9090
* `initialValidators` of Partner Chains Session Pallet
9191
* `initialAuthorities` of Session Validator Management Pallet
92-
* all occurrances `mainChainScripts`
92+
* all occurrances of `mainChainScripts`
9393

9494
## Setup D-parameter and permissioned Permissioned Candidates
9595

@@ -108,7 +108,16 @@ If these transactions were submitted in the epoch N, then committee selection wi
108108

109109
## Running partner chains node
110110

111-
`<node-executable> wizards start-node` sets up environment variables required for following Cardano and runs `<node-executable> --validator --chain chain-spec.json --base-path <BASE_PATH> --keystore-path <KEYSTORE_PATH> --node-key-file <NODE_KEY_FILE> --port <WSPORT> <BOOTNODES_PARAMETERS>`.
111+
`<node-executable> wizards start-node` sets up environment variables required for following Cardano and runs:
112+
```bash
113+
<node-executable> --validator \
114+
--chain chain-spec.json \
115+
--base-path <BASE_PATH> \
116+
--keystore-path <KEYSTORE_PATH> \
117+
--node-key-file <NODE_KEY_FILE> \
118+
--port <WSPORT> \
119+
<BOOTNODES_PARAMETERS>
120+
```
112121

113122
For setting the environment variables please consult [the documentation here](../intro.md#environment-variables).
114123

@@ -124,7 +133,8 @@ This guide presents commands that could be used instead of `register1`, `registe
124133
### Getting signatures
125134

126135
Registration requires posting a message containing signatures to Cardano.
127-
These signatures prove that an SPO wants to be regarded as committee candidate for given partner chain.
136+
These signatures prove that an SPO is the owner of the keys being registered,
137+
and wants to be considered for committee membership for a given partner chain.
128138
Use:
129139
```bash
130140
<node-executable> registration-signatures \
@@ -137,7 +147,7 @@ Use:
137147
* STAKE_POOL_OPERATOR_SIGNING_KEY is the `cborHex` without the first 4 characters of _StakePoolSigningKey_ed25519_ key file.
138148
This is cold key, therefore this command is intented to be used on an offline machine.
139149
* PARTNER_CHAIN_SIGNING_KEY is hex of the ecdsa key created the first step of this guide, `secretSeed` field of the `key generate` output.
140-
* REGISTRATION_UTXO is a UTXO that SPO is able to spent when posting the message with signature. It prevents replay attacks.
150+
* REGISTRATION_UTXO is a UTXO that SPO is able to spend when posting the message with signature. It prevents replay attacks.
141151

142152
The command outputs a JSON with following fields:
143153
* `spo_public_key` - derived from STAKE_POOL_OPERATOR_SIGNING_KEY
@@ -149,14 +159,14 @@ Note: the _registration message_ is composed of the genesis UTXO, sidechain publ
149159

150160
### Submitting registration
151161

152-
Having this data obtained on an offline machine, it should be used on an online one to submit registration transaction to Cardano.
162+
Having this data obtained on an offline machine, it should be used on an online one to submit the registration transaction to Cardano.
153163
Use the `<node-executable> smart-contracts register` command.
154164
There are two parameters requiring explanation:
155165
* `partner-chain-signature` - use `sidechain_signature` field of `registration-signatures`
156166
* `partner-chain-public-keys` - use `<PARTNER_CHAIN_SIGNING_KEY>:<AURA_KEY>:<GRANDPA_KEY>`,
157167
where AURA_KEY and GRANDPA_KEY are obtained in same way as PARTNER_CHAIN_SIGNING_KEY was obtained for the `registration-signatures` command.
158168

159-
After this command is executed registration should become "effective" after two Cardano epochs boundaries.
169+
After this command is executed registration should become "effective" after two Cardano epoch boundaries.
160170
`<node-executable> registration-status --mainchain-pub-key <SPO_PUBLIC_KEY> --mc-epoch-number <CARDANO_EPOCH_NUMBER> --chain chain-spec.json`
161171
can be used to see if according to a partner chain the registration is valid.
162172
Before running this command environment variables required by Cardano observability layer should be set, like when [running partner chains nodes](#running-partner-chains-node).

0 commit comments

Comments
 (0)