Skip to content

Commit

Permalink
Merge branch 'hyperledger:iroha2-dev' into iroha2-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Asem-Abdelhady authored Dec 15, 2023
2 parents c71e86a + 4765612 commit 61c0a55
Show file tree
Hide file tree
Showing 208 changed files with 6,557 additions and 10,834 deletions.
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
23 changes: 11 additions & 12 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))
- 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 Expand Up @@ -231,7 +230,7 @@ Follow these commit guidelines:
<details> <summary> Expand to learn how to change the log level or write logs to a JSON.</summary>
If one of your tests is failing, you may want to decrease the maximum logging level. By default, Iroha only logs `INFO` level messages, but retains the ability to produce both `DEBUG` and `TRACE` level logs. This setting can be changed either using the `MAX_LOG_LEVEL` environment variable for code-based tests, or using the `/configuration` endpoint on one of the peers in a deployed network.
If one of your tests is failing, you may want to decrease the maximum logging level. By default, Iroha only logs `INFO` level messages, but retains the ability to produce both `DEBUG` and `TRACE` level logs. This setting can be changed either using the `LOG_LEVEL` environment variable for code-based tests, or using the `/configuration` endpoint on one of the peers in a deployed network.
While logs printed in the `stdout` are sufficient, you may find it more convenient to produce `json`-formatted logs into a separate file and parse them using either [node-bunyan](https://www.npmjs.com/package/bunyan) or [rust-bunyan](https://crates.io/crates/bunyan).
Expand All @@ -251,16 +250,16 @@ In this case you should compile iroha with support of tokio console like that:
RUSTFLAGS="--cfg tokio_unstable" cargo build --features tokio-console
```

Port for tokio console can by configured through `TOKIO_CONSOLE_ADDR` configuration parameter (or environment variable).
Using tokio console require log level to be `TRACE`, can be enabled through configuration parameter or environment variable `MAX_LOG_LEVEL`.
Port for tokio console can by configured through `LOG_TOKIO_CONSOLE_ADDR` configuration parameter (or environment variable).
Using tokio console require log level to be `TRACE`, can be enabled through configuration parameter or environment variable `LOG_LEVEL`.

Example of running iroha with tokio console support using `scripts/test_env.sh`:

```bash
# 1. Compile iroha
RUSTFLAGS="--cfg tokio_unstable" cargo build --features tokio-console
# 2. Run iroha with TRACE log level
MAX_LOG_LEVEL=TRACE ./scripts/test_env.sh setup
LOG_LEVEL=TRACE ./scripts/test_env.sh setup
# 3. Access iroha. Peers will be available on ports 5555, 5556, ...
tokio-console http://127.0.0.1:5555
```
Expand Down
Loading

0 comments on commit 61c0a55

Please sign in to comment.