Skip to content
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
wants to merge 83 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
15d9ea4
[misc]: update deps
0x009922 Aug 30, 2023
6b17267
[style]: remove brand colors and `SButton`; revert prettier
0x009922 Aug 30, 2023
d13775b
[refactor]: use headless dialog; revert plugin-pwa
0x009922 Sep 1, 2023
793959a
[chore]: disable `vue/no-v-html` in Mermaid
0x009922 Sep 1, 2023
122f05f
[refactor]: remove sora components from MermaidRender
0x009922 Sep 1, 2023
c472637
[chore]: format
0x009922 Sep 1, 2023
6bd761d
[chore]: remove `@soramitsu-ui/*` packages
0x009922 Sep 1, 2023
15f8e10
[refactor]: remove `vite-plugin-pwa`
0x009922 Sep 1, 2023
6d39164
[docs]: introduce "Reference" section
0x009922 Sep 8, 2023
6a9e6dd
[chore]: remove logo temporarily
0x009922 Sep 8, 2023
1d091a7
Merge branch 'service-update' into 392-draft-config-reference
0x009922 Sep 8, 2023
29736bd
[chore]: fix ffi link
0x009922 Sep 8, 2023
c88c48e
[chore]: update deps
0x009922 Sep 11, 2023
17fc897
[refactor]: simplify logging, remove `log-update`
0x009922 Sep 11, 2023
e123ac0
Merge branch 'service-update' into 392-draft-config-reference
0x009922 Sep 11, 2023
f6bb470
[docs]: change headings
0x009922 Sep 11, 2023
e2ecaa7
[docs]: format chores
0x009922 Sep 11, 2023
6786935
Merge remote-tracking branch 'hyperledger/main' into service-update
0x009922 Sep 15, 2023
ce9bf11
[chore]: update pnpm
0x009922 Sep 15, 2023
5828496
[fix]: remove `SSpinner` import
0x009922 Sep 15, 2023
134a275
[chore]: bump vitepress
0x009922 Sep 15, 2023
de585ca
[fix]: fix version of unocss
0x009922 Sep 15, 2023
4bafdab
[chore]: fix format
0x009922 Sep 15, 2023
cd0cede
[chore]: bump vitepress to `rc.14`
0x009922 Sep 18, 2023
1fe2a67
Merge branch 'service-update' into 392-draft-config-reference
0x009922 Sep 18, 2023
cbe8885
[docs]: use tex math syntax across
0x009922 Sep 18, 2023
13fe5ce
[docs]: move `/reference/` to `/api/`; split config reference
0x009922 Sep 18, 2023
5e2265a
[docs]: describe duration type
0x009922 Sep 18, 2023
eff21b2
[docs]: describe byte size type
0x009922 Sep 18, 2023
18b614b
[docs]: remove `*.actor-channel-capacity`
0x009922 Sep 18, 2023
32008ad
[fix]: dead links
0x009922 Sep 18, 2023
2adbbf9
[docs]: restore `snake_case`
0x009922 Sep 20, 2023
cfabb36
[docs]: update config reference
0x009922 Sep 21, 2023
6d88337
Merge branch 'main' into 392-draft-config-reference
0x009922 Sep 21, 2023
c9e4fcf
[chore]: remove dead code
0x009922 Sep 21, 2023
07fd463
Apply suggestions from code review
0x009922 Sep 22, 2023
60edf4e
Apply suggestions from code review
yamkovoy Sep 26, 2023
a0bc81f
[docs]: use TODO marks
0x009922 Sep 27, 2023
b1c7ef8
[docs]: add Snapshot section
0x009922 Sep 27, 2023
12a026d
Merge remote-tracking branch '0x009922/392-draft-config-reference' in…
0x009922 Sep 27, 2023
2db62aa
[chore]: fix format
0x009922 Sep 27, 2023
08532e0
[docs]: change TODO notation
0x009922 Sep 27, 2023
bb938ef
Merge branch 'main' into 392-draft-config-reference
0x009922 Sep 27, 2023
35a0974
Apply suggestions from code review
0x009922 Sep 29, 2023
5b3dd60
Merge branch 'main' into 392-draft-config-reference
0x009922 Sep 29, 2023
0efcf1c
[docs]: put TODOs
0x009922 Sep 29, 2023
ea286e6
Merge remote-tracking branch '0x009922/392-draft-config-reference' in…
0x009922 Sep 29, 2023
9dd1a49
[chore]: remove dead sidebar link
0x009922 Sep 29, 2023
76b850c
[docs]: expand logger params
0x009922 Sep 29, 2023
38dd466
[docs]: expand sections, update naming, rethink structure
0x009922 Sep 29, 2023
6688e80
Apply suggestions from code review
0x009922 Oct 2, 2023
d5d1156
[docs]: refactor the reference
0x009922 Oct 4, 2023
e9aa302
[chore]: fix typo and format
0x009922 Oct 4, 2023
fc9bd81
[docs]: combine sumeragi and block_sync
0x009922 Oct 4, 2023
2750023
Merge branch 'main' into 392-draft-config-reference
0x009922 Oct 10, 2023
df7415b
[docs]: torii bindings
0x009922 Oct 10, 2023
bde027d
Apply suggestions from code review
0x009922 Oct 20, 2023
b86a04c
Update src/api/config/sumeragi-params.md
0x009922 Oct 23, 2023
5e5582a
bunch of updates
0x009922 Nov 3, 2023
b9177e7
Merge remote-tracking branch 'hyperledger/main' into 392-draft-config…
0x009922 Nov 3, 2023
0d949c6
Merge remote-tracking branch '0x009922/392-draft-config-reference' in…
0x009922 Nov 3, 2023
f74845e
[docs]: fix broken link
0x009922 Nov 3, 2023
99698dd
[docs]: a bunch of edits of config
0x009922 Nov 22, 2023
7d9c926
[docs]: update configuration guides (wip)
0x009922 Nov 22, 2023
128e675
Merge branch 'main' into 392-draft-config-reference
0x009922 Nov 22, 2023
2be984d
Merge branch 'main' into 392-draft-config-reference
0x009922 Feb 12, 2024
4c78fe2
[chore]: update deps
0x009922 Feb 12, 2024
8841a0b
[chore]: `type: module`, fixing warning from Vitest
0x009922 Feb 12, 2024
3d26c72
[revert]: project is not ready for ESM
0x009922 Feb 12, 2024
c704b6f
Merge branch 'housekeeping' into 392-draft-config-reference
0x009922 Feb 12, 2024
a96fa91
[docs]: update reference section
0x009922 Feb 21, 2024
b21c68e
[docs]: migration guide; edits
0x009922 Mar 25, 2024
cfe5ae4
[revert]: remove `Specs` component
0x009922 Mar 25, 2024
dfd5498
[feat]: add sidebar link
0x009922 Mar 25, 2024
ca2f813
[chore]: fix format
0x009922 Mar 25, 2024
eb231f3
misc: update dependencies
Nov 7, 2024
aae25ba
Merge branch 'housekeeping' into 392-draft-config-reference
Nov 7, 2024
9fe82b7
docs: revamp config reference
Nov 8, 2024
1e3b453
Merge branch 'main' into 392-draft-config-reference
0x009922 Nov 8, 2024
39cfe97
docs: fix links
0x009922 Nov 8, 2024
790686a
docs: complete structure of config reference & related docs
0x009922 Nov 13, 2024
1f1c868
docs: chores
0x009922 Nov 13, 2024
a44d9b4
chore: fix format
0x009922 Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 117 additions & 19 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ function getNav(): DefaultTheme.NavItem[] {
activeMatch: '^/$|^/guide/',
},
{
text: 'Schema',
link: '/data-model-schema/',
activeMatch: '^/data-model-schema/',
text: 'API',
link: '/api/',
activeMatch: '^/api/',
},
]
}
Expand Down Expand Up @@ -222,6 +222,10 @@ function getGuideSidebar(): DefaultTheme.SidebarItem[] {
text: 'Metadata and Store assets',
link: '/guide/configure/metadata-and-store-assets',
},
{
text: '[wip] Reference',
link: '/configuration-reference',
},
],
},
{
Expand Down Expand Up @@ -280,19 +284,19 @@ function getGuideSidebar(): DefaultTheme.SidebarItem[] {
},
],
},
{
text: 'API',
items: [
{
text: 'Specification',
link: '/api/index.md',
},
{
text: 'Foreign Function Interfaces',
link: '/api/ffi',
},
],
},
// {
// text: 'API',
// items: [
// {
// text: 'Specification',
// link: '/api/index.md',
// },
// {
// text: 'Foreign Function Interfaces',
// link: '/api/ffi',
// },
// ],
// },
{
text: 'Documenting Iroha',
items: [
Expand Down Expand Up @@ -367,6 +371,7 @@ export default defineConfig({
themeConfig: {
// logo: '/icon.svg',
siteTitle: 'Iroha 2',
outline: 'deep',

socialLinks: [
{ icon: 'github', link: 'https://github.com/hyperledger/iroha-2-docs' },
Expand All @@ -392,11 +397,104 @@ export default defineConfig({

sidebar: {
'/guide/': getGuideSidebar(),
'/data-model-schema': [
'/api/': [
{
text: 'Overview',
link: '/api/',
},
{
text: 'Configuration',
link: '/api/configuration',
},
{
text: 'Command Line Interface (CLI)',
link: '/api/cli',
},
{
text: 'API Specification',
link: '/api/api',
},
{
text: 'Foreign Function Interfaces (FFI)',
link: '/api/ffi',
},
{
text: 'Configuration',
items: [
{
text: 'Overview',
link: '/api/config/',
},
{
text: 'Parameters',
items: [
// TODO: consider re-ordering sections to a more intuitive format?
{
text: 'Base',
link: '/api/config/base-params',
},
{
text: 'Genesis',
link: '/api/config/genesis-params',
},
{
text: 'Network',
link: '/api/config/network-params',
},
{
text: 'Sumeragi',
link: '/api/config/sumeragi-params',
},
{
text: 'Torii',
link: '/api/config/torii-params',
},
{
text: 'Queue',
link: '/api/config/queue-params',
},
{
text: 'Kura',
link: '/api/config/kura-params',
},
{
text: 'Logger',
link: '/api/config/logger-params',
},
{
text: 'Block Sync',
link: '/api/config/block-sync-params',
},
{
text: 'WSV',
link: '/api/config/wsv-params',
},
{
text: 'Telemetry',
link: '/api/config/telemetry-params',
},
{
text: 'Snapshot',
link: '/api/config/snapshot-params',
},
],
},

{
text: 'Glossary',
link: '/api/config/glossary',
},
{
text: 'Deprecation and Migration',
link: '/api/config/deprecation-and-migration',
},
],
},
{
text: 'Channel',
text: 'Data Model Schema',
link: '/api/data-model-schema/',
items: ['stable', 'lts', 'dev'].map((channel) => ({
link: `/data-model-schema/${channel}`,
link: `/api/data-model-schema/${channel}`,
text: `iroha2-${channel}`,
})),
},
Expand Down
20 changes: 20 additions & 0 deletions src/api/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<script setup>
import { useData } from 'vitepress'

const { page } = useData()
</script>

# API Specification

::: info

This page contains a copy of the `api_spec.md` document from
`hyperledger/iroha#iroha2-dev`. You can read the most up-to-date version
on
[GitHub](https://github.com/hyperledger/iroha/blob/iroha2-dev/docs/source/references/api_spec.md).
0x009922 marked this conversation as resolved.
Show resolved Hide resolved

Please note this page was last updated on <b>{{ new Date(page.lastUpdated).toLocaleString() }}</b>.

:::

<!--@include: ../snippets/iroha2_dev_api_spec.md -->
11 changes: 11 additions & 0 deletions src/api/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Command Line Interface (CLI)

## `--config`

Alias: `-c`

Env: `IROHA_CONFIG`

## `--trace-config`

## `--submit-genesis`
23 changes: 23 additions & 0 deletions src/api/config/base-params.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Base Parameters
Copy link
Contributor

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?

  • Could I introduce a new peer with random keys (given a proper algorithm that generates them and that they have a proper format)?
  • Could I randomly change keys for a peer at some moment, restart it and expect it to work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Well, each peer might have any keys you want it to use. I lack understanding of the bigger picture and how keys should be approached in real-world scenarios.
  2. Not sure, don't think so.


## `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" }
```
27 changes: 27 additions & 0 deletions src/api/config/block-sync-params.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Block Sync Parameters

TODO Explain module

## `block_sync.block_batch_amount`

- **Type:** Number
- **Default:** $4$

The number of blocks that can be sent in one message.
0x009922 marked this conversation as resolved.
Show resolved Hide resolved

```toml
[block_sync]
block_batch_amount = 4
```

## `block_sync.gossip_period`

- **Type:** String or Number, [Duration](glossary#type-duration)
- **Default:** 10 seconds
0x009922 marked this conversation as resolved.
Show resolved Hide resolved

The period of time to wait between sending requests for the latest block.

```toml
[block_sync]
gossip_period = "5 secs"
```
3 changes: 3 additions & 0 deletions src/api/config/deprecation-and-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Deprecation and Migration Policy

TODO
45 changes: 45 additions & 0 deletions src/api/config/genesis-params.md
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

:::
Loading