Skip to content

Commit

Permalink
docs: complete structure of config reference & related docs
Browse files Browse the repository at this point in the history
Signed-off-by: qua <[email protected]>
  • Loading branch information
0x009922 committed Nov 13, 2024
1 parent 39cfe97 commit 790686a
Show file tree
Hide file tree
Showing 22 changed files with 281 additions and 605 deletions.
34 changes: 9 additions & 25 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,6 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
text: 'Configure Iroha',
collapsed: true,
items: [
{
text: 'Configuration Types',
link: '/guide/configure/configuration-types',
},
{
text: 'Samples',
link: '/guide/configure/sample-configuration',
},
{
text: 'Peer Configuration',
link: '/guide/configure/peer-configuration',
},
{
text: 'Client Configuration',
link: '/guide/configure/client-configuration',
Expand Down Expand Up @@ -337,7 +325,8 @@ function sidebarReference(): DefaultTheme.SidebarItem[] {
link: '/reference/permissions.md',
},
{
text: 'CLI',
text: 'irohad CLI',
link: '/reference/irohad-cli.md',
},
{
text: 'Torii HTTP API',
Expand All @@ -347,23 +336,18 @@ function sidebarReference(): DefaultTheme.SidebarItem[] {
text: 'Foreign Function Interfaces',
link: '/reference/ffi',
},
],
},
{
text: 'Configuration',
items: [
{ text: 'Overview' },
{
text: 'Peer Configuration',
link: '/reference/config/index.md',
link: '/reference/peer-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: 'Parameters', link: '/reference/peer-config/params.md' },
{ text: 'Migration from pre-rc.20', link: '/reference/peer-config/migration.md' },
],
},
{ text: 'Genesis Block' },
{ text: 'On-Chain Configuration' },
{
text: 'Genesis Block',
link: '/reference/genesis.md',
},
],
},
]
Expand Down
4 changes: 2 additions & 2 deletions etc/meta.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* hyperledger-iroha/iroha#iroha2-dev
* `main` as of 2024/11/13
*/
export const IROHA_REV_DEV = 'e7a605c1a926c319d214ef3825524ee6c2e9f076'
export const IROHA_REV_DEV = '2a30fc97087d48f0aa95ef0382038c4a06288828'

/**
* hyperledger-iroha/iroha-javascript#iroha2 (rc13)
Expand Down
12 changes: 6 additions & 6 deletions etc/snippet-sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,18 @@ export default [
src: './src/example_code/lorem.rs',
},
{
src: `https://raw.githubusercontent.com/hyperledger-iroha/iroha/${IROHA_REV_DEV}/configs/client.template.toml`,
filename: 'client-cli-config-template.toml',
src: `https://raw.githubusercontent.com/hyperledger-iroha/iroha/${IROHA_REV_DEV}/docs/source/references/client.template.toml`,
// filename: 'client-cli-config-template.toml',
},
{
src: `https://raw.githubusercontent.com/hyperledger-iroha/iroha/${IROHA_REV_DEV}/configs/peer.template.toml`,
filename: 'peer-config-template.toml',
src: `https://raw.githubusercontent.com/hyperledger-iroha/iroha/${IROHA_REV_DEV}/docs/source/references/peer.template.toml`,
// filename: 'peer-config-template.toml',
},
{
src: `https://raw.githubusercontent.com/hyperledger-iroha/iroha/${IROHA_REV_DEV}/configs/swarm/genesis.json`,
src: `https://raw.githubusercontent.com/hyperledger-iroha/iroha/${IROHA_REV_DEV}/defaults/genesis.json`,
},
{
src: `https://raw.githubusercontent.com/hyperledger-iroha/iroha/${IROHA_REV_DEV}/client/examples/tutorial.rs`,
src: `https://raw.githubusercontent.com/hyperledger-iroha/iroha/${IROHA_REV_DEV}/crates/iroha/examples/tutorial.rs`,
filename: 'tutorial-snippets.rs',
},

Expand Down
3 changes: 1 addition & 2 deletions src/blockchain/world.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
consists of:

- Iroha [configuration parameters](/guide/configure/client-configuration.md)
- the list of
[trusted peers](/guide/configure/peer-configuration#trusted-peers)
- TODO: peers
- registered domains
- registered [triggers](/blockchain/triggers.md)
- registered
Expand Down
6 changes: 0 additions & 6 deletions src/guide/advanced/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ This topic will be updated as part of the new configuration reference.
The progress on the configuration reference can be tracked in the following GitHub issue:\
[iroha-2-docs > Issue #392: Tracking issue for Configuration Reference as per RFC](https://github.com/hyperledger-iroha/iroha-2-docs/issues/392).

::: note

For examples, see [Sample Configuration Files](../configure/sample-configuration.md).

:::

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.

**Example**:
Expand Down
17 changes: 4 additions & 13 deletions src/guide/advanced/running-iroha-on-bare-metal.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,12 @@ error-prone, particularly for exotic systems (Windows).
::: info

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

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

<!-- 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). -->

:::

Expand Down Expand Up @@ -448,13 +441,11 @@ Iroha in the real world.
```

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

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

5. After you have finished editing the configuration file, deploy Iroha by
Expand Down
4 changes: 2 additions & 2 deletions src/guide/configure/client-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Let's look at the client configuration options.

::: details Client configuration template

<<< @/snippets/client-cli-config-template.toml
<<< @/snippets/client.template.toml

:::

Expand Down Expand Up @@ -62,7 +62,7 @@ two addresses: `TORII_API_URL` and `TORII_TELEMETRY_URL`.
### `TORII_API_URL`

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
[`torii.address` in the peer configuration](/reference/peer-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:

Expand Down
2 changes: 1 addition & 1 deletion src/guide/configure/genesis.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ empty, even if `configs/peer/genesis.json` is. Here's an example:
:::

The **genesis account** is specified in the
[`genesis` section of the peer configuration](/reference/config/params#genesis) file.
[`genesis` section of the peer configuration](/reference/peer-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
Expand Down
195 changes: 0 additions & 195 deletions src/guide/configure/peer-configuration.md

This file was deleted.

16 changes: 0 additions & 16 deletions src/guide/configure/sample-configuration.md

This file was deleted.

Loading

0 comments on commit 790686a

Please sign in to comment.