Skip to content

Commit 13876fc

Browse files
0x009922WRRicht3routoftardisyamkovoy
authored
[docs]: add configuration reference (#397)
Co-authored-by: William Richter <88400283+WRRicht3r@users.noreply.github.com> Co-authored-by: Ekaterina Mekhnetsova <mekkatya@gmail.com> Co-authored-by: yamkovoy <100563712+yamkovoy@users.noreply.github.com> Co-authored-by: qua <quacumque@fastmail.jp>
1 parent b26dab7 commit 13876fc

23 files changed

+1390
-450
lines changed

.vitepress/config.mts

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="vite/client" />
22

3-
import { defineConfig, DefaultTheme } from 'vitepress'
3+
import { DefaultTheme, defineConfig } from 'vitepress'
44
import footnote from 'markdown-it-footnote'
55
import { resolve } from 'path'
66
import ViteSvgLoader from 'vite-svg-loader'
@@ -28,7 +28,7 @@ function nav(): DefaultTheme.NavItem[] {
2828
{
2929
text: 'Reference',
3030
link: '/reference/torii-endpoints',
31-
activeMatch: '/reference/',
31+
activeMatch: '^/reference/',
3232
},
3333
{
3434
text: 'Help',
@@ -93,6 +93,10 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
9393
text: 'JavaScript',
9494
link: '/guide/tutorials/javascript',
9595
},
96+
{
97+
text: 'Compatibility Matrix',
98+
link: '/reference/compatibility-matrix',
99+
},
96100
],
97101
},
98102
{
@@ -103,18 +107,6 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
103107
text: 'Configure Iroha',
104108
collapsed: true,
105109
items: [
106-
{
107-
text: 'Configuration Types',
108-
link: '/guide/configure/configuration-types',
109-
},
110-
{
111-
text: 'Samples',
112-
link: '/guide/configure/sample-configuration',
113-
},
114-
{
115-
text: 'Peer Configuration',
116-
link: '/guide/configure/peer-configuration',
117-
},
118110
{
119111
text: 'Client Configuration',
120112
link: '/guide/configure/client-configuration',
@@ -307,10 +299,10 @@ function sidebarChain(): DefaultTheme.SidebarItem[] {
307299
]
308300
}
309301

310-
function sidebarAPI(): DefaultTheme.SidebarItem[] {
302+
function sidebarReference(): DefaultTheme.SidebarItem[] {
311303
return [
312304
{
313-
text: 'About',
305+
text: 'Reference',
314306
items: [
315307
{
316308
text: 'Glossary',
@@ -320,23 +312,6 @@ function sidebarAPI(): DefaultTheme.SidebarItem[] {
320312
text: 'Naming Conventions',
321313
link: '/reference/naming.md',
322314
},
323-
{
324-
text: 'Compatibility Matrix',
325-
link: '/reference/compatibility-matrix',
326-
},
327-
{
328-
text: 'Foreign Function Interfaces',
329-
link: '/reference/ffi',
330-
},
331-
],
332-
},
333-
{
334-
text: 'Reference',
335-
items: [
336-
{
337-
text: 'Torii Endpoints',
338-
link: '/reference/torii-endpoints.md',
339-
},
340315
{
341316
text: 'Data Model Schema',
342317
link: '/reference/data-model-schema',
@@ -357,6 +332,30 @@ function sidebarAPI(): DefaultTheme.SidebarItem[] {
357332
text: 'Binaries',
358333
link: '/reference/binaries.md',
359334
},
335+
{
336+
text: 'irohad CLI',
337+
link: '/reference/irohad-cli.md',
338+
},
339+
{
340+
text: 'Torii HTTP API',
341+
link: '/reference/torii-endpoints.md',
342+
},
343+
{
344+
text: 'Foreign Function Interfaces',
345+
link: '/reference/ffi',
346+
},
347+
{
348+
text: 'Peer Configuration',
349+
link: '/reference/peer-config/index.md',
350+
items: [
351+
{ text: 'Parameters', link: '/reference/peer-config/params.md' },
352+
{ text: 'Migration from pre-rc.20', link: '/reference/peer-config/migration.md' },
353+
],
354+
},
355+
{
356+
text: 'Genesis Block',
357+
link: '/reference/genesis.md',
358+
},
360359
],
361360
},
362361
]
@@ -473,13 +472,12 @@ export default defineConfig({
473472
},
474473

475474
nav: nav(),
476-
outline: [2, 3],
477475

478476
sidebar: {
479477
'/get-started/': sidebarStart(),
480478
'/guide/': sidebarGuide(),
481479
'/blockchain/': sidebarChain(),
482-
'/reference/': sidebarAPI(),
480+
'/reference/': sidebarReference(),
483481
'/help/': sidebarHelp(),
484482
},
485483

.vitepress/theme/style/index.scss

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@100..800&display=swap');
1+
@import url("https://fonts.googleapis.com/css2?family=Sora:wght@100..800&display=swap");
22

33
:root {
4-
--vp-font-family-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, 'Courier New', monospace;
5-
--vp-font-family-base: 'Sora', 'Inter', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
6-
4+
--vp-font-family-mono:
5+
"JetBrains Mono", "Fira Code", Menlo, Monaco, Consolas, "Courier New",
6+
monospace;
7+
--vp-font-family-base:
8+
"Sora", "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
9+
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
10+
711
--vp-c-brand-1: var(--vp-c-red-1);
812
--vp-c-brand-2: var(--vp-c-red-2);
913
--vp-c-brand-3: var(--vp-c-red-3);
@@ -15,7 +19,11 @@
1519
color: var(--vp-c-text-1);
1620
}
1721

18-
.VPSidebarItem.level-1 .text, .VPSidebarItem.level-2 .text, .VPSidebarItem.level-3 .text, .VPSidebarItem.level-4 .text, .VPSidebarItem.level-5 .text {
22+
.VPSidebarItem.level-1 .text,
23+
.VPSidebarItem.level-2 .text,
24+
.VPSidebarItem.level-3 .text,
25+
.VPSidebarItem.level-4 .text,
26+
.VPSidebarItem.level-5 .text {
1927
font-weight: 400 !important;
2028
color: var(--vp-c-text-2);
2129
}
@@ -25,7 +33,7 @@
2533
}
2634

2735
.vp-doc {
28-
div[class*='language-'] {
36+
div[class*="language-"] {
2937
pre {
3038
font-size: 14px;
3139
font-variant-ligatures: none;
@@ -44,4 +52,21 @@
4452
line-height: 1.75;
4553
font-weight: 300;
4654
}
55+
56+
tr.transposed-table:nth-child(2n+1) {
57+
background: var(--vp-c-bg-soft);
58+
59+
pre {
60+
border: 1px solid var(--vp-c-divider);
61+
border-radius: 8px;
62+
}
63+
}
64+
65+
tr.transposed-table:nth-child(2n) {
66+
background: transparent;
67+
}
68+
69+
section.footnotes {
70+
font-size: 0.8rem;
71+
}
4772
}

etc/snippet-sources.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,9 @@ export default [
117117
},
118118
{
119119
src: `https://raw.githubusercontent.com/hyperledger-iroha/iroha/${IROHA_RC_1}/docs/source/references/client.template.toml`,
120-
filename: 'client-cli-config-template.toml',
121120
},
122121
{
123122
src: `https://raw.githubusercontent.com/hyperledger-iroha/iroha/${IROHA_RC_1}/docs/source/references/peer.template.toml`,
124-
filename: 'peer-config-template.toml',
125123
},
126124
{
127125
src: `https://raw.githubusercontent.com/hyperledger-iroha/iroha/${IROHA_RC_1}/defaults/genesis.json`,

src/blockchain/wasm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ non-portable architecture and OS-specific static manner, but WASM is a
7878
portable format. Since C ABI is the _lingua franca_ of the programming
7979
world and there is no other stable Rust ABI (yet), Iroha relies on the
8080
C-linkage to generate WASM bindings. Thankfully, `iroha_wasm` takes care of
81-
everything related to [foreign function interfaces](/reference/ffi.md) (FFI), so
82-
you don't have to worry about things like `unsafe`, `repr(C)`, padding,
83-
alignment, and others.
81+
everything related to [foreign function interfaces](/reference/ffi.md)
82+
(FFI), so you don't have to worry about things like `unsafe`, `repr(C)`,
83+
padding, alignment, and others.
8484

8585
The `iroha_wasm` crate contains all of the bindings, macros, and trait
8686
implementations that you'd need to write the program, most notably the

src/blockchain/world.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
consists of:
55

66
- Iroha [configuration parameters](/guide/configure/client-configuration.md)
7-
- the list of
8-
[trusted peers](/guide/configure/peer-configuration#trusted-peers)
7+
- TODO: peers
98
- registered domains
109
- registered [triggers](/blockchain/triggers.md)
1110
- registered

src/guide/advanced/metrics.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ This topic will be updated as part of the new configuration reference.
1919
The progress on the configuration reference can be tracked in the following GitHub issue:\
2020
[iroha-2-docs > Issue #392: Tracking issue for Configuration Reference as per RFC](https://github.com/hyperledger-iroha/iroha-2-docs/issues/392).
2121

22-
::: note
23-
24-
For examples, see [Sample Configuration Files](../configure/sample-configuration.md).
25-
26-
:::
27-
2822
After the above is configured, you can use the IP address set in the `"TORII_TELEMETRY_URL"` variable to access the metrics data from within a running Iroha instance.
2923

3024
**Example**:

src/guide/advanced/running-iroha-on-bare-metal.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,12 @@ error-prone, particularly for exotic systems (Windows).
1212
::: info
1313

1414
For this chapter, we assume you have learned about
15-
[configuration](/guide/configure/sample-configuration.md) and
1615
[management](/guide/configure/peer-management.md) in Iroha 2. Here we offer
1716
you instructions to run Iroha on bare metal without going into details
1817
about various configuration options available.
1918

20-
You can always check
21-
[sample configuration files](/guide/configure/sample-configuration.md) for
22-
`configs/peer/genesis.json` and `configs/peer/config.json`, or refer to
23-
[peer configuration options](/guide/configure/peer-configuration.md) for
24-
more details.
19+
TODO extend with a relevant config guide
2520

26-
<!-- TODO: Add the new configuration reference, once its ready. Issue: https://github.com/hyperledger-iroha/iroha-2-docs/issues/392
27-
The full list of available options is in the [Iroha Configuration Reference](https://github.com/hyperledger-iroha/iroha/blob/iroha2-dev/docs/source/references/config.md). -->
2821

2922
:::
3023

@@ -448,13 +441,11 @@ Iroha in the real world.
448441
```
449442

450443
3. Register your peer to a network, and make sure to add at least four of
451-
the peers on that network to the
452-
[`TRUSTED_PEERS`](/guide/configure/peer-configuration.md#trusted-peers)
444+
the peers on that network to the trusted peers
453445
array in your configuration file.
454446

455-
4. Determine the web socket that the other peers will use to connect to
456-
you. Make sure that the port is open and use that address
457-
([`P2P_ADDR`](/guide/configure/peer-configuration.md#p2p-addr)) in your
447+
4. Determine the socket address that the other peers will use to connect to
448+
you. Make sure that the port is open and use that address in your
458449
`configs/peer/config.json` file.
459450

460451
5. After you have finished editing the configuration file, deploy Iroha by

0 commit comments

Comments
 (0)