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: docs/ADR-5-cardano-testnet-node-configuration-file.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,25 +13,27 @@ Programmatic users proceed as follows instead:
13
13
14
14
# Decision
15
15
16
-
Introduce a new `conway genesis create-node-config file` command in `cardano-cli`. It will have the following options:
16
+
## Add a new command in the CLI
17
+
18
+
Introduce a new `conway genesis check-node-config file` command in `cardano-cli`. It will have the following options:
17
19
18
20
```
19
21
[--byron-genesis FILEPATH]
20
22
[--shelley-genesis FILEPATH]
21
23
[--alonzo-genesis FILEPATH]
22
24
[--conway-genesis FILEPATH]
23
-
[--node-config-template FILEPATH]
24
-
--out-file FILEPATH
25
+
[--node-config FILEPATH]
25
26
```
27
+
For every `--era-genesis` file, the command will read the file specified at the given `FILEPATH`, hash its content and check that the file specified at `--node-config` contains the correct path and the correct hash for this genesis file.
26
28
27
-
If specified, the `--byron-genesis`, `--shelley-genesis`, etc. files will be read and their content be hashed, and
28
-
the output node configuration file will have the corresponding fields set. The `--node-config-template` allows to pass an existing file, which is useful if you want to augment it with the hashes. Finally the `--out-file` option is a mandatory option to specify where to write the generated node configuration file. If `--node-config-template` is omitted, the generated file will use defaults values.
29
+
## Have `create-testnet-data` create the node configuration file
29
30
30
-
An open question is whether to add flags to tune the configuration's file content on an individual field basis. It could be nice to show what possible tuning the node's configuration file allows.
31
+
1. Have `create-testnet-data` create a default node configuration file (populating it with the paths and hashes of the genesis files).
32
+
2. Add a `--node-config-template` optional option to `create-testnet-data which will be used to generate the node configuration file, instead of using a default one.
31
33
32
34
# Consequences
33
35
34
-
* This will allow users that spin testnets to generate their node configuration file using `cardano-cli`
36
+
* This will allow users that spin testnets to generate their node configuration file using `create-testnet-data`
35
37
* As a consequence, this will avoid having to keep track of external templates
36
38
* This will allow to remove some code in [cardano-testnet](https://github.com/IntersectMBO/cardano-node/blob/51a034a51c5cefdd6ab4b9ff1e71710cf0c96643/cardano-testnet/src/Testnet/Defaults.hs#L340)
37
39
* It will make possible to generalize `cardano-testnet` so that it allows to pass custom node configuration files (this is [cardano-node/issues/3719](https://github.com/IntersectMBO/cardano-node/issues/3719), and to have a handy way to generate those files.
0 commit comments