|
1 | 1 | # Configuring Iroha |
2 | 2 |
|
3 | | -Iroha is configured via a [TOML](https://toml.io/) file and/or Environment |
4 | | -Variables. |
5 | | - |
6 | | -The path to the configuration file should be passed through the |
7 | | -[`--config` CLI argument](/reference/cli#arg-config): |
8 | | - |
9 | | -```shell |
10 | | -iroha --config iroha_config.toml |
11 | | -``` |
12 | | - |
13 | | -If the peer submits the genesis: |
14 | | - |
15 | | -```shell |
16 | | -# `iroha_config.toml` should contain `genesis.file` and `genesis.private_key` |
17 | | -iroha --config iroha_config.toml --submit-genesis |
18 | | -``` |
19 | | - |
20 | | -## Structure |
21 | | - |
22 | | -- List links to all modules, giving high-level overview of them |
23 | | -- List required parameters |
24 | | - |
25 | | -| Module Name | Description | Required fields | |
26 | | -| ------------------------------- | ---------------------------- | ------------------------------------------------------------------------- | |
27 | | -| [Base](base-params) | Basic, root-level parameters | `chain_id`, `public_key`, `private_key` | |
28 | | -| [Genesis](genesis-params) | Genesis block configuration | `genesis.public_key`, and possibly `genesis.file` & `genesis.private_key` | |
29 | | -| [Network](network-params) | ? | `network.address` | |
30 | | -| [Torii](torii-params) | ? | `torii.address` | |
31 | | -| [Sumeragi](sumeragi-params) | ? | `sumeragi.trusted_peers` if doesn't submit the genesis | |
32 | | -| [Kura](kura-params) | ? | | |
33 | | -| [Queue](queue-params) | ? | | |
34 | | -| [Snapshot](snapshot-params) | ? | | |
35 | | -| [Logger](logger-params) | ? | | |
36 | | -| [Telemetry](telemetry-params) | ? | | |
37 | | -| [Chain Wide](chain-wide-params) | ? | | |
38 | | - |
39 | | -## Example Configuration |
40 | | - |
41 | | -- Show minimal TOML |
42 | | -- Show same minimal ENVs |
43 | | -- Refer to `peer.template.toml` in the repo, or show it here under the |
44 | | - spoiler. |
45 | | - |
46 | | -## Extends feature |
47 | | - |
48 | | -- You can compose configuration files together using the `extends` |
49 | | - root-level field |
50 | | - |
51 | | ---- |
52 | | - |
53 | | -## Required Parameters |
54 | | - |
55 | | -- [`public_key`](base-params#param-public-key): _explain the option_ |
56 | | -- [`private_key`](base-params#param-private-key): _explain the option_ |
57 | | -- [`network.address`](network-params#param-address): _explain the option_ |
58 | | -- [`genesis.public_key`](genesis-params#param-public-key): _explain the |
59 | | - option_ |
60 | | -- [`genesis.private_key`](genesis-params#param-private-key) if the peer |
61 | | - is the one who submits the genesis. _explain the option_ |
62 | | -- [`sumeragi.trusted_peers`](sumeragi-params#param-trusted-peers): |
63 | | - _explain the option_. It is not _strictly_ required, but you might need |
64 | | - to set it in most cases. |
65 | | -- [`torii.address`](torii-params#param-address): _explain the option_ |
66 | | - |
67 | | -## Modules Overview |
68 | | - |
69 | | -TODO: list each section (sumeragi, torii, kura etc) with links and short |
70 | | -explanations of their responsibility. |
71 | | - |
72 | | -- **[Base Options](base-params):** _explain_ |
73 | | -- **[Genesis](genesis-params):** _explain_ |
74 | | -- **[Sumeragi](sumeragi-params):** _explain_ |
75 | | -- **[Torii](torii-params):** _explain_ |
76 | | -- **[Queue](queue-params):** _explain_ |
77 | | -- **[Kura](kura-params):** _explain_ |
78 | | -- **[Logger](logger-params):** _explain_ |
79 | | -- **[Telemetry](telemetry-params):** _explain_ |
80 | | -- **[Snapshot](./snapshot-params)** |
| 3 | +- Use `--config` CLI or relevant ENV parameter (?) |
| 4 | +- Use `--trace-config` to debug |
| 5 | +- Config consists of parameters set via TOML file (some via ENV too) |
| 6 | +- There is also chain-wide config, which is different |
| 7 | +- Here is the template file |
| 8 | +- Here is how to use `extends` |
0 commit comments