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 80 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
60 changes: 37 additions & 23 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="vite/client" />

import { defineConfig, DefaultTheme } from 'vitepress'
import { DefaultTheme, defineConfig } from 'vitepress'
import footnote from 'markdown-it-footnote'
import { resolve } from 'path'
import ViteSvgLoader from 'vite-svg-loader'
Expand Down Expand Up @@ -28,7 +28,7 @@ function nav(): DefaultTheme.NavItem[] {
{
text: 'Reference',
link: '/reference/torii-endpoints',
activeMatch: '/reference/',
activeMatch: '^/reference/',
},
{
text: 'Help',
Expand Down Expand Up @@ -89,6 +89,10 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
text: 'JavaScript',
link: '/guide/tutorials/javascript',
},
{
text: 'Compatibility Matrix',
link: '/reference/compatibility-matrix',
},
],
},
{
Expand Down Expand Up @@ -303,10 +307,10 @@ function sidebarChain(): DefaultTheme.SidebarItem[] {
]
}

function sidebarAPI(): DefaultTheme.SidebarItem[] {
function sidebarReference(): DefaultTheme.SidebarItem[] {
return [
{
text: 'About',
text: 'Reference',
items: [
{
text: 'Glossary',
Expand All @@ -316,23 +320,6 @@ function sidebarAPI(): DefaultTheme.SidebarItem[] {
text: 'Naming Conventions',
link: '/reference/naming.md',
},
{
text: 'Compatibility Matrix',
link: '/reference/compatibility-matrix',
},
{
text: 'Foreign Function Interfaces',
link: '/reference/ffi',
},
],
},
{
text: 'Reference',
items: [
{
text: 'Torii Endpoints',
link: '/reference/torii-endpoints.md',
},
{
text: 'Data Model Schema',
link: '/reference/data-model-schema',
Expand All @@ -349,6 +336,34 @@ function sidebarAPI(): DefaultTheme.SidebarItem[] {
text: 'Permissions',
link: '/reference/permissions.md',
},
{
text: 'CLI',
},
{
text: 'Torii HTTP API',
link: '/reference/torii-endpoints.md',
},
{
text: 'Foreign Function Interfaces',
link: '/reference/ffi',
},
],
},
{
text: 'Configuration',
items: [
{ text: 'Overview' },
{
text: 'Peer Configuration',
link: '/reference/config/index.md',
items: [
{ text: 'Parameters', link: '/reference/config/params.md' },
// Consider removal
{ text: 'Migration from pre-rc.20', link: '/reference/config/migration.md' },
],
},
{ text: 'Genesis Block' },
{ text: 'On-Chain Configuration' },
],
},
]
Expand Down Expand Up @@ -465,13 +480,12 @@ export default defineConfig({
},

nav: nav(),
outline: [2, 3],

sidebar: {
'/get-started/': sidebarStart(),
'/guide/': sidebarGuide(),
'/blockchain/': sidebarChain(),
'/reference/': sidebarAPI(),
'/reference/': sidebarReference(),
'/help/': sidebarHelp(),
},

Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import './style/index.scss'
import { defineAsyncComponent } from 'vue'

export default {
...ThemeDefault,
extends: ThemeDefault,
Layout: LayoutCustom,
enhanceApp({ app }: EnhanceAppContext) {
app.component('MermaidRenderWrap', MermaidRenderWrap)
Expand Down
6 changes: 3 additions & 3 deletions src/blockchain/wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ non-portable architecture and OS-specific static manner, but WASM is a
portable format. Since C ABI is the _lingua franca_ of the programming
world and there is no other stable Rust ABI (yet), Iroha relies on the
C-linkage to generate WASM bindings. Thankfully, `iroha_wasm` takes care of
everything related to [foreign function interfaces](/reference/ffi.md) (FFI), so
you don't have to worry about things like `unsafe`, `repr(C)`, padding,
alignment, and others.
everything related to [foreign function interfaces](/reference/ffi.md)
(FFI), so you don't have to worry about things like `unsafe`, `repr(C)`,
padding, alignment, and others.

The `iroha_wasm` crate contains all of the bindings, macros, and trait
implementations that you'd need to write the program, most notably the
Expand Down
74 changes: 25 additions & 49 deletions src/guide/configure/client-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@ For details on cryptographic keys, see [Public Key Cryptography](../security/pub

## User account

The `ACCOUNT_ID` should be self-explanatory. The only thing you need to
worry about is that the account must already exist in the blockchain. In
other words, the account you provide here should already be
The `ACCOUNT_ID` should be self-explanatory. The only thing you need to worry about is that the account must already
exist in the blockchain. In other words, the account you provide here should already be
[registered](/blockchain/instructions.md#un-register).

::: info Note

Iroha is **case-sensitive**, meaning that _Alice_@wonderland is different
from _alice_@wonderland. It should go without saying that
_alice@wonderland_ is not the same as _alice@looking_glass_ either, since
these accounts belong to different domains, `wonderland` and
`looking_glass`.
Iroha is **case-sensitive**, meaning that _Alice_@wonderland is different from _alice_@wonderland. It should go without
saying that _alice@wonderland_ is not the same as _alice@looking_glass_ either, since these accounts belong to different
domains, `wonderland` and `looking_glass`.

:::

## Basic Authentication Credentials

The idea of basic authentication credentials is to provide the access control using a web server with a reverse proxy like [Nginx](https://www.nginx.com/) while these credentials are ignored by the Iroha peers.
The idea of basic authentication credentials is to provide the access control using a web server with a reverse proxy
like [Nginx](https://www.nginx.com/) while these credentials are ignored by the Iroha peers.

The login and password will be filled by the client and used for the [`Authorization`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization) HTTP [header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers).
The login and password will be filled by the client and used for the
[`Authorization`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization) HTTP
[header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers).

Use this style of configuration to provide the basic authentication credentials (login and password):

Expand All @@ -56,49 +56,26 @@ Use this style of configuration to provide the basic authentication credentials

## Iroha Public Addresses

`TORII` is the module in charge of handling incoming and outgoing
connections. For client configuration, you can set up two addresses:
`TORII_API_URL` and `TORII_TELEMETRY_URL`.
`TORII` is the module in charge of handling incoming and outgoing connections. For client configuration, you can set up
two addresses: `TORII_API_URL` and `TORII_TELEMETRY_URL`.

### `TORII_API_URL`

First, the `TORII_API_URL` is the same as `TORII` `API_URL` in the
[peer configuration](peer-configuration.md#api-url). This is the module
responsible for handling incoming and outgoing connections. You should also
add the prefix `http://` or (_preferably_) `https://` to the address. For
example:
First, the `TORII_API_URL` is the same as
[`torii.address` in the peer configuration](/reference/config/params#param-torii-address). This is the module
responsible for handling incoming and outgoing connections. You should also add the prefix `http://` or (_preferably_)
`https://` to the address. For example:

```json
"TORII_API_URL": "http://127.0.0.1:8080"
```

### `TORII_TELEMETRY_URL`

The `TORII_TELEMETRY_URL` is used to specify the prometheus endpoint
address. You can set `TORII_TELEMETRY_URL` like this:

```json
"TORII_TELEMETRY_URL": "http://127.0.0.1:8180"
{
"TORII_API_URL": "http://127.0.0.1:8080"
}
```

A `GET` request to the `127.0.0.1:8180/status` will give you a JSON-encoded
representation of the top-level metrics, while a `GET` request to
`127.0.0.1:8180/metrics` will give you a (somewhat verbose) list of all
available metrics gathered in Iroha. You might want to change this if
you're having trouble gathering metrics using `prometheus`.

::: info

Learn how to [monitor Iroha performance](/guide/advanced/metrics.md) using
prometheus.

:::

## Transaction Limits

You can specify the transaction limits that each transaction must adhere
to: the maximum number of instructions and the maximum size of a WASM blob
(in bytes). For example:
You can specify the transaction limits that each transaction must adhere to: the maximum number of instructions and the
maximum size of a WASM blob (in bytes). For example:

```json
{
Expand All @@ -109,9 +86,8 @@ to: the maximum number of instructions and the maximum size of a WASM blob

## Transaction TTL and Timeout

Configure the time-to-live (TTL) for transactions and the timeout to wait
for the status. Both values have to be provided in milliseconds. For
example:
Configure the time-to-live (TTL) for transactions and the timeout to wait for the status. Both values have to be
provided in milliseconds. For example:

```json
"TRANSACTION_TIME_TO_LIVE_MS": 100000,
Expand All @@ -120,5 +96,5 @@ example:

## Transaction Nonce

If you set `ADD_TRANSACTION_NONCE` to `true`, Iroha will create different
hashes for transactions that occur repeatedly and simultaneously.
If you set `ADD_TRANSACTION_NONCE` to `true`, Iroha will create different hashes for transactions that occur repeatedly
and simultaneously.
74 changes: 0 additions & 74 deletions src/guide/configure/configuration-types.md

This file was deleted.

11 changes: 2 additions & 9 deletions src/guide/configure/genesis.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ empty, even if `configs/peer/genesis.json` is. Here's an example:
:::

The **genesis account** is specified in the
[peer configuration](./peer-configuration.md#genesis) file,
`configs/peer/config.json`. This is the account that will submit the
[`genesis` section of the peer configuration](/reference/config/params#genesis) file.
This is the account that will submit the
genesis block. The genesis account is like a super user account that has
elevated privileges, but only during the genesis round. The genesis account
should be signed by one of the peers, or, in other words, it should have
Expand Down Expand Up @@ -80,10 +80,3 @@ You can use `kagami` to generate the default genesis block:
```

The genesis block should be located in `configs/peer/genesis.json`.

## Configuration

As we already explained, _genesis account_ is specified in the peer
configuration file, `configs/peer/config.json`. You can use the same
configuration file to fine-tune other
[genesis block configurations](./peer-configuration.md#genesis).
9 changes: 0 additions & 9 deletions src/guide/configure/peer-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ following:
<!-- TODO: Add the new configuration reference, once its ready. Issue: https://github.com/hyperledger-iroha/iroha-2-docs/issues/392
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). -->

::: info

Configuration options have different underlying types and default values,
which are denoted in code as types wrapped in a single `Option<..>` or in a
double `Option<Option<..>>`. Refer to
[configuration types](./configuration-types.md) for details.

:::

## Generation

You can use `kagami` to generate the default peer configuration:
Expand Down
Loading
Loading