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

[documentation]: remove auto-generated configuration reference #4127

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .github/workflows/iroha2-dev-pr-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches: [iroha-dev]
paths:
- 'docs/source/references/schema.json'
- 'docs/source/references/config.md'

jobs:
api-changes:
Expand All @@ -30,7 +29,7 @@ jobs:
continue-on-error: true
id: config_label
- uses: actions-ecosystem/action-add-labels@v1
if: contains(steps.config_label.outputs.added_modified, 'docs/source/references/config.md')
if: contains(steps.config_label.outputs.added_modified)
with:
github_token: ${{ secrets.github_token }}
labels: |
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/iroha2-dev-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Check config.md
if: always()
run: ./scripts/tests/consistency.sh docs
- name: Check genesis.json
if: always()
run: ./scripts/tests/consistency.sh genesis
Expand Down
15 changes: 7 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ New to our project? [Make your first contribution](#your-first-code-contribution

### TL;DR

* Find [ZenHub](https://app.zenhub.com/workspaces/iroha-v2-60ddb820813b9100181fc060/board?repos=181739240).
* Fork [Iroha](https://github.com/hyperledger/iroha/tree/iroha2-dev).
* Fix your issue of choice.
* Ensure you follow our [style guides](#style-guides) for code and documentation.
* Write [tests](https://doc.rust-lang.org/cargo/commands/cargo-test.html). Ensure they all pass (`cargo test`).
* Fix [`clippy`](https://lib.rs/crates/cargo-lints) warnings: `cargo lints clippy --workspace --benches --tests --examples --all-features`.
* Format code `cargo +nightly fmt --all` and generate docs `cargo run --bin kagami -- docs >"docs/source/references/config.md" && git add "docs/source/references/config.md"`.
* With the `upstream` set to track [Hyperledger Iroha repository](https://github.com/hyperledger/iroha), `git pull -r upstream iroha2-dev`, `git commit -s`, `git push <your-fork>`, and [create a pull request](https://github.com/hyperledger/iroha/compare) to the `iroha2-dev` branch. Ensure the PR has the `[type] #<issue number>: Description` [title](#pull-request-titles).
- Find [ZenHub](https://app.zenhub.com/workspaces/iroha-v2-60ddb820813b9100181fc060/board?repos=181739240).
- Fork [Iroha](https://github.com/hyperledger/iroha/tree/iroha2-dev).
- Fix your issue of choice.
- Ensure you follow our [style guides](#style-guides) for code and documentation.
- Write [tests](https://doc.rust-lang.org/cargo/commands/cargo-test.html). Ensure they all pass (`cargo test --workspace`).
- Perform pre-commit routine like formatting & artifacts regeneration (see [`pre-commit.sample`](./hooks/pre-commit.sample))
0x009922 marked this conversation as resolved.
Show resolved Hide resolved
- With the `upstream` set to track [Hyperledger Iroha repository](https://github.com/hyperledger/iroha), `git pull -r upstream iroha2-dev`, `git commit -s`, `git push <your-fork>`, and [create a pull request](https://github.com/hyperledger/iroha/compare) to the `iroha2-dev` branch. Ensure the PR has the `[type] #<issue number>: Description` [title](#pull-request-titles).

### Reporting Bugs

Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ A brief overview on how to configure and maintain an Iroha instance:

### Configuration

You can provide configuration parameters either as a `config.json` or using environment variables. Refer to the [detailed list](./docs/source/references/config.md) of all available configuration parameters.

Configuration example you may use as a reference point: [cli/src/samples.rs](./cli/src/samples.rs)
**Note:** this section is under development. You can track it in the [issue](https://github.com/hyperledger/iroha-2-docs/issues/392).

### Endpoints

Expand All @@ -169,7 +167,7 @@ For a list of all endpoints, available operations, and ways to customize them wi

By default, Iroha provides logs in a human-readable format and prints them out to `stdout`.

The logging level can be changed either via the [`logger.level` configuration parameter](./docs/source/references/config.md#loggerlevel) or at run-time using the `configuration` endpoint.
The logging level can be changed either via the `logger.level` configuration parameter or at run-time using the `configuration` endpoint.

<details><summary>Example: changing log level</summary>

Expand All @@ -182,7 +180,7 @@ curl -X POST \
```
</details>

The log format might be configured via the [`logger.format` configuration parameter](./docs/source/references/config.md#loggerformat). Possible values are: `full` (default), `compact`, `pretty`, and `json`.
The log format might be configured via the `logger.format` configuration parameter. Possible values are: `full` (default), `compact`, `pretty`, and `json`.

Output goes to `/dev/stdout`. Piping to files or [log rotation](https://www.commandlinux.com/man-page/man5/logrotate.conf.5.html) is the responsibility of the peer administrator.

Expand Down Expand Up @@ -218,7 +216,7 @@ We encourage you to check out our [Iroha 2 Tutorial](https://hyperledger.github.
* [Glossary](https://hyperledger.github.io/iroha-2-docs/guide/glossary)
* [Iroha Special Instructions](https://hyperledger.github.io/iroha-2-docs/guide/blockchain/instructions)
* [API Reference](https://hyperledger.github.io/iroha-2-docs/api/torii-endpoints)
* [Configuration Reference](./docs/source/references/config.md)
<!-- * [Configuration Reference](./docs/source/references/config.md) -->
mversic marked this conversation as resolved.
Show resolved Hide resolved
* [Iroha 2 Whitepaper](./docs/source/iroha_2_whitepaper.md)

Iroha SDKs:
Expand Down
22 changes: 1 addition & 21 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,7 @@ Refer to [generating key pairs with `kagami`](../tools/kagami#crypto) for more d

### Configuration file

You must provide a configuration file to run the Iroha peer binary. Iroha will not run with defaults if the configuration file is not available.

The Iroha binary looks for either a `config.json` file in the current directory or a JSON file in `IROHA2_CONFIG_PATH`. If the configuration file is not valid, the Iroha peer binary exits and does nothing. If neither of these files is provided, all the fields from the default `config.json` should be specified as environment variables. Note that environment variables override the variables in their respective fields provided via `config.json`.

The environment variables replacing `config.json` should be passed as JSON strings, meaning that any inner quotes should be properly escaped in the command line as shown in the example below.

<details> <summary>Expand to see the example</summary>

``` bash
IROHA_TORII="{\"P2P_ADDR\": \"127.0.0.1:1339\", \"API_URL\": \"127.0.0.1:8080\"}" IROHA_SUMERAGI="{\"TRUSTED_PEERS\": [{\"address\": \"127.0.0.1:1337\",\"public_key\": \"ed01201C61FAF8FE94E253B93114240394F79A607B7FA55F9E5A41EBEC74B88055768B\"},{\"address\": \"127.0.0.1:1338\",\"public_key\": \"ed0120CC25624D62896D3A0BFD8940F928DC2ABF27CC57CEFEB442AA96D9081AAE58A1\"},{\"address\": \"127.0.0.1:1339\",\"public_key\": \"ed0120FACA9E8AA83225CB4D16D67F27DD4F93FC30FFA11ADC1F5C88FD5495ECC91020\"},{\"address\": \"127.0.0.1:1340\",\"public_key\": \"ed01208E351A70B6A603ED285D666B8D689B680865913BA03CE29FB7D13A166C4E7F1F\"}]}" IROHA_KURA="{\"INIT_MODE\": \"strict\",\"BLOCK_STORE_PATH\": \"./storage\"}" IROHA_BLOCK_SYNC="{\"GOSSIP_PERIOD_MS\": 10000,\"BATCH_SIZE\": 2}" IROHA_PUBLIC_KEY="ed01201C61FAF8FE94E253B93114240394F79A607B7FA55F9E5A41EBEC74B88055768B" IROHA_PRIVATE_KEY="{\"digest_function\": \"ed25519\",\"payload\": \"282ED9F3CF92811C3818DBC4AE594ED59DC1A2F78E4241E31924E101D6B1FB831C61FAF8FE94E253B93114240394F79A607B7FA55F9E5A41EBEC74B88055768B\"}" IROHA_GENESIS="{\"ACCOUNT_PUBLIC_KEY\": \"ed01204CFFD0EE429B1BDD36B3910EC570852B8BB63F18750341772FB46BC856C5CAAF\",\"ACCOUNT_PRIVATE_KEY\": {\"digest_function\": \"ed25519\",\"payload\": \"D748E18CE60CB30DEA3E73C9019B7AF45A8D465E3D71BCC9A5EF99A008205E534CFFD0EE429B1BDD36B3910EC570852B8BB63F18750341772FB46BC856C5CAAF\"}}" ./iroha
```

</details>

:grey_exclamation: We do not recommend using environment variables for configuration outside docker-compose and Kubernetes deployments. Please change the values in the configuration file instead. That would also help us debug the problems that you might be having.

The [configuration options reference](../docs/source/references/config.md) provides detailed explanations of each configuration variable. You may use the [sample configuration file](../configs/peer/config.json) for quick testing.

One of the peers on your network must be provided with the genesis block, which is either `IROHA2_GENESIS_PATH` or `genesis.json` in the working directory.
Check [configuration options](https://github.com/hyperledger/iroha/blob/iroha2-dev/docs/source/references/config.md#genesis) for details.
Learn more about the genesis block in [our tutorial](https://hyperledger.github.io/iroha-2-docs/guide/configure/genesis.html).
**Note:** this section is under development. You can track it in the [issue](https://github.com/hyperledger/iroha-2-docs/issues/392).

## Deployment

Expand Down
263 changes: 0 additions & 263 deletions config/base/derive/src/documented.rs

This file was deleted.

Loading
Loading