-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs]: add configuration reference #397
Open
0x009922
wants to merge
83
commits into
hyperledger-iroha:main
Choose a base branch
from
0x009922:392-draft-config-reference
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 56 commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
15d9ea4
[misc]: update deps
0x009922 6b17267
[style]: remove brand colors and `SButton`; revert prettier
0x009922 d13775b
[refactor]: use headless dialog; revert plugin-pwa
0x009922 793959a
[chore]: disable `vue/no-v-html` in Mermaid
0x009922 122f05f
[refactor]: remove sora components from MermaidRender
0x009922 c472637
[chore]: format
0x009922 6bd761d
[chore]: remove `@soramitsu-ui/*` packages
0x009922 15f8e10
[refactor]: remove `vite-plugin-pwa`
0x009922 6d39164
[docs]: introduce "Reference" section
0x009922 6a9e6dd
[chore]: remove logo temporarily
0x009922 1d091a7
Merge branch 'service-update' into 392-draft-config-reference
0x009922 29736bd
[chore]: fix ffi link
0x009922 c88c48e
[chore]: update deps
0x009922 17fc897
[refactor]: simplify logging, remove `log-update`
0x009922 e123ac0
Merge branch 'service-update' into 392-draft-config-reference
0x009922 f6bb470
[docs]: change headings
0x009922 e2ecaa7
[docs]: format chores
0x009922 6786935
Merge remote-tracking branch 'hyperledger/main' into service-update
0x009922 ce9bf11
[chore]: update pnpm
0x009922 5828496
[fix]: remove `SSpinner` import
0x009922 134a275
[chore]: bump vitepress
0x009922 de585ca
[fix]: fix version of unocss
0x009922 4bafdab
[chore]: fix format
0x009922 cd0cede
[chore]: bump vitepress to `rc.14`
0x009922 1fe2a67
Merge branch 'service-update' into 392-draft-config-reference
0x009922 cbe8885
[docs]: use tex math syntax across
0x009922 13fe5ce
[docs]: move `/reference/` to `/api/`; split config reference
0x009922 5e2265a
[docs]: describe duration type
0x009922 eff21b2
[docs]: describe byte size type
0x009922 18b614b
[docs]: remove `*.actor-channel-capacity`
0x009922 32008ad
[fix]: dead links
0x009922 2adbbf9
[docs]: restore `snake_case`
0x009922 cfabb36
[docs]: update config reference
0x009922 6d88337
Merge branch 'main' into 392-draft-config-reference
0x009922 c9e4fcf
[chore]: remove dead code
0x009922 07fd463
Apply suggestions from code review
0x009922 60edf4e
Apply suggestions from code review
yamkovoy a0bc81f
[docs]: use TODO marks
0x009922 b1c7ef8
[docs]: add Snapshot section
0x009922 12a026d
Merge remote-tracking branch '0x009922/392-draft-config-reference' in…
0x009922 2db62aa
[chore]: fix format
0x009922 08532e0
[docs]: change TODO notation
0x009922 bb938ef
Merge branch 'main' into 392-draft-config-reference
0x009922 35a0974
Apply suggestions from code review
0x009922 5b3dd60
Merge branch 'main' into 392-draft-config-reference
0x009922 0efcf1c
[docs]: put TODOs
0x009922 ea286e6
Merge remote-tracking branch '0x009922/392-draft-config-reference' in…
0x009922 9dd1a49
[chore]: remove dead sidebar link
0x009922 76b850c
[docs]: expand logger params
0x009922 38dd466
[docs]: expand sections, update naming, rethink structure
0x009922 6688e80
Apply suggestions from code review
0x009922 d5d1156
[docs]: refactor the reference
0x009922 e9aa302
[chore]: fix typo and format
0x009922 fc9bd81
[docs]: combine sumeragi and block_sync
0x009922 2750023
Merge branch 'main' into 392-draft-config-reference
0x009922 df7415b
[docs]: torii bindings
0x009922 bde027d
Apply suggestions from code review
0x009922 b86a04c
Update src/api/config/sumeragi-params.md
0x009922 5e5582a
bunch of updates
0x009922 b9177e7
Merge remote-tracking branch 'hyperledger/main' into 392-draft-config…
0x009922 0d949c6
Merge remote-tracking branch '0x009922/392-draft-config-reference' in…
0x009922 f74845e
[docs]: fix broken link
0x009922 99698dd
[docs]: a bunch of edits of config
0x009922 7d9c926
[docs]: update configuration guides (wip)
0x009922 128e675
Merge branch 'main' into 392-draft-config-reference
0x009922 2be984d
Merge branch 'main' into 392-draft-config-reference
0x009922 4c78fe2
[chore]: update deps
0x009922 8841a0b
[chore]: `type: module`, fixing warning from Vitest
0x009922 3d26c72
[revert]: project is not ready for ESM
0x009922 c704b6f
Merge branch 'housekeeping' into 392-draft-config-reference
0x009922 a96fa91
[docs]: update reference section
0x009922 b21c68e
[docs]: migration guide; edits
0x009922 cfe5ae4
[revert]: remove `Specs` component
0x009922 dfd5498
[feat]: add sidebar link
0x009922 ca2f813
[chore]: fix format
0x009922 eb231f3
misc: update dependencies
aae25ba
Merge branch 'housekeeping' into 392-draft-config-reference
9fe82b7
docs: revamp config reference
1e3b453
Merge branch 'main' into 392-draft-config-reference
0x009922 39cfe97
docs: fix links
0x009922 790686a
docs: complete structure of config reference & related docs
0x009922 1f1c868
docs: chores
0x009922 a44d9b4
chore: fix format
0x009922 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Command Line Interface (CLI) | ||
|
||
TODO | ||
|
||
## `--config` | ||
|
||
Alias: `-c` | ||
|
||
Env: `IROHA_CONFIG` | ||
|
||
TODO | ||
|
||
## `--trace-config` | ||
|
||
TODO | ||
|
||
## `--submit-genesis` | ||
|
||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Base Parameters | ||
|
||
## `public_key` | ||
|
||
- **Type:** String, [Multi-hash](glossary#type-multi-hash) | ||
- **Required** | ||
|
||
Public key of this peer | ||
0x009922 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```toml | ||
public_key = "ed0120FAFCB2B27444221717F6FCBF900D5BE95273B1B0904B08C736B32A19F16AC1F9" | ||
``` | ||
|
||
## `private_key` | ||
|
||
- **Type:** Table, [Private Key](glossary#type-private-key) | ||
- **Required** | ||
|
||
Private key of this peer | ||
0x009922 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```toml | ||
private_key = { digest = "ed25519", payload = "82886B5A2BB3785F3CA8F8A78F60EA9DB62F939937B1CFA8407316EF07909A8D236808A6D4C12C91CA19E54686C2B8F5F3A786278E3824B4571EF234DEC8683B" } | ||
``` | ||
|
||
|
||
## `address` | ||
|
||
- **Type:** String, [Socket-Address](glossary#type-socket-address) | ||
- **Required** | ||
|
||
Address for p2p communication for consensus (sumeragi) and block synchronization (block_sync) purposes. | ||
|
||
```toml | ||
address = "localhost:1337" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Deprecation and Migration Policy | ||
|
||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Genesis Parameters | ||
|
||
TODO Explain the purpose of this block. Maybe explain both keys in a single section? | ||
0x009922 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## `genesis.public_key` | ||
|
||
- **Type:** [Multi-hash](glossary#type-multi-hash) | ||
- **Required** | ||
|
||
The public key of the genesis account, should be supplied to all peers. | ||
|
||
```toml | ||
[genesis] | ||
public_key = "ed0120FAFCB2B27444221717F6FCBF900D5BE95273B1B0904B08C736B32A19F16AC1F9" | ||
``` | ||
|
||
## `genesis.private_key` | ||
|
||
- **Type:** Table, [Private Key](glossary#type-private-key) | ||
- **Required** if the configured peer submits the genesis block, | ||
**optional** otherwise | ||
|
||
The private key of the genesis account, only needed for the peer that | ||
submits the genesis block. | ||
|
||
```toml | ||
[genesis] | ||
private_key = { digest = "ed25519", payload = "82886B5A2BB3785F3CA8F8A78F60EA9DB62F939937B1CFA8407316EF07909A8D236808A6D4C12C91CA19E54686C2B8F5F3A786278E3824B4571EF234DEC8683B" } | ||
``` | ||
|
||
::: info | ||
|
||
This parameter is required if the peer being configured submits the | ||
genesis, i.e. if it is run with the [`--submit-genesis`](../cli#submit-genesis) | ||
CLI argument. | ||
|
||
::: | ||
|
||
::: warning | ||
|
||
The warning will be printed if the | ||
0x009922 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
[`genesis.private_key`](#genesis-private-key) and | ||
[`--submit-genesis`](../cli#submit-genesis) are used without each other. | ||
0x009922 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
# Glossary | ||
|
||
This page contains the definitions and brief explanations of data types and topics shared across | ||
multiple configuration parameters. | ||
|
||
## Numeric Types | ||
|
||
TODO Explain the limitations of different numeric types, like `u8` and `u64`. | ||
|
||
## Type: Duration | ||
|
||
Duration might be specified in two ways: | ||
|
||
- As a Number, which will be considered an amount in milliseconds | ||
- As a String, which will be parsed as a human-readable string | ||
|
||
Numeric setting is straightforward: | ||
|
||
```toml | ||
value = 1000 # 1000 milliseconds | ||
``` | ||
|
||
String setting might be more readable: | ||
|
||
```toml | ||
value1 = "1sec" | ||
value2 = "1hour 12min 5s" | ||
value3 = "2years 2min 12us" | ||
``` | ||
|
||
The duration string is a concatenation of time spans. Each time span is an | ||
integer number and a suffix. Supported suffixes: | ||
|
||
- `nsec`, `ns` — nanoseconds | ||
- `usec`, `us` — microseconds | ||
- `msec`, `ms` — milliseconds | ||
- `seconds`, `second`, `sec`, `s` | ||
- `minutes`, `minute`, `min`, `m` | ||
- `hours`, `hour`, `hr`, `h` | ||
- `days`, `day`, `d` | ||
- `weeks`, `week`, `w` | ||
- `months`, `month`, `M` — defined as $30.44$ days | ||
- `years`, `year`, `y` — defined as $365.25$ days | ||
|
||
TODO: put link to | ||
[`humantime` crate](https://docs.rs/humantime/latest/humantime/fn.parse_duration.html)? | ||
It is an implementation detail. | ||
|
||
## Type: Multi-hash | ||
|
||
TODO Describe what the hell this is | ||
|
||
## Type: Byte Size | ||
|
||
Byte size values might be set in two ways: | ||
|
||
- As a Number, which will be considered an amount in bytes | ||
- As a String, which will be parsed as a human-readable string | ||
|
||
Byte size as a number: | ||
|
||
```toml | ||
value = 512 # 512 bytes | ||
``` | ||
|
||
Byte size as a string: | ||
|
||
```toml | ||
# 42 bytes | ||
value1 = "42" | ||
value2 = "42b" | ||
value3 = "42bytes" | ||
|
||
# 1 kilobyte = 1000 bytes | ||
value4 = "1KB" | ||
|
||
# 1 kilobyte (binary format) = 1024 bytes | ||
value5 = "1KiB" | ||
|
||
# Combination of multiple | ||
value412 = "1GB 5MB" | ||
``` | ||
|
||
Iroha can parse sizes in bytes, kilobytes, megabytes, gigabytes, terabytes, | ||
and petabytes. | ||
|
||
The format of suffixes: | ||
|
||
- **`{size}iB`:** Binary size | ||
- **`{size}B`:** Decimal size | ||
|
||
TODO: haven't found a rust lib for that. There is a Python one | ||
([`humanfriendly`](https://humanfriendly.readthedocs.io/en/latest/api.html?highlight=parse_size#humanfriendly.parse_size)) | ||
I used for reference. | ||
|
||
TODO: [article explains kb, kB, KiB difference](https://web.archive.org/web/20150324153922/https://pacoup.com/2009/05/26/kb-kb-kib-whats-up-with-that/). | ||
Consider it for the format. | ||
|
||
## Type: Private Key | ||
|
||
TODO explain private key | ||
|
||
```toml | ||
private_key = { digest = "ed25519", payload = "" } | ||
``` | ||
|
||
## Type: Socket Address | ||
|
||
TODO explain socket addresses | ||
|
||
``` | ||
<host>:<port> | ||
``` | ||
|
||
``` | ||
localhost:8080 | ||
127.0.0.1:1337 | ||
sample.com:9090 | ||
``` | ||
|
||
In TOML it should be specified as a string: | ||
|
||
```toml | ||
address = "localhost:8000" | ||
``` | ||
|
||
## Type: Metadata Limits | ||
|
||
TODO | ||
|
||
### Default Metadata Limits | ||
|
||
TODO Display the value here |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any requirements for the key?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.