From 5f0941ad05a3131f4a78ac944e60f48c1d9d39b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 11:35:38 +0400 Subject: [PATCH 01/59] feat!: rename `iroha_client_cli` crate to `iroha_cli`, match directory and crate names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .github/dependabot.yml | 2 +- .github/workflows/iroha2-dev-pr-static.yml | 18 +++--- .github/workflows/iroha2-dev-pr.yml | 14 ++--- Cargo.lock | 2 +- Cargo.toml | 10 ++-- Dockerfile | 2 +- README.md | 8 +-- docs/README.md | 2 +- {client => iroha}/Cargo.toml | 0 {client => iroha}/README.md | 2 +- {client => iroha}/benches/torii.rs | 0 {client => iroha}/benches/tps/README.md | 0 {client => iroha}/benches/tps/config.json | 0 {client => iroha}/benches/tps/dev.rs | 0 {client => iroha}/benches/tps/oneshot.rs | 0 {client => iroha}/benches/tps/utils.rs | 0 .../examples/million_accounts_genesis.rs | 0 .../examples/register_1000_triggers.rs | 0 {client => iroha}/examples/tutorial.rs | 0 {client => iroha}/src/client.rs | 0 {client => iroha}/src/config.rs | 0 {client => iroha}/src/config/user.rs | 0 {client => iroha}/src/http.rs | 0 {client => iroha}/src/http_default.rs | 0 {client => iroha}/src/lib.rs | 0 {client => iroha}/src/query.rs | 0 {client => iroha}/tests/integration/asset.rs | 0 .../tests/integration/asset_propagation.rs | 0 .../tests/integration/events/data.rs | 0 .../tests/integration/events/mod.rs | 0 .../tests/integration/events/notification.rs | 0 .../tests/integration/events/pipeline.rs | 0 .../extra_functional/connected_peers.rs | 0 .../integration/extra_functional/genesis.rs | 0 .../tests/integration/extra_functional/mod.rs | 0 .../multiple_blocks_created.rs | 0 .../integration/extra_functional/normal.rs | 0 .../extra_functional/offline_peers.rs | 0 .../extra_functional/restart_peer.rs | 0 .../extra_functional/unregister_peer.rs | 0 .../extra_functional/unstable_network.rs | 0 {client => iroha}/tests/integration/mod.rs | 0 .../tests/integration/multisig.rs | 0 .../tests/integration/non_mintable.rs | 0 .../tests/integration/pagination.rs | 0 .../tests/integration/permissions.rs | 0 .../tests/integration/queries/account.rs | 0 .../tests/integration/queries/asset.rs | 0 .../tests/integration/queries/mod.rs | 0 .../tests/integration/queries/query_errors.rs | 0 .../tests/integration/queries/role.rs | 0 .../integration/queries/smart_contract.rs | 0 {client => iroha}/tests/integration/roles.rs | 0 .../tests/integration/set_parameter.rs | 0 .../tests/integration/sorting.rs | 0 .../tests/integration/status_response.rs | 0 .../tests/integration/transfer_asset.rs | 0 .../tests/integration/transfer_domain.rs | 0 .../integration/triggers/by_call_trigger.rs | 0 .../integration/triggers/data_trigger.rs | 0 .../integration/triggers/event_trigger.rs | 0 .../tests/integration/triggers/mod.rs | 0 .../tests/integration/triggers/orphans.rs | 0 .../integration/triggers/time_trigger.rs | 0 .../integration/triggers/trigger_rollback.rs | 0 .../tests/integration/tx_chain_id.rs | 0 .../tests/integration/tx_history.rs | 0 .../tests/integration/tx_rollback.rs | 0 .../tests/integration/upgrade.rs | 0 {client => iroha}/tests/mod.rs | 0 .../ui_fail/cant_filter_singular_query.rs | 0 {client_cli => iroha_cli}/.gitignore | 0 {client_cli => iroha_cli}/Cargo.toml | 2 +- {client_cli => iroha_cli}/README.md | 0 {client_cli => iroha_cli}/build.rs | 0 {client_cli => iroha_cli}/pytests/.gitignore | 0 {client_cli => iroha_cli}/pytests/README.md | 14 ++--- .../pytests/common/__init__.py | 0 .../pytests/common/consts.py | 0 .../pytests/common/helpers.py | 0 .../json_isi_examples/unregister_asset.json | 0 .../pytests/common/settings.py | 0 .../pytests/models/__init__.py | 0 .../pytests/models/account.py | 0 .../pytests/models/asset.py | 0 .../pytests/models/domain.py | 0 {client_cli => iroha_cli}/pytests/poetry.lock | 0 .../pytests/pyproject.toml | 0 .../pytests/src/__init__.py | 0 .../pytests/src/client_cli/__init__.py | 8 +-- .../pytests/src/client_cli/client_cli.py | 56 +++++++++---------- .../pytests/src/client_cli/configuration.py | 0 .../pytests/src/client_cli/have.py | 16 +++--- .../pytests/src/client_cli/iroha.py | 8 +-- .../pytests/src/client_cli/match.py | 0 .../pytests/test/__init__.py | 0 .../pytests/test/accounts/conftest.py | 0 .../accounts/test_accounts_query_filters.py | 10 ++-- .../test/accounts/test_register_accounts.py | 26 ++++----- .../pytests/test/assets/conftest.py | 0 .../test/assets/test_assets_query_filters.py | 14 ++--- .../pytests/test/assets/test_burn_assets.py | 4 +- .../pytests/test/assets/test_mint_assets.py | 10 ++-- .../assets/test_register_asset_definitions.py | 38 ++++++------- .../test/assets/test_transfer_assets.py | 8 +-- .../test/assets/test_unregister_asset.py | 6 +- .../pytests/test/atomicity/conftest.py | 0 ...ultiple_instructions_within_transaction.py | 0 ...st_pair_instructions_within_transaction.py | 0 ...t_wrong_instructions_within_transaction.py | 0 .../pytests/test/conftest.py | 18 +++--- .../pytests/test/domains/conftest.py | 0 .../domains/test_domains_query_filters.py | 6 +- .../test/domains/test_register_domains.py | 34 +++++------ .../test/domains/test_transfer_domains.py | 4 +- .../pytests/test/triggers/conftest.py | 0 .../test/triggers/test_register_trigger.py | 6 +- {client_cli => iroha_cli}/src/main.rs | 0 {cli => irohad}/Cargo.toml | 0 {cli => irohad}/README.md | 0 {cli => irohad}/build.rs | 0 {cli => irohad}/src/lib.rs | 0 {cli => irohad}/src/main.rs | 0 {cli => irohad}/src/samples.rs | 0 124 files changed, 174 insertions(+), 174 deletions(-) rename {client => iroha}/Cargo.toml (100%) rename {client => iroha}/README.md (79%) rename {client => iroha}/benches/torii.rs (100%) rename {client => iroha}/benches/tps/README.md (100%) rename {client => iroha}/benches/tps/config.json (100%) rename {client => iroha}/benches/tps/dev.rs (100%) rename {client => iroha}/benches/tps/oneshot.rs (100%) rename {client => iroha}/benches/tps/utils.rs (100%) rename {client => iroha}/examples/million_accounts_genesis.rs (100%) rename {client => iroha}/examples/register_1000_triggers.rs (100%) rename {client => iroha}/examples/tutorial.rs (100%) rename {client => iroha}/src/client.rs (100%) rename {client => iroha}/src/config.rs (100%) rename {client => iroha}/src/config/user.rs (100%) rename {client => iroha}/src/http.rs (100%) rename {client => iroha}/src/http_default.rs (100%) rename {client => iroha}/src/lib.rs (100%) rename {client => iroha}/src/query.rs (100%) rename {client => iroha}/tests/integration/asset.rs (100%) rename {client => iroha}/tests/integration/asset_propagation.rs (100%) rename {client => iroha}/tests/integration/events/data.rs (100%) rename {client => iroha}/tests/integration/events/mod.rs (100%) rename {client => iroha}/tests/integration/events/notification.rs (100%) rename {client => iroha}/tests/integration/events/pipeline.rs (100%) rename {client => iroha}/tests/integration/extra_functional/connected_peers.rs (100%) rename {client => iroha}/tests/integration/extra_functional/genesis.rs (100%) rename {client => iroha}/tests/integration/extra_functional/mod.rs (100%) rename {client => iroha}/tests/integration/extra_functional/multiple_blocks_created.rs (100%) rename {client => iroha}/tests/integration/extra_functional/normal.rs (100%) rename {client => iroha}/tests/integration/extra_functional/offline_peers.rs (100%) rename {client => iroha}/tests/integration/extra_functional/restart_peer.rs (100%) rename {client => iroha}/tests/integration/extra_functional/unregister_peer.rs (100%) rename {client => iroha}/tests/integration/extra_functional/unstable_network.rs (100%) rename {client => iroha}/tests/integration/mod.rs (100%) rename {client => iroha}/tests/integration/multisig.rs (100%) rename {client => iroha}/tests/integration/non_mintable.rs (100%) rename {client => iroha}/tests/integration/pagination.rs (100%) rename {client => iroha}/tests/integration/permissions.rs (100%) rename {client => iroha}/tests/integration/queries/account.rs (100%) rename {client => iroha}/tests/integration/queries/asset.rs (100%) rename {client => iroha}/tests/integration/queries/mod.rs (100%) rename {client => iroha}/tests/integration/queries/query_errors.rs (100%) rename {client => iroha}/tests/integration/queries/role.rs (100%) rename {client => iroha}/tests/integration/queries/smart_contract.rs (100%) rename {client => iroha}/tests/integration/roles.rs (100%) rename {client => iroha}/tests/integration/set_parameter.rs (100%) rename {client => iroha}/tests/integration/sorting.rs (100%) rename {client => iroha}/tests/integration/status_response.rs (100%) rename {client => iroha}/tests/integration/transfer_asset.rs (100%) rename {client => iroha}/tests/integration/transfer_domain.rs (100%) rename {client => iroha}/tests/integration/triggers/by_call_trigger.rs (100%) rename {client => iroha}/tests/integration/triggers/data_trigger.rs (100%) rename {client => iroha}/tests/integration/triggers/event_trigger.rs (100%) rename {client => iroha}/tests/integration/triggers/mod.rs (100%) rename {client => iroha}/tests/integration/triggers/orphans.rs (100%) rename {client => iroha}/tests/integration/triggers/time_trigger.rs (100%) rename {client => iroha}/tests/integration/triggers/trigger_rollback.rs (100%) rename {client => iroha}/tests/integration/tx_chain_id.rs (100%) rename {client => iroha}/tests/integration/tx_history.rs (100%) rename {client => iroha}/tests/integration/tx_rollback.rs (100%) rename {client => iroha}/tests/integration/upgrade.rs (100%) rename {client => iroha}/tests/mod.rs (100%) rename {client => iroha}/tests/ui_fail/cant_filter_singular_query.rs (100%) rename {client_cli => iroha_cli}/.gitignore (100%) rename {client_cli => iroha_cli}/Cargo.toml (97%) rename {client_cli => iroha_cli}/README.md (100%) rename {client_cli => iroha_cli}/build.rs (100%) rename {client_cli => iroha_cli}/pytests/.gitignore (100%) rename {client_cli => iroha_cli}/pytests/README.md (95%) rename {client_cli => iroha_cli}/pytests/common/__init__.py (100%) rename {client_cli => iroha_cli}/pytests/common/consts.py (100%) rename {client_cli => iroha_cli}/pytests/common/helpers.py (100%) rename {client_cli => iroha_cli}/pytests/common/json_isi_examples/unregister_asset.json (100%) rename {client_cli => iroha_cli}/pytests/common/settings.py (100%) rename {client_cli => iroha_cli}/pytests/models/__init__.py (100%) rename {client_cli => iroha_cli}/pytests/models/account.py (100%) rename {client_cli => iroha_cli}/pytests/models/asset.py (100%) rename {client_cli => iroha_cli}/pytests/models/domain.py (100%) rename {client_cli => iroha_cli}/pytests/poetry.lock (100%) rename {client_cli => iroha_cli}/pytests/pyproject.toml (100%) rename {client_cli => iroha_cli}/pytests/src/__init__.py (100%) rename {client_cli => iroha_cli}/pytests/src/client_cli/__init__.py (61%) rename {client_cli => iroha_cli}/pytests/src/client_cli/client_cli.py (91%) rename {client_cli => iroha_cli}/pytests/src/client_cli/configuration.py (100%) rename {client_cli => iroha_cli}/pytests/src/client_cli/have.py (91%) rename {client_cli => iroha_cli}/pytests/src/client_cli/iroha.py (94%) rename {client_cli => iroha_cli}/pytests/src/client_cli/match.py (100%) rename {client_cli => iroha_cli}/pytests/test/__init__.py (100%) rename {client_cli => iroha_cli}/pytests/test/accounts/conftest.py (100%) rename {client_cli => iroha_cli}/pytests/test/accounts/test_accounts_query_filters.py (84%) rename {client_cli => iroha_cli}/pytests/test/accounts/test_register_accounts.py (71%) rename {client_cli => iroha_cli}/pytests/test/assets/conftest.py (100%) rename {client_cli => iroha_cli}/pytests/test/assets/test_assets_query_filters.py (85%) rename {client_cli => iroha_cli}/pytests/test/assets/test_burn_assets.py (94%) rename {client_cli => iroha_cli}/pytests/test/assets/test_mint_assets.py (89%) rename {client_cli => iroha_cli}/pytests/test/assets/test_register_asset_definitions.py (74%) rename {client_cli => iroha_cli}/pytests/test/assets/test_transfer_assets.py (93%) rename {client_cli => iroha_cli}/pytests/test/assets/test_unregister_asset.py (86%) rename {client_cli => iroha_cli}/pytests/test/atomicity/conftest.py (100%) rename {client_cli => iroha_cli}/pytests/test/atomicity/test_multiple_instructions_within_transaction.py (100%) rename {client_cli => iroha_cli}/pytests/test/atomicity/test_pair_instructions_within_transaction.py (100%) rename {client_cli => iroha_cli}/pytests/test/atomicity/test_wrong_instructions_within_transaction.py (100%) rename {client_cli => iroha_cli}/pytests/test/conftest.py (96%) rename {client_cli => iroha_cli}/pytests/test/domains/conftest.py (100%) rename {client_cli => iroha_cli}/pytests/test/domains/test_domains_query_filters.py (81%) rename {client_cli => iroha_cli}/pytests/test/domains/test_register_domains.py (68%) rename {client_cli => iroha_cli}/pytests/test/domains/test_transfer_domains.py (92%) rename {client_cli => iroha_cli}/pytests/test/triggers/conftest.py (100%) rename {client_cli => iroha_cli}/pytests/test/triggers/test_register_trigger.py (81%) rename {client_cli => iroha_cli}/src/main.rs (100%) rename {cli => irohad}/Cargo.toml (100%) rename {cli => irohad}/README.md (100%) rename {cli => irohad}/build.rs (100%) rename {cli => irohad}/src/lib.rs (100%) rename {cli => irohad}/src/main.rs (100%) rename {cli => irohad}/src/samples.rs (100%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6fffbb34d9b..028b57ae5d4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -21,7 +21,7 @@ updates: - package-ecosystem: "pip" target-branch: "main" - directory: "/client_cli/pytests/" + directory: "/iroha_cli/pytests/" schedule: interval: "daily" commit-message: diff --git a/.github/workflows/iroha2-dev-pr-static.yml b/.github/workflows/iroha2-dev-pr-static.yml index fe01695eab8..2b7897996d4 100644 --- a/.github/workflows/iroha2-dev-pr-static.yml +++ b/.github/workflows/iroha2-dev-pr-static.yml @@ -8,7 +8,7 @@ on: - '**.json' - '**.toml' - '.github/workflows/iroha2-dev-pr-static.yml' - - 'client_cli/pytests/**/*.py' + - '../../iroha_cli/pytests/**/*.py' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -64,8 +64,8 @@ jobs: image: hyperledger/iroha2-ci:nightly-2024-09-09 steps: - uses: actions/checkout@v4 - - name: Install dependencies using Poetry for client_cli/pytests - working-directory: client_cli/pytests + - name: Install dependencies using Poetry for iroha_cli/pytests + working-directory: iroha_cli/pytests run: | poetry lock --no-update poetry install @@ -74,24 +74,24 @@ jobs: run: | poetry lock --no-update poetry install - - name: Check code formatting with Black in client_cli/pytests - working-directory: client_cli/pytests + - name: Check code formatting with Black in iroha_cli/pytests + working-directory: iroha_cli/pytests run: | poetry run black --check . - name: Check code formatting with Black in torii/pytests working-directory: torii/pytests run: | poetry run black --check . - - name: Run mypy (Type Checker) in client_cli/pytests - working-directory: client_cli/pytests + - name: Run mypy (Type Checker) in iroha_cli/pytests + working-directory: iroha_cli/pytests run: | poetry run mypy --explicit-package-bases --ignore-missing-imports . - name: Run mypy (Type Checker) in torii/pytests working-directory: torii/pytests run: | poetry run mypy --explicit-package-bases --ignore-missing-imports . - - name: Run flake8 (Linter) in client_cli/pytests - working-directory: client_cli/pytests + - name: Run flake8 (Linter) in iroha_cli/pytests + working-directory: iroha_cli/pytests run: | poetry run flake8 . --max-line-length=110 --ignore=F401,W503,E203 - name: Run flake8 (Linter) in torii/pytests diff --git a/.github/workflows/iroha2-dev-pr.yml b/.github/workflows/iroha2-dev-pr.yml index 58cf964a962..e35894c4156 100644 --- a/.github/workflows/iroha2-dev-pr.yml +++ b/.github/workflows/iroha2-dev-pr.yml @@ -60,7 +60,7 @@ jobs: path: ${{ env.DOCKER_COMPOSE_PATH }}/executor.wasm retention-days: 1 - # exclude: client/tests/integration/ + # exclude: iroha/tests/integration/ with_coverage: runs-on: [self-hosted, Linux, iroha2] needs: build_executor @@ -83,7 +83,7 @@ jobs: LLVM_PROFILE_FILE: "iroha-%p-%m.profraw" - name: Generate lcov report if: always() - run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/client_cli" --ignore "**/main.rs" -o lcov.info + run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/iroha_cli" --ignore "**/main.rs" -o lcov.info - name: Upload lcov report artifact if: always() uses: actions/upload-artifact@v4 @@ -91,8 +91,8 @@ jobs: name: lcov.info path: lcov.info - # include: client/tests/integration/ - # exclude: client/tests/integration/extra_functional + # include: iroha/tests/integration/ + # exclude: iroha/tests/integration/extra_functional integration: runs-on: [self-hosted, Linux, iroha2] needs: build_executor @@ -110,7 +110,7 @@ jobs: - name: Run tests, with no-default-features run: mold --run cargo test --no-default-features --no-fail-fast -p iroha integration -- --skip extra_functional - # include: client/tests/integration/extra_functional + # include: iroha/tests/integration/extra_functional extra_functional: runs-on: [self-hosted, Linux, iroha2] needs: build_executor @@ -251,10 +251,10 @@ jobs: - name: Make Binaries Executable run: chmod +x ${{ env.TEST_DIR }}/${{ env.IROHA_BIN }} - name: Install Client CLI Dependencies - working-directory: client_cli/pytests + working-directory: iroha_cli/pytests run: ${{ env.POETRY_PATH }} install - name: Run Client CLI Tests - working-directory: client_cli/pytests + working-directory: iroha_cli/pytests env: CLIENT_CLI_BINARY: ../../${{ env.TEST_DIR }}/${{ env.IROHA_BIN }} CLIENT_CLI_CONFIG: ../../${{ env.TEST_DIR }}/client.toml diff --git a/Cargo.lock b/Cargo.lock index 8fd8c318947..38b21d1775f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2927,7 +2927,7 @@ dependencies = [ ] [[package]] -name = "iroha_client_cli" +name = "iroha_cli" version = "2.0.0-rc.1.0" dependencies = [ "clap", diff --git a/Cargo.toml b/Cargo.toml index 8690586bf51..87c92f0229e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,11 +16,11 @@ categories = ["cryptography::cryptocurrencies"] [workspace.dependencies] iroha_core = { version = "=2.0.0-rc.1.0 ", path = "core" } -irohad = { version = "=2.0.0-rc.1.0", path = "cli" } +irohad = { version = "=2.0.0-rc.1.0", path = "irohad" } iroha_torii = { version = "=2.0.0-rc.1.0", path = "torii" } iroha_torii_const = { version = "=2.0.0-rc.1.0", path = "torii/const" } -iroha = { version = "=2.0.0-rc.1.0", path = "client" } +iroha = { version = "=2.0.0-rc.1.0", path = "iroha" } iroha_macro_utils = { version = "=2.0.0-rc.1.0", path = "macro/utils" } iroha_telemetry = { version = "=2.0.0-rc.1.0", path = "telemetry" } @@ -194,9 +194,9 @@ clippy.wildcard_dependencies = "deny" [workspace] resolver = "2" members = [ - "cli", - "client", - "client_cli", + "irohad", + "iroha", + "iroha_cli", "config", "config/base", "core", diff --git a/Dockerfile b/Dockerfile index 62291d32590..eb624e7a8d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ WORKDIR /iroha COPY . . RUN cargo build \ -p irohad \ - -p iroha_client_cli \ + -p iroha_cli \ -p kagami \ --target x86_64-unknown-linux-musl \ --profile deploy diff --git a/README.md b/README.md index 3ae649008ac..c95376c8ef3 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Once you have built Iroha, you can instantiate the minimum viable network: docker compose up ``` -With the `docker-compose` instance running, use [Iroha Client CLI](./client_cli/README.md): +With the `docker-compose` instance running, use [Iroha Client CLI](iroha_cli/README.md): ```bash cargo run --bin iroha -- --config ./defaults/client.toml @@ -131,9 +131,9 @@ cargo run --bin iroha -- --config ./defaults/client.toml Iroha project mainly consists of the following crates: -* [`iroha`](client) provides a library for building clients that communicate with peers. -* [`irohad`](server cli) is the command-line application for deploying an Iroha peer. Contains the routing table and definitions of API endpoints. -* [`iroha_client_cli`](client cli) is the reference implementation of a client. +* [`iroha`](iroha) provides a library for building clients that communicate with peers. +* [`irohad`](irohad) is the command-line application for deploying an Iroha peer. Contains the routing table and definitions of API endpoints. +* [`iroha_cli`](iroha_cli) is the command-line client, a reference application using the client SDK. * [`iroha_core`](core) is the primary library used by all other crates, including the peer endpoint management. * [`iroha_config`](config) handles configuration and documentation generation for options and run-time changes. * [`iroha_crypto`](crypto) defines cryptographic aspects of Iroha. diff --git a/docs/README.md b/docs/README.md index bf1c924a7ec..41d813e33f2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -20,4 +20,4 @@ Documentation for Iroha 2 tools: The following is useful for development: - [Hot reload Iroha in a Docker container](./source/guides/hot-reload.md) -- [Benchmark your code](../client/benches/tps/README.md) +- [Benchmark your code](../iroha/benches/tps/README.md) diff --git a/client/Cargo.toml b/iroha/Cargo.toml similarity index 100% rename from client/Cargo.toml rename to iroha/Cargo.toml diff --git a/client/README.md b/iroha/README.md similarity index 79% rename from client/README.md rename to iroha/README.md index 9faa164a258..12b58623472 100644 --- a/client/README.md +++ b/iroha/README.md @@ -21,4 +21,4 @@ iroha = { git = "https://github.com/hyperledger/iroha", branch = "main" } ## Examples -We highly recommend looking at the sample [`iroha`](../client_cli) implementation binary as well as our [tutorial](https://hyperledger.github.io/iroha-2-docs/guide/rust.html) for more examples and explanations. +We highly recommend looking at the sample [`iroha`](../iroha_cli) implementation binary as well as our [tutorial](https://hyperledger.github.io/iroha-2-docs/guide/rust.html) for more examples and explanations. diff --git a/client/benches/torii.rs b/iroha/benches/torii.rs similarity index 100% rename from client/benches/torii.rs rename to iroha/benches/torii.rs diff --git a/client/benches/tps/README.md b/iroha/benches/tps/README.md similarity index 100% rename from client/benches/tps/README.md rename to iroha/benches/tps/README.md diff --git a/client/benches/tps/config.json b/iroha/benches/tps/config.json similarity index 100% rename from client/benches/tps/config.json rename to iroha/benches/tps/config.json diff --git a/client/benches/tps/dev.rs b/iroha/benches/tps/dev.rs similarity index 100% rename from client/benches/tps/dev.rs rename to iroha/benches/tps/dev.rs diff --git a/client/benches/tps/oneshot.rs b/iroha/benches/tps/oneshot.rs similarity index 100% rename from client/benches/tps/oneshot.rs rename to iroha/benches/tps/oneshot.rs diff --git a/client/benches/tps/utils.rs b/iroha/benches/tps/utils.rs similarity index 100% rename from client/benches/tps/utils.rs rename to iroha/benches/tps/utils.rs diff --git a/client/examples/million_accounts_genesis.rs b/iroha/examples/million_accounts_genesis.rs similarity index 100% rename from client/examples/million_accounts_genesis.rs rename to iroha/examples/million_accounts_genesis.rs diff --git a/client/examples/register_1000_triggers.rs b/iroha/examples/register_1000_triggers.rs similarity index 100% rename from client/examples/register_1000_triggers.rs rename to iroha/examples/register_1000_triggers.rs diff --git a/client/examples/tutorial.rs b/iroha/examples/tutorial.rs similarity index 100% rename from client/examples/tutorial.rs rename to iroha/examples/tutorial.rs diff --git a/client/src/client.rs b/iroha/src/client.rs similarity index 100% rename from client/src/client.rs rename to iroha/src/client.rs diff --git a/client/src/config.rs b/iroha/src/config.rs similarity index 100% rename from client/src/config.rs rename to iroha/src/config.rs diff --git a/client/src/config/user.rs b/iroha/src/config/user.rs similarity index 100% rename from client/src/config/user.rs rename to iroha/src/config/user.rs diff --git a/client/src/http.rs b/iroha/src/http.rs similarity index 100% rename from client/src/http.rs rename to iroha/src/http.rs diff --git a/client/src/http_default.rs b/iroha/src/http_default.rs similarity index 100% rename from client/src/http_default.rs rename to iroha/src/http_default.rs diff --git a/client/src/lib.rs b/iroha/src/lib.rs similarity index 100% rename from client/src/lib.rs rename to iroha/src/lib.rs diff --git a/client/src/query.rs b/iroha/src/query.rs similarity index 100% rename from client/src/query.rs rename to iroha/src/query.rs diff --git a/client/tests/integration/asset.rs b/iroha/tests/integration/asset.rs similarity index 100% rename from client/tests/integration/asset.rs rename to iroha/tests/integration/asset.rs diff --git a/client/tests/integration/asset_propagation.rs b/iroha/tests/integration/asset_propagation.rs similarity index 100% rename from client/tests/integration/asset_propagation.rs rename to iroha/tests/integration/asset_propagation.rs diff --git a/client/tests/integration/events/data.rs b/iroha/tests/integration/events/data.rs similarity index 100% rename from client/tests/integration/events/data.rs rename to iroha/tests/integration/events/data.rs diff --git a/client/tests/integration/events/mod.rs b/iroha/tests/integration/events/mod.rs similarity index 100% rename from client/tests/integration/events/mod.rs rename to iroha/tests/integration/events/mod.rs diff --git a/client/tests/integration/events/notification.rs b/iroha/tests/integration/events/notification.rs similarity index 100% rename from client/tests/integration/events/notification.rs rename to iroha/tests/integration/events/notification.rs diff --git a/client/tests/integration/events/pipeline.rs b/iroha/tests/integration/events/pipeline.rs similarity index 100% rename from client/tests/integration/events/pipeline.rs rename to iroha/tests/integration/events/pipeline.rs diff --git a/client/tests/integration/extra_functional/connected_peers.rs b/iroha/tests/integration/extra_functional/connected_peers.rs similarity index 100% rename from client/tests/integration/extra_functional/connected_peers.rs rename to iroha/tests/integration/extra_functional/connected_peers.rs diff --git a/client/tests/integration/extra_functional/genesis.rs b/iroha/tests/integration/extra_functional/genesis.rs similarity index 100% rename from client/tests/integration/extra_functional/genesis.rs rename to iroha/tests/integration/extra_functional/genesis.rs diff --git a/client/tests/integration/extra_functional/mod.rs b/iroha/tests/integration/extra_functional/mod.rs similarity index 100% rename from client/tests/integration/extra_functional/mod.rs rename to iroha/tests/integration/extra_functional/mod.rs diff --git a/client/tests/integration/extra_functional/multiple_blocks_created.rs b/iroha/tests/integration/extra_functional/multiple_blocks_created.rs similarity index 100% rename from client/tests/integration/extra_functional/multiple_blocks_created.rs rename to iroha/tests/integration/extra_functional/multiple_blocks_created.rs diff --git a/client/tests/integration/extra_functional/normal.rs b/iroha/tests/integration/extra_functional/normal.rs similarity index 100% rename from client/tests/integration/extra_functional/normal.rs rename to iroha/tests/integration/extra_functional/normal.rs diff --git a/client/tests/integration/extra_functional/offline_peers.rs b/iroha/tests/integration/extra_functional/offline_peers.rs similarity index 100% rename from client/tests/integration/extra_functional/offline_peers.rs rename to iroha/tests/integration/extra_functional/offline_peers.rs diff --git a/client/tests/integration/extra_functional/restart_peer.rs b/iroha/tests/integration/extra_functional/restart_peer.rs similarity index 100% rename from client/tests/integration/extra_functional/restart_peer.rs rename to iroha/tests/integration/extra_functional/restart_peer.rs diff --git a/client/tests/integration/extra_functional/unregister_peer.rs b/iroha/tests/integration/extra_functional/unregister_peer.rs similarity index 100% rename from client/tests/integration/extra_functional/unregister_peer.rs rename to iroha/tests/integration/extra_functional/unregister_peer.rs diff --git a/client/tests/integration/extra_functional/unstable_network.rs b/iroha/tests/integration/extra_functional/unstable_network.rs similarity index 100% rename from client/tests/integration/extra_functional/unstable_network.rs rename to iroha/tests/integration/extra_functional/unstable_network.rs diff --git a/client/tests/integration/mod.rs b/iroha/tests/integration/mod.rs similarity index 100% rename from client/tests/integration/mod.rs rename to iroha/tests/integration/mod.rs diff --git a/client/tests/integration/multisig.rs b/iroha/tests/integration/multisig.rs similarity index 100% rename from client/tests/integration/multisig.rs rename to iroha/tests/integration/multisig.rs diff --git a/client/tests/integration/non_mintable.rs b/iroha/tests/integration/non_mintable.rs similarity index 100% rename from client/tests/integration/non_mintable.rs rename to iroha/tests/integration/non_mintable.rs diff --git a/client/tests/integration/pagination.rs b/iroha/tests/integration/pagination.rs similarity index 100% rename from client/tests/integration/pagination.rs rename to iroha/tests/integration/pagination.rs diff --git a/client/tests/integration/permissions.rs b/iroha/tests/integration/permissions.rs similarity index 100% rename from client/tests/integration/permissions.rs rename to iroha/tests/integration/permissions.rs diff --git a/client/tests/integration/queries/account.rs b/iroha/tests/integration/queries/account.rs similarity index 100% rename from client/tests/integration/queries/account.rs rename to iroha/tests/integration/queries/account.rs diff --git a/client/tests/integration/queries/asset.rs b/iroha/tests/integration/queries/asset.rs similarity index 100% rename from client/tests/integration/queries/asset.rs rename to iroha/tests/integration/queries/asset.rs diff --git a/client/tests/integration/queries/mod.rs b/iroha/tests/integration/queries/mod.rs similarity index 100% rename from client/tests/integration/queries/mod.rs rename to iroha/tests/integration/queries/mod.rs diff --git a/client/tests/integration/queries/query_errors.rs b/iroha/tests/integration/queries/query_errors.rs similarity index 100% rename from client/tests/integration/queries/query_errors.rs rename to iroha/tests/integration/queries/query_errors.rs diff --git a/client/tests/integration/queries/role.rs b/iroha/tests/integration/queries/role.rs similarity index 100% rename from client/tests/integration/queries/role.rs rename to iroha/tests/integration/queries/role.rs diff --git a/client/tests/integration/queries/smart_contract.rs b/iroha/tests/integration/queries/smart_contract.rs similarity index 100% rename from client/tests/integration/queries/smart_contract.rs rename to iroha/tests/integration/queries/smart_contract.rs diff --git a/client/tests/integration/roles.rs b/iroha/tests/integration/roles.rs similarity index 100% rename from client/tests/integration/roles.rs rename to iroha/tests/integration/roles.rs diff --git a/client/tests/integration/set_parameter.rs b/iroha/tests/integration/set_parameter.rs similarity index 100% rename from client/tests/integration/set_parameter.rs rename to iroha/tests/integration/set_parameter.rs diff --git a/client/tests/integration/sorting.rs b/iroha/tests/integration/sorting.rs similarity index 100% rename from client/tests/integration/sorting.rs rename to iroha/tests/integration/sorting.rs diff --git a/client/tests/integration/status_response.rs b/iroha/tests/integration/status_response.rs similarity index 100% rename from client/tests/integration/status_response.rs rename to iroha/tests/integration/status_response.rs diff --git a/client/tests/integration/transfer_asset.rs b/iroha/tests/integration/transfer_asset.rs similarity index 100% rename from client/tests/integration/transfer_asset.rs rename to iroha/tests/integration/transfer_asset.rs diff --git a/client/tests/integration/transfer_domain.rs b/iroha/tests/integration/transfer_domain.rs similarity index 100% rename from client/tests/integration/transfer_domain.rs rename to iroha/tests/integration/transfer_domain.rs diff --git a/client/tests/integration/triggers/by_call_trigger.rs b/iroha/tests/integration/triggers/by_call_trigger.rs similarity index 100% rename from client/tests/integration/triggers/by_call_trigger.rs rename to iroha/tests/integration/triggers/by_call_trigger.rs diff --git a/client/tests/integration/triggers/data_trigger.rs b/iroha/tests/integration/triggers/data_trigger.rs similarity index 100% rename from client/tests/integration/triggers/data_trigger.rs rename to iroha/tests/integration/triggers/data_trigger.rs diff --git a/client/tests/integration/triggers/event_trigger.rs b/iroha/tests/integration/triggers/event_trigger.rs similarity index 100% rename from client/tests/integration/triggers/event_trigger.rs rename to iroha/tests/integration/triggers/event_trigger.rs diff --git a/client/tests/integration/triggers/mod.rs b/iroha/tests/integration/triggers/mod.rs similarity index 100% rename from client/tests/integration/triggers/mod.rs rename to iroha/tests/integration/triggers/mod.rs diff --git a/client/tests/integration/triggers/orphans.rs b/iroha/tests/integration/triggers/orphans.rs similarity index 100% rename from client/tests/integration/triggers/orphans.rs rename to iroha/tests/integration/triggers/orphans.rs diff --git a/client/tests/integration/triggers/time_trigger.rs b/iroha/tests/integration/triggers/time_trigger.rs similarity index 100% rename from client/tests/integration/triggers/time_trigger.rs rename to iroha/tests/integration/triggers/time_trigger.rs diff --git a/client/tests/integration/triggers/trigger_rollback.rs b/iroha/tests/integration/triggers/trigger_rollback.rs similarity index 100% rename from client/tests/integration/triggers/trigger_rollback.rs rename to iroha/tests/integration/triggers/trigger_rollback.rs diff --git a/client/tests/integration/tx_chain_id.rs b/iroha/tests/integration/tx_chain_id.rs similarity index 100% rename from client/tests/integration/tx_chain_id.rs rename to iroha/tests/integration/tx_chain_id.rs diff --git a/client/tests/integration/tx_history.rs b/iroha/tests/integration/tx_history.rs similarity index 100% rename from client/tests/integration/tx_history.rs rename to iroha/tests/integration/tx_history.rs diff --git a/client/tests/integration/tx_rollback.rs b/iroha/tests/integration/tx_rollback.rs similarity index 100% rename from client/tests/integration/tx_rollback.rs rename to iroha/tests/integration/tx_rollback.rs diff --git a/client/tests/integration/upgrade.rs b/iroha/tests/integration/upgrade.rs similarity index 100% rename from client/tests/integration/upgrade.rs rename to iroha/tests/integration/upgrade.rs diff --git a/client/tests/mod.rs b/iroha/tests/mod.rs similarity index 100% rename from client/tests/mod.rs rename to iroha/tests/mod.rs diff --git a/client/tests/ui_fail/cant_filter_singular_query.rs b/iroha/tests/ui_fail/cant_filter_singular_query.rs similarity index 100% rename from client/tests/ui_fail/cant_filter_singular_query.rs rename to iroha/tests/ui_fail/cant_filter_singular_query.rs diff --git a/client_cli/.gitignore b/iroha_cli/.gitignore similarity index 100% rename from client_cli/.gitignore rename to iroha_cli/.gitignore diff --git a/client_cli/Cargo.toml b/iroha_cli/Cargo.toml similarity index 97% rename from client_cli/Cargo.toml rename to iroha_cli/Cargo.toml index 1a80836e164..019db3bcd9b 100644 --- a/client_cli/Cargo.toml +++ b/iroha_cli/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "iroha_client_cli" +name = "iroha_cli" edition.workspace = true version.workspace = true diff --git a/client_cli/README.md b/iroha_cli/README.md similarity index 100% rename from client_cli/README.md rename to iroha_cli/README.md diff --git a/client_cli/build.rs b/iroha_cli/build.rs similarity index 100% rename from client_cli/build.rs rename to iroha_cli/build.rs diff --git a/client_cli/pytests/.gitignore b/iroha_cli/pytests/.gitignore similarity index 100% rename from client_cli/pytests/.gitignore rename to iroha_cli/pytests/.gitignore diff --git a/client_cli/pytests/README.md b/iroha_cli/pytests/README.md similarity index 95% rename from client_cli/pytests/README.md rename to iroha_cli/pytests/README.md index 86586c3fcb7..874d92c46b4 100644 --- a/client_cli/pytests/README.md +++ b/iroha_cli/pytests/README.md @@ -20,7 +20,7 @@ The framework is organized into the following directories: - `common`: Contains common constants and helpers used throughout the framework. - `models`: Contains the data model classes for accounts, assets, and domains. -- `src`: Contains the source code for the Iroha 2 Client CLI tests, including the `client_cli.py` and related utilities. +- `src`: Contains the source code for the Iroha 2 Client CLI tests, including the `iroha_cli.py` and related utilities. - `test`: Contains the test suite for the framework, organized into subdirectories for different test categories (`accounts`, `assets`, `atomicity`, `domains`, and `roles`). The framework also includes the following configuration files in its root directory: @@ -63,10 +63,10 @@ The test model has the following structure: 2. Install and configure [Poetry](https://python-poetry.org/).\ For details, see [Poetry Configuration](#poetry-configuration) below. -3. Configure the tests by creating the following `.env` file in _this_ (`/client_cli/pytests/`) directory: +3. Configure the tests by creating the following `.env` file in _this_ (`/iroha_cli/pytests/`) directory: ```shell - CLIENT_CLI_BINARY=/path/to/iroha_client_cli + CLIENT_CLI_BINARY=/path/to/iroha_cli CLIENT_CLI_CONFIG=/path/to/client.toml TORII_API_PORT_MIN=8080 TORII_API_PORT_MAX=8083 @@ -129,7 +129,7 @@ This test framework uses [Poetry](https://python-poetry.org/) for dependency man To get started with Poetry, follow these steps: 1. Install Poetry by following the [official installation guide](https://python-poetry.org/docs/#installation). -2. Navigate to the `client_cli/pytests` directory in your terminal. +2. Navigate to the `iroha_cli/pytests` directory in your terminal. 3. Install the dependencies and set up a virtual environment using Poetry: ```bash @@ -152,19 +152,19 @@ exit ### Tests Configuration -Tests are configured via environment variables. These variables can be optionally defined in a `.env` file that must be created in _this_ (`/client_cli/pytests/`) directory. +Tests are configured via environment variables. These variables can be optionally defined in a `.env` file that must be created in _this_ (`/iroha_cli/pytests/`) directory. The variables: - `CLIENT_CLI_DIR` — Specifies a path to a directory containing the `iroha` binary and its `client.toml` configuration file.\ - Set to `/client_cli`, by default. + Set to `/iroha_cli`, by default. - `TORII_API_PORT_MIN`/`TORII_API_PORT_MAX` — This pair specifies the range of local ports through which the Iroha 2 peers are deployed. A randomly selected port from the specified range is used for each test.\ Set to `8080` and `8083` respectively, by default. **Example**: ```shell -CLIENT_CLI_BINARY=/path/to/iroha_client_cli +CLIENT_CLI_BINARY=/path/to/iroha_cli CLIENT_CLI_CONFIG=/path/to/client.toml TORII_API_PORT_MIN=8080 TORII_API_PORT_MAX=8083 diff --git a/client_cli/pytests/common/__init__.py b/iroha_cli/pytests/common/__init__.py similarity index 100% rename from client_cli/pytests/common/__init__.py rename to iroha_cli/pytests/common/__init__.py diff --git a/client_cli/pytests/common/consts.py b/iroha_cli/pytests/common/consts.py similarity index 100% rename from client_cli/pytests/common/consts.py rename to iroha_cli/pytests/common/consts.py diff --git a/client_cli/pytests/common/helpers.py b/iroha_cli/pytests/common/helpers.py similarity index 100% rename from client_cli/pytests/common/helpers.py rename to iroha_cli/pytests/common/helpers.py diff --git a/client_cli/pytests/common/json_isi_examples/unregister_asset.json b/iroha_cli/pytests/common/json_isi_examples/unregister_asset.json similarity index 100% rename from client_cli/pytests/common/json_isi_examples/unregister_asset.json rename to iroha_cli/pytests/common/json_isi_examples/unregister_asset.json diff --git a/client_cli/pytests/common/settings.py b/iroha_cli/pytests/common/settings.py similarity index 100% rename from client_cli/pytests/common/settings.py rename to iroha_cli/pytests/common/settings.py diff --git a/client_cli/pytests/models/__init__.py b/iroha_cli/pytests/models/__init__.py similarity index 100% rename from client_cli/pytests/models/__init__.py rename to iroha_cli/pytests/models/__init__.py diff --git a/client_cli/pytests/models/account.py b/iroha_cli/pytests/models/account.py similarity index 100% rename from client_cli/pytests/models/account.py rename to iroha_cli/pytests/models/account.py diff --git a/client_cli/pytests/models/asset.py b/iroha_cli/pytests/models/asset.py similarity index 100% rename from client_cli/pytests/models/asset.py rename to iroha_cli/pytests/models/asset.py diff --git a/client_cli/pytests/models/domain.py b/iroha_cli/pytests/models/domain.py similarity index 100% rename from client_cli/pytests/models/domain.py rename to iroha_cli/pytests/models/domain.py diff --git a/client_cli/pytests/poetry.lock b/iroha_cli/pytests/poetry.lock similarity index 100% rename from client_cli/pytests/poetry.lock rename to iroha_cli/pytests/poetry.lock diff --git a/client_cli/pytests/pyproject.toml b/iroha_cli/pytests/pyproject.toml similarity index 100% rename from client_cli/pytests/pyproject.toml rename to iroha_cli/pytests/pyproject.toml diff --git a/client_cli/pytests/src/__init__.py b/iroha_cli/pytests/src/__init__.py similarity index 100% rename from client_cli/pytests/src/__init__.py rename to iroha_cli/pytests/src/__init__.py diff --git a/client_cli/pytests/src/client_cli/__init__.py b/iroha_cli/pytests/src/client_cli/__init__.py similarity index 61% rename from client_cli/pytests/src/client_cli/__init__.py rename to iroha_cli/pytests/src/client_cli/__init__.py index dd9bea09b2a..417f746d612 100644 --- a/client_cli/pytests/src/client_cli/__init__.py +++ b/iroha_cli/pytests/src/client_cli/__init__.py @@ -3,11 +3,11 @@ """ from common.settings import PATH_CONFIG_CLIENT_CLI, PORT_MAX, PORT_MIN -from src.client_cli.client_cli import ClientCli -from src.client_cli.configuration import Config -from src.client_cli.iroha import Iroha +from src.iroha_cli.iroha_cli import IrohaCli +from src.iroha_cli.configuration import Config +from src.iroha_cli.iroha import Iroha config = Config(PORT_MIN, PORT_MAX) config.load(PATH_CONFIG_CLIENT_CLI) -client_cli = ClientCli(config) +iroha_cli = IrohaCli(config) iroha = Iroha(config) diff --git a/client_cli/pytests/src/client_cli/client_cli.py b/iroha_cli/pytests/src/client_cli/client_cli.py similarity index 91% rename from client_cli/pytests/src/client_cli/client_cli.py rename to iroha_cli/pytests/src/client_cli/client_cli.py index 57d77b53e40..06fab2b967a 100644 --- a/client_cli/pytests/src/client_cli/client_cli.py +++ b/iroha_cli/pytests/src/client_cli/client_cli.py @@ -1,5 +1,5 @@ """ -This module contains the ClientCli class, which is responsible for building and executing +This module contains the IrohaCli class, which is responsible for building and executing commands for interacting with Iroha blockchain using the Iroha command-line client. """ @@ -13,10 +13,10 @@ from common.helpers import extract_hash, read_isi_from_json, write_isi_to_json from common.settings import BASE_DIR, CLIENT_CLI_PATH, PATH_CONFIG_CLIENT_CLI, ROOT_DIR -from src.client_cli.configuration import Config +from src.iroha_cli.configuration import Config -class ClientCli: +class IrohaCli: """ A class to represent the Iroha client command line interface. """ @@ -38,13 +38,13 @@ def __init__(self, config: Config): def __enter__(self): """ - Called when entering a context managed by the ClientCli object. + Called when entering a context managed by the IrohaCli object. """ return self def __exit__(self, exc_type, exc_val, exc_tb): """ - Called when exiting a context managed by the ClientCli object. + Called when exiting a context managed by the IrohaCli object. :param exc_type: The type of exception raised within the context (if any). :param exc_val: The instance of the exception raised within the context (if any). @@ -73,7 +73,7 @@ def wait_for(self, condition: Callable[[], bool], timeout=None): def reset(self): """ - Resets the stdout and stderr attributes of the ClientCli object. + Resets the stdout and stderr attributes of the IrohaCli object. """ self.stdout = None self.stderr = None @@ -83,8 +83,8 @@ def register(self): """ Appends the 'register' command to the command list. - :return: The current ClientCli object. - :rtype: ClientCli + :return: The current IrohaCli object. + :rtype: IrohaCli """ self.command.append("register") return self @@ -93,8 +93,8 @@ def mint(self): """ Appends the 'mint' command to the command list. - :return: The current ClientCli object. - :rtype: ClientCli + :return: The current IrohaCli object. + :rtype: IrohaCli """ self.command.append("mint") return self @@ -103,8 +103,8 @@ def list_all(self): """ Appends the 'list all' command to the command list. - :return: The current ClientCli object. - :rtype: ClientCli + :return: The current IrohaCli object. + :rtype: IrohaCli """ self.command.append("list") self.command.append("all") @@ -126,8 +126,8 @@ def domain(self, domain: str): :param domain: The domain to be queried. :type domain: str - :return: The current ClientCli object. - :rtype: ClientCli + :return: The current IrohaCli object. + :rtype: IrohaCli """ self.command.insert(2, "domain") self.command.append("--id=" + domain) @@ -142,8 +142,8 @@ def account(self, signatory: str, domain: str): :type signatory: str :param domain: The domain of the account. :type domain: str - :return: The current ClientCli object. - :rtype: ClientCli + :return: The current IrohaCli object. + :rtype: IrohaCli """ self.command.insert(2, "account") self.command.append("--id=" + signatory + "@" + domain) @@ -160,8 +160,8 @@ def asset(self, asset_definition=None, account=None, value_of_type=None): :type account: Account :param value_of_type: The value of the asset type, defaults to None. :type value_of_type: str, optional - :return: The current ClientCli object. - :rtype: ClientCli + :return: The current IrohaCli object. + :rtype: IrohaCli """ self.command.insert(2, "asset") if asset_definition and account and value_of_type: @@ -191,8 +191,8 @@ def transfer(self, asset, source_account, target_account, quantity: str): :type target_account: str :param quantity: The quantity of the asset to be transferred. :type quantity: str - :return: The current ClientCli object. - :rtype: ClientCli + :return: The current IrohaCli object. + :rtype: IrohaCli """ self.command.append("asset") self.command.append("transfer") @@ -220,8 +220,8 @@ def burn(self, account, asset, quantity: str): :param quantity: The quantity of the asset to be burned. :type quantity: str - :return: The current ClientCli object. - :rtype: ClientCli + :return: The current IrohaCli object. + :rtype: IrohaCli """ self.command.append("asset") self.command.append("burn") @@ -249,8 +249,8 @@ def asset_definition(self, asset: str, domain: str, type_: str): :type domain: str :param type_: The value type of the asset. :type type_: str - :return: The current ClientCli object. - :rtype: ClientCli + :return: The current IrohaCli object. + :rtype: IrohaCli """ self.command.insert(2, "definition") self.command.insert(2, "asset") @@ -348,8 +348,8 @@ def should(self, _expected): :param expected: The expected value. :type expected: str - :return: The current ClientCli object. - :rtype: ClientCli + :return: The current IrohaCli object. + :rtype: IrohaCli """ return self @@ -357,8 +357,8 @@ def execute(self, command=None): """ Executes the command and captures stdout and stderr. - :return: The current ClientCli object. - :rtype: ClientCli + :return: The current IrohaCli object. + :rtype: IrohaCli """ self.config.randomise_torii_url() if command is None: diff --git a/client_cli/pytests/src/client_cli/configuration.py b/iroha_cli/pytests/src/client_cli/configuration.py similarity index 100% rename from client_cli/pytests/src/client_cli/configuration.py rename to iroha_cli/pytests/src/client_cli/configuration.py diff --git a/client_cli/pytests/src/client_cli/have.py b/iroha_cli/pytests/src/client_cli/have.py similarity index 91% rename from client_cli/pytests/src/client_cli/have.py rename to iroha_cli/pytests/src/client_cli/have.py index 54c076a03e9..8f4d759e661 100644 --- a/client_cli/pytests/src/client_cli/have.py +++ b/iroha_cli/pytests/src/client_cli/have.py @@ -6,7 +6,7 @@ import allure # type: ignore -from src.client_cli import client_cli, iroha, match +from src.iroha_cli import iroha_cli, iroha, match def expected_in_actual(expected, actual) -> bool: @@ -50,7 +50,7 @@ def domain_in_domains() -> bool: return True - return client_cli.wait_for(domain_in_domains) + return iroha_cli.wait_for(domain_in_domains) def account(expected): @@ -65,7 +65,7 @@ def account_in_accounts() -> bool: accounts = iroha.list_filter({"Atom": {"Id": {"Equals": expected}}}).accounts() return expected_in_actual(expected, accounts) - return client_cli.wait_for(account_in_accounts) + return iroha_cli.wait_for(account_in_accounts) def asset_definition(expected): @@ -82,7 +82,7 @@ def asset_definition_in_asset_definitions() -> bool: ).asset_definitions() return expected_in_actual(expected, asset_definitions) - return client_cli.wait_for(asset_definition_in_asset_definitions) + return iroha_cli.wait_for(asset_definition_in_asset_definitions) def asset(expected): @@ -97,7 +97,7 @@ def asset_in_assets() -> bool: assets = iroha.list_filter({"Atom": {"Id": {"Equals": expected}}}).assets() return expected_in_actual(expected, assets) - return client_cli.wait_for(asset_in_assets) + return iroha_cli.wait_for(asset_in_assets) def asset_has_quantity(expected_asset_id, expected_quantity): @@ -134,14 +134,14 @@ def check_quantity() -> bool: return expected_quantity == str(actual_quantity) - return client_cli.wait_for(check_quantity) + return iroha_cli.wait_for(check_quantity) def error(expected): """ - Check if the expected error is present in the client_cli stderr. + Check if the expected error is present in the iroha_cli stderr. :param expected: The expected error message. :return: True if the error is present, False otherwise. """ - return match.client_cli_have_error(expected=expected, actual=client_cli.stderr) + return match.client_cli_have_error(expected=expected, actual=iroha_cli.stderr) diff --git a/client_cli/pytests/src/client_cli/iroha.py b/iroha_cli/pytests/src/client_cli/iroha.py similarity index 94% rename from client_cli/pytests/src/client_cli/iroha.py rename to iroha_cli/pytests/src/client_cli/iroha.py index 9305c692138..a0eaf3801d2 100644 --- a/client_cli/pytests/src/client_cli/iroha.py +++ b/iroha_cli/pytests/src/client_cli/iroha.py @@ -1,16 +1,16 @@ """ -This module contains the Iroha class, which is a subclass of ClientCli. +This module contains the Iroha class, which is a subclass of IrohaCli. """ import json from typing import Dict, List -from src.client_cli.client_cli import ClientCli +from src.iroha_cli.iroha_cli import IrohaCli -class Iroha(ClientCli): +class Iroha(IrohaCli): """ - Iroha is a subclass of ClientCli that provides additional methods + Iroha is a subclass of IrohaCli that provides additional methods for interacting with the Iroha network. """ diff --git a/client_cli/pytests/src/client_cli/match.py b/iroha_cli/pytests/src/client_cli/match.py similarity index 100% rename from client_cli/pytests/src/client_cli/match.py rename to iroha_cli/pytests/src/client_cli/match.py diff --git a/client_cli/pytests/test/__init__.py b/iroha_cli/pytests/test/__init__.py similarity index 100% rename from client_cli/pytests/test/__init__.py rename to iroha_cli/pytests/test/__init__.py diff --git a/client_cli/pytests/test/accounts/conftest.py b/iroha_cli/pytests/test/accounts/conftest.py similarity index 100% rename from client_cli/pytests/test/accounts/conftest.py rename to iroha_cli/pytests/test/accounts/conftest.py diff --git a/client_cli/pytests/test/accounts/test_accounts_query_filters.py b/iroha_cli/pytests/test/accounts/test_accounts_query_filters.py similarity index 84% rename from client_cli/pytests/test/accounts/test_accounts_query_filters.py rename to iroha_cli/pytests/test/accounts/test_accounts_query_filters.py index 93d23d4b06c..858c6290965 100644 --- a/client_cli/pytests/test/accounts/test_accounts_query_filters.py +++ b/iroha_cli/pytests/test/accounts/test_accounts_query_filters.py @@ -2,7 +2,7 @@ import allure # type: ignore -from src.client_cli import client_cli, iroha +from src.iroha_cli import iroha_cli, iroha # using existing account to have at least one account in response @@ -10,7 +10,7 @@ def test_filter_by_domain(GIVEN_registered_account): def condition(): domain = GIVEN_registered_account.domain with allure.step( - f"WHEN client_cli query accounts " f'in the "{domain}" domain' + f"WHEN iroha_cli query accounts " f'in the "{domain}" domain' ): accounts = iroha.list_filter( {"Atom": {"Id": {"DomainId": {"Equals": domain}}}} @@ -23,7 +23,7 @@ def condition(): ) return accounts and all(account.endswith(domain) for account in accounts) - client_cli.wait_for(condition) + iroha_cli.wait_for(condition) def test_filter_by_account_id(GIVEN_registered_account): @@ -32,7 +32,7 @@ def condition(): GIVEN_registered_account.signatory + "@" + GIVEN_registered_account.domain ) with allure.step( - f'WHEN client_cli query accounts with account id "{account_id}"' + f'WHEN iroha_cli query accounts with account id "{account_id}"' ): accounts = iroha.list_filter( {"Atom": {"Id": {"Equals": account_id}}} @@ -45,4 +45,4 @@ def condition(): ) return accounts and all(account == account_id for account in accounts) - client_cli.wait_for(condition) + iroha_cli.wait_for(condition) diff --git a/client_cli/pytests/test/accounts/test_register_accounts.py b/iroha_cli/pytests/test/accounts/test_register_accounts.py similarity index 71% rename from client_cli/pytests/test/accounts/test_register_accounts.py rename to iroha_cli/pytests/test/accounts/test_register_accounts.py index 75aad017276..b18057d61f7 100644 --- a/client_cli/pytests/test/accounts/test_register_accounts.py +++ b/iroha_cli/pytests/test/accounts/test_register_accounts.py @@ -2,7 +2,7 @@ import pytest from common.consts import Stderr -from src.client_cli import client_cli, have, iroha +from src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) @@ -14,10 +14,10 @@ def story_account_register_account(): @allure.label("sdk_test_id", "register_account") def test_register_account(GIVEN_public_key, GIVEN_registered_domain): with allure.step( - f'WHEN client_cli registers the account "{GIVEN_public_key}" ' + f'WHEN iroha_cli registers the account "{GIVEN_public_key}" ' f'in the "{GIVEN_registered_domain.name}" domain' ): - client_cli.register().account( + iroha_cli.register().account( signatory=GIVEN_public_key, domain=GIVEN_registered_domain.name, ) @@ -31,16 +31,16 @@ def test_register_account_with_existing_signatory( GIVEN_registered_domain, GIVEN_registered_account ): with allure.step( - f"WHEN client_cli tries to register an account " + f"WHEN iroha_cli tries to register an account " f'with the same signatory "{GIVEN_registered_account.signatory}" ' f'in the "{GIVEN_registered_domain.name}" domain' ): - client_cli.register().account( + iroha_cli.register().account( signatory=GIVEN_registered_account.signatory, domain=GIVEN_registered_account.domain, ) - with allure.step("THEN client_cli should have the account error"): - client_cli.should(have.error(Stderr.REPETITION.value)) + with allure.step("THEN iroha_cli should have the account error"): + iroha_cli.should(have.error(Stderr.REPETITION.value)) @allure.label("sdk_test_id", "register_account_with_invalid_domain") @@ -49,14 +49,14 @@ def test_register_account_with_invalid_domain( GIVEN_public_key, ): with allure.step( - "WHEN client_cli tries to register an account with an invalid domain" + "WHEN iroha_cli tries to register an account with an invalid domain" ): - client_cli.register().account( + iroha_cli.register().account( signatory=GIVEN_public_key, domain=GIVEN_not_existing_name, ) - with allure.step("THEN client_cli should have the error"): - client_cli.should(have.error(Stderr.FAILED_TO_FIND_DOMAIN.value)) + with allure.step("THEN iroha_cli should have the error"): + iroha_cli.should(have.error(Stderr.FAILED_TO_FIND_DOMAIN.value)) @allure.label("sdk_test_id", "register_account_with_invalid_character_in_key") @@ -64,11 +64,11 @@ def test_register_account_with_invalid_character_in_key( GIVEN_registered_domain, GIVEN_key_with_invalid_character_in_key ): with allure.step( - "WHEN client_cli tries to register an account with invalid character in the key" + "WHEN iroha_cli tries to register an account with invalid character in the key" ): client_cli.register().account( signatory=GIVEN_key_with_invalid_character_in_key, domain=GIVEN_registered_domain.name, ) - with allure.step("THEN client_cli should have the error"): + with allure.step("THEN iroha_cli should have the error"): client_cli.should(have.error(Stderr.INVALID_CHARACTER.value)) diff --git a/client_cli/pytests/test/assets/conftest.py b/iroha_cli/pytests/test/assets/conftest.py similarity index 100% rename from client_cli/pytests/test/assets/conftest.py rename to iroha_cli/pytests/test/assets/conftest.py diff --git a/client_cli/pytests/test/assets/test_assets_query_filters.py b/iroha_cli/pytests/test/assets/test_assets_query_filters.py similarity index 85% rename from client_cli/pytests/test/assets/test_assets_query_filters.py rename to iroha_cli/pytests/test/assets/test_assets_query_filters.py index ae3749b5e86..b2623f2e76e 100644 --- a/client_cli/pytests/test/assets/test_assets_query_filters.py +++ b/iroha_cli/pytests/test/assets/test_assets_query_filters.py @@ -2,7 +2,7 @@ import allure # type: ignore -from src.client_cli import client_cli, iroha +from src.iroha_cli import iroha_cli, iroha # using existing account with asset to have at least one in response @@ -11,7 +11,7 @@ def condition(): domain = ( GIVEN_currently_account_quantity_with_two_quantity_of_asset.definition.domain ) - with allure.step(f"WHEN client_cli query assets" f'in the "{domain}" domain'): + with allure.step(f"WHEN iroha_cli query assets" f'in the "{domain}" domain'): assets = iroha.list_filter( {"Atom": {"Id": {"DefinitionId": {"DomainId": {"Equals": domain}}}}} ).assets() @@ -26,7 +26,7 @@ def condition(): for asset in assets ) - client_cli.wait_for(condition) + iroha_cli.wait_for(condition) def test_filter_by_asset_name( @@ -36,7 +36,7 @@ def condition(): name = ( GIVEN_currently_account_quantity_with_two_quantity_of_asset.definition.name ) - with allure.step(f'WHEN client_cli query assets with name "{name}"'): + with allure.step(f'WHEN iroha_cli query assets with name "{name}"'): assets = iroha.list_filter( {"Atom": {"Id": {"DefinitionId": {"Name": {"Equals": name}}}}} ).assets() @@ -48,7 +48,7 @@ def condition(): ) return assets and all(asset.startswith(name) for asset in assets) - client_cli.wait_for(condition) + iroha_cli.wait_for(condition) def test_filter_by_asset_id( @@ -63,7 +63,7 @@ def condition(): + "@" + GIVEN_currently_authorized_account.domain ) - with allure.step(f'WHEN client_cli query assets with asset id "{asset_id}"'): + with allure.step(f'WHEN iroha_cli query assets with asset id "{asset_id}"'): assets = iroha.list_filter({"Atom": {"Id": {"Equals": asset_id}}}).assets() with allure.step("THEN Iroha should return only assets with this id"): allure.attach( @@ -73,4 +73,4 @@ def condition(): ) return assets and all(asset == asset_id for asset in assets) - client_cli.wait_for(condition) + iroha_cli.wait_for(condition) diff --git a/client_cli/pytests/test/assets/test_burn_assets.py b/iroha_cli/pytests/test/assets/test_burn_assets.py similarity index 94% rename from client_cli/pytests/test/assets/test_burn_assets.py rename to iroha_cli/pytests/test/assets/test_burn_assets.py index e721dd43a48..57f09d1424a 100644 --- a/client_cli/pytests/test/assets/test_burn_assets.py +++ b/iroha_cli/pytests/test/assets/test_burn_assets.py @@ -1,7 +1,7 @@ import allure # type: ignore import pytest -from src.client_cli import client_cli, have, iroha +from src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) @@ -19,7 +19,7 @@ def test_burn_asset_for_account_in_same_domain( f"WHEN {GIVEN_currently_authorized_account.signatory} burns 1" f"of {GIVEN_currently_account_quantity_with_two_quantity_of_asset.definition.name}" ): - client_cli.burn( + iroha_cli.burn( asset=GIVEN_currently_account_quantity_with_two_quantity_of_asset.definition, account=GIVEN_currently_authorized_account, quantity="1", diff --git a/client_cli/pytests/test/assets/test_mint_assets.py b/iroha_cli/pytests/test/assets/test_mint_assets.py similarity index 89% rename from client_cli/pytests/test/assets/test_mint_assets.py rename to iroha_cli/pytests/test/assets/test_mint_assets.py index e76e94f413c..79c355337ab 100644 --- a/client_cli/pytests/test/assets/test_mint_assets.py +++ b/iroha_cli/pytests/test/assets/test_mint_assets.py @@ -1,7 +1,7 @@ import allure # type: ignore import pytest -from src.client_cli import client_cli, have, iroha +from src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) @@ -16,11 +16,11 @@ def test_mint_asset_for_account_in_same_domain( GIVEN_numeric_value, ): with allure.step( - f'WHEN client_cli mint "{GIVEN_numeric_value}" of ' + f'WHEN iroha_cli mint "{GIVEN_numeric_value}" of ' f'"{GIVEN_registered_asset_definition_with_numeric_type}" ' f'for the "{GIVEN_registered_account}"' ): - client_cli.mint().asset( + iroha_cli.mint().asset( account=GIVEN_registered_account, asset_definition=GIVEN_registered_asset_definition_with_numeric_type, value_of_type=GIVEN_numeric_value, @@ -48,11 +48,11 @@ def test_mint_asset_for_account_in_same_domain( @allure.label("sdk_test_id", "mint_asset_quantity_after_minting") def test_mint_asset_quantity_after_minting(GIVEN_minted_asset_quantity): with allure.step( - f'WHEN client_cli mint additional asset "{GIVEN_minted_asset_quantity.definition}" ' + f'WHEN iroha_cli mint additional asset "{GIVEN_minted_asset_quantity.definition}" ' f'for the "{GIVEN_minted_asset_quantity.account}" ' f'with "{GIVEN_minted_asset_quantity.value}" quantity' ): - client_cli.mint().asset( + iroha_cli.mint().asset( account=GIVEN_minted_asset_quantity.account, asset_definition=GIVEN_minted_asset_quantity.definition, value_of_type="1", diff --git a/client_cli/pytests/test/assets/test_register_asset_definitions.py b/iroha_cli/pytests/test/assets/test_register_asset_definitions.py similarity index 74% rename from client_cli/pytests/test/assets/test_register_asset_definitions.py rename to iroha_cli/pytests/test/assets/test_register_asset_definitions.py index c368a15632f..cf8bbb9c751 100644 --- a/client_cli/pytests/test/assets/test_register_asset_definitions.py +++ b/iroha_cli/pytests/test/assets/test_register_asset_definitions.py @@ -2,7 +2,7 @@ import pytest from common.consts import Stderr -from src.client_cli import client_cli, have, iroha +from src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) @@ -16,11 +16,11 @@ def test_register_asset_definition_with_numeric_type( GIVEN_fake_asset_name, GIVEN_registered_domain, GIVEN_numeric_type ): with allure.step( - f'WHEN client_cli registers the asset_definition "{GIVEN_fake_asset_name}" ' + f'WHEN iroha_cli registers the asset_definition "{GIVEN_fake_asset_name}" ' f'with "{GIVEN_numeric_type}" value type' f'in the "{GIVEN_registered_domain.name}" domain' ): - client_cli.register().asset_definition( + iroha_cli.register().asset_definition( asset=GIVEN_fake_asset_name, domain=GIVEN_registered_domain.name, type_=GIVEN_numeric_type, @@ -38,11 +38,11 @@ def test_register_asset_definition_with_store_type( GIVEN_fake_asset_name, GIVEN_registered_domain, GIVEN_store_type ): with allure.step( - f'WHEN client_cli registers the asset_definition "{GIVEN_fake_asset_name}" ' + f'WHEN iroha_cli registers the asset_definition "{GIVEN_fake_asset_name}" ' f'with "{GIVEN_store_type}" value type' f'in the "{GIVEN_registered_domain.name}" domain' ): - client_cli.register().asset_definition( + iroha_cli.register().asset_definition( asset=GIVEN_fake_asset_name, domain=GIVEN_registered_domain.name, type_=GIVEN_store_type, @@ -64,29 +64,29 @@ def test_register_asset_with_existing_name( f'with the same name "{GIVEN_registered_asset_definition_with_numeric_type.name}"' f'in the "{GIVEN_registered_asset_definition_with_numeric_type.domain}" domain' ): - client_cli.register().asset_definition( + iroha_cli.register().asset_definition( asset=GIVEN_registered_asset_definition_with_numeric_type.name, domain=GIVEN_registered_asset_definition_with_numeric_type.domain, type_=GIVEN_registered_asset_definition_with_numeric_type.type_, ) with allure.step( - f'THEN client_cli should have the asset definition error: "' + f'THEN iroha_cli should have the asset definition error: "' f'{GIVEN_registered_asset_definition_with_numeric_type.__repr__()}"' ): - client_cli.should(have.error(Stderr.REPETITION.value)) + iroha_cli.should(have.error(Stderr.REPETITION.value)) @allure.label("sdk_test_id", "register_asset_with_empty_name") def test_register_asset_with_empty_name(GIVEN_registered_domain): with allure.step( - "WHEN client_cli tries to register an asset definition with an empty name" + "WHEN iroha_cli tries to register an asset definition with an empty name" f'in the "{GIVEN_registered_domain.name}" domain' ): - client_cli.register().asset_definition( + iroha_cli.register().asset_definition( asset="", domain=GIVEN_registered_domain.name, type_="Numeric" ) with allure.step(f'THEN сlient_cli should have the asset error: "{Stderr.EMPTY}"'): - client_cli.should(have.error(Stderr.EMPTY.value)) + iroha_cli.should(have.error(Stderr.EMPTY.value)) @allure.label("sdk_test_id", "register_asset_with_not_existing_domain") @@ -94,15 +94,15 @@ def test_register_asset_with_not_existing_domain( GIVEN_not_existing_name, GIVEN_numeric_type, GIVEN_fake_asset_name ): with allure.step( - "WHEN client_cli tries to register an asset definition with not existing domain" + "WHEN iroha_cli tries to register an asset definition with not existing domain" ): - client_cli.register().asset_definition( + iroha_cli.register().asset_definition( asset=GIVEN_fake_asset_name, domain=GIVEN_not_existing_name, type_=GIVEN_numeric_type, ) - with allure.step("THEN client_cli should have the error"): - client_cli.should(have.error(Stderr.FAILED_TO_FIND_DOMAIN.value)) + with allure.step("THEN iroha_cli should have the error"): + iroha_cli.should(have.error(Stderr.FAILED_TO_FIND_DOMAIN.value)) @allure.label("sdk_test_id", "register_asset_with_too_long_type") @@ -110,12 +110,12 @@ def test_register_asset_with_too_long_type( GIVEN_fake_asset_name, GIVEN_registered_domain ): with allure.step( - "WHEN client_cli tries to register an asset definition with too long value type" + "WHEN iroha_cli tries to register an asset definition with too long value type" ): - client_cli.register().asset_definition( + iroha_cli.register().asset_definition( asset=GIVEN_fake_asset_name, domain=GIVEN_registered_domain.name, type_="coin", ) - with allure.step("THEN client_cli should have the error"): - client_cli.should(have.error(Stderr.INVALID_TYPE.value)) + with allure.step("THEN iroha_cli should have the error"): + iroha_cli.should(have.error(Stderr.INVALID_TYPE.value)) diff --git a/client_cli/pytests/test/assets/test_transfer_assets.py b/iroha_cli/pytests/test/assets/test_transfer_assets.py similarity index 93% rename from client_cli/pytests/test/assets/test_transfer_assets.py rename to iroha_cli/pytests/test/assets/test_transfer_assets.py index f95acbebc9a..032646fbe33 100644 --- a/client_cli/pytests/test/assets/test_transfer_assets.py +++ b/iroha_cli/pytests/test/assets/test_transfer_assets.py @@ -2,7 +2,7 @@ import pytest from common.consts import Stderr -from src.client_cli import client_cli, have, iroha +from src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) @@ -22,7 +22,7 @@ def test_transfer_asset( f"of {GIVEN_currently_account_quantity_with_two_quantity_of_asset.definition.name}" f"to {GIVEN_registered_account.signatory}" ): - client_cli.transfer( + iroha_cli.transfer( asset=GIVEN_currently_account_quantity_with_two_quantity_of_asset.definition, source_account=GIVEN_currently_authorized_account, target_account=GIVEN_registered_account, @@ -55,7 +55,7 @@ def test_transfer_with_insufficient_funds( f"Quantity of {GIVEN_currently_account_quantity_with_two_quantity_of_asset.definition.name}" f"to {GIVEN_registered_account.signatory}" ): - client_cli.transfer( + iroha_cli.transfer( asset=GIVEN_currently_account_quantity_with_two_quantity_of_asset.definition, source_account=GIVEN_currently_authorized_account, target_account=GIVEN_registered_account, @@ -69,4 +69,4 @@ def test_transfer_with_insufficient_funds( f"of {GIVEN_currently_account_quantity_with_two_quantity_of_asset.definition.name}" f"AND {GIVEN_registered_account.signatory} does not receive any additional Quantity" ): - client_cli.should(have.error(Stderr.INSUFFICIENT_FUNDS.value)) + iroha_cli.should(have.error(Stderr.INSUFFICIENT_FUNDS.value)) diff --git a/client_cli/pytests/test/assets/test_unregister_asset.py b/iroha_cli/pytests/test/assets/test_unregister_asset.py similarity index 86% rename from client_cli/pytests/test/assets/test_unregister_asset.py rename to iroha_cli/pytests/test/assets/test_unregister_asset.py index facaf4c04ae..f3c92389f7b 100644 --- a/client_cli/pytests/test/assets/test_unregister_asset.py +++ b/iroha_cli/pytests/test/assets/test_unregister_asset.py @@ -1,7 +1,7 @@ import allure # type: ignore import pytest -from src.client_cli import client_cli, have, iroha +from src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) @@ -23,9 +23,9 @@ def test_unregister_asset( GIVEN_numeric_asset_for_account, ): with allure.step( - f'WHEN client_cli unregisters the asset "{GIVEN_numeric_asset_for_account.definition.name}"' + f'WHEN iroha_cli unregisters the asset "{GIVEN_numeric_asset_for_account.definition.name}"' ): - client_cli.unregister_asset( + iroha_cli.unregister_asset( asset=f"{GIVEN_numeric_asset_for_account.definition.name}#" f"{GIVEN_numeric_asset_for_account.account}@" f"{GIVEN_numeric_asset_for_account.definition.domain}" diff --git a/client_cli/pytests/test/atomicity/conftest.py b/iroha_cli/pytests/test/atomicity/conftest.py similarity index 100% rename from client_cli/pytests/test/atomicity/conftest.py rename to iroha_cli/pytests/test/atomicity/conftest.py diff --git a/client_cli/pytests/test/atomicity/test_multiple_instructions_within_transaction.py b/iroha_cli/pytests/test/atomicity/test_multiple_instructions_within_transaction.py similarity index 100% rename from client_cli/pytests/test/atomicity/test_multiple_instructions_within_transaction.py rename to iroha_cli/pytests/test/atomicity/test_multiple_instructions_within_transaction.py diff --git a/client_cli/pytests/test/atomicity/test_pair_instructions_within_transaction.py b/iroha_cli/pytests/test/atomicity/test_pair_instructions_within_transaction.py similarity index 100% rename from client_cli/pytests/test/atomicity/test_pair_instructions_within_transaction.py rename to iroha_cli/pytests/test/atomicity/test_pair_instructions_within_transaction.py diff --git a/client_cli/pytests/test/atomicity/test_wrong_instructions_within_transaction.py b/iroha_cli/pytests/test/atomicity/test_wrong_instructions_within_transaction.py similarity index 100% rename from client_cli/pytests/test/atomicity/test_wrong_instructions_within_transaction.py rename to iroha_cli/pytests/test/atomicity/test_wrong_instructions_within_transaction.py diff --git a/client_cli/pytests/test/conftest.py b/iroha_cli/pytests/test/conftest.py similarity index 96% rename from client_cli/pytests/test/conftest.py rename to iroha_cli/pytests/test/conftest.py index d261ec5f227..6bb5e6d8de3 100644 --- a/client_cli/pytests/test/conftest.py +++ b/iroha_cli/pytests/test/conftest.py @@ -22,7 +22,7 @@ ) from common.settings import PEERS_CONFIGS_PATH from models import Account, Asset, AssetDefinition, Domain -from src.client_cli import client_cli, config +from src.iroha_cli import iroha_cli, config # General fixtures @@ -37,11 +37,11 @@ def before_all(): @pytest.fixture(scope="function", autouse=True) def before_each(): - """Fixture to set up and reset the client_cli state.""" + """Fixture to set up and reset the iroha_cli state.""" allure.dynamic.label("sdk", "Client CLI") allure.dynamic.label("owner", "astrokov") yield - client_cli.reset() + iroha_cli.reset() # Fixtures for creating objects (domains, accounts, asset definitions, assets) @@ -50,7 +50,7 @@ def GIVEN_registered_domain(): """Fixture to create and register a domain.""" domain = Domain(fake_name()) with allure.step(f"GIVEN a registered domain {domain.name}"): - client_cli.register().domain(domain.name) + iroha_cli.register().domain(domain.name) return domain @@ -60,7 +60,7 @@ def GIVEN_registered_domain_with_uppercase_letter(GIVEN_registered_domain): domain = GIVEN_registered_domain domain.name = name_with_uppercase_letter(domain.name) with allure.step(f"GIVEN a registered domain {domain.name}"): - client_cli.register().domain(domain.name) + iroha_cli.register().domain(domain.name) return domain @@ -71,7 +71,7 @@ def GIVEN_registered_account(GIVEN_registered_domain, GIVEN_public_key): with allure.step( f'GIVEN the account "{GIVEN_public_key}" in the "{GIVEN_registered_domain.name}" domain' ): - client_cli.register().account( + iroha_cli.register().account( signatory=account.signatory, domain=account.domain ) return account @@ -109,12 +109,12 @@ def GIVEN_currently_account_quantity_with_two_quantity_of_asset( f'GIVEN the asset_definition "{name}" ' f'in the "{GIVEN_currently_authorized_account.domain}" domain' ): - client_cli.register().asset_definition( + iroha_cli.register().asset_definition( asset=asset.definition.name, domain=asset.definition.domain, type_=asset.definition.type_, ) - client_cli.mint().asset( + iroha_cli.mint().asset( account=GIVEN_currently_authorized_account, asset_definition=asset.definition, value_of_type=asset.value, @@ -140,7 +140,7 @@ def GIVEN_numeric_asset_for_account( with allure.step( f'GIVEN the asset_definition "{asset_def.name}" ' f'in the "{domain}" domain' ): - client_cli.register().asset_definition( + iroha_cli.register().asset_definition( asset=asset.definition.name, domain=asset.definition.domain, type_=asset.definition.type_, diff --git a/client_cli/pytests/test/domains/conftest.py b/iroha_cli/pytests/test/domains/conftest.py similarity index 100% rename from client_cli/pytests/test/domains/conftest.py rename to iroha_cli/pytests/test/domains/conftest.py diff --git a/client_cli/pytests/test/domains/test_domains_query_filters.py b/iroha_cli/pytests/test/domains/test_domains_query_filters.py similarity index 81% rename from client_cli/pytests/test/domains/test_domains_query_filters.py rename to iroha_cli/pytests/test/domains/test_domains_query_filters.py index ac9d518cd3f..6e910aeb349 100644 --- a/client_cli/pytests/test/domains/test_domains_query_filters.py +++ b/iroha_cli/pytests/test/domains/test_domains_query_filters.py @@ -2,14 +2,14 @@ import allure # type: ignore -from src.client_cli import client_cli, iroha +from src.iroha_cli import iroha_cli, iroha def test_filter_by_domain(GIVEN_registered_domain): def condition(): domain_name = GIVEN_registered_domain.name with allure.step( - f'WHEN client_cli query domains filtered by name "{domain_name}"' + f'WHEN iroha_cli query domains filtered by name "{domain_name}"' ): domains = iroha.list_filter( {"Atom": {"Id": {"Equals": domain_name}}} @@ -24,4 +24,4 @@ def condition(): ) return domains and all(domain == domain_name for domain in domains) - client_cli.wait_for(condition) + iroha_cli.wait_for(condition) diff --git a/client_cli/pytests/test/domains/test_register_domains.py b/iroha_cli/pytests/test/domains/test_register_domains.py similarity index 68% rename from client_cli/pytests/test/domains/test_register_domains.py rename to iroha_cli/pytests/test/domains/test_register_domains.py index 4b9752c9b5d..8227fd6fa9d 100644 --- a/client_cli/pytests/test/domains/test_register_domains.py +++ b/iroha_cli/pytests/test/domains/test_register_domains.py @@ -2,7 +2,7 @@ import pytest from common.consts import Stderr -from src.client_cli import client_cli, have, iroha +from src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) @@ -13,8 +13,8 @@ def story_account_registers_domain(): @allure.label("sdk_test_id", "register_domain") def test_register_domain(GIVEN_fake_name): - with allure.step(f'WHEN client_cli registers the domain name "{GIVEN_fake_name}"'): - client_cli.execute(f"domain register --id={GIVEN_fake_name}") + with allure.step(f'WHEN iroha_cli registers the domain name "{GIVEN_fake_name}"'): + iroha_cli.execute(f"domain register --id={GIVEN_fake_name}") with allure.step(f'THEN Iroha should have the domain name "{GIVEN_fake_name}"'): iroha.should(have.domain(GIVEN_fake_name)) @@ -23,22 +23,22 @@ def test_register_domain(GIVEN_fake_name): def test_register_empty_domain( # GIVEN_empty_string ): - with allure.step("WHEN client_cli registers an empty domain"): - client_cli.register().domain("") - with allure.step(f'THEN client_cli should have the domain error: "{Stderr.EMPTY}"'): - client_cli.should(have.error(Stderr.EMPTY.value)) + with allure.step("WHEN iroha_cli registers an empty domain"): + iroha_cli.register().domain("") + with allure.step(f'THEN iroha_cli should have the domain error: "{Stderr.EMPTY}"'): + iroha_cli.should(have.error(Stderr.EMPTY.value)) @allure.label("sdk_test_id", "register_existing_domain") def test_register_existing_domain(GIVEN_registered_domain): with allure.step( - f'WHEN client_cli registers an existing domain "{GIVEN_registered_domain.name}"' + f'WHEN iroha_cli registers an existing domain "{GIVEN_registered_domain.name}"' ): - client_cli.register().domain(GIVEN_registered_domain.name) + iroha_cli.register().domain(GIVEN_registered_domain.name) with allure.step( - f'THEN client_cli should have the domain error: "{GIVEN_registered_domain.name}"' + f'THEN iroha_cli should have the domain error: "{GIVEN_registered_domain.name}"' ): - client_cli.should(have.error(Stderr.REPETITION.value)) + iroha_cli.should(have.error(Stderr.REPETITION.value)) @allure.label("sdk_test_id", "register_existing_domain_with_uppercase_letter") @@ -46,7 +46,7 @@ def test_register_existing_domain_uppercase_with_uppercase_letter( GIVEN_registered_domain_with_uppercase_letter, ): with allure.step( - f"WHEN client_cli registers an existing domain, " + f"WHEN iroha_cli registers an existing domain, " f'but with uppercase letter "{GIVEN_registered_domain_with_uppercase_letter.name}"' ): client_cli.register().domain(GIVEN_registered_domain_with_uppercase_letter.name) @@ -59,7 +59,7 @@ def test_register_existing_domain_uppercase_with_uppercase_letter( @allure.label("sdk_test_id", "register_one_letter_domain") def test_register_one_letter_domain(GIVEN_random_character): with allure.step( - f'WHEN client_cli registers the one letter domain "{GIVEN_random_character}"' + f'WHEN iroha_cli registers the one letter domain "{GIVEN_random_character}"' ): client_cli.register().domain(GIVEN_random_character) with allure.step(f'THEN Iroha should have the domain "{GIVEN_random_character}"'): @@ -69,12 +69,12 @@ def test_register_one_letter_domain(GIVEN_random_character): @allure.label("sdk_test_id", "register_domain_with_reserved_character") def test_register_domain_with_reserved_character(GIVEN_string_with_reserved_character): with allure.step( - f'WHEN client_cli registers a domain "' + f'WHEN iroha_cli registers a domain "' f'{GIVEN_string_with_reserved_character}" with reserved characters' ): client_cli.register().domain(GIVEN_string_with_reserved_character) with allure.step( - f'THEN client_cli should has the domain error: "{Stderr.RESERVED_CHARACTER.value}"' + f'THEN iroha_cli should has the domain error: "{Stderr.RESERVED_CHARACTER.value}"' ): client_cli.should(have.error(Stderr.RESERVED_CHARACTER.value)) @@ -82,10 +82,10 @@ def test_register_domain_with_reserved_character(GIVEN_string_with_reserved_char @allure.label("sdk_test_id", "register_domain_with_whitespaces") def test_register_domain_with_whitespaces(GIVEN_string_with_whitespaces): with allure.step( - f'WHEN client_cli registers a domain "{GIVEN_string_with_whitespaces}" with whitespaces' + f'WHEN iroha_cli registers a domain "{GIVEN_string_with_whitespaces}" with whitespaces' ): client_cli.register().domain(GIVEN_string_with_whitespaces) with allure.step( - f'THEN client_cli should has the domain error: "{Stderr.WHITESPACES.value}"' + f'THEN iroha_cli should has the domain error: "{Stderr.WHITESPACES.value}"' ): client_cli.should(have.error(Stderr.WHITESPACES.value)) diff --git a/client_cli/pytests/test/domains/test_transfer_domains.py b/iroha_cli/pytests/test/domains/test_transfer_domains.py similarity index 92% rename from client_cli/pytests/test/domains/test_transfer_domains.py rename to iroha_cli/pytests/test/domains/test_transfer_domains.py index 430f95e692c..a2449e3210f 100644 --- a/client_cli/pytests/test/domains/test_transfer_domains.py +++ b/iroha_cli/pytests/test/domains/test_transfer_domains.py @@ -1,7 +1,7 @@ import allure # type: ignore import pytest -from src.client_cli import client_cli, have, iroha +from src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) @@ -20,7 +20,7 @@ def test_transfer_domain( f"WHEN {GIVEN_currently_authorized_account} transfers domains " f"to {GIVEN_registered_account}" ): - client_cli.execute( + iroha_cli.execute( f"domain transfer " f"--from={GIVEN_currently_authorized_account} " f"--to={GIVEN_registered_account} " diff --git a/client_cli/pytests/test/triggers/conftest.py b/iroha_cli/pytests/test/triggers/conftest.py similarity index 100% rename from client_cli/pytests/test/triggers/conftest.py rename to iroha_cli/pytests/test/triggers/conftest.py diff --git a/client_cli/pytests/test/triggers/test_register_trigger.py b/iroha_cli/pytests/test/triggers/test_register_trigger.py similarity index 81% rename from client_cli/pytests/test/triggers/test_register_trigger.py rename to iroha_cli/pytests/test/triggers/test_register_trigger.py index b9164bbabe5..b428399c303 100644 --- a/client_cli/pytests/test/triggers/test_register_trigger.py +++ b/iroha_cli/pytests/test/triggers/test_register_trigger.py @@ -1,7 +1,7 @@ import allure # type: ignore import pytest -from src.client_cli import client_cli, have, iroha +from src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) @@ -14,9 +14,9 @@ def story_account_registers_trigger(): @pytest.mark.xfail(reason="wait for #4151") def test_register_trigger(GIVEN_currently_authorized_account): with allure.step( - f'WHEN client_cli registers a register_trigger for "{GIVEN_currently_authorized_account}"' + f'WHEN iroha_cli registers a register_trigger for "{GIVEN_currently_authorized_account}"' ): - client_cli.register_trigger(GIVEN_currently_authorized_account) + iroha_cli.register_trigger(GIVEN_currently_authorized_account) with allure.step( "THEN Iroha should have the asset with nft_number_1_for_genesis##\ ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4@genesis" diff --git a/client_cli/src/main.rs b/iroha_cli/src/main.rs similarity index 100% rename from client_cli/src/main.rs rename to iroha_cli/src/main.rs diff --git a/cli/Cargo.toml b/irohad/Cargo.toml similarity index 100% rename from cli/Cargo.toml rename to irohad/Cargo.toml diff --git a/cli/README.md b/irohad/README.md similarity index 100% rename from cli/README.md rename to irohad/README.md diff --git a/cli/build.rs b/irohad/build.rs similarity index 100% rename from cli/build.rs rename to irohad/build.rs diff --git a/cli/src/lib.rs b/irohad/src/lib.rs similarity index 100% rename from cli/src/lib.rs rename to irohad/src/lib.rs diff --git a/cli/src/main.rs b/irohad/src/main.rs similarity index 100% rename from cli/src/main.rs rename to irohad/src/main.rs diff --git a/cli/src/samples.rs b/irohad/src/samples.rs similarity index 100% rename from cli/src/samples.rs rename to irohad/src/samples.rs From e1ec00911ecf6b9f0de21bdcade820f5e44ecb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 11:46:53 +0400 Subject: [PATCH 02/59] refactor: merge `iroha_wasm_builder` with its CLI, move `iroha_swarm` CLI to `main.rs` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.lock | 15 ++++--------- Cargo.toml | 1 - tools/swarm/Cargo.toml | 4 ---- tools/swarm/src/{bin/cli.rs => main.rs} | 0 tools/wasm_builder_cli/Cargo.toml | 22 ------------------- wasm_builder/Cargo.toml | 5 +++++ .../README.md | 0 .../src/main.rs | 0 wasm_samples/default_executor/README.md | 2 +- 9 files changed, 10 insertions(+), 39 deletions(-) rename tools/swarm/src/{bin/cli.rs => main.rs} (100%) delete mode 100644 tools/wasm_builder_cli/Cargo.toml rename {tools/wasm_builder_cli => wasm_builder}/README.md (100%) rename {tools/wasm_builder_cli => wasm_builder}/src/main.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 38b21d1775f..477ccebe638 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3628,22 +3628,15 @@ dependencies = [ name = "iroha_wasm_builder" version = "2.0.0-rc.1.0" dependencies = [ + "clap", + "color-eyre", "eyre", + "owo-colors", "path-absolutize", "serde_json", "sha256", - "wasm-opt", -] - -[[package]] -name = "iroha_wasm_builder_cli" -version = "2.0.0-rc.1.0" -dependencies = [ - "clap", - "color-eyre", - "iroha_wasm_builder", - "owo-colors", "spinoff", + "wasm-opt", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 87c92f0229e..190ca9495fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -241,7 +241,6 @@ members = [ "tools/kagami", "tools/kura_inspector", "tools/parity_scale_cli", - "tools/wasm_builder_cli", "tools/wasm_test_runner", "torii", diff --git a/tools/swarm/Cargo.toml b/tools/swarm/Cargo.toml index 6a961933a71..92f47d97e0b 100644 --- a/tools/swarm/Cargo.toml +++ b/tools/swarm/Cargo.toml @@ -29,7 +29,3 @@ serde_json.workspace = true iroha_config.workspace = true expect-test.workspace = true nonzero_ext.workspace = true - -[[bin]] -name = "iroha_swarm" -path = "src/bin/cli.rs" \ No newline at end of file diff --git a/tools/swarm/src/bin/cli.rs b/tools/swarm/src/main.rs similarity index 100% rename from tools/swarm/src/bin/cli.rs rename to tools/swarm/src/main.rs diff --git a/tools/wasm_builder_cli/Cargo.toml b/tools/wasm_builder_cli/Cargo.toml deleted file mode 100644 index 91deae67674..00000000000 --- a/tools/wasm_builder_cli/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[package] -name = "iroha_wasm_builder_cli" - -edition.workspace = true -version.workspace = true -authors.workspace = true -license.workspace = true - -[lints] -workspace = true - -[[bin]] -name = "iroha_wasm_builder" -path = "src/main.rs" - -[dependencies] -iroha_wasm_builder.workspace = true - -clap = { workspace = true, features = ["derive"] } -color-eyre.workspace = true -spinoff = { workspace = true, features = ["binary"] } -owo-colors = { workspace = true, features = ["supports-colors"] } diff --git a/wasm_builder/Cargo.toml b/wasm_builder/Cargo.toml index 90d70c615a5..990a2ff8a95 100644 --- a/wasm_builder/Cargo.toml +++ b/wasm_builder/Cargo.toml @@ -17,3 +17,8 @@ serde_json = { workspace = true, features = ["std"] } sha256 = "1.5.0" path-absolutize = { workspace = true } wasm-opt = "0.116.1" + +clap = { workspace = true, features = ["derive"] } +color-eyre.workspace = true +spinoff = { workspace = true, features = ["binary"] } +owo-colors = { workspace = true, features = ["supports-colors"] } diff --git a/tools/wasm_builder_cli/README.md b/wasm_builder/README.md similarity index 100% rename from tools/wasm_builder_cli/README.md rename to wasm_builder/README.md diff --git a/tools/wasm_builder_cli/src/main.rs b/wasm_builder/src/main.rs similarity index 100% rename from tools/wasm_builder_cli/src/main.rs rename to wasm_builder/src/main.rs diff --git a/wasm_samples/default_executor/README.md b/wasm_samples/default_executor/README.md index d5571035d9e..8a8a9d66de1 100644 --- a/wasm_samples/default_executor/README.md +++ b/wasm_samples/default_executor/README.md @@ -1,6 +1,6 @@ # `iroha_default_executor` -Use the [Wasm Builder CLI](../../tools/wasm_builder_cli) in order to build it: +Use the [Wasm Builder CLI](../../wasm_builder) in order to build it: ```bash cargo run --bin iroha_wasm_builder -- \ From 1ad53add692f5602e982db8eb4dcf69224ecfcef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 11:56:41 +0400 Subject: [PATCH 03/59] refactor: move `iroha_executor` and `iroha_trigger` out of `iroha_smart_contract` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 16 ++++++++-------- {smart_contract/executor => executor}/Cargo.toml | 0 .../executor => executor}/data_model/Cargo.toml | 0 .../data_model/derive/Cargo.toml | 0 .../data_model/derive/src/lib.rs | 0 .../data_model/derive/src/parameter.rs | 0 .../data_model/derive/src/permission.rs | 0 .../executor => executor}/data_model/src/lib.rs | 0 .../data_model/src/parameter.rs | 0 .../data_model/src/permission.rs | 0 .../executor => executor}/derive/Cargo.toml | 0 .../executor => executor}/derive/src/default.rs | 0 .../derive/src/entrypoint.rs | 0 .../executor => executor}/derive/src/lib.rs | 0 .../executor => executor}/src/default.rs | 0 {smart_contract/executor => executor}/src/lib.rs | 0 .../executor => executor}/src/permission.rs | 0 {smart_contract/trigger => trigger}/Cargo.toml | 0 .../trigger => trigger}/derive/Cargo.toml | 0 .../trigger => trigger}/derive/src/entrypoint.rs | 0 .../trigger => trigger}/derive/src/lib.rs | 0 {smart_contract/trigger => trigger}/src/lib.rs | 0 wasm_samples/Cargo.toml | 6 +++--- 23 files changed, 11 insertions(+), 11 deletions(-) rename {smart_contract/executor => executor}/Cargo.toml (100%) rename {smart_contract/executor => executor}/data_model/Cargo.toml (100%) rename {smart_contract/executor => executor}/data_model/derive/Cargo.toml (100%) rename {smart_contract/executor => executor}/data_model/derive/src/lib.rs (100%) rename {smart_contract/executor => executor}/data_model/derive/src/parameter.rs (100%) rename {smart_contract/executor => executor}/data_model/derive/src/permission.rs (100%) rename {smart_contract/executor => executor}/data_model/src/lib.rs (100%) rename {smart_contract/executor => executor}/data_model/src/parameter.rs (100%) rename {smart_contract/executor => executor}/data_model/src/permission.rs (100%) rename {smart_contract/executor => executor}/derive/Cargo.toml (100%) rename {smart_contract/executor => executor}/derive/src/default.rs (100%) rename {smart_contract/executor => executor}/derive/src/entrypoint.rs (100%) rename {smart_contract/executor => executor}/derive/src/lib.rs (100%) rename {smart_contract/executor => executor}/src/default.rs (100%) rename {smart_contract/executor => executor}/src/lib.rs (100%) rename {smart_contract/executor => executor}/src/permission.rs (100%) rename {smart_contract/trigger => trigger}/Cargo.toml (100%) rename {smart_contract/trigger => trigger}/derive/Cargo.toml (100%) rename {smart_contract/trigger => trigger}/derive/src/entrypoint.rs (100%) rename {smart_contract/trigger => trigger}/derive/src/lib.rs (100%) rename {smart_contract/trigger => trigger}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 190ca9495fd..63e9834590e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,8 +44,8 @@ iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "wasm_builder" } iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "smart_contract" } iroha_smart_contract_utils = { version = "=2.0.0-rc.1.0", path = "smart_contract/utils" } -iroha_executor = { version = "=2.0.0-rc.1.0", path = "smart_contract/executor" } -iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "smart_contract/executor/data_model" } +iroha_executor = { version = "=2.0.0-rc.1.0", path = "executor" } +iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "executor/data_model" } test_network = { version = "=2.0.0-rc.1.0", path = "core/test_network" } test_samples = { version = "=2.0.0-rc.1.0", path = "test_samples" } @@ -226,13 +226,13 @@ members = [ "smart_contract/derive", "smart_contract/utils", - "smart_contract/trigger", - "smart_contract/trigger/derive", + "trigger", + "trigger/derive", - "smart_contract/executor", - "smart_contract/executor/derive", - "smart_contract/executor/data_model", - "smart_contract/executor/data_model/derive", + "executor", + "executor/derive", + "executor/data_model", + "executor/data_model/derive", "telemetry", "test_samples", diff --git a/smart_contract/executor/Cargo.toml b/executor/Cargo.toml similarity index 100% rename from smart_contract/executor/Cargo.toml rename to executor/Cargo.toml diff --git a/smart_contract/executor/data_model/Cargo.toml b/executor/data_model/Cargo.toml similarity index 100% rename from smart_contract/executor/data_model/Cargo.toml rename to executor/data_model/Cargo.toml diff --git a/smart_contract/executor/data_model/derive/Cargo.toml b/executor/data_model/derive/Cargo.toml similarity index 100% rename from smart_contract/executor/data_model/derive/Cargo.toml rename to executor/data_model/derive/Cargo.toml diff --git a/smart_contract/executor/data_model/derive/src/lib.rs b/executor/data_model/derive/src/lib.rs similarity index 100% rename from smart_contract/executor/data_model/derive/src/lib.rs rename to executor/data_model/derive/src/lib.rs diff --git a/smart_contract/executor/data_model/derive/src/parameter.rs b/executor/data_model/derive/src/parameter.rs similarity index 100% rename from smart_contract/executor/data_model/derive/src/parameter.rs rename to executor/data_model/derive/src/parameter.rs diff --git a/smart_contract/executor/data_model/derive/src/permission.rs b/executor/data_model/derive/src/permission.rs similarity index 100% rename from smart_contract/executor/data_model/derive/src/permission.rs rename to executor/data_model/derive/src/permission.rs diff --git a/smart_contract/executor/data_model/src/lib.rs b/executor/data_model/src/lib.rs similarity index 100% rename from smart_contract/executor/data_model/src/lib.rs rename to executor/data_model/src/lib.rs diff --git a/smart_contract/executor/data_model/src/parameter.rs b/executor/data_model/src/parameter.rs similarity index 100% rename from smart_contract/executor/data_model/src/parameter.rs rename to executor/data_model/src/parameter.rs diff --git a/smart_contract/executor/data_model/src/permission.rs b/executor/data_model/src/permission.rs similarity index 100% rename from smart_contract/executor/data_model/src/permission.rs rename to executor/data_model/src/permission.rs diff --git a/smart_contract/executor/derive/Cargo.toml b/executor/derive/Cargo.toml similarity index 100% rename from smart_contract/executor/derive/Cargo.toml rename to executor/derive/Cargo.toml diff --git a/smart_contract/executor/derive/src/default.rs b/executor/derive/src/default.rs similarity index 100% rename from smart_contract/executor/derive/src/default.rs rename to executor/derive/src/default.rs diff --git a/smart_contract/executor/derive/src/entrypoint.rs b/executor/derive/src/entrypoint.rs similarity index 100% rename from smart_contract/executor/derive/src/entrypoint.rs rename to executor/derive/src/entrypoint.rs diff --git a/smart_contract/executor/derive/src/lib.rs b/executor/derive/src/lib.rs similarity index 100% rename from smart_contract/executor/derive/src/lib.rs rename to executor/derive/src/lib.rs diff --git a/smart_contract/executor/src/default.rs b/executor/src/default.rs similarity index 100% rename from smart_contract/executor/src/default.rs rename to executor/src/default.rs diff --git a/smart_contract/executor/src/lib.rs b/executor/src/lib.rs similarity index 100% rename from smart_contract/executor/src/lib.rs rename to executor/src/lib.rs diff --git a/smart_contract/executor/src/permission.rs b/executor/src/permission.rs similarity index 100% rename from smart_contract/executor/src/permission.rs rename to executor/src/permission.rs diff --git a/smart_contract/trigger/Cargo.toml b/trigger/Cargo.toml similarity index 100% rename from smart_contract/trigger/Cargo.toml rename to trigger/Cargo.toml diff --git a/smart_contract/trigger/derive/Cargo.toml b/trigger/derive/Cargo.toml similarity index 100% rename from smart_contract/trigger/derive/Cargo.toml rename to trigger/derive/Cargo.toml diff --git a/smart_contract/trigger/derive/src/entrypoint.rs b/trigger/derive/src/entrypoint.rs similarity index 100% rename from smart_contract/trigger/derive/src/entrypoint.rs rename to trigger/derive/src/entrypoint.rs diff --git a/smart_contract/trigger/derive/src/lib.rs b/trigger/derive/src/lib.rs similarity index 100% rename from smart_contract/trigger/derive/src/lib.rs rename to trigger/derive/src/lib.rs diff --git a/smart_contract/trigger/src/lib.rs b/trigger/src/lib.rs similarity index 100% rename from smart_contract/trigger/src/lib.rs rename to trigger/src/lib.rs diff --git a/wasm_samples/Cargo.toml b/wasm_samples/Cargo.toml index a28a1c0892e..e7f951d88de 100644 --- a/wasm_samples/Cargo.toml +++ b/wasm_samples/Cargo.toml @@ -41,11 +41,11 @@ codegen-units = 1 # Further reduces binary size but increases compilation time executor_custom_data_model = { path = "executor_custom_data_model" } iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "../smart_contract", features = ["debug"] } -iroha_trigger = { version = "=2.0.0-rc.1.0", path = "../smart_contract/trigger", features = ["debug"] } -iroha_executor = { version = "=2.0.0-rc.1.0", path = "../smart_contract/executor", features = ["debug"] } +iroha_trigger = { version = "=2.0.0-rc.1.0", path = "../trigger", features = ["debug"] } +iroha_executor = { version = "=2.0.0-rc.1.0", path = "../executor", features = ["debug"] } iroha_schema = { version = "=2.0.0-rc.1.0", path = "../schema" } iroha_data_model = { version = "=2.0.0-rc.1.0", path = "../data_model", default-features = false } -iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "../smart_contract/executor/data_model" } +iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "../executor/data_model" } parity-scale-codec = { version = "3.2.1", default-features = false } anyhow = { version = "1.0.71", default-features = false } From 8bedd6cb063ad4d65835aab0e4a1a6431288b960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 13:57:47 +0400 Subject: [PATCH 04/59] refactor: rename `config` directory to `iroha_config` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .gitignore | 2 +- Cargo.toml | 8 ++++---- README.md | 2 +- core/src/kiso.rs | 2 +- {config => iroha_config}/Cargo.toml | 0 {config => iroha_config}/base/Cargo.toml | 0 {config => iroha_config}/base/derive/Cargo.toml | 0 {config => iroha_config}/base/derive/src/lib.rs | 0 {config => iroha_config}/base/derive/tests/ui.rs | 0 .../base/derive/tests/ui_fail/generics.rs | 0 .../base/derive/tests/ui_fail/generics.stderr | 0 .../base/derive/tests/ui_fail/invalid_attrs_commas.rs | 0 .../base/derive/tests/ui_fail/invalid_attrs_commas.stderr | 0 .../base/derive/tests/ui_fail/invalid_attrs_conflicts.rs | 0 .../derive/tests/ui_fail/invalid_attrs_conflicts.stderr | 0 .../tests/ui_fail/invalid_attrs_default_invalid_expr.rs | 0 .../ui_fail/invalid_attrs_default_invalid_expr.stderr | 0 .../derive/tests/ui_fail/invalid_attrs_env_without_var.rs | 0 .../tests/ui_fail/invalid_attrs_env_without_var.stderr | 0 .../tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs | 0 .../ui_fail/invalid_attrs_no_comma_between_attrs.stderr | 0 .../base/derive/tests/ui_fail/invalid_attrs_struct.rs | 0 .../base/derive/tests/ui_fail/invalid_attrs_struct.stderr | 0 .../base/derive/tests/ui_fail/unsupported_shapes.rs | 0 .../base/derive/tests/ui_fail/unsupported_shapes.stderr | 0 .../base/derive/tests/ui_pass/happy_path.rs | 0 {config => iroha_config}/base/src/attach.rs | 0 {config => iroha_config}/base/src/env.rs | 0 {config => iroha_config}/base/src/lib.rs | 0 {config => iroha_config}/base/src/read.rs | 0 {config => iroha_config}/base/src/toml.rs | 0 {config => iroha_config}/base/src/util.rs | 0 .../base/tests/bad.invalid-extends.toml | 0 .../base/tests/bad.invalid-nested-extends.base.toml | 0 .../base/tests/bad.invalid-nested-extends.toml | 0 {config => iroha_config}/base/tests/misc.rs | 0 {config => iroha_config}/iroha_test_config.toml | 0 {config => iroha_config}/src/client_api.rs | 0 {config => iroha_config}/src/kura.rs | 0 {config => iroha_config}/src/lib.rs | 0 {config => iroha_config}/src/logger.rs | 0 {config => iroha_config}/src/parameters/actual.rs | 0 {config => iroha_config}/src/parameters/defaults.rs | 0 {config => iroha_config}/src/parameters/mod.rs | 0 {config => iroha_config}/src/parameters/user.rs | 0 {config => iroha_config}/src/snapshot.rs | 0 {config => iroha_config}/src/wasm.rs | 0 {config => iroha_config}/tests/fixtures.rs | 0 .../tests/fixtures/absolute_paths.toml | 0 .../tests/fixtures/bad.extra_fields.toml | 0 .../tests/fixtures/bad.missing_fields.toml | 0 .../tests/fixtures/bad.multiple_bad_envs.env | 0 .../tests/fixtures/bad.torii_addr_eq_p2p_addr.toml | 0 {config => iroha_config}/tests/fixtures/base.toml | 0 .../tests/fixtures/base_trusted_peers.toml | 0 {config => iroha_config}/tests/fixtures/full.env | 0 {config => iroha_config}/tests/fixtures/full.toml | 0 .../tests/fixtures/minimal_alone_with_genesis.toml | 0 .../tests/fixtures/minimal_file_and_env.env | 0 .../tests/fixtures/minimal_file_and_env.toml | 0 .../tests/fixtures/minimal_with_trusted_peers.toml | 0 61 files changed, 7 insertions(+), 7 deletions(-) rename {config => iroha_config}/Cargo.toml (100%) rename {config => iroha_config}/base/Cargo.toml (100%) rename {config => iroha_config}/base/derive/Cargo.toml (100%) rename {config => iroha_config}/base/derive/src/lib.rs (100%) rename {config => iroha_config}/base/derive/tests/ui.rs (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/generics.rs (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/generics.stderr (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/invalid_attrs_commas.rs (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/invalid_attrs_commas.stderr (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/invalid_attrs_conflicts.rs (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/invalid_attrs_conflicts.stderr (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/invalid_attrs_env_without_var.rs (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/invalid_attrs_env_without_var.stderr (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/invalid_attrs_struct.rs (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/invalid_attrs_struct.stderr (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/unsupported_shapes.rs (100%) rename {config => iroha_config}/base/derive/tests/ui_fail/unsupported_shapes.stderr (100%) rename {config => iroha_config}/base/derive/tests/ui_pass/happy_path.rs (100%) rename {config => iroha_config}/base/src/attach.rs (100%) rename {config => iroha_config}/base/src/env.rs (100%) rename {config => iroha_config}/base/src/lib.rs (100%) rename {config => iroha_config}/base/src/read.rs (100%) rename {config => iroha_config}/base/src/toml.rs (100%) rename {config => iroha_config}/base/src/util.rs (100%) rename {config => iroha_config}/base/tests/bad.invalid-extends.toml (100%) rename {config => iroha_config}/base/tests/bad.invalid-nested-extends.base.toml (100%) rename {config => iroha_config}/base/tests/bad.invalid-nested-extends.toml (100%) rename {config => iroha_config}/base/tests/misc.rs (100%) rename {config => iroha_config}/iroha_test_config.toml (100%) rename {config => iroha_config}/src/client_api.rs (100%) rename {config => iroha_config}/src/kura.rs (100%) rename {config => iroha_config}/src/lib.rs (100%) rename {config => iroha_config}/src/logger.rs (100%) rename {config => iroha_config}/src/parameters/actual.rs (100%) rename {config => iroha_config}/src/parameters/defaults.rs (100%) rename {config => iroha_config}/src/parameters/mod.rs (100%) rename {config => iroha_config}/src/parameters/user.rs (100%) rename {config => iroha_config}/src/snapshot.rs (100%) rename {config => iroha_config}/src/wasm.rs (100%) rename {config => iroha_config}/tests/fixtures.rs (100%) rename {config => iroha_config}/tests/fixtures/absolute_paths.toml (100%) rename {config => iroha_config}/tests/fixtures/bad.extra_fields.toml (100%) rename {config => iroha_config}/tests/fixtures/bad.missing_fields.toml (100%) rename {config => iroha_config}/tests/fixtures/bad.multiple_bad_envs.env (100%) rename {config => iroha_config}/tests/fixtures/bad.torii_addr_eq_p2p_addr.toml (100%) rename {config => iroha_config}/tests/fixtures/base.toml (100%) rename {config => iroha_config}/tests/fixtures/base_trusted_peers.toml (100%) rename {config => iroha_config}/tests/fixtures/full.env (100%) rename {config => iroha_config}/tests/fixtures/full.toml (100%) rename {config => iroha_config}/tests/fixtures/minimal_alone_with_genesis.toml (100%) rename {config => iroha_config}/tests/fixtures/minimal_file_and_env.env (100%) rename {config => iroha_config}/tests/fixtures/minimal_file_and_env.toml (100%) rename {config => iroha_config}/tests/fixtures/minimal_with_trusted_peers.toml (100%) diff --git a/.gitignore b/.gitignore index 8f43e18e0ca..d727e2d62a1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ **/rusty-tags.vi /**/Cargo.lock -config/__pycaсhe__ +iroha_config/__pycaсhe__ **/__pycache__/* __pycache__/* build/* diff --git a/Cargo.toml b/Cargo.toml index 63e9834590e..f79b166532c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,8 +27,8 @@ iroha_telemetry = { version = "=2.0.0-rc.1.0", path = "telemetry" } iroha_p2p = { version = "=2.0.0-rc.1.0", path = "p2p" } iroha_primitives = { version = "=2.0.0-rc.1.0", path = "primitives", default-features = false } iroha_data_model = { version = "=2.0.0-rc.1.0", path = "data_model", default-features = false } -iroha_config = { version = "=2.0.0-rc.1.0", path = "config" } -iroha_config_base = { version = "=2.0.0-rc.1.0", path = "config/base" } +iroha_config = { version = "=2.0.0-rc.1.0", path = "iroha_config" } +iroha_config_base = { version = "=2.0.0-rc.1.0", path = "iroha_config/base" } iroha_schema_gen = { version = "=2.0.0-rc.1.0", path = "schema/gen" } iroha_schema = { version = "=2.0.0-rc.1.0", path = "schema", default-features = false } iroha_logger = { version = "=2.0.0-rc.1.0", path = "logger" } @@ -197,8 +197,8 @@ members = [ "irohad", "iroha", "iroha_cli", - "config", - "config/base", + "iroha_config", + "iroha_config/base", "core", "core/test_network", "crypto", diff --git a/README.md b/README.md index c95376c8ef3..b08db8277da 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ Iroha project mainly consists of the following crates: * [`irohad`](irohad) is the command-line application for deploying an Iroha peer. Contains the routing table and definitions of API endpoints. * [`iroha_cli`](iroha_cli) is the command-line client, a reference application using the client SDK. * [`iroha_core`](core) is the primary library used by all other crates, including the peer endpoint management. -* [`iroha_config`](config) handles configuration and documentation generation for options and run-time changes. +* [`iroha_config`](iroha_config) handles configuration and documentation generation for options and run-time changes. * [`iroha_crypto`](crypto) defines cryptographic aspects of Iroha. * [`kagami`](tools/kagami) is used to generate cryptographic keys, default genesis, configuration reference, and schema. * [`iroha_data_model`](data_model) defines common data models in Iroha. diff --git a/core/src/kiso.rs b/core/src/kiso.rs index 50fd939e3d1..fd3b0693b6d 100644 --- a/core/src/kiso.rs +++ b/core/src/kiso.rs @@ -167,7 +167,7 @@ mod tests { fn test_config() -> Root { // if it fails, it is probably a bug ConfigReader::new() - .with_toml_source(TomlSource::from_file("../config/iroha_test_config.toml").unwrap()) + .with_toml_source(TomlSource::from_file("../iroha_config/iroha_test_config.toml").unwrap()) .read_and_complete::() .unwrap() .parse() diff --git a/config/Cargo.toml b/iroha_config/Cargo.toml similarity index 100% rename from config/Cargo.toml rename to iroha_config/Cargo.toml diff --git a/config/base/Cargo.toml b/iroha_config/base/Cargo.toml similarity index 100% rename from config/base/Cargo.toml rename to iroha_config/base/Cargo.toml diff --git a/config/base/derive/Cargo.toml b/iroha_config/base/derive/Cargo.toml similarity index 100% rename from config/base/derive/Cargo.toml rename to iroha_config/base/derive/Cargo.toml diff --git a/config/base/derive/src/lib.rs b/iroha_config/base/derive/src/lib.rs similarity index 100% rename from config/base/derive/src/lib.rs rename to iroha_config/base/derive/src/lib.rs diff --git a/config/base/derive/tests/ui.rs b/iroha_config/base/derive/tests/ui.rs similarity index 100% rename from config/base/derive/tests/ui.rs rename to iroha_config/base/derive/tests/ui.rs diff --git a/config/base/derive/tests/ui_fail/generics.rs b/iroha_config/base/derive/tests/ui_fail/generics.rs similarity index 100% rename from config/base/derive/tests/ui_fail/generics.rs rename to iroha_config/base/derive/tests/ui_fail/generics.rs diff --git a/config/base/derive/tests/ui_fail/generics.stderr b/iroha_config/base/derive/tests/ui_fail/generics.stderr similarity index 100% rename from config/base/derive/tests/ui_fail/generics.stderr rename to iroha_config/base/derive/tests/ui_fail/generics.stderr diff --git a/config/base/derive/tests/ui_fail/invalid_attrs_commas.rs b/iroha_config/base/derive/tests/ui_fail/invalid_attrs_commas.rs similarity index 100% rename from config/base/derive/tests/ui_fail/invalid_attrs_commas.rs rename to iroha_config/base/derive/tests/ui_fail/invalid_attrs_commas.rs diff --git a/config/base/derive/tests/ui_fail/invalid_attrs_commas.stderr b/iroha_config/base/derive/tests/ui_fail/invalid_attrs_commas.stderr similarity index 100% rename from config/base/derive/tests/ui_fail/invalid_attrs_commas.stderr rename to iroha_config/base/derive/tests/ui_fail/invalid_attrs_commas.stderr diff --git a/config/base/derive/tests/ui_fail/invalid_attrs_conflicts.rs b/iroha_config/base/derive/tests/ui_fail/invalid_attrs_conflicts.rs similarity index 100% rename from config/base/derive/tests/ui_fail/invalid_attrs_conflicts.rs rename to iroha_config/base/derive/tests/ui_fail/invalid_attrs_conflicts.rs diff --git a/config/base/derive/tests/ui_fail/invalid_attrs_conflicts.stderr b/iroha_config/base/derive/tests/ui_fail/invalid_attrs_conflicts.stderr similarity index 100% rename from config/base/derive/tests/ui_fail/invalid_attrs_conflicts.stderr rename to iroha_config/base/derive/tests/ui_fail/invalid_attrs_conflicts.stderr diff --git a/config/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs b/iroha_config/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs similarity index 100% rename from config/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs rename to iroha_config/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs diff --git a/config/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr b/iroha_config/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr similarity index 100% rename from config/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr rename to iroha_config/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr diff --git a/config/base/derive/tests/ui_fail/invalid_attrs_env_without_var.rs b/iroha_config/base/derive/tests/ui_fail/invalid_attrs_env_without_var.rs similarity index 100% rename from config/base/derive/tests/ui_fail/invalid_attrs_env_without_var.rs rename to iroha_config/base/derive/tests/ui_fail/invalid_attrs_env_without_var.rs diff --git a/config/base/derive/tests/ui_fail/invalid_attrs_env_without_var.stderr b/iroha_config/base/derive/tests/ui_fail/invalid_attrs_env_without_var.stderr similarity index 100% rename from config/base/derive/tests/ui_fail/invalid_attrs_env_without_var.stderr rename to iroha_config/base/derive/tests/ui_fail/invalid_attrs_env_without_var.stderr diff --git a/config/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs b/iroha_config/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs similarity index 100% rename from config/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs rename to iroha_config/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs diff --git a/config/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr b/iroha_config/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr similarity index 100% rename from config/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr rename to iroha_config/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr diff --git a/config/base/derive/tests/ui_fail/invalid_attrs_struct.rs b/iroha_config/base/derive/tests/ui_fail/invalid_attrs_struct.rs similarity index 100% rename from config/base/derive/tests/ui_fail/invalid_attrs_struct.rs rename to iroha_config/base/derive/tests/ui_fail/invalid_attrs_struct.rs diff --git a/config/base/derive/tests/ui_fail/invalid_attrs_struct.stderr b/iroha_config/base/derive/tests/ui_fail/invalid_attrs_struct.stderr similarity index 100% rename from config/base/derive/tests/ui_fail/invalid_attrs_struct.stderr rename to iroha_config/base/derive/tests/ui_fail/invalid_attrs_struct.stderr diff --git a/config/base/derive/tests/ui_fail/unsupported_shapes.rs b/iroha_config/base/derive/tests/ui_fail/unsupported_shapes.rs similarity index 100% rename from config/base/derive/tests/ui_fail/unsupported_shapes.rs rename to iroha_config/base/derive/tests/ui_fail/unsupported_shapes.rs diff --git a/config/base/derive/tests/ui_fail/unsupported_shapes.stderr b/iroha_config/base/derive/tests/ui_fail/unsupported_shapes.stderr similarity index 100% rename from config/base/derive/tests/ui_fail/unsupported_shapes.stderr rename to iroha_config/base/derive/tests/ui_fail/unsupported_shapes.stderr diff --git a/config/base/derive/tests/ui_pass/happy_path.rs b/iroha_config/base/derive/tests/ui_pass/happy_path.rs similarity index 100% rename from config/base/derive/tests/ui_pass/happy_path.rs rename to iroha_config/base/derive/tests/ui_pass/happy_path.rs diff --git a/config/base/src/attach.rs b/iroha_config/base/src/attach.rs similarity index 100% rename from config/base/src/attach.rs rename to iroha_config/base/src/attach.rs diff --git a/config/base/src/env.rs b/iroha_config/base/src/env.rs similarity index 100% rename from config/base/src/env.rs rename to iroha_config/base/src/env.rs diff --git a/config/base/src/lib.rs b/iroha_config/base/src/lib.rs similarity index 100% rename from config/base/src/lib.rs rename to iroha_config/base/src/lib.rs diff --git a/config/base/src/read.rs b/iroha_config/base/src/read.rs similarity index 100% rename from config/base/src/read.rs rename to iroha_config/base/src/read.rs diff --git a/config/base/src/toml.rs b/iroha_config/base/src/toml.rs similarity index 100% rename from config/base/src/toml.rs rename to iroha_config/base/src/toml.rs diff --git a/config/base/src/util.rs b/iroha_config/base/src/util.rs similarity index 100% rename from config/base/src/util.rs rename to iroha_config/base/src/util.rs diff --git a/config/base/tests/bad.invalid-extends.toml b/iroha_config/base/tests/bad.invalid-extends.toml similarity index 100% rename from config/base/tests/bad.invalid-extends.toml rename to iroha_config/base/tests/bad.invalid-extends.toml diff --git a/config/base/tests/bad.invalid-nested-extends.base.toml b/iroha_config/base/tests/bad.invalid-nested-extends.base.toml similarity index 100% rename from config/base/tests/bad.invalid-nested-extends.base.toml rename to iroha_config/base/tests/bad.invalid-nested-extends.base.toml diff --git a/config/base/tests/bad.invalid-nested-extends.toml b/iroha_config/base/tests/bad.invalid-nested-extends.toml similarity index 100% rename from config/base/tests/bad.invalid-nested-extends.toml rename to iroha_config/base/tests/bad.invalid-nested-extends.toml diff --git a/config/base/tests/misc.rs b/iroha_config/base/tests/misc.rs similarity index 100% rename from config/base/tests/misc.rs rename to iroha_config/base/tests/misc.rs diff --git a/config/iroha_test_config.toml b/iroha_config/iroha_test_config.toml similarity index 100% rename from config/iroha_test_config.toml rename to iroha_config/iroha_test_config.toml diff --git a/config/src/client_api.rs b/iroha_config/src/client_api.rs similarity index 100% rename from config/src/client_api.rs rename to iroha_config/src/client_api.rs diff --git a/config/src/kura.rs b/iroha_config/src/kura.rs similarity index 100% rename from config/src/kura.rs rename to iroha_config/src/kura.rs diff --git a/config/src/lib.rs b/iroha_config/src/lib.rs similarity index 100% rename from config/src/lib.rs rename to iroha_config/src/lib.rs diff --git a/config/src/logger.rs b/iroha_config/src/logger.rs similarity index 100% rename from config/src/logger.rs rename to iroha_config/src/logger.rs diff --git a/config/src/parameters/actual.rs b/iroha_config/src/parameters/actual.rs similarity index 100% rename from config/src/parameters/actual.rs rename to iroha_config/src/parameters/actual.rs diff --git a/config/src/parameters/defaults.rs b/iroha_config/src/parameters/defaults.rs similarity index 100% rename from config/src/parameters/defaults.rs rename to iroha_config/src/parameters/defaults.rs diff --git a/config/src/parameters/mod.rs b/iroha_config/src/parameters/mod.rs similarity index 100% rename from config/src/parameters/mod.rs rename to iroha_config/src/parameters/mod.rs diff --git a/config/src/parameters/user.rs b/iroha_config/src/parameters/user.rs similarity index 100% rename from config/src/parameters/user.rs rename to iroha_config/src/parameters/user.rs diff --git a/config/src/snapshot.rs b/iroha_config/src/snapshot.rs similarity index 100% rename from config/src/snapshot.rs rename to iroha_config/src/snapshot.rs diff --git a/config/src/wasm.rs b/iroha_config/src/wasm.rs similarity index 100% rename from config/src/wasm.rs rename to iroha_config/src/wasm.rs diff --git a/config/tests/fixtures.rs b/iroha_config/tests/fixtures.rs similarity index 100% rename from config/tests/fixtures.rs rename to iroha_config/tests/fixtures.rs diff --git a/config/tests/fixtures/absolute_paths.toml b/iroha_config/tests/fixtures/absolute_paths.toml similarity index 100% rename from config/tests/fixtures/absolute_paths.toml rename to iroha_config/tests/fixtures/absolute_paths.toml diff --git a/config/tests/fixtures/bad.extra_fields.toml b/iroha_config/tests/fixtures/bad.extra_fields.toml similarity index 100% rename from config/tests/fixtures/bad.extra_fields.toml rename to iroha_config/tests/fixtures/bad.extra_fields.toml diff --git a/config/tests/fixtures/bad.missing_fields.toml b/iroha_config/tests/fixtures/bad.missing_fields.toml similarity index 100% rename from config/tests/fixtures/bad.missing_fields.toml rename to iroha_config/tests/fixtures/bad.missing_fields.toml diff --git a/config/tests/fixtures/bad.multiple_bad_envs.env b/iroha_config/tests/fixtures/bad.multiple_bad_envs.env similarity index 100% rename from config/tests/fixtures/bad.multiple_bad_envs.env rename to iroha_config/tests/fixtures/bad.multiple_bad_envs.env diff --git a/config/tests/fixtures/bad.torii_addr_eq_p2p_addr.toml b/iroha_config/tests/fixtures/bad.torii_addr_eq_p2p_addr.toml similarity index 100% rename from config/tests/fixtures/bad.torii_addr_eq_p2p_addr.toml rename to iroha_config/tests/fixtures/bad.torii_addr_eq_p2p_addr.toml diff --git a/config/tests/fixtures/base.toml b/iroha_config/tests/fixtures/base.toml similarity index 100% rename from config/tests/fixtures/base.toml rename to iroha_config/tests/fixtures/base.toml diff --git a/config/tests/fixtures/base_trusted_peers.toml b/iroha_config/tests/fixtures/base_trusted_peers.toml similarity index 100% rename from config/tests/fixtures/base_trusted_peers.toml rename to iroha_config/tests/fixtures/base_trusted_peers.toml diff --git a/config/tests/fixtures/full.env b/iroha_config/tests/fixtures/full.env similarity index 100% rename from config/tests/fixtures/full.env rename to iroha_config/tests/fixtures/full.env diff --git a/config/tests/fixtures/full.toml b/iroha_config/tests/fixtures/full.toml similarity index 100% rename from config/tests/fixtures/full.toml rename to iroha_config/tests/fixtures/full.toml diff --git a/config/tests/fixtures/minimal_alone_with_genesis.toml b/iroha_config/tests/fixtures/minimal_alone_with_genesis.toml similarity index 100% rename from config/tests/fixtures/minimal_alone_with_genesis.toml rename to iroha_config/tests/fixtures/minimal_alone_with_genesis.toml diff --git a/config/tests/fixtures/minimal_file_and_env.env b/iroha_config/tests/fixtures/minimal_file_and_env.env similarity index 100% rename from config/tests/fixtures/minimal_file_and_env.env rename to iroha_config/tests/fixtures/minimal_file_and_env.env diff --git a/config/tests/fixtures/minimal_file_and_env.toml b/iroha_config/tests/fixtures/minimal_file_and_env.toml similarity index 100% rename from config/tests/fixtures/minimal_file_and_env.toml rename to iroha_config/tests/fixtures/minimal_file_and_env.toml diff --git a/config/tests/fixtures/minimal_with_trusted_peers.toml b/iroha_config/tests/fixtures/minimal_with_trusted_peers.toml similarity index 100% rename from config/tests/fixtures/minimal_with_trusted_peers.toml rename to iroha_config/tests/fixtures/minimal_with_trusted_peers.toml From 4ec97f8d805469c2af6003985d8d9f03df60c4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 14:00:02 +0400 Subject: [PATCH 05/59] refactor: rename `core` directory to `iroha_core` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .gitignore | 2 +- Cargo.toml | 8 ++++---- README.md | 2 +- data_model/src/trigger.rs | 2 +- {core => iroha_core}/Cargo.toml | 0 {core => iroha_core}/benches/blocks/apply_blocks.rs | 0 .../benches/blocks/apply_blocks_benchmark.rs | 0 .../benches/blocks/apply_blocks_oneshot.rs | 0 {core => iroha_core}/benches/blocks/common.rs | 0 {core => iroha_core}/benches/blocks/validate_blocks.rs | 0 .../benches/blocks/validate_blocks_benchmark.rs | 0 .../benches/blocks/validate_blocks_oneshot.rs | 0 {core => iroha_core}/benches/kura.rs | 0 {core => iroha_core}/benches/validation.rs | 0 {core => iroha_core}/clippy.toml | 0 {core => iroha_core}/src/block.rs | 0 {core => iroha_core}/src/block_sync.rs | 0 {core => iroha_core}/src/executor.rs | 0 {core => iroha_core}/src/gossiper.rs | 0 {core => iroha_core}/src/kiso.rs | 0 {core => iroha_core}/src/kura.rs | 0 {core => iroha_core}/src/lib.rs | 0 {core => iroha_core}/src/metrics.rs | 0 {core => iroha_core}/src/query/cursor.rs | 0 {core => iroha_core}/src/query/mod.rs | 0 {core => iroha_core}/src/query/pagination.rs | 0 {core => iroha_core}/src/query/store.rs | 0 {core => iroha_core}/src/queue.rs | 0 {core => iroha_core}/src/smartcontracts/isi/account.rs | 0 {core => iroha_core}/src/smartcontracts/isi/asset.rs | 0 {core => iroha_core}/src/smartcontracts/isi/block.rs | 0 {core => iroha_core}/src/smartcontracts/isi/domain.rs | 0 {core => iroha_core}/src/smartcontracts/isi/mod.rs | 0 {core => iroha_core}/src/smartcontracts/isi/query.rs | 0 .../src/smartcontracts/isi/triggers/mod.rs | 0 .../src/smartcontracts/isi/triggers/set.rs | 0 .../src/smartcontracts/isi/triggers/specialized.rs | 0 {core => iroha_core}/src/smartcontracts/isi/tx.rs | 0 {core => iroha_core}/src/smartcontracts/isi/world.rs | 0 {core => iroha_core}/src/smartcontracts/mod.rs | 0 {core => iroha_core}/src/smartcontracts/wasm.rs | 0 {core => iroha_core}/src/snapshot.rs | 0 {core => iroha_core}/src/state.rs | 0 {core => iroha_core}/src/sumeragi/main_loop.rs | 0 {core => iroha_core}/src/sumeragi/message.rs | 0 {core => iroha_core}/src/sumeragi/mod.rs | 0 {core => iroha_core}/src/sumeragi/network_topology.rs | 0 {core => iroha_core}/src/sumeragi/view_change.rs | 0 {core => iroha_core}/src/tx.rs | 0 {core => iroha_core}/test_network/Cargo.toml | 0 {core => iroha_core}/test_network/src/lib.rs | 0 51 files changed, 7 insertions(+), 7 deletions(-) rename {core => iroha_core}/Cargo.toml (100%) rename {core => iroha_core}/benches/blocks/apply_blocks.rs (100%) rename {core => iroha_core}/benches/blocks/apply_blocks_benchmark.rs (100%) rename {core => iroha_core}/benches/blocks/apply_blocks_oneshot.rs (100%) rename {core => iroha_core}/benches/blocks/common.rs (100%) rename {core => iroha_core}/benches/blocks/validate_blocks.rs (100%) rename {core => iroha_core}/benches/blocks/validate_blocks_benchmark.rs (100%) rename {core => iroha_core}/benches/blocks/validate_blocks_oneshot.rs (100%) rename {core => iroha_core}/benches/kura.rs (100%) rename {core => iroha_core}/benches/validation.rs (100%) rename {core => iroha_core}/clippy.toml (100%) rename {core => iroha_core}/src/block.rs (100%) rename {core => iroha_core}/src/block_sync.rs (100%) rename {core => iroha_core}/src/executor.rs (100%) rename {core => iroha_core}/src/gossiper.rs (100%) rename {core => iroha_core}/src/kiso.rs (100%) rename {core => iroha_core}/src/kura.rs (100%) rename {core => iroha_core}/src/lib.rs (100%) rename {core => iroha_core}/src/metrics.rs (100%) rename {core => iroha_core}/src/query/cursor.rs (100%) rename {core => iroha_core}/src/query/mod.rs (100%) rename {core => iroha_core}/src/query/pagination.rs (100%) rename {core => iroha_core}/src/query/store.rs (100%) rename {core => iroha_core}/src/queue.rs (100%) rename {core => iroha_core}/src/smartcontracts/isi/account.rs (100%) rename {core => iroha_core}/src/smartcontracts/isi/asset.rs (100%) rename {core => iroha_core}/src/smartcontracts/isi/block.rs (100%) rename {core => iroha_core}/src/smartcontracts/isi/domain.rs (100%) rename {core => iroha_core}/src/smartcontracts/isi/mod.rs (100%) rename {core => iroha_core}/src/smartcontracts/isi/query.rs (100%) rename {core => iroha_core}/src/smartcontracts/isi/triggers/mod.rs (100%) rename {core => iroha_core}/src/smartcontracts/isi/triggers/set.rs (100%) rename {core => iroha_core}/src/smartcontracts/isi/triggers/specialized.rs (100%) rename {core => iroha_core}/src/smartcontracts/isi/tx.rs (100%) rename {core => iroha_core}/src/smartcontracts/isi/world.rs (100%) rename {core => iroha_core}/src/smartcontracts/mod.rs (100%) rename {core => iroha_core}/src/smartcontracts/wasm.rs (100%) rename {core => iroha_core}/src/snapshot.rs (100%) rename {core => iroha_core}/src/state.rs (100%) rename {core => iroha_core}/src/sumeragi/main_loop.rs (100%) rename {core => iroha_core}/src/sumeragi/message.rs (100%) rename {core => iroha_core}/src/sumeragi/mod.rs (100%) rename {core => iroha_core}/src/sumeragi/network_topology.rs (100%) rename {core => iroha_core}/src/sumeragi/view_change.rs (100%) rename {core => iroha_core}/src/tx.rs (100%) rename {core => iroha_core}/test_network/Cargo.toml (100%) rename {core => iroha_core}/test_network/src/lib.rs (100%) diff --git a/.gitignore b/.gitignore index d727e2d62a1..6bfee632416 100644 --- a/.gitignore +++ b/.gitignore @@ -32,7 +32,7 @@ CMakeFiles/* cmake-build-debu/* cmake-build-debug/* external/* -core/infra/protobuf +iroha_core/infra/protobuf include/generated/* .obsidian/ .scannerwork/ diff --git a/Cargo.toml b/Cargo.toml index f79b166532c..8175fdea848 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ keywords = ["blockchain", "crypto", "iroha", "ledger"] categories = ["cryptography::cryptocurrencies"] [workspace.dependencies] -iroha_core = { version = "=2.0.0-rc.1.0 ", path = "core" } +iroha_core = { version = "=2.0.0-rc.1.0 ", path = "iroha_core" } irohad = { version = "=2.0.0-rc.1.0", path = "irohad" } iroha_torii = { version = "=2.0.0-rc.1.0", path = "torii" } @@ -47,7 +47,7 @@ iroha_smart_contract_utils = { version = "=2.0.0-rc.1.0", path = "smart_contract iroha_executor = { version = "=2.0.0-rc.1.0", path = "executor" } iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "executor/data_model" } -test_network = { version = "=2.0.0-rc.1.0", path = "core/test_network" } +test_network = { version = "=2.0.0-rc.1.0", path = "iroha_core/test_network" } test_samples = { version = "=2.0.0-rc.1.0", path = "test_samples" } proc-macro2 = "1.0.86" @@ -199,8 +199,8 @@ members = [ "iroha_cli", "iroha_config", "iroha_config/base", - "core", - "core/test_network", + "iroha_core", + "iroha_core/test_network", "crypto", "data_model", "genesis", diff --git a/README.md b/README.md index b08db8277da..37541d62872 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Iroha project mainly consists of the following crates: * [`iroha`](iroha) provides a library for building clients that communicate with peers. * [`irohad`](irohad) is the command-line application for deploying an Iroha peer. Contains the routing table and definitions of API endpoints. * [`iroha_cli`](iroha_cli) is the command-line client, a reference application using the client SDK. -* [`iroha_core`](core) is the primary library used by all other crates, including the peer endpoint management. +* [`iroha_core`](iroha_core) is the primary library used by all other crates, including the peer endpoint management. * [`iroha_config`](iroha_config) handles configuration and documentation generation for options and run-time changes. * [`iroha_crypto`](crypto) defines cryptographic aspects of Iroha. * [`kagami`](tools/kagami) is used to generate cryptographic keys, default genesis, configuration reference, and schema. diff --git a/data_model/src/trigger.rs b/data_model/src/trigger.rs index 316755f5d95..34b6825fc01 100644 --- a/data_model/src/trigger.rs +++ b/data_model/src/trigger.rs @@ -1,6 +1,6 @@ //! Structures traits and impls related to `Trigger`s. -// If editing this file, consider updating `core/src/smartcontracts/isi/triggers/specialized.rs` +// If editing this file, consider updating `iroha_core/src/smartcontracts/isi/triggers/specialized.rs` // It mirrors structures from this file. #[cfg(not(feature = "std"))] diff --git a/core/Cargo.toml b/iroha_core/Cargo.toml similarity index 100% rename from core/Cargo.toml rename to iroha_core/Cargo.toml diff --git a/core/benches/blocks/apply_blocks.rs b/iroha_core/benches/blocks/apply_blocks.rs similarity index 100% rename from core/benches/blocks/apply_blocks.rs rename to iroha_core/benches/blocks/apply_blocks.rs diff --git a/core/benches/blocks/apply_blocks_benchmark.rs b/iroha_core/benches/blocks/apply_blocks_benchmark.rs similarity index 100% rename from core/benches/blocks/apply_blocks_benchmark.rs rename to iroha_core/benches/blocks/apply_blocks_benchmark.rs diff --git a/core/benches/blocks/apply_blocks_oneshot.rs b/iroha_core/benches/blocks/apply_blocks_oneshot.rs similarity index 100% rename from core/benches/blocks/apply_blocks_oneshot.rs rename to iroha_core/benches/blocks/apply_blocks_oneshot.rs diff --git a/core/benches/blocks/common.rs b/iroha_core/benches/blocks/common.rs similarity index 100% rename from core/benches/blocks/common.rs rename to iroha_core/benches/blocks/common.rs diff --git a/core/benches/blocks/validate_blocks.rs b/iroha_core/benches/blocks/validate_blocks.rs similarity index 100% rename from core/benches/blocks/validate_blocks.rs rename to iroha_core/benches/blocks/validate_blocks.rs diff --git a/core/benches/blocks/validate_blocks_benchmark.rs b/iroha_core/benches/blocks/validate_blocks_benchmark.rs similarity index 100% rename from core/benches/blocks/validate_blocks_benchmark.rs rename to iroha_core/benches/blocks/validate_blocks_benchmark.rs diff --git a/core/benches/blocks/validate_blocks_oneshot.rs b/iroha_core/benches/blocks/validate_blocks_oneshot.rs similarity index 100% rename from core/benches/blocks/validate_blocks_oneshot.rs rename to iroha_core/benches/blocks/validate_blocks_oneshot.rs diff --git a/core/benches/kura.rs b/iroha_core/benches/kura.rs similarity index 100% rename from core/benches/kura.rs rename to iroha_core/benches/kura.rs diff --git a/core/benches/validation.rs b/iroha_core/benches/validation.rs similarity index 100% rename from core/benches/validation.rs rename to iroha_core/benches/validation.rs diff --git a/core/clippy.toml b/iroha_core/clippy.toml similarity index 100% rename from core/clippy.toml rename to iroha_core/clippy.toml diff --git a/core/src/block.rs b/iroha_core/src/block.rs similarity index 100% rename from core/src/block.rs rename to iroha_core/src/block.rs diff --git a/core/src/block_sync.rs b/iroha_core/src/block_sync.rs similarity index 100% rename from core/src/block_sync.rs rename to iroha_core/src/block_sync.rs diff --git a/core/src/executor.rs b/iroha_core/src/executor.rs similarity index 100% rename from core/src/executor.rs rename to iroha_core/src/executor.rs diff --git a/core/src/gossiper.rs b/iroha_core/src/gossiper.rs similarity index 100% rename from core/src/gossiper.rs rename to iroha_core/src/gossiper.rs diff --git a/core/src/kiso.rs b/iroha_core/src/kiso.rs similarity index 100% rename from core/src/kiso.rs rename to iroha_core/src/kiso.rs diff --git a/core/src/kura.rs b/iroha_core/src/kura.rs similarity index 100% rename from core/src/kura.rs rename to iroha_core/src/kura.rs diff --git a/core/src/lib.rs b/iroha_core/src/lib.rs similarity index 100% rename from core/src/lib.rs rename to iroha_core/src/lib.rs diff --git a/core/src/metrics.rs b/iroha_core/src/metrics.rs similarity index 100% rename from core/src/metrics.rs rename to iroha_core/src/metrics.rs diff --git a/core/src/query/cursor.rs b/iroha_core/src/query/cursor.rs similarity index 100% rename from core/src/query/cursor.rs rename to iroha_core/src/query/cursor.rs diff --git a/core/src/query/mod.rs b/iroha_core/src/query/mod.rs similarity index 100% rename from core/src/query/mod.rs rename to iroha_core/src/query/mod.rs diff --git a/core/src/query/pagination.rs b/iroha_core/src/query/pagination.rs similarity index 100% rename from core/src/query/pagination.rs rename to iroha_core/src/query/pagination.rs diff --git a/core/src/query/store.rs b/iroha_core/src/query/store.rs similarity index 100% rename from core/src/query/store.rs rename to iroha_core/src/query/store.rs diff --git a/core/src/queue.rs b/iroha_core/src/queue.rs similarity index 100% rename from core/src/queue.rs rename to iroha_core/src/queue.rs diff --git a/core/src/smartcontracts/isi/account.rs b/iroha_core/src/smartcontracts/isi/account.rs similarity index 100% rename from core/src/smartcontracts/isi/account.rs rename to iroha_core/src/smartcontracts/isi/account.rs diff --git a/core/src/smartcontracts/isi/asset.rs b/iroha_core/src/smartcontracts/isi/asset.rs similarity index 100% rename from core/src/smartcontracts/isi/asset.rs rename to iroha_core/src/smartcontracts/isi/asset.rs diff --git a/core/src/smartcontracts/isi/block.rs b/iroha_core/src/smartcontracts/isi/block.rs similarity index 100% rename from core/src/smartcontracts/isi/block.rs rename to iroha_core/src/smartcontracts/isi/block.rs diff --git a/core/src/smartcontracts/isi/domain.rs b/iroha_core/src/smartcontracts/isi/domain.rs similarity index 100% rename from core/src/smartcontracts/isi/domain.rs rename to iroha_core/src/smartcontracts/isi/domain.rs diff --git a/core/src/smartcontracts/isi/mod.rs b/iroha_core/src/smartcontracts/isi/mod.rs similarity index 100% rename from core/src/smartcontracts/isi/mod.rs rename to iroha_core/src/smartcontracts/isi/mod.rs diff --git a/core/src/smartcontracts/isi/query.rs b/iroha_core/src/smartcontracts/isi/query.rs similarity index 100% rename from core/src/smartcontracts/isi/query.rs rename to iroha_core/src/smartcontracts/isi/query.rs diff --git a/core/src/smartcontracts/isi/triggers/mod.rs b/iroha_core/src/smartcontracts/isi/triggers/mod.rs similarity index 100% rename from core/src/smartcontracts/isi/triggers/mod.rs rename to iroha_core/src/smartcontracts/isi/triggers/mod.rs diff --git a/core/src/smartcontracts/isi/triggers/set.rs b/iroha_core/src/smartcontracts/isi/triggers/set.rs similarity index 100% rename from core/src/smartcontracts/isi/triggers/set.rs rename to iroha_core/src/smartcontracts/isi/triggers/set.rs diff --git a/core/src/smartcontracts/isi/triggers/specialized.rs b/iroha_core/src/smartcontracts/isi/triggers/specialized.rs similarity index 100% rename from core/src/smartcontracts/isi/triggers/specialized.rs rename to iroha_core/src/smartcontracts/isi/triggers/specialized.rs diff --git a/core/src/smartcontracts/isi/tx.rs b/iroha_core/src/smartcontracts/isi/tx.rs similarity index 100% rename from core/src/smartcontracts/isi/tx.rs rename to iroha_core/src/smartcontracts/isi/tx.rs diff --git a/core/src/smartcontracts/isi/world.rs b/iroha_core/src/smartcontracts/isi/world.rs similarity index 100% rename from core/src/smartcontracts/isi/world.rs rename to iroha_core/src/smartcontracts/isi/world.rs diff --git a/core/src/smartcontracts/mod.rs b/iroha_core/src/smartcontracts/mod.rs similarity index 100% rename from core/src/smartcontracts/mod.rs rename to iroha_core/src/smartcontracts/mod.rs diff --git a/core/src/smartcontracts/wasm.rs b/iroha_core/src/smartcontracts/wasm.rs similarity index 100% rename from core/src/smartcontracts/wasm.rs rename to iroha_core/src/smartcontracts/wasm.rs diff --git a/core/src/snapshot.rs b/iroha_core/src/snapshot.rs similarity index 100% rename from core/src/snapshot.rs rename to iroha_core/src/snapshot.rs diff --git a/core/src/state.rs b/iroha_core/src/state.rs similarity index 100% rename from core/src/state.rs rename to iroha_core/src/state.rs diff --git a/core/src/sumeragi/main_loop.rs b/iroha_core/src/sumeragi/main_loop.rs similarity index 100% rename from core/src/sumeragi/main_loop.rs rename to iroha_core/src/sumeragi/main_loop.rs diff --git a/core/src/sumeragi/message.rs b/iroha_core/src/sumeragi/message.rs similarity index 100% rename from core/src/sumeragi/message.rs rename to iroha_core/src/sumeragi/message.rs diff --git a/core/src/sumeragi/mod.rs b/iroha_core/src/sumeragi/mod.rs similarity index 100% rename from core/src/sumeragi/mod.rs rename to iroha_core/src/sumeragi/mod.rs diff --git a/core/src/sumeragi/network_topology.rs b/iroha_core/src/sumeragi/network_topology.rs similarity index 100% rename from core/src/sumeragi/network_topology.rs rename to iroha_core/src/sumeragi/network_topology.rs diff --git a/core/src/sumeragi/view_change.rs b/iroha_core/src/sumeragi/view_change.rs similarity index 100% rename from core/src/sumeragi/view_change.rs rename to iroha_core/src/sumeragi/view_change.rs diff --git a/core/src/tx.rs b/iroha_core/src/tx.rs similarity index 100% rename from core/src/tx.rs rename to iroha_core/src/tx.rs diff --git a/core/test_network/Cargo.toml b/iroha_core/test_network/Cargo.toml similarity index 100% rename from core/test_network/Cargo.toml rename to iroha_core/test_network/Cargo.toml diff --git a/core/test_network/src/lib.rs b/iroha_core/test_network/src/lib.rs similarity index 100% rename from core/test_network/src/lib.rs rename to iroha_core/test_network/src/lib.rs From 4d1c2e081550162b207c11c41af5f8eff29d4eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 14:01:51 +0400 Subject: [PATCH 06/59] refactor: rename `crypto` directory to `iroha_crypto` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 4 ++-- README.md | 2 +- {crypto => iroha_crypto}/Cargo.toml | 0 {crypto => iroha_crypto}/build.rs | 0 {crypto => iroha_crypto}/src/encryption/chacha20poly1305.rs | 0 {crypto => iroha_crypto}/src/encryption/mod.rs | 0 {crypto => iroha_crypto}/src/hash.rs | 0 {crypto => iroha_crypto}/src/kex/mod.rs | 0 {crypto => iroha_crypto}/src/kex/x25519.rs | 0 {crypto => iroha_crypto}/src/lib.rs | 0 {crypto => iroha_crypto}/src/merkle.rs | 0 {crypto => iroha_crypto}/src/multihash.rs | 0 {crypto => iroha_crypto}/src/secrecy.rs | 0 {crypto => iroha_crypto}/src/signature/bls/implementation.rs | 0 {crypto => iroha_crypto}/src/signature/bls/mod.rs | 0 {crypto => iroha_crypto}/src/signature/bls/tests.rs | 0 {crypto => iroha_crypto}/src/signature/ed25519.rs | 0 {crypto => iroha_crypto}/src/signature/mod.rs | 0 {crypto => iroha_crypto}/src/signature/secp256k1.rs | 0 {crypto => iroha_crypto}/src/varint.rs | 0 20 files changed, 3 insertions(+), 3 deletions(-) rename {crypto => iroha_crypto}/Cargo.toml (100%) rename {crypto => iroha_crypto}/build.rs (100%) rename {crypto => iroha_crypto}/src/encryption/chacha20poly1305.rs (100%) rename {crypto => iroha_crypto}/src/encryption/mod.rs (100%) rename {crypto => iroha_crypto}/src/hash.rs (100%) rename {crypto => iroha_crypto}/src/kex/mod.rs (100%) rename {crypto => iroha_crypto}/src/kex/x25519.rs (100%) rename {crypto => iroha_crypto}/src/lib.rs (100%) rename {crypto => iroha_crypto}/src/merkle.rs (100%) rename {crypto => iroha_crypto}/src/multihash.rs (100%) rename {crypto => iroha_crypto}/src/secrecy.rs (100%) rename {crypto => iroha_crypto}/src/signature/bls/implementation.rs (100%) rename {crypto => iroha_crypto}/src/signature/bls/mod.rs (100%) rename {crypto => iroha_crypto}/src/signature/bls/tests.rs (100%) rename {crypto => iroha_crypto}/src/signature/ed25519.rs (100%) rename {crypto => iroha_crypto}/src/signature/mod.rs (100%) rename {crypto => iroha_crypto}/src/signature/secp256k1.rs (100%) rename {crypto => iroha_crypto}/src/varint.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 8175fdea848..9f394e10da1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ iroha_config_base = { version = "=2.0.0-rc.1.0", path = "iroha_config/base" } iroha_schema_gen = { version = "=2.0.0-rc.1.0", path = "schema/gen" } iroha_schema = { version = "=2.0.0-rc.1.0", path = "schema", default-features = false } iroha_logger = { version = "=2.0.0-rc.1.0", path = "logger" } -iroha_crypto = { version = "=2.0.0-rc.1.0", path = "crypto", default-features = false } +iroha_crypto = { version = "=2.0.0-rc.1.0", path = "iroha_crypto", default-features = false } iroha_macro = { version = "=2.0.0-rc.1.0", path = "macro", default-features = false } iroha_futures = { version = "=2.0.0-rc.1.0", path = "futures" } iroha_genesis = { version = "=2.0.0-rc.1.0", path = "genesis" } @@ -201,7 +201,7 @@ members = [ "iroha_config/base", "iroha_core", "iroha_core/test_network", - "crypto", + "iroha_crypto", "data_model", "genesis", diff --git a/README.md b/README.md index 37541d62872..0ac9f882bc9 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ Iroha project mainly consists of the following crates: * [`iroha_cli`](iroha_cli) is the command-line client, a reference application using the client SDK. * [`iroha_core`](iroha_core) is the primary library used by all other crates, including the peer endpoint management. * [`iroha_config`](iroha_config) handles configuration and documentation generation for options and run-time changes. -* [`iroha_crypto`](crypto) defines cryptographic aspects of Iroha. +* [`iroha_crypto`](iroha_crypto) defines cryptographic aspects of Iroha. * [`kagami`](tools/kagami) is used to generate cryptographic keys, default genesis, configuration reference, and schema. * [`iroha_data_model`](data_model) defines common data models in Iroha. * [`iroha_futures`](futures) is used for `async` programming. diff --git a/crypto/Cargo.toml b/iroha_crypto/Cargo.toml similarity index 100% rename from crypto/Cargo.toml rename to iroha_crypto/Cargo.toml diff --git a/crypto/build.rs b/iroha_crypto/build.rs similarity index 100% rename from crypto/build.rs rename to iroha_crypto/build.rs diff --git a/crypto/src/encryption/chacha20poly1305.rs b/iroha_crypto/src/encryption/chacha20poly1305.rs similarity index 100% rename from crypto/src/encryption/chacha20poly1305.rs rename to iroha_crypto/src/encryption/chacha20poly1305.rs diff --git a/crypto/src/encryption/mod.rs b/iroha_crypto/src/encryption/mod.rs similarity index 100% rename from crypto/src/encryption/mod.rs rename to iroha_crypto/src/encryption/mod.rs diff --git a/crypto/src/hash.rs b/iroha_crypto/src/hash.rs similarity index 100% rename from crypto/src/hash.rs rename to iroha_crypto/src/hash.rs diff --git a/crypto/src/kex/mod.rs b/iroha_crypto/src/kex/mod.rs similarity index 100% rename from crypto/src/kex/mod.rs rename to iroha_crypto/src/kex/mod.rs diff --git a/crypto/src/kex/x25519.rs b/iroha_crypto/src/kex/x25519.rs similarity index 100% rename from crypto/src/kex/x25519.rs rename to iroha_crypto/src/kex/x25519.rs diff --git a/crypto/src/lib.rs b/iroha_crypto/src/lib.rs similarity index 100% rename from crypto/src/lib.rs rename to iroha_crypto/src/lib.rs diff --git a/crypto/src/merkle.rs b/iroha_crypto/src/merkle.rs similarity index 100% rename from crypto/src/merkle.rs rename to iroha_crypto/src/merkle.rs diff --git a/crypto/src/multihash.rs b/iroha_crypto/src/multihash.rs similarity index 100% rename from crypto/src/multihash.rs rename to iroha_crypto/src/multihash.rs diff --git a/crypto/src/secrecy.rs b/iroha_crypto/src/secrecy.rs similarity index 100% rename from crypto/src/secrecy.rs rename to iroha_crypto/src/secrecy.rs diff --git a/crypto/src/signature/bls/implementation.rs b/iroha_crypto/src/signature/bls/implementation.rs similarity index 100% rename from crypto/src/signature/bls/implementation.rs rename to iroha_crypto/src/signature/bls/implementation.rs diff --git a/crypto/src/signature/bls/mod.rs b/iroha_crypto/src/signature/bls/mod.rs similarity index 100% rename from crypto/src/signature/bls/mod.rs rename to iroha_crypto/src/signature/bls/mod.rs diff --git a/crypto/src/signature/bls/tests.rs b/iroha_crypto/src/signature/bls/tests.rs similarity index 100% rename from crypto/src/signature/bls/tests.rs rename to iroha_crypto/src/signature/bls/tests.rs diff --git a/crypto/src/signature/ed25519.rs b/iroha_crypto/src/signature/ed25519.rs similarity index 100% rename from crypto/src/signature/ed25519.rs rename to iroha_crypto/src/signature/ed25519.rs diff --git a/crypto/src/signature/mod.rs b/iroha_crypto/src/signature/mod.rs similarity index 100% rename from crypto/src/signature/mod.rs rename to iroha_crypto/src/signature/mod.rs diff --git a/crypto/src/signature/secp256k1.rs b/iroha_crypto/src/signature/secp256k1.rs similarity index 100% rename from crypto/src/signature/secp256k1.rs rename to iroha_crypto/src/signature/secp256k1.rs diff --git a/crypto/src/varint.rs b/iroha_crypto/src/varint.rs similarity index 100% rename from crypto/src/varint.rs rename to iroha_crypto/src/varint.rs From 8ac9e21829a99499793df63bdd4e6f425190d2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 14:06:16 +0400 Subject: [PATCH 07/59] refactor: rename `data_model` directory to `iroha_data_model` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .github/workflows/iroha2-dev-pr-wasm.yaml | 8 ++++---- Cargo.toml | 4 ++-- README.md | 2 +- {data_model => iroha_data_model}/Cargo.toml | 0 .../benches/time_event_filter.rs | 0 {data_model => iroha_data_model}/build.rs | 0 {data_model => iroha_data_model}/clippy.toml | 0 {data_model => iroha_data_model}/derive/Cargo.toml | 0 {data_model => iroha_data_model}/derive/src/enum_ref.rs | 0 {data_model => iroha_data_model}/derive/src/event_set.rs | 0 {data_model => iroha_data_model}/derive/src/has_origin.rs | 0 {data_model => iroha_data_model}/derive/src/id.rs | 0 {data_model => iroha_data_model}/derive/src/lib.rs | 2 +- {data_model => iroha_data_model}/derive/src/model.rs | 0 .../derive/src/partially_tagged/mod.rs | 0 .../derive/src/partially_tagged/resolve_self.rs | 0 .../derive/tests/event_set.rs | 0 .../derive/tests/has_origin.rs | 0 .../derive/tests/has_origin_generics.rs | 0 .../derive/tests/id_eq_ord_hash.rs | 0 .../derive/tests/partial_tagged_serde.rs | 0 .../derive/tests/partial_tagged_serde_self.rs | 0 {data_model => iroha_data_model}/derive/tests/ui.rs | 0 .../tests/ui_fail/has_origin_multiple_attributes.rs | 0 .../tests/ui_fail/has_origin_multiple_attributes.stderr | 0 .../derive/tests/ui_fail/transparent_api_private_field.rs | 0 .../tests/ui_fail/transparent_api_private_field.stderr | 0 .../derive/tests/ui_fail/transparent_api_private_item.rs | 0 .../tests/ui_fail/transparent_api_private_item.stderr | 0 {data_model => iroha_data_model}/src/account.rs | 0 {data_model => iroha_data_model}/src/asset.rs | 0 {data_model => iroha_data_model}/src/block.rs | 0 {data_model => iroha_data_model}/src/domain.rs | 0 .../src/events/data/events.rs | 0 .../src/events/data/filters.rs | 0 {data_model => iroha_data_model}/src/events/data/mod.rs | 0 .../src/events/execute_trigger.rs | 0 {data_model => iroha_data_model}/src/events/mod.rs | 0 {data_model => iroha_data_model}/src/events/pipeline.rs | 0 {data_model => iroha_data_model}/src/events/time.rs | 0 .../src/events/trigger_completed.rs | 0 {data_model => iroha_data_model}/src/executor.rs | 0 {data_model => iroha_data_model}/src/ipfs.rs | 0 {data_model => iroha_data_model}/src/isi.rs | 0 {data_model => iroha_data_model}/src/lib.rs | 0 {data_model => iroha_data_model}/src/metadata.rs | 0 {data_model => iroha_data_model}/src/name.rs | 0 {data_model => iroha_data_model}/src/parameter.rs | 0 {data_model => iroha_data_model}/src/peer.rs | 0 {data_model => iroha_data_model}/src/permission.rs | 0 {data_model => iroha_data_model}/src/query/builder.rs | 0 {data_model => iroha_data_model}/src/query/mod.rs | 0 {data_model => iroha_data_model}/src/query/parameters.rs | 0 .../src/query/predicate/mod.rs | 0 .../src/query/predicate/predicate_ast_extensions.rs | 0 .../src/query/predicate/predicate_atoms/account.rs | 0 .../src/query/predicate/predicate_atoms/asset.rs | 0 .../src/query/predicate/predicate_atoms/block.rs | 0 .../src/query/predicate/predicate_atoms/domain.rs | 0 .../src/query/predicate/predicate_atoms/mod.rs | 0 .../src/query/predicate/predicate_atoms/parameter.rs | 0 .../src/query/predicate/predicate_atoms/peer.rs | 0 .../src/query/predicate/predicate_atoms/permission.rs | 0 .../src/query/predicate/predicate_atoms/role.rs | 0 .../src/query/predicate/predicate_atoms/trigger.rs | 0 .../src/query/predicate/predicate_combinators.rs | 0 .../src/query/predicate/projectors.rs | 0 .../src/query/predicate/prototypes/account.rs | 0 .../src/query/predicate/prototypes/asset.rs | 0 .../src/query/predicate/prototypes/block.rs | 0 .../src/query/predicate/prototypes/domain.rs | 0 .../src/query/predicate/prototypes/mod.rs | 0 .../src/query/predicate/prototypes/parameter.rs | 0 .../src/query/predicate/prototypes/peer.rs | 0 .../src/query/predicate/prototypes/permission.rs | 0 .../src/query/predicate/prototypes/role.rs | 0 .../src/query/predicate/prototypes/trigger.rs | 0 {data_model => iroha_data_model}/src/role.rs | 0 {data_model => iroha_data_model}/src/smart_contract.rs | 0 {data_model => iroha_data_model}/src/transaction.rs | 0 {data_model => iroha_data_model}/src/trigger.rs | 0 {data_model => iroha_data_model}/src/visit.rs | 0 {data_model => iroha_data_model}/tests/data_model.rs | 0 wasm_samples/Cargo.toml | 2 +- 84 files changed, 9 insertions(+), 9 deletions(-) rename {data_model => iroha_data_model}/Cargo.toml (100%) rename {data_model => iroha_data_model}/benches/time_event_filter.rs (100%) rename {data_model => iroha_data_model}/build.rs (100%) rename {data_model => iroha_data_model}/clippy.toml (100%) rename {data_model => iroha_data_model}/derive/Cargo.toml (100%) rename {data_model => iroha_data_model}/derive/src/enum_ref.rs (100%) rename {data_model => iroha_data_model}/derive/src/event_set.rs (100%) rename {data_model => iroha_data_model}/derive/src/has_origin.rs (100%) rename {data_model => iroha_data_model}/derive/src/id.rs (100%) rename {data_model => iroha_data_model}/derive/src/lib.rs (99%) rename {data_model => iroha_data_model}/derive/src/model.rs (100%) rename {data_model => iroha_data_model}/derive/src/partially_tagged/mod.rs (100%) rename {data_model => iroha_data_model}/derive/src/partially_tagged/resolve_self.rs (100%) rename {data_model => iroha_data_model}/derive/tests/event_set.rs (100%) rename {data_model => iroha_data_model}/derive/tests/has_origin.rs (100%) rename {data_model => iroha_data_model}/derive/tests/has_origin_generics.rs (100%) rename {data_model => iroha_data_model}/derive/tests/id_eq_ord_hash.rs (100%) rename {data_model => iroha_data_model}/derive/tests/partial_tagged_serde.rs (100%) rename {data_model => iroha_data_model}/derive/tests/partial_tagged_serde_self.rs (100%) rename {data_model => iroha_data_model}/derive/tests/ui.rs (100%) rename {data_model => iroha_data_model}/derive/tests/ui_fail/has_origin_multiple_attributes.rs (100%) rename {data_model => iroha_data_model}/derive/tests/ui_fail/has_origin_multiple_attributes.stderr (100%) rename {data_model => iroha_data_model}/derive/tests/ui_fail/transparent_api_private_field.rs (100%) rename {data_model => iroha_data_model}/derive/tests/ui_fail/transparent_api_private_field.stderr (100%) rename {data_model => iroha_data_model}/derive/tests/ui_fail/transparent_api_private_item.rs (100%) rename {data_model => iroha_data_model}/derive/tests/ui_fail/transparent_api_private_item.stderr (100%) rename {data_model => iroha_data_model}/src/account.rs (100%) rename {data_model => iroha_data_model}/src/asset.rs (100%) rename {data_model => iroha_data_model}/src/block.rs (100%) rename {data_model => iroha_data_model}/src/domain.rs (100%) rename {data_model => iroha_data_model}/src/events/data/events.rs (100%) rename {data_model => iroha_data_model}/src/events/data/filters.rs (100%) rename {data_model => iroha_data_model}/src/events/data/mod.rs (100%) rename {data_model => iroha_data_model}/src/events/execute_trigger.rs (100%) rename {data_model => iroha_data_model}/src/events/mod.rs (100%) rename {data_model => iroha_data_model}/src/events/pipeline.rs (100%) rename {data_model => iroha_data_model}/src/events/time.rs (100%) rename {data_model => iroha_data_model}/src/events/trigger_completed.rs (100%) rename {data_model => iroha_data_model}/src/executor.rs (100%) rename {data_model => iroha_data_model}/src/ipfs.rs (100%) rename {data_model => iroha_data_model}/src/isi.rs (100%) rename {data_model => iroha_data_model}/src/lib.rs (100%) rename {data_model => iroha_data_model}/src/metadata.rs (100%) rename {data_model => iroha_data_model}/src/name.rs (100%) rename {data_model => iroha_data_model}/src/parameter.rs (100%) rename {data_model => iroha_data_model}/src/peer.rs (100%) rename {data_model => iroha_data_model}/src/permission.rs (100%) rename {data_model => iroha_data_model}/src/query/builder.rs (100%) rename {data_model => iroha_data_model}/src/query/mod.rs (100%) rename {data_model => iroha_data_model}/src/query/parameters.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/mod.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/predicate_ast_extensions.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/predicate_atoms/account.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/predicate_atoms/asset.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/predicate_atoms/block.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/predicate_atoms/domain.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/predicate_atoms/mod.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/predicate_atoms/parameter.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/predicate_atoms/peer.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/predicate_atoms/permission.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/predicate_atoms/role.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/predicate_atoms/trigger.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/predicate_combinators.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/projectors.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/prototypes/account.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/prototypes/asset.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/prototypes/block.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/prototypes/domain.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/prototypes/mod.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/prototypes/parameter.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/prototypes/peer.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/prototypes/permission.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/prototypes/role.rs (100%) rename {data_model => iroha_data_model}/src/query/predicate/prototypes/trigger.rs (100%) rename {data_model => iroha_data_model}/src/role.rs (100%) rename {data_model => iroha_data_model}/src/smart_contract.rs (100%) rename {data_model => iroha_data_model}/src/transaction.rs (100%) rename {data_model => iroha_data_model}/src/trigger.rs (100%) rename {data_model => iroha_data_model}/src/visit.rs (100%) rename {data_model => iroha_data_model}/tests/data_model.rs (100%) diff --git a/.github/workflows/iroha2-dev-pr-wasm.yaml b/.github/workflows/iroha2-dev-pr-wasm.yaml index f977092f3d4..66f82f5fada 100644 --- a/.github/workflows/iroha2-dev-pr-wasm.yaml +++ b/.github/workflows/iroha2-dev-pr-wasm.yaml @@ -4,10 +4,10 @@ on: pull_request: branches: [main] paths: - - 'data_model/**.rs' - - 'data_model/**.yml' - - 'data_model/**.json' - - 'data_model/**.toml' + - '../../iroha_data_model/**.rs' + - '../../iroha_data_model/**.yml' + - '../../iroha_data_model/**.json' + - '../../iroha_data_model/**.toml' - 'smart_contract/**.rs' - 'smart_contract/**.yml' diff --git a/Cargo.toml b/Cargo.toml index 9f394e10da1..a887d72b3be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ iroha_macro_utils = { version = "=2.0.0-rc.1.0", path = "macro/utils" } iroha_telemetry = { version = "=2.0.0-rc.1.0", path = "telemetry" } iroha_p2p = { version = "=2.0.0-rc.1.0", path = "p2p" } iroha_primitives = { version = "=2.0.0-rc.1.0", path = "primitives", default-features = false } -iroha_data_model = { version = "=2.0.0-rc.1.0", path = "data_model", default-features = false } +iroha_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_data_model", default-features = false } iroha_config = { version = "=2.0.0-rc.1.0", path = "iroha_config" } iroha_config_base = { version = "=2.0.0-rc.1.0", path = "iroha_config/base" } iroha_schema_gen = { version = "=2.0.0-rc.1.0", path = "schema/gen" } @@ -202,7 +202,7 @@ members = [ "iroha_core", "iroha_core/test_network", "iroha_crypto", - "data_model", + "iroha_data_model", "genesis", "logger", diff --git a/README.md b/README.md index 0ac9f882bc9..67bb8f43bd4 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ Iroha project mainly consists of the following crates: * [`iroha_config`](iroha_config) handles configuration and documentation generation for options and run-time changes. * [`iroha_crypto`](iroha_crypto) defines cryptographic aspects of Iroha. * [`kagami`](tools/kagami) is used to generate cryptographic keys, default genesis, configuration reference, and schema. -* [`iroha_data_model`](data_model) defines common data models in Iroha. +* [`iroha_data_model`](iroha_data_model) defines common data models in Iroha. * [`iroha_futures`](futures) is used for `async` programming. * [`iroha_logger`](logger) uses `tracing` to provide logging facilities. * [`iroha_macro`](macro) provides the convenience macros. diff --git a/data_model/Cargo.toml b/iroha_data_model/Cargo.toml similarity index 100% rename from data_model/Cargo.toml rename to iroha_data_model/Cargo.toml diff --git a/data_model/benches/time_event_filter.rs b/iroha_data_model/benches/time_event_filter.rs similarity index 100% rename from data_model/benches/time_event_filter.rs rename to iroha_data_model/benches/time_event_filter.rs diff --git a/data_model/build.rs b/iroha_data_model/build.rs similarity index 100% rename from data_model/build.rs rename to iroha_data_model/build.rs diff --git a/data_model/clippy.toml b/iroha_data_model/clippy.toml similarity index 100% rename from data_model/clippy.toml rename to iroha_data_model/clippy.toml diff --git a/data_model/derive/Cargo.toml b/iroha_data_model/derive/Cargo.toml similarity index 100% rename from data_model/derive/Cargo.toml rename to iroha_data_model/derive/Cargo.toml diff --git a/data_model/derive/src/enum_ref.rs b/iroha_data_model/derive/src/enum_ref.rs similarity index 100% rename from data_model/derive/src/enum_ref.rs rename to iroha_data_model/derive/src/enum_ref.rs diff --git a/data_model/derive/src/event_set.rs b/iroha_data_model/derive/src/event_set.rs similarity index 100% rename from data_model/derive/src/event_set.rs rename to iroha_data_model/derive/src/event_set.rs diff --git a/data_model/derive/src/has_origin.rs b/iroha_data_model/derive/src/has_origin.rs similarity index 100% rename from data_model/derive/src/has_origin.rs rename to iroha_data_model/derive/src/has_origin.rs diff --git a/data_model/derive/src/id.rs b/iroha_data_model/derive/src/id.rs similarity index 100% rename from data_model/derive/src/id.rs rename to iroha_data_model/derive/src/id.rs diff --git a/data_model/derive/src/lib.rs b/iroha_data_model/derive/src/lib.rs similarity index 99% rename from data_model/derive/src/lib.rs rename to iroha_data_model/derive/src/lib.rs index 2ecf9314397..f125baa2a0f 100644 --- a/data_model/derive/src/lib.rs +++ b/iroha_data_model/derive/src/lib.rs @@ -1,4 +1,4 @@ -//! A crate containing various derive macros for `data_model` +//! A crate containing various derive macros for `iroha_data_model` mod enum_ref; mod event_set; mod has_origin; diff --git a/data_model/derive/src/model.rs b/iroha_data_model/derive/src/model.rs similarity index 100% rename from data_model/derive/src/model.rs rename to iroha_data_model/derive/src/model.rs diff --git a/data_model/derive/src/partially_tagged/mod.rs b/iroha_data_model/derive/src/partially_tagged/mod.rs similarity index 100% rename from data_model/derive/src/partially_tagged/mod.rs rename to iroha_data_model/derive/src/partially_tagged/mod.rs diff --git a/data_model/derive/src/partially_tagged/resolve_self.rs b/iroha_data_model/derive/src/partially_tagged/resolve_self.rs similarity index 100% rename from data_model/derive/src/partially_tagged/resolve_self.rs rename to iroha_data_model/derive/src/partially_tagged/resolve_self.rs diff --git a/data_model/derive/tests/event_set.rs b/iroha_data_model/derive/tests/event_set.rs similarity index 100% rename from data_model/derive/tests/event_set.rs rename to iroha_data_model/derive/tests/event_set.rs diff --git a/data_model/derive/tests/has_origin.rs b/iroha_data_model/derive/tests/has_origin.rs similarity index 100% rename from data_model/derive/tests/has_origin.rs rename to iroha_data_model/derive/tests/has_origin.rs diff --git a/data_model/derive/tests/has_origin_generics.rs b/iroha_data_model/derive/tests/has_origin_generics.rs similarity index 100% rename from data_model/derive/tests/has_origin_generics.rs rename to iroha_data_model/derive/tests/has_origin_generics.rs diff --git a/data_model/derive/tests/id_eq_ord_hash.rs b/iroha_data_model/derive/tests/id_eq_ord_hash.rs similarity index 100% rename from data_model/derive/tests/id_eq_ord_hash.rs rename to iroha_data_model/derive/tests/id_eq_ord_hash.rs diff --git a/data_model/derive/tests/partial_tagged_serde.rs b/iroha_data_model/derive/tests/partial_tagged_serde.rs similarity index 100% rename from data_model/derive/tests/partial_tagged_serde.rs rename to iroha_data_model/derive/tests/partial_tagged_serde.rs diff --git a/data_model/derive/tests/partial_tagged_serde_self.rs b/iroha_data_model/derive/tests/partial_tagged_serde_self.rs similarity index 100% rename from data_model/derive/tests/partial_tagged_serde_self.rs rename to iroha_data_model/derive/tests/partial_tagged_serde_self.rs diff --git a/data_model/derive/tests/ui.rs b/iroha_data_model/derive/tests/ui.rs similarity index 100% rename from data_model/derive/tests/ui.rs rename to iroha_data_model/derive/tests/ui.rs diff --git a/data_model/derive/tests/ui_fail/has_origin_multiple_attributes.rs b/iroha_data_model/derive/tests/ui_fail/has_origin_multiple_attributes.rs similarity index 100% rename from data_model/derive/tests/ui_fail/has_origin_multiple_attributes.rs rename to iroha_data_model/derive/tests/ui_fail/has_origin_multiple_attributes.rs diff --git a/data_model/derive/tests/ui_fail/has_origin_multiple_attributes.stderr b/iroha_data_model/derive/tests/ui_fail/has_origin_multiple_attributes.stderr similarity index 100% rename from data_model/derive/tests/ui_fail/has_origin_multiple_attributes.stderr rename to iroha_data_model/derive/tests/ui_fail/has_origin_multiple_attributes.stderr diff --git a/data_model/derive/tests/ui_fail/transparent_api_private_field.rs b/iroha_data_model/derive/tests/ui_fail/transparent_api_private_field.rs similarity index 100% rename from data_model/derive/tests/ui_fail/transparent_api_private_field.rs rename to iroha_data_model/derive/tests/ui_fail/transparent_api_private_field.rs diff --git a/data_model/derive/tests/ui_fail/transparent_api_private_field.stderr b/iroha_data_model/derive/tests/ui_fail/transparent_api_private_field.stderr similarity index 100% rename from data_model/derive/tests/ui_fail/transparent_api_private_field.stderr rename to iroha_data_model/derive/tests/ui_fail/transparent_api_private_field.stderr diff --git a/data_model/derive/tests/ui_fail/transparent_api_private_item.rs b/iroha_data_model/derive/tests/ui_fail/transparent_api_private_item.rs similarity index 100% rename from data_model/derive/tests/ui_fail/transparent_api_private_item.rs rename to iroha_data_model/derive/tests/ui_fail/transparent_api_private_item.rs diff --git a/data_model/derive/tests/ui_fail/transparent_api_private_item.stderr b/iroha_data_model/derive/tests/ui_fail/transparent_api_private_item.stderr similarity index 100% rename from data_model/derive/tests/ui_fail/transparent_api_private_item.stderr rename to iroha_data_model/derive/tests/ui_fail/transparent_api_private_item.stderr diff --git a/data_model/src/account.rs b/iroha_data_model/src/account.rs similarity index 100% rename from data_model/src/account.rs rename to iroha_data_model/src/account.rs diff --git a/data_model/src/asset.rs b/iroha_data_model/src/asset.rs similarity index 100% rename from data_model/src/asset.rs rename to iroha_data_model/src/asset.rs diff --git a/data_model/src/block.rs b/iroha_data_model/src/block.rs similarity index 100% rename from data_model/src/block.rs rename to iroha_data_model/src/block.rs diff --git a/data_model/src/domain.rs b/iroha_data_model/src/domain.rs similarity index 100% rename from data_model/src/domain.rs rename to iroha_data_model/src/domain.rs diff --git a/data_model/src/events/data/events.rs b/iroha_data_model/src/events/data/events.rs similarity index 100% rename from data_model/src/events/data/events.rs rename to iroha_data_model/src/events/data/events.rs diff --git a/data_model/src/events/data/filters.rs b/iroha_data_model/src/events/data/filters.rs similarity index 100% rename from data_model/src/events/data/filters.rs rename to iroha_data_model/src/events/data/filters.rs diff --git a/data_model/src/events/data/mod.rs b/iroha_data_model/src/events/data/mod.rs similarity index 100% rename from data_model/src/events/data/mod.rs rename to iroha_data_model/src/events/data/mod.rs diff --git a/data_model/src/events/execute_trigger.rs b/iroha_data_model/src/events/execute_trigger.rs similarity index 100% rename from data_model/src/events/execute_trigger.rs rename to iroha_data_model/src/events/execute_trigger.rs diff --git a/data_model/src/events/mod.rs b/iroha_data_model/src/events/mod.rs similarity index 100% rename from data_model/src/events/mod.rs rename to iroha_data_model/src/events/mod.rs diff --git a/data_model/src/events/pipeline.rs b/iroha_data_model/src/events/pipeline.rs similarity index 100% rename from data_model/src/events/pipeline.rs rename to iroha_data_model/src/events/pipeline.rs diff --git a/data_model/src/events/time.rs b/iroha_data_model/src/events/time.rs similarity index 100% rename from data_model/src/events/time.rs rename to iroha_data_model/src/events/time.rs diff --git a/data_model/src/events/trigger_completed.rs b/iroha_data_model/src/events/trigger_completed.rs similarity index 100% rename from data_model/src/events/trigger_completed.rs rename to iroha_data_model/src/events/trigger_completed.rs diff --git a/data_model/src/executor.rs b/iroha_data_model/src/executor.rs similarity index 100% rename from data_model/src/executor.rs rename to iroha_data_model/src/executor.rs diff --git a/data_model/src/ipfs.rs b/iroha_data_model/src/ipfs.rs similarity index 100% rename from data_model/src/ipfs.rs rename to iroha_data_model/src/ipfs.rs diff --git a/data_model/src/isi.rs b/iroha_data_model/src/isi.rs similarity index 100% rename from data_model/src/isi.rs rename to iroha_data_model/src/isi.rs diff --git a/data_model/src/lib.rs b/iroha_data_model/src/lib.rs similarity index 100% rename from data_model/src/lib.rs rename to iroha_data_model/src/lib.rs diff --git a/data_model/src/metadata.rs b/iroha_data_model/src/metadata.rs similarity index 100% rename from data_model/src/metadata.rs rename to iroha_data_model/src/metadata.rs diff --git a/data_model/src/name.rs b/iroha_data_model/src/name.rs similarity index 100% rename from data_model/src/name.rs rename to iroha_data_model/src/name.rs diff --git a/data_model/src/parameter.rs b/iroha_data_model/src/parameter.rs similarity index 100% rename from data_model/src/parameter.rs rename to iroha_data_model/src/parameter.rs diff --git a/data_model/src/peer.rs b/iroha_data_model/src/peer.rs similarity index 100% rename from data_model/src/peer.rs rename to iroha_data_model/src/peer.rs diff --git a/data_model/src/permission.rs b/iroha_data_model/src/permission.rs similarity index 100% rename from data_model/src/permission.rs rename to iroha_data_model/src/permission.rs diff --git a/data_model/src/query/builder.rs b/iroha_data_model/src/query/builder.rs similarity index 100% rename from data_model/src/query/builder.rs rename to iroha_data_model/src/query/builder.rs diff --git a/data_model/src/query/mod.rs b/iroha_data_model/src/query/mod.rs similarity index 100% rename from data_model/src/query/mod.rs rename to iroha_data_model/src/query/mod.rs diff --git a/data_model/src/query/parameters.rs b/iroha_data_model/src/query/parameters.rs similarity index 100% rename from data_model/src/query/parameters.rs rename to iroha_data_model/src/query/parameters.rs diff --git a/data_model/src/query/predicate/mod.rs b/iroha_data_model/src/query/predicate/mod.rs similarity index 100% rename from data_model/src/query/predicate/mod.rs rename to iroha_data_model/src/query/predicate/mod.rs diff --git a/data_model/src/query/predicate/predicate_ast_extensions.rs b/iroha_data_model/src/query/predicate/predicate_ast_extensions.rs similarity index 100% rename from data_model/src/query/predicate/predicate_ast_extensions.rs rename to iroha_data_model/src/query/predicate/predicate_ast_extensions.rs diff --git a/data_model/src/query/predicate/predicate_atoms/account.rs b/iroha_data_model/src/query/predicate/predicate_atoms/account.rs similarity index 100% rename from data_model/src/query/predicate/predicate_atoms/account.rs rename to iroha_data_model/src/query/predicate/predicate_atoms/account.rs diff --git a/data_model/src/query/predicate/predicate_atoms/asset.rs b/iroha_data_model/src/query/predicate/predicate_atoms/asset.rs similarity index 100% rename from data_model/src/query/predicate/predicate_atoms/asset.rs rename to iroha_data_model/src/query/predicate/predicate_atoms/asset.rs diff --git a/data_model/src/query/predicate/predicate_atoms/block.rs b/iroha_data_model/src/query/predicate/predicate_atoms/block.rs similarity index 100% rename from data_model/src/query/predicate/predicate_atoms/block.rs rename to iroha_data_model/src/query/predicate/predicate_atoms/block.rs diff --git a/data_model/src/query/predicate/predicate_atoms/domain.rs b/iroha_data_model/src/query/predicate/predicate_atoms/domain.rs similarity index 100% rename from data_model/src/query/predicate/predicate_atoms/domain.rs rename to iroha_data_model/src/query/predicate/predicate_atoms/domain.rs diff --git a/data_model/src/query/predicate/predicate_atoms/mod.rs b/iroha_data_model/src/query/predicate/predicate_atoms/mod.rs similarity index 100% rename from data_model/src/query/predicate/predicate_atoms/mod.rs rename to iroha_data_model/src/query/predicate/predicate_atoms/mod.rs diff --git a/data_model/src/query/predicate/predicate_atoms/parameter.rs b/iroha_data_model/src/query/predicate/predicate_atoms/parameter.rs similarity index 100% rename from data_model/src/query/predicate/predicate_atoms/parameter.rs rename to iroha_data_model/src/query/predicate/predicate_atoms/parameter.rs diff --git a/data_model/src/query/predicate/predicate_atoms/peer.rs b/iroha_data_model/src/query/predicate/predicate_atoms/peer.rs similarity index 100% rename from data_model/src/query/predicate/predicate_atoms/peer.rs rename to iroha_data_model/src/query/predicate/predicate_atoms/peer.rs diff --git a/data_model/src/query/predicate/predicate_atoms/permission.rs b/iroha_data_model/src/query/predicate/predicate_atoms/permission.rs similarity index 100% rename from data_model/src/query/predicate/predicate_atoms/permission.rs rename to iroha_data_model/src/query/predicate/predicate_atoms/permission.rs diff --git a/data_model/src/query/predicate/predicate_atoms/role.rs b/iroha_data_model/src/query/predicate/predicate_atoms/role.rs similarity index 100% rename from data_model/src/query/predicate/predicate_atoms/role.rs rename to iroha_data_model/src/query/predicate/predicate_atoms/role.rs diff --git a/data_model/src/query/predicate/predicate_atoms/trigger.rs b/iroha_data_model/src/query/predicate/predicate_atoms/trigger.rs similarity index 100% rename from data_model/src/query/predicate/predicate_atoms/trigger.rs rename to iroha_data_model/src/query/predicate/predicate_atoms/trigger.rs diff --git a/data_model/src/query/predicate/predicate_combinators.rs b/iroha_data_model/src/query/predicate/predicate_combinators.rs similarity index 100% rename from data_model/src/query/predicate/predicate_combinators.rs rename to iroha_data_model/src/query/predicate/predicate_combinators.rs diff --git a/data_model/src/query/predicate/projectors.rs b/iroha_data_model/src/query/predicate/projectors.rs similarity index 100% rename from data_model/src/query/predicate/projectors.rs rename to iroha_data_model/src/query/predicate/projectors.rs diff --git a/data_model/src/query/predicate/prototypes/account.rs b/iroha_data_model/src/query/predicate/prototypes/account.rs similarity index 100% rename from data_model/src/query/predicate/prototypes/account.rs rename to iroha_data_model/src/query/predicate/prototypes/account.rs diff --git a/data_model/src/query/predicate/prototypes/asset.rs b/iroha_data_model/src/query/predicate/prototypes/asset.rs similarity index 100% rename from data_model/src/query/predicate/prototypes/asset.rs rename to iroha_data_model/src/query/predicate/prototypes/asset.rs diff --git a/data_model/src/query/predicate/prototypes/block.rs b/iroha_data_model/src/query/predicate/prototypes/block.rs similarity index 100% rename from data_model/src/query/predicate/prototypes/block.rs rename to iroha_data_model/src/query/predicate/prototypes/block.rs diff --git a/data_model/src/query/predicate/prototypes/domain.rs b/iroha_data_model/src/query/predicate/prototypes/domain.rs similarity index 100% rename from data_model/src/query/predicate/prototypes/domain.rs rename to iroha_data_model/src/query/predicate/prototypes/domain.rs diff --git a/data_model/src/query/predicate/prototypes/mod.rs b/iroha_data_model/src/query/predicate/prototypes/mod.rs similarity index 100% rename from data_model/src/query/predicate/prototypes/mod.rs rename to iroha_data_model/src/query/predicate/prototypes/mod.rs diff --git a/data_model/src/query/predicate/prototypes/parameter.rs b/iroha_data_model/src/query/predicate/prototypes/parameter.rs similarity index 100% rename from data_model/src/query/predicate/prototypes/parameter.rs rename to iroha_data_model/src/query/predicate/prototypes/parameter.rs diff --git a/data_model/src/query/predicate/prototypes/peer.rs b/iroha_data_model/src/query/predicate/prototypes/peer.rs similarity index 100% rename from data_model/src/query/predicate/prototypes/peer.rs rename to iroha_data_model/src/query/predicate/prototypes/peer.rs diff --git a/data_model/src/query/predicate/prototypes/permission.rs b/iroha_data_model/src/query/predicate/prototypes/permission.rs similarity index 100% rename from data_model/src/query/predicate/prototypes/permission.rs rename to iroha_data_model/src/query/predicate/prototypes/permission.rs diff --git a/data_model/src/query/predicate/prototypes/role.rs b/iroha_data_model/src/query/predicate/prototypes/role.rs similarity index 100% rename from data_model/src/query/predicate/prototypes/role.rs rename to iroha_data_model/src/query/predicate/prototypes/role.rs diff --git a/data_model/src/query/predicate/prototypes/trigger.rs b/iroha_data_model/src/query/predicate/prototypes/trigger.rs similarity index 100% rename from data_model/src/query/predicate/prototypes/trigger.rs rename to iroha_data_model/src/query/predicate/prototypes/trigger.rs diff --git a/data_model/src/role.rs b/iroha_data_model/src/role.rs similarity index 100% rename from data_model/src/role.rs rename to iroha_data_model/src/role.rs diff --git a/data_model/src/smart_contract.rs b/iroha_data_model/src/smart_contract.rs similarity index 100% rename from data_model/src/smart_contract.rs rename to iroha_data_model/src/smart_contract.rs diff --git a/data_model/src/transaction.rs b/iroha_data_model/src/transaction.rs similarity index 100% rename from data_model/src/transaction.rs rename to iroha_data_model/src/transaction.rs diff --git a/data_model/src/trigger.rs b/iroha_data_model/src/trigger.rs similarity index 100% rename from data_model/src/trigger.rs rename to iroha_data_model/src/trigger.rs diff --git a/data_model/src/visit.rs b/iroha_data_model/src/visit.rs similarity index 100% rename from data_model/src/visit.rs rename to iroha_data_model/src/visit.rs diff --git a/data_model/tests/data_model.rs b/iroha_data_model/tests/data_model.rs similarity index 100% rename from data_model/tests/data_model.rs rename to iroha_data_model/tests/data_model.rs diff --git a/wasm_samples/Cargo.toml b/wasm_samples/Cargo.toml index e7f951d88de..9139f91b50e 100644 --- a/wasm_samples/Cargo.toml +++ b/wasm_samples/Cargo.toml @@ -44,7 +44,7 @@ iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "../smart_contract", iroha_trigger = { version = "=2.0.0-rc.1.0", path = "../trigger", features = ["debug"] } iroha_executor = { version = "=2.0.0-rc.1.0", path = "../executor", features = ["debug"] } iroha_schema = { version = "=2.0.0-rc.1.0", path = "../schema" } -iroha_data_model = { version = "=2.0.0-rc.1.0", path = "../data_model", default-features = false } +iroha_data_model = { version = "=2.0.0-rc.1.0", path = "../iroha_data_model", default-features = false } iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "../executor/data_model" } parity-scale-codec = { version = "3.2.1", default-features = false } From a07ef6b69f997c6b2e774f14068c91ec20abf723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 14:08:37 +0400 Subject: [PATCH 08/59] refactor: rename `futures` directory to `iroha_futures` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 7 +++---- README.md | 2 +- {futures => iroha_futures}/Cargo.toml | 0 {futures => iroha_futures}/derive/Cargo.toml | 0 {futures => iroha_futures}/derive/src/lib.rs | 3 ++- {futures => iroha_futures}/src/lib.rs | 0 {futures => iroha_futures}/src/supervisor.rs | 0 {futures => iroha_futures}/tests/basic.rs | 0 8 files changed, 6 insertions(+), 6 deletions(-) rename {futures => iroha_futures}/Cargo.toml (100%) rename {futures => iroha_futures}/derive/Cargo.toml (100%) rename {futures => iroha_futures}/derive/src/lib.rs (97%) rename {futures => iroha_futures}/src/lib.rs (100%) rename {futures => iroha_futures}/src/supervisor.rs (100%) rename {futures => iroha_futures}/tests/basic.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index a887d72b3be..78bfe4ad744 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ iroha_schema = { version = "=2.0.0-rc.1.0", path = "schema", default-features = iroha_logger = { version = "=2.0.0-rc.1.0", path = "logger" } iroha_crypto = { version = "=2.0.0-rc.1.0", path = "iroha_crypto", default-features = false } iroha_macro = { version = "=2.0.0-rc.1.0", path = "macro", default-features = false } -iroha_futures = { version = "=2.0.0-rc.1.0", path = "futures" } +iroha_futures = { version = "=2.0.0-rc.1.0", path = "iroha_futures" } iroha_genesis = { version = "=2.0.0-rc.1.0", path = "genesis" } iroha_ffi = { version = "=2.0.0-rc.1.0", path = "ffi" } iroha_version = { version = "=2.0.0-rc.1.0", path = "version", default-features = false } @@ -207,9 +207,8 @@ members = [ "logger", "p2p", - - "futures", - "futures/derive", + "iroha_futures", + "iroha_futures/derive", "primitives", "primitives/derive", diff --git a/README.md b/README.md index 67bb8f43bd4..6112a3c1370 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ Iroha project mainly consists of the following crates: * [`iroha_crypto`](iroha_crypto) defines cryptographic aspects of Iroha. * [`kagami`](tools/kagami) is used to generate cryptographic keys, default genesis, configuration reference, and schema. * [`iroha_data_model`](iroha_data_model) defines common data models in Iroha. -* [`iroha_futures`](futures) is used for `async` programming. +* [`iroha_futures`](iroha_futures) is used for `async` programming. * [`iroha_logger`](logger) uses `tracing` to provide logging facilities. * [`iroha_macro`](macro) provides the convenience macros. * [`iroha_p2p`](p2p) defines peer creation and handshake logic. diff --git a/futures/Cargo.toml b/iroha_futures/Cargo.toml similarity index 100% rename from futures/Cargo.toml rename to iroha_futures/Cargo.toml diff --git a/futures/derive/Cargo.toml b/iroha_futures/derive/Cargo.toml similarity index 100% rename from futures/derive/Cargo.toml rename to iroha_futures/derive/Cargo.toml diff --git a/futures/derive/src/lib.rs b/iroha_futures/derive/src/lib.rs similarity index 97% rename from futures/derive/src/lib.rs rename to iroha_futures/derive/src/lib.rs index 924f0ce1787..4e4f3e1e087 100644 --- a/futures/derive/src/lib.rs +++ b/iroha_futures/derive/src/lib.rs @@ -1,4 +1,5 @@ -//! Crate with derive macros for futures +//! Crate with derive macros for `iroha_futures` + use iroha_macro_utils::Emitter; use manyhow::{emit, manyhow}; use proc_macro2::TokenStream; diff --git a/futures/src/lib.rs b/iroha_futures/src/lib.rs similarity index 100% rename from futures/src/lib.rs rename to iroha_futures/src/lib.rs diff --git a/futures/src/supervisor.rs b/iroha_futures/src/supervisor.rs similarity index 100% rename from futures/src/supervisor.rs rename to iroha_futures/src/supervisor.rs diff --git a/futures/tests/basic.rs b/iroha_futures/tests/basic.rs similarity index 100% rename from futures/tests/basic.rs rename to iroha_futures/tests/basic.rs From 6399f012e2923251330abaa4ff43518df72d0780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 14:13:49 +0400 Subject: [PATCH 09/59] refactor: rename `logger` directory to `iroha_logger` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 5 ++--- README.md | 2 +- {logger => iroha_logger}/Cargo.toml | 0 {logger => iroha_logger}/src/actor.rs | 0 {logger => iroha_logger}/src/layer.rs | 0 {logger => iroha_logger}/src/lib.rs | 0 {logger => iroha_logger}/src/telemetry.rs | 0 {logger => iroha_logger}/tests/configuration.rs | 0 {logger => iroha_logger}/tests/log_level.rs | 0 {logger => iroha_logger}/tests/setting_logger.rs | 0 {logger => iroha_logger}/tests/telemetry.rs | 0 11 files changed, 3 insertions(+), 4 deletions(-) rename {logger => iroha_logger}/Cargo.toml (100%) rename {logger => iroha_logger}/src/actor.rs (100%) rename {logger => iroha_logger}/src/layer.rs (100%) rename {logger => iroha_logger}/src/lib.rs (100%) rename {logger => iroha_logger}/src/telemetry.rs (100%) rename {logger => iroha_logger}/tests/configuration.rs (100%) rename {logger => iroha_logger}/tests/log_level.rs (100%) rename {logger => iroha_logger}/tests/setting_logger.rs (100%) rename {logger => iroha_logger}/tests/telemetry.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 78bfe4ad744..8453d30bbb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ iroha_config = { version = "=2.0.0-rc.1.0", path = "iroha_config" } iroha_config_base = { version = "=2.0.0-rc.1.0", path = "iroha_config/base" } iroha_schema_gen = { version = "=2.0.0-rc.1.0", path = "schema/gen" } iroha_schema = { version = "=2.0.0-rc.1.0", path = "schema", default-features = false } -iroha_logger = { version = "=2.0.0-rc.1.0", path = "logger" } +iroha_logger = { version = "=2.0.0-rc.1.0", path = "iroha_logger" } iroha_crypto = { version = "=2.0.0-rc.1.0", path = "iroha_crypto", default-features = false } iroha_macro = { version = "=2.0.0-rc.1.0", path = "macro", default-features = false } iroha_futures = { version = "=2.0.0-rc.1.0", path = "iroha_futures" } @@ -204,8 +204,7 @@ members = [ "iroha_crypto", "iroha_data_model", "genesis", - - "logger", + "iroha_logger", "p2p", "iroha_futures", "iroha_futures/derive", diff --git a/README.md b/README.md index 6112a3c1370..534d91be4b0 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ Iroha project mainly consists of the following crates: * [`kagami`](tools/kagami) is used to generate cryptographic keys, default genesis, configuration reference, and schema. * [`iroha_data_model`](iroha_data_model) defines common data models in Iroha. * [`iroha_futures`](iroha_futures) is used for `async` programming. -* [`iroha_logger`](logger) uses `tracing` to provide logging facilities. +* [`iroha_logger`](iroha_logger) uses `tracing` to provide logging facilities. * [`iroha_macro`](macro) provides the convenience macros. * [`iroha_p2p`](p2p) defines peer creation and handshake logic. * [`iroha_default_executor`](wasm_samples/default_executor) defines runtime validation logic. diff --git a/logger/Cargo.toml b/iroha_logger/Cargo.toml similarity index 100% rename from logger/Cargo.toml rename to iroha_logger/Cargo.toml diff --git a/logger/src/actor.rs b/iroha_logger/src/actor.rs similarity index 100% rename from logger/src/actor.rs rename to iroha_logger/src/actor.rs diff --git a/logger/src/layer.rs b/iroha_logger/src/layer.rs similarity index 100% rename from logger/src/layer.rs rename to iroha_logger/src/layer.rs diff --git a/logger/src/lib.rs b/iroha_logger/src/lib.rs similarity index 100% rename from logger/src/lib.rs rename to iroha_logger/src/lib.rs diff --git a/logger/src/telemetry.rs b/iroha_logger/src/telemetry.rs similarity index 100% rename from logger/src/telemetry.rs rename to iroha_logger/src/telemetry.rs diff --git a/logger/tests/configuration.rs b/iroha_logger/tests/configuration.rs similarity index 100% rename from logger/tests/configuration.rs rename to iroha_logger/tests/configuration.rs diff --git a/logger/tests/log_level.rs b/iroha_logger/tests/log_level.rs similarity index 100% rename from logger/tests/log_level.rs rename to iroha_logger/tests/log_level.rs diff --git a/logger/tests/setting_logger.rs b/iroha_logger/tests/setting_logger.rs similarity index 100% rename from logger/tests/setting_logger.rs rename to iroha_logger/tests/setting_logger.rs diff --git a/logger/tests/telemetry.rs b/iroha_logger/tests/telemetry.rs similarity index 100% rename from logger/tests/telemetry.rs rename to iroha_logger/tests/telemetry.rs From 2b0096575efcb9fce89b9a44df343ce2b73c4697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 14:16:29 +0400 Subject: [PATCH 10/59] refactor: rename `macro` directory to `iroha_macro` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 4 ++-- README.md | 2 +- {macro => iroha_macro}/Cargo.toml | 0 {macro => iroha_macro}/README.md | 0 {macro => iroha_macro}/derive/Cargo.toml | 0 {macro => iroha_macro}/derive/src/lib.rs | 0 .../derive/tests/container_enum_from_variant.rs | 0 .../derive/tests/enum_from_variant_attrs.rs | 0 {macro => iroha_macro}/derive/tests/ui.rs | 0 .../tests/ui_fail/from_variant_conflicting_implementation.rs | 0 .../ui_fail/from_variant_conflicting_implementation.stderr | 0 .../tests/ui_fail/from_variant_incorrect_attr_placement.rs | 0 .../ui_fail/from_variant_incorrect_attr_placement.stderr | 0 .../derive/tests/ui_fail/from_variant_same_type.rs | 0 .../derive/tests/ui_fail/from_variant_same_type.stderr | 0 .../derive/tests/ui_fail/struct_from_variant.rs | 0 .../derive/tests/ui_fail/struct_from_variant.stderr | 0 .../derive/tests/ui_pass/enum_from_variant.rs | 0 {macro => iroha_macro}/src/lib.rs | 1 + {macro => iroha_macro}/utils/Cargo.toml | 0 {macro => iroha_macro}/utils/src/emitter.rs | 0 {macro => iroha_macro}/utils/src/lib.rs | 0 22 files changed, 4 insertions(+), 3 deletions(-) rename {macro => iroha_macro}/Cargo.toml (100%) rename {macro => iroha_macro}/README.md (100%) rename {macro => iroha_macro}/derive/Cargo.toml (100%) rename {macro => iroha_macro}/derive/src/lib.rs (100%) rename {macro => iroha_macro}/derive/tests/container_enum_from_variant.rs (100%) rename {macro => iroha_macro}/derive/tests/enum_from_variant_attrs.rs (100%) rename {macro => iroha_macro}/derive/tests/ui.rs (100%) rename {macro => iroha_macro}/derive/tests/ui_fail/from_variant_conflicting_implementation.rs (100%) rename {macro => iroha_macro}/derive/tests/ui_fail/from_variant_conflicting_implementation.stderr (100%) rename {macro => iroha_macro}/derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs (100%) rename {macro => iroha_macro}/derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr (100%) rename {macro => iroha_macro}/derive/tests/ui_fail/from_variant_same_type.rs (100%) rename {macro => iroha_macro}/derive/tests/ui_fail/from_variant_same_type.stderr (100%) rename {macro => iroha_macro}/derive/tests/ui_fail/struct_from_variant.rs (100%) rename {macro => iroha_macro}/derive/tests/ui_fail/struct_from_variant.stderr (100%) rename {macro => iroha_macro}/derive/tests/ui_pass/enum_from_variant.rs (100%) rename {macro => iroha_macro}/src/lib.rs (99%) rename {macro => iroha_macro}/utils/Cargo.toml (100%) rename {macro => iroha_macro}/utils/src/emitter.rs (100%) rename {macro => iroha_macro}/utils/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 8453d30bbb4..e959a4d21d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ iroha_torii_const = { version = "=2.0.0-rc.1.0", path = "torii/const" } iroha = { version = "=2.0.0-rc.1.0", path = "iroha" } -iroha_macro_utils = { version = "=2.0.0-rc.1.0", path = "macro/utils" } +iroha_macro_utils = { version = "=2.0.0-rc.1.0", path = "iroha_macro/utils" } iroha_telemetry = { version = "=2.0.0-rc.1.0", path = "telemetry" } iroha_p2p = { version = "=2.0.0-rc.1.0", path = "p2p" } iroha_primitives = { version = "=2.0.0-rc.1.0", path = "primitives", default-features = false } @@ -33,7 +33,7 @@ iroha_schema_gen = { version = "=2.0.0-rc.1.0", path = "schema/gen" } iroha_schema = { version = "=2.0.0-rc.1.0", path = "schema", default-features = false } iroha_logger = { version = "=2.0.0-rc.1.0", path = "iroha_logger" } iroha_crypto = { version = "=2.0.0-rc.1.0", path = "iroha_crypto", default-features = false } -iroha_macro = { version = "=2.0.0-rc.1.0", path = "macro", default-features = false } +iroha_macro = { version = "=2.0.0-rc.1.0", path = "iroha_macro", default-features = false } iroha_futures = { version = "=2.0.0-rc.1.0", path = "iroha_futures" } iroha_genesis = { version = "=2.0.0-rc.1.0", path = "genesis" } iroha_ffi = { version = "=2.0.0-rc.1.0", path = "ffi" } diff --git a/README.md b/README.md index 534d91be4b0..18e1602e82d 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ Iroha project mainly consists of the following crates: * [`iroha_data_model`](iroha_data_model) defines common data models in Iroha. * [`iroha_futures`](iroha_futures) is used for `async` programming. * [`iroha_logger`](iroha_logger) uses `tracing` to provide logging facilities. -* [`iroha_macro`](macro) provides the convenience macros. +* [`iroha_macro`](iroha_macro) provides the convenience macros. * [`iroha_p2p`](p2p) defines peer creation and handshake logic. * [`iroha_default_executor`](wasm_samples/default_executor) defines runtime validation logic. * [`iroha_telemetry`](telemetry) is used for monitoring and analysis of telemetry data. diff --git a/macro/Cargo.toml b/iroha_macro/Cargo.toml similarity index 100% rename from macro/Cargo.toml rename to iroha_macro/Cargo.toml diff --git a/macro/README.md b/iroha_macro/README.md similarity index 100% rename from macro/README.md rename to iroha_macro/README.md diff --git a/macro/derive/Cargo.toml b/iroha_macro/derive/Cargo.toml similarity index 100% rename from macro/derive/Cargo.toml rename to iroha_macro/derive/Cargo.toml diff --git a/macro/derive/src/lib.rs b/iroha_macro/derive/src/lib.rs similarity index 100% rename from macro/derive/src/lib.rs rename to iroha_macro/derive/src/lib.rs diff --git a/macro/derive/tests/container_enum_from_variant.rs b/iroha_macro/derive/tests/container_enum_from_variant.rs similarity index 100% rename from macro/derive/tests/container_enum_from_variant.rs rename to iroha_macro/derive/tests/container_enum_from_variant.rs diff --git a/macro/derive/tests/enum_from_variant_attrs.rs b/iroha_macro/derive/tests/enum_from_variant_attrs.rs similarity index 100% rename from macro/derive/tests/enum_from_variant_attrs.rs rename to iroha_macro/derive/tests/enum_from_variant_attrs.rs diff --git a/macro/derive/tests/ui.rs b/iroha_macro/derive/tests/ui.rs similarity index 100% rename from macro/derive/tests/ui.rs rename to iroha_macro/derive/tests/ui.rs diff --git a/macro/derive/tests/ui_fail/from_variant_conflicting_implementation.rs b/iroha_macro/derive/tests/ui_fail/from_variant_conflicting_implementation.rs similarity index 100% rename from macro/derive/tests/ui_fail/from_variant_conflicting_implementation.rs rename to iroha_macro/derive/tests/ui_fail/from_variant_conflicting_implementation.rs diff --git a/macro/derive/tests/ui_fail/from_variant_conflicting_implementation.stderr b/iroha_macro/derive/tests/ui_fail/from_variant_conflicting_implementation.stderr similarity index 100% rename from macro/derive/tests/ui_fail/from_variant_conflicting_implementation.stderr rename to iroha_macro/derive/tests/ui_fail/from_variant_conflicting_implementation.stderr diff --git a/macro/derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs b/iroha_macro/derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs similarity index 100% rename from macro/derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs rename to iroha_macro/derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs diff --git a/macro/derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr b/iroha_macro/derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr similarity index 100% rename from macro/derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr rename to iroha_macro/derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr diff --git a/macro/derive/tests/ui_fail/from_variant_same_type.rs b/iroha_macro/derive/tests/ui_fail/from_variant_same_type.rs similarity index 100% rename from macro/derive/tests/ui_fail/from_variant_same_type.rs rename to iroha_macro/derive/tests/ui_fail/from_variant_same_type.rs diff --git a/macro/derive/tests/ui_fail/from_variant_same_type.stderr b/iroha_macro/derive/tests/ui_fail/from_variant_same_type.stderr similarity index 100% rename from macro/derive/tests/ui_fail/from_variant_same_type.stderr rename to iroha_macro/derive/tests/ui_fail/from_variant_same_type.stderr diff --git a/macro/derive/tests/ui_fail/struct_from_variant.rs b/iroha_macro/derive/tests/ui_fail/struct_from_variant.rs similarity index 100% rename from macro/derive/tests/ui_fail/struct_from_variant.rs rename to iroha_macro/derive/tests/ui_fail/struct_from_variant.rs diff --git a/macro/derive/tests/ui_fail/struct_from_variant.stderr b/iroha_macro/derive/tests/ui_fail/struct_from_variant.stderr similarity index 100% rename from macro/derive/tests/ui_fail/struct_from_variant.stderr rename to iroha_macro/derive/tests/ui_fail/struct_from_variant.stderr diff --git a/macro/derive/tests/ui_pass/enum_from_variant.rs b/iroha_macro/derive/tests/ui_pass/enum_from_variant.rs similarity index 100% rename from macro/derive/tests/ui_pass/enum_from_variant.rs rename to iroha_macro/derive/tests/ui_pass/enum_from_variant.rs diff --git a/macro/src/lib.rs b/iroha_macro/src/lib.rs similarity index 99% rename from macro/src/lib.rs rename to iroha_macro/src/lib.rs index edfab03f680..b4d4f621b46 100644 --- a/macro/src/lib.rs +++ b/iroha_macro/src/lib.rs @@ -1,4 +1,5 @@ //! Crate containing Iroha macros + #![cfg_attr(not(feature = "std"), no_std)] pub use iroha_derive::*; diff --git a/macro/utils/Cargo.toml b/iroha_macro/utils/Cargo.toml similarity index 100% rename from macro/utils/Cargo.toml rename to iroha_macro/utils/Cargo.toml diff --git a/macro/utils/src/emitter.rs b/iroha_macro/utils/src/emitter.rs similarity index 100% rename from macro/utils/src/emitter.rs rename to iroha_macro/utils/src/emitter.rs diff --git a/macro/utils/src/lib.rs b/iroha_macro/utils/src/lib.rs similarity index 100% rename from macro/utils/src/lib.rs rename to iroha_macro/utils/src/lib.rs From 82569625da0e9311e9286732af5b0bbb71efaaf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 14:17:24 +0400 Subject: [PATCH 11/59] refactor: rename `p2p` directory to `iroha_p2p` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 4 ++-- README.md | 2 +- {p2p => iroha_p2p}/Cargo.toml | 0 {p2p => iroha_p2p}/src/lib.rs | 0 {p2p => iroha_p2p}/src/network.rs | 0 {p2p => iroha_p2p}/src/peer.rs | 0 {p2p => iroha_p2p}/tests/integration/mod.rs | 0 {p2p => iroha_p2p}/tests/integration/p2p.rs | 0 {p2p => iroha_p2p}/tests/mod.rs | 0 9 files changed, 3 insertions(+), 3 deletions(-) rename {p2p => iroha_p2p}/Cargo.toml (100%) rename {p2p => iroha_p2p}/src/lib.rs (100%) rename {p2p => iroha_p2p}/src/network.rs (100%) rename {p2p => iroha_p2p}/src/peer.rs (100%) rename {p2p => iroha_p2p}/tests/integration/mod.rs (100%) rename {p2p => iroha_p2p}/tests/integration/p2p.rs (100%) rename {p2p => iroha_p2p}/tests/mod.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index e959a4d21d7..624dfb95e9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ iroha = { version = "=2.0.0-rc.1.0", path = "iroha" } iroha_macro_utils = { version = "=2.0.0-rc.1.0", path = "iroha_macro/utils" } iroha_telemetry = { version = "=2.0.0-rc.1.0", path = "telemetry" } -iroha_p2p = { version = "=2.0.0-rc.1.0", path = "p2p" } +iroha_p2p = { version = "=2.0.0-rc.1.0", path = "iroha_p2p" } iroha_primitives = { version = "=2.0.0-rc.1.0", path = "primitives", default-features = false } iroha_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_data_model", default-features = false } iroha_config = { version = "=2.0.0-rc.1.0", path = "iroha_config" } @@ -205,7 +205,7 @@ members = [ "iroha_data_model", "genesis", "iroha_logger", - "p2p", + "iroha_p2p", "iroha_futures", "iroha_futures/derive", diff --git a/README.md b/README.md index 18e1602e82d..6781e0ff4c6 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ Iroha project mainly consists of the following crates: * [`iroha_futures`](iroha_futures) is used for `async` programming. * [`iroha_logger`](iroha_logger) uses `tracing` to provide logging facilities. * [`iroha_macro`](iroha_macro) provides the convenience macros. -* [`iroha_p2p`](p2p) defines peer creation and handshake logic. +* [`iroha_p2p`](iroha_p2p) defines peer creation and handshake logic. * [`iroha_default_executor`](wasm_samples/default_executor) defines runtime validation logic. * [`iroha_telemetry`](telemetry) is used for monitoring and analysis of telemetry data. * [`iroha_version`](version) provides message versioning for non-simultaneous system updates. diff --git a/p2p/Cargo.toml b/iroha_p2p/Cargo.toml similarity index 100% rename from p2p/Cargo.toml rename to iroha_p2p/Cargo.toml diff --git a/p2p/src/lib.rs b/iroha_p2p/src/lib.rs similarity index 100% rename from p2p/src/lib.rs rename to iroha_p2p/src/lib.rs diff --git a/p2p/src/network.rs b/iroha_p2p/src/network.rs similarity index 100% rename from p2p/src/network.rs rename to iroha_p2p/src/network.rs diff --git a/p2p/src/peer.rs b/iroha_p2p/src/peer.rs similarity index 100% rename from p2p/src/peer.rs rename to iroha_p2p/src/peer.rs diff --git a/p2p/tests/integration/mod.rs b/iroha_p2p/tests/integration/mod.rs similarity index 100% rename from p2p/tests/integration/mod.rs rename to iroha_p2p/tests/integration/mod.rs diff --git a/p2p/tests/integration/p2p.rs b/iroha_p2p/tests/integration/p2p.rs similarity index 100% rename from p2p/tests/integration/p2p.rs rename to iroha_p2p/tests/integration/p2p.rs diff --git a/p2p/tests/mod.rs b/iroha_p2p/tests/mod.rs similarity index 100% rename from p2p/tests/mod.rs rename to iroha_p2p/tests/mod.rs From 0bea88cbfd43724f587d74faacd2c2c3fca79aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 16:13:38 +0400 Subject: [PATCH 12/59] refactor: rename `telemetry` directory to `iroha_telemetry` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 5 ++--- README.md | 2 +- iroha/Cargo.toml | 2 +- {telemetry => iroha_telemetry}/Cargo.toml | 0 {telemetry => iroha_telemetry}/build.rs | 0 {telemetry => iroha_telemetry}/derive/Cargo.toml | 0 {telemetry => iroha_telemetry}/derive/src/lib.rs | 0 {telemetry => iroha_telemetry}/derive/tests/ui.rs | 0 .../derive/tests/ui_fail/args_no_wsv.rs | 0 .../derive/tests/ui_fail/args_no_wsv.stderr | 0 .../derive/tests/ui_fail/bare_spec.rs | 0 .../derive/tests/ui_fail/bare_spec.stderr | 0 .../derive/tests/ui_fail/doubled_plus.rs | 0 .../derive/tests/ui_fail/doubled_plus.stderr | 0 .../derive/tests/ui_fail/no_args.rs | 0 .../derive/tests/ui_fail/no_args.stderr | 0 .../derive/tests/ui_fail/non_snake_case_name.rs | 0 .../derive/tests/ui_fail/non_snake_case_name.stderr | 0 .../derive/tests/ui_fail/not_execute.rs | 0 .../derive/tests/ui_fail/not_execute.stderr | 0 .../derive/tests/ui_fail/not_return_result.rs | 0 .../derive/tests/ui_fail/not_return_result.stderr | 0 .../derive/tests/ui_fail/return_nothing.rs | 0 .../derive/tests/ui_fail/return_nothing.stderr | 0 .../derive/tests/ui_fail/trailing_plus.rs | 0 .../derive/tests/ui_fail/trailing_plus.stderr | 0 {telemetry => iroha_telemetry}/src/dev.rs | 0 {telemetry => iroha_telemetry}/src/futures.rs | 0 {telemetry => iroha_telemetry}/src/lib.rs | 0 {telemetry => iroha_telemetry}/src/metrics.rs | 0 {telemetry => iroha_telemetry}/src/retry_period.rs | 0 {telemetry => iroha_telemetry}/src/ws.rs | 0 32 files changed, 4 insertions(+), 5 deletions(-) rename {telemetry => iroha_telemetry}/Cargo.toml (100%) rename {telemetry => iroha_telemetry}/build.rs (100%) rename {telemetry => iroha_telemetry}/derive/Cargo.toml (100%) rename {telemetry => iroha_telemetry}/derive/src/lib.rs (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui.rs (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/args_no_wsv.rs (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/args_no_wsv.stderr (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/bare_spec.rs (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/bare_spec.stderr (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/doubled_plus.rs (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/doubled_plus.stderr (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/no_args.rs (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/no_args.stderr (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/non_snake_case_name.rs (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/non_snake_case_name.stderr (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/not_execute.rs (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/not_execute.stderr (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/not_return_result.rs (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/not_return_result.stderr (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/return_nothing.rs (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/return_nothing.stderr (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/trailing_plus.rs (100%) rename {telemetry => iroha_telemetry}/derive/tests/ui_fail/trailing_plus.stderr (100%) rename {telemetry => iroha_telemetry}/src/dev.rs (100%) rename {telemetry => iroha_telemetry}/src/futures.rs (100%) rename {telemetry => iroha_telemetry}/src/lib.rs (100%) rename {telemetry => iroha_telemetry}/src/metrics.rs (100%) rename {telemetry => iroha_telemetry}/src/retry_period.rs (100%) rename {telemetry => iroha_telemetry}/src/ws.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 624dfb95e9d..e33d600626b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ iroha_torii_const = { version = "=2.0.0-rc.1.0", path = "torii/const" } iroha = { version = "=2.0.0-rc.1.0", path = "iroha" } iroha_macro_utils = { version = "=2.0.0-rc.1.0", path = "iroha_macro/utils" } -iroha_telemetry = { version = "=2.0.0-rc.1.0", path = "telemetry" } +iroha_telemetry = { version = "=2.0.0-rc.1.0", path = "iroha_telemetry" } iroha_p2p = { version = "=2.0.0-rc.1.0", path = "iroha_p2p" } iroha_primitives = { version = "=2.0.0-rc.1.0", path = "primitives", default-features = false } iroha_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_data_model", default-features = false } @@ -231,8 +231,7 @@ members = [ "executor/derive", "executor/data_model", "executor/data_model/derive", - - "telemetry", + "iroha_telemetry", "test_samples", "tools/swarm", diff --git a/README.md b/README.md index 6781e0ff4c6..c37bea30962 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ Iroha project mainly consists of the following crates: * [`iroha_macro`](iroha_macro) provides the convenience macros. * [`iroha_p2p`](iroha_p2p) defines peer creation and handshake logic. * [`iroha_default_executor`](wasm_samples/default_executor) defines runtime validation logic. -* [`iroha_telemetry`](telemetry) is used for monitoring and analysis of telemetry data. +* [`iroha_telemetry`](iroha_telemetry) is used for monitoring and analysis of telemetry data. * [`iroha_version`](version) provides message versioning for non-simultaneous system updates. ## Maintenance diff --git a/iroha/Cargo.toml b/iroha/Cargo.toml index b83a5306ddd..fc9f1f41b62 100644 --- a/iroha/Cargo.toml +++ b/iroha/Cargo.toml @@ -84,7 +84,7 @@ nonzero_ext = { workspace = true } [dev-dependencies] # FIXME: These three activate `transparent_api` but client should never activate this feature. -# Additionally there is a dependency on iroha_core in dev-dependencies in telemetry/derive +# Additionally there is a dependency on iroha_core in dev-dependencies in iroha_telemetry/derive # Hopefully, once the integration tests migration is finished these can be removed irohad = { workspace = true } diff --git a/telemetry/Cargo.toml b/iroha_telemetry/Cargo.toml similarity index 100% rename from telemetry/Cargo.toml rename to iroha_telemetry/Cargo.toml diff --git a/telemetry/build.rs b/iroha_telemetry/build.rs similarity index 100% rename from telemetry/build.rs rename to iroha_telemetry/build.rs diff --git a/telemetry/derive/Cargo.toml b/iroha_telemetry/derive/Cargo.toml similarity index 100% rename from telemetry/derive/Cargo.toml rename to iroha_telemetry/derive/Cargo.toml diff --git a/telemetry/derive/src/lib.rs b/iroha_telemetry/derive/src/lib.rs similarity index 100% rename from telemetry/derive/src/lib.rs rename to iroha_telemetry/derive/src/lib.rs diff --git a/telemetry/derive/tests/ui.rs b/iroha_telemetry/derive/tests/ui.rs similarity index 100% rename from telemetry/derive/tests/ui.rs rename to iroha_telemetry/derive/tests/ui.rs diff --git a/telemetry/derive/tests/ui_fail/args_no_wsv.rs b/iroha_telemetry/derive/tests/ui_fail/args_no_wsv.rs similarity index 100% rename from telemetry/derive/tests/ui_fail/args_no_wsv.rs rename to iroha_telemetry/derive/tests/ui_fail/args_no_wsv.rs diff --git a/telemetry/derive/tests/ui_fail/args_no_wsv.stderr b/iroha_telemetry/derive/tests/ui_fail/args_no_wsv.stderr similarity index 100% rename from telemetry/derive/tests/ui_fail/args_no_wsv.stderr rename to iroha_telemetry/derive/tests/ui_fail/args_no_wsv.stderr diff --git a/telemetry/derive/tests/ui_fail/bare_spec.rs b/iroha_telemetry/derive/tests/ui_fail/bare_spec.rs similarity index 100% rename from telemetry/derive/tests/ui_fail/bare_spec.rs rename to iroha_telemetry/derive/tests/ui_fail/bare_spec.rs diff --git a/telemetry/derive/tests/ui_fail/bare_spec.stderr b/iroha_telemetry/derive/tests/ui_fail/bare_spec.stderr similarity index 100% rename from telemetry/derive/tests/ui_fail/bare_spec.stderr rename to iroha_telemetry/derive/tests/ui_fail/bare_spec.stderr diff --git a/telemetry/derive/tests/ui_fail/doubled_plus.rs b/iroha_telemetry/derive/tests/ui_fail/doubled_plus.rs similarity index 100% rename from telemetry/derive/tests/ui_fail/doubled_plus.rs rename to iroha_telemetry/derive/tests/ui_fail/doubled_plus.rs diff --git a/telemetry/derive/tests/ui_fail/doubled_plus.stderr b/iroha_telemetry/derive/tests/ui_fail/doubled_plus.stderr similarity index 100% rename from telemetry/derive/tests/ui_fail/doubled_plus.stderr rename to iroha_telemetry/derive/tests/ui_fail/doubled_plus.stderr diff --git a/telemetry/derive/tests/ui_fail/no_args.rs b/iroha_telemetry/derive/tests/ui_fail/no_args.rs similarity index 100% rename from telemetry/derive/tests/ui_fail/no_args.rs rename to iroha_telemetry/derive/tests/ui_fail/no_args.rs diff --git a/telemetry/derive/tests/ui_fail/no_args.stderr b/iroha_telemetry/derive/tests/ui_fail/no_args.stderr similarity index 100% rename from telemetry/derive/tests/ui_fail/no_args.stderr rename to iroha_telemetry/derive/tests/ui_fail/no_args.stderr diff --git a/telemetry/derive/tests/ui_fail/non_snake_case_name.rs b/iroha_telemetry/derive/tests/ui_fail/non_snake_case_name.rs similarity index 100% rename from telemetry/derive/tests/ui_fail/non_snake_case_name.rs rename to iroha_telemetry/derive/tests/ui_fail/non_snake_case_name.rs diff --git a/telemetry/derive/tests/ui_fail/non_snake_case_name.stderr b/iroha_telemetry/derive/tests/ui_fail/non_snake_case_name.stderr similarity index 100% rename from telemetry/derive/tests/ui_fail/non_snake_case_name.stderr rename to iroha_telemetry/derive/tests/ui_fail/non_snake_case_name.stderr diff --git a/telemetry/derive/tests/ui_fail/not_execute.rs b/iroha_telemetry/derive/tests/ui_fail/not_execute.rs similarity index 100% rename from telemetry/derive/tests/ui_fail/not_execute.rs rename to iroha_telemetry/derive/tests/ui_fail/not_execute.rs diff --git a/telemetry/derive/tests/ui_fail/not_execute.stderr b/iroha_telemetry/derive/tests/ui_fail/not_execute.stderr similarity index 100% rename from telemetry/derive/tests/ui_fail/not_execute.stderr rename to iroha_telemetry/derive/tests/ui_fail/not_execute.stderr diff --git a/telemetry/derive/tests/ui_fail/not_return_result.rs b/iroha_telemetry/derive/tests/ui_fail/not_return_result.rs similarity index 100% rename from telemetry/derive/tests/ui_fail/not_return_result.rs rename to iroha_telemetry/derive/tests/ui_fail/not_return_result.rs diff --git a/telemetry/derive/tests/ui_fail/not_return_result.stderr b/iroha_telemetry/derive/tests/ui_fail/not_return_result.stderr similarity index 100% rename from telemetry/derive/tests/ui_fail/not_return_result.stderr rename to iroha_telemetry/derive/tests/ui_fail/not_return_result.stderr diff --git a/telemetry/derive/tests/ui_fail/return_nothing.rs b/iroha_telemetry/derive/tests/ui_fail/return_nothing.rs similarity index 100% rename from telemetry/derive/tests/ui_fail/return_nothing.rs rename to iroha_telemetry/derive/tests/ui_fail/return_nothing.rs diff --git a/telemetry/derive/tests/ui_fail/return_nothing.stderr b/iroha_telemetry/derive/tests/ui_fail/return_nothing.stderr similarity index 100% rename from telemetry/derive/tests/ui_fail/return_nothing.stderr rename to iroha_telemetry/derive/tests/ui_fail/return_nothing.stderr diff --git a/telemetry/derive/tests/ui_fail/trailing_plus.rs b/iroha_telemetry/derive/tests/ui_fail/trailing_plus.rs similarity index 100% rename from telemetry/derive/tests/ui_fail/trailing_plus.rs rename to iroha_telemetry/derive/tests/ui_fail/trailing_plus.rs diff --git a/telemetry/derive/tests/ui_fail/trailing_plus.stderr b/iroha_telemetry/derive/tests/ui_fail/trailing_plus.stderr similarity index 100% rename from telemetry/derive/tests/ui_fail/trailing_plus.stderr rename to iroha_telemetry/derive/tests/ui_fail/trailing_plus.stderr diff --git a/telemetry/src/dev.rs b/iroha_telemetry/src/dev.rs similarity index 100% rename from telemetry/src/dev.rs rename to iroha_telemetry/src/dev.rs diff --git a/telemetry/src/futures.rs b/iroha_telemetry/src/futures.rs similarity index 100% rename from telemetry/src/futures.rs rename to iroha_telemetry/src/futures.rs diff --git a/telemetry/src/lib.rs b/iroha_telemetry/src/lib.rs similarity index 100% rename from telemetry/src/lib.rs rename to iroha_telemetry/src/lib.rs diff --git a/telemetry/src/metrics.rs b/iroha_telemetry/src/metrics.rs similarity index 100% rename from telemetry/src/metrics.rs rename to iroha_telemetry/src/metrics.rs diff --git a/telemetry/src/retry_period.rs b/iroha_telemetry/src/retry_period.rs similarity index 100% rename from telemetry/src/retry_period.rs rename to iroha_telemetry/src/retry_period.rs diff --git a/telemetry/src/ws.rs b/iroha_telemetry/src/ws.rs similarity index 100% rename from telemetry/src/ws.rs rename to iroha_telemetry/src/ws.rs From 6a1fd1e948931819fe10f44a5265450ff2409756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 16:14:58 +0400 Subject: [PATCH 13/59] refactor: rename `version` directory to `iroha_version` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 7 +++---- README.md | 2 +- {version => iroha_version}/Cargo.toml | 0 {version => iroha_version}/derive/Cargo.toml | 0 {version => iroha_version}/derive/src/lib.rs | 0 {version => iroha_version}/derive/tests/json.rs | 0 {version => iroha_version}/derive/tests/scale.rs | 0 {version => iroha_version}/derive/tests/ui.rs | 0 .../tests/ui_fail/field_missing_in_version_attribute.rs | 0 .../ui_fail/field_missing_in_version_attribute.stderr | 0 .../tests/ui_fail/field_typo_in_version_attribute.rs | 0 .../tests/ui_fail/field_typo_in_version_attribute.stderr | 0 .../derive/tests/ui_fail/invalid_range_equal.rs | 0 .../derive/tests/ui_fail/invalid_range_equal.stderr | 0 .../derive/tests/ui_fail/invalid_range_less.rs | 0 .../derive/tests/ui_fail/invalid_range_less.stderr | 0 .../tests/ui_fail/unknown_field_in_version_attribute.rs | 0 .../ui_fail/unknown_field_in_version_attribute.stderr | 0 .../derive/tests/ui_pass/declare_several_versioned.rs | 0 .../derive/tests/ui_pass/declare_versioned.rs | 0 .../derive/tests/ui_pass/declare_versioned_json.rs | 0 .../derive/tests/ui_pass/declare_versioned_scale.rs | 0 {version => iroha_version}/src/lib.rs | 0 23 files changed, 4 insertions(+), 5 deletions(-) rename {version => iroha_version}/Cargo.toml (100%) rename {version => iroha_version}/derive/Cargo.toml (100%) rename {version => iroha_version}/derive/src/lib.rs (100%) rename {version => iroha_version}/derive/tests/json.rs (100%) rename {version => iroha_version}/derive/tests/scale.rs (100%) rename {version => iroha_version}/derive/tests/ui.rs (100%) rename {version => iroha_version}/derive/tests/ui_fail/field_missing_in_version_attribute.rs (100%) rename {version => iroha_version}/derive/tests/ui_fail/field_missing_in_version_attribute.stderr (100%) rename {version => iroha_version}/derive/tests/ui_fail/field_typo_in_version_attribute.rs (100%) rename {version => iroha_version}/derive/tests/ui_fail/field_typo_in_version_attribute.stderr (100%) rename {version => iroha_version}/derive/tests/ui_fail/invalid_range_equal.rs (100%) rename {version => iroha_version}/derive/tests/ui_fail/invalid_range_equal.stderr (100%) rename {version => iroha_version}/derive/tests/ui_fail/invalid_range_less.rs (100%) rename {version => iroha_version}/derive/tests/ui_fail/invalid_range_less.stderr (100%) rename {version => iroha_version}/derive/tests/ui_fail/unknown_field_in_version_attribute.rs (100%) rename {version => iroha_version}/derive/tests/ui_fail/unknown_field_in_version_attribute.stderr (100%) rename {version => iroha_version}/derive/tests/ui_pass/declare_several_versioned.rs (100%) rename {version => iroha_version}/derive/tests/ui_pass/declare_versioned.rs (100%) rename {version => iroha_version}/derive/tests/ui_pass/declare_versioned_json.rs (100%) rename {version => iroha_version}/derive/tests/ui_pass/declare_versioned_scale.rs (100%) rename {version => iroha_version}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index e33d600626b..62fe603cbd7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ iroha_macro = { version = "=2.0.0-rc.1.0", path = "iroha_macro", default-feature iroha_futures = { version = "=2.0.0-rc.1.0", path = "iroha_futures" } iroha_genesis = { version = "=2.0.0-rc.1.0", path = "genesis" } iroha_ffi = { version = "=2.0.0-rc.1.0", path = "ffi" } -iroha_version = { version = "=2.0.0-rc.1.0", path = "version", default-features = false } +iroha_version = { version = "=2.0.0-rc.1.0", path = "iroha_version", default-features = false } iroha_wasm_codec = { version = "=2.0.0-rc.1.0", path = "wasm_codec" } iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "wasm_builder" } @@ -242,9 +242,8 @@ members = [ "torii", "torii/const", - - "version", - "version/derive", + "iroha_version", + "iroha_version/derive", "wasm_codec", "wasm_codec/derive", diff --git a/README.md b/README.md index c37bea30962..62b581d7bc9 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ Iroha project mainly consists of the following crates: * [`iroha_p2p`](iroha_p2p) defines peer creation and handshake logic. * [`iroha_default_executor`](wasm_samples/default_executor) defines runtime validation logic. * [`iroha_telemetry`](iroha_telemetry) is used for monitoring and analysis of telemetry data. -* [`iroha_version`](version) provides message versioning for non-simultaneous system updates. +* [`iroha_version`](iroha_version) provides message versioning for non-simultaneous system updates. ## Maintenance diff --git a/version/Cargo.toml b/iroha_version/Cargo.toml similarity index 100% rename from version/Cargo.toml rename to iroha_version/Cargo.toml diff --git a/version/derive/Cargo.toml b/iroha_version/derive/Cargo.toml similarity index 100% rename from version/derive/Cargo.toml rename to iroha_version/derive/Cargo.toml diff --git a/version/derive/src/lib.rs b/iroha_version/derive/src/lib.rs similarity index 100% rename from version/derive/src/lib.rs rename to iroha_version/derive/src/lib.rs diff --git a/version/derive/tests/json.rs b/iroha_version/derive/tests/json.rs similarity index 100% rename from version/derive/tests/json.rs rename to iroha_version/derive/tests/json.rs diff --git a/version/derive/tests/scale.rs b/iroha_version/derive/tests/scale.rs similarity index 100% rename from version/derive/tests/scale.rs rename to iroha_version/derive/tests/scale.rs diff --git a/version/derive/tests/ui.rs b/iroha_version/derive/tests/ui.rs similarity index 100% rename from version/derive/tests/ui.rs rename to iroha_version/derive/tests/ui.rs diff --git a/version/derive/tests/ui_fail/field_missing_in_version_attribute.rs b/iroha_version/derive/tests/ui_fail/field_missing_in_version_attribute.rs similarity index 100% rename from version/derive/tests/ui_fail/field_missing_in_version_attribute.rs rename to iroha_version/derive/tests/ui_fail/field_missing_in_version_attribute.rs diff --git a/version/derive/tests/ui_fail/field_missing_in_version_attribute.stderr b/iroha_version/derive/tests/ui_fail/field_missing_in_version_attribute.stderr similarity index 100% rename from version/derive/tests/ui_fail/field_missing_in_version_attribute.stderr rename to iroha_version/derive/tests/ui_fail/field_missing_in_version_attribute.stderr diff --git a/version/derive/tests/ui_fail/field_typo_in_version_attribute.rs b/iroha_version/derive/tests/ui_fail/field_typo_in_version_attribute.rs similarity index 100% rename from version/derive/tests/ui_fail/field_typo_in_version_attribute.rs rename to iroha_version/derive/tests/ui_fail/field_typo_in_version_attribute.rs diff --git a/version/derive/tests/ui_fail/field_typo_in_version_attribute.stderr b/iroha_version/derive/tests/ui_fail/field_typo_in_version_attribute.stderr similarity index 100% rename from version/derive/tests/ui_fail/field_typo_in_version_attribute.stderr rename to iroha_version/derive/tests/ui_fail/field_typo_in_version_attribute.stderr diff --git a/version/derive/tests/ui_fail/invalid_range_equal.rs b/iroha_version/derive/tests/ui_fail/invalid_range_equal.rs similarity index 100% rename from version/derive/tests/ui_fail/invalid_range_equal.rs rename to iroha_version/derive/tests/ui_fail/invalid_range_equal.rs diff --git a/version/derive/tests/ui_fail/invalid_range_equal.stderr b/iroha_version/derive/tests/ui_fail/invalid_range_equal.stderr similarity index 100% rename from version/derive/tests/ui_fail/invalid_range_equal.stderr rename to iroha_version/derive/tests/ui_fail/invalid_range_equal.stderr diff --git a/version/derive/tests/ui_fail/invalid_range_less.rs b/iroha_version/derive/tests/ui_fail/invalid_range_less.rs similarity index 100% rename from version/derive/tests/ui_fail/invalid_range_less.rs rename to iroha_version/derive/tests/ui_fail/invalid_range_less.rs diff --git a/version/derive/tests/ui_fail/invalid_range_less.stderr b/iroha_version/derive/tests/ui_fail/invalid_range_less.stderr similarity index 100% rename from version/derive/tests/ui_fail/invalid_range_less.stderr rename to iroha_version/derive/tests/ui_fail/invalid_range_less.stderr diff --git a/version/derive/tests/ui_fail/unknown_field_in_version_attribute.rs b/iroha_version/derive/tests/ui_fail/unknown_field_in_version_attribute.rs similarity index 100% rename from version/derive/tests/ui_fail/unknown_field_in_version_attribute.rs rename to iroha_version/derive/tests/ui_fail/unknown_field_in_version_attribute.rs diff --git a/version/derive/tests/ui_fail/unknown_field_in_version_attribute.stderr b/iroha_version/derive/tests/ui_fail/unknown_field_in_version_attribute.stderr similarity index 100% rename from version/derive/tests/ui_fail/unknown_field_in_version_attribute.stderr rename to iroha_version/derive/tests/ui_fail/unknown_field_in_version_attribute.stderr diff --git a/version/derive/tests/ui_pass/declare_several_versioned.rs b/iroha_version/derive/tests/ui_pass/declare_several_versioned.rs similarity index 100% rename from version/derive/tests/ui_pass/declare_several_versioned.rs rename to iroha_version/derive/tests/ui_pass/declare_several_versioned.rs diff --git a/version/derive/tests/ui_pass/declare_versioned.rs b/iroha_version/derive/tests/ui_pass/declare_versioned.rs similarity index 100% rename from version/derive/tests/ui_pass/declare_versioned.rs rename to iroha_version/derive/tests/ui_pass/declare_versioned.rs diff --git a/version/derive/tests/ui_pass/declare_versioned_json.rs b/iroha_version/derive/tests/ui_pass/declare_versioned_json.rs similarity index 100% rename from version/derive/tests/ui_pass/declare_versioned_json.rs rename to iroha_version/derive/tests/ui_pass/declare_versioned_json.rs diff --git a/version/derive/tests/ui_pass/declare_versioned_scale.rs b/iroha_version/derive/tests/ui_pass/declare_versioned_scale.rs similarity index 100% rename from version/derive/tests/ui_pass/declare_versioned_scale.rs rename to iroha_version/derive/tests/ui_pass/declare_versioned_scale.rs diff --git a/version/src/lib.rs b/iroha_version/src/lib.rs similarity index 100% rename from version/src/lib.rs rename to iroha_version/src/lib.rs From 530e657486a80b7c464ac84ef0d7ec4003cb96f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 16:18:50 +0400 Subject: [PATCH 14/59] refactor: rename `genesis` directory to `iroha_genesis` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 4 ++-- {genesis => iroha_genesis}/Cargo.toml | 0 {genesis => iroha_genesis}/src/lib.rs | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename {genesis => iroha_genesis}/Cargo.toml (100%) rename {genesis => iroha_genesis}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 62fe603cbd7..7deff3bd874 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ iroha_logger = { version = "=2.0.0-rc.1.0", path = "iroha_logger" } iroha_crypto = { version = "=2.0.0-rc.1.0", path = "iroha_crypto", default-features = false } iroha_macro = { version = "=2.0.0-rc.1.0", path = "iroha_macro", default-features = false } iroha_futures = { version = "=2.0.0-rc.1.0", path = "iroha_futures" } -iroha_genesis = { version = "=2.0.0-rc.1.0", path = "genesis" } +iroha_genesis = { version = "=2.0.0-rc.1.0", path = "iroha_genesis" } iroha_ffi = { version = "=2.0.0-rc.1.0", path = "ffi" } iroha_version = { version = "=2.0.0-rc.1.0", path = "iroha_version", default-features = false } iroha_wasm_codec = { version = "=2.0.0-rc.1.0", path = "wasm_codec" } @@ -203,7 +203,7 @@ members = [ "iroha_core/test_network", "iroha_crypto", "iroha_data_model", - "genesis", + "iroha_genesis", "iroha_logger", "iroha_p2p", "iroha_futures", diff --git a/genesis/Cargo.toml b/iroha_genesis/Cargo.toml similarity index 100% rename from genesis/Cargo.toml rename to iroha_genesis/Cargo.toml diff --git a/genesis/src/lib.rs b/iroha_genesis/src/lib.rs similarity index 100% rename from genesis/src/lib.rs rename to iroha_genesis/src/lib.rs From da186335de5f687863c937ad4784268ddedd461b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 16:19:45 +0400 Subject: [PATCH 15/59] refactor: rename `ffi` directory to `iroha_ffi` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 7 +++---- {ffi => iroha_ffi}/.cargo/config.toml | 0 {ffi => iroha_ffi}/Cargo.toml | 0 {ffi => iroha_ffi}/derive/Cargo.toml | 0 {ffi => iroha_ffi}/derive/src/attr_parse/derive.rs | 0 {ffi => iroha_ffi}/derive/src/attr_parse/doc.rs | 0 {ffi => iroha_ffi}/derive/src/attr_parse/getset.rs | 0 {ffi => iroha_ffi}/derive/src/attr_parse/mod.rs | 0 {ffi => iroha_ffi}/derive/src/attr_parse/repr.rs | 0 {ffi => iroha_ffi}/derive/src/convert.rs | 0 {ffi => iroha_ffi}/derive/src/ffi_fn.rs | 0 {ffi => iroha_ffi}/derive/src/getset_gen.rs | 0 {ffi => iroha_ffi}/derive/src/impl_visitor.rs | 0 {ffi => iroha_ffi}/derive/src/lib.rs | 0 {ffi => iroha_ffi}/derive/src/wrapper.rs | 0 {ffi => iroha_ffi}/derive/tests/ui.rs | 0 {ffi => iroha_ffi}/derive/tests/ui_fail/array_as_ptr.rs | 0 .../derive/tests/ui_fail/array_as_ptr.stderr | 0 .../derive/tests/ui_fail/derive_skip_field.rs | 0 .../derive/tests/ui_fail/derive_skip_field.stderr | 0 .../derive/tests/ui_fail/derive_skip_struct.rs | 0 .../derive/tests/ui_fail/derive_skip_struct.stderr | 0 .../derive/tests/ui_fail/fallible_transmute_mut_ref.rs | 0 .../derive/tests/ui_fail/fallible_transmute_mut_ref.stderr | 0 .../ui_fail/fieldless_enum_with_explicit_discriminant.rs | 0 .../fieldless_enum_with_explicit_discriminant.stderr | 0 .../derive/tests/ui_fail/fieldless_enum_without_repr.rs | 0 .../tests/ui_fail/fieldless_enum_without_repr.stderr | 0 .../derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs | 0 .../tests/ui_fail/generics_are_forbiden_in_ffi.stderr | 0 .../derive/tests/ui_fail/nested_owned_structure.rs | 0 .../derive/tests/ui_fail/nested_owned_structure.stderr | 0 .../derive/tests/ui_fail/non_robust_repr_c.rs | 0 .../derive/tests/ui_fail/non_robust_repr_c.stderr | 0 .../ui_fail/private_method_inside_impl_are_skipped.rs | 0 .../ui_fail/private_method_inside_impl_are_skipped.stderr | 0 .../derive/tests/ui_fail/raw_pointer_type.rs | 0 .../derive/tests/ui_fail/raw_pointer_type.stderr | 0 .../derive/tests/ui_fail/uninhabited_enum.rs | 0 .../derive/tests/ui_fail/uninhabited_enum.stderr | 0 .../derive/tests/ui_pass/ffi_export_arg_pattern.rs | 0 {ffi => iroha_ffi}/src/handle.rs | 0 {ffi => iroha_ffi}/src/ir.rs | 0 {ffi => iroha_ffi}/src/lib.rs | 0 {ffi => iroha_ffi}/src/option.rs | 0 {ffi => iroha_ffi}/src/primitives.rs | 0 {ffi => iroha_ffi}/src/repr_c.rs | 0 {ffi => iroha_ffi}/src/slice.rs | 0 {ffi => iroha_ffi}/src/std_impls.rs | 0 {ffi => iroha_ffi}/tests/export_getset.rs | 0 {ffi => iroha_ffi}/tests/export_shared_fns.rs | 0 {ffi => iroha_ffi}/tests/ffi_export.rs | 0 {ffi => iroha_ffi}/tests/ffi_export_import_u128_i128.rs | 0 {ffi => iroha_ffi}/tests/ffi_import.rs | 0 {ffi => iroha_ffi}/tests/ffi_import_opaque.rs | 0 {ffi => iroha_ffi}/tests/generics.rs | 0 {ffi => iroha_ffi}/tests/import_getset.rs | 0 {ffi => iroha_ffi}/tests/import_shared_fns.rs | 0 {ffi => iroha_ffi}/tests/transparent.rs | 0 {ffi => iroha_ffi}/tests/unambiguous.rs | 0 60 files changed, 3 insertions(+), 4 deletions(-) rename {ffi => iroha_ffi}/.cargo/config.toml (100%) rename {ffi => iroha_ffi}/Cargo.toml (100%) rename {ffi => iroha_ffi}/derive/Cargo.toml (100%) rename {ffi => iroha_ffi}/derive/src/attr_parse/derive.rs (100%) rename {ffi => iroha_ffi}/derive/src/attr_parse/doc.rs (100%) rename {ffi => iroha_ffi}/derive/src/attr_parse/getset.rs (100%) rename {ffi => iroha_ffi}/derive/src/attr_parse/mod.rs (100%) rename {ffi => iroha_ffi}/derive/src/attr_parse/repr.rs (100%) rename {ffi => iroha_ffi}/derive/src/convert.rs (100%) rename {ffi => iroha_ffi}/derive/src/ffi_fn.rs (100%) rename {ffi => iroha_ffi}/derive/src/getset_gen.rs (100%) rename {ffi => iroha_ffi}/derive/src/impl_visitor.rs (100%) rename {ffi => iroha_ffi}/derive/src/lib.rs (100%) rename {ffi => iroha_ffi}/derive/src/wrapper.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/array_as_ptr.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/array_as_ptr.stderr (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/derive_skip_field.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/derive_skip_field.stderr (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/derive_skip_struct.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/derive_skip_struct.stderr (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/fallible_transmute_mut_ref.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/fallible_transmute_mut_ref.stderr (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/fieldless_enum_without_repr.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/fieldless_enum_without_repr.stderr (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/nested_owned_structure.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/nested_owned_structure.stderr (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/non_robust_repr_c.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/non_robust_repr_c.stderr (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/raw_pointer_type.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/raw_pointer_type.stderr (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/uninhabited_enum.rs (100%) rename {ffi => iroha_ffi}/derive/tests/ui_fail/uninhabited_enum.stderr (100%) rename {ffi => iroha_ffi}/derive/tests/ui_pass/ffi_export_arg_pattern.rs (100%) rename {ffi => iroha_ffi}/src/handle.rs (100%) rename {ffi => iroha_ffi}/src/ir.rs (100%) rename {ffi => iroha_ffi}/src/lib.rs (100%) rename {ffi => iroha_ffi}/src/option.rs (100%) rename {ffi => iroha_ffi}/src/primitives.rs (100%) rename {ffi => iroha_ffi}/src/repr_c.rs (100%) rename {ffi => iroha_ffi}/src/slice.rs (100%) rename {ffi => iroha_ffi}/src/std_impls.rs (100%) rename {ffi => iroha_ffi}/tests/export_getset.rs (100%) rename {ffi => iroha_ffi}/tests/export_shared_fns.rs (100%) rename {ffi => iroha_ffi}/tests/ffi_export.rs (100%) rename {ffi => iroha_ffi}/tests/ffi_export_import_u128_i128.rs (100%) rename {ffi => iroha_ffi}/tests/ffi_import.rs (100%) rename {ffi => iroha_ffi}/tests/ffi_import_opaque.rs (100%) rename {ffi => iroha_ffi}/tests/generics.rs (100%) rename {ffi => iroha_ffi}/tests/import_getset.rs (100%) rename {ffi => iroha_ffi}/tests/import_shared_fns.rs (100%) rename {ffi => iroha_ffi}/tests/transparent.rs (100%) rename {ffi => iroha_ffi}/tests/unambiguous.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 7deff3bd874..eb3c5a5dc21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ iroha_crypto = { version = "=2.0.0-rc.1.0", path = "iroha_crypto", default-featu iroha_macro = { version = "=2.0.0-rc.1.0", path = "iroha_macro", default-features = false } iroha_futures = { version = "=2.0.0-rc.1.0", path = "iroha_futures" } iroha_genesis = { version = "=2.0.0-rc.1.0", path = "iroha_genesis" } -iroha_ffi = { version = "=2.0.0-rc.1.0", path = "ffi" } +iroha_ffi = { version = "=2.0.0-rc.1.0", path = "iroha_ffi" } iroha_version = { version = "=2.0.0-rc.1.0", path = "iroha_version", default-features = false } iroha_wasm_codec = { version = "=2.0.0-rc.1.0", path = "wasm_codec" } iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "wasm_builder" } @@ -212,9 +212,8 @@ members = [ "primitives", "primitives/derive", "primitives/numeric", - - "ffi", - "ffi/derive", + "iroha_ffi", + "iroha_ffi/derive", "schema", "schema/gen", diff --git a/ffi/.cargo/config.toml b/iroha_ffi/.cargo/config.toml similarity index 100% rename from ffi/.cargo/config.toml rename to iroha_ffi/.cargo/config.toml diff --git a/ffi/Cargo.toml b/iroha_ffi/Cargo.toml similarity index 100% rename from ffi/Cargo.toml rename to iroha_ffi/Cargo.toml diff --git a/ffi/derive/Cargo.toml b/iroha_ffi/derive/Cargo.toml similarity index 100% rename from ffi/derive/Cargo.toml rename to iroha_ffi/derive/Cargo.toml diff --git a/ffi/derive/src/attr_parse/derive.rs b/iroha_ffi/derive/src/attr_parse/derive.rs similarity index 100% rename from ffi/derive/src/attr_parse/derive.rs rename to iroha_ffi/derive/src/attr_parse/derive.rs diff --git a/ffi/derive/src/attr_parse/doc.rs b/iroha_ffi/derive/src/attr_parse/doc.rs similarity index 100% rename from ffi/derive/src/attr_parse/doc.rs rename to iroha_ffi/derive/src/attr_parse/doc.rs diff --git a/ffi/derive/src/attr_parse/getset.rs b/iroha_ffi/derive/src/attr_parse/getset.rs similarity index 100% rename from ffi/derive/src/attr_parse/getset.rs rename to iroha_ffi/derive/src/attr_parse/getset.rs diff --git a/ffi/derive/src/attr_parse/mod.rs b/iroha_ffi/derive/src/attr_parse/mod.rs similarity index 100% rename from ffi/derive/src/attr_parse/mod.rs rename to iroha_ffi/derive/src/attr_parse/mod.rs diff --git a/ffi/derive/src/attr_parse/repr.rs b/iroha_ffi/derive/src/attr_parse/repr.rs similarity index 100% rename from ffi/derive/src/attr_parse/repr.rs rename to iroha_ffi/derive/src/attr_parse/repr.rs diff --git a/ffi/derive/src/convert.rs b/iroha_ffi/derive/src/convert.rs similarity index 100% rename from ffi/derive/src/convert.rs rename to iroha_ffi/derive/src/convert.rs diff --git a/ffi/derive/src/ffi_fn.rs b/iroha_ffi/derive/src/ffi_fn.rs similarity index 100% rename from ffi/derive/src/ffi_fn.rs rename to iroha_ffi/derive/src/ffi_fn.rs diff --git a/ffi/derive/src/getset_gen.rs b/iroha_ffi/derive/src/getset_gen.rs similarity index 100% rename from ffi/derive/src/getset_gen.rs rename to iroha_ffi/derive/src/getset_gen.rs diff --git a/ffi/derive/src/impl_visitor.rs b/iroha_ffi/derive/src/impl_visitor.rs similarity index 100% rename from ffi/derive/src/impl_visitor.rs rename to iroha_ffi/derive/src/impl_visitor.rs diff --git a/ffi/derive/src/lib.rs b/iroha_ffi/derive/src/lib.rs similarity index 100% rename from ffi/derive/src/lib.rs rename to iroha_ffi/derive/src/lib.rs diff --git a/ffi/derive/src/wrapper.rs b/iroha_ffi/derive/src/wrapper.rs similarity index 100% rename from ffi/derive/src/wrapper.rs rename to iroha_ffi/derive/src/wrapper.rs diff --git a/ffi/derive/tests/ui.rs b/iroha_ffi/derive/tests/ui.rs similarity index 100% rename from ffi/derive/tests/ui.rs rename to iroha_ffi/derive/tests/ui.rs diff --git a/ffi/derive/tests/ui_fail/array_as_ptr.rs b/iroha_ffi/derive/tests/ui_fail/array_as_ptr.rs similarity index 100% rename from ffi/derive/tests/ui_fail/array_as_ptr.rs rename to iroha_ffi/derive/tests/ui_fail/array_as_ptr.rs diff --git a/ffi/derive/tests/ui_fail/array_as_ptr.stderr b/iroha_ffi/derive/tests/ui_fail/array_as_ptr.stderr similarity index 100% rename from ffi/derive/tests/ui_fail/array_as_ptr.stderr rename to iroha_ffi/derive/tests/ui_fail/array_as_ptr.stderr diff --git a/ffi/derive/tests/ui_fail/derive_skip_field.rs b/iroha_ffi/derive/tests/ui_fail/derive_skip_field.rs similarity index 100% rename from ffi/derive/tests/ui_fail/derive_skip_field.rs rename to iroha_ffi/derive/tests/ui_fail/derive_skip_field.rs diff --git a/ffi/derive/tests/ui_fail/derive_skip_field.stderr b/iroha_ffi/derive/tests/ui_fail/derive_skip_field.stderr similarity index 100% rename from ffi/derive/tests/ui_fail/derive_skip_field.stderr rename to iroha_ffi/derive/tests/ui_fail/derive_skip_field.stderr diff --git a/ffi/derive/tests/ui_fail/derive_skip_struct.rs b/iroha_ffi/derive/tests/ui_fail/derive_skip_struct.rs similarity index 100% rename from ffi/derive/tests/ui_fail/derive_skip_struct.rs rename to iroha_ffi/derive/tests/ui_fail/derive_skip_struct.rs diff --git a/ffi/derive/tests/ui_fail/derive_skip_struct.stderr b/iroha_ffi/derive/tests/ui_fail/derive_skip_struct.stderr similarity index 100% rename from ffi/derive/tests/ui_fail/derive_skip_struct.stderr rename to iroha_ffi/derive/tests/ui_fail/derive_skip_struct.stderr diff --git a/ffi/derive/tests/ui_fail/fallible_transmute_mut_ref.rs b/iroha_ffi/derive/tests/ui_fail/fallible_transmute_mut_ref.rs similarity index 100% rename from ffi/derive/tests/ui_fail/fallible_transmute_mut_ref.rs rename to iroha_ffi/derive/tests/ui_fail/fallible_transmute_mut_ref.rs diff --git a/ffi/derive/tests/ui_fail/fallible_transmute_mut_ref.stderr b/iroha_ffi/derive/tests/ui_fail/fallible_transmute_mut_ref.stderr similarity index 100% rename from ffi/derive/tests/ui_fail/fallible_transmute_mut_ref.stderr rename to iroha_ffi/derive/tests/ui_fail/fallible_transmute_mut_ref.stderr diff --git a/ffi/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs b/iroha_ffi/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs similarity index 100% rename from ffi/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs rename to iroha_ffi/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs diff --git a/ffi/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr b/iroha_ffi/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr similarity index 100% rename from ffi/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr rename to iroha_ffi/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr diff --git a/ffi/derive/tests/ui_fail/fieldless_enum_without_repr.rs b/iroha_ffi/derive/tests/ui_fail/fieldless_enum_without_repr.rs similarity index 100% rename from ffi/derive/tests/ui_fail/fieldless_enum_without_repr.rs rename to iroha_ffi/derive/tests/ui_fail/fieldless_enum_without_repr.rs diff --git a/ffi/derive/tests/ui_fail/fieldless_enum_without_repr.stderr b/iroha_ffi/derive/tests/ui_fail/fieldless_enum_without_repr.stderr similarity index 100% rename from ffi/derive/tests/ui_fail/fieldless_enum_without_repr.stderr rename to iroha_ffi/derive/tests/ui_fail/fieldless_enum_without_repr.stderr diff --git a/ffi/derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs b/iroha_ffi/derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs similarity index 100% rename from ffi/derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs rename to iroha_ffi/derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs diff --git a/ffi/derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr b/iroha_ffi/derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr similarity index 100% rename from ffi/derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr rename to iroha_ffi/derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr diff --git a/ffi/derive/tests/ui_fail/nested_owned_structure.rs b/iroha_ffi/derive/tests/ui_fail/nested_owned_structure.rs similarity index 100% rename from ffi/derive/tests/ui_fail/nested_owned_structure.rs rename to iroha_ffi/derive/tests/ui_fail/nested_owned_structure.rs diff --git a/ffi/derive/tests/ui_fail/nested_owned_structure.stderr b/iroha_ffi/derive/tests/ui_fail/nested_owned_structure.stderr similarity index 100% rename from ffi/derive/tests/ui_fail/nested_owned_structure.stderr rename to iroha_ffi/derive/tests/ui_fail/nested_owned_structure.stderr diff --git a/ffi/derive/tests/ui_fail/non_robust_repr_c.rs b/iroha_ffi/derive/tests/ui_fail/non_robust_repr_c.rs similarity index 100% rename from ffi/derive/tests/ui_fail/non_robust_repr_c.rs rename to iroha_ffi/derive/tests/ui_fail/non_robust_repr_c.rs diff --git a/ffi/derive/tests/ui_fail/non_robust_repr_c.stderr b/iroha_ffi/derive/tests/ui_fail/non_robust_repr_c.stderr similarity index 100% rename from ffi/derive/tests/ui_fail/non_robust_repr_c.stderr rename to iroha_ffi/derive/tests/ui_fail/non_robust_repr_c.stderr diff --git a/ffi/derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs b/iroha_ffi/derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs similarity index 100% rename from ffi/derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs rename to iroha_ffi/derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs diff --git a/ffi/derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr b/iroha_ffi/derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr similarity index 100% rename from ffi/derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr rename to iroha_ffi/derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr diff --git a/ffi/derive/tests/ui_fail/raw_pointer_type.rs b/iroha_ffi/derive/tests/ui_fail/raw_pointer_type.rs similarity index 100% rename from ffi/derive/tests/ui_fail/raw_pointer_type.rs rename to iroha_ffi/derive/tests/ui_fail/raw_pointer_type.rs diff --git a/ffi/derive/tests/ui_fail/raw_pointer_type.stderr b/iroha_ffi/derive/tests/ui_fail/raw_pointer_type.stderr similarity index 100% rename from ffi/derive/tests/ui_fail/raw_pointer_type.stderr rename to iroha_ffi/derive/tests/ui_fail/raw_pointer_type.stderr diff --git a/ffi/derive/tests/ui_fail/uninhabited_enum.rs b/iroha_ffi/derive/tests/ui_fail/uninhabited_enum.rs similarity index 100% rename from ffi/derive/tests/ui_fail/uninhabited_enum.rs rename to iroha_ffi/derive/tests/ui_fail/uninhabited_enum.rs diff --git a/ffi/derive/tests/ui_fail/uninhabited_enum.stderr b/iroha_ffi/derive/tests/ui_fail/uninhabited_enum.stderr similarity index 100% rename from ffi/derive/tests/ui_fail/uninhabited_enum.stderr rename to iroha_ffi/derive/tests/ui_fail/uninhabited_enum.stderr diff --git a/ffi/derive/tests/ui_pass/ffi_export_arg_pattern.rs b/iroha_ffi/derive/tests/ui_pass/ffi_export_arg_pattern.rs similarity index 100% rename from ffi/derive/tests/ui_pass/ffi_export_arg_pattern.rs rename to iroha_ffi/derive/tests/ui_pass/ffi_export_arg_pattern.rs diff --git a/ffi/src/handle.rs b/iroha_ffi/src/handle.rs similarity index 100% rename from ffi/src/handle.rs rename to iroha_ffi/src/handle.rs diff --git a/ffi/src/ir.rs b/iroha_ffi/src/ir.rs similarity index 100% rename from ffi/src/ir.rs rename to iroha_ffi/src/ir.rs diff --git a/ffi/src/lib.rs b/iroha_ffi/src/lib.rs similarity index 100% rename from ffi/src/lib.rs rename to iroha_ffi/src/lib.rs diff --git a/ffi/src/option.rs b/iroha_ffi/src/option.rs similarity index 100% rename from ffi/src/option.rs rename to iroha_ffi/src/option.rs diff --git a/ffi/src/primitives.rs b/iroha_ffi/src/primitives.rs similarity index 100% rename from ffi/src/primitives.rs rename to iroha_ffi/src/primitives.rs diff --git a/ffi/src/repr_c.rs b/iroha_ffi/src/repr_c.rs similarity index 100% rename from ffi/src/repr_c.rs rename to iroha_ffi/src/repr_c.rs diff --git a/ffi/src/slice.rs b/iroha_ffi/src/slice.rs similarity index 100% rename from ffi/src/slice.rs rename to iroha_ffi/src/slice.rs diff --git a/ffi/src/std_impls.rs b/iroha_ffi/src/std_impls.rs similarity index 100% rename from ffi/src/std_impls.rs rename to iroha_ffi/src/std_impls.rs diff --git a/ffi/tests/export_getset.rs b/iroha_ffi/tests/export_getset.rs similarity index 100% rename from ffi/tests/export_getset.rs rename to iroha_ffi/tests/export_getset.rs diff --git a/ffi/tests/export_shared_fns.rs b/iroha_ffi/tests/export_shared_fns.rs similarity index 100% rename from ffi/tests/export_shared_fns.rs rename to iroha_ffi/tests/export_shared_fns.rs diff --git a/ffi/tests/ffi_export.rs b/iroha_ffi/tests/ffi_export.rs similarity index 100% rename from ffi/tests/ffi_export.rs rename to iroha_ffi/tests/ffi_export.rs diff --git a/ffi/tests/ffi_export_import_u128_i128.rs b/iroha_ffi/tests/ffi_export_import_u128_i128.rs similarity index 100% rename from ffi/tests/ffi_export_import_u128_i128.rs rename to iroha_ffi/tests/ffi_export_import_u128_i128.rs diff --git a/ffi/tests/ffi_import.rs b/iroha_ffi/tests/ffi_import.rs similarity index 100% rename from ffi/tests/ffi_import.rs rename to iroha_ffi/tests/ffi_import.rs diff --git a/ffi/tests/ffi_import_opaque.rs b/iroha_ffi/tests/ffi_import_opaque.rs similarity index 100% rename from ffi/tests/ffi_import_opaque.rs rename to iroha_ffi/tests/ffi_import_opaque.rs diff --git a/ffi/tests/generics.rs b/iroha_ffi/tests/generics.rs similarity index 100% rename from ffi/tests/generics.rs rename to iroha_ffi/tests/generics.rs diff --git a/ffi/tests/import_getset.rs b/iroha_ffi/tests/import_getset.rs similarity index 100% rename from ffi/tests/import_getset.rs rename to iroha_ffi/tests/import_getset.rs diff --git a/ffi/tests/import_shared_fns.rs b/iroha_ffi/tests/import_shared_fns.rs similarity index 100% rename from ffi/tests/import_shared_fns.rs rename to iroha_ffi/tests/import_shared_fns.rs diff --git a/ffi/tests/transparent.rs b/iroha_ffi/tests/transparent.rs similarity index 100% rename from ffi/tests/transparent.rs rename to iroha_ffi/tests/transparent.rs diff --git a/ffi/tests/unambiguous.rs b/iroha_ffi/tests/unambiguous.rs similarity index 100% rename from ffi/tests/unambiguous.rs rename to iroha_ffi/tests/unambiguous.rs From 702a0312ca9e83209c03fb5678cad832aaa5d13e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 16:22:58 +0400 Subject: [PATCH 16/59] refactor: rename `executor` directory to `iroha_executor` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 13 ++++++------- iroha_data_model/src/lib.rs | 2 +- {executor => iroha_executor}/Cargo.toml | 0 {executor => iroha_executor}/data_model/Cargo.toml | 0 .../data_model/derive/Cargo.toml | 0 .../data_model/derive/src/lib.rs | 0 .../data_model/derive/src/parameter.rs | 0 .../data_model/derive/src/permission.rs | 0 {executor => iroha_executor}/data_model/src/lib.rs | 0 .../data_model/src/parameter.rs | 0 .../data_model/src/permission.rs | 0 {executor => iroha_executor}/derive/Cargo.toml | 0 {executor => iroha_executor}/derive/src/default.rs | 0 .../derive/src/entrypoint.rs | 0 {executor => iroha_executor}/derive/src/lib.rs | 0 {executor => iroha_executor}/src/default.rs | 0 {executor => iroha_executor}/src/lib.rs | 0 {executor => iroha_executor}/src/permission.rs | 0 wasm_samples/Cargo.toml | 4 ++-- 19 files changed, 9 insertions(+), 10 deletions(-) rename {executor => iroha_executor}/Cargo.toml (100%) rename {executor => iroha_executor}/data_model/Cargo.toml (100%) rename {executor => iroha_executor}/data_model/derive/Cargo.toml (100%) rename {executor => iroha_executor}/data_model/derive/src/lib.rs (100%) rename {executor => iroha_executor}/data_model/derive/src/parameter.rs (100%) rename {executor => iroha_executor}/data_model/derive/src/permission.rs (100%) rename {executor => iroha_executor}/data_model/src/lib.rs (100%) rename {executor => iroha_executor}/data_model/src/parameter.rs (100%) rename {executor => iroha_executor}/data_model/src/permission.rs (100%) rename {executor => iroha_executor}/derive/Cargo.toml (100%) rename {executor => iroha_executor}/derive/src/default.rs (100%) rename {executor => iroha_executor}/derive/src/entrypoint.rs (100%) rename {executor => iroha_executor}/derive/src/lib.rs (100%) rename {executor => iroha_executor}/src/default.rs (100%) rename {executor => iroha_executor}/src/lib.rs (100%) rename {executor => iroha_executor}/src/permission.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index eb3c5a5dc21..9d283e768fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,8 +44,8 @@ iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "wasm_builder" } iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "smart_contract" } iroha_smart_contract_utils = { version = "=2.0.0-rc.1.0", path = "smart_contract/utils" } -iroha_executor = { version = "=2.0.0-rc.1.0", path = "executor" } -iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "executor/data_model" } +iroha_executor = { version = "=2.0.0-rc.1.0", path = "iroha_executor" } +iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_executor/data_model" } test_network = { version = "=2.0.0-rc.1.0", path = "iroha_core/test_network" } test_samples = { version = "=2.0.0-rc.1.0", path = "test_samples" } @@ -225,11 +225,10 @@ members = [ "trigger", "trigger/derive", - - "executor", - "executor/derive", - "executor/data_model", - "executor/data_model/derive", + "iroha_executor", + "iroha_executor/derive", + "iroha_executor/data_model", + "iroha_executor/data_model/derive", "iroha_telemetry", "test_samples", diff --git a/iroha_data_model/src/lib.rs b/iroha_data_model/src/lib.rs index 09d360f6f6a..b0f296f2845 100644 --- a/iroha_data_model/src/lib.rs +++ b/iroha_data_model/src/lib.rs @@ -281,7 +281,7 @@ mod model { /// (because *Runtime Executor* actually does execution too) and other names /// (like *Verification* or *Execution*) are being discussed. /// - /// TODO: Move to `executor` module + /// TODO: Move to `iroha_executor` module #[derive( Debug, displaydoc::Display, diff --git a/executor/Cargo.toml b/iroha_executor/Cargo.toml similarity index 100% rename from executor/Cargo.toml rename to iroha_executor/Cargo.toml diff --git a/executor/data_model/Cargo.toml b/iroha_executor/data_model/Cargo.toml similarity index 100% rename from executor/data_model/Cargo.toml rename to iroha_executor/data_model/Cargo.toml diff --git a/executor/data_model/derive/Cargo.toml b/iroha_executor/data_model/derive/Cargo.toml similarity index 100% rename from executor/data_model/derive/Cargo.toml rename to iroha_executor/data_model/derive/Cargo.toml diff --git a/executor/data_model/derive/src/lib.rs b/iroha_executor/data_model/derive/src/lib.rs similarity index 100% rename from executor/data_model/derive/src/lib.rs rename to iroha_executor/data_model/derive/src/lib.rs diff --git a/executor/data_model/derive/src/parameter.rs b/iroha_executor/data_model/derive/src/parameter.rs similarity index 100% rename from executor/data_model/derive/src/parameter.rs rename to iroha_executor/data_model/derive/src/parameter.rs diff --git a/executor/data_model/derive/src/permission.rs b/iroha_executor/data_model/derive/src/permission.rs similarity index 100% rename from executor/data_model/derive/src/permission.rs rename to iroha_executor/data_model/derive/src/permission.rs diff --git a/executor/data_model/src/lib.rs b/iroha_executor/data_model/src/lib.rs similarity index 100% rename from executor/data_model/src/lib.rs rename to iroha_executor/data_model/src/lib.rs diff --git a/executor/data_model/src/parameter.rs b/iroha_executor/data_model/src/parameter.rs similarity index 100% rename from executor/data_model/src/parameter.rs rename to iroha_executor/data_model/src/parameter.rs diff --git a/executor/data_model/src/permission.rs b/iroha_executor/data_model/src/permission.rs similarity index 100% rename from executor/data_model/src/permission.rs rename to iroha_executor/data_model/src/permission.rs diff --git a/executor/derive/Cargo.toml b/iroha_executor/derive/Cargo.toml similarity index 100% rename from executor/derive/Cargo.toml rename to iroha_executor/derive/Cargo.toml diff --git a/executor/derive/src/default.rs b/iroha_executor/derive/src/default.rs similarity index 100% rename from executor/derive/src/default.rs rename to iroha_executor/derive/src/default.rs diff --git a/executor/derive/src/entrypoint.rs b/iroha_executor/derive/src/entrypoint.rs similarity index 100% rename from executor/derive/src/entrypoint.rs rename to iroha_executor/derive/src/entrypoint.rs diff --git a/executor/derive/src/lib.rs b/iroha_executor/derive/src/lib.rs similarity index 100% rename from executor/derive/src/lib.rs rename to iroha_executor/derive/src/lib.rs diff --git a/executor/src/default.rs b/iroha_executor/src/default.rs similarity index 100% rename from executor/src/default.rs rename to iroha_executor/src/default.rs diff --git a/executor/src/lib.rs b/iroha_executor/src/lib.rs similarity index 100% rename from executor/src/lib.rs rename to iroha_executor/src/lib.rs diff --git a/executor/src/permission.rs b/iroha_executor/src/permission.rs similarity index 100% rename from executor/src/permission.rs rename to iroha_executor/src/permission.rs diff --git a/wasm_samples/Cargo.toml b/wasm_samples/Cargo.toml index 9139f91b50e..28b79b55876 100644 --- a/wasm_samples/Cargo.toml +++ b/wasm_samples/Cargo.toml @@ -42,10 +42,10 @@ executor_custom_data_model = { path = "executor_custom_data_model" } iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "../smart_contract", features = ["debug"] } iroha_trigger = { version = "=2.0.0-rc.1.0", path = "../trigger", features = ["debug"] } -iroha_executor = { version = "=2.0.0-rc.1.0", path = "../executor", features = ["debug"] } +iroha_executor = { version = "=2.0.0-rc.1.0", path = "../iroha_executor", features = ["debug"] } iroha_schema = { version = "=2.0.0-rc.1.0", path = "../schema" } iroha_data_model = { version = "=2.0.0-rc.1.0", path = "../iroha_data_model", default-features = false } -iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "../executor/data_model" } +iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "../iroha_executor/data_model" } parity-scale-codec = { version = "3.2.1", default-features = false } anyhow = { version = "1.0.71", default-features = false } From 66948ea2c4606f687a8d39b194ad088108b61147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 16:26:09 +0400 Subject: [PATCH 17/59] refactor: rename `trigger` directory to `iroha_trigger` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 5 ++--- iroha_data_model/src/events/trigger_completed.rs | 2 +- {trigger => iroha_trigger}/Cargo.toml | 0 {trigger => iroha_trigger}/derive/Cargo.toml | 0 {trigger => iroha_trigger}/derive/src/entrypoint.rs | 0 {trigger => iroha_trigger}/derive/src/lib.rs | 0 {trigger => iroha_trigger}/src/lib.rs | 0 wasm_samples/Cargo.toml | 2 +- 8 files changed, 4 insertions(+), 5 deletions(-) rename {trigger => iroha_trigger}/Cargo.toml (100%) rename {trigger => iroha_trigger}/derive/Cargo.toml (100%) rename {trigger => iroha_trigger}/derive/src/entrypoint.rs (100%) rename {trigger => iroha_trigger}/derive/src/lib.rs (100%) rename {trigger => iroha_trigger}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 9d283e768fa..0d749dea618 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -222,9 +222,8 @@ members = [ "smart_contract", "smart_contract/derive", "smart_contract/utils", - - "trigger", - "trigger/derive", + "iroha_trigger", + "iroha_trigger/derive", "iroha_executor", "iroha_executor/derive", "iroha_executor/data_model", diff --git a/iroha_data_model/src/events/trigger_completed.rs b/iroha_data_model/src/events/trigger_completed.rs index 05c34842392..03086ddfd54 100644 --- a/iroha_data_model/src/events/trigger_completed.rs +++ b/iroha_data_model/src/events/trigger_completed.rs @@ -75,7 +75,7 @@ mod model { } /// Filter [`TriggerCompletedEvent`] by - /// 1. if `triger_id` is some filter based on trigger id + /// 1. if `trigger_id` is some filter based on trigger id /// 2. if `outcome_type` is some filter based on execution outcome (success/failure) /// 3. if both fields are none accept every event of this type #[derive( diff --git a/trigger/Cargo.toml b/iroha_trigger/Cargo.toml similarity index 100% rename from trigger/Cargo.toml rename to iroha_trigger/Cargo.toml diff --git a/trigger/derive/Cargo.toml b/iroha_trigger/derive/Cargo.toml similarity index 100% rename from trigger/derive/Cargo.toml rename to iroha_trigger/derive/Cargo.toml diff --git a/trigger/derive/src/entrypoint.rs b/iroha_trigger/derive/src/entrypoint.rs similarity index 100% rename from trigger/derive/src/entrypoint.rs rename to iroha_trigger/derive/src/entrypoint.rs diff --git a/trigger/derive/src/lib.rs b/iroha_trigger/derive/src/lib.rs similarity index 100% rename from trigger/derive/src/lib.rs rename to iroha_trigger/derive/src/lib.rs diff --git a/trigger/src/lib.rs b/iroha_trigger/src/lib.rs similarity index 100% rename from trigger/src/lib.rs rename to iroha_trigger/src/lib.rs diff --git a/wasm_samples/Cargo.toml b/wasm_samples/Cargo.toml index 28b79b55876..8d57ff5a338 100644 --- a/wasm_samples/Cargo.toml +++ b/wasm_samples/Cargo.toml @@ -41,7 +41,7 @@ codegen-units = 1 # Further reduces binary size but increases compilation time executor_custom_data_model = { path = "executor_custom_data_model" } iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "../smart_contract", features = ["debug"] } -iroha_trigger = { version = "=2.0.0-rc.1.0", path = "../trigger", features = ["debug"] } +iroha_trigger = { version = "=2.0.0-rc.1.0", path = "../iroha_trigger", features = ["debug"] } iroha_executor = { version = "=2.0.0-rc.1.0", path = "../iroha_executor", features = ["debug"] } iroha_schema = { version = "=2.0.0-rc.1.0", path = "../schema" } iroha_data_model = { version = "=2.0.0-rc.1.0", path = "../iroha_data_model", default-features = false } From 13846de85fd0e7de0b1992c3052c4261f1691891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 16:26:55 +0400 Subject: [PATCH 18/59] refactor: rename `smart_contract` directory to `iroha_smart_contract` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .github/workflows/iroha2-dev-pr-wasm.yaml | 10 +++++----- Cargo.toml | 11 +++++------ .../.cargo/config.toml | 0 {smart_contract => iroha_smart_contract}/Cargo.toml | 0 {smart_contract => iroha_smart_contract}/LICENSE | 0 {smart_contract => iroha_smart_contract}/README.md | 0 .../derive/Cargo.toml | 0 .../derive/src/entrypoint.rs | 0 .../derive/src/lib.rs | 0 {smart_contract => iroha_smart_contract}/src/lib.rs | 0 .../utils/Cargo.toml | 0 .../utils/src/debug.rs | 0 .../utils/src/lib.rs | 0 .../utils/src/log.rs | 0 wasm_samples/Cargo.toml | 2 +- 15 files changed, 11 insertions(+), 12 deletions(-) rename {smart_contract => iroha_smart_contract}/.cargo/config.toml (100%) rename {smart_contract => iroha_smart_contract}/Cargo.toml (100%) rename {smart_contract => iroha_smart_contract}/LICENSE (100%) rename {smart_contract => iroha_smart_contract}/README.md (100%) rename {smart_contract => iroha_smart_contract}/derive/Cargo.toml (100%) rename {smart_contract => iroha_smart_contract}/derive/src/entrypoint.rs (100%) rename {smart_contract => iroha_smart_contract}/derive/src/lib.rs (100%) rename {smart_contract => iroha_smart_contract}/src/lib.rs (100%) rename {smart_contract => iroha_smart_contract}/utils/Cargo.toml (100%) rename {smart_contract => iroha_smart_contract}/utils/src/debug.rs (100%) rename {smart_contract => iroha_smart_contract}/utils/src/lib.rs (100%) rename {smart_contract => iroha_smart_contract}/utils/src/log.rs (100%) diff --git a/.github/workflows/iroha2-dev-pr-wasm.yaml b/.github/workflows/iroha2-dev-pr-wasm.yaml index 66f82f5fada..ae1e21e63ef 100644 --- a/.github/workflows/iroha2-dev-pr-wasm.yaml +++ b/.github/workflows/iroha2-dev-pr-wasm.yaml @@ -9,10 +9,10 @@ on: - '../../iroha_data_model/**.json' - '../../iroha_data_model/**.toml' - - 'smart_contract/**.rs' - - 'smart_contract/**.yml' - - 'smart_contract/**.json' - - 'smart_contract/**.toml' + - '../../iroha_smart_contract/**.rs' + - '../../iroha_smart_contract/**.yml' + - '../../iroha_smart_contract/**.json' + - '../../iroha_smart_contract/**.toml' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -56,5 +56,5 @@ jobs: - name: Install iroha_wasm_test_runner run: cargo install --path tools/wasm_test_runner - name: Run smart contract tests on WebAssembly VM - working-directory: smart_contract + working-directory: iroha_smart_contract run: mold --run cargo test -p iroha_smart_contract -p iroha_smart_contract_utils --release --tests --target wasm32-unknown-unknown --no-fail-fast --quiet diff --git a/Cargo.toml b/Cargo.toml index 0d749dea618..9dfb68c712d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,8 +41,8 @@ iroha_version = { version = "=2.0.0-rc.1.0", path = "iroha_version", default-fea iroha_wasm_codec = { version = "=2.0.0-rc.1.0", path = "wasm_codec" } iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "wasm_builder" } -iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "smart_contract" } -iroha_smart_contract_utils = { version = "=2.0.0-rc.1.0", path = "smart_contract/utils" } +iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "iroha_smart_contract" } +iroha_smart_contract_utils = { version = "=2.0.0-rc.1.0", path = "iroha_smart_contract/utils" } iroha_executor = { version = "=2.0.0-rc.1.0", path = "iroha_executor" } iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_executor/data_model" } @@ -218,10 +218,9 @@ members = [ "schema", "schema/gen", "schema/derive", - - "smart_contract", - "smart_contract/derive", - "smart_contract/utils", + "iroha_smart_contract", + "iroha_smart_contract/derive", + "iroha_smart_contract/utils", "iroha_trigger", "iroha_trigger/derive", "iroha_executor", diff --git a/smart_contract/.cargo/config.toml b/iroha_smart_contract/.cargo/config.toml similarity index 100% rename from smart_contract/.cargo/config.toml rename to iroha_smart_contract/.cargo/config.toml diff --git a/smart_contract/Cargo.toml b/iroha_smart_contract/Cargo.toml similarity index 100% rename from smart_contract/Cargo.toml rename to iroha_smart_contract/Cargo.toml diff --git a/smart_contract/LICENSE b/iroha_smart_contract/LICENSE similarity index 100% rename from smart_contract/LICENSE rename to iroha_smart_contract/LICENSE diff --git a/smart_contract/README.md b/iroha_smart_contract/README.md similarity index 100% rename from smart_contract/README.md rename to iroha_smart_contract/README.md diff --git a/smart_contract/derive/Cargo.toml b/iroha_smart_contract/derive/Cargo.toml similarity index 100% rename from smart_contract/derive/Cargo.toml rename to iroha_smart_contract/derive/Cargo.toml diff --git a/smart_contract/derive/src/entrypoint.rs b/iroha_smart_contract/derive/src/entrypoint.rs similarity index 100% rename from smart_contract/derive/src/entrypoint.rs rename to iroha_smart_contract/derive/src/entrypoint.rs diff --git a/smart_contract/derive/src/lib.rs b/iroha_smart_contract/derive/src/lib.rs similarity index 100% rename from smart_contract/derive/src/lib.rs rename to iroha_smart_contract/derive/src/lib.rs diff --git a/smart_contract/src/lib.rs b/iroha_smart_contract/src/lib.rs similarity index 100% rename from smart_contract/src/lib.rs rename to iroha_smart_contract/src/lib.rs diff --git a/smart_contract/utils/Cargo.toml b/iroha_smart_contract/utils/Cargo.toml similarity index 100% rename from smart_contract/utils/Cargo.toml rename to iroha_smart_contract/utils/Cargo.toml diff --git a/smart_contract/utils/src/debug.rs b/iroha_smart_contract/utils/src/debug.rs similarity index 100% rename from smart_contract/utils/src/debug.rs rename to iroha_smart_contract/utils/src/debug.rs diff --git a/smart_contract/utils/src/lib.rs b/iroha_smart_contract/utils/src/lib.rs similarity index 100% rename from smart_contract/utils/src/lib.rs rename to iroha_smart_contract/utils/src/lib.rs diff --git a/smart_contract/utils/src/log.rs b/iroha_smart_contract/utils/src/log.rs similarity index 100% rename from smart_contract/utils/src/log.rs rename to iroha_smart_contract/utils/src/log.rs diff --git a/wasm_samples/Cargo.toml b/wasm_samples/Cargo.toml index 8d57ff5a338..6b46fe9e3d3 100644 --- a/wasm_samples/Cargo.toml +++ b/wasm_samples/Cargo.toml @@ -40,7 +40,7 @@ codegen-units = 1 # Further reduces binary size but increases compilation time [workspace.dependencies] executor_custom_data_model = { path = "executor_custom_data_model" } -iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "../smart_contract", features = ["debug"] } +iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "../iroha_smart_contract", features = ["debug"] } iroha_trigger = { version = "=2.0.0-rc.1.0", path = "../iroha_trigger", features = ["debug"] } iroha_executor = { version = "=2.0.0-rc.1.0", path = "../iroha_executor", features = ["debug"] } iroha_schema = { version = "=2.0.0-rc.1.0", path = "../schema" } From 3a456e2a1109cf343dc52f6c81eca4b679b64a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 16:28:12 +0400 Subject: [PATCH 19/59] refactor: rename `primitives` directory to `iroha_primitives` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 9 ++++----- {primitives => iroha_primitives}/Cargo.toml | 0 {primitives => iroha_primitives}/derive/Cargo.toml | 0 {primitives => iroha_primitives}/derive/src/lib.rs | 0 {primitives => iroha_primitives}/derive/src/numeric.rs | 0 .../derive/src/socket_addr.rs | 0 {primitives => iroha_primitives}/numeric/Cargo.toml | 0 {primitives => iroha_primitives}/numeric/src/lib.rs | 0 {primitives => iroha_primitives}/src/addr.rs | 0 {primitives => iroha_primitives}/src/cmpext.rs | 0 {primitives => iroha_primitives}/src/const_vec.rs | 0 {primitives => iroha_primitives}/src/conststr.rs | 0 {primitives => iroha_primitives}/src/json.rs | 0 {primitives => iroha_primitives}/src/lib.rs | 0 {primitives => iroha_primitives}/src/must_use.rs | 0 {primitives => iroha_primitives}/src/numeric.rs | 0 {primitives => iroha_primitives}/src/riffle_iter.rs | 0 {primitives => iroha_primitives}/src/small.rs | 0 {primitives => iroha_primitives}/src/time.rs | 0 {primitives => iroha_primitives}/src/unique_vec.rs | 0 {primitives => iroha_primitives}/tests/ui.rs | 0 .../tests/ui_fail/must_use_not_used.rs | 0 .../tests/ui_fail/must_use_not_used.stderr | 0 23 files changed, 4 insertions(+), 5 deletions(-) rename {primitives => iroha_primitives}/Cargo.toml (100%) rename {primitives => iroha_primitives}/derive/Cargo.toml (100%) rename {primitives => iroha_primitives}/derive/src/lib.rs (100%) rename {primitives => iroha_primitives}/derive/src/numeric.rs (100%) rename {primitives => iroha_primitives}/derive/src/socket_addr.rs (100%) rename {primitives => iroha_primitives}/numeric/Cargo.toml (100%) rename {primitives => iroha_primitives}/numeric/src/lib.rs (100%) rename {primitives => iroha_primitives}/src/addr.rs (100%) rename {primitives => iroha_primitives}/src/cmpext.rs (100%) rename {primitives => iroha_primitives}/src/const_vec.rs (100%) rename {primitives => iroha_primitives}/src/conststr.rs (100%) rename {primitives => iroha_primitives}/src/json.rs (100%) rename {primitives => iroha_primitives}/src/lib.rs (100%) rename {primitives => iroha_primitives}/src/must_use.rs (100%) rename {primitives => iroha_primitives}/src/numeric.rs (100%) rename {primitives => iroha_primitives}/src/riffle_iter.rs (100%) rename {primitives => iroha_primitives}/src/small.rs (100%) rename {primitives => iroha_primitives}/src/time.rs (100%) rename {primitives => iroha_primitives}/src/unique_vec.rs (100%) rename {primitives => iroha_primitives}/tests/ui.rs (100%) rename {primitives => iroha_primitives}/tests/ui_fail/must_use_not_used.rs (100%) rename {primitives => iroha_primitives}/tests/ui_fail/must_use_not_used.stderr (100%) diff --git a/Cargo.toml b/Cargo.toml index 9dfb68c712d..d933ddeae2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ iroha = { version = "=2.0.0-rc.1.0", path = "iroha" } iroha_macro_utils = { version = "=2.0.0-rc.1.0", path = "iroha_macro/utils" } iroha_telemetry = { version = "=2.0.0-rc.1.0", path = "iroha_telemetry" } iroha_p2p = { version = "=2.0.0-rc.1.0", path = "iroha_p2p" } -iroha_primitives = { version = "=2.0.0-rc.1.0", path = "primitives", default-features = false } +iroha_primitives = { version = "=2.0.0-rc.1.0", path = "iroha_primitives", default-features = false } iroha_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_data_model", default-features = false } iroha_config = { version = "=2.0.0-rc.1.0", path = "iroha_config" } iroha_config_base = { version = "=2.0.0-rc.1.0", path = "iroha_config/base" } @@ -208,10 +208,9 @@ members = [ "iroha_p2p", "iroha_futures", "iroha_futures/derive", - - "primitives", - "primitives/derive", - "primitives/numeric", + "iroha_primitives", + "iroha_primitives/derive", + "iroha_primitives/numeric", "iroha_ffi", "iroha_ffi/derive", diff --git a/primitives/Cargo.toml b/iroha_primitives/Cargo.toml similarity index 100% rename from primitives/Cargo.toml rename to iroha_primitives/Cargo.toml diff --git a/primitives/derive/Cargo.toml b/iroha_primitives/derive/Cargo.toml similarity index 100% rename from primitives/derive/Cargo.toml rename to iroha_primitives/derive/Cargo.toml diff --git a/primitives/derive/src/lib.rs b/iroha_primitives/derive/src/lib.rs similarity index 100% rename from primitives/derive/src/lib.rs rename to iroha_primitives/derive/src/lib.rs diff --git a/primitives/derive/src/numeric.rs b/iroha_primitives/derive/src/numeric.rs similarity index 100% rename from primitives/derive/src/numeric.rs rename to iroha_primitives/derive/src/numeric.rs diff --git a/primitives/derive/src/socket_addr.rs b/iroha_primitives/derive/src/socket_addr.rs similarity index 100% rename from primitives/derive/src/socket_addr.rs rename to iroha_primitives/derive/src/socket_addr.rs diff --git a/primitives/numeric/Cargo.toml b/iroha_primitives/numeric/Cargo.toml similarity index 100% rename from primitives/numeric/Cargo.toml rename to iroha_primitives/numeric/Cargo.toml diff --git a/primitives/numeric/src/lib.rs b/iroha_primitives/numeric/src/lib.rs similarity index 100% rename from primitives/numeric/src/lib.rs rename to iroha_primitives/numeric/src/lib.rs diff --git a/primitives/src/addr.rs b/iroha_primitives/src/addr.rs similarity index 100% rename from primitives/src/addr.rs rename to iroha_primitives/src/addr.rs diff --git a/primitives/src/cmpext.rs b/iroha_primitives/src/cmpext.rs similarity index 100% rename from primitives/src/cmpext.rs rename to iroha_primitives/src/cmpext.rs diff --git a/primitives/src/const_vec.rs b/iroha_primitives/src/const_vec.rs similarity index 100% rename from primitives/src/const_vec.rs rename to iroha_primitives/src/const_vec.rs diff --git a/primitives/src/conststr.rs b/iroha_primitives/src/conststr.rs similarity index 100% rename from primitives/src/conststr.rs rename to iroha_primitives/src/conststr.rs diff --git a/primitives/src/json.rs b/iroha_primitives/src/json.rs similarity index 100% rename from primitives/src/json.rs rename to iroha_primitives/src/json.rs diff --git a/primitives/src/lib.rs b/iroha_primitives/src/lib.rs similarity index 100% rename from primitives/src/lib.rs rename to iroha_primitives/src/lib.rs diff --git a/primitives/src/must_use.rs b/iroha_primitives/src/must_use.rs similarity index 100% rename from primitives/src/must_use.rs rename to iroha_primitives/src/must_use.rs diff --git a/primitives/src/numeric.rs b/iroha_primitives/src/numeric.rs similarity index 100% rename from primitives/src/numeric.rs rename to iroha_primitives/src/numeric.rs diff --git a/primitives/src/riffle_iter.rs b/iroha_primitives/src/riffle_iter.rs similarity index 100% rename from primitives/src/riffle_iter.rs rename to iroha_primitives/src/riffle_iter.rs diff --git a/primitives/src/small.rs b/iroha_primitives/src/small.rs similarity index 100% rename from primitives/src/small.rs rename to iroha_primitives/src/small.rs diff --git a/primitives/src/time.rs b/iroha_primitives/src/time.rs similarity index 100% rename from primitives/src/time.rs rename to iroha_primitives/src/time.rs diff --git a/primitives/src/unique_vec.rs b/iroha_primitives/src/unique_vec.rs similarity index 100% rename from primitives/src/unique_vec.rs rename to iroha_primitives/src/unique_vec.rs diff --git a/primitives/tests/ui.rs b/iroha_primitives/tests/ui.rs similarity index 100% rename from primitives/tests/ui.rs rename to iroha_primitives/tests/ui.rs diff --git a/primitives/tests/ui_fail/must_use_not_used.rs b/iroha_primitives/tests/ui_fail/must_use_not_used.rs similarity index 100% rename from primitives/tests/ui_fail/must_use_not_used.rs rename to iroha_primitives/tests/ui_fail/must_use_not_used.rs diff --git a/primitives/tests/ui_fail/must_use_not_used.stderr b/iroha_primitives/tests/ui_fail/must_use_not_used.stderr similarity index 100% rename from primitives/tests/ui_fail/must_use_not_used.stderr rename to iroha_primitives/tests/ui_fail/must_use_not_used.stderr From 26e88c6d64318eeb18b56e1e8a71b7af7f5240d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 16:30:20 +0400 Subject: [PATCH 20/59] refactor: rename `torii` directory to `iroha_torii` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .github/labeler.yml | 4 ++-- .github/workflows/iroha2-dev-pr-static.yml | 16 ++++++++-------- .github/workflows/iroha2-dev-pr.yml | 4 ++-- Cargo.toml | 9 ++++----- {torii => iroha_torii}/Cargo.toml | 0 {torii => iroha_torii}/const/Cargo.toml | 0 {torii => iroha_torii}/const/src/lib.rs | 0 {torii => iroha_torii}/pytests/README.md | 0 .../get_configuration_response_schema.json | 0 .../common/schemas/get_schema_response.json | 0 .../common/schemas/get_status_response.json | 0 .../pytests/common/settings.py | 0 {torii => iroha_torii}/pytests/poetry.lock | 0 {torii => iroha_torii}/pytests/pyproject.toml | 0 {torii => iroha_torii}/pytests/test/__init__.py | 0 .../pytests/test/api_version/conftest.py | 0 .../pytests/test/api_version/test_api_version.py | 0 .../pytests/test/configuration/conftest.py | 0 .../test/configuration/test_get_configuration.py | 0 .../configuration/test_post_configuration.py | 0 {torii => iroha_torii}/pytests/test/conftest.py | 0 .../pytests/test/general/conftest.py | 0 .../test/general/test_200_status_codes.py | 0 .../test/general/test_400_status_codes.py | 0 .../pytests/test/health/conftest.py | 0 .../pytests/test/health/test_health.py | 0 .../pytests/test/schema/conftest.py | 0 .../pytests/test/schema/test_schema.py | 0 .../pytests/test/status/conftest.py | 0 .../pytests/test/status/test_status.py | 0 {torii => iroha_torii}/src/event.rs | 0 {torii => iroha_torii}/src/lib.rs | 0 {torii => iroha_torii}/src/routing.rs | 0 {torii => iroha_torii}/src/stream.rs | 0 {torii => iroha_torii}/src/utils.rs | 0 35 files changed, 16 insertions(+), 17 deletions(-) rename {torii => iroha_torii}/Cargo.toml (100%) rename {torii => iroha_torii}/const/Cargo.toml (100%) rename {torii => iroha_torii}/const/src/lib.rs (100%) rename {torii => iroha_torii}/pytests/README.md (100%) rename {torii => iroha_torii}/pytests/common/schemas/get_configuration_response_schema.json (100%) rename {torii => iroha_torii}/pytests/common/schemas/get_schema_response.json (100%) rename {torii => iroha_torii}/pytests/common/schemas/get_status_response.json (100%) rename {torii => iroha_torii}/pytests/common/settings.py (100%) rename {torii => iroha_torii}/pytests/poetry.lock (100%) rename {torii => iroha_torii}/pytests/pyproject.toml (100%) rename {torii => iroha_torii}/pytests/test/__init__.py (100%) rename {torii => iroha_torii}/pytests/test/api_version/conftest.py (100%) rename {torii => iroha_torii}/pytests/test/api_version/test_api_version.py (100%) rename {torii => iroha_torii}/pytests/test/configuration/conftest.py (100%) rename {torii => iroha_torii}/pytests/test/configuration/test_get_configuration.py (100%) rename {torii => iroha_torii}/pytests/test/configuration/test_post_configuration.py (100%) rename {torii => iroha_torii}/pytests/test/conftest.py (100%) rename {torii => iroha_torii}/pytests/test/general/conftest.py (100%) rename {torii => iroha_torii}/pytests/test/general/test_200_status_codes.py (100%) rename {torii => iroha_torii}/pytests/test/general/test_400_status_codes.py (100%) rename {torii => iroha_torii}/pytests/test/health/conftest.py (100%) rename {torii => iroha_torii}/pytests/test/health/test_health.py (100%) rename {torii => iroha_torii}/pytests/test/schema/conftest.py (100%) rename {torii => iroha_torii}/pytests/test/schema/test_schema.py (100%) rename {torii => iroha_torii}/pytests/test/status/conftest.py (100%) rename {torii => iroha_torii}/pytests/test/status/test_status.py (100%) rename {torii => iroha_torii}/src/event.rs (100%) rename {torii => iroha_torii}/src/lib.rs (100%) rename {torii => iroha_torii}/src/routing.rs (100%) rename {torii => iroha_torii}/src/stream.rs (100%) rename {torii => iroha_torii}/src/utils.rs (100%) diff --git a/.github/labeler.yml b/.github/labeler.yml index e5b190e9e61..2f82aa3ebdc 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -4,8 +4,8 @@ api-changes: - changed-files: - any-glob-to-any-file: - 'docs/source/references/schema.json' - - 'torii/src/**' - - 'torii/const/src/**' + - 'iroha_torii/src/**' + - 'iroha_torii/const/src/**' config-changes: - all: diff --git a/.github/workflows/iroha2-dev-pr-static.yml b/.github/workflows/iroha2-dev-pr-static.yml index 2b7897996d4..416b139eee8 100644 --- a/.github/workflows/iroha2-dev-pr-static.yml +++ b/.github/workflows/iroha2-dev-pr-static.yml @@ -69,8 +69,8 @@ jobs: run: | poetry lock --no-update poetry install - - name: Install dependencies using Poetry for torii/pytests - working-directory: torii/pytests + - name: Install dependencies using Poetry for iroha_torii/pytests + working-directory: iroha_torii/pytests run: | poetry lock --no-update poetry install @@ -78,23 +78,23 @@ jobs: working-directory: iroha_cli/pytests run: | poetry run black --check . - - name: Check code formatting with Black in torii/pytests - working-directory: torii/pytests + - name: Check code formatting with Black in iroha_torii/pytests + working-directory: iroha_torii/pytests run: | poetry run black --check . - name: Run mypy (Type Checker) in iroha_cli/pytests working-directory: iroha_cli/pytests run: | poetry run mypy --explicit-package-bases --ignore-missing-imports . - - name: Run mypy (Type Checker) in torii/pytests - working-directory: torii/pytests + - name: Run mypy (Type Checker) in iroha_torii/pytests + working-directory: iroha_torii/pytests run: | poetry run mypy --explicit-package-bases --ignore-missing-imports . - name: Run flake8 (Linter) in iroha_cli/pytests working-directory: iroha_cli/pytests run: | poetry run flake8 . --max-line-length=110 --ignore=F401,W503,E203 - - name: Run flake8 (Linter) in torii/pytests - working-directory: torii/pytests + - name: Run flake8 (Linter) in iroha_torii/pytests + working-directory: iroha_torii/pytests run: | poetry run flake8 . --max-line-length=110 --ignore=F401,W503,E203 diff --git a/.github/workflows/iroha2-dev-pr.yml b/.github/workflows/iroha2-dev-pr.yml index e35894c4156..ae40a3a998e 100644 --- a/.github/workflows/iroha2-dev-pr.yml +++ b/.github/workflows/iroha2-dev-pr.yml @@ -237,10 +237,10 @@ jobs: echo 'export PATH="${{ env.POETRY_PATH }}:$PATH"' >> /etc/profile source /etc/profile - name: Install Torii API Dependencies - working-directory: torii/pytests + working-directory: iroha_torii/pytests run: ${{ env.POETRY_PATH }} install - name: Run Torii API Tests - working-directory: torii/pytests + working-directory: iroha_torii/pytests run: ${{ env.POETRY_PATH }} run pytest - name: Copy Client CLI Binary from Iroha Container if: always() diff --git a/Cargo.toml b/Cargo.toml index d933ddeae2a..4812ef5aedd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,8 +17,8 @@ categories = ["cryptography::cryptocurrencies"] iroha_core = { version = "=2.0.0-rc.1.0 ", path = "iroha_core" } irohad = { version = "=2.0.0-rc.1.0", path = "irohad" } -iroha_torii = { version = "=2.0.0-rc.1.0", path = "torii" } -iroha_torii_const = { version = "=2.0.0-rc.1.0", path = "torii/const" } +iroha_torii = { version = "=2.0.0-rc.1.0", path = "iroha_torii" } +iroha_torii_const = { version = "=2.0.0-rc.1.0", path = "iroha_torii/const" } iroha = { version = "=2.0.0-rc.1.0", path = "iroha" } @@ -234,9 +234,8 @@ members = [ "tools/kura_inspector", "tools/parity_scale_cli", "tools/wasm_test_runner", - - "torii", - "torii/const", + "iroha_torii", + "iroha_torii/const", "iroha_version", "iroha_version/derive", diff --git a/torii/Cargo.toml b/iroha_torii/Cargo.toml similarity index 100% rename from torii/Cargo.toml rename to iroha_torii/Cargo.toml diff --git a/torii/const/Cargo.toml b/iroha_torii/const/Cargo.toml similarity index 100% rename from torii/const/Cargo.toml rename to iroha_torii/const/Cargo.toml diff --git a/torii/const/src/lib.rs b/iroha_torii/const/src/lib.rs similarity index 100% rename from torii/const/src/lib.rs rename to iroha_torii/const/src/lib.rs diff --git a/torii/pytests/README.md b/iroha_torii/pytests/README.md similarity index 100% rename from torii/pytests/README.md rename to iroha_torii/pytests/README.md diff --git a/torii/pytests/common/schemas/get_configuration_response_schema.json b/iroha_torii/pytests/common/schemas/get_configuration_response_schema.json similarity index 100% rename from torii/pytests/common/schemas/get_configuration_response_schema.json rename to iroha_torii/pytests/common/schemas/get_configuration_response_schema.json diff --git a/torii/pytests/common/schemas/get_schema_response.json b/iroha_torii/pytests/common/schemas/get_schema_response.json similarity index 100% rename from torii/pytests/common/schemas/get_schema_response.json rename to iroha_torii/pytests/common/schemas/get_schema_response.json diff --git a/torii/pytests/common/schemas/get_status_response.json b/iroha_torii/pytests/common/schemas/get_status_response.json similarity index 100% rename from torii/pytests/common/schemas/get_status_response.json rename to iroha_torii/pytests/common/schemas/get_status_response.json diff --git a/torii/pytests/common/settings.py b/iroha_torii/pytests/common/settings.py similarity index 100% rename from torii/pytests/common/settings.py rename to iroha_torii/pytests/common/settings.py diff --git a/torii/pytests/poetry.lock b/iroha_torii/pytests/poetry.lock similarity index 100% rename from torii/pytests/poetry.lock rename to iroha_torii/pytests/poetry.lock diff --git a/torii/pytests/pyproject.toml b/iroha_torii/pytests/pyproject.toml similarity index 100% rename from torii/pytests/pyproject.toml rename to iroha_torii/pytests/pyproject.toml diff --git a/torii/pytests/test/__init__.py b/iroha_torii/pytests/test/__init__.py similarity index 100% rename from torii/pytests/test/__init__.py rename to iroha_torii/pytests/test/__init__.py diff --git a/torii/pytests/test/api_version/conftest.py b/iroha_torii/pytests/test/api_version/conftest.py similarity index 100% rename from torii/pytests/test/api_version/conftest.py rename to iroha_torii/pytests/test/api_version/conftest.py diff --git a/torii/pytests/test/api_version/test_api_version.py b/iroha_torii/pytests/test/api_version/test_api_version.py similarity index 100% rename from torii/pytests/test/api_version/test_api_version.py rename to iroha_torii/pytests/test/api_version/test_api_version.py diff --git a/torii/pytests/test/configuration/conftest.py b/iroha_torii/pytests/test/configuration/conftest.py similarity index 100% rename from torii/pytests/test/configuration/conftest.py rename to iroha_torii/pytests/test/configuration/conftest.py diff --git a/torii/pytests/test/configuration/test_get_configuration.py b/iroha_torii/pytests/test/configuration/test_get_configuration.py similarity index 100% rename from torii/pytests/test/configuration/test_get_configuration.py rename to iroha_torii/pytests/test/configuration/test_get_configuration.py diff --git a/torii/pytests/test/configuration/test_post_configuration.py b/iroha_torii/pytests/test/configuration/test_post_configuration.py similarity index 100% rename from torii/pytests/test/configuration/test_post_configuration.py rename to iroha_torii/pytests/test/configuration/test_post_configuration.py diff --git a/torii/pytests/test/conftest.py b/iroha_torii/pytests/test/conftest.py similarity index 100% rename from torii/pytests/test/conftest.py rename to iroha_torii/pytests/test/conftest.py diff --git a/torii/pytests/test/general/conftest.py b/iroha_torii/pytests/test/general/conftest.py similarity index 100% rename from torii/pytests/test/general/conftest.py rename to iroha_torii/pytests/test/general/conftest.py diff --git a/torii/pytests/test/general/test_200_status_codes.py b/iroha_torii/pytests/test/general/test_200_status_codes.py similarity index 100% rename from torii/pytests/test/general/test_200_status_codes.py rename to iroha_torii/pytests/test/general/test_200_status_codes.py diff --git a/torii/pytests/test/general/test_400_status_codes.py b/iroha_torii/pytests/test/general/test_400_status_codes.py similarity index 100% rename from torii/pytests/test/general/test_400_status_codes.py rename to iroha_torii/pytests/test/general/test_400_status_codes.py diff --git a/torii/pytests/test/health/conftest.py b/iroha_torii/pytests/test/health/conftest.py similarity index 100% rename from torii/pytests/test/health/conftest.py rename to iroha_torii/pytests/test/health/conftest.py diff --git a/torii/pytests/test/health/test_health.py b/iroha_torii/pytests/test/health/test_health.py similarity index 100% rename from torii/pytests/test/health/test_health.py rename to iroha_torii/pytests/test/health/test_health.py diff --git a/torii/pytests/test/schema/conftest.py b/iroha_torii/pytests/test/schema/conftest.py similarity index 100% rename from torii/pytests/test/schema/conftest.py rename to iroha_torii/pytests/test/schema/conftest.py diff --git a/torii/pytests/test/schema/test_schema.py b/iroha_torii/pytests/test/schema/test_schema.py similarity index 100% rename from torii/pytests/test/schema/test_schema.py rename to iroha_torii/pytests/test/schema/test_schema.py diff --git a/torii/pytests/test/status/conftest.py b/iroha_torii/pytests/test/status/conftest.py similarity index 100% rename from torii/pytests/test/status/conftest.py rename to iroha_torii/pytests/test/status/conftest.py diff --git a/torii/pytests/test/status/test_status.py b/iroha_torii/pytests/test/status/test_status.py similarity index 100% rename from torii/pytests/test/status/test_status.py rename to iroha_torii/pytests/test/status/test_status.py diff --git a/torii/src/event.rs b/iroha_torii/src/event.rs similarity index 100% rename from torii/src/event.rs rename to iroha_torii/src/event.rs diff --git a/torii/src/lib.rs b/iroha_torii/src/lib.rs similarity index 100% rename from torii/src/lib.rs rename to iroha_torii/src/lib.rs diff --git a/torii/src/routing.rs b/iroha_torii/src/routing.rs similarity index 100% rename from torii/src/routing.rs rename to iroha_torii/src/routing.rs diff --git a/torii/src/stream.rs b/iroha_torii/src/stream.rs similarity index 100% rename from torii/src/stream.rs rename to iroha_torii/src/stream.rs diff --git a/torii/src/utils.rs b/iroha_torii/src/utils.rs similarity index 100% rename from torii/src/utils.rs rename to iroha_torii/src/utils.rs From dd2bac38d3dcc01c62f06554539b52b9c92a915a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 16:32:06 +0400 Subject: [PATCH 21/59] refactor: rename `schema` directory to `iroha_schema` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 11 +++++------ {schema => iroha_schema}/Cargo.toml | 0 {schema => iroha_schema}/derive/Cargo.toml | 0 {schema => iroha_schema}/derive/src/lib.rs | 0 {schema => iroha_schema}/derive/tests/ui.rs | 0 .../fieldless_enum_with_explicit_discriminant.rs | 0 .../fieldless_enum_with_explicit_discriminant.stderr | 0 .../derive/tests/ui_pass/derive_into_schema.rs | 0 {schema => iroha_schema}/gen/Cargo.toml | 0 {schema => iroha_schema}/gen/src/lib.rs | 0 {schema => iroha_schema}/src/lib.rs | 0 {schema => iroha_schema}/src/serialize.rs | 0 .../tests/architecture-dependent.rs | 0 .../tests/enum_with_default_discriminants.rs | 0 .../tests/enum_with_various_discriminants.rs | 0 {schema => iroha_schema}/tests/fieldless_enum.rs | 0 .../tests/numbers_compact_and_fixed.rs | 0 {schema => iroha_schema}/tests/schema_json.rs | 0 .../tests/struct_with_generic_bounds.rs | 0 .../tests/struct_with_named_fields.rs | 0 .../tests/struct_with_unnamed_fields.rs | 0 {schema => iroha_schema}/tests/transparent_types.rs | 0 wasm_samples/Cargo.toml | 2 +- 23 files changed, 6 insertions(+), 7 deletions(-) rename {schema => iroha_schema}/Cargo.toml (100%) rename {schema => iroha_schema}/derive/Cargo.toml (100%) rename {schema => iroha_schema}/derive/src/lib.rs (100%) rename {schema => iroha_schema}/derive/tests/ui.rs (100%) rename {schema => iroha_schema}/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs (100%) rename {schema => iroha_schema}/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr (100%) rename {schema => iroha_schema}/derive/tests/ui_pass/derive_into_schema.rs (100%) rename {schema => iroha_schema}/gen/Cargo.toml (100%) rename {schema => iroha_schema}/gen/src/lib.rs (100%) rename {schema => iroha_schema}/src/lib.rs (100%) rename {schema => iroha_schema}/src/serialize.rs (100%) rename {schema => iroha_schema}/tests/architecture-dependent.rs (100%) rename {schema => iroha_schema}/tests/enum_with_default_discriminants.rs (100%) rename {schema => iroha_schema}/tests/enum_with_various_discriminants.rs (100%) rename {schema => iroha_schema}/tests/fieldless_enum.rs (100%) rename {schema => iroha_schema}/tests/numbers_compact_and_fixed.rs (100%) rename {schema => iroha_schema}/tests/schema_json.rs (100%) rename {schema => iroha_schema}/tests/struct_with_generic_bounds.rs (100%) rename {schema => iroha_schema}/tests/struct_with_named_fields.rs (100%) rename {schema => iroha_schema}/tests/struct_with_unnamed_fields.rs (100%) rename {schema => iroha_schema}/tests/transparent_types.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 4812ef5aedd..512127fa9ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,8 +29,8 @@ iroha_primitives = { version = "=2.0.0-rc.1.0", path = "iroha_primitives", defau iroha_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_data_model", default-features = false } iroha_config = { version = "=2.0.0-rc.1.0", path = "iroha_config" } iroha_config_base = { version = "=2.0.0-rc.1.0", path = "iroha_config/base" } -iroha_schema_gen = { version = "=2.0.0-rc.1.0", path = "schema/gen" } -iroha_schema = { version = "=2.0.0-rc.1.0", path = "schema", default-features = false } +iroha_schema_gen = { version = "=2.0.0-rc.1.0", path = "iroha_schema/gen" } +iroha_schema = { version = "=2.0.0-rc.1.0", path = "iroha_schema", default-features = false } iroha_logger = { version = "=2.0.0-rc.1.0", path = "iroha_logger" } iroha_crypto = { version = "=2.0.0-rc.1.0", path = "iroha_crypto", default-features = false } iroha_macro = { version = "=2.0.0-rc.1.0", path = "iroha_macro", default-features = false } @@ -213,10 +213,9 @@ members = [ "iroha_primitives/numeric", "iroha_ffi", "iroha_ffi/derive", - - "schema", - "schema/gen", - "schema/derive", + "iroha_schema", + "iroha_schema/gen", + "iroha_schema/derive", "iroha_smart_contract", "iroha_smart_contract/derive", "iroha_smart_contract/utils", diff --git a/schema/Cargo.toml b/iroha_schema/Cargo.toml similarity index 100% rename from schema/Cargo.toml rename to iroha_schema/Cargo.toml diff --git a/schema/derive/Cargo.toml b/iroha_schema/derive/Cargo.toml similarity index 100% rename from schema/derive/Cargo.toml rename to iroha_schema/derive/Cargo.toml diff --git a/schema/derive/src/lib.rs b/iroha_schema/derive/src/lib.rs similarity index 100% rename from schema/derive/src/lib.rs rename to iroha_schema/derive/src/lib.rs diff --git a/schema/derive/tests/ui.rs b/iroha_schema/derive/tests/ui.rs similarity index 100% rename from schema/derive/tests/ui.rs rename to iroha_schema/derive/tests/ui.rs diff --git a/schema/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs b/iroha_schema/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs similarity index 100% rename from schema/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs rename to iroha_schema/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs diff --git a/schema/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr b/iroha_schema/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr similarity index 100% rename from schema/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr rename to iroha_schema/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr diff --git a/schema/derive/tests/ui_pass/derive_into_schema.rs b/iroha_schema/derive/tests/ui_pass/derive_into_schema.rs similarity index 100% rename from schema/derive/tests/ui_pass/derive_into_schema.rs rename to iroha_schema/derive/tests/ui_pass/derive_into_schema.rs diff --git a/schema/gen/Cargo.toml b/iroha_schema/gen/Cargo.toml similarity index 100% rename from schema/gen/Cargo.toml rename to iroha_schema/gen/Cargo.toml diff --git a/schema/gen/src/lib.rs b/iroha_schema/gen/src/lib.rs similarity index 100% rename from schema/gen/src/lib.rs rename to iroha_schema/gen/src/lib.rs diff --git a/schema/src/lib.rs b/iroha_schema/src/lib.rs similarity index 100% rename from schema/src/lib.rs rename to iroha_schema/src/lib.rs diff --git a/schema/src/serialize.rs b/iroha_schema/src/serialize.rs similarity index 100% rename from schema/src/serialize.rs rename to iroha_schema/src/serialize.rs diff --git a/schema/tests/architecture-dependent.rs b/iroha_schema/tests/architecture-dependent.rs similarity index 100% rename from schema/tests/architecture-dependent.rs rename to iroha_schema/tests/architecture-dependent.rs diff --git a/schema/tests/enum_with_default_discriminants.rs b/iroha_schema/tests/enum_with_default_discriminants.rs similarity index 100% rename from schema/tests/enum_with_default_discriminants.rs rename to iroha_schema/tests/enum_with_default_discriminants.rs diff --git a/schema/tests/enum_with_various_discriminants.rs b/iroha_schema/tests/enum_with_various_discriminants.rs similarity index 100% rename from schema/tests/enum_with_various_discriminants.rs rename to iroha_schema/tests/enum_with_various_discriminants.rs diff --git a/schema/tests/fieldless_enum.rs b/iroha_schema/tests/fieldless_enum.rs similarity index 100% rename from schema/tests/fieldless_enum.rs rename to iroha_schema/tests/fieldless_enum.rs diff --git a/schema/tests/numbers_compact_and_fixed.rs b/iroha_schema/tests/numbers_compact_and_fixed.rs similarity index 100% rename from schema/tests/numbers_compact_and_fixed.rs rename to iroha_schema/tests/numbers_compact_and_fixed.rs diff --git a/schema/tests/schema_json.rs b/iroha_schema/tests/schema_json.rs similarity index 100% rename from schema/tests/schema_json.rs rename to iroha_schema/tests/schema_json.rs diff --git a/schema/tests/struct_with_generic_bounds.rs b/iroha_schema/tests/struct_with_generic_bounds.rs similarity index 100% rename from schema/tests/struct_with_generic_bounds.rs rename to iroha_schema/tests/struct_with_generic_bounds.rs diff --git a/schema/tests/struct_with_named_fields.rs b/iroha_schema/tests/struct_with_named_fields.rs similarity index 100% rename from schema/tests/struct_with_named_fields.rs rename to iroha_schema/tests/struct_with_named_fields.rs diff --git a/schema/tests/struct_with_unnamed_fields.rs b/iroha_schema/tests/struct_with_unnamed_fields.rs similarity index 100% rename from schema/tests/struct_with_unnamed_fields.rs rename to iroha_schema/tests/struct_with_unnamed_fields.rs diff --git a/schema/tests/transparent_types.rs b/iroha_schema/tests/transparent_types.rs similarity index 100% rename from schema/tests/transparent_types.rs rename to iroha_schema/tests/transparent_types.rs diff --git a/wasm_samples/Cargo.toml b/wasm_samples/Cargo.toml index 6b46fe9e3d3..54d24f4ceed 100644 --- a/wasm_samples/Cargo.toml +++ b/wasm_samples/Cargo.toml @@ -43,7 +43,7 @@ executor_custom_data_model = { path = "executor_custom_data_model" } iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "../iroha_smart_contract", features = ["debug"] } iroha_trigger = { version = "=2.0.0-rc.1.0", path = "../iroha_trigger", features = ["debug"] } iroha_executor = { version = "=2.0.0-rc.1.0", path = "../iroha_executor", features = ["debug"] } -iroha_schema = { version = "=2.0.0-rc.1.0", path = "../schema" } +iroha_schema = { version = "=2.0.0-rc.1.0", path = "../iroha_schema" } iroha_data_model = { version = "=2.0.0-rc.1.0", path = "../iroha_data_model", default-features = false } iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "../iroha_executor/data_model" } From aaf9aac538c3de3de96b4d695f872a489349108e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 12 Aug 2024 21:07:06 +0400 Subject: [PATCH 22/59] refactor: rename `test_samples` to `iroha_test_samples` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.lock | 34 +++++++++---------- Cargo.toml | 4 +-- hooks/pre-commit.sample | 2 +- iroha/Cargo.toml | 2 +- iroha/benches/tps/utils.rs | 2 +- iroha/examples/register_1000_triggers.rs | 2 +- iroha/tests/integration/asset.rs | 2 +- iroha/tests/integration/asset_propagation.rs | 2 +- iroha/tests/integration/events/data.rs | 2 +- .../tests/integration/events/notification.rs | 2 +- .../multiple_blocks_created.rs | 2 +- .../extra_functional/offline_peers.rs | 2 +- .../extra_functional/restart_peer.rs | 2 +- .../extra_functional/unregister_peer.rs | 2 +- .../extra_functional/unstable_network.rs | 2 +- iroha/tests/integration/non_mintable.rs | 2 +- iroha/tests/integration/permissions.rs | 2 +- iroha/tests/integration/queries/asset.rs | 3 +- iroha/tests/integration/queries/role.rs | 2 +- iroha/tests/integration/roles.rs | 2 +- iroha/tests/integration/status_response.rs | 2 +- iroha/tests/integration/transfer_asset.rs | 2 +- iroha/tests/integration/transfer_domain.rs | 2 +- .../integration/triggers/by_call_trigger.rs | 2 +- .../integration/triggers/data_trigger.rs | 2 +- .../integration/triggers/event_trigger.rs | 2 +- iroha/tests/integration/triggers/orphans.rs | 4 +-- .../integration/triggers/time_trigger.rs | 2 +- .../integration/triggers/trigger_rollback.rs | 2 +- iroha/tests/integration/tx_chain_id.rs | 2 +- iroha/tests/integration/tx_history.rs | 2 +- iroha/tests/integration/upgrade.rs | 2 +- iroha_core/Cargo.toml | 2 +- iroha_core/benches/blocks/apply_blocks.rs | 2 +- iroha_core/benches/blocks/validate_blocks.rs | 2 +- iroha_core/benches/kura.rs | 2 +- iroha_core/benches/validation.rs | 2 +- iroha_core/src/block.rs | 2 +- iroha_core/src/kiso.rs | 4 ++- iroha_core/src/kura.rs | 2 +- iroha_core/src/lib.rs | 2 +- iroha_core/src/query/store.rs | 2 +- iroha_core/src/queue.rs | 2 +- iroha_core/src/smartcontracts/isi/account.rs | 2 +- iroha_core/src/smartcontracts/isi/mod.rs | 2 +- iroha_core/src/smartcontracts/isi/query.rs | 2 +- iroha_core/src/state.rs | 2 +- iroha_core/src/sumeragi/main_loop.rs | 2 +- iroha_core/test_network/Cargo.toml | 2 +- iroha_core/test_network/src/lib.rs | 2 +- iroha_genesis/Cargo.toml | 2 +- iroha_genesis/src/lib.rs | 2 +- iroha_smart_contract/Cargo.toml | 2 +- .../Cargo.toml | 2 +- .../src/lib.rs | 0 scripts/tests/consistency.sh | 2 +- tools/kagami/Cargo.toml | 2 +- tools/kagami/src/genesis/generate.rs | 2 +- tools/parity_scale_cli/Cargo.toml | 2 +- tools/parity_scale_cli/src/main.rs | 2 +- 60 files changed, 79 insertions(+), 78 deletions(-) rename {test_samples => iroha_test_samples}/Cargo.toml (95%) rename {test_samples => iroha_test_samples}/src/lib.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 477ccebe638..5d9f96f86aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2902,6 +2902,7 @@ dependencies = [ "iroha_logger", "iroha_primitives", "iroha_telemetry", + "iroha_test_samples", "iroha_torii_const", "iroha_version", "iroha_wasm_builder", @@ -2914,7 +2915,6 @@ dependencies = [ "serde_with", "tempfile", "test_network", - "test_samples", "thiserror", "tokio", "tokio-tungstenite", @@ -3036,6 +3036,7 @@ dependencies = [ "iroha_p2p", "iroha_primitives", "iroha_telemetry", + "iroha_test_samples", "iroha_version", "iroha_wasm_codec", "mv", @@ -3046,7 +3047,6 @@ dependencies = [ "serde", "serde_json", "tempfile", - "test_samples", "thiserror", "tokio", "uuid", @@ -3280,7 +3280,6 @@ dependencies = [ "parity-scale-codec", "serde", "serde_json", - "test_samples", "tracing", ] @@ -3442,8 +3441,8 @@ dependencies = [ "iroha_macro", "iroha_smart_contract_derive", "iroha_smart_contract_utils", + "iroha_test_samples", "parity-scale-codec", - "test_samples", "trybuild", "webassembly-test", ] @@ -3531,6 +3530,17 @@ dependencies = [ "trybuild", ] +[[package]] +name = "iroha_test_samples" +version = "2.0.0-rc.1.0" +dependencies = [ + "iroha_crypto", + "iroha_data_model", + "once_cell", + "serde", + "toml 0.8.16", +] + [[package]] name = "iroha_torii" version = "2.0.0-rc.1.0" @@ -3814,10 +3824,10 @@ dependencies = [ "iroha_genesis", "iroha_primitives", "iroha_schema_gen", + "iroha_test_samples", "parity-scale-codec", "serde", "serde_json", - "test_samples", ] [[package]] @@ -4383,12 +4393,12 @@ dependencies = [ "iroha_primitives", "iroha_schema", "iroha_schema_gen", + "iroha_test_samples", "iroha_version", "parity-scale-codec", "serde", "serde_json", "supports-color 2.1.0", - "test_samples", ] [[package]] @@ -5822,27 +5832,17 @@ dependencies = [ "iroha_genesis", "iroha_logger", "iroha_primitives", + "iroha_test_samples", "iroha_wasm_builder", "irohad", "parity-scale-codec", "rand", "serde_json", "tempfile", - "test_samples", "tokio", "unique_port", ] -[[package]] -name = "test_samples" -version = "2.0.0-rc.1.0" -dependencies = [ - "iroha_crypto", - "iroha_data_model", - "serde", - "toml", -] - [[package]] name = "thiserror" version = "1.0.63" diff --git a/Cargo.toml b/Cargo.toml index 512127fa9ce..f75d729f52c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ iroha_executor = { version = "=2.0.0-rc.1.0", path = "iroha_executor" } iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_executor/data_model" } test_network = { version = "=2.0.0-rc.1.0", path = "iroha_core/test_network" } -test_samples = { version = "=2.0.0-rc.1.0", path = "test_samples" } +iroha_test_samples = { version = "=2.0.0-rc.1.0", path = "iroha_test_samples" } proc-macro2 = "1.0.86" syn = { version = "2.0.72", default-features = false } @@ -226,7 +226,7 @@ members = [ "iroha_executor/data_model", "iroha_executor/data_model/derive", "iroha_telemetry", - "test_samples", + "iroha_test_samples", "tools/swarm", "tools/kagami", diff --git a/hooks/pre-commit.sample b/hooks/pre-commit.sample index 8b658a5cd91..040fa2c3f79 100755 --- a/hooks/pre-commit.sample +++ b/hooks/pre-commit.sample @@ -11,7 +11,7 @@ cargo fmt --all -- --check cd - # update the default executor cargo run --release --bin iroha_wasm_builder -- build ./wasm_samples/default_executor --optimize --out-file ./defaults/executor.wasm -# update the default genesis, assuming the transaction authority is `test_samples::SAMPLE_GENESIS_ACCOUNT_ID` +# update the default genesis, assuming the transaction authority is `iroha_test_samples::SAMPLE_GENESIS_ACCOUNT_ID` cargo run --release --bin kagami -- genesis generate --executor-path-in-genesis ./executor.wasm --genesis-public-key ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4 > ./defaults/genesis.json # update schema cargo run --release --bin kagami -- schema > ./docs/source/references/schema.json diff --git a/iroha/Cargo.toml b/iroha/Cargo.toml index fc9f1f41b62..be1a37f1e79 100644 --- a/iroha/Cargo.toml +++ b/iroha/Cargo.toml @@ -59,7 +59,7 @@ iroha_logger = { workspace = true } iroha_telemetry = { workspace = true } iroha_torii_const = { workspace = true } iroha_version = { workspace = true } -test_samples = { workspace = true } +iroha_test_samples = { workspace = true } attohttpc = { version = "0.28.0", default-features = false } eyre = { workspace = true } diff --git a/iroha/benches/tps/utils.rs b/iroha/benches/tps/utils.rs index 1aed91b37ef..2e476a3049c 100644 --- a/iroha/benches/tps/utils.rs +++ b/iroha/benches/tps/utils.rs @@ -10,10 +10,10 @@ use iroha::{ prelude::*, }, }; +use iroha_test_samples::ALICE_ID; use nonzero_ext::nonzero; use serde::Deserialize; use test_network::*; -use test_samples::ALICE_ID; pub type Tps = f64; diff --git a/iroha/examples/register_1000_triggers.rs b/iroha/examples/register_1000_triggers.rs index e4d7533c8b1..29533fc05c9 100644 --- a/iroha/examples/register_1000_triggers.rs +++ b/iroha/examples/register_1000_triggers.rs @@ -11,12 +11,12 @@ use iroha::{ use iroha_data_model::parameter::{Parameter, SmartContractParameter}; use iroha_genesis::{GenesisBlock, GenesisBuilder}; use iroha_primitives::unique_vec; +use iroha_test_samples::gen_account_in; use irohad::samples::get_config; use test_network::{ construct_executor, get_chain_id, get_key_pair, wait_for_genesis_committed_with_max_retries, Peer as TestPeer, PeerBuilder, TestClient, TestRuntime, }; -use test_samples::gen_account_in; use tokio::runtime::Runtime; fn generate_genesis( diff --git a/iroha/tests/integration/asset.rs b/iroha/tests/integration/asset.rs index 764a1f73857..d583b43e0f0 100644 --- a/iroha/tests/integration/asset.rs +++ b/iroha/tests/integration/asset.rs @@ -13,8 +13,8 @@ use iroha::{ }; use iroha_config::parameters::actual::Root as Config; use iroha_executor_data_model::permission::asset::CanTransferUserAsset; +use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID}; use test_network::*; -use test_samples::{gen_account_in, ALICE_ID, BOB_ID}; #[test] // This test is also covered at the UI level in the iroha_cli tests diff --git a/iroha/tests/integration/asset_propagation.rs b/iroha/tests/integration/asset_propagation.rs index 4f45922229b..06a8bd8c42b 100644 --- a/iroha/tests/integration/asset_propagation.rs +++ b/iroha/tests/integration/asset_propagation.rs @@ -6,9 +6,9 @@ use iroha::{ data_model::{parameter::BlockParameter, prelude::*}, }; use iroha_config::parameters::actual::Root as Config; +use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; use test_network::*; -use test_samples::gen_account_in; #[test] // This test is also covered at the UI level in the iroha_cli tests diff --git a/iroha/tests/integration/events/data.rs b/iroha/tests/integration/events/data.rs index 4c9e32e6e2a..2d01b7390af 100644 --- a/iroha/tests/integration/events/data.rs +++ b/iroha/tests/integration/events/data.rs @@ -5,9 +5,9 @@ use iroha::data_model::{prelude::*, transaction::WasmSmartContract}; use iroha_executor_data_model::permission::account::{ CanRemoveKeyValueInAccount, CanSetKeyValueInAccount, }; +use iroha_test_samples::{ALICE_ID, BOB_ID}; use parity_scale_codec::Encode as _; use test_network::*; -use test_samples::{ALICE_ID, BOB_ID}; /// Return string containing exported memory, dummy allocator, and /// host function imports which you can embed into your wasm module. diff --git a/iroha/tests/integration/events/notification.rs b/iroha/tests/integration/events/notification.rs index d5937aef20d..279a8d24174 100644 --- a/iroha/tests/integration/events/notification.rs +++ b/iroha/tests/integration/events/notification.rs @@ -2,8 +2,8 @@ use std::{sync::mpsc, thread, time::Duration}; use eyre::{eyre, Result, WrapErr}; use iroha::data_model::prelude::*; +use iroha_test_samples::ALICE_ID; use test_network::*; -use test_samples::ALICE_ID; #[test] fn trigger_completion_success_should_produce_event() -> Result<()> { diff --git a/iroha/tests/integration/extra_functional/multiple_blocks_created.rs b/iroha/tests/integration/extra_functional/multiple_blocks_created.rs index c64b8d7d918..873b9e0244c 100644 --- a/iroha/tests/integration/extra_functional/multiple_blocks_created.rs +++ b/iroha/tests/integration/extra_functional/multiple_blocks_created.rs @@ -6,9 +6,9 @@ use iroha::{ data_model::{parameter::BlockParameter, prelude::*}, }; use iroha_config::parameters::actual::Root as Config; +use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; use test_network::*; -use test_samples::gen_account_in; const N_BLOCKS: usize = 510; diff --git a/iroha/tests/integration/extra_functional/offline_peers.rs b/iroha/tests/integration/extra_functional/offline_peers.rs index e80e0490783..33999926206 100644 --- a/iroha/tests/integration/extra_functional/offline_peers.rs +++ b/iroha/tests/integration/extra_functional/offline_peers.rs @@ -9,8 +9,8 @@ use iroha::{ }; use iroha_config::parameters::actual::Root as Config; use iroha_primitives::addr::socket_addr; +use iroha_test_samples::ALICE_ID; use test_network::*; -use test_samples::ALICE_ID; #[test] fn genesis_block_is_committed_with_some_offline_peers() -> Result<()> { diff --git a/iroha/tests/integration/extra_functional/restart_peer.rs b/iroha/tests/integration/extra_functional/restart_peer.rs index 94988c78702..a9b926affbd 100644 --- a/iroha/tests/integration/extra_functional/restart_peer.rs +++ b/iroha/tests/integration/extra_functional/restart_peer.rs @@ -6,9 +6,9 @@ use iroha::{ data_model::prelude::*, }; use iroha_config::parameters::actual::Root as Config; +use iroha_test_samples::ALICE_ID; use rand::{seq::SliceRandom, thread_rng, Rng}; use test_network::*; -use test_samples::ALICE_ID; use tokio::runtime::Runtime; #[test] diff --git a/iroha/tests/integration/extra_functional/unregister_peer.rs b/iroha/tests/integration/extra_functional/unregister_peer.rs index f24be88c0c0..808dc6bfe5e 100644 --- a/iroha/tests/integration/extra_functional/unregister_peer.rs +++ b/iroha/tests/integration/extra_functional/unregister_peer.rs @@ -6,9 +6,9 @@ use iroha::{ data_model::{parameter::BlockParameter, prelude::*}, }; use iroha_config::parameters::actual::Root as Config; +use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; use test_network::*; -use test_samples::gen_account_in; // Note the test is marked as `unstable`, not the network. #[ignore = "ignore, more in #2851"] diff --git a/iroha/tests/integration/extra_functional/unstable_network.rs b/iroha/tests/integration/extra_functional/unstable_network.rs index e5bf53308cd..217cbc1ad40 100644 --- a/iroha/tests/integration/extra_functional/unstable_network.rs +++ b/iroha/tests/integration/extra_functional/unstable_network.rs @@ -8,10 +8,10 @@ use iroha::{ }, }; use iroha_config::parameters::actual::Root as Config; +use iroha_test_samples::ALICE_ID; use nonzero_ext::nonzero; use rand::seq::SliceRandom; use test_network::*; -use test_samples::ALICE_ID; #[test] fn unstable_network_5_peers_1_fault() { diff --git a/iroha/tests/integration/non_mintable.rs b/iroha/tests/integration/non_mintable.rs index e9c9d62dd9a..3eb85aeba4c 100644 --- a/iroha/tests/integration/non_mintable.rs +++ b/iroha/tests/integration/non_mintable.rs @@ -3,8 +3,8 @@ use iroha::{ client, data_model::{isi::InstructionBox, prelude::*}, }; +use iroha_test_samples::ALICE_ID; use test_network::*; -use test_samples::ALICE_ID; #[test] fn non_mintable_asset_can_be_minted_once_but_not_twice() -> Result<()> { diff --git a/iroha/tests/integration/permissions.rs b/iroha/tests/integration/permissions.rs index f8fc9a5341d..7cb11d34675 100644 --- a/iroha/tests/integration/permissions.rs +++ b/iroha/tests/integration/permissions.rs @@ -14,8 +14,8 @@ use iroha_executor_data_model::permission::{ domain::CanSetKeyValueInDomain, }; use iroha_genesis::GenesisBlock; +use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID}; use test_network::{PeerBuilder, *}; -use test_samples::{gen_account_in, ALICE_ID, BOB_ID}; #[test] fn genesis_transactions_are_validated_by_executor() { diff --git a/iroha/tests/integration/queries/asset.rs b/iroha/tests/integration/queries/asset.rs index 12576fb19a0..23a55aabc7b 100644 --- a/iroha/tests/integration/queries/asset.rs +++ b/iroha/tests/integration/queries/asset.rs @@ -5,8 +5,7 @@ use iroha::{ asset::AssetValue, isi::Instruction, prelude::*, query::builder::SingleQueryError, }, }; -use test_network::*; -use test_samples::{gen_account_in, ALICE_ID}; +use iroha_test_network::*; #[test] #[allow(clippy::too_many_lines)] diff --git a/iroha/tests/integration/queries/role.rs b/iroha/tests/integration/queries/role.rs index e9212044f87..59be9910c7f 100644 --- a/iroha/tests/integration/queries/role.rs +++ b/iroha/tests/integration/queries/role.rs @@ -6,8 +6,8 @@ use iroha::{ data_model::{prelude::*, query::builder::SingleQueryError}, }; use iroha_executor_data_model::permission::account::CanSetKeyValueInAccount; +use iroha_test_samples::ALICE_ID; use test_network::*; -use test_samples::ALICE_ID; fn create_role_ids() -> [RoleId; 5] { [ diff --git a/iroha/tests/integration/roles.rs b/iroha/tests/integration/roles.rs index dc43608fcc6..1772193b023 100644 --- a/iroha/tests/integration/roles.rs +++ b/iroha/tests/integration/roles.rs @@ -7,9 +7,9 @@ use iroha::{ use iroha_executor_data_model::permission::account::{ CanRemoveKeyValueInAccount, CanSetKeyValueInAccount, }; +use iroha_test_samples::{gen_account_in, ALICE_ID}; use serde_json::json; use test_network::*; -use test_samples::{gen_account_in, ALICE_ID}; #[test] fn register_empty_role() -> Result<()> { diff --git a/iroha/tests/integration/status_response.rs b/iroha/tests/integration/status_response.rs index 64af76057b0..5840f588815 100644 --- a/iroha/tests/integration/status_response.rs +++ b/iroha/tests/integration/status_response.rs @@ -1,8 +1,8 @@ use eyre::Result; use iroha::{data_model::prelude::*, samples::get_status_json}; use iroha_telemetry::metrics::Status; +use iroha_test_samples::gen_account_in; use test_network::*; -use test_samples::gen_account_in; fn status_eq_excluding_uptime_and_queue(lhs: &Status, rhs: &Status) -> bool { lhs.peers == rhs.peers diff --git a/iroha/tests/integration/transfer_asset.rs b/iroha/tests/integration/transfer_asset.rs index dbeee6c545d..4890e378c74 100644 --- a/iroha/tests/integration/transfer_asset.rs +++ b/iroha/tests/integration/transfer_asset.rs @@ -8,8 +8,8 @@ use iroha::{ Registered, }, }; +use iroha_test_samples::{gen_account_in, ALICE_ID}; use test_network::*; -use test_samples::{gen_account_in, ALICE_ID}; #[test] // This test suite is also covered at the UI level in the iroha_cli tests diff --git a/iroha/tests/integration/transfer_domain.rs b/iroha/tests/integration/transfer_domain.rs index d7013c6e2cd..4b90580c186 100644 --- a/iroha/tests/integration/transfer_domain.rs +++ b/iroha/tests/integration/transfer_domain.rs @@ -14,8 +14,8 @@ use iroha_executor_data_model::permission::{ }; use iroha_genesis::GenesisBlock; use iroha_primitives::json::JsonString; +use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID, SAMPLE_GENESIS_ACCOUNT_ID}; use test_network::{Peer as TestPeer, *}; -use test_samples::{gen_account_in, ALICE_ID, BOB_ID, SAMPLE_GENESIS_ACCOUNT_ID}; use tokio::runtime::Runtime; #[test] diff --git a/iroha/tests/integration/triggers/by_call_trigger.rs b/iroha/tests/integration/triggers/by_call_trigger.rs index 1e84558f615..6ac159ddeae 100644 --- a/iroha/tests/integration/triggers/by_call_trigger.rs +++ b/iroha/tests/integration/triggers/by_call_trigger.rs @@ -15,8 +15,8 @@ use iroha_data_model::query::{builder::SingleQueryError, trigger::FindTriggers}; use iroha_executor_data_model::permission::trigger::CanRegisterUserTrigger; use iroha_genesis::GenesisBlock; use iroha_logger::info; +use iroha_test_samples::ALICE_ID; use test_network::{Peer as TestPeer, *}; -use test_samples::ALICE_ID; use tokio::runtime::Runtime; const TRIGGER_NAME: &str = "mint_rose"; diff --git a/iroha/tests/integration/triggers/data_trigger.rs b/iroha/tests/integration/triggers/data_trigger.rs index 262a644a39c..9692b735ffa 100644 --- a/iroha/tests/integration/triggers/data_trigger.rs +++ b/iroha/tests/integration/triggers/data_trigger.rs @@ -1,7 +1,7 @@ use eyre::Result; use iroha::{client, data_model::prelude::*}; +use iroha_test_samples::{gen_account_in, ALICE_ID}; use test_network::*; -use test_samples::{gen_account_in, ALICE_ID}; #[test] fn must_execute_both_triggers() -> Result<()> { diff --git a/iroha/tests/integration/triggers/event_trigger.rs b/iroha/tests/integration/triggers/event_trigger.rs index 6c7afeaaa74..3fbc1d52e22 100644 --- a/iroha/tests/integration/triggers/event_trigger.rs +++ b/iroha/tests/integration/triggers/event_trigger.rs @@ -3,8 +3,8 @@ use iroha::{ client::{self, Client}, data_model::prelude::*, }; +use iroha_test_samples::ALICE_ID; use test_network::*; -use test_samples::ALICE_ID; #[test] fn test_mint_asset_when_new_asset_definition_created() -> Result<()> { diff --git a/iroha/tests/integration/triggers/orphans.rs b/iroha/tests/integration/triggers/orphans.rs index 8a0abce9cda..6c53003f8f2 100644 --- a/iroha/tests/integration/triggers/orphans.rs +++ b/iroha/tests/integration/triggers/orphans.rs @@ -1,7 +1,7 @@ use iroha::{client::Client, data_model::prelude::*}; use iroha_data_model::query::trigger::FindTriggers; -use test_network::{wait_for_genesis_committed, Peer, PeerBuilder}; -use test_samples::gen_account_in; +use iroha_test_samples::gen_account_in; +use iroha_test_network::{wait_for_genesis_committed, Peer, PeerBuilder}; use tokio::runtime::Runtime; fn find_trigger(iroha: &Client, trigger_id: TriggerId) -> Option { diff --git a/iroha/tests/integration/triggers/time_trigger.rs b/iroha/tests/integration/triggers/time_trigger.rs index 76672d5adbc..8779e1b700c 100644 --- a/iroha/tests/integration/triggers/time_trigger.rs +++ b/iroha/tests/integration/triggers/time_trigger.rs @@ -13,8 +13,8 @@ use iroha::{ }, }; use iroha_logger::info; +use iroha_test_samples::{gen_account_in, ALICE_ID}; use test_network::*; -use test_samples::{gen_account_in, ALICE_ID}; /// Default estimation of consensus duration. pub fn default_consensus_estimation() -> Duration { diff --git a/iroha/tests/integration/triggers/trigger_rollback.rs b/iroha/tests/integration/triggers/trigger_rollback.rs index 36756ac56a1..5037896107b 100644 --- a/iroha/tests/integration/triggers/trigger_rollback.rs +++ b/iroha/tests/integration/triggers/trigger_rollback.rs @@ -3,8 +3,8 @@ use iroha::{ client, data_model::{prelude::*, trigger::TriggerId}, }; +use iroha_test_samples::ALICE_ID; use test_network::*; -use test_samples::ALICE_ID; #[test] fn failed_trigger_revert() -> Result<()> { diff --git a/iroha/tests/integration/tx_chain_id.rs b/iroha/tests/integration/tx_chain_id.rs index d8654725f32..b38b273eac6 100644 --- a/iroha/tests/integration/tx_chain_id.rs +++ b/iroha/tests/integration/tx_chain_id.rs @@ -1,7 +1,7 @@ use iroha::data_model::prelude::*; use iroha_primitives::numeric::numeric; +use iroha_test_samples::gen_account_in; use test_network::*; -use test_samples::gen_account_in; #[test] fn send_tx_with_different_chain_id() { diff --git a/iroha/tests/integration/tx_history.rs b/iroha/tests/integration/tx_history.rs index 24811b4fb76..0d820d68720 100644 --- a/iroha/tests/integration/tx_history.rs +++ b/iroha/tests/integration/tx_history.rs @@ -6,9 +6,9 @@ use iroha::{ data_model::{prelude::*, query::parameters::Pagination}, }; use iroha_config::parameters::actual::Root as Config; +use iroha_test_samples::ALICE_ID; use nonzero_ext::nonzero; use test_network::*; -use test_samples::ALICE_ID; #[ignore = "ignore, more in #2851"] #[test] diff --git a/iroha/tests/integration/upgrade.rs b/iroha/tests/integration/upgrade.rs index 88fd230fbb7..70304eca983 100644 --- a/iroha/tests/integration/upgrade.rs +++ b/iroha/tests/integration/upgrade.rs @@ -12,9 +12,9 @@ use iroha::{ }; use iroha_executor_data_model::permission::{domain::CanUnregisterDomain, Permission as _}; use iroha_logger::info; +use iroha_test_samples::{ALICE_ID, BOB_ID}; use nonzero_ext::nonzero; use test_network::*; -use test_samples::{ALICE_ID, BOB_ID}; const ADMIN_PUBLIC_KEY_MULTIHASH: &str = "ed012076E5CA9698296AF9BE2CA45F525CB3BCFDEB7EE068BA56F973E9DD90564EF4FC"; diff --git a/iroha_core/Cargo.toml b/iroha_core/Cargo.toml index 65094e73169..ed9ab45731c 100644 --- a/iroha_core/Cargo.toml +++ b/iroha_core/Cargo.toml @@ -69,7 +69,7 @@ indexmap = "2.2.6" [dev-dependencies] iroha_executor_data_model = { workspace = true } -test_samples = { workspace = true } +iroha_test_samples = { workspace = true } criterion = { workspace = true } hex = { workspace = true } diff --git a/iroha_core/benches/blocks/apply_blocks.rs b/iroha_core/benches/blocks/apply_blocks.rs index d945a82dab5..fbbec3afbad 100644 --- a/iroha_core/benches/blocks/apply_blocks.rs +++ b/iroha_core/benches/blocks/apply_blocks.rs @@ -3,7 +3,7 @@ use iroha_core::{ block::CommittedBlock, prelude::*, state::State, sumeragi::network_topology::Topology, }; use iroha_data_model::peer::PeerId; -use test_samples::gen_account_in; +use iroha_test_samples::gen_account_in; #[path = "./common.rs"] mod common; diff --git a/iroha_core/benches/blocks/validate_blocks.rs b/iroha_core/benches/blocks/validate_blocks.rs index 94fdd71e61d..4782876c609 100644 --- a/iroha_core/benches/blocks/validate_blocks.rs +++ b/iroha_core/benches/blocks/validate_blocks.rs @@ -1,6 +1,6 @@ use iroha_core::{prelude::*, state::State, sumeragi::network_topology::Topology}; use iroha_data_model::{isi::InstructionBox, prelude::*}; -use test_samples::gen_account_in; +use iroha_test_samples::gen_account_in; #[path = "./common.rs"] mod common; diff --git a/iroha_core/benches/kura.rs b/iroha_core/benches/kura.rs index 85ccd6547dd..63c40cdffcd 100644 --- a/iroha_core/benches/kura.rs +++ b/iroha_core/benches/kura.rs @@ -14,7 +14,7 @@ use iroha_core::{ use iroha_crypto::KeyPair; use iroha_data_model::prelude::*; use iroha_futures::supervisor::ShutdownSignal; -use test_samples::gen_account_in; +use iroha_test_samples::gen_account_in; use tokio::{fs, runtime::Runtime}; async fn measure_block_size_for_n_executors(n_executors: u32) { diff --git a/iroha_core/benches/validation.rs b/iroha_core/benches/validation.rs index 61d2ddf5717..4c1b7e0d457 100644 --- a/iroha_core/benches/validation.rs +++ b/iroha_core/benches/validation.rs @@ -12,7 +12,7 @@ use iroha_core::{ use iroha_data_model::{ account::AccountId, isi::InstructionBox, prelude::*, transaction::TransactionBuilder, }; -use test_samples::gen_account_in; +use iroha_test_samples::gen_account_in; static STARTER_DOMAIN: LazyLock = LazyLock::new(|| "start".parse().unwrap()); static STARTER_KEYPAIR: LazyLock = LazyLock::new(KeyPair::random); diff --git a/iroha_core/src/block.rs b/iroha_core/src/block.rs index 808d8afeb44..f7241e71ceb 100644 --- a/iroha_core/src/block.rs +++ b/iroha_core/src/block.rs @@ -1109,7 +1109,7 @@ mod event { mod tests { use iroha_data_model::prelude::*; use iroha_genesis::GENESIS_DOMAIN_ID; - use test_samples::gen_account_in; + use iroha_test_samples::gen_account_in; use super::*; use crate::{ diff --git a/iroha_core/src/kiso.rs b/iroha_core/src/kiso.rs index fd3b0693b6d..0807b527121 100644 --- a/iroha_core/src/kiso.rs +++ b/iroha_core/src/kiso.rs @@ -167,7 +167,9 @@ mod tests { fn test_config() -> Root { // if it fails, it is probably a bug ConfigReader::new() - .with_toml_source(TomlSource::from_file("../iroha_config/iroha_test_config.toml").unwrap()) + .with_toml_source( + TomlSource::from_file("../iroha_config/iroha_test_config.toml").unwrap(), + ) .read_and_complete::() .unwrap() .parse() diff --git a/iroha_core/src/kura.rs b/iroha_core/src/kura.rs index db33b6aa126..dc94683b779 100644 --- a/iroha_core/src/kura.rs +++ b/iroha_core/src/kura.rs @@ -791,9 +791,9 @@ mod tests { ChainId, Level, }; use iroha_genesis::GenesisBuilder; + use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; use tempfile::TempDir; - use test_samples::gen_account_in; use super::*; use crate::{ diff --git a/iroha_core/src/lib.rs b/iroha_core/src/lib.rs index 4cb040dcd9a..63456ff5c2f 100644 --- a/iroha_core/src/lib.rs +++ b/iroha_core/src/lib.rs @@ -131,7 +131,7 @@ mod tests { use std::cmp::Ordering; use iroha_data_model::role::RoleId; - use test_samples::gen_account_in; + use iroha_test_samples::gen_account_in; use crate::role::RoleIdWithOwner; diff --git a/iroha_core/src/query/store.rs b/iroha_core/src/query/store.rs index 4b64fa28c9d..d6dbfd9f582 100644 --- a/iroha_core/src/query/store.rs +++ b/iroha_core/src/query/store.rs @@ -323,8 +323,8 @@ mod tests { query::parameters::{FetchSize, Pagination, QueryParams, Sorting}, }; use iroha_primitives::json::JsonString; + use iroha_test_samples::ALICE_ID; use nonzero_ext::nonzero; - use test_samples::ALICE_ID; use super::*; diff --git a/iroha_core/src/queue.rs b/iroha_core/src/queue.rs index d1d8f273350..f9a9bf3c330 100644 --- a/iroha_core/src/queue.rs +++ b/iroha_core/src/queue.rs @@ -403,9 +403,9 @@ pub mod tests { use std::{sync::Arc, thread, time::Duration}; use iroha_data_model::{parameter::TransactionParameters, prelude::*}; + use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; use rand::Rng as _; - use test_samples::gen_account_in; use tokio::test; use super::*; diff --git a/iroha_core/src/smartcontracts/isi/account.rs b/iroha_core/src/smartcontracts/isi/account.rs index 70f5e56a760..c63f33b1758 100644 --- a/iroha_core/src/smartcontracts/isi/account.rs +++ b/iroha_core/src/smartcontracts/isi/account.rs @@ -459,7 +459,7 @@ pub mod isi { #[cfg(test)] mod test { use iroha_data_model::{prelude::AssetDefinition, ParseError}; - use test_samples::gen_account_in; + use iroha_test_samples::gen_account_in; use crate::smartcontracts::isi::Registrable as _; diff --git a/iroha_core/src/smartcontracts/isi/mod.rs b/iroha_core/src/smartcontracts/isi/mod.rs index c886a7ce737..46140458ba6 100644 --- a/iroha_core/src/smartcontracts/isi/mod.rs +++ b/iroha_core/src/smartcontracts/isi/mod.rs @@ -228,7 +228,7 @@ pub mod prelude { mod tests { use std::sync::Arc; - use test_samples::{ + use iroha_test_samples::{ gen_account_in, ALICE_ID, SAMPLE_GENESIS_ACCOUNT_ID, SAMPLE_GENESIS_ACCOUNT_KEYPAIR, }; use tokio::test; diff --git a/iroha_core/src/smartcontracts/isi/query.rs b/iroha_core/src/smartcontracts/isi/query.rs index 9906ce3f725..87404e97ff0 100644 --- a/iroha_core/src/smartcontracts/isi/query.rs +++ b/iroha_core/src/smartcontracts/isi/query.rs @@ -341,8 +341,8 @@ mod tests { use iroha_crypto::{Hash, KeyPair}; use iroha_data_model::query::predicate::CompoundPredicate; use iroha_primitives::json::JsonString; + use iroha_test_samples::{gen_account_in, ALICE_ID, ALICE_KEYPAIR}; use nonzero_ext::nonzero; - use test_samples::{gen_account_in, ALICE_ID, ALICE_KEYPAIR}; use tokio::test; use super::*; diff --git a/iroha_core/src/state.rs b/iroha_core/src/state.rs index bd83fd8bd86..c3ab092e804 100644 --- a/iroha_core/src/state.rs +++ b/iroha_core/src/state.rs @@ -2144,7 +2144,7 @@ mod tests { use core::num::NonZeroU64; use iroha_data_model::block::BlockPayload; - use test_samples::gen_account_in; + use iroha_test_samples::gen_account_in; use super::*; use crate::{ diff --git a/iroha_core/src/sumeragi/main_loop.rs b/iroha_core/src/sumeragi/main_loop.rs index 85214cb589e..5183728ef81 100644 --- a/iroha_core/src/sumeragi/main_loop.rs +++ b/iroha_core/src/sumeragi/main_loop.rs @@ -1360,8 +1360,8 @@ fn categorize_block_sync( mod tests { use iroha_data_model::{isi::InstructionBox, transaction::TransactionBuilder}; use iroha_genesis::GENESIS_DOMAIN_ID; + use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; - use test_samples::gen_account_in; use tokio::test; use super::*; diff --git a/iroha_core/test_network/Cargo.toml b/iroha_core/test_network/Cargo.toml index 1d80086abfe..dddac32ffb4 100644 --- a/iroha_core/test_network/Cargo.toml +++ b/iroha_core/test_network/Cargo.toml @@ -21,7 +21,7 @@ iroha_logger.workspace = true iroha_genesis.workspace = true iroha_futures.workspace = true iroha_wasm_builder.workspace = true -test_samples.workspace = true +iroha_test_samples.workspace = true eyre.workspace = true rand.workspace = true diff --git a/iroha_core/test_network/src/lib.rs b/iroha_core/test_network/src/lib.rs index 7bf8ccf6b45..3720fbc621b 100644 --- a/iroha_core/test_network/src/lib.rs +++ b/iroha_core/test_network/src/lib.rs @@ -27,10 +27,10 @@ use iroha_primitives::{ addr::{socket_addr, SocketAddr}, unique_vec::UniqueVec, }; +use iroha_test_samples::{ALICE_ID, ALICE_KEYPAIR, PEER_KEYPAIR, SAMPLE_GENESIS_ACCOUNT_KEYPAIR}; use irohad::Iroha; use rand::{prelude::SliceRandom, thread_rng}; use tempfile::TempDir; -use test_samples::{ALICE_ID, ALICE_KEYPAIR, PEER_KEYPAIR, SAMPLE_GENESIS_ACCOUNT_KEYPAIR}; use tokio::{ runtime::{self, Runtime}, time, diff --git a/iroha_genesis/Cargo.toml b/iroha_genesis/Cargo.toml index 8c44afb5501..b7085ee7ec4 100644 --- a/iroha_genesis/Cargo.toml +++ b/iroha_genesis/Cargo.toml @@ -24,4 +24,4 @@ parity-scale-codec = { workspace = true } [dev-dependencies] iroha_crypto = { workspace = true, features = ["rand"] } -test_samples = { workspace = true } +iroha_test_samples = { workspace = true } diff --git a/iroha_genesis/src/lib.rs b/iroha_genesis/src/lib.rs index 99586d650c9..db891b3dee3 100644 --- a/iroha_genesis/src/lib.rs +++ b/iroha_genesis/src/lib.rs @@ -392,7 +392,7 @@ impl Decode for ExecutorPath { #[cfg(test)] mod tests { - use test_samples::{ALICE_KEYPAIR, BOB_KEYPAIR}; + use iroha_test_samples::{ALICE_KEYPAIR, BOB_KEYPAIR}; use super::*; diff --git a/iroha_smart_contract/Cargo.toml b/iroha_smart_contract/Cargo.toml index b523479c2c5..128f8bae302 100644 --- a/iroha_smart_contract/Cargo.toml +++ b/iroha_smart_contract/Cargo.toml @@ -29,7 +29,7 @@ displaydoc.workspace = true getrandom = "0.2" [dev-dependencies] -test_samples = { workspace = true } +iroha_test_samples = { workspace = true } webassembly-test = "0.1.0" # Not used directly but required for compilation diff --git a/test_samples/Cargo.toml b/iroha_test_samples/Cargo.toml similarity index 95% rename from test_samples/Cargo.toml rename to iroha_test_samples/Cargo.toml index b24c95e4ebb..90e1d4c9506 100644 --- a/test_samples/Cargo.toml +++ b/iroha_test_samples/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "test_samples" +name = "iroha_test_samples" edition.workspace = true version.workspace = true authors.workspace = true diff --git a/test_samples/src/lib.rs b/iroha_test_samples/src/lib.rs similarity index 100% rename from test_samples/src/lib.rs rename to iroha_test_samples/src/lib.rs diff --git a/scripts/tests/consistency.sh b/scripts/tests/consistency.sh index 133a6d1ddae..918ccef1a3a 100755 --- a/scripts/tests/consistency.sh +++ b/scripts/tests/consistency.sh @@ -5,7 +5,7 @@ case $1 in "genesis") cargo run --release --bin kagami -- genesis generate --executor-path-in-genesis ./executor.wasm --genesis-public-key ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4 | diff - defaults/genesis.json || { echo 'Please re-generate the default genesis with `cargo run --release --bin kagami -- genesis --executor-path-in-genesis ./executor.wasm --genesis-public-key ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4 > ./defaults/genesis.json`' - echo 'The assumption here is that the authority of the default genesis transaction is `test_samples::SAMPLE_GENESIS_ACCOUNT_ID`' + echo 'The assumption here is that the authority of the default genesis transaction is `iroha_test_samples::SAMPLE_GENESIS_ACCOUNT_ID`' exit 1 };; "schema") diff --git a/tools/kagami/Cargo.toml b/tools/kagami/Cargo.toml index 5af39ba2572..0f37503a1d4 100644 --- a/tools/kagami/Cargo.toml +++ b/tools/kagami/Cargo.toml @@ -20,7 +20,7 @@ iroha_config.workspace = true iroha_schema_gen.workspace = true iroha_primitives.workspace = true iroha_genesis.workspace = true -test_samples.workspace = true +iroha_test_samples.workspace = true clap = { workspace = true, features = ["derive"] } serde = { workspace = true, features = ["derive"] } diff --git a/tools/kagami/src/genesis/generate.rs b/tools/kagami/src/genesis/generate.rs index d4fd4129222..3bc572f78b7 100644 --- a/tools/kagami/src/genesis/generate.rs +++ b/tools/kagami/src/genesis/generate.rs @@ -11,7 +11,7 @@ use iroha_executor_data_model::permission::{ parameter::CanSetParameters, }; use iroha_genesis::{GenesisBuilder, RawGenesisTransaction, GENESIS_DOMAIN_ID}; -use test_samples::{gen_account_in, ALICE_ID, BOB_ID, CARPENTER_ID}; +use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID, CARPENTER_ID}; use crate::{Outcome, RunArgs}; diff --git a/tools/parity_scale_cli/Cargo.toml b/tools/parity_scale_cli/Cargo.toml index b076c9976eb..5a98c04bc9c 100644 --- a/tools/parity_scale_cli/Cargo.toml +++ b/tools/parity_scale_cli/Cargo.toml @@ -37,4 +37,4 @@ serde = { workspace = true } eyre = { workspace = true } [dev-dependencies] -test_samples = { workspace = true } +iroha_test_samples = { workspace = true } diff --git a/tools/parity_scale_cli/src/main.rs b/tools/parity_scale_cli/src/main.rs index 376e3b63280..2e7367e50ed 100644 --- a/tools/parity_scale_cli/src/main.rs +++ b/tools/parity_scale_cli/src/main.rs @@ -304,7 +304,7 @@ fn list_types(map: &ConverterMap, writer: &mut W) -> Result<()> { #[cfg(test)] mod tests { use iroha_data_model::prelude::*; - use test_samples::ALICE_ID; + use iroha_test_samples::ALICE_ID; use super::*; From 08f686e55802d028491f810cf83c9bb04e90003c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 13 Aug 2024 11:34:33 +0400 Subject: [PATCH 23/59] refactor: rename `wasm_builder` to `iroha_wasm_builder` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 4 ++-- {wasm_builder => iroha_wasm_builder}/Cargo.toml | 0 {wasm_builder => iroha_wasm_builder}/README.md | 0 {wasm_builder => iroha_wasm_builder}/src/lib.rs | 0 {wasm_builder => iroha_wasm_builder}/src/main.rs | 0 wasm_samples/default_executor/README.md | 2 +- wasm_samples/multisig/Cargo.toml | 2 +- wasm_samples/multisig_register/Cargo.toml | 2 +- 8 files changed, 5 insertions(+), 5 deletions(-) rename {wasm_builder => iroha_wasm_builder}/Cargo.toml (100%) rename {wasm_builder => iroha_wasm_builder}/README.md (100%) rename {wasm_builder => iroha_wasm_builder}/src/lib.rs (100%) rename {wasm_builder => iroha_wasm_builder}/src/main.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index f75d729f52c..9fca46b6b06 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,7 @@ iroha_genesis = { version = "=2.0.0-rc.1.0", path = "iroha_genesis" } iroha_ffi = { version = "=2.0.0-rc.1.0", path = "iroha_ffi" } iroha_version = { version = "=2.0.0-rc.1.0", path = "iroha_version", default-features = false } iroha_wasm_codec = { version = "=2.0.0-rc.1.0", path = "wasm_codec" } -iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "wasm_builder" } +iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "iroha_wasm_builder" } iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "iroha_smart_contract" } iroha_smart_contract_utils = { version = "=2.0.0-rc.1.0", path = "iroha_smart_contract/utils" } @@ -240,7 +240,7 @@ members = [ "wasm_codec", "wasm_codec/derive", - "wasm_builder", + "iroha_wasm_builder", ] exclude = [ "wasm_samples", diff --git a/wasm_builder/Cargo.toml b/iroha_wasm_builder/Cargo.toml similarity index 100% rename from wasm_builder/Cargo.toml rename to iroha_wasm_builder/Cargo.toml diff --git a/wasm_builder/README.md b/iroha_wasm_builder/README.md similarity index 100% rename from wasm_builder/README.md rename to iroha_wasm_builder/README.md diff --git a/wasm_builder/src/lib.rs b/iroha_wasm_builder/src/lib.rs similarity index 100% rename from wasm_builder/src/lib.rs rename to iroha_wasm_builder/src/lib.rs diff --git a/wasm_builder/src/main.rs b/iroha_wasm_builder/src/main.rs similarity index 100% rename from wasm_builder/src/main.rs rename to iroha_wasm_builder/src/main.rs diff --git a/wasm_samples/default_executor/README.md b/wasm_samples/default_executor/README.md index 8a8a9d66de1..5c412408997 100644 --- a/wasm_samples/default_executor/README.md +++ b/wasm_samples/default_executor/README.md @@ -1,6 +1,6 @@ # `iroha_default_executor` -Use the [Wasm Builder CLI](../../wasm_builder) in order to build it: +Use the [Wasm Builder CLI](../../iroha_wasm_builder) in order to build it: ```bash cargo run --bin iroha_wasm_builder -- \ diff --git a/wasm_samples/multisig/Cargo.toml b/wasm_samples/multisig/Cargo.toml index b2c708c206f..7c391068869 100644 --- a/wasm_samples/multisig/Cargo.toml +++ b/wasm_samples/multisig/Cargo.toml @@ -22,4 +22,4 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, default-features = false } [build-dependencies] -iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "../../wasm_builder" } +iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "../../iroha_wasm_builder" } diff --git a/wasm_samples/multisig_register/Cargo.toml b/wasm_samples/multisig_register/Cargo.toml index 84265713e66..2e4c9986e4d 100644 --- a/wasm_samples/multisig_register/Cargo.toml +++ b/wasm_samples/multisig_register/Cargo.toml @@ -23,4 +23,4 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, default-features = false } [build-dependencies] -iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "../../wasm_builder" } +iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "../../iroha_wasm_builder" } From 59c244579c62a102d4eeea4cae13deb807dc7a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 13 Aug 2024 11:36:55 +0400 Subject: [PATCH 24/59] refactor: rename `wasm_codec` to `iroha_wasm_codec` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 7 +++---- {wasm_codec => iroha_wasm_codec}/Cargo.toml | 0 {wasm_codec => iroha_wasm_codec}/derive/Cargo.toml | 0 {wasm_codec => iroha_wasm_codec}/derive/src/lib.rs | 0 {wasm_codec => iroha_wasm_codec}/src/lib.rs | 0 5 files changed, 3 insertions(+), 4 deletions(-) rename {wasm_codec => iroha_wasm_codec}/Cargo.toml (100%) rename {wasm_codec => iroha_wasm_codec}/derive/Cargo.toml (100%) rename {wasm_codec => iroha_wasm_codec}/derive/src/lib.rs (100%) rename {wasm_codec => iroha_wasm_codec}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 9fca46b6b06..36adafe013b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ iroha_futures = { version = "=2.0.0-rc.1.0", path = "iroha_futures" } iroha_genesis = { version = "=2.0.0-rc.1.0", path = "iroha_genesis" } iroha_ffi = { version = "=2.0.0-rc.1.0", path = "iroha_ffi" } iroha_version = { version = "=2.0.0-rc.1.0", path = "iroha_version", default-features = false } -iroha_wasm_codec = { version = "=2.0.0-rc.1.0", path = "wasm_codec" } +iroha_wasm_codec = { version = "=2.0.0-rc.1.0", path = "iroha_wasm_codec" } iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "iroha_wasm_builder" } iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "iroha_smart_contract" } @@ -237,9 +237,8 @@ members = [ "iroha_torii/const", "iroha_version", "iroha_version/derive", - - "wasm_codec", - "wasm_codec/derive", + "iroha_wasm_codec", + "iroha_wasm_codec/derive", "iroha_wasm_builder", ] exclude = [ diff --git a/wasm_codec/Cargo.toml b/iroha_wasm_codec/Cargo.toml similarity index 100% rename from wasm_codec/Cargo.toml rename to iroha_wasm_codec/Cargo.toml diff --git a/wasm_codec/derive/Cargo.toml b/iroha_wasm_codec/derive/Cargo.toml similarity index 100% rename from wasm_codec/derive/Cargo.toml rename to iroha_wasm_codec/derive/Cargo.toml diff --git a/wasm_codec/derive/src/lib.rs b/iroha_wasm_codec/derive/src/lib.rs similarity index 100% rename from wasm_codec/derive/src/lib.rs rename to iroha_wasm_codec/derive/src/lib.rs diff --git a/wasm_codec/src/lib.rs b/iroha_wasm_codec/src/lib.rs similarity index 100% rename from wasm_codec/src/lib.rs rename to iroha_wasm_codec/src/lib.rs From 7ba4d9700674a2b41cd98a0bf4480aa486e478a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 13 Aug 2024 11:38:48 +0400 Subject: [PATCH 25/59] refactor: unnest and rename `wasm_test_runner` to `iroha_wasm_test_runner` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .github/workflows/iroha2-dev-pr-wasm.yaml | 2 +- Cargo.toml | 2 +- iroha_smart_contract/README.md | 2 +- {tools/wasm_test_runner => iroha_wasm_test_runner}/Cargo.toml | 0 {tools/wasm_test_runner => iroha_wasm_test_runner}/src/main.rs | 0 5 files changed, 3 insertions(+), 3 deletions(-) rename {tools/wasm_test_runner => iroha_wasm_test_runner}/Cargo.toml (100%) rename {tools/wasm_test_runner => iroha_wasm_test_runner}/src/main.rs (100%) diff --git a/.github/workflows/iroha2-dev-pr-wasm.yaml b/.github/workflows/iroha2-dev-pr-wasm.yaml index ae1e21e63ef..212ea00724f 100644 --- a/.github/workflows/iroha2-dev-pr-wasm.yaml +++ b/.github/workflows/iroha2-dev-pr-wasm.yaml @@ -54,7 +54,7 @@ jobs: name: executor.wasm path: ${{ env.DOCKER_COMPOSE_PATH }} - name: Install iroha_wasm_test_runner - run: cargo install --path tools/wasm_test_runner + run: cargo install --path iroha_wasm_test_runner - name: Run smart contract tests on WebAssembly VM working-directory: iroha_smart_contract run: mold --run cargo test -p iroha_smart_contract -p iroha_smart_contract_utils --release --tests --target wasm32-unknown-unknown --no-fail-fast --quiet diff --git a/Cargo.toml b/Cargo.toml index 36adafe013b..f9537f5ce3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -232,7 +232,7 @@ members = [ "tools/kagami", "tools/kura_inspector", "tools/parity_scale_cli", - "tools/wasm_test_runner", + "iroha_wasm_test_runner", "iroha_torii", "iroha_torii/const", "iroha_version", diff --git a/iroha_smart_contract/README.md b/iroha_smart_contract/README.md index 5231e044444..514b314d77c 100644 --- a/iroha_smart_contract/README.md +++ b/iroha_smart_contract/README.md @@ -11,7 +11,7 @@ Check the [WASM section of our tutorial](https://hyperledger.github.io/iroha-2-d To be able to run tests compiled for `wasm32-unknown-unknown` target install `iroha_wasm_test_runner` from the root of the Iroha repository: ```bash -cargo install --path tools/wasm_test_runner +cargo install --path iroha_wasm_test_runner ``` Then run tests: diff --git a/tools/wasm_test_runner/Cargo.toml b/iroha_wasm_test_runner/Cargo.toml similarity index 100% rename from tools/wasm_test_runner/Cargo.toml rename to iroha_wasm_test_runner/Cargo.toml diff --git a/tools/wasm_test_runner/src/main.rs b/iroha_wasm_test_runner/src/main.rs similarity index 100% rename from tools/wasm_test_runner/src/main.rs rename to iroha_wasm_test_runner/src/main.rs From 073ee91a8b22417b38d0b08d0cc75e5523d1bad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 13 Aug 2024 11:59:34 +0400 Subject: [PATCH 26/59] refactor: unnest and rename `kagami` to `iroha_kagami` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.lock | 40 +++++++++---------- Cargo.toml | 5 +-- Dockerfile | 2 +- README.md | 2 +- docs/README.md | 2 +- {tools/kagami => iroha_kagami}/Cargo.toml | 6 ++- {tools/kagami => iroha_kagami}/README.md | 0 {tools/kagami => iroha_kagami}/src/crypto.rs | 0 {tools/kagami => iroha_kagami}/src/genesis.rs | 0 .../src/genesis/generate.rs | 0 .../src/genesis/sign.rs | 0 {tools/kagami => iroha_kagami}/src/main.rs | 0 {tools/kagami => iroha_kagami}/src/schema.rs | 0 {tools/swarm => iroha_swarm}/Cargo.toml | 0 {tools/swarm => iroha_swarm}/README.md | 0 {tools/swarm => iroha_swarm}/src/lib.rs | 0 {tools/swarm => iroha_swarm}/src/main.rs | 0 {tools/swarm => iroha_swarm}/src/path.rs | 0 {tools/swarm => iroha_swarm}/src/peer.rs | 0 {tools/swarm => iroha_swarm}/src/schema.rs | 0 .../src/schema/serde_impls.rs | 0 irohad/README.md | 4 +- 22 files changed, 32 insertions(+), 29 deletions(-) rename {tools/kagami => iroha_kagami}/Cargo.toml (85%) rename {tools/kagami => iroha_kagami}/README.md (100%) rename {tools/kagami => iroha_kagami}/src/crypto.rs (100%) rename {tools/kagami => iroha_kagami}/src/genesis.rs (100%) rename {tools/kagami => iroha_kagami}/src/genesis/generate.rs (100%) rename {tools/kagami => iroha_kagami}/src/genesis/sign.rs (100%) rename {tools/kagami => iroha_kagami}/src/main.rs (100%) rename {tools/kagami => iroha_kagami}/src/schema.rs (100%) rename {tools/swarm => iroha_swarm}/Cargo.toml (100%) rename {tools/swarm => iroha_swarm}/README.md (100%) rename {tools/swarm => iroha_swarm}/src/lib.rs (100%) rename {tools/swarm => iroha_swarm}/src/main.rs (100%) rename {tools/swarm => iroha_swarm}/src/path.rs (100%) rename {tools/swarm => iroha_swarm}/src/peer.rs (100%) rename {tools/swarm => iroha_swarm}/src/schema.rs (100%) rename {tools/swarm => iroha_swarm}/src/schema/serde_impls.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 5d9f96f86aa..985a4f75411 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3283,6 +3283,26 @@ dependencies = [ "tracing", ] +[[package]] +name = "iroha_kagami" +version = "2.0.0-rc.1.0" +dependencies = [ + "clap", + "color-eyre", + "derive_more", + "iroha_config", + "iroha_crypto", + "iroha_data_model", + "iroha_executor_data_model", + "iroha_genesis", + "iroha_primitives", + "iroha_schema_gen", + "iroha_test_samples", + "parity-scale-codec", + "serde", + "serde_json", +] + [[package]] name = "iroha_logger" version = "2.0.0-rc.1.0" @@ -3810,26 +3830,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "kagami" -version = "2.0.0-rc.1.0" -dependencies = [ - "clap", - "color-eyre", - "derive_more", - "iroha_config", - "iroha_crypto", - "iroha_data_model", - "iroha_executor_data_model", - "iroha_genesis", - "iroha_primitives", - "iroha_schema_gen", - "iroha_test_samples", - "parity-scale-codec", - "serde", - "serde_json", -] - [[package]] name = "keccak" version = "0.1.5" diff --git a/Cargo.toml b/Cargo.toml index f9537f5ce3e..9c637dc0a71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -227,9 +227,8 @@ members = [ "iroha_executor/data_model/derive", "iroha_telemetry", "iroha_test_samples", - - "tools/swarm", - "tools/kagami", + "iroha_swarm", + "iroha_kagami", "tools/kura_inspector", "tools/parity_scale_cli", "iroha_wasm_test_runner", diff --git a/Dockerfile b/Dockerfile index eb624e7a8d8..231b701b0c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ COPY . . RUN cargo build \ -p irohad \ -p iroha_cli \ - -p kagami \ + -p iroha_kagami \ --target x86_64-unknown-linux-musl \ --profile deploy diff --git a/README.md b/README.md index 62b581d7bc9..64d0852582b 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ Iroha project mainly consists of the following crates: * [`iroha_core`](iroha_core) is the primary library used by all other crates, including the peer endpoint management. * [`iroha_config`](iroha_config) handles configuration and documentation generation for options and run-time changes. * [`iroha_crypto`](iroha_crypto) defines cryptographic aspects of Iroha. -* [`kagami`](tools/kagami) is used to generate cryptographic keys, default genesis, configuration reference, and schema. +* [`kagami`](iroha_kagami) is used to generate cryptographic keys, default genesis, configuration reference, and schema. * [`iroha_data_model`](iroha_data_model) defines common data models in Iroha. * [`iroha_futures`](iroha_futures) is used for `async` programming. * [`iroha_logger`](iroha_logger) uses `tracing` to provide logging facilities. diff --git a/docs/README.md b/docs/README.md index 41d813e33f2..f59fa7f5596 100644 --- a/docs/README.md +++ b/docs/README.md @@ -11,7 +11,7 @@ This is the main Iroha 2 documentation that you will find useful: Documentation for Iroha 2 tools: -- [Kagami](../tools/kagami/README.md) +- [Kagami](../iroha_kagami/README.md) - [Kura Inspector](../tools/kura_inspector/README.md) - [Parity Scale Decoder Tool](../tools/parity_scale_cli/README.md) diff --git a/tools/kagami/Cargo.toml b/iroha_kagami/Cargo.toml similarity index 85% rename from tools/kagami/Cargo.toml rename to iroha_kagami/Cargo.toml index 0f37503a1d4..760f8146041 100644 --- a/tools/kagami/Cargo.toml +++ b/iroha_kagami/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "kagami" # Translates to teacher, the exemplar, the looking glass. +name = "iroha_kagami" # Translates to teacher, the exemplar, the looking glass. edition.workspace = true version.workspace = true @@ -28,3 +28,7 @@ color-eyre.workspace = true serde_json.workspace = true derive_more.workspace = true parity-scale-codec.workspace = true + +[[bin]] +name = "kagami" +path = "src/main.rs" diff --git a/tools/kagami/README.md b/iroha_kagami/README.md similarity index 100% rename from tools/kagami/README.md rename to iroha_kagami/README.md diff --git a/tools/kagami/src/crypto.rs b/iroha_kagami/src/crypto.rs similarity index 100% rename from tools/kagami/src/crypto.rs rename to iroha_kagami/src/crypto.rs diff --git a/tools/kagami/src/genesis.rs b/iroha_kagami/src/genesis.rs similarity index 100% rename from tools/kagami/src/genesis.rs rename to iroha_kagami/src/genesis.rs diff --git a/tools/kagami/src/genesis/generate.rs b/iroha_kagami/src/genesis/generate.rs similarity index 100% rename from tools/kagami/src/genesis/generate.rs rename to iroha_kagami/src/genesis/generate.rs diff --git a/tools/kagami/src/genesis/sign.rs b/iroha_kagami/src/genesis/sign.rs similarity index 100% rename from tools/kagami/src/genesis/sign.rs rename to iroha_kagami/src/genesis/sign.rs diff --git a/tools/kagami/src/main.rs b/iroha_kagami/src/main.rs similarity index 100% rename from tools/kagami/src/main.rs rename to iroha_kagami/src/main.rs diff --git a/tools/kagami/src/schema.rs b/iroha_kagami/src/schema.rs similarity index 100% rename from tools/kagami/src/schema.rs rename to iroha_kagami/src/schema.rs diff --git a/tools/swarm/Cargo.toml b/iroha_swarm/Cargo.toml similarity index 100% rename from tools/swarm/Cargo.toml rename to iroha_swarm/Cargo.toml diff --git a/tools/swarm/README.md b/iroha_swarm/README.md similarity index 100% rename from tools/swarm/README.md rename to iroha_swarm/README.md diff --git a/tools/swarm/src/lib.rs b/iroha_swarm/src/lib.rs similarity index 100% rename from tools/swarm/src/lib.rs rename to iroha_swarm/src/lib.rs diff --git a/tools/swarm/src/main.rs b/iroha_swarm/src/main.rs similarity index 100% rename from tools/swarm/src/main.rs rename to iroha_swarm/src/main.rs diff --git a/tools/swarm/src/path.rs b/iroha_swarm/src/path.rs similarity index 100% rename from tools/swarm/src/path.rs rename to iroha_swarm/src/path.rs diff --git a/tools/swarm/src/peer.rs b/iroha_swarm/src/peer.rs similarity index 100% rename from tools/swarm/src/peer.rs rename to iroha_swarm/src/peer.rs diff --git a/tools/swarm/src/schema.rs b/iroha_swarm/src/schema.rs similarity index 100% rename from tools/swarm/src/schema.rs rename to iroha_swarm/src/schema.rs diff --git a/tools/swarm/src/schema/serde_impls.rs b/iroha_swarm/src/schema/serde_impls.rs similarity index 100% rename from tools/swarm/src/schema/serde_impls.rs rename to iroha_swarm/src/schema/serde_impls.rs diff --git a/irohad/README.md b/irohad/README.md index 25e4d44793e..67ad267385a 100644 --- a/irohad/README.md +++ b/irohad/README.md @@ -44,7 +44,7 @@ To run the Iroha peer binary, you must [generate the keys](#generating-keys) and ### Generating Keys -We highly recommend you to generate a new key pair for any non-testing deployment. We also recommend using the `Ed25519` algorithm. For convenience, you can use the provided [`kagami`](../tools/kagami/README.md) tool to generate key pairs. For example, +We highly recommend you to generate a new key pair for any non-testing deployment. We also recommend using the `Ed25519` algorithm. For convenience, you can use the provided [`kagami`](../iroha_kagami/README.md) tool to generate key pairs. For example, @@ -68,7 +68,7 @@ cargo run --bin kagami -- crypto --json ``` **NOTE**: The `kagami` binary can be run without `cargo` using the `/target/release/kagami` binary. -Refer to [generating key pairs with `kagami`](../tools/kagami#crypto) for more details. +Refer to [generating key pairs with `kagami`](../iroha_kagami#crypto) for more details. ### Configuration file From dbb58f5cff15fbf937ebcf6208eb6d790942f0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 13 Aug 2024 13:40:07 +0400 Subject: [PATCH 27/59] refactor: unnest `kura_inspector` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 2 +- docs/README.md | 2 +- {tools/kura_inspector => kura_inspector}/Cargo.toml | 0 {tools/kura_inspector => kura_inspector}/README.md | 0 {tools/kura_inspector => kura_inspector}/src/main.rs | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename {tools/kura_inspector => kura_inspector}/Cargo.toml (100%) rename {tools/kura_inspector => kura_inspector}/README.md (100%) rename {tools/kura_inspector => kura_inspector}/src/main.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 9c637dc0a71..0cf95def9e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -229,7 +229,7 @@ members = [ "iroha_test_samples", "iroha_swarm", "iroha_kagami", - "tools/kura_inspector", + "kura_inspector", "tools/parity_scale_cli", "iroha_wasm_test_runner", "iroha_torii", diff --git a/docs/README.md b/docs/README.md index f59fa7f5596..6e16d848e4a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,7 +12,7 @@ This is the main Iroha 2 documentation that you will find useful: Documentation for Iroha 2 tools: - [Kagami](../iroha_kagami/README.md) -- [Kura Inspector](../tools/kura_inspector/README.md) +- [Kura Inspector](../kura_inspector/README.md) - [Parity Scale Decoder Tool](../tools/parity_scale_cli/README.md) ## Development diff --git a/tools/kura_inspector/Cargo.toml b/kura_inspector/Cargo.toml similarity index 100% rename from tools/kura_inspector/Cargo.toml rename to kura_inspector/Cargo.toml diff --git a/tools/kura_inspector/README.md b/kura_inspector/README.md similarity index 100% rename from tools/kura_inspector/README.md rename to kura_inspector/README.md diff --git a/tools/kura_inspector/src/main.rs b/kura_inspector/src/main.rs similarity index 100% rename from tools/kura_inspector/src/main.rs rename to kura_inspector/src/main.rs From 098d96738da635cdb3e347dac698f26549839e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 13 Aug 2024 13:53:25 +0400 Subject: [PATCH 28/59] refactor: unnest and rename `parity_scale_cli` to `iroha_parity_scale_cli` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.lock | 44 +++++++++--------- Cargo.toml | 2 +- docs/README.md | 2 +- .../Cargo.toml | 6 ++- .../README.md | 8 ++-- .../build.rs | 0 .../samples/account.bin | Bin .../samples/account.json | 0 .../samples/domain.bin | 0 .../samples/domain.json | 0 .../samples/trigger.bin | Bin .../samples/trigger.json | 0 .../src/main.rs | 0 13 files changed, 33 insertions(+), 29 deletions(-) rename {tools/parity_scale_cli => iroha_parity_scale_cli}/Cargo.toml (94%) rename {tools/parity_scale_cli => iroha_parity_scale_cli}/README.md (94%) rename {tools/parity_scale_cli => iroha_parity_scale_cli}/build.rs (100%) rename {tools/parity_scale_cli => iroha_parity_scale_cli}/samples/account.bin (100%) rename {tools/parity_scale_cli => iroha_parity_scale_cli}/samples/account.json (100%) rename {tools/parity_scale_cli => iroha_parity_scale_cli}/samples/domain.bin (100%) rename {tools/parity_scale_cli => iroha_parity_scale_cli}/samples/domain.json (100%) rename {tools/parity_scale_cli => iroha_parity_scale_cli}/samples/trigger.bin (100%) rename {tools/parity_scale_cli => iroha_parity_scale_cli}/samples/trigger.json (100%) rename {tools/parity_scale_cli => iroha_parity_scale_cli}/src/main.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 985a4f75411..2e8e4fba743 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3380,6 +3380,28 @@ dependencies = [ "tokio", ] +[[package]] +name = "iroha_parity_scale_cli" +version = "2.0.0-rc.1.0" +dependencies = [ + "clap", + "colored", + "eyre", + "iroha_crypto", + "iroha_data_model", + "iroha_executor_data_model", + "iroha_genesis", + "iroha_primitives", + "iroha_schema", + "iroha_schema_gen", + "iroha_test_samples", + "iroha_version", + "parity-scale-codec", + "serde", + "serde_json", + "supports-color 2.1.0", +] + [[package]] name = "iroha_primitives" version = "2.0.0-rc.1.0" @@ -4379,28 +4401,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parity_scale_cli" -version = "2.0.0-rc.1.0" -dependencies = [ - "clap", - "colored", - "eyre", - "iroha_crypto", - "iroha_data_model", - "iroha_executor_data_model", - "iroha_genesis", - "iroha_primitives", - "iroha_schema", - "iroha_schema_gen", - "iroha_test_samples", - "iroha_version", - "parity-scale-codec", - "serde", - "serde_json", - "supports-color 2.1.0", -] - [[package]] name = "parking_lot" version = "0.12.3" diff --git a/Cargo.toml b/Cargo.toml index 0cf95def9e3..405bc6f78f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -230,7 +230,7 @@ members = [ "iroha_swarm", "iroha_kagami", "kura_inspector", - "tools/parity_scale_cli", + "iroha_parity_scale_cli", "iroha_wasm_test_runner", "iroha_torii", "iroha_torii/const", diff --git a/docs/README.md b/docs/README.md index 6e16d848e4a..ef0352e80ea 100644 --- a/docs/README.md +++ b/docs/README.md @@ -13,7 +13,7 @@ Documentation for Iroha 2 tools: - [Kagami](../iroha_kagami/README.md) - [Kura Inspector](../kura_inspector/README.md) -- [Parity Scale Decoder Tool](../tools/parity_scale_cli/README.md) +- [Parity Scale Decoder Tool](../iroha_parity_scale_cli/README.md) ## Development diff --git a/tools/parity_scale_cli/Cargo.toml b/iroha_parity_scale_cli/Cargo.toml similarity index 94% rename from tools/parity_scale_cli/Cargo.toml rename to iroha_parity_scale_cli/Cargo.toml index 5a98c04bc9c..e0c27915944 100644 --- a/tools/parity_scale_cli/Cargo.toml +++ b/iroha_parity_scale_cli/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "parity_scale_cli" +name = "iroha_parity_scale_cli" edition.workspace = true version.workspace = true @@ -38,3 +38,7 @@ eyre = { workspace = true } [dev-dependencies] iroha_test_samples = { workspace = true } + +[[bin]] +name = "parity_scale_cli" +path = "src/main.rs" diff --git a/tools/parity_scale_cli/README.md b/iroha_parity_scale_cli/README.md similarity index 94% rename from tools/parity_scale_cli/README.md rename to iroha_parity_scale_cli/README.md index dc1345fe24f..91d7b7f9db0 100644 --- a/tools/parity_scale_cli/README.md +++ b/iroha_parity_scale_cli/README.md @@ -74,13 +74,13 @@ These commands require `--type` argument. If data type is not known, [`scale-to- * Decode the `NewAccount` data type from the `samples/account.bin` binary: ```bash - ./target/debug/parity_scale_cli scale-to-json --input tools/parity_scale_cli/samples/account.bin --type NewAccount + ./target/debug/parity_scale_cli scale-to-json --input iroha_parity_scale_cli/samples/account.bin --type NewAccount ``` * Encode the `NewAccount` data type from the `samples/account.json`: ```bash - ./target/debug/parity_scale_cli json-to-scale --input tools/parity_scale_cli/samples/account.json --output result.bin --type NewAccount + ./target/debug/parity_scale_cli json-to-scale --input iroha_parity_scale_cli/samples/account.json --output result.bin --type NewAccount ``` ## `scale-to-rust` @@ -109,11 +109,11 @@ Decode the data type from a given binary. * Decode the `NewAccount` data type from the `samples/account.bin` binary: ```bash - ./target/debug/parity_scale_cli scale-to-rust tools/parity_scale_cli/samples/account.bin --type NewAccount + ./target/debug/parity_scale_cli scale-to-rust iroha_parity_scale_cli/samples/account.bin --type NewAccount ``` * Decode the `NewDomain` data type from the `samples/domain.bin` binary: ```bash - ./target/debug/parity_scale_cli scale-to-rust tools/parity_scale_cli/samples/domain.bin --type NewDomain + ./target/debug/parity_scale_cli scale-to-rust iroha_parity_scale_cli/samples/domain.bin --type NewDomain ``` diff --git a/tools/parity_scale_cli/build.rs b/iroha_parity_scale_cli/build.rs similarity index 100% rename from tools/parity_scale_cli/build.rs rename to iroha_parity_scale_cli/build.rs diff --git a/tools/parity_scale_cli/samples/account.bin b/iroha_parity_scale_cli/samples/account.bin similarity index 100% rename from tools/parity_scale_cli/samples/account.bin rename to iroha_parity_scale_cli/samples/account.bin diff --git a/tools/parity_scale_cli/samples/account.json b/iroha_parity_scale_cli/samples/account.json similarity index 100% rename from tools/parity_scale_cli/samples/account.json rename to iroha_parity_scale_cli/samples/account.json diff --git a/tools/parity_scale_cli/samples/domain.bin b/iroha_parity_scale_cli/samples/domain.bin similarity index 100% rename from tools/parity_scale_cli/samples/domain.bin rename to iroha_parity_scale_cli/samples/domain.bin diff --git a/tools/parity_scale_cli/samples/domain.json b/iroha_parity_scale_cli/samples/domain.json similarity index 100% rename from tools/parity_scale_cli/samples/domain.json rename to iroha_parity_scale_cli/samples/domain.json diff --git a/tools/parity_scale_cli/samples/trigger.bin b/iroha_parity_scale_cli/samples/trigger.bin similarity index 100% rename from tools/parity_scale_cli/samples/trigger.bin rename to iroha_parity_scale_cli/samples/trigger.bin diff --git a/tools/parity_scale_cli/samples/trigger.json b/iroha_parity_scale_cli/samples/trigger.json similarity index 100% rename from tools/parity_scale_cli/samples/trigger.json rename to iroha_parity_scale_cli/samples/trigger.json diff --git a/tools/parity_scale_cli/src/main.rs b/iroha_parity_scale_cli/src/main.rs similarity index 100% rename from tools/parity_scale_cli/src/main.rs rename to iroha_parity_scale_cli/src/main.rs From 4350467fa9a418b3fe258a75e7bf5fadb48ef1af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 13 Aug 2024 13:55:10 +0400 Subject: [PATCH 29/59] test: ignore test_docker directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6bfee632416..6222d9bd10a 100644 --- a/.gitignore +++ b/.gitignore @@ -50,5 +50,5 @@ result /iroha-java/ /lcov.info **/test-smartcontracts/ - +test_docker **/*.wasm From 7e700b87e261c93130b266dd5ca0d877a2dcf67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 13 Aug 2024 17:24:10 +0400 Subject: [PATCH 30/59] fix: iroha_cli pytests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .github/workflows/iroha2-dev-pr.yml | 6 +++--- iroha_cli/pytests/README.md | 12 ++++++------ iroha_cli/pytests/common/settings.py | 6 +++--- .../src/{client_cli => iroha_cli}/__init__.py | 4 ++-- .../{client_cli => iroha_cli}/configuration.py | 18 +++++++++--------- .../src/{client_cli => iroha_cli}/have.py | 2 +- .../src/{client_cli => iroha_cli}/iroha.py | 0 .../client_cli.py => iroha_cli/iroha_cli.py} | 6 +++--- .../src/{client_cli => iroha_cli}/match.py | 2 +- .../accounts/test_accounts_query_filters.py | 4 +--- .../test/accounts/test_register_accounts.py | 4 ++-- iroha_cli/pytests/test/conftest.py | 12 +++++------- .../test/domains/test_register_domains.py | 12 ++++++------ 13 files changed, 42 insertions(+), 46 deletions(-) rename iroha_cli/pytests/src/{client_cli => iroha_cli}/__init__.py (74%) rename iroha_cli/pytests/src/{client_cli => iroha_cli}/configuration.py (90%) rename iroha_cli/pytests/src/{client_cli => iroha_cli}/have.py (98%) rename iroha_cli/pytests/src/{client_cli => iroha_cli}/iroha.py (100%) rename iroha_cli/pytests/src/{client_cli/client_cli.py => iroha_cli/iroha_cli.py} (98%) rename iroha_cli/pytests/src/{client_cli => iroha_cli}/match.py (91%) diff --git a/.github/workflows/iroha2-dev-pr.yml b/.github/workflows/iroha2-dev-pr.yml index ae40a3a998e..d5fe8e3e846 100644 --- a/.github/workflows/iroha2-dev-pr.yml +++ b/.github/workflows/iroha2-dev-pr.yml @@ -17,7 +17,7 @@ concurrency: env: CARGO_TERM_COLOR: always - CLIENT_CLI_DIR: "/__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/test" + IROHA_CLI_DIR: "/__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/test" DOCKER_COMPOSE_PATH: defaults TEST_DIR: "tmp/test" IROHA_BIN: "iroha" @@ -256,8 +256,8 @@ jobs: - name: Run Client CLI Tests working-directory: iroha_cli/pytests env: - CLIENT_CLI_BINARY: ../../${{ env.TEST_DIR }}/${{ env.IROHA_BIN }} - CLIENT_CLI_CONFIG: ../../${{ env.TEST_DIR }}/client.toml + IROHA_CLI_BINARY: ../../${{ env.TEST_DIR }}/${{ env.IROHA_BIN }} + IROHA_CLI_CONFIG: ../../${{ env.TEST_DIR }}/client.toml run: ${{ env.POETRY_PATH }} run pytest - name: Wipe docker-compose.yml containers if: always() diff --git a/iroha_cli/pytests/README.md b/iroha_cli/pytests/README.md index 874d92c46b4..64125b57410 100644 --- a/iroha_cli/pytests/README.md +++ b/iroha_cli/pytests/README.md @@ -66,8 +66,8 @@ The test model has the following structure: 3. Configure the tests by creating the following `.env` file in _this_ (`/iroha_cli/pytests/`) directory: ```shell - CLIENT_CLI_BINARY=/path/to/iroha_cli - CLIENT_CLI_CONFIG=/path/to/client.toml + IROHA_CLI_BINARY=/path/to/iroha_cli + IROHA_CLI_CONFIG=/path/to/client.toml TORII_API_PORT_MIN=8080 TORII_API_PORT_MAX=8083 ``` @@ -119,7 +119,7 @@ To do so, perform the following steps: 4. Proceed with _Step 2_ of the [Using Test Suites](#using-test-suites) instructions. > [!NOTE] -> Don't forget to specify the path to the directory created for the `iroha` binary and its `client.toml` configuration file (see Step 3) in the `CLIENT_CLI_DIR` variable of the `.env` file. +> Don't forget to specify the path to the directory created for the `iroha` binary and its `client.toml` configuration file (see Step 3) in the `IROHA_CLI_DIR` variable of the `.env` file. > For details, see [Tests Configuration](#tests-configuration) below. ### Poetry Configuration @@ -156,7 +156,7 @@ Tests are configured via environment variables. These variables can be optionall The variables: -- `CLIENT_CLI_DIR` — Specifies a path to a directory containing the `iroha` binary and its `client.toml` configuration file.\ +- `IROHA_CLI_DIR` — Specifies a path to a directory containing the `iroha` binary and its `client.toml` configuration file.\ Set to `/iroha_cli`, by default. - `TORII_API_PORT_MIN`/`TORII_API_PORT_MAX` — This pair specifies the range of local ports through which the Iroha 2 peers are deployed. A randomly selected port from the specified range is used for each test.\ Set to `8080` and `8083` respectively, by default. @@ -164,8 +164,8 @@ The variables: **Example**: ```shell -CLIENT_CLI_BINARY=/path/to/iroha_cli -CLIENT_CLI_CONFIG=/path/to/client.toml +IROHA_CLI_BINARY=/path/to/iroha_cli +IROHA_CLI_CONFIG=/path/to/client.toml TORII_API_PORT_MIN=8080 TORII_API_PORT_MAX=8083 ``` diff --git a/iroha_cli/pytests/common/settings.py b/iroha_cli/pytests/common/settings.py index 3593f91d0b7..176344b6dc9 100644 --- a/iroha_cli/pytests/common/settings.py +++ b/iroha_cli/pytests/common/settings.py @@ -11,10 +11,10 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -ROOT_DIR = os.environ.get("CLIENT_CLI_DIR", BASE_DIR) +ROOT_DIR = os.environ.get("IROHA_CLI_DIR", BASE_DIR) -PATH_CONFIG_CLIENT_CLI = os.environ["CLIENT_CLI_CONFIG"] -CLIENT_CLI_PATH = os.environ["CLIENT_CLI_BINARY"] +PATH_CONFIG_IROHA_CLI = os.environ["IROHA_CLI_CONFIG"] +IROHA_CLI_PATH = os.environ["IROHA_CLI_BINARY"] PEERS_CONFIGS_PATH = os.path.join(ROOT_DIR, "peers_configs") PORT_MIN = int(os.getenv("TORII_API_PORT_MIN", "8080")) diff --git a/iroha_cli/pytests/src/client_cli/__init__.py b/iroha_cli/pytests/src/iroha_cli/__init__.py similarity index 74% rename from iroha_cli/pytests/src/client_cli/__init__.py rename to iroha_cli/pytests/src/iroha_cli/__init__.py index 417f746d612..79ead1cf183 100644 --- a/iroha_cli/pytests/src/client_cli/__init__.py +++ b/iroha_cli/pytests/src/iroha_cli/__init__.py @@ -2,12 +2,12 @@ This module initializes the Iroha client and configuration using environment variables. """ -from common.settings import PATH_CONFIG_CLIENT_CLI, PORT_MAX, PORT_MIN +from common.settings import PATH_CONFIG_IROHA_CLI, PORT_MAX, PORT_MIN from src.iroha_cli.iroha_cli import IrohaCli from src.iroha_cli.configuration import Config from src.iroha_cli.iroha import Iroha config = Config(PORT_MIN, PORT_MAX) -config.load(PATH_CONFIG_CLIENT_CLI) +config.load(PATH_CONFIG_IROHA_CLI) iroha_cli = IrohaCli(config) iroha = Iroha(config) diff --git a/iroha_cli/pytests/src/client_cli/configuration.py b/iroha_cli/pytests/src/iroha_cli/configuration.py similarity index 90% rename from iroha_cli/pytests/src/client_cli/configuration.py rename to iroha_cli/pytests/src/iroha_cli/configuration.py index 09ff381c0df..d55bc79963d 100644 --- a/iroha_cli/pytests/src/client_cli/configuration.py +++ b/iroha_cli/pytests/src/iroha_cli/configuration.py @@ -29,23 +29,23 @@ def __init__(self, port_min, port_max): self.port_max = port_max self._envs = dict() - def load(self, path_config_client_cli): + def load(self, path_config_iroha_cli): """ Load the configuration from the given config file. - :param path_config_client_cli: The path to the configuration file. - :type path_config_client_cli: str + :param path_config_iroha_cli: The path to the configuration file. + :type path_config_iroha_cli: str :raises IOError: If the file does not exist. """ - if not os.path.exists(path_config_client_cli): - raise IOError(f"No config file found at {path_config_client_cli}") + if not os.path.exists(path_config_iroha_cli): + raise IOError(f"No config file found at {path_config_iroha_cli}") - if not os.path.isfile(path_config_client_cli): - raise IOError(f"The path is not a file: {path_config_client_cli}") + if not os.path.isfile(path_config_iroha_cli): + raise IOError(f"The path is not a file: {path_config_iroha_cli}") - with open(path_config_client_cli, "r", encoding="utf-8") as config_file: + with open(path_config_iroha_cli, "r", encoding="utf-8") as config_file: self._config = tomlkit.load(config_file) - self.file = path_config_client_cli + self.file = path_config_iroha_cli def generate_by_peers(self, peers_configs_dir): """ diff --git a/iroha_cli/pytests/src/client_cli/have.py b/iroha_cli/pytests/src/iroha_cli/have.py similarity index 98% rename from iroha_cli/pytests/src/client_cli/have.py rename to iroha_cli/pytests/src/iroha_cli/have.py index 8f4d759e661..8d91f07526b 100644 --- a/iroha_cli/pytests/src/client_cli/have.py +++ b/iroha_cli/pytests/src/iroha_cli/have.py @@ -144,4 +144,4 @@ def error(expected): :param expected: The expected error message. :return: True if the error is present, False otherwise. """ - return match.client_cli_have_error(expected=expected, actual=iroha_cli.stderr) + return match.iroha_cli_have_error(expected=expected, actual=iroha_cli.stderr) diff --git a/iroha_cli/pytests/src/client_cli/iroha.py b/iroha_cli/pytests/src/iroha_cli/iroha.py similarity index 100% rename from iroha_cli/pytests/src/client_cli/iroha.py rename to iroha_cli/pytests/src/iroha_cli/iroha.py diff --git a/iroha_cli/pytests/src/client_cli/client_cli.py b/iroha_cli/pytests/src/iroha_cli/iroha_cli.py similarity index 98% rename from iroha_cli/pytests/src/client_cli/client_cli.py rename to iroha_cli/pytests/src/iroha_cli/iroha_cli.py index 06fab2b967a..364ba75865c 100644 --- a/iroha_cli/pytests/src/client_cli/client_cli.py +++ b/iroha_cli/pytests/src/iroha_cli/iroha_cli.py @@ -12,7 +12,7 @@ import allure # type: ignore from common.helpers import extract_hash, read_isi_from_json, write_isi_to_json -from common.settings import BASE_DIR, CLIENT_CLI_PATH, PATH_CONFIG_CLIENT_CLI, ROOT_DIR +from common.settings import BASE_DIR, IROHA_CLI_PATH, PATH_CONFIG_IROHA_CLI, ROOT_DIR from src.iroha_cli.configuration import Config @@ -21,8 +21,8 @@ class IrohaCli: A class to represent the Iroha client command line interface. """ - BASE_PATH = CLIENT_CLI_PATH - BASE_FLAGS = ["--config=" + PATH_CONFIG_CLIENT_CLI] + BASE_PATH = IROHA_CLI_PATH + BASE_FLAGS = ["--config=" + PATH_CONFIG_IROHA_CLI] def __init__(self, config: Config): """ diff --git a/iroha_cli/pytests/src/client_cli/match.py b/iroha_cli/pytests/src/iroha_cli/match.py similarity index 91% rename from iroha_cli/pytests/src/client_cli/match.py rename to iroha_cli/pytests/src/iroha_cli/match.py index 9f597495c5d..72f47d3ec4d 100644 --- a/iroha_cli/pytests/src/client_cli/match.py +++ b/iroha_cli/pytests/src/iroha_cli/match.py @@ -5,7 +5,7 @@ import allure # type: ignore -def client_cli_have_error(expected: str, actual: str): +def iroha_cli_have_error(expected: str, actual: str): """ Checks if the command-line client has the expected error. diff --git a/iroha_cli/pytests/test/accounts/test_accounts_query_filters.py b/iroha_cli/pytests/test/accounts/test_accounts_query_filters.py index 858c6290965..0972416ef88 100644 --- a/iroha_cli/pytests/test/accounts/test_accounts_query_filters.py +++ b/iroha_cli/pytests/test/accounts/test_accounts_query_filters.py @@ -9,9 +9,7 @@ def test_filter_by_domain(GIVEN_registered_account): def condition(): domain = GIVEN_registered_account.domain - with allure.step( - f"WHEN iroha_cli query accounts " f'in the "{domain}" domain' - ): + with allure.step(f"WHEN iroha_cli query accounts " f'in the "{domain}" domain'): accounts = iroha.list_filter( {"Atom": {"Id": {"DomainId": {"Equals": domain}}}} ).accounts() diff --git a/iroha_cli/pytests/test/accounts/test_register_accounts.py b/iroha_cli/pytests/test/accounts/test_register_accounts.py index b18057d61f7..1d70dd7d0fd 100644 --- a/iroha_cli/pytests/test/accounts/test_register_accounts.py +++ b/iroha_cli/pytests/test/accounts/test_register_accounts.py @@ -66,9 +66,9 @@ def test_register_account_with_invalid_character_in_key( with allure.step( "WHEN iroha_cli tries to register an account with invalid character in the key" ): - client_cli.register().account( + iroha_cli.register().account( signatory=GIVEN_key_with_invalid_character_in_key, domain=GIVEN_registered_domain.name, ) with allure.step("THEN iroha_cli should have the error"): - client_cli.should(have.error(Stderr.INVALID_CHARACTER.value)) + iroha_cli.should(have.error(Stderr.INVALID_CHARACTER.value)) diff --git a/iroha_cli/pytests/test/conftest.py b/iroha_cli/pytests/test/conftest.py index 6bb5e6d8de3..6de905a7793 100644 --- a/iroha_cli/pytests/test/conftest.py +++ b/iroha_cli/pytests/test/conftest.py @@ -71,9 +71,7 @@ def GIVEN_registered_account(GIVEN_registered_domain, GIVEN_public_key): with allure.step( f'GIVEN the account "{GIVEN_public_key}" in the "{GIVEN_registered_domain.name}" domain' ): - iroha_cli.register().account( - signatory=account.signatory, domain=account.domain - ) + iroha_cli.register().account(signatory=account.signatory, domain=account.domain) return account @@ -145,7 +143,7 @@ def GIVEN_numeric_asset_for_account( domain=asset.definition.domain, type_=asset.definition.type_, ) - client_cli.mint().asset( + iroha_cli.mint().asset( account=account, asset_definition=asset.definition, value_of_type=asset.value, @@ -168,7 +166,7 @@ def GIVEN_registered_asset_definition_with_numeric_type( f'GIVEN the asset_definition "{GIVEN_fake_asset_name}" ' f'in the "{GIVEN_registered_domain.name}" domain' ): - client_cli.register().asset_definition( + iroha_cli.register().asset_definition( asset=asset_def.name, domain=asset_def.domain, type_=asset_def.type_, @@ -190,7 +188,7 @@ def GIVEN_minted_asset_quantity( definition=GIVEN_registered_asset_definition_with_numeric_type, value=GIVEN_numeric_value, ) - client_cli.mint().asset( + iroha_cli.mint().asset( account=asset.account, asset_definition=asset.definition, value_of_type=asset.value, @@ -212,7 +210,7 @@ def GIVEN_registered_asset_definition_with_store_type( f'GIVEN the asset_definition "{GIVEN_fake_asset_name}" ' f'in the "{GIVEN_registered_domain.name}" domain' ): - client_cli.register().asset_definition( + iroha_cli.register().asset_definition( asset=asset_def.name, domain=asset_def.domain, type=asset_def.type, diff --git a/iroha_cli/pytests/test/domains/test_register_domains.py b/iroha_cli/pytests/test/domains/test_register_domains.py index 8227fd6fa9d..1d5ba64af23 100644 --- a/iroha_cli/pytests/test/domains/test_register_domains.py +++ b/iroha_cli/pytests/test/domains/test_register_domains.py @@ -49,7 +49,7 @@ def test_register_existing_domain_uppercase_with_uppercase_letter( f"WHEN iroha_cli registers an existing domain, " f'but with uppercase letter "{GIVEN_registered_domain_with_uppercase_letter.name}"' ): - client_cli.register().domain(GIVEN_registered_domain_with_uppercase_letter.name) + iroha_cli.register().domain(GIVEN_registered_domain_with_uppercase_letter.name) with allure.step( f'THEN Iroha should have the domain name "{GIVEN_registered_domain_with_uppercase_letter.name}"' ): @@ -61,7 +61,7 @@ def test_register_one_letter_domain(GIVEN_random_character): with allure.step( f'WHEN iroha_cli registers the one letter domain "{GIVEN_random_character}"' ): - client_cli.register().domain(GIVEN_random_character) + iroha_cli.register().domain(GIVEN_random_character) with allure.step(f'THEN Iroha should have the domain "{GIVEN_random_character}"'): iroha.should(have.domain(GIVEN_random_character)) @@ -72,11 +72,11 @@ def test_register_domain_with_reserved_character(GIVEN_string_with_reserved_char f'WHEN iroha_cli registers a domain "' f'{GIVEN_string_with_reserved_character}" with reserved characters' ): - client_cli.register().domain(GIVEN_string_with_reserved_character) + iroha_cli.register().domain(GIVEN_string_with_reserved_character) with allure.step( f'THEN iroha_cli should has the domain error: "{Stderr.RESERVED_CHARACTER.value}"' ): - client_cli.should(have.error(Stderr.RESERVED_CHARACTER.value)) + iroha_cli.should(have.error(Stderr.RESERVED_CHARACTER.value)) @allure.label("sdk_test_id", "register_domain_with_whitespaces") @@ -84,8 +84,8 @@ def test_register_domain_with_whitespaces(GIVEN_string_with_whitespaces): with allure.step( f'WHEN iroha_cli registers a domain "{GIVEN_string_with_whitespaces}" with whitespaces' ): - client_cli.register().domain(GIVEN_string_with_whitespaces) + iroha_cli.register().domain(GIVEN_string_with_whitespaces) with allure.step( f'THEN iroha_cli should has the domain error: "{Stderr.WHITESPACES.value}"' ): - client_cli.should(have.error(Stderr.WHITESPACES.value)) + iroha_cli.should(have.error(Stderr.WHITESPACES.value)) From 1cb07ebf6023c25893c6d52fed8fc2ba26b4f1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 13 Aug 2024 17:48:42 +0400 Subject: [PATCH 31/59] fix: workflow paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .github/workflows/iroha2-dev-pr-static.yml | 2 +- .github/workflows/iroha2-dev-pr-wasm.yaml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/iroha2-dev-pr-static.yml b/.github/workflows/iroha2-dev-pr-static.yml index 416b139eee8..9a63801bf3a 100644 --- a/.github/workflows/iroha2-dev-pr-static.yml +++ b/.github/workflows/iroha2-dev-pr-static.yml @@ -8,7 +8,7 @@ on: - '**.json' - '**.toml' - '.github/workflows/iroha2-dev-pr-static.yml' - - '../../iroha_cli/pytests/**/*.py' + - 'iroha_cli/pytests/**/*.py' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/iroha2-dev-pr-wasm.yaml b/.github/workflows/iroha2-dev-pr-wasm.yaml index 212ea00724f..854b0cc94ff 100644 --- a/.github/workflows/iroha2-dev-pr-wasm.yaml +++ b/.github/workflows/iroha2-dev-pr-wasm.yaml @@ -4,15 +4,15 @@ on: pull_request: branches: [main] paths: - - '../../iroha_data_model/**.rs' - - '../../iroha_data_model/**.yml' - - '../../iroha_data_model/**.json' - - '../../iroha_data_model/**.toml' + - 'iroha_data_model/**.rs' + - 'iroha_data_model/**.yml' + - 'iroha_data_model/**.json' + - 'iroha_data_model/**.toml' - - '../../iroha_smart_contract/**.rs' - - '../../iroha_smart_contract/**.yml' - - '../../iroha_smart_contract/**.json' - - '../../iroha_smart_contract/**.toml' + - 'iroha_smart_contract/**.rs' + - 'iroha_smart_contract/**.yml' + - 'iroha_smart_contract/**.json' + - 'iroha_smart_contract/**.toml' concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 9141bac46988d90dcbd33384c8c29b4711341387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 13 Aug 2024 17:51:40 +0400 Subject: [PATCH 32/59] build: use bin names in dockerfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 231b701b0c7..2c7f15773ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,9 +36,9 @@ ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=/x86_64-linux-musl-native/bin/ WORKDIR /iroha COPY . . RUN cargo build \ - -p irohad \ - -p iroha_cli \ - -p iroha_kagami \ + --bin irohad \ + --bin iroha \ + --bin kagami \ --target x86_64-unknown-linux-musl \ --profile deploy From b9c843e4775e232216ab11a2027fe99d2b4825a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 13 Aug 2024 18:13:40 +0400 Subject: [PATCH 33/59] fix: ui tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- iroha_data_model/derive/tests/partial_tagged_serde.rs | 2 +- .../derive/tests/ui_fail/transparent_api_private_item.stderr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iroha_data_model/derive/tests/partial_tagged_serde.rs b/iroha_data_model/derive/tests/partial_tagged_serde.rs index 7793367e790..ba10e5e4fc4 100644 --- a/iroha_data_model/derive/tests/partial_tagged_serde.rs +++ b/iroha_data_model/derive/tests/partial_tagged_serde.rs @@ -13,7 +13,7 @@ enum Value { Numeric(NumericValue), } -// a simpler version of NumericValue than used in data_model +// a simpler version of NumericValue than used in iroha_data_model // this one is always i32, but is still serialized as a string literal // NOTE: debug is actually required for `PartiallyTaggedDeserialize`! #[derive(Debug, PartialEq, Eq)] diff --git a/iroha_data_model/derive/tests/ui_fail/transparent_api_private_item.stderr b/iroha_data_model/derive/tests/ui_fail/transparent_api_private_item.stderr index 7c82cc76a78..15a50251409 100644 --- a/iroha_data_model/derive/tests/ui_fail/transparent_api_private_item.stderr +++ b/iroha_data_model/derive/tests/ui_fail/transparent_api_private_item.stderr @@ -5,7 +5,7 @@ error[E0603]: struct `BlockPayload` is private | ^^^^^^^^^^^^ private struct | note: the struct `BlockPayload` is defined here - --> $WORKSPACE/data_model/src/block.rs + --> $WORKSPACE/iroha_data_model/src/block.rs | | pub use self::model::*; | ^^^^^^^^^^^ From 031523cbdfdf9a93fcc2606ea1b70d61f5d2d5a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Wed, 14 Aug 2024 11:39:35 +0400 Subject: [PATCH 34/59] feat: rename `iroha_parity_scale_cli` to `iroha_codec` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.lock | 44 +++++++++--------- Cargo.toml | 2 +- docs/README.md | 2 +- flake.nix | 2 +- .../Cargo.toml | 6 +-- .../README.md | 20 ++++---- .../build.rs | 0 .../samples/account.bin | Bin .../samples/account.json | 0 .../samples/domain.bin | 0 .../samples/domain.json | 0 .../samples/trigger.bin | Bin .../samples/trigger.json | 0 .../src/main.rs | 0 14 files changed, 36 insertions(+), 40 deletions(-) rename {iroha_parity_scale_cli => iroha_codec}/Cargo.toml (92%) rename {iroha_parity_scale_cli => iroha_codec}/README.md (82%) rename {iroha_parity_scale_cli => iroha_codec}/build.rs (100%) rename {iroha_parity_scale_cli => iroha_codec}/samples/account.bin (100%) rename {iroha_parity_scale_cli => iroha_codec}/samples/account.json (100%) rename {iroha_parity_scale_cli => iroha_codec}/samples/domain.bin (100%) rename {iroha_parity_scale_cli => iroha_codec}/samples/domain.json (100%) rename {iroha_parity_scale_cli => iroha_codec}/samples/trigger.bin (100%) rename {iroha_parity_scale_cli => iroha_codec}/samples/trigger.json (100%) rename {iroha_parity_scale_cli => iroha_codec}/src/main.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 2e8e4fba743..f701c9bbc3a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2946,6 +2946,28 @@ dependencies = [ "vergen", ] +[[package]] +name = "iroha_codec" +version = "2.0.0-rc.1.0" +dependencies = [ + "clap", + "colored", + "eyre", + "iroha_crypto", + "iroha_data_model", + "iroha_executor_data_model", + "iroha_genesis", + "iroha_primitives", + "iroha_schema", + "iroha_schema_gen", + "iroha_test_samples", + "iroha_version", + "parity-scale-codec", + "serde", + "serde_json", + "supports-color 2.1.0", +] + [[package]] name = "iroha_config" version = "2.0.0-rc.1.0" @@ -3380,28 +3402,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "iroha_parity_scale_cli" -version = "2.0.0-rc.1.0" -dependencies = [ - "clap", - "colored", - "eyre", - "iroha_crypto", - "iroha_data_model", - "iroha_executor_data_model", - "iroha_genesis", - "iroha_primitives", - "iroha_schema", - "iroha_schema_gen", - "iroha_test_samples", - "iroha_version", - "parity-scale-codec", - "serde", - "serde_json", - "supports-color 2.1.0", -] - [[package]] name = "iroha_primitives" version = "2.0.0-rc.1.0" diff --git a/Cargo.toml b/Cargo.toml index 405bc6f78f9..35b480aeae0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -230,7 +230,7 @@ members = [ "iroha_swarm", "iroha_kagami", "kura_inspector", - "iroha_parity_scale_cli", + "iroha_codec", "iroha_wasm_test_runner", "iroha_torii", "iroha_torii/const", diff --git a/docs/README.md b/docs/README.md index ef0352e80ea..88409016276 100644 --- a/docs/README.md +++ b/docs/README.md @@ -13,7 +13,7 @@ Documentation for Iroha 2 tools: - [Kagami](../iroha_kagami/README.md) - [Kura Inspector](../kura_inspector/README.md) -- [Parity Scale Decoder Tool](../iroha_parity_scale_cli/README.md) +- [Parity Scale Decoder Tool](../iroha_codec/README.md) ## Development diff --git a/flake.nix b/flake.nix index 7136e93ffcc..74d15a02cd7 100755 --- a/flake.nix +++ b/flake.nix @@ -49,7 +49,7 @@ "iroha" "kagami" "kura_inspector" - "parity_scale_cli" + "iroha_codec" ]; # HACK: A hook to filter out darwin-specific flags when cross-compiling. diff --git a/iroha_parity_scale_cli/Cargo.toml b/iroha_codec/Cargo.toml similarity index 92% rename from iroha_parity_scale_cli/Cargo.toml rename to iroha_codec/Cargo.toml index e0c27915944..694511cabc1 100644 --- a/iroha_parity_scale_cli/Cargo.toml +++ b/iroha_codec/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "iroha_parity_scale_cli" +name = "iroha_codec" edition.workspace = true version.workspace = true @@ -38,7 +38,3 @@ eyre = { workspace = true } [dev-dependencies] iroha_test_samples = { workspace = true } - -[[bin]] -name = "parity_scale_cli" -path = "src/main.rs" diff --git a/iroha_parity_scale_cli/README.md b/iroha_codec/README.md similarity index 82% rename from iroha_parity_scale_cli/README.md rename to iroha_codec/README.md index 91d7b7f9db0..80cb2dbd6bb 100644 --- a/iroha_parity_scale_cli/README.md +++ b/iroha_codec/README.md @@ -7,7 +7,7 @@ This tool helps you decode **Iroha 2** data types from binaries using [Parity Sc To build the tool, run: ```bash -cargo build --bin parity_scale_cli +cargo build --bin iroha_codec ``` ## Usage @@ -15,7 +15,7 @@ cargo build --bin parity_scale_cli Run Parity Scale Decoder Tool: ```bash -parity_scale_cli +iroha_codec ``` ### Subcommands @@ -33,7 +33,7 @@ parity_scale_cli To list all supported data types, run from the project main directory: ```bash -./target/debug/parity_scale_cli list-types +./target/debug/iroha_codec list-types ```
Expand to see expected output @@ -66,7 +66,7 @@ These commands require `--type` argument. If data type is not known, [`scale-to- * Decode the specified data type from a binary: ```bash - ./target/debug/parity_scale_cli scale-to-json --input --type + ./target/debug/iroha_codec scale-to-json --input --type ``` ### `scale-to-json` and `json-to-scale` usage examples @@ -74,13 +74,13 @@ These commands require `--type` argument. If data type is not known, [`scale-to- * Decode the `NewAccount` data type from the `samples/account.bin` binary: ```bash - ./target/debug/parity_scale_cli scale-to-json --input iroha_parity_scale_cli/samples/account.bin --type NewAccount + ./target/debug/iroha_codec scale-to-json --input iroha_codec/samples/account.bin --type NewAccount ``` * Encode the `NewAccount` data type from the `samples/account.json`: ```bash - ./target/debug/parity_scale_cli json-to-scale --input iroha_parity_scale_cli/samples/account.json --output result.bin --type NewAccount + ./target/debug/iroha_codec json-to-scale --input iroha_codec/samples/account.json --output result.bin --type NewAccount ``` ## `scale-to-rust` @@ -95,13 +95,13 @@ Decode the data type from a given binary. * Decode the specified data type from a binary: ```bash - ./target/debug/parity_scale_cli scale-to-rust --type + ./target/debug/iroha_codec scale-to-rust --type ``` * If you are not sure which data type is encoded in the binary, run the tool without the `--type` option: ```bash - ./target/debug/parity_scale_cli scale-to-rust + ./target/debug/iroha_codec scale-to-rust ``` ### `scale-to-rust` usage examples @@ -109,11 +109,11 @@ Decode the data type from a given binary. * Decode the `NewAccount` data type from the `samples/account.bin` binary: ```bash - ./target/debug/parity_scale_cli scale-to-rust iroha_parity_scale_cli/samples/account.bin --type NewAccount + ./target/debug/iroha_codec scale-to-rust iroha_codec/samples/account.bin --type NewAccount ``` * Decode the `NewDomain` data type from the `samples/domain.bin` binary: ```bash - ./target/debug/parity_scale_cli scale-to-rust iroha_parity_scale_cli/samples/domain.bin --type NewDomain + ./target/debug/iroha_codec scale-to-rust iroha_codec/samples/domain.bin --type NewDomain ``` diff --git a/iroha_parity_scale_cli/build.rs b/iroha_codec/build.rs similarity index 100% rename from iroha_parity_scale_cli/build.rs rename to iroha_codec/build.rs diff --git a/iroha_parity_scale_cli/samples/account.bin b/iroha_codec/samples/account.bin similarity index 100% rename from iroha_parity_scale_cli/samples/account.bin rename to iroha_codec/samples/account.bin diff --git a/iroha_parity_scale_cli/samples/account.json b/iroha_codec/samples/account.json similarity index 100% rename from iroha_parity_scale_cli/samples/account.json rename to iroha_codec/samples/account.json diff --git a/iroha_parity_scale_cli/samples/domain.bin b/iroha_codec/samples/domain.bin similarity index 100% rename from iroha_parity_scale_cli/samples/domain.bin rename to iroha_codec/samples/domain.bin diff --git a/iroha_parity_scale_cli/samples/domain.json b/iroha_codec/samples/domain.json similarity index 100% rename from iroha_parity_scale_cli/samples/domain.json rename to iroha_codec/samples/domain.json diff --git a/iroha_parity_scale_cli/samples/trigger.bin b/iroha_codec/samples/trigger.bin similarity index 100% rename from iroha_parity_scale_cli/samples/trigger.bin rename to iroha_codec/samples/trigger.bin diff --git a/iroha_parity_scale_cli/samples/trigger.json b/iroha_codec/samples/trigger.json similarity index 100% rename from iroha_parity_scale_cli/samples/trigger.json rename to iroha_codec/samples/trigger.json diff --git a/iroha_parity_scale_cli/src/main.rs b/iroha_codec/src/main.rs similarity index 100% rename from iroha_parity_scale_cli/src/main.rs rename to iroha_codec/src/main.rs From a09d6e8262430c8dd021672b7f849fd2cef95c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Wed, 14 Aug 2024 12:45:37 +0400 Subject: [PATCH 35/59] fix: post-merge conflicts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- iroha/benches/torii.rs | 2 +- iroha/src/client.rs | 2 +- iroha/tests/integration/multisig.rs | 3 +-- iroha/tests/integration/queries/account.rs | 2 +- iroha/tests/integration/queries/query_errors.rs | 2 +- iroha/tests/integration/sorting.rs | 4 ++-- iroha/tests/integration/tx_rollback.rs | 2 +- iroha_core/src/smartcontracts/wasm.rs | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-) diff --git a/iroha/benches/torii.rs b/iroha/benches/torii.rs index b7e04595e2f..e32d81c5ca5 100644 --- a/iroha/benches/torii.rs +++ b/iroha/benches/torii.rs @@ -9,11 +9,11 @@ use iroha::{ }; use iroha_genesis::GenesisBuilder; use iroha_primitives::unique_vec; +use iroha_test_samples::gen_account_in; use irohad::samples::get_config; use test_network::{ construct_executor, get_chain_id, get_key_pair, Peer as TestPeer, PeerBuilder, TestRuntime, }; -use test_samples::gen_account_in; use tokio::runtime::Runtime; const MINIMUM_SUCCESS_REQUEST_RATIO: f32 = 0.9; diff --git a/iroha/src/client.rs b/iroha/src/client.rs index 7e88470ace5..dfcf644b0d3 100644 --- a/iroha/src/client.rs +++ b/iroha/src/client.rs @@ -1097,7 +1097,7 @@ pub mod executor { #[cfg(test)] mod tests { use iroha_primitives::small::SmallStr; - use test_samples::gen_account_in; + use iroha_test_samples::gen_account_in; use super::*; use crate::config::{BasicAuth, Config}; diff --git a/iroha/tests/integration/multisig.rs b/iroha/tests/integration/multisig.rs index b9de2a2124f..889f64dd643 100644 --- a/iroha/tests/integration/multisig.rs +++ b/iroha/tests/integration/multisig.rs @@ -12,9 +12,8 @@ use iroha::{ transaction::{TransactionBuilder, WasmSmartContract}, }, }; +use iroha_test_network::*; use nonzero_ext::nonzero; -use test_network::*; -use test_samples::{gen_account_in, ALICE_ID}; #[test] fn mutlisig() -> Result<()> { diff --git a/iroha/tests/integration/queries/account.rs b/iroha/tests/integration/queries/account.rs index f4a8447e403..47b30160999 100644 --- a/iroha/tests/integration/queries/account.rs +++ b/iroha/tests/integration/queries/account.rs @@ -2,8 +2,8 @@ use std::collections::HashSet; use eyre::Result; use iroha::{client, data_model::prelude::*}; +use iroha_test_samples::{gen_account_in, ALICE_ID}; use test_network::*; -use test_samples::{gen_account_in, ALICE_ID}; #[test] fn find_accounts_with_asset() -> Result<()> { diff --git a/iroha/tests/integration/queries/query_errors.rs b/iroha/tests/integration/queries/query_errors.rs index cb72febabae..dca80a59d91 100644 --- a/iroha/tests/integration/queries/query_errors.rs +++ b/iroha/tests/integration/queries/query_errors.rs @@ -2,7 +2,7 @@ use iroha::{ client, data_model::{prelude::QueryBuilderExt, query::builder::SingleQueryError}, }; -use test_samples::gen_account_in; +use iroha_test_samples::gen_account_in; #[test] fn non_existent_account_is_specific_error() { diff --git a/iroha/tests/integration/sorting.rs b/iroha/tests/integration/sorting.rs index 10d0dc325d7..729ab76a77f 100644 --- a/iroha/tests/integration/sorting.rs +++ b/iroha/tests/integration/sorting.rs @@ -9,10 +9,10 @@ use iroha::{ query::predicate::predicate_atoms::asset::AssetPredicateBox, }, }; +use iroha_test_network::*; +use iroha_test_samples::ALICE_ID; use nonzero_ext::nonzero; use rand::{seq::SliceRandom, thread_rng}; -use test_network::*; -use test_samples::ALICE_ID; #[test] #[ignore] diff --git a/iroha/tests/integration/tx_rollback.rs b/iroha/tests/integration/tx_rollback.rs index 0815bb73958..6900f6ef795 100644 --- a/iroha/tests/integration/tx_rollback.rs +++ b/iroha/tests/integration/tx_rollback.rs @@ -1,7 +1,7 @@ use eyre::Result; use iroha::{client, data_model::prelude::*}; +use iroha_test_samples::ALICE_ID; use test_network::*; -use test_samples::ALICE_ID; #[test] fn client_sends_transaction_with_invalid_instruction_should_not_see_any_changes() -> Result<()> { diff --git a/iroha_core/src/smartcontracts/wasm.rs b/iroha_core/src/smartcontracts/wasm.rs index eaecf238c9f..b121ae0f966 100644 --- a/iroha_core/src/smartcontracts/wasm.rs +++ b/iroha_core/src/smartcontracts/wasm.rs @@ -1698,9 +1698,9 @@ impl GetExport for (&wasmtime::Instance, C) { #[cfg(test)] mod tests { + use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; use parity_scale_codec::Encode; - use test_samples::gen_account_in; use tokio::test; use super::*; From 9d28003248883ae66db792d978b8d954796acee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 10:34:31 +0400 Subject: [PATCH 36/59] refactor: unnest `iroha_config` satellite crates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 4 ++-- {iroha_config/base => iroha_config_base}/Cargo.toml | 2 +- {iroha_config/base => iroha_config_base}/src/attach.rs | 0 {iroha_config/base => iroha_config_base}/src/env.rs | 0 {iroha_config/base => iroha_config_base}/src/lib.rs | 0 {iroha_config/base => iroha_config_base}/src/read.rs | 0 {iroha_config/base => iroha_config_base}/src/toml.rs | 0 {iroha_config/base => iroha_config_base}/src/util.rs | 0 .../base => iroha_config_base}/tests/bad.invalid-extends.toml | 0 .../tests/bad.invalid-nested-extends.base.toml | 0 .../tests/bad.invalid-nested-extends.toml | 0 {iroha_config/base => iroha_config_base}/tests/misc.rs | 0 .../base/derive => iroha_config_base_derive}/Cargo.toml | 0 .../base/derive => iroha_config_base_derive}/src/lib.rs | 0 .../base/derive => iroha_config_base_derive}/tests/ui.rs | 0 .../tests/ui_fail/generics.rs | 0 .../tests/ui_fail/generics.stderr | 0 .../tests/ui_fail/invalid_attrs_commas.rs | 0 .../tests/ui_fail/invalid_attrs_commas.stderr | 0 .../tests/ui_fail/invalid_attrs_conflicts.rs | 0 .../tests/ui_fail/invalid_attrs_conflicts.stderr | 0 .../tests/ui_fail/invalid_attrs_default_invalid_expr.rs | 0 .../tests/ui_fail/invalid_attrs_default_invalid_expr.stderr | 0 .../tests/ui_fail/invalid_attrs_env_without_var.rs | 0 .../tests/ui_fail/invalid_attrs_env_without_var.stderr | 0 .../tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs | 0 .../tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr | 0 .../tests/ui_fail/invalid_attrs_struct.rs | 0 .../tests/ui_fail/invalid_attrs_struct.stderr | 0 .../tests/ui_fail/unsupported_shapes.rs | 0 .../tests/ui_fail/unsupported_shapes.stderr | 0 .../tests/ui_pass/happy_path.rs | 0 32 files changed, 3 insertions(+), 3 deletions(-) rename {iroha_config/base => iroha_config_base}/Cargo.toml (91%) rename {iroha_config/base => iroha_config_base}/src/attach.rs (100%) rename {iroha_config/base => iroha_config_base}/src/env.rs (100%) rename {iroha_config/base => iroha_config_base}/src/lib.rs (100%) rename {iroha_config/base => iroha_config_base}/src/read.rs (100%) rename {iroha_config/base => iroha_config_base}/src/toml.rs (100%) rename {iroha_config/base => iroha_config_base}/src/util.rs (100%) rename {iroha_config/base => iroha_config_base}/tests/bad.invalid-extends.toml (100%) rename {iroha_config/base => iroha_config_base}/tests/bad.invalid-nested-extends.base.toml (100%) rename {iroha_config/base => iroha_config_base}/tests/bad.invalid-nested-extends.toml (100%) rename {iroha_config/base => iroha_config_base}/tests/misc.rs (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/Cargo.toml (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/src/lib.rs (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui.rs (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/generics.rs (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/generics.stderr (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/invalid_attrs_commas.rs (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/invalid_attrs_commas.stderr (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/invalid_attrs_conflicts.rs (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/invalid_attrs_conflicts.stderr (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/invalid_attrs_default_invalid_expr.rs (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/invalid_attrs_env_without_var.rs (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/invalid_attrs_env_without_var.stderr (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/invalid_attrs_struct.rs (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/invalid_attrs_struct.stderr (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/unsupported_shapes.rs (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_fail/unsupported_shapes.stderr (100%) rename {iroha_config/base/derive => iroha_config_base_derive}/tests/ui_pass/happy_path.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 35b480aeae0..1cb2d9824dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ iroha_p2p = { version = "=2.0.0-rc.1.0", path = "iroha_p2p" } iroha_primitives = { version = "=2.0.0-rc.1.0", path = "iroha_primitives", default-features = false } iroha_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_data_model", default-features = false } iroha_config = { version = "=2.0.0-rc.1.0", path = "iroha_config" } -iroha_config_base = { version = "=2.0.0-rc.1.0", path = "iroha_config/base" } +iroha_config_base = { version = "=2.0.0-rc.1.0", path = "iroha_config_base" } iroha_schema_gen = { version = "=2.0.0-rc.1.0", path = "iroha_schema/gen" } iroha_schema = { version = "=2.0.0-rc.1.0", path = "iroha_schema", default-features = false } iroha_logger = { version = "=2.0.0-rc.1.0", path = "iroha_logger" } @@ -198,7 +198,7 @@ members = [ "iroha", "iroha_cli", "iroha_config", - "iroha_config/base", + "iroha_config_base", "iroha_core", "iroha_core/test_network", "iroha_crypto", diff --git a/iroha_config/base/Cargo.toml b/iroha_config_base/Cargo.toml similarity index 91% rename from iroha_config/base/Cargo.toml rename to iroha_config_base/Cargo.toml index aa41d9b9162..ce42c694476 100644 --- a/iroha_config/base/Cargo.toml +++ b/iroha_config_base/Cargo.toml @@ -11,7 +11,7 @@ license.workspace = true workspace = true [dependencies] -iroha_config_base_derive = { path = "derive" } +iroha_config_base_derive = { path = "../iroha_config_base_derive" } drop_bomb = { workspace = true } serde = { workspace = true, features = ["derive"] } diff --git a/iroha_config/base/src/attach.rs b/iroha_config_base/src/attach.rs similarity index 100% rename from iroha_config/base/src/attach.rs rename to iroha_config_base/src/attach.rs diff --git a/iroha_config/base/src/env.rs b/iroha_config_base/src/env.rs similarity index 100% rename from iroha_config/base/src/env.rs rename to iroha_config_base/src/env.rs diff --git a/iroha_config/base/src/lib.rs b/iroha_config_base/src/lib.rs similarity index 100% rename from iroha_config/base/src/lib.rs rename to iroha_config_base/src/lib.rs diff --git a/iroha_config/base/src/read.rs b/iroha_config_base/src/read.rs similarity index 100% rename from iroha_config/base/src/read.rs rename to iroha_config_base/src/read.rs diff --git a/iroha_config/base/src/toml.rs b/iroha_config_base/src/toml.rs similarity index 100% rename from iroha_config/base/src/toml.rs rename to iroha_config_base/src/toml.rs diff --git a/iroha_config/base/src/util.rs b/iroha_config_base/src/util.rs similarity index 100% rename from iroha_config/base/src/util.rs rename to iroha_config_base/src/util.rs diff --git a/iroha_config/base/tests/bad.invalid-extends.toml b/iroha_config_base/tests/bad.invalid-extends.toml similarity index 100% rename from iroha_config/base/tests/bad.invalid-extends.toml rename to iroha_config_base/tests/bad.invalid-extends.toml diff --git a/iroha_config/base/tests/bad.invalid-nested-extends.base.toml b/iroha_config_base/tests/bad.invalid-nested-extends.base.toml similarity index 100% rename from iroha_config/base/tests/bad.invalid-nested-extends.base.toml rename to iroha_config_base/tests/bad.invalid-nested-extends.base.toml diff --git a/iroha_config/base/tests/bad.invalid-nested-extends.toml b/iroha_config_base/tests/bad.invalid-nested-extends.toml similarity index 100% rename from iroha_config/base/tests/bad.invalid-nested-extends.toml rename to iroha_config_base/tests/bad.invalid-nested-extends.toml diff --git a/iroha_config/base/tests/misc.rs b/iroha_config_base/tests/misc.rs similarity index 100% rename from iroha_config/base/tests/misc.rs rename to iroha_config_base/tests/misc.rs diff --git a/iroha_config/base/derive/Cargo.toml b/iroha_config_base_derive/Cargo.toml similarity index 100% rename from iroha_config/base/derive/Cargo.toml rename to iroha_config_base_derive/Cargo.toml diff --git a/iroha_config/base/derive/src/lib.rs b/iroha_config_base_derive/src/lib.rs similarity index 100% rename from iroha_config/base/derive/src/lib.rs rename to iroha_config_base_derive/src/lib.rs diff --git a/iroha_config/base/derive/tests/ui.rs b/iroha_config_base_derive/tests/ui.rs similarity index 100% rename from iroha_config/base/derive/tests/ui.rs rename to iroha_config_base_derive/tests/ui.rs diff --git a/iroha_config/base/derive/tests/ui_fail/generics.rs b/iroha_config_base_derive/tests/ui_fail/generics.rs similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/generics.rs rename to iroha_config_base_derive/tests/ui_fail/generics.rs diff --git a/iroha_config/base/derive/tests/ui_fail/generics.stderr b/iroha_config_base_derive/tests/ui_fail/generics.stderr similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/generics.stderr rename to iroha_config_base_derive/tests/ui_fail/generics.stderr diff --git a/iroha_config/base/derive/tests/ui_fail/invalid_attrs_commas.rs b/iroha_config_base_derive/tests/ui_fail/invalid_attrs_commas.rs similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/invalid_attrs_commas.rs rename to iroha_config_base_derive/tests/ui_fail/invalid_attrs_commas.rs diff --git a/iroha_config/base/derive/tests/ui_fail/invalid_attrs_commas.stderr b/iroha_config_base_derive/tests/ui_fail/invalid_attrs_commas.stderr similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/invalid_attrs_commas.stderr rename to iroha_config_base_derive/tests/ui_fail/invalid_attrs_commas.stderr diff --git a/iroha_config/base/derive/tests/ui_fail/invalid_attrs_conflicts.rs b/iroha_config_base_derive/tests/ui_fail/invalid_attrs_conflicts.rs similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/invalid_attrs_conflicts.rs rename to iroha_config_base_derive/tests/ui_fail/invalid_attrs_conflicts.rs diff --git a/iroha_config/base/derive/tests/ui_fail/invalid_attrs_conflicts.stderr b/iroha_config_base_derive/tests/ui_fail/invalid_attrs_conflicts.stderr similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/invalid_attrs_conflicts.stderr rename to iroha_config_base_derive/tests/ui_fail/invalid_attrs_conflicts.stderr diff --git a/iroha_config/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs b/iroha_config_base_derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs rename to iroha_config_base_derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs diff --git a/iroha_config/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr b/iroha_config_base_derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr rename to iroha_config_base_derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr diff --git a/iroha_config/base/derive/tests/ui_fail/invalid_attrs_env_without_var.rs b/iroha_config_base_derive/tests/ui_fail/invalid_attrs_env_without_var.rs similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/invalid_attrs_env_without_var.rs rename to iroha_config_base_derive/tests/ui_fail/invalid_attrs_env_without_var.rs diff --git a/iroha_config/base/derive/tests/ui_fail/invalid_attrs_env_without_var.stderr b/iroha_config_base_derive/tests/ui_fail/invalid_attrs_env_without_var.stderr similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/invalid_attrs_env_without_var.stderr rename to iroha_config_base_derive/tests/ui_fail/invalid_attrs_env_without_var.stderr diff --git a/iroha_config/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs b/iroha_config_base_derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs rename to iroha_config_base_derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs diff --git a/iroha_config/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr b/iroha_config_base_derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr rename to iroha_config_base_derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr diff --git a/iroha_config/base/derive/tests/ui_fail/invalid_attrs_struct.rs b/iroha_config_base_derive/tests/ui_fail/invalid_attrs_struct.rs similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/invalid_attrs_struct.rs rename to iroha_config_base_derive/tests/ui_fail/invalid_attrs_struct.rs diff --git a/iroha_config/base/derive/tests/ui_fail/invalid_attrs_struct.stderr b/iroha_config_base_derive/tests/ui_fail/invalid_attrs_struct.stderr similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/invalid_attrs_struct.stderr rename to iroha_config_base_derive/tests/ui_fail/invalid_attrs_struct.stderr diff --git a/iroha_config/base/derive/tests/ui_fail/unsupported_shapes.rs b/iroha_config_base_derive/tests/ui_fail/unsupported_shapes.rs similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/unsupported_shapes.rs rename to iroha_config_base_derive/tests/ui_fail/unsupported_shapes.rs diff --git a/iroha_config/base/derive/tests/ui_fail/unsupported_shapes.stderr b/iroha_config_base_derive/tests/ui_fail/unsupported_shapes.stderr similarity index 100% rename from iroha_config/base/derive/tests/ui_fail/unsupported_shapes.stderr rename to iroha_config_base_derive/tests/ui_fail/unsupported_shapes.stderr diff --git a/iroha_config/base/derive/tests/ui_pass/happy_path.rs b/iroha_config_base_derive/tests/ui_pass/happy_path.rs similarity index 100% rename from iroha_config/base/derive/tests/ui_pass/happy_path.rs rename to iroha_config_base_derive/tests/ui_pass/happy_path.rs From 6536453916eb829e72536f538bf51c9574fb02a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 10:37:30 +0400 Subject: [PATCH 37/59] refactor: unnest and rename `test_network` to `iroha_test_network` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.lock | 57 +++++++++---------- Cargo.toml | 4 +- iroha/Cargo.toml | 2 +- iroha/benches/torii.rs | 16 +++--- iroha/benches/tps/utils.rs | 2 +- iroha/examples/million_accounts_genesis.rs | 8 +-- iroha/examples/register_1000_triggers.rs | 6 +- iroha/tests/integration/asset.rs | 2 +- iroha/tests/integration/asset_propagation.rs | 2 +- iroha/tests/integration/events/data.rs | 2 +- .../tests/integration/events/notification.rs | 2 +- iroha/tests/integration/events/pipeline.rs | 2 +- .../extra_functional/connected_peers.rs | 2 +- .../integration/extra_functional/genesis.rs | 2 +- .../multiple_blocks_created.rs | 2 +- .../integration/extra_functional/normal.rs | 2 +- .../extra_functional/offline_peers.rs | 2 +- .../extra_functional/restart_peer.rs | 2 +- .../extra_functional/unregister_peer.rs | 4 +- .../extra_functional/unstable_network.rs | 2 +- iroha/tests/integration/non_mintable.rs | 2 +- iroha/tests/integration/pagination.rs | 2 +- iroha/tests/integration/permissions.rs | 2 +- iroha/tests/integration/queries/account.rs | 2 +- iroha/tests/integration/queries/mod.rs | 2 +- .../tests/integration/queries/query_errors.rs | 2 +- iroha/tests/integration/queries/role.rs | 2 +- .../integration/queries/smart_contract.rs | 2 +- iroha/tests/integration/roles.rs | 2 +- iroha/tests/integration/set_parameter.rs | 2 +- iroha/tests/integration/status_response.rs | 2 +- iroha/tests/integration/transfer_asset.rs | 2 +- iroha/tests/integration/transfer_domain.rs | 2 +- .../integration/triggers/by_call_trigger.rs | 2 +- .../integration/triggers/data_trigger.rs | 2 +- .../integration/triggers/event_trigger.rs | 2 +- .../integration/triggers/time_trigger.rs | 2 +- .../integration/triggers/trigger_rollback.rs | 2 +- iroha/tests/integration/tx_chain_id.rs | 2 +- iroha/tests/integration/tx_history.rs | 2 +- iroha/tests/integration/tx_rollback.rs | 2 +- iroha/tests/integration/upgrade.rs | 2 +- iroha_p2p/Cargo.toml | 2 +- .../Cargo.toml | 2 +- .../src/lib.rs | 0 45 files changed, 85 insertions(+), 86 deletions(-) rename {iroha_core/test_network => iroha_test_network}/Cargo.toml (96%) rename {iroha_core/test_network => iroha_test_network}/src/lib.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index f701c9bbc3a..ac374325bab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2902,6 +2902,7 @@ dependencies = [ "iroha_logger", "iroha_primitives", "iroha_telemetry", + "iroha_test_network", "iroha_test_samples", "iroha_torii_const", "iroha_version", @@ -2914,7 +2915,6 @@ dependencies = [ "serde_json", "serde_with", "tempfile", - "test_network", "thiserror", "tokio", "tokio-tungstenite", @@ -3395,9 +3395,9 @@ dependencies = [ "iroha_futures", "iroha_logger", "iroha_primitives", + "iroha_test_network", "parity-scale-codec", "rand", - "test_network", "thiserror", "tokio", ] @@ -3572,6 +3572,32 @@ dependencies = [ "trybuild", ] +[[package]] +name = "iroha_test_network" +version = "2.0.0-rc.1.0" +dependencies = [ + "eyre", + "futures", + "iroha", + "iroha_config", + "iroha_core", + "iroha_crypto", + "iroha_data_model", + "iroha_executor_data_model", + "iroha_genesis", + "iroha_logger", + "iroha_primitives", + "iroha_test_samples", + "iroha_wasm_builder", + "irohad", + "parity-scale-codec", + "rand", + "serde_json", + "tempfile", + "tokio", + "unique_port", +] + [[package]] name = "iroha_test_samples" version = "2.0.0-rc.1.0" @@ -5816,33 +5842,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "test_network" -version = "2.0.0-rc.1.0" -dependencies = [ - "eyre", - "futures", - "iroha", - "iroha_config", - "iroha_core", - "iroha_crypto", - "iroha_data_model", - "iroha_executor_data_model", - "iroha_futures", - "iroha_genesis", - "iroha_logger", - "iroha_primitives", - "iroha_test_samples", - "iroha_wasm_builder", - "irohad", - "parity-scale-codec", - "rand", - "serde_json", - "tempfile", - "tokio", - "unique_port", -] - [[package]] name = "thiserror" version = "1.0.63" diff --git a/Cargo.toml b/Cargo.toml index 1cb2d9824dd..9aeaef3ebf4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ iroha_smart_contract_utils = { version = "=2.0.0-rc.1.0", path = "iroha_smart_co iroha_executor = { version = "=2.0.0-rc.1.0", path = "iroha_executor" } iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_executor/data_model" } -test_network = { version = "=2.0.0-rc.1.0", path = "iroha_core/test_network" } +iroha_test_network = { version = "=2.0.0-rc.1.0", path = "iroha_test_network" } iroha_test_samples = { version = "=2.0.0-rc.1.0", path = "iroha_test_samples" } proc-macro2 = "1.0.86" @@ -200,7 +200,7 @@ members = [ "iroha_config", "iroha_config_base", "iroha_core", - "iroha_core/test_network", + "iroha_test_network", "iroha_crypto", "iroha_data_model", "iroha_genesis", diff --git a/iroha/Cargo.toml b/iroha/Cargo.toml index be1a37f1e79..b468950845d 100644 --- a/iroha/Cargo.toml +++ b/iroha/Cargo.toml @@ -90,7 +90,7 @@ irohad = { workspace = true } iroha_wasm_builder = { workspace = true } iroha_genesis = { workspace = true } -test_network = { workspace = true } +iroha_test_network = { workspace = true } executor_custom_data_model = { version = "=2.0.0-rc.1.0", path = "../wasm_samples/executor_custom_data_model" } tokio = { workspace = true, features = ["rt-multi-thread"] } diff --git a/iroha/benches/torii.rs b/iroha/benches/torii.rs index e32d81c5ca5..a36598a2637 100644 --- a/iroha/benches/torii.rs +++ b/iroha/benches/torii.rs @@ -11,7 +11,7 @@ use iroha_genesis::GenesisBuilder; use iroha_primitives::unique_vec; use iroha_test_samples::gen_account_in; use irohad::samples::get_config; -use test_network::{ +use iroha_test_network::{ construct_executor, get_chain_id, get_key_pair, Peer as TestPeer, PeerBuilder, TestRuntime, }; use tokio::runtime::Runtime; @@ -22,11 +22,11 @@ fn query_requests(criterion: &mut Criterion) { let mut peer = ::new().expect("Failed to create peer"); let chain_id = get_chain_id(); - let genesis_key_pair = get_key_pair(test_network::Signatory::Genesis); + let genesis_key_pair = get_key_pair(iroha_test_network::Signatory::Genesis); let configuration = get_config( unique_vec![peer.id.clone()], chain_id.clone(), - get_key_pair(test_network::Signatory::Peer), + get_key_pair(iroha_test_network::Signatory::Peer), genesis_key_pair.public_key(), ); @@ -36,7 +36,7 @@ fn query_requests(criterion: &mut Criterion) { let topology = vec![peer.id.clone()]; let genesis = GenesisBuilder::default() .domain("wonderland".parse().expect("Valid")) - .account(get_key_pair(test_network::Signatory::Alice).into_parts().0) + .account(get_key_pair(iroha_test_network::Signatory::Alice).into_parts().0) .finish_domain() .build_and_sign(chain_id, executor, topology, &genesis_key_pair); @@ -65,7 +65,7 @@ fn query_requests(criterion: &mut Criterion) { ); let client_config = iroha::samples::get_client_config( get_chain_id(), - get_key_pair(test_network::Signatory::Alice), + get_key_pair(iroha_test_network::Signatory::Alice), format!("http://{}", peer.api_address).parse().unwrap(), ); @@ -121,12 +121,12 @@ fn instruction_submits(criterion: &mut Criterion) { let mut peer = ::new().expect("Failed to create peer"); let chain_id = get_chain_id(); - let genesis_key_pair = get_key_pair(test_network::Signatory::Genesis); + let genesis_key_pair = get_key_pair(iroha_test_network::Signatory::Genesis); let topology = vec![peer.id.clone()]; let configuration = get_config( unique_vec![peer.id.clone()], chain_id.clone(), - get_key_pair(test_network::Signatory::Peer), + get_key_pair(iroha_test_network::Signatory::Peer), genesis_key_pair.public_key(), ); let executor = construct_executor("../wasm_samples/default_executor") @@ -148,7 +148,7 @@ fn instruction_submits(criterion: &mut Criterion) { let asset_definition_id: AssetDefinitionId = "xor#domain".parse().expect("Valid"); let client_config = iroha::samples::get_client_config( get_chain_id(), - get_key_pair(test_network::Signatory::Alice), + get_key_pair(iroha_test_network::Signatory::Alice), format!("http://{}", peer.api_address).parse().unwrap(), ); let iroha = Client::new(client_config); diff --git a/iroha/benches/tps/utils.rs b/iroha/benches/tps/utils.rs index 2e476a3049c..c7b1c9a81c1 100644 --- a/iroha/benches/tps/utils.rs +++ b/iroha/benches/tps/utils.rs @@ -13,7 +13,7 @@ use iroha::{ use iroha_test_samples::ALICE_ID; use nonzero_ext::nonzero; use serde::Deserialize; -use test_network::*; +use iroha_test_network::*; pub type Tps = f64; diff --git a/iroha/examples/million_accounts_genesis.rs b/iroha/examples/million_accounts_genesis.rs index 18fe51f3197..f5ccfd30578 100644 --- a/iroha/examples/million_accounts_genesis.rs +++ b/iroha/examples/million_accounts_genesis.rs @@ -8,7 +8,7 @@ use iroha::{ use iroha_genesis::{GenesisBlock, GenesisBuilder}; use iroha_primitives::unique_vec; use irohad::samples::get_config; -use test_network::{ +use iroha_test_network::{ construct_executor, get_chain_id, get_key_pair, wait_for_genesis_committed, Peer as TestPeer, PeerBuilder, TestRuntime, }; @@ -22,7 +22,7 @@ fn generate_genesis( ) -> GenesisBlock { let mut builder = GenesisBuilder::default(); - let signatory_alice = get_key_pair(test_network::Signatory::Alice).into_parts().0; + let signatory_alice = get_key_pair(iroha_test_network::Signatory::Alice).into_parts().0; for i in 0_u32..num_domains { builder = builder .domain(format!("wonderland-{i}").parse().expect("Valid")) @@ -43,12 +43,12 @@ fn main_genesis() { let mut peer = ::new().expect("Failed to create peer"); let chain_id = get_chain_id(); - let genesis_key_pair = get_key_pair(test_network::Signatory::Genesis); + let genesis_key_pair = get_key_pair(iroha_test_network::Signatory::Genesis); let topology = vec![peer.id.clone()]; let configuration = get_config( unique_vec![peer.id.clone()], chain_id.clone(), - get_key_pair(test_network::Signatory::Peer), + get_key_pair(iroha_test_network::Signatory::Peer), genesis_key_pair.public_key(), ); let rt = Runtime::test(); diff --git a/iroha/examples/register_1000_triggers.rs b/iroha/examples/register_1000_triggers.rs index 29533fc05c9..45dcbeda959 100644 --- a/iroha/examples/register_1000_triggers.rs +++ b/iroha/examples/register_1000_triggers.rs @@ -13,7 +13,7 @@ use iroha_genesis::{GenesisBlock, GenesisBuilder}; use iroha_primitives::unique_vec; use iroha_test_samples::gen_account_in; use irohad::samples::get_config; -use test_network::{ +use iroha_test_network::{ construct_executor, get_chain_id, get_key_pair, wait_for_genesis_committed_with_max_retries, Peer as TestPeer, PeerBuilder, TestClient, TestRuntime, }; @@ -72,12 +72,12 @@ fn main() -> Result<(), Box> { let mut peer: TestPeer = ::new().expect("Failed to create peer"); let chain_id = get_chain_id(); - let genesis_key_pair = get_key_pair(test_network::Signatory::Genesis); + let genesis_key_pair = get_key_pair(iroha_test_network::Signatory::Genesis); let topology = vec![peer.id.clone()]; let configuration = get_config( unique_vec![peer.id.clone()], chain_id.clone(), - get_key_pair(test_network::Signatory::Peer), + get_key_pair(iroha_test_network::Signatory::Peer), genesis_key_pair.public_key(), ); diff --git a/iroha/tests/integration/asset.rs b/iroha/tests/integration/asset.rs index d583b43e0f0..c7eb4e14763 100644 --- a/iroha/tests/integration/asset.rs +++ b/iroha/tests/integration/asset.rs @@ -14,7 +14,7 @@ use iroha::{ use iroha_config::parameters::actual::Root as Config; use iroha_executor_data_model::permission::asset::CanTransferUserAsset; use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID}; -use test_network::*; +use iroha_test_network::*; #[test] // This test is also covered at the UI level in the iroha_cli tests diff --git a/iroha/tests/integration/asset_propagation.rs b/iroha/tests/integration/asset_propagation.rs index 06a8bd8c42b..3654e722fd5 100644 --- a/iroha/tests/integration/asset_propagation.rs +++ b/iroha/tests/integration/asset_propagation.rs @@ -8,7 +8,7 @@ use iroha::{ use iroha_config::parameters::actual::Root as Config; use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; -use test_network::*; +use iroha_test_network::*; #[test] // This test is also covered at the UI level in the iroha_cli tests diff --git a/iroha/tests/integration/events/data.rs b/iroha/tests/integration/events/data.rs index 2d01b7390af..44e1daa4ccd 100644 --- a/iroha/tests/integration/events/data.rs +++ b/iroha/tests/integration/events/data.rs @@ -7,7 +7,7 @@ use iroha_executor_data_model::permission::account::{ }; use iroha_test_samples::{ALICE_ID, BOB_ID}; use parity_scale_codec::Encode as _; -use test_network::*; +use iroha_test_network::*; /// Return string containing exported memory, dummy allocator, and /// host function imports which you can embed into your wasm module. diff --git a/iroha/tests/integration/events/notification.rs b/iroha/tests/integration/events/notification.rs index 279a8d24174..c3a621e1548 100644 --- a/iroha/tests/integration/events/notification.rs +++ b/iroha/tests/integration/events/notification.rs @@ -3,7 +3,7 @@ use std::{sync::mpsc, thread, time::Duration}; use eyre::{eyre, Result, WrapErr}; use iroha::data_model::prelude::*; use iroha_test_samples::ALICE_ID; -use test_network::*; +use iroha_test_network::*; #[test] fn trigger_completion_success_should_produce_event() -> Result<()> { diff --git a/iroha/tests/integration/events/pipeline.rs b/iroha/tests/integration/events/pipeline.rs index 475beb8418b..0acaac77810 100644 --- a/iroha/tests/integration/events/pipeline.rs +++ b/iroha/tests/integration/events/pipeline.rs @@ -17,7 +17,7 @@ use iroha::{ }; use iroha_config::parameters::actual::Root as Config; use nonzero_ext::nonzero; -use test_network::*; +use iroha_test_network::*; // Needed to re-enable ignored tests. const PEER_COUNT: usize = 7; diff --git a/iroha/tests/integration/extra_functional/connected_peers.rs b/iroha/tests/integration/extra_functional/connected_peers.rs index 46882575a72..6971a76a85b 100644 --- a/iroha/tests/integration/extra_functional/connected_peers.rs +++ b/iroha/tests/integration/extra_functional/connected_peers.rs @@ -11,7 +11,7 @@ use iroha::{ use iroha_config::parameters::actual::Root as Config; use iroha_primitives::unique_vec; use rand::{seq::SliceRandom, thread_rng, Rng}; -use test_network::*; +use iroha_test_network::*; use tokio::runtime::Runtime; #[ignore = "ignore, more in #2851"] diff --git a/iroha/tests/integration/extra_functional/genesis.rs b/iroha/tests/integration/extra_functional/genesis.rs index eb2da99b843..3f1e7275b9b 100644 --- a/iroha/tests/integration/extra_functional/genesis.rs +++ b/iroha/tests/integration/extra_functional/genesis.rs @@ -2,7 +2,7 @@ use iroha::data_model::{ domain::{Domain, DomainId}, isi::Register, }; -use test_network::{wait_for_genesis_committed, NetworkBuilder}; +use iroha_test_network::{wait_for_genesis_committed, NetworkBuilder}; #[test] fn all_peers_submit_genesis() { diff --git a/iroha/tests/integration/extra_functional/multiple_blocks_created.rs b/iroha/tests/integration/extra_functional/multiple_blocks_created.rs index 873b9e0244c..0ba83b4d31a 100644 --- a/iroha/tests/integration/extra_functional/multiple_blocks_created.rs +++ b/iroha/tests/integration/extra_functional/multiple_blocks_created.rs @@ -8,7 +8,7 @@ use iroha::{ use iroha_config::parameters::actual::Root as Config; use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; -use test_network::*; +use iroha_test_network::*; const N_BLOCKS: usize = 510; diff --git a/iroha/tests/integration/extra_functional/normal.rs b/iroha/tests/integration/extra_functional/normal.rs index 126ce871d2d..239b57c2eae 100644 --- a/iroha/tests/integration/extra_functional/normal.rs +++ b/iroha/tests/integration/extra_functional/normal.rs @@ -3,7 +3,7 @@ use iroha::{ data_model::{asset::AssetDefinitionId, parameter::BlockParameter, prelude::*}, }; use nonzero_ext::nonzero; -use test_network::*; +use iroha_test_network::*; #[test] fn tranasctions_should_be_applied() { diff --git a/iroha/tests/integration/extra_functional/offline_peers.rs b/iroha/tests/integration/extra_functional/offline_peers.rs index 33999926206..ac831f036fa 100644 --- a/iroha/tests/integration/extra_functional/offline_peers.rs +++ b/iroha/tests/integration/extra_functional/offline_peers.rs @@ -10,7 +10,7 @@ use iroha::{ use iroha_config::parameters::actual::Root as Config; use iroha_primitives::addr::socket_addr; use iroha_test_samples::ALICE_ID; -use test_network::*; +use iroha_test_network::*; #[test] fn genesis_block_is_committed_with_some_offline_peers() -> Result<()> { diff --git a/iroha/tests/integration/extra_functional/restart_peer.rs b/iroha/tests/integration/extra_functional/restart_peer.rs index a9b926affbd..ee68d48a866 100644 --- a/iroha/tests/integration/extra_functional/restart_peer.rs +++ b/iroha/tests/integration/extra_functional/restart_peer.rs @@ -8,7 +8,7 @@ use iroha::{ use iroha_config::parameters::actual::Root as Config; use iroha_test_samples::ALICE_ID; use rand::{seq::SliceRandom, thread_rng, Rng}; -use test_network::*; +use iroha_test_network::*; use tokio::runtime::Runtime; #[test] diff --git a/iroha/tests/integration/extra_functional/unregister_peer.rs b/iroha/tests/integration/extra_functional/unregister_peer.rs index 808dc6bfe5e..5f21bf8bb95 100644 --- a/iroha/tests/integration/extra_functional/unregister_peer.rs +++ b/iroha/tests/integration/extra_functional/unregister_peer.rs @@ -8,7 +8,7 @@ use iroha::{ use iroha_config::parameters::actual::Root as Config; use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; -use test_network::*; +use iroha_test_network::*; // Note the test is marked as `unstable`, not the network. #[ignore = "ignore, more in #2851"] @@ -104,7 +104,7 @@ fn mint( fn init() -> Result<( tokio::runtime::Runtime, - test_network::Network, + iroha_test_network::Network, iroha::client::Client, std::time::Duration, AccountId, diff --git a/iroha/tests/integration/extra_functional/unstable_network.rs b/iroha/tests/integration/extra_functional/unstable_network.rs index 217cbc1ad40..577c2b95ab1 100644 --- a/iroha/tests/integration/extra_functional/unstable_network.rs +++ b/iroha/tests/integration/extra_functional/unstable_network.rs @@ -11,7 +11,7 @@ use iroha_config::parameters::actual::Root as Config; use iroha_test_samples::ALICE_ID; use nonzero_ext::nonzero; use rand::seq::SliceRandom; -use test_network::*; +use iroha_test_network::*; #[test] fn unstable_network_5_peers_1_fault() { diff --git a/iroha/tests/integration/non_mintable.rs b/iroha/tests/integration/non_mintable.rs index 3eb85aeba4c..d128368dcc9 100644 --- a/iroha/tests/integration/non_mintable.rs +++ b/iroha/tests/integration/non_mintable.rs @@ -4,7 +4,7 @@ use iroha::{ data_model::{isi::InstructionBox, prelude::*}, }; use iroha_test_samples::ALICE_ID; -use test_network::*; +use iroha_test_network::*; #[test] fn non_mintable_asset_can_be_minted_once_but_not_twice() -> Result<()> { diff --git a/iroha/tests/integration/pagination.rs b/iroha/tests/integration/pagination.rs index db47e944622..0dac92b9425 100644 --- a/iroha/tests/integration/pagination.rs +++ b/iroha/tests/integration/pagination.rs @@ -4,7 +4,7 @@ use iroha::{ data_model::{asset::AssetDefinition, prelude::*}, }; use nonzero_ext::nonzero; -use test_network::*; +use iroha_test_network::*; #[test] fn limits_should_work() -> Result<()> { diff --git a/iroha/tests/integration/permissions.rs b/iroha/tests/integration/permissions.rs index 7cb11d34675..7ed64d185a6 100644 --- a/iroha/tests/integration/permissions.rs +++ b/iroha/tests/integration/permissions.rs @@ -15,7 +15,7 @@ use iroha_executor_data_model::permission::{ }; use iroha_genesis::GenesisBlock; use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID}; -use test_network::{PeerBuilder, *}; +use iroha_test_network::{PeerBuilder, *}; #[test] fn genesis_transactions_are_validated_by_executor() { diff --git a/iroha/tests/integration/queries/account.rs b/iroha/tests/integration/queries/account.rs index 47b30160999..554d2fd5893 100644 --- a/iroha/tests/integration/queries/account.rs +++ b/iroha/tests/integration/queries/account.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; use eyre::Result; use iroha::{client, data_model::prelude::*}; use iroha_test_samples::{gen_account_in, ALICE_ID}; -use test_network::*; +use iroha_test_network::*; #[test] fn find_accounts_with_asset() -> Result<()> { diff --git a/iroha/tests/integration/queries/mod.rs b/iroha/tests/integration/queries/mod.rs index 277c1eadca0..bf07f4d29c3 100644 --- a/iroha/tests/integration/queries/mod.rs +++ b/iroha/tests/integration/queries/mod.rs @@ -5,7 +5,7 @@ use iroha::{ query::{error::QueryExecutionFail, parameters::MAX_FETCH_SIZE}, }, }; -use test_network::*; +use iroha_test_network::*; mod account; mod asset; diff --git a/iroha/tests/integration/queries/query_errors.rs b/iroha/tests/integration/queries/query_errors.rs index dca80a59d91..69d7586c9b1 100644 --- a/iroha/tests/integration/queries/query_errors.rs +++ b/iroha/tests/integration/queries/query_errors.rs @@ -6,7 +6,7 @@ use iroha_test_samples::gen_account_in; #[test] fn non_existent_account_is_specific_error() { - let (_rt, _peer, client) = ::new() + let (_rt, _peer, client) = ::new() .with_port(10_670) .start_with_runtime(); // we cannot wait for genesis committment diff --git a/iroha/tests/integration/queries/role.rs b/iroha/tests/integration/queries/role.rs index 59be9910c7f..3c83cf0859e 100644 --- a/iroha/tests/integration/queries/role.rs +++ b/iroha/tests/integration/queries/role.rs @@ -7,7 +7,7 @@ use iroha::{ }; use iroha_executor_data_model::permission::account::CanSetKeyValueInAccount; use iroha_test_samples::ALICE_ID; -use test_network::*; +use iroha_test_network::*; fn create_role_ids() -> [RoleId; 5] { [ diff --git a/iroha/tests/integration/queries/smart_contract.rs b/iroha/tests/integration/queries/smart_contract.rs index e40c556df45..565c081facc 100644 --- a/iroha/tests/integration/queries/smart_contract.rs +++ b/iroha/tests/integration/queries/smart_contract.rs @@ -3,7 +3,7 @@ use iroha::{ client::QueryError, data_model::{prelude::*, query::error::QueryExecutionFail}, }; -use test_network::*; +use iroha_test_network::*; #[test] fn live_query_is_dropped_after_smart_contract_end() -> Result<()> { diff --git a/iroha/tests/integration/roles.rs b/iroha/tests/integration/roles.rs index 1772193b023..a4010afe611 100644 --- a/iroha/tests/integration/roles.rs +++ b/iroha/tests/integration/roles.rs @@ -9,7 +9,7 @@ use iroha_executor_data_model::permission::account::{ }; use iroha_test_samples::{gen_account_in, ALICE_ID}; use serde_json::json; -use test_network::*; +use iroha_test_network::*; #[test] fn register_empty_role() -> Result<()> { diff --git a/iroha/tests/integration/set_parameter.rs b/iroha/tests/integration/set_parameter.rs index 62a5f621362..78821fd9464 100644 --- a/iroha/tests/integration/set_parameter.rs +++ b/iroha/tests/integration/set_parameter.rs @@ -8,7 +8,7 @@ use iroha::{ prelude::*, }, }; -use test_network::*; +use iroha_test_network::*; #[test] fn can_change_parameter_value() -> Result<()> { diff --git a/iroha/tests/integration/status_response.rs b/iroha/tests/integration/status_response.rs index 5840f588815..409f4a51146 100644 --- a/iroha/tests/integration/status_response.rs +++ b/iroha/tests/integration/status_response.rs @@ -2,7 +2,7 @@ use eyre::Result; use iroha::{data_model::prelude::*, samples::get_status_json}; use iroha_telemetry::metrics::Status; use iroha_test_samples::gen_account_in; -use test_network::*; +use iroha_test_network::*; fn status_eq_excluding_uptime_and_queue(lhs: &Status, rhs: &Status) -> bool { lhs.peers == rhs.peers diff --git a/iroha/tests/integration/transfer_asset.rs b/iroha/tests/integration/transfer_asset.rs index 4890e378c74..9afab134aa1 100644 --- a/iroha/tests/integration/transfer_asset.rs +++ b/iroha/tests/integration/transfer_asset.rs @@ -9,7 +9,7 @@ use iroha::{ }, }; use iroha_test_samples::{gen_account_in, ALICE_ID}; -use test_network::*; +use iroha_test_network::*; #[test] // This test suite is also covered at the UI level in the iroha_cli tests diff --git a/iroha/tests/integration/transfer_domain.rs b/iroha/tests/integration/transfer_domain.rs index 4b90580c186..bb1d6a22b25 100644 --- a/iroha/tests/integration/transfer_domain.rs +++ b/iroha/tests/integration/transfer_domain.rs @@ -15,7 +15,7 @@ use iroha_executor_data_model::permission::{ use iroha_genesis::GenesisBlock; use iroha_primitives::json::JsonString; use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID, SAMPLE_GENESIS_ACCOUNT_ID}; -use test_network::{Peer as TestPeer, *}; +use iroha_test_network::{Peer as TestPeer, *}; use tokio::runtime::Runtime; #[test] diff --git a/iroha/tests/integration/triggers/by_call_trigger.rs b/iroha/tests/integration/triggers/by_call_trigger.rs index 6ac159ddeae..787da89adf2 100644 --- a/iroha/tests/integration/triggers/by_call_trigger.rs +++ b/iroha/tests/integration/triggers/by_call_trigger.rs @@ -16,7 +16,7 @@ use iroha_executor_data_model::permission::trigger::CanRegisterUserTrigger; use iroha_genesis::GenesisBlock; use iroha_logger::info; use iroha_test_samples::ALICE_ID; -use test_network::{Peer as TestPeer, *}; +use iroha_test_network::{Peer as TestPeer, *}; use tokio::runtime::Runtime; const TRIGGER_NAME: &str = "mint_rose"; diff --git a/iroha/tests/integration/triggers/data_trigger.rs b/iroha/tests/integration/triggers/data_trigger.rs index 9692b735ffa..78a7ab77f83 100644 --- a/iroha/tests/integration/triggers/data_trigger.rs +++ b/iroha/tests/integration/triggers/data_trigger.rs @@ -1,7 +1,7 @@ use eyre::Result; use iroha::{client, data_model::prelude::*}; use iroha_test_samples::{gen_account_in, ALICE_ID}; -use test_network::*; +use iroha_test_network::*; #[test] fn must_execute_both_triggers() -> Result<()> { diff --git a/iroha/tests/integration/triggers/event_trigger.rs b/iroha/tests/integration/triggers/event_trigger.rs index 3fbc1d52e22..b3f8af51416 100644 --- a/iroha/tests/integration/triggers/event_trigger.rs +++ b/iroha/tests/integration/triggers/event_trigger.rs @@ -4,7 +4,7 @@ use iroha::{ data_model::prelude::*, }; use iroha_test_samples::ALICE_ID; -use test_network::*; +use iroha_test_network::*; #[test] fn test_mint_asset_when_new_asset_definition_created() -> Result<()> { diff --git a/iroha/tests/integration/triggers/time_trigger.rs b/iroha/tests/integration/triggers/time_trigger.rs index 8779e1b700c..c940afe90aa 100644 --- a/iroha/tests/integration/triggers/time_trigger.rs +++ b/iroha/tests/integration/triggers/time_trigger.rs @@ -14,7 +14,7 @@ use iroha::{ }; use iroha_logger::info; use iroha_test_samples::{gen_account_in, ALICE_ID}; -use test_network::*; +use iroha_test_network::*; /// Default estimation of consensus duration. pub fn default_consensus_estimation() -> Duration { diff --git a/iroha/tests/integration/triggers/trigger_rollback.rs b/iroha/tests/integration/triggers/trigger_rollback.rs index 5037896107b..f91365812b8 100644 --- a/iroha/tests/integration/triggers/trigger_rollback.rs +++ b/iroha/tests/integration/triggers/trigger_rollback.rs @@ -4,7 +4,7 @@ use iroha::{ data_model::{prelude::*, trigger::TriggerId}, }; use iroha_test_samples::ALICE_ID; -use test_network::*; +use iroha_test_network::*; #[test] fn failed_trigger_revert() -> Result<()> { diff --git a/iroha/tests/integration/tx_chain_id.rs b/iroha/tests/integration/tx_chain_id.rs index b38b273eac6..2875896de27 100644 --- a/iroha/tests/integration/tx_chain_id.rs +++ b/iroha/tests/integration/tx_chain_id.rs @@ -1,7 +1,7 @@ use iroha::data_model::prelude::*; use iroha_primitives::numeric::numeric; use iroha_test_samples::gen_account_in; -use test_network::*; +use iroha_test_network::*; #[test] fn send_tx_with_different_chain_id() { diff --git a/iroha/tests/integration/tx_history.rs b/iroha/tests/integration/tx_history.rs index 0d820d68720..9dcda7e169d 100644 --- a/iroha/tests/integration/tx_history.rs +++ b/iroha/tests/integration/tx_history.rs @@ -8,7 +8,7 @@ use iroha::{ use iroha_config::parameters::actual::Root as Config; use iroha_test_samples::ALICE_ID; use nonzero_ext::nonzero; -use test_network::*; +use iroha_test_network::*; #[ignore = "ignore, more in #2851"] #[test] diff --git a/iroha/tests/integration/tx_rollback.rs b/iroha/tests/integration/tx_rollback.rs index 6900f6ef795..32cb61c2d61 100644 --- a/iroha/tests/integration/tx_rollback.rs +++ b/iroha/tests/integration/tx_rollback.rs @@ -1,7 +1,7 @@ use eyre::Result; use iroha::{client, data_model::prelude::*}; use iroha_test_samples::ALICE_ID; -use test_network::*; +use iroha_test_network::*; #[test] fn client_sends_transaction_with_invalid_instruction_should_not_see_any_changes() -> Result<()> { diff --git a/iroha/tests/integration/upgrade.rs b/iroha/tests/integration/upgrade.rs index 70304eca983..4c9c824d5a3 100644 --- a/iroha/tests/integration/upgrade.rs +++ b/iroha/tests/integration/upgrade.rs @@ -14,7 +14,7 @@ use iroha_executor_data_model::permission::{domain::CanUnregisterDomain, Permiss use iroha_logger::info; use iroha_test_samples::{ALICE_ID, BOB_ID}; use nonzero_ext::nonzero; -use test_network::*; +use iroha_test_network::*; const ADMIN_PUBLIC_KEY_MULTIHASH: &str = "ed012076E5CA9698296AF9BE2CA45F525CB3BCFDEB7EE068BA56F973E9DD90564EF4FC"; diff --git a/iroha_p2p/Cargo.toml b/iroha_p2p/Cargo.toml index acd3b6c0b1c..6b80621f569 100644 --- a/iroha_p2p/Cargo.toml +++ b/iroha_p2p/Cargo.toml @@ -39,4 +39,4 @@ bytes = { workspace = true } [dev-dependencies] iroha_config_base = { workspace = true } -test_network = { workspace = true } +iroha_test_network = { workspace = true } diff --git a/iroha_core/test_network/Cargo.toml b/iroha_test_network/Cargo.toml similarity index 96% rename from iroha_core/test_network/Cargo.toml rename to iroha_test_network/Cargo.toml index dddac32ffb4..b321d1df94a 100644 --- a/iroha_core/test_network/Cargo.toml +++ b/iroha_test_network/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "test_network" +name = "iroha_test_network" edition.workspace = true version.workspace = true diff --git a/iroha_core/test_network/src/lib.rs b/iroha_test_network/src/lib.rs similarity index 100% rename from iroha_core/test_network/src/lib.rs rename to iroha_test_network/src/lib.rs From ec1c653817bef9d6559608e4d9668e5c4fbaa52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 10:38:57 +0400 Subject: [PATCH 38/59] refactor: unnest `iroha_data_model_derive` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- iroha_data_model/Cargo.toml | 2 +- {iroha_data_model/derive => iroha_data_model_derive}/Cargo.toml | 0 .../derive => iroha_data_model_derive}/src/enum_ref.rs | 0 .../derive => iroha_data_model_derive}/src/event_set.rs | 0 .../derive => iroha_data_model_derive}/src/has_origin.rs | 0 {iroha_data_model/derive => iroha_data_model_derive}/src/id.rs | 0 {iroha_data_model/derive => iroha_data_model_derive}/src/lib.rs | 0 .../derive => iroha_data_model_derive}/src/model.rs | 0 .../src/partially_tagged/mod.rs | 0 .../src/partially_tagged/resolve_self.rs | 0 .../derive => iroha_data_model_derive}/tests/event_set.rs | 0 .../derive => iroha_data_model_derive}/tests/has_origin.rs | 0 .../tests/has_origin_generics.rs | 0 .../derive => iroha_data_model_derive}/tests/id_eq_ord_hash.rs | 0 .../tests/partial_tagged_serde.rs | 0 .../tests/partial_tagged_serde_self.rs | 0 .../derive => iroha_data_model_derive}/tests/ui.rs | 0 .../tests/ui_fail/has_origin_multiple_attributes.rs | 0 .../tests/ui_fail/has_origin_multiple_attributes.stderr | 0 .../tests/ui_fail/transparent_api_private_field.rs | 0 .../tests/ui_fail/transparent_api_private_field.stderr | 0 .../tests/ui_fail/transparent_api_private_item.rs | 0 .../tests/ui_fail/transparent_api_private_item.stderr | 0 23 files changed, 1 insertion(+), 1 deletion(-) rename {iroha_data_model/derive => iroha_data_model_derive}/Cargo.toml (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/src/enum_ref.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/src/event_set.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/src/has_origin.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/src/id.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/src/lib.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/src/model.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/src/partially_tagged/mod.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/src/partially_tagged/resolve_self.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/event_set.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/has_origin.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/has_origin_generics.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/id_eq_ord_hash.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/partial_tagged_serde.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/partial_tagged_serde_self.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/ui.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/ui_fail/has_origin_multiple_attributes.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/ui_fail/has_origin_multiple_attributes.stderr (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/ui_fail/transparent_api_private_field.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/ui_fail/transparent_api_private_field.stderr (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/ui_fail/transparent_api_private_item.rs (100%) rename {iroha_data_model/derive => iroha_data_model_derive}/tests/ui_fail/transparent_api_private_item.stderr (100%) diff --git a/iroha_data_model/Cargo.toml b/iroha_data_model/Cargo.toml index 1dc267101db..c10264d929f 100644 --- a/iroha_data_model/Cargo.toml +++ b/iroha_data_model/Cargo.toml @@ -27,7 +27,7 @@ ffi_export = ["std", "iroha_ffi", "iroha_primitives/ffi_export", "iroha_crypto/f transparent_api = [] [dependencies] -iroha_data_model_derive = { path = "derive" } +iroha_data_model_derive = { path = "../iroha_data_model_derive" } iroha_primitives = { workspace = true } iroha_crypto = { workspace = true } diff --git a/iroha_data_model/derive/Cargo.toml b/iroha_data_model_derive/Cargo.toml similarity index 100% rename from iroha_data_model/derive/Cargo.toml rename to iroha_data_model_derive/Cargo.toml diff --git a/iroha_data_model/derive/src/enum_ref.rs b/iroha_data_model_derive/src/enum_ref.rs similarity index 100% rename from iroha_data_model/derive/src/enum_ref.rs rename to iroha_data_model_derive/src/enum_ref.rs diff --git a/iroha_data_model/derive/src/event_set.rs b/iroha_data_model_derive/src/event_set.rs similarity index 100% rename from iroha_data_model/derive/src/event_set.rs rename to iroha_data_model_derive/src/event_set.rs diff --git a/iroha_data_model/derive/src/has_origin.rs b/iroha_data_model_derive/src/has_origin.rs similarity index 100% rename from iroha_data_model/derive/src/has_origin.rs rename to iroha_data_model_derive/src/has_origin.rs diff --git a/iroha_data_model/derive/src/id.rs b/iroha_data_model_derive/src/id.rs similarity index 100% rename from iroha_data_model/derive/src/id.rs rename to iroha_data_model_derive/src/id.rs diff --git a/iroha_data_model/derive/src/lib.rs b/iroha_data_model_derive/src/lib.rs similarity index 100% rename from iroha_data_model/derive/src/lib.rs rename to iroha_data_model_derive/src/lib.rs diff --git a/iroha_data_model/derive/src/model.rs b/iroha_data_model_derive/src/model.rs similarity index 100% rename from iroha_data_model/derive/src/model.rs rename to iroha_data_model_derive/src/model.rs diff --git a/iroha_data_model/derive/src/partially_tagged/mod.rs b/iroha_data_model_derive/src/partially_tagged/mod.rs similarity index 100% rename from iroha_data_model/derive/src/partially_tagged/mod.rs rename to iroha_data_model_derive/src/partially_tagged/mod.rs diff --git a/iroha_data_model/derive/src/partially_tagged/resolve_self.rs b/iroha_data_model_derive/src/partially_tagged/resolve_self.rs similarity index 100% rename from iroha_data_model/derive/src/partially_tagged/resolve_self.rs rename to iroha_data_model_derive/src/partially_tagged/resolve_self.rs diff --git a/iroha_data_model/derive/tests/event_set.rs b/iroha_data_model_derive/tests/event_set.rs similarity index 100% rename from iroha_data_model/derive/tests/event_set.rs rename to iroha_data_model_derive/tests/event_set.rs diff --git a/iroha_data_model/derive/tests/has_origin.rs b/iroha_data_model_derive/tests/has_origin.rs similarity index 100% rename from iroha_data_model/derive/tests/has_origin.rs rename to iroha_data_model_derive/tests/has_origin.rs diff --git a/iroha_data_model/derive/tests/has_origin_generics.rs b/iroha_data_model_derive/tests/has_origin_generics.rs similarity index 100% rename from iroha_data_model/derive/tests/has_origin_generics.rs rename to iroha_data_model_derive/tests/has_origin_generics.rs diff --git a/iroha_data_model/derive/tests/id_eq_ord_hash.rs b/iroha_data_model_derive/tests/id_eq_ord_hash.rs similarity index 100% rename from iroha_data_model/derive/tests/id_eq_ord_hash.rs rename to iroha_data_model_derive/tests/id_eq_ord_hash.rs diff --git a/iroha_data_model/derive/tests/partial_tagged_serde.rs b/iroha_data_model_derive/tests/partial_tagged_serde.rs similarity index 100% rename from iroha_data_model/derive/tests/partial_tagged_serde.rs rename to iroha_data_model_derive/tests/partial_tagged_serde.rs diff --git a/iroha_data_model/derive/tests/partial_tagged_serde_self.rs b/iroha_data_model_derive/tests/partial_tagged_serde_self.rs similarity index 100% rename from iroha_data_model/derive/tests/partial_tagged_serde_self.rs rename to iroha_data_model_derive/tests/partial_tagged_serde_self.rs diff --git a/iroha_data_model/derive/tests/ui.rs b/iroha_data_model_derive/tests/ui.rs similarity index 100% rename from iroha_data_model/derive/tests/ui.rs rename to iroha_data_model_derive/tests/ui.rs diff --git a/iroha_data_model/derive/tests/ui_fail/has_origin_multiple_attributes.rs b/iroha_data_model_derive/tests/ui_fail/has_origin_multiple_attributes.rs similarity index 100% rename from iroha_data_model/derive/tests/ui_fail/has_origin_multiple_attributes.rs rename to iroha_data_model_derive/tests/ui_fail/has_origin_multiple_attributes.rs diff --git a/iroha_data_model/derive/tests/ui_fail/has_origin_multiple_attributes.stderr b/iroha_data_model_derive/tests/ui_fail/has_origin_multiple_attributes.stderr similarity index 100% rename from iroha_data_model/derive/tests/ui_fail/has_origin_multiple_attributes.stderr rename to iroha_data_model_derive/tests/ui_fail/has_origin_multiple_attributes.stderr diff --git a/iroha_data_model/derive/tests/ui_fail/transparent_api_private_field.rs b/iroha_data_model_derive/tests/ui_fail/transparent_api_private_field.rs similarity index 100% rename from iroha_data_model/derive/tests/ui_fail/transparent_api_private_field.rs rename to iroha_data_model_derive/tests/ui_fail/transparent_api_private_field.rs diff --git a/iroha_data_model/derive/tests/ui_fail/transparent_api_private_field.stderr b/iroha_data_model_derive/tests/ui_fail/transparent_api_private_field.stderr similarity index 100% rename from iroha_data_model/derive/tests/ui_fail/transparent_api_private_field.stderr rename to iroha_data_model_derive/tests/ui_fail/transparent_api_private_field.stderr diff --git a/iroha_data_model/derive/tests/ui_fail/transparent_api_private_item.rs b/iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.rs similarity index 100% rename from iroha_data_model/derive/tests/ui_fail/transparent_api_private_item.rs rename to iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.rs diff --git a/iroha_data_model/derive/tests/ui_fail/transparent_api_private_item.stderr b/iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.stderr similarity index 100% rename from iroha_data_model/derive/tests/ui_fail/transparent_api_private_item.stderr rename to iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.stderr From aa444207615c13cd8f2934acbb6039ca093f2928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 10:56:57 +0400 Subject: [PATCH 39/59] refactor: unnest `iroha_ffi_derive` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 2 +- iroha_ffi/Cargo.toml | 2 +- {iroha_ffi/derive => iroha_ffi_derive}/Cargo.toml | 0 {iroha_ffi/derive => iroha_ffi_derive}/src/attr_parse/derive.rs | 0 {iroha_ffi/derive => iroha_ffi_derive}/src/attr_parse/doc.rs | 0 {iroha_ffi/derive => iroha_ffi_derive}/src/attr_parse/getset.rs | 0 {iroha_ffi/derive => iroha_ffi_derive}/src/attr_parse/mod.rs | 0 {iroha_ffi/derive => iroha_ffi_derive}/src/attr_parse/repr.rs | 0 {iroha_ffi/derive => iroha_ffi_derive}/src/convert.rs | 0 {iroha_ffi/derive => iroha_ffi_derive}/src/ffi_fn.rs | 0 {iroha_ffi/derive => iroha_ffi_derive}/src/getset_gen.rs | 0 {iroha_ffi/derive => iroha_ffi_derive}/src/impl_visitor.rs | 0 {iroha_ffi/derive => iroha_ffi_derive}/src/lib.rs | 0 {iroha_ffi/derive => iroha_ffi_derive}/src/wrapper.rs | 0 {iroha_ffi/derive => iroha_ffi_derive}/tests/ui.rs | 0 .../derive => iroha_ffi_derive}/tests/ui_fail/array_as_ptr.rs | 0 .../tests/ui_fail/array_as_ptr.stderr | 0 .../tests/ui_fail/derive_skip_field.rs | 0 .../tests/ui_fail/derive_skip_field.stderr | 0 .../tests/ui_fail/derive_skip_struct.rs | 0 .../tests/ui_fail/derive_skip_struct.stderr | 0 .../tests/ui_fail/fallible_transmute_mut_ref.rs | 0 .../tests/ui_fail/fallible_transmute_mut_ref.stderr | 0 .../tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs | 0 .../ui_fail/fieldless_enum_with_explicit_discriminant.stderr | 0 .../tests/ui_fail/fieldless_enum_without_repr.rs | 0 .../tests/ui_fail/fieldless_enum_without_repr.stderr | 0 .../tests/ui_fail/generics_are_forbiden_in_ffi.rs | 0 .../tests/ui_fail/generics_are_forbiden_in_ffi.stderr | 0 .../tests/ui_fail/nested_owned_structure.rs | 0 .../tests/ui_fail/nested_owned_structure.stderr | 0 .../tests/ui_fail/non_robust_repr_c.rs | 0 .../tests/ui_fail/non_robust_repr_c.stderr | 0 .../tests/ui_fail/private_method_inside_impl_are_skipped.rs | 0 .../tests/ui_fail/private_method_inside_impl_are_skipped.stderr | 0 .../tests/ui_fail/raw_pointer_type.rs | 0 .../tests/ui_fail/raw_pointer_type.stderr | 0 .../tests/ui_fail/uninhabited_enum.rs | 0 .../tests/ui_fail/uninhabited_enum.stderr | 0 .../tests/ui_pass/ffi_export_arg_pattern.rs | 0 40 files changed, 2 insertions(+), 2 deletions(-) rename {iroha_ffi/derive => iroha_ffi_derive}/Cargo.toml (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/src/attr_parse/derive.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/src/attr_parse/doc.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/src/attr_parse/getset.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/src/attr_parse/mod.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/src/attr_parse/repr.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/src/convert.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/src/ffi_fn.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/src/getset_gen.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/src/impl_visitor.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/src/lib.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/src/wrapper.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/array_as_ptr.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/array_as_ptr.stderr (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/derive_skip_field.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/derive_skip_field.stderr (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/derive_skip_struct.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/derive_skip_struct.stderr (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/fallible_transmute_mut_ref.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/fallible_transmute_mut_ref.stderr (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/fieldless_enum_without_repr.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/fieldless_enum_without_repr.stderr (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/generics_are_forbiden_in_ffi.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/generics_are_forbiden_in_ffi.stderr (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/nested_owned_structure.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/nested_owned_structure.stderr (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/non_robust_repr_c.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/non_robust_repr_c.stderr (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/private_method_inside_impl_are_skipped.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/private_method_inside_impl_are_skipped.stderr (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/raw_pointer_type.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/raw_pointer_type.stderr (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/uninhabited_enum.rs (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_fail/uninhabited_enum.stderr (100%) rename {iroha_ffi/derive => iroha_ffi_derive}/tests/ui_pass/ffi_export_arg_pattern.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 9aeaef3ebf4..07a43c5d008 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -212,7 +212,7 @@ members = [ "iroha_primitives/derive", "iroha_primitives/numeric", "iroha_ffi", - "iroha_ffi/derive", + "iroha_ffi_derive", "iroha_schema", "iroha_schema/gen", "iroha_schema/derive", diff --git a/iroha_ffi/Cargo.toml b/iroha_ffi/Cargo.toml index bbf05e88a9a..40ad9212f29 100644 --- a/iroha_ffi/Cargo.toml +++ b/iroha_ffi/Cargo.toml @@ -18,7 +18,7 @@ workspace = true non_robust_ref_mut = [] [dependencies] -iroha_ffi_derive = { path = "derive" } +iroha_ffi_derive = { path = "../iroha_ffi_derive" } derive_more = { workspace = true, features = ["display", "constructor"] } diff --git a/iroha_ffi/derive/Cargo.toml b/iroha_ffi_derive/Cargo.toml similarity index 100% rename from iroha_ffi/derive/Cargo.toml rename to iroha_ffi_derive/Cargo.toml diff --git a/iroha_ffi/derive/src/attr_parse/derive.rs b/iroha_ffi_derive/src/attr_parse/derive.rs similarity index 100% rename from iroha_ffi/derive/src/attr_parse/derive.rs rename to iroha_ffi_derive/src/attr_parse/derive.rs diff --git a/iroha_ffi/derive/src/attr_parse/doc.rs b/iroha_ffi_derive/src/attr_parse/doc.rs similarity index 100% rename from iroha_ffi/derive/src/attr_parse/doc.rs rename to iroha_ffi_derive/src/attr_parse/doc.rs diff --git a/iroha_ffi/derive/src/attr_parse/getset.rs b/iroha_ffi_derive/src/attr_parse/getset.rs similarity index 100% rename from iroha_ffi/derive/src/attr_parse/getset.rs rename to iroha_ffi_derive/src/attr_parse/getset.rs diff --git a/iroha_ffi/derive/src/attr_parse/mod.rs b/iroha_ffi_derive/src/attr_parse/mod.rs similarity index 100% rename from iroha_ffi/derive/src/attr_parse/mod.rs rename to iroha_ffi_derive/src/attr_parse/mod.rs diff --git a/iroha_ffi/derive/src/attr_parse/repr.rs b/iroha_ffi_derive/src/attr_parse/repr.rs similarity index 100% rename from iroha_ffi/derive/src/attr_parse/repr.rs rename to iroha_ffi_derive/src/attr_parse/repr.rs diff --git a/iroha_ffi/derive/src/convert.rs b/iroha_ffi_derive/src/convert.rs similarity index 100% rename from iroha_ffi/derive/src/convert.rs rename to iroha_ffi_derive/src/convert.rs diff --git a/iroha_ffi/derive/src/ffi_fn.rs b/iroha_ffi_derive/src/ffi_fn.rs similarity index 100% rename from iroha_ffi/derive/src/ffi_fn.rs rename to iroha_ffi_derive/src/ffi_fn.rs diff --git a/iroha_ffi/derive/src/getset_gen.rs b/iroha_ffi_derive/src/getset_gen.rs similarity index 100% rename from iroha_ffi/derive/src/getset_gen.rs rename to iroha_ffi_derive/src/getset_gen.rs diff --git a/iroha_ffi/derive/src/impl_visitor.rs b/iroha_ffi_derive/src/impl_visitor.rs similarity index 100% rename from iroha_ffi/derive/src/impl_visitor.rs rename to iroha_ffi_derive/src/impl_visitor.rs diff --git a/iroha_ffi/derive/src/lib.rs b/iroha_ffi_derive/src/lib.rs similarity index 100% rename from iroha_ffi/derive/src/lib.rs rename to iroha_ffi_derive/src/lib.rs diff --git a/iroha_ffi/derive/src/wrapper.rs b/iroha_ffi_derive/src/wrapper.rs similarity index 100% rename from iroha_ffi/derive/src/wrapper.rs rename to iroha_ffi_derive/src/wrapper.rs diff --git a/iroha_ffi/derive/tests/ui.rs b/iroha_ffi_derive/tests/ui.rs similarity index 100% rename from iroha_ffi/derive/tests/ui.rs rename to iroha_ffi_derive/tests/ui.rs diff --git a/iroha_ffi/derive/tests/ui_fail/array_as_ptr.rs b/iroha_ffi_derive/tests/ui_fail/array_as_ptr.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/array_as_ptr.rs rename to iroha_ffi_derive/tests/ui_fail/array_as_ptr.rs diff --git a/iroha_ffi/derive/tests/ui_fail/array_as_ptr.stderr b/iroha_ffi_derive/tests/ui_fail/array_as_ptr.stderr similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/array_as_ptr.stderr rename to iroha_ffi_derive/tests/ui_fail/array_as_ptr.stderr diff --git a/iroha_ffi/derive/tests/ui_fail/derive_skip_field.rs b/iroha_ffi_derive/tests/ui_fail/derive_skip_field.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/derive_skip_field.rs rename to iroha_ffi_derive/tests/ui_fail/derive_skip_field.rs diff --git a/iroha_ffi/derive/tests/ui_fail/derive_skip_field.stderr b/iroha_ffi_derive/tests/ui_fail/derive_skip_field.stderr similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/derive_skip_field.stderr rename to iroha_ffi_derive/tests/ui_fail/derive_skip_field.stderr diff --git a/iroha_ffi/derive/tests/ui_fail/derive_skip_struct.rs b/iroha_ffi_derive/tests/ui_fail/derive_skip_struct.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/derive_skip_struct.rs rename to iroha_ffi_derive/tests/ui_fail/derive_skip_struct.rs diff --git a/iroha_ffi/derive/tests/ui_fail/derive_skip_struct.stderr b/iroha_ffi_derive/tests/ui_fail/derive_skip_struct.stderr similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/derive_skip_struct.stderr rename to iroha_ffi_derive/tests/ui_fail/derive_skip_struct.stderr diff --git a/iroha_ffi/derive/tests/ui_fail/fallible_transmute_mut_ref.rs b/iroha_ffi_derive/tests/ui_fail/fallible_transmute_mut_ref.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/fallible_transmute_mut_ref.rs rename to iroha_ffi_derive/tests/ui_fail/fallible_transmute_mut_ref.rs diff --git a/iroha_ffi/derive/tests/ui_fail/fallible_transmute_mut_ref.stderr b/iroha_ffi_derive/tests/ui_fail/fallible_transmute_mut_ref.stderr similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/fallible_transmute_mut_ref.stderr rename to iroha_ffi_derive/tests/ui_fail/fallible_transmute_mut_ref.stderr diff --git a/iroha_ffi/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs b/iroha_ffi_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs rename to iroha_ffi_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs diff --git a/iroha_ffi/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr b/iroha_ffi_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr rename to iroha_ffi_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr diff --git a/iroha_ffi/derive/tests/ui_fail/fieldless_enum_without_repr.rs b/iroha_ffi_derive/tests/ui_fail/fieldless_enum_without_repr.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/fieldless_enum_without_repr.rs rename to iroha_ffi_derive/tests/ui_fail/fieldless_enum_without_repr.rs diff --git a/iroha_ffi/derive/tests/ui_fail/fieldless_enum_without_repr.stderr b/iroha_ffi_derive/tests/ui_fail/fieldless_enum_without_repr.stderr similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/fieldless_enum_without_repr.stderr rename to iroha_ffi_derive/tests/ui_fail/fieldless_enum_without_repr.stderr diff --git a/iroha_ffi/derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs b/iroha_ffi_derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs rename to iroha_ffi_derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs diff --git a/iroha_ffi/derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr b/iroha_ffi_derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr rename to iroha_ffi_derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr diff --git a/iroha_ffi/derive/tests/ui_fail/nested_owned_structure.rs b/iroha_ffi_derive/tests/ui_fail/nested_owned_structure.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/nested_owned_structure.rs rename to iroha_ffi_derive/tests/ui_fail/nested_owned_structure.rs diff --git a/iroha_ffi/derive/tests/ui_fail/nested_owned_structure.stderr b/iroha_ffi_derive/tests/ui_fail/nested_owned_structure.stderr similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/nested_owned_structure.stderr rename to iroha_ffi_derive/tests/ui_fail/nested_owned_structure.stderr diff --git a/iroha_ffi/derive/tests/ui_fail/non_robust_repr_c.rs b/iroha_ffi_derive/tests/ui_fail/non_robust_repr_c.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/non_robust_repr_c.rs rename to iroha_ffi_derive/tests/ui_fail/non_robust_repr_c.rs diff --git a/iroha_ffi/derive/tests/ui_fail/non_robust_repr_c.stderr b/iroha_ffi_derive/tests/ui_fail/non_robust_repr_c.stderr similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/non_robust_repr_c.stderr rename to iroha_ffi_derive/tests/ui_fail/non_robust_repr_c.stderr diff --git a/iroha_ffi/derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs b/iroha_ffi_derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs rename to iroha_ffi_derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs diff --git a/iroha_ffi/derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr b/iroha_ffi_derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr rename to iroha_ffi_derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr diff --git a/iroha_ffi/derive/tests/ui_fail/raw_pointer_type.rs b/iroha_ffi_derive/tests/ui_fail/raw_pointer_type.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/raw_pointer_type.rs rename to iroha_ffi_derive/tests/ui_fail/raw_pointer_type.rs diff --git a/iroha_ffi/derive/tests/ui_fail/raw_pointer_type.stderr b/iroha_ffi_derive/tests/ui_fail/raw_pointer_type.stderr similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/raw_pointer_type.stderr rename to iroha_ffi_derive/tests/ui_fail/raw_pointer_type.stderr diff --git a/iroha_ffi/derive/tests/ui_fail/uninhabited_enum.rs b/iroha_ffi_derive/tests/ui_fail/uninhabited_enum.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/uninhabited_enum.rs rename to iroha_ffi_derive/tests/ui_fail/uninhabited_enum.rs diff --git a/iroha_ffi/derive/tests/ui_fail/uninhabited_enum.stderr b/iroha_ffi_derive/tests/ui_fail/uninhabited_enum.stderr similarity index 100% rename from iroha_ffi/derive/tests/ui_fail/uninhabited_enum.stderr rename to iroha_ffi_derive/tests/ui_fail/uninhabited_enum.stderr diff --git a/iroha_ffi/derive/tests/ui_pass/ffi_export_arg_pattern.rs b/iroha_ffi_derive/tests/ui_pass/ffi_export_arg_pattern.rs similarity index 100% rename from iroha_ffi/derive/tests/ui_pass/ffi_export_arg_pattern.rs rename to iroha_ffi_derive/tests/ui_pass/ffi_export_arg_pattern.rs From cd98d9b7ae2db511dfb0975be60a0b6e51eb00c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 10:57:58 +0400 Subject: [PATCH 40/59] refactor: unnest `iroha_futures_derive` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 2 +- iroha_futures/Cargo.toml | 2 +- {iroha_futures/derive => iroha_futures_derive}/Cargo.toml | 0 {iroha_futures/derive => iroha_futures_derive}/src/lib.rs | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename {iroha_futures/derive => iroha_futures_derive}/Cargo.toml (100%) rename {iroha_futures/derive => iroha_futures_derive}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 07a43c5d008..deacb1a98a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -207,7 +207,7 @@ members = [ "iroha_logger", "iroha_p2p", "iroha_futures", - "iroha_futures/derive", + "iroha_futures_derive", "iroha_primitives", "iroha_primitives/derive", "iroha_primitives/numeric", diff --git a/iroha_futures/Cargo.toml b/iroha_futures/Cargo.toml index 7b295c6c75c..4e4bc86d882 100644 --- a/iroha_futures/Cargo.toml +++ b/iroha_futures/Cargo.toml @@ -16,7 +16,7 @@ default = [] telemetry = ["iroha_futures_derive/telemetry"] [dependencies] -iroha_futures_derive = { path = "derive" } +iroha_futures_derive = { path = "../iroha_futures_derive" } iroha_config = { workspace = true } iroha_logger = { workspace = true } diff --git a/iroha_futures/derive/Cargo.toml b/iroha_futures_derive/Cargo.toml similarity index 100% rename from iroha_futures/derive/Cargo.toml rename to iroha_futures_derive/Cargo.toml diff --git a/iroha_futures/derive/src/lib.rs b/iroha_futures_derive/src/lib.rs similarity index 100% rename from iroha_futures/derive/src/lib.rs rename to iroha_futures_derive/src/lib.rs From 85a97706d145820eb2b53004cfd10765400eb69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 11:03:27 +0400 Subject: [PATCH 41/59] refactor: unnest `iroha_executor` satellite crates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 8 ++++---- iroha_executor/Cargo.toml | 2 +- .../data_model => iroha_executor_data_model}/Cargo.toml | 2 +- .../data_model => iroha_executor_data_model}/src/lib.rs | 0 .../src/parameter.rs | 0 .../src/permission.rs | 0 .../Cargo.toml | 0 .../src/lib.rs | 0 .../src/parameter.rs | 0 .../src/permission.rs | 0 .../derive => iroha_executor_derive}/Cargo.toml | 0 .../derive => iroha_executor_derive}/src/default.rs | 0 .../derive => iroha_executor_derive}/src/entrypoint.rs | 0 .../derive => iroha_executor_derive}/src/lib.rs | 0 wasm_samples/Cargo.toml | 2 +- 15 files changed, 7 insertions(+), 7 deletions(-) rename {iroha_executor/data_model => iroha_executor_data_model}/Cargo.toml (78%) rename {iroha_executor/data_model => iroha_executor_data_model}/src/lib.rs (100%) rename {iroha_executor/data_model => iroha_executor_data_model}/src/parameter.rs (100%) rename {iroha_executor/data_model => iroha_executor_data_model}/src/permission.rs (100%) rename {iroha_executor/data_model/derive => iroha_executor_data_model_derive}/Cargo.toml (100%) rename {iroha_executor/data_model/derive => iroha_executor_data_model_derive}/src/lib.rs (100%) rename {iroha_executor/data_model/derive => iroha_executor_data_model_derive}/src/parameter.rs (100%) rename {iroha_executor/data_model/derive => iroha_executor_data_model_derive}/src/permission.rs (100%) rename {iroha_executor/derive => iroha_executor_derive}/Cargo.toml (100%) rename {iroha_executor/derive => iroha_executor_derive}/src/default.rs (100%) rename {iroha_executor/derive => iroha_executor_derive}/src/entrypoint.rs (100%) rename {iroha_executor/derive => iroha_executor_derive}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index deacb1a98a4..17f324b6dbc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "iroha_smart_contract iroha_smart_contract_utils = { version = "=2.0.0-rc.1.0", path = "iroha_smart_contract/utils" } iroha_executor = { version = "=2.0.0-rc.1.0", path = "iroha_executor" } -iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_executor/data_model" } +iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_executor_data_model" } iroha_test_network = { version = "=2.0.0-rc.1.0", path = "iroha_test_network" } iroha_test_samples = { version = "=2.0.0-rc.1.0", path = "iroha_test_samples" } @@ -222,9 +222,9 @@ members = [ "iroha_trigger", "iroha_trigger/derive", "iroha_executor", - "iroha_executor/derive", - "iroha_executor/data_model", - "iroha_executor/data_model/derive", + "iroha_executor_derive", + "iroha_executor_data_model", + "iroha_executor_data_model_derive", "iroha_telemetry", "iroha_test_samples", "iroha_swarm", diff --git a/iroha_executor/Cargo.toml b/iroha_executor/Cargo.toml index f10251c5425..40f012a1dad 100644 --- a/iroha_executor/Cargo.toml +++ b/iroha_executor/Cargo.toml @@ -14,7 +14,7 @@ workspace = true debug = ["iroha_smart_contract/debug"] [dependencies] -iroha_executor_derive = { path = "derive" } +iroha_executor_derive = { path = "../iroha_executor_derive" } iroha_executor_data_model.workspace = true iroha_smart_contract_utils.workspace = true diff --git a/iroha_executor/data_model/Cargo.toml b/iroha_executor_data_model/Cargo.toml similarity index 78% rename from iroha_executor/data_model/Cargo.toml rename to iroha_executor_data_model/Cargo.toml index 94624d2c295..4627792101d 100644 --- a/iroha_executor/data_model/Cargo.toml +++ b/iroha_executor_data_model/Cargo.toml @@ -11,7 +11,7 @@ license.workspace = true workspace = true [dependencies] -iroha_executor_data_model_derive = { path = "derive" } +iroha_executor_data_model_derive = { path = "../iroha_executor_data_model_derive" } iroha_data_model.workspace = true iroha_schema.workspace = true diff --git a/iroha_executor/data_model/src/lib.rs b/iroha_executor_data_model/src/lib.rs similarity index 100% rename from iroha_executor/data_model/src/lib.rs rename to iroha_executor_data_model/src/lib.rs diff --git a/iroha_executor/data_model/src/parameter.rs b/iroha_executor_data_model/src/parameter.rs similarity index 100% rename from iroha_executor/data_model/src/parameter.rs rename to iroha_executor_data_model/src/parameter.rs diff --git a/iroha_executor/data_model/src/permission.rs b/iroha_executor_data_model/src/permission.rs similarity index 100% rename from iroha_executor/data_model/src/permission.rs rename to iroha_executor_data_model/src/permission.rs diff --git a/iroha_executor/data_model/derive/Cargo.toml b/iroha_executor_data_model_derive/Cargo.toml similarity index 100% rename from iroha_executor/data_model/derive/Cargo.toml rename to iroha_executor_data_model_derive/Cargo.toml diff --git a/iroha_executor/data_model/derive/src/lib.rs b/iroha_executor_data_model_derive/src/lib.rs similarity index 100% rename from iroha_executor/data_model/derive/src/lib.rs rename to iroha_executor_data_model_derive/src/lib.rs diff --git a/iroha_executor/data_model/derive/src/parameter.rs b/iroha_executor_data_model_derive/src/parameter.rs similarity index 100% rename from iroha_executor/data_model/derive/src/parameter.rs rename to iroha_executor_data_model_derive/src/parameter.rs diff --git a/iroha_executor/data_model/derive/src/permission.rs b/iroha_executor_data_model_derive/src/permission.rs similarity index 100% rename from iroha_executor/data_model/derive/src/permission.rs rename to iroha_executor_data_model_derive/src/permission.rs diff --git a/iroha_executor/derive/Cargo.toml b/iroha_executor_derive/Cargo.toml similarity index 100% rename from iroha_executor/derive/Cargo.toml rename to iroha_executor_derive/Cargo.toml diff --git a/iroha_executor/derive/src/default.rs b/iroha_executor_derive/src/default.rs similarity index 100% rename from iroha_executor/derive/src/default.rs rename to iroha_executor_derive/src/default.rs diff --git a/iroha_executor/derive/src/entrypoint.rs b/iroha_executor_derive/src/entrypoint.rs similarity index 100% rename from iroha_executor/derive/src/entrypoint.rs rename to iroha_executor_derive/src/entrypoint.rs diff --git a/iroha_executor/derive/src/lib.rs b/iroha_executor_derive/src/lib.rs similarity index 100% rename from iroha_executor/derive/src/lib.rs rename to iroha_executor_derive/src/lib.rs diff --git a/wasm_samples/Cargo.toml b/wasm_samples/Cargo.toml index 54d24f4ceed..02e8fe79fde 100644 --- a/wasm_samples/Cargo.toml +++ b/wasm_samples/Cargo.toml @@ -45,7 +45,7 @@ iroha_trigger = { version = "=2.0.0-rc.1.0", path = "../iroha_trigger", features iroha_executor = { version = "=2.0.0-rc.1.0", path = "../iroha_executor", features = ["debug"] } iroha_schema = { version = "=2.0.0-rc.1.0", path = "../iroha_schema" } iroha_data_model = { version = "=2.0.0-rc.1.0", path = "../iroha_data_model", default-features = false } -iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "../iroha_executor/data_model" } +iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "../iroha_executor_data_model" } parity-scale-codec = { version = "3.2.1", default-features = false } anyhow = { version = "1.0.71", default-features = false } From dcf6a0b0235ea539480eb3d8fd35144202dea96d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 11:07:47 +0400 Subject: [PATCH 42/59] refactor: unnest `iroha_macro` satellite crates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 2 +- {iroha_macro/derive => iroha_derive}/Cargo.toml | 0 {iroha_macro/derive => iroha_derive}/src/lib.rs | 0 .../tests/container_enum_from_variant.rs | 0 .../derive => iroha_derive}/tests/enum_from_variant_attrs.rs | 0 {iroha_macro/derive => iroha_derive}/tests/ui.rs | 0 .../tests/ui_fail/from_variant_conflicting_implementation.rs | 0 .../ui_fail/from_variant_conflicting_implementation.stderr | 0 .../tests/ui_fail/from_variant_incorrect_attr_placement.rs | 0 .../tests/ui_fail/from_variant_incorrect_attr_placement.stderr | 0 .../tests/ui_fail/from_variant_same_type.rs | 0 .../tests/ui_fail/from_variant_same_type.stderr | 0 .../tests/ui_fail/struct_from_variant.rs | 0 .../tests/ui_fail/struct_from_variant.stderr | 0 .../derive => iroha_derive}/tests/ui_pass/enum_from_variant.rs | 0 iroha_macro/Cargo.toml | 2 +- {iroha_macro/utils => iroha_macro_utils}/Cargo.toml | 0 {iroha_macro/utils => iroha_macro_utils}/src/emitter.rs | 0 {iroha_macro/utils => iroha_macro_utils}/src/lib.rs | 0 19 files changed, 2 insertions(+), 2 deletions(-) rename {iroha_macro/derive => iroha_derive}/Cargo.toml (100%) rename {iroha_macro/derive => iroha_derive}/src/lib.rs (100%) rename {iroha_macro/derive => iroha_derive}/tests/container_enum_from_variant.rs (100%) rename {iroha_macro/derive => iroha_derive}/tests/enum_from_variant_attrs.rs (100%) rename {iroha_macro/derive => iroha_derive}/tests/ui.rs (100%) rename {iroha_macro/derive => iroha_derive}/tests/ui_fail/from_variant_conflicting_implementation.rs (100%) rename {iroha_macro/derive => iroha_derive}/tests/ui_fail/from_variant_conflicting_implementation.stderr (100%) rename {iroha_macro/derive => iroha_derive}/tests/ui_fail/from_variant_incorrect_attr_placement.rs (100%) rename {iroha_macro/derive => iroha_derive}/tests/ui_fail/from_variant_incorrect_attr_placement.stderr (100%) rename {iroha_macro/derive => iroha_derive}/tests/ui_fail/from_variant_same_type.rs (100%) rename {iroha_macro/derive => iroha_derive}/tests/ui_fail/from_variant_same_type.stderr (100%) rename {iroha_macro/derive => iroha_derive}/tests/ui_fail/struct_from_variant.rs (100%) rename {iroha_macro/derive => iroha_derive}/tests/ui_fail/struct_from_variant.stderr (100%) rename {iroha_macro/derive => iroha_derive}/tests/ui_pass/enum_from_variant.rs (100%) rename {iroha_macro/utils => iroha_macro_utils}/Cargo.toml (100%) rename {iroha_macro/utils => iroha_macro_utils}/src/emitter.rs (100%) rename {iroha_macro/utils => iroha_macro_utils}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 17f324b6dbc..25c7203ec6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ iroha_torii_const = { version = "=2.0.0-rc.1.0", path = "iroha_torii/const" } iroha = { version = "=2.0.0-rc.1.0", path = "iroha" } -iroha_macro_utils = { version = "=2.0.0-rc.1.0", path = "iroha_macro/utils" } +iroha_macro_utils = { version = "=2.0.0-rc.1.0", path = "iroha_macro_utils" } iroha_telemetry = { version = "=2.0.0-rc.1.0", path = "iroha_telemetry" } iroha_p2p = { version = "=2.0.0-rc.1.0", path = "iroha_p2p" } iroha_primitives = { version = "=2.0.0-rc.1.0", path = "iroha_primitives", default-features = false } diff --git a/iroha_macro/derive/Cargo.toml b/iroha_derive/Cargo.toml similarity index 100% rename from iroha_macro/derive/Cargo.toml rename to iroha_derive/Cargo.toml diff --git a/iroha_macro/derive/src/lib.rs b/iroha_derive/src/lib.rs similarity index 100% rename from iroha_macro/derive/src/lib.rs rename to iroha_derive/src/lib.rs diff --git a/iroha_macro/derive/tests/container_enum_from_variant.rs b/iroha_derive/tests/container_enum_from_variant.rs similarity index 100% rename from iroha_macro/derive/tests/container_enum_from_variant.rs rename to iroha_derive/tests/container_enum_from_variant.rs diff --git a/iroha_macro/derive/tests/enum_from_variant_attrs.rs b/iroha_derive/tests/enum_from_variant_attrs.rs similarity index 100% rename from iroha_macro/derive/tests/enum_from_variant_attrs.rs rename to iroha_derive/tests/enum_from_variant_attrs.rs diff --git a/iroha_macro/derive/tests/ui.rs b/iroha_derive/tests/ui.rs similarity index 100% rename from iroha_macro/derive/tests/ui.rs rename to iroha_derive/tests/ui.rs diff --git a/iroha_macro/derive/tests/ui_fail/from_variant_conflicting_implementation.rs b/iroha_derive/tests/ui_fail/from_variant_conflicting_implementation.rs similarity index 100% rename from iroha_macro/derive/tests/ui_fail/from_variant_conflicting_implementation.rs rename to iroha_derive/tests/ui_fail/from_variant_conflicting_implementation.rs diff --git a/iroha_macro/derive/tests/ui_fail/from_variant_conflicting_implementation.stderr b/iroha_derive/tests/ui_fail/from_variant_conflicting_implementation.stderr similarity index 100% rename from iroha_macro/derive/tests/ui_fail/from_variant_conflicting_implementation.stderr rename to iroha_derive/tests/ui_fail/from_variant_conflicting_implementation.stderr diff --git a/iroha_macro/derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs b/iroha_derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs similarity index 100% rename from iroha_macro/derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs rename to iroha_derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs diff --git a/iroha_macro/derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr b/iroha_derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr similarity index 100% rename from iroha_macro/derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr rename to iroha_derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr diff --git a/iroha_macro/derive/tests/ui_fail/from_variant_same_type.rs b/iroha_derive/tests/ui_fail/from_variant_same_type.rs similarity index 100% rename from iroha_macro/derive/tests/ui_fail/from_variant_same_type.rs rename to iroha_derive/tests/ui_fail/from_variant_same_type.rs diff --git a/iroha_macro/derive/tests/ui_fail/from_variant_same_type.stderr b/iroha_derive/tests/ui_fail/from_variant_same_type.stderr similarity index 100% rename from iroha_macro/derive/tests/ui_fail/from_variant_same_type.stderr rename to iroha_derive/tests/ui_fail/from_variant_same_type.stderr diff --git a/iroha_macro/derive/tests/ui_fail/struct_from_variant.rs b/iroha_derive/tests/ui_fail/struct_from_variant.rs similarity index 100% rename from iroha_macro/derive/tests/ui_fail/struct_from_variant.rs rename to iroha_derive/tests/ui_fail/struct_from_variant.rs diff --git a/iroha_macro/derive/tests/ui_fail/struct_from_variant.stderr b/iroha_derive/tests/ui_fail/struct_from_variant.stderr similarity index 100% rename from iroha_macro/derive/tests/ui_fail/struct_from_variant.stderr rename to iroha_derive/tests/ui_fail/struct_from_variant.stderr diff --git a/iroha_macro/derive/tests/ui_pass/enum_from_variant.rs b/iroha_derive/tests/ui_pass/enum_from_variant.rs similarity index 100% rename from iroha_macro/derive/tests/ui_pass/enum_from_variant.rs rename to iroha_derive/tests/ui_pass/enum_from_variant.rs diff --git a/iroha_macro/Cargo.toml b/iroha_macro/Cargo.toml index 2c184b9f378..a53f0bc8672 100644 --- a/iroha_macro/Cargo.toml +++ b/iroha_macro/Cargo.toml @@ -22,4 +22,4 @@ default = ["std"] std = [] [dependencies] -iroha_derive = { path = "derive" } +iroha_derive = { path = "../iroha_derive" } diff --git a/iroha_macro/utils/Cargo.toml b/iroha_macro_utils/Cargo.toml similarity index 100% rename from iroha_macro/utils/Cargo.toml rename to iroha_macro_utils/Cargo.toml diff --git a/iroha_macro/utils/src/emitter.rs b/iroha_macro_utils/src/emitter.rs similarity index 100% rename from iroha_macro/utils/src/emitter.rs rename to iroha_macro_utils/src/emitter.rs diff --git a/iroha_macro/utils/src/lib.rs b/iroha_macro_utils/src/lib.rs similarity index 100% rename from iroha_macro/utils/src/lib.rs rename to iroha_macro_utils/src/lib.rs From a99c2053dfed25c3474defc3035618a05729cc32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 11:09:33 +0400 Subject: [PATCH 43/59] refactor: unnest `iroha_primitives` satellite crates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 4 ++-- {iroha_primitives/numeric => iroha_numeric}/Cargo.toml | 0 {iroha_primitives/numeric => iroha_numeric}/src/lib.rs | 0 iroha_primitives/Cargo.toml | 4 ++-- .../derive => iroha_primitives_derive}/Cargo.toml | 4 ++-- .../derive => iroha_primitives_derive}/src/lib.rs | 0 .../derive => iroha_primitives_derive}/src/numeric.rs | 0 .../derive => iroha_primitives_derive}/src/socket_addr.rs | 0 8 files changed, 6 insertions(+), 6 deletions(-) rename {iroha_primitives/numeric => iroha_numeric}/Cargo.toml (100%) rename {iroha_primitives/numeric => iroha_numeric}/src/lib.rs (100%) rename {iroha_primitives/derive => iroha_primitives_derive}/Cargo.toml (74%) rename {iroha_primitives/derive => iroha_primitives_derive}/src/lib.rs (100%) rename {iroha_primitives/derive => iroha_primitives_derive}/src/numeric.rs (100%) rename {iroha_primitives/derive => iroha_primitives_derive}/src/socket_addr.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 25c7203ec6d..fb42c93b7ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -209,8 +209,8 @@ members = [ "iroha_futures", "iroha_futures_derive", "iroha_primitives", - "iroha_primitives/derive", - "iroha_primitives/numeric", + "iroha_primitives_derive", + "iroha_numeric", "iroha_ffi", "iroha_ffi_derive", "iroha_schema", diff --git a/iroha_primitives/numeric/Cargo.toml b/iroha_numeric/Cargo.toml similarity index 100% rename from iroha_primitives/numeric/Cargo.toml rename to iroha_numeric/Cargo.toml diff --git a/iroha_primitives/numeric/src/lib.rs b/iroha_numeric/src/lib.rs similarity index 100% rename from iroha_primitives/numeric/src/lib.rs rename to iroha_numeric/src/lib.rs diff --git a/iroha_primitives/Cargo.toml b/iroha_primitives/Cargo.toml index 9576da88f09..cea4f0efd2c 100644 --- a/iroha_primitives/Cargo.toml +++ b/iroha_primitives/Cargo.toml @@ -27,12 +27,12 @@ std = ["iroha_macro/std", "thiserror", "displaydoc/std", "iroha_numeric/std", "p ffi_export = ["std", "iroha_ffi", "iroha_numeric/ffi_export"] [dependencies] -iroha_primitives_derive = { path = "derive" } +iroha_primitives_derive = { path = "../iroha_primitives_derive" } iroha_macro = { workspace = true } iroha_schema = { workspace = true } iroha_ffi = { workspace = true, optional = true } -iroha_numeric = { path = "./numeric", default-features = false } +iroha_numeric = { path = "../iroha_numeric", default-features = false } parity-scale-codec = { workspace = true, features = ["derive"] } derive_more = { workspace = true, features = ["display", "from", "as_ref", "as_mut", "deref", "constructor", "into_iterator"] } diff --git a/iroha_primitives/derive/Cargo.toml b/iroha_primitives_derive/Cargo.toml similarity index 74% rename from iroha_primitives/derive/Cargo.toml rename to iroha_primitives_derive/Cargo.toml index d6e018172a7..b94e1675168 100644 --- a/iroha_primitives/derive/Cargo.toml +++ b/iroha_primitives_derive/Cargo.toml @@ -15,8 +15,8 @@ quote = { workspace = true } syn = { workspace = true } manyhow = { workspace = true } proc-macro2 = { workspace = true } -iroha_numeric = { path = "../numeric", default-features = false } +iroha_numeric = { path = "../iroha_numeric", default-features = false } [dev-dependencies] # needed for doc-tests to pass -iroha_primitives = { path = ".." } +iroha_primitives = { path = "../iroha_primitives" } diff --git a/iroha_primitives/derive/src/lib.rs b/iroha_primitives_derive/src/lib.rs similarity index 100% rename from iroha_primitives/derive/src/lib.rs rename to iroha_primitives_derive/src/lib.rs diff --git a/iroha_primitives/derive/src/numeric.rs b/iroha_primitives_derive/src/numeric.rs similarity index 100% rename from iroha_primitives/derive/src/numeric.rs rename to iroha_primitives_derive/src/numeric.rs diff --git a/iroha_primitives/derive/src/socket_addr.rs b/iroha_primitives_derive/src/socket_addr.rs similarity index 100% rename from iroha_primitives/derive/src/socket_addr.rs rename to iroha_primitives_derive/src/socket_addr.rs From 8d5bf2ba84b29eb13579055f7a8bba0d7f8f784b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 11:11:09 +0400 Subject: [PATCH 44/59] refactor: unnest `iroha_schema` satellite crates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 6 +++--- iroha_schema/Cargo.toml | 2 +- {iroha_schema/derive => iroha_schema_derive}/Cargo.toml | 0 {iroha_schema/derive => iroha_schema_derive}/src/lib.rs | 0 {iroha_schema/derive => iroha_schema_derive}/tests/ui.rs | 0 .../ui_fail/fieldless_enum_with_explicit_discriminant.rs | 0 .../fieldless_enum_with_explicit_discriminant.stderr | 0 .../tests/ui_pass/derive_into_schema.rs | 0 {iroha_schema/gen => iroha_schema_gen}/Cargo.toml | 0 {iroha_schema/gen => iroha_schema_gen}/src/lib.rs | 0 10 files changed, 4 insertions(+), 4 deletions(-) rename {iroha_schema/derive => iroha_schema_derive}/Cargo.toml (100%) rename {iroha_schema/derive => iroha_schema_derive}/src/lib.rs (100%) rename {iroha_schema/derive => iroha_schema_derive}/tests/ui.rs (100%) rename {iroha_schema/derive => iroha_schema_derive}/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs (100%) rename {iroha_schema/derive => iroha_schema_derive}/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr (100%) rename {iroha_schema/derive => iroha_schema_derive}/tests/ui_pass/derive_into_schema.rs (100%) rename {iroha_schema/gen => iroha_schema_gen}/Cargo.toml (100%) rename {iroha_schema/gen => iroha_schema_gen}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index fb42c93b7ec..11e7540ec2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ iroha_primitives = { version = "=2.0.0-rc.1.0", path = "iroha_primitives", defau iroha_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_data_model", default-features = false } iroha_config = { version = "=2.0.0-rc.1.0", path = "iroha_config" } iroha_config_base = { version = "=2.0.0-rc.1.0", path = "iroha_config_base" } -iroha_schema_gen = { version = "=2.0.0-rc.1.0", path = "iroha_schema/gen" } +iroha_schema_gen = { version = "=2.0.0-rc.1.0", path = "iroha_schema_gen" } iroha_schema = { version = "=2.0.0-rc.1.0", path = "iroha_schema", default-features = false } iroha_logger = { version = "=2.0.0-rc.1.0", path = "iroha_logger" } iroha_crypto = { version = "=2.0.0-rc.1.0", path = "iroha_crypto", default-features = false } @@ -214,8 +214,8 @@ members = [ "iroha_ffi", "iroha_ffi_derive", "iroha_schema", - "iroha_schema/gen", - "iroha_schema/derive", + "iroha_schema_gen", + "iroha_schema_derive", "iroha_smart_contract", "iroha_smart_contract/derive", "iroha_smart_contract/utils", diff --git a/iroha_schema/Cargo.toml b/iroha_schema/Cargo.toml index 311d2ed4dc7..ebe7518703a 100644 --- a/iroha_schema/Cargo.toml +++ b/iroha_schema/Cargo.toml @@ -11,7 +11,7 @@ license.workspace = true workspace = true [dependencies] -iroha_schema_derive = { path = "derive" } +iroha_schema_derive = { path = "../iroha_schema_derive" } serde = { workspace = true, features = ["derive", "alloc"] } diff --git a/iroha_schema/derive/Cargo.toml b/iroha_schema_derive/Cargo.toml similarity index 100% rename from iroha_schema/derive/Cargo.toml rename to iroha_schema_derive/Cargo.toml diff --git a/iroha_schema/derive/src/lib.rs b/iroha_schema_derive/src/lib.rs similarity index 100% rename from iroha_schema/derive/src/lib.rs rename to iroha_schema_derive/src/lib.rs diff --git a/iroha_schema/derive/tests/ui.rs b/iroha_schema_derive/tests/ui.rs similarity index 100% rename from iroha_schema/derive/tests/ui.rs rename to iroha_schema_derive/tests/ui.rs diff --git a/iroha_schema/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs b/iroha_schema_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs similarity index 100% rename from iroha_schema/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs rename to iroha_schema_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs diff --git a/iroha_schema/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr b/iroha_schema_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr similarity index 100% rename from iroha_schema/derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr rename to iroha_schema_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr diff --git a/iroha_schema/derive/tests/ui_pass/derive_into_schema.rs b/iroha_schema_derive/tests/ui_pass/derive_into_schema.rs similarity index 100% rename from iroha_schema/derive/tests/ui_pass/derive_into_schema.rs rename to iroha_schema_derive/tests/ui_pass/derive_into_schema.rs diff --git a/iroha_schema/gen/Cargo.toml b/iroha_schema_gen/Cargo.toml similarity index 100% rename from iroha_schema/gen/Cargo.toml rename to iroha_schema_gen/Cargo.toml diff --git a/iroha_schema/gen/src/lib.rs b/iroha_schema_gen/src/lib.rs similarity index 100% rename from iroha_schema/gen/src/lib.rs rename to iroha_schema_gen/src/lib.rs From 5a624233c431e9f9966d755b4ed8dc69f53435b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 11:12:11 +0400 Subject: [PATCH 45/59] refactor: unnest `iroha_smart_contract` satellite crates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 6 +++--- iroha_smart_contract/Cargo.toml | 2 +- .../derive => iroha_smart_contract_derive}/Cargo.toml | 0 .../src/entrypoint.rs | 0 .../derive => iroha_smart_contract_derive}/src/lib.rs | 0 .../utils => iroha_smart_contract_utils}/Cargo.toml | 0 .../utils => iroha_smart_contract_utils}/src/debug.rs | 0 .../utils => iroha_smart_contract_utils}/src/lib.rs | 0 .../utils => iroha_smart_contract_utils}/src/log.rs | 0 9 files changed, 4 insertions(+), 4 deletions(-) rename {iroha_smart_contract/derive => iroha_smart_contract_derive}/Cargo.toml (100%) rename {iroha_smart_contract/derive => iroha_smart_contract_derive}/src/entrypoint.rs (100%) rename {iroha_smart_contract/derive => iroha_smart_contract_derive}/src/lib.rs (100%) rename {iroha_smart_contract/utils => iroha_smart_contract_utils}/Cargo.toml (100%) rename {iroha_smart_contract/utils => iroha_smart_contract_utils}/src/debug.rs (100%) rename {iroha_smart_contract/utils => iroha_smart_contract_utils}/src/lib.rs (100%) rename {iroha_smart_contract/utils => iroha_smart_contract_utils}/src/log.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 11e7540ec2d..c63f5aa19c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ iroha_wasm_codec = { version = "=2.0.0-rc.1.0", path = "iroha_wasm_codec" } iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "iroha_wasm_builder" } iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "iroha_smart_contract" } -iroha_smart_contract_utils = { version = "=2.0.0-rc.1.0", path = "iroha_smart_contract/utils" } +iroha_smart_contract_utils = { version = "=2.0.0-rc.1.0", path = "iroha_smart_contract_utils" } iroha_executor = { version = "=2.0.0-rc.1.0", path = "iroha_executor" } iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_executor_data_model" } @@ -217,8 +217,8 @@ members = [ "iroha_schema_gen", "iroha_schema_derive", "iroha_smart_contract", - "iroha_smart_contract/derive", - "iroha_smart_contract/utils", + "iroha_smart_contract_derive", + "iroha_smart_contract_utils", "iroha_trigger", "iroha_trigger/derive", "iroha_executor", diff --git a/iroha_smart_contract/Cargo.toml b/iroha_smart_contract/Cargo.toml index 128f8bae302..4b2220c2e75 100644 --- a/iroha_smart_contract/Cargo.toml +++ b/iroha_smart_contract/Cargo.toml @@ -15,7 +15,7 @@ workspace = true debug = ["iroha_smart_contract_utils/debug"] [dependencies] -iroha_smart_contract_derive = { path = "derive" } +iroha_smart_contract_derive = { path = "../iroha_smart_contract_derive" } iroha_macro.workspace = true iroha_data_model.workspace = true diff --git a/iroha_smart_contract/derive/Cargo.toml b/iroha_smart_contract_derive/Cargo.toml similarity index 100% rename from iroha_smart_contract/derive/Cargo.toml rename to iroha_smart_contract_derive/Cargo.toml diff --git a/iroha_smart_contract/derive/src/entrypoint.rs b/iroha_smart_contract_derive/src/entrypoint.rs similarity index 100% rename from iroha_smart_contract/derive/src/entrypoint.rs rename to iroha_smart_contract_derive/src/entrypoint.rs diff --git a/iroha_smart_contract/derive/src/lib.rs b/iroha_smart_contract_derive/src/lib.rs similarity index 100% rename from iroha_smart_contract/derive/src/lib.rs rename to iroha_smart_contract_derive/src/lib.rs diff --git a/iroha_smart_contract/utils/Cargo.toml b/iroha_smart_contract_utils/Cargo.toml similarity index 100% rename from iroha_smart_contract/utils/Cargo.toml rename to iroha_smart_contract_utils/Cargo.toml diff --git a/iroha_smart_contract/utils/src/debug.rs b/iroha_smart_contract_utils/src/debug.rs similarity index 100% rename from iroha_smart_contract/utils/src/debug.rs rename to iroha_smart_contract_utils/src/debug.rs diff --git a/iroha_smart_contract/utils/src/lib.rs b/iroha_smart_contract_utils/src/lib.rs similarity index 100% rename from iroha_smart_contract/utils/src/lib.rs rename to iroha_smart_contract_utils/src/lib.rs diff --git a/iroha_smart_contract/utils/src/log.rs b/iroha_smart_contract_utils/src/log.rs similarity index 100% rename from iroha_smart_contract/utils/src/log.rs rename to iroha_smart_contract_utils/src/log.rs From 27ce947a627d56d7f7815bf8f44e56044e8ed108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 11:12:52 +0400 Subject: [PATCH 46/59] refactor: unnest `iroha_telemetry` satellite crates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- iroha_telemetry/Cargo.toml | 2 +- {iroha_telemetry/derive => iroha_telemetry_derive}/Cargo.toml | 0 {iroha_telemetry/derive => iroha_telemetry_derive}/src/lib.rs | 0 {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui.rs | 0 .../tests/ui_fail/args_no_wsv.rs | 0 .../tests/ui_fail/args_no_wsv.stderr | 0 .../tests/ui_fail/bare_spec.rs | 0 .../tests/ui_fail/bare_spec.stderr | 0 .../tests/ui_fail/doubled_plus.rs | 0 .../tests/ui_fail/doubled_plus.stderr | 0 .../derive => iroha_telemetry_derive}/tests/ui_fail/no_args.rs | 0 .../tests/ui_fail/no_args.stderr | 0 .../tests/ui_fail/non_snake_case_name.rs | 0 .../tests/ui_fail/non_snake_case_name.stderr | 0 .../tests/ui_fail/not_execute.rs | 0 .../tests/ui_fail/not_execute.stderr | 0 .../tests/ui_fail/not_return_result.rs | 0 .../tests/ui_fail/not_return_result.stderr | 0 .../tests/ui_fail/return_nothing.rs | 0 .../tests/ui_fail/return_nothing.stderr | 0 .../tests/ui_fail/trailing_plus.rs | 0 .../tests/ui_fail/trailing_plus.stderr | 0 22 files changed, 1 insertion(+), 1 deletion(-) rename {iroha_telemetry/derive => iroha_telemetry_derive}/Cargo.toml (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/src/lib.rs (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui.rs (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/args_no_wsv.rs (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/args_no_wsv.stderr (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/bare_spec.rs (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/bare_spec.stderr (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/doubled_plus.rs (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/doubled_plus.stderr (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/no_args.rs (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/no_args.stderr (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/non_snake_case_name.rs (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/non_snake_case_name.stderr (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/not_execute.rs (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/not_execute.stderr (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/not_return_result.rs (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/not_return_result.stderr (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/return_nothing.rs (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/return_nothing.stderr (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/trailing_plus.rs (100%) rename {iroha_telemetry/derive => iroha_telemetry_derive}/tests/ui_fail/trailing_plus.stderr (100%) diff --git a/iroha_telemetry/Cargo.toml b/iroha_telemetry/Cargo.toml index f5b99948193..0688b839cf7 100644 --- a/iroha_telemetry/Cargo.toml +++ b/iroha_telemetry/Cargo.toml @@ -18,7 +18,7 @@ dev-telemetry = [] metric-instrumentation = [] [dependencies] -iroha_telemetry_derive = { path = "derive" } +iroha_telemetry_derive = { path = "../iroha_telemetry_derive" } iroha_config = { workspace = true } iroha_logger = { workspace = true } diff --git a/iroha_telemetry/derive/Cargo.toml b/iroha_telemetry_derive/Cargo.toml similarity index 100% rename from iroha_telemetry/derive/Cargo.toml rename to iroha_telemetry_derive/Cargo.toml diff --git a/iroha_telemetry/derive/src/lib.rs b/iroha_telemetry_derive/src/lib.rs similarity index 100% rename from iroha_telemetry/derive/src/lib.rs rename to iroha_telemetry_derive/src/lib.rs diff --git a/iroha_telemetry/derive/tests/ui.rs b/iroha_telemetry_derive/tests/ui.rs similarity index 100% rename from iroha_telemetry/derive/tests/ui.rs rename to iroha_telemetry_derive/tests/ui.rs diff --git a/iroha_telemetry/derive/tests/ui_fail/args_no_wsv.rs b/iroha_telemetry_derive/tests/ui_fail/args_no_wsv.rs similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/args_no_wsv.rs rename to iroha_telemetry_derive/tests/ui_fail/args_no_wsv.rs diff --git a/iroha_telemetry/derive/tests/ui_fail/args_no_wsv.stderr b/iroha_telemetry_derive/tests/ui_fail/args_no_wsv.stderr similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/args_no_wsv.stderr rename to iroha_telemetry_derive/tests/ui_fail/args_no_wsv.stderr diff --git a/iroha_telemetry/derive/tests/ui_fail/bare_spec.rs b/iroha_telemetry_derive/tests/ui_fail/bare_spec.rs similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/bare_spec.rs rename to iroha_telemetry_derive/tests/ui_fail/bare_spec.rs diff --git a/iroha_telemetry/derive/tests/ui_fail/bare_spec.stderr b/iroha_telemetry_derive/tests/ui_fail/bare_spec.stderr similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/bare_spec.stderr rename to iroha_telemetry_derive/tests/ui_fail/bare_spec.stderr diff --git a/iroha_telemetry/derive/tests/ui_fail/doubled_plus.rs b/iroha_telemetry_derive/tests/ui_fail/doubled_plus.rs similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/doubled_plus.rs rename to iroha_telemetry_derive/tests/ui_fail/doubled_plus.rs diff --git a/iroha_telemetry/derive/tests/ui_fail/doubled_plus.stderr b/iroha_telemetry_derive/tests/ui_fail/doubled_plus.stderr similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/doubled_plus.stderr rename to iroha_telemetry_derive/tests/ui_fail/doubled_plus.stderr diff --git a/iroha_telemetry/derive/tests/ui_fail/no_args.rs b/iroha_telemetry_derive/tests/ui_fail/no_args.rs similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/no_args.rs rename to iroha_telemetry_derive/tests/ui_fail/no_args.rs diff --git a/iroha_telemetry/derive/tests/ui_fail/no_args.stderr b/iroha_telemetry_derive/tests/ui_fail/no_args.stderr similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/no_args.stderr rename to iroha_telemetry_derive/tests/ui_fail/no_args.stderr diff --git a/iroha_telemetry/derive/tests/ui_fail/non_snake_case_name.rs b/iroha_telemetry_derive/tests/ui_fail/non_snake_case_name.rs similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/non_snake_case_name.rs rename to iroha_telemetry_derive/tests/ui_fail/non_snake_case_name.rs diff --git a/iroha_telemetry/derive/tests/ui_fail/non_snake_case_name.stderr b/iroha_telemetry_derive/tests/ui_fail/non_snake_case_name.stderr similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/non_snake_case_name.stderr rename to iroha_telemetry_derive/tests/ui_fail/non_snake_case_name.stderr diff --git a/iroha_telemetry/derive/tests/ui_fail/not_execute.rs b/iroha_telemetry_derive/tests/ui_fail/not_execute.rs similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/not_execute.rs rename to iroha_telemetry_derive/tests/ui_fail/not_execute.rs diff --git a/iroha_telemetry/derive/tests/ui_fail/not_execute.stderr b/iroha_telemetry_derive/tests/ui_fail/not_execute.stderr similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/not_execute.stderr rename to iroha_telemetry_derive/tests/ui_fail/not_execute.stderr diff --git a/iroha_telemetry/derive/tests/ui_fail/not_return_result.rs b/iroha_telemetry_derive/tests/ui_fail/not_return_result.rs similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/not_return_result.rs rename to iroha_telemetry_derive/tests/ui_fail/not_return_result.rs diff --git a/iroha_telemetry/derive/tests/ui_fail/not_return_result.stderr b/iroha_telemetry_derive/tests/ui_fail/not_return_result.stderr similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/not_return_result.stderr rename to iroha_telemetry_derive/tests/ui_fail/not_return_result.stderr diff --git a/iroha_telemetry/derive/tests/ui_fail/return_nothing.rs b/iroha_telemetry_derive/tests/ui_fail/return_nothing.rs similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/return_nothing.rs rename to iroha_telemetry_derive/tests/ui_fail/return_nothing.rs diff --git a/iroha_telemetry/derive/tests/ui_fail/return_nothing.stderr b/iroha_telemetry_derive/tests/ui_fail/return_nothing.stderr similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/return_nothing.stderr rename to iroha_telemetry_derive/tests/ui_fail/return_nothing.stderr diff --git a/iroha_telemetry/derive/tests/ui_fail/trailing_plus.rs b/iroha_telemetry_derive/tests/ui_fail/trailing_plus.rs similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/trailing_plus.rs rename to iroha_telemetry_derive/tests/ui_fail/trailing_plus.rs diff --git a/iroha_telemetry/derive/tests/ui_fail/trailing_plus.stderr b/iroha_telemetry_derive/tests/ui_fail/trailing_plus.stderr similarity index 100% rename from iroha_telemetry/derive/tests/ui_fail/trailing_plus.stderr rename to iroha_telemetry_derive/tests/ui_fail/trailing_plus.stderr From e2f2070ab97c4a281c59f3e236642efac5083339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 11:15:11 +0400 Subject: [PATCH 47/59] refactor: unnest `iroha_torii` satellite crates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 4 ++-- {iroha_torii/const => iroha_torii_const}/Cargo.toml | 0 {iroha_torii/const => iroha_torii_const}/src/lib.rs | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename {iroha_torii/const => iroha_torii_const}/Cargo.toml (100%) rename {iroha_torii/const => iroha_torii_const}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index c63f5aa19c1..2f60a42ebfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ iroha_core = { version = "=2.0.0-rc.1.0 ", path = "iroha_core" } irohad = { version = "=2.0.0-rc.1.0", path = "irohad" } iroha_torii = { version = "=2.0.0-rc.1.0", path = "iroha_torii" } -iroha_torii_const = { version = "=2.0.0-rc.1.0", path = "iroha_torii/const" } +iroha_torii_const = { version = "=2.0.0-rc.1.0", path = "iroha_torii_const" } iroha = { version = "=2.0.0-rc.1.0", path = "iroha" } @@ -233,7 +233,7 @@ members = [ "iroha_codec", "iroha_wasm_test_runner", "iroha_torii", - "iroha_torii/const", + "iroha_torii_const", "iroha_version", "iroha_version/derive", "iroha_wasm_codec", diff --git a/iroha_torii/const/Cargo.toml b/iroha_torii_const/Cargo.toml similarity index 100% rename from iroha_torii/const/Cargo.toml rename to iroha_torii_const/Cargo.toml diff --git a/iroha_torii/const/src/lib.rs b/iroha_torii_const/src/lib.rs similarity index 100% rename from iroha_torii/const/src/lib.rs rename to iroha_torii_const/src/lib.rs From dced097db02963d3987cdb49ff458452dbafed16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 11:16:11 +0400 Subject: [PATCH 48/59] refactor: unnest `iroha_trigger` satellite crates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 2 +- iroha_trigger/Cargo.toml | 2 +- {iroha_trigger/derive => iroha_trigger_derive}/Cargo.toml | 0 .../derive => iroha_trigger_derive}/src/entrypoint.rs | 0 {iroha_trigger/derive => iroha_trigger_derive}/src/lib.rs | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename {iroha_trigger/derive => iroha_trigger_derive}/Cargo.toml (100%) rename {iroha_trigger/derive => iroha_trigger_derive}/src/entrypoint.rs (100%) rename {iroha_trigger/derive => iroha_trigger_derive}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 2f60a42ebfa..0935390da2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -220,7 +220,7 @@ members = [ "iroha_smart_contract_derive", "iroha_smart_contract_utils", "iroha_trigger", - "iroha_trigger/derive", + "iroha_trigger_derive", "iroha_executor", "iroha_executor_derive", "iroha_executor_data_model", diff --git a/iroha_trigger/Cargo.toml b/iroha_trigger/Cargo.toml index 090468d1855..4eefb12e7ab 100644 --- a/iroha_trigger/Cargo.toml +++ b/iroha_trigger/Cargo.toml @@ -14,7 +14,7 @@ workspace = true debug = ["iroha_smart_contract/debug"] [dependencies] -iroha_trigger_derive = { path = "derive" } +iroha_trigger_derive = { path = "../iroha_trigger_derive" } iroha_smart_contract_utils.workspace = true iroha_smart_contract.workspace = true diff --git a/iroha_trigger/derive/Cargo.toml b/iroha_trigger_derive/Cargo.toml similarity index 100% rename from iroha_trigger/derive/Cargo.toml rename to iroha_trigger_derive/Cargo.toml diff --git a/iroha_trigger/derive/src/entrypoint.rs b/iroha_trigger_derive/src/entrypoint.rs similarity index 100% rename from iroha_trigger/derive/src/entrypoint.rs rename to iroha_trigger_derive/src/entrypoint.rs diff --git a/iroha_trigger/derive/src/lib.rs b/iroha_trigger_derive/src/lib.rs similarity index 100% rename from iroha_trigger/derive/src/lib.rs rename to iroha_trigger_derive/src/lib.rs From 28ac1e9e5238c0fda3d5a583401c05e840647733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 11:16:48 +0400 Subject: [PATCH 49/59] refactor: unnest `iroha_version` satellite crates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 2 +- iroha_version/Cargo.toml | 2 +- {iroha_version/derive => iroha_version_derive}/Cargo.toml | 0 {iroha_version/derive => iroha_version_derive}/src/lib.rs | 0 {iroha_version/derive => iroha_version_derive}/tests/json.rs | 0 {iroha_version/derive => iroha_version_derive}/tests/scale.rs | 0 {iroha_version/derive => iroha_version_derive}/tests/ui.rs | 0 .../tests/ui_fail/field_missing_in_version_attribute.rs | 0 .../tests/ui_fail/field_missing_in_version_attribute.stderr | 0 .../tests/ui_fail/field_typo_in_version_attribute.rs | 0 .../tests/ui_fail/field_typo_in_version_attribute.stderr | 0 .../tests/ui_fail/invalid_range_equal.rs | 0 .../tests/ui_fail/invalid_range_equal.stderr | 0 .../tests/ui_fail/invalid_range_less.rs | 0 .../tests/ui_fail/invalid_range_less.stderr | 0 .../tests/ui_fail/unknown_field_in_version_attribute.rs | 0 .../tests/ui_fail/unknown_field_in_version_attribute.stderr | 0 .../tests/ui_pass/declare_several_versioned.rs | 0 .../tests/ui_pass/declare_versioned.rs | 0 .../tests/ui_pass/declare_versioned_json.rs | 0 .../tests/ui_pass/declare_versioned_scale.rs | 0 21 files changed, 2 insertions(+), 2 deletions(-) rename {iroha_version/derive => iroha_version_derive}/Cargo.toml (100%) rename {iroha_version/derive => iroha_version_derive}/src/lib.rs (100%) rename {iroha_version/derive => iroha_version_derive}/tests/json.rs (100%) rename {iroha_version/derive => iroha_version_derive}/tests/scale.rs (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui.rs (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_fail/field_missing_in_version_attribute.rs (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_fail/field_missing_in_version_attribute.stderr (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_fail/field_typo_in_version_attribute.rs (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_fail/field_typo_in_version_attribute.stderr (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_fail/invalid_range_equal.rs (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_fail/invalid_range_equal.stderr (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_fail/invalid_range_less.rs (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_fail/invalid_range_less.stderr (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_fail/unknown_field_in_version_attribute.rs (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_fail/unknown_field_in_version_attribute.stderr (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_pass/declare_several_versioned.rs (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_pass/declare_versioned.rs (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_pass/declare_versioned_json.rs (100%) rename {iroha_version/derive => iroha_version_derive}/tests/ui_pass/declare_versioned_scale.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 0935390da2a..3380882bdea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -235,7 +235,7 @@ members = [ "iroha_torii", "iroha_torii_const", "iroha_version", - "iroha_version/derive", + "iroha_version_derive", "iroha_wasm_codec", "iroha_wasm_codec/derive", "iroha_wasm_builder", diff --git a/iroha_version/Cargo.toml b/iroha_version/Cargo.toml index 7dbb74aef92..dd7d322b94e 100644 --- a/iroha_version/Cargo.toml +++ b/iroha_version/Cargo.toml @@ -23,7 +23,7 @@ scale = ["parity-scale-codec/full"] json = ["serde", "serde_json"] [dependencies] -iroha_version_derive = { path = "derive", default-features = false, optional = true } +iroha_version_derive = { path = "../iroha_version_derive", default-features = false, optional = true } iroha_macro = { workspace = true } diff --git a/iroha_version/derive/Cargo.toml b/iroha_version_derive/Cargo.toml similarity index 100% rename from iroha_version/derive/Cargo.toml rename to iroha_version_derive/Cargo.toml diff --git a/iroha_version/derive/src/lib.rs b/iroha_version_derive/src/lib.rs similarity index 100% rename from iroha_version/derive/src/lib.rs rename to iroha_version_derive/src/lib.rs diff --git a/iroha_version/derive/tests/json.rs b/iroha_version_derive/tests/json.rs similarity index 100% rename from iroha_version/derive/tests/json.rs rename to iroha_version_derive/tests/json.rs diff --git a/iroha_version/derive/tests/scale.rs b/iroha_version_derive/tests/scale.rs similarity index 100% rename from iroha_version/derive/tests/scale.rs rename to iroha_version_derive/tests/scale.rs diff --git a/iroha_version/derive/tests/ui.rs b/iroha_version_derive/tests/ui.rs similarity index 100% rename from iroha_version/derive/tests/ui.rs rename to iroha_version_derive/tests/ui.rs diff --git a/iroha_version/derive/tests/ui_fail/field_missing_in_version_attribute.rs b/iroha_version_derive/tests/ui_fail/field_missing_in_version_attribute.rs similarity index 100% rename from iroha_version/derive/tests/ui_fail/field_missing_in_version_attribute.rs rename to iroha_version_derive/tests/ui_fail/field_missing_in_version_attribute.rs diff --git a/iroha_version/derive/tests/ui_fail/field_missing_in_version_attribute.stderr b/iroha_version_derive/tests/ui_fail/field_missing_in_version_attribute.stderr similarity index 100% rename from iroha_version/derive/tests/ui_fail/field_missing_in_version_attribute.stderr rename to iroha_version_derive/tests/ui_fail/field_missing_in_version_attribute.stderr diff --git a/iroha_version/derive/tests/ui_fail/field_typo_in_version_attribute.rs b/iroha_version_derive/tests/ui_fail/field_typo_in_version_attribute.rs similarity index 100% rename from iroha_version/derive/tests/ui_fail/field_typo_in_version_attribute.rs rename to iroha_version_derive/tests/ui_fail/field_typo_in_version_attribute.rs diff --git a/iroha_version/derive/tests/ui_fail/field_typo_in_version_attribute.stderr b/iroha_version_derive/tests/ui_fail/field_typo_in_version_attribute.stderr similarity index 100% rename from iroha_version/derive/tests/ui_fail/field_typo_in_version_attribute.stderr rename to iroha_version_derive/tests/ui_fail/field_typo_in_version_attribute.stderr diff --git a/iroha_version/derive/tests/ui_fail/invalid_range_equal.rs b/iroha_version_derive/tests/ui_fail/invalid_range_equal.rs similarity index 100% rename from iroha_version/derive/tests/ui_fail/invalid_range_equal.rs rename to iroha_version_derive/tests/ui_fail/invalid_range_equal.rs diff --git a/iroha_version/derive/tests/ui_fail/invalid_range_equal.stderr b/iroha_version_derive/tests/ui_fail/invalid_range_equal.stderr similarity index 100% rename from iroha_version/derive/tests/ui_fail/invalid_range_equal.stderr rename to iroha_version_derive/tests/ui_fail/invalid_range_equal.stderr diff --git a/iroha_version/derive/tests/ui_fail/invalid_range_less.rs b/iroha_version_derive/tests/ui_fail/invalid_range_less.rs similarity index 100% rename from iroha_version/derive/tests/ui_fail/invalid_range_less.rs rename to iroha_version_derive/tests/ui_fail/invalid_range_less.rs diff --git a/iroha_version/derive/tests/ui_fail/invalid_range_less.stderr b/iroha_version_derive/tests/ui_fail/invalid_range_less.stderr similarity index 100% rename from iroha_version/derive/tests/ui_fail/invalid_range_less.stderr rename to iroha_version_derive/tests/ui_fail/invalid_range_less.stderr diff --git a/iroha_version/derive/tests/ui_fail/unknown_field_in_version_attribute.rs b/iroha_version_derive/tests/ui_fail/unknown_field_in_version_attribute.rs similarity index 100% rename from iroha_version/derive/tests/ui_fail/unknown_field_in_version_attribute.rs rename to iroha_version_derive/tests/ui_fail/unknown_field_in_version_attribute.rs diff --git a/iroha_version/derive/tests/ui_fail/unknown_field_in_version_attribute.stderr b/iroha_version_derive/tests/ui_fail/unknown_field_in_version_attribute.stderr similarity index 100% rename from iroha_version/derive/tests/ui_fail/unknown_field_in_version_attribute.stderr rename to iroha_version_derive/tests/ui_fail/unknown_field_in_version_attribute.stderr diff --git a/iroha_version/derive/tests/ui_pass/declare_several_versioned.rs b/iroha_version_derive/tests/ui_pass/declare_several_versioned.rs similarity index 100% rename from iroha_version/derive/tests/ui_pass/declare_several_versioned.rs rename to iroha_version_derive/tests/ui_pass/declare_several_versioned.rs diff --git a/iroha_version/derive/tests/ui_pass/declare_versioned.rs b/iroha_version_derive/tests/ui_pass/declare_versioned.rs similarity index 100% rename from iroha_version/derive/tests/ui_pass/declare_versioned.rs rename to iroha_version_derive/tests/ui_pass/declare_versioned.rs diff --git a/iroha_version/derive/tests/ui_pass/declare_versioned_json.rs b/iroha_version_derive/tests/ui_pass/declare_versioned_json.rs similarity index 100% rename from iroha_version/derive/tests/ui_pass/declare_versioned_json.rs rename to iroha_version_derive/tests/ui_pass/declare_versioned_json.rs diff --git a/iroha_version/derive/tests/ui_pass/declare_versioned_scale.rs b/iroha_version_derive/tests/ui_pass/declare_versioned_scale.rs similarity index 100% rename from iroha_version/derive/tests/ui_pass/declare_versioned_scale.rs rename to iroha_version_derive/tests/ui_pass/declare_versioned_scale.rs From 3e4487cb646e3e911790aad0ee362f4de0364839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 11:19:09 +0400 Subject: [PATCH 50/59] refactor: unnest `iroha_wasm_codec_derive`, rename from `iroha_core_wasm_codec_derive` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.lock | 14 +++++++++++++- Cargo.toml | 2 +- iroha_wasm_codec/Cargo.toml | 2 +- iroha_wasm_codec/src/lib.rs | 2 +- .../derive => iroha_wasm_codec_derive}/Cargo.toml | 2 +- .../derive => iroha_wasm_codec_derive}/src/lib.rs | 0 6 files changed, 17 insertions(+), 5 deletions(-) rename {iroha_wasm_codec/derive => iroha_wasm_codec_derive}/Cargo.toml (89%) rename {iroha_wasm_codec/derive => iroha_wasm_codec_derive}/src/lib.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index ac374325bab..771a2786952 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3721,12 +3721,24 @@ dependencies = [ name = "iroha_wasm_codec" version = "2.0.0-rc.1.0" dependencies = [ - "iroha_core_wasm_codec_derive", + "iroha_wasm_codec_derive", "parity-scale-codec", "thiserror", "wasmtime", ] +[[package]] +name = "iroha_wasm_codec_derive" +version = "2.0.0-rc.1.0" +dependencies = [ + "iroha_macro_utils", + "manyhow", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.72", +] + [[package]] name = "iroha_wasm_test_runner" version = "2.0.0-rc.1.0" diff --git a/Cargo.toml b/Cargo.toml index 3380882bdea..bc2d86ff317 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -237,7 +237,7 @@ members = [ "iroha_version", "iroha_version_derive", "iroha_wasm_codec", - "iroha_wasm_codec/derive", + "iroha_wasm_codec_derive", "iroha_wasm_builder", ] exclude = [ diff --git a/iroha_wasm_codec/Cargo.toml b/iroha_wasm_codec/Cargo.toml index 3757265e021..b7bd7054e82 100644 --- a/iroha_wasm_codec/Cargo.toml +++ b/iroha_wasm_codec/Cargo.toml @@ -10,7 +10,7 @@ license.workspace = true workspace = true [dependencies] -iroha_core_wasm_codec_derive = { path = "derive" } +iroha_wasm_codec_derive = { path = "../iroha_wasm_codec_derive" } thiserror = { workspace = true } wasmtime = { workspace = true } diff --git a/iroha_wasm_codec/src/lib.rs b/iroha_wasm_codec/src/lib.rs index 3e80ad3e64c..613b049a5d8 100644 --- a/iroha_wasm_codec/src/lib.rs +++ b/iroha_wasm_codec/src/lib.rs @@ -1,6 +1,6 @@ //! This crate provides utils for encoding/decoding objects between Iroha host and Wasm smart contracts. -pub use iroha_core_wasm_codec_derive::{wrap, wrap_trait_fn}; +pub use iroha_wasm_codec_derive::{wrap, wrap_trait_fn}; use parity_scale_codec::{DecodeAll, Encode, Error as ParityError}; use wasmtime::Result; diff --git a/iroha_wasm_codec/derive/Cargo.toml b/iroha_wasm_codec_derive/Cargo.toml similarity index 89% rename from iroha_wasm_codec/derive/Cargo.toml rename to iroha_wasm_codec_derive/Cargo.toml index 700448e0124..efa245bc6d3 100644 --- a/iroha_wasm_codec/derive/Cargo.toml +++ b/iroha_wasm_codec_derive/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "iroha_core_wasm_codec_derive" +name = "iroha_wasm_codec_derive" edition.workspace = true version.workspace = true authors.workspace = true diff --git a/iroha_wasm_codec/derive/src/lib.rs b/iroha_wasm_codec_derive/src/lib.rs similarity index 100% rename from iroha_wasm_codec/derive/src/lib.rs rename to iroha_wasm_codec_derive/src/lib.rs From cb7b067240ff6f8d7059c77ea7d5e031a9a13d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 11:58:31 +0400 Subject: [PATCH 51/59] refactor: move crates to `crates` directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .github/workflows/iroha2-dev-pr-static.yml | 2 +- .github/workflows/iroha2-dev-pr-wasm.yaml | 16 +- .gitignore | 4 +- Cargo.toml | 160 +++++++++--------- README.md | 30 ++-- .../pytests/common => crates}/__init__.py | 0 {iroha => crates/iroha}/Cargo.toml | 2 +- {iroha => crates/iroha}/README.md | 0 {iroha => crates/iroha}/benches/torii.rs | 4 +- {iroha => crates/iroha}/benches/tps/README.md | 0 .../iroha}/benches/tps/config.json | 0 {iroha => crates/iroha}/benches/tps/dev.rs | 0 .../iroha}/benches/tps/oneshot.rs | 0 {iroha => crates/iroha}/benches/tps/utils.rs | 0 .../examples/million_accounts_genesis.rs | 2 +- .../iroha}/examples/register_1000_triggers.rs | 2 +- {iroha => crates/iroha}/examples/tutorial.rs | 0 {iroha => crates/iroha}/src/client.rs | 0 {iroha => crates/iroha}/src/config.rs | 0 {iroha => crates/iroha}/src/config/user.rs | 0 {iroha => crates/iroha}/src/http.rs | 0 {iroha => crates/iroha}/src/http_default.rs | 0 {iroha => crates/iroha}/src/lib.rs | 0 {iroha => crates/iroha}/src/query.rs | 0 .../iroha}/tests/integration/asset.rs | 0 .../tests/integration/asset_propagation.rs | 0 .../iroha}/tests/integration/events/data.rs | 0 .../iroha}/tests/integration/events/mod.rs | 0 .../tests/integration/events/notification.rs | 0 .../tests/integration/events/pipeline.rs | 0 .../extra_functional/connected_peers.rs | 0 .../integration/extra_functional/genesis.rs | 0 .../tests/integration/extra_functional/mod.rs | 0 .../multiple_blocks_created.rs | 0 .../integration/extra_functional/normal.rs | 0 .../extra_functional/offline_peers.rs | 0 .../extra_functional/restart_peer.rs | 0 .../extra_functional/unregister_peer.rs | 0 .../extra_functional/unstable_network.rs | 0 .../iroha}/tests/integration/mod.rs | 0 .../iroha}/tests/integration/multisig.rs | 2 +- .../iroha}/tests/integration/non_mintable.rs | 0 .../iroha}/tests/integration/pagination.rs | 0 .../iroha}/tests/integration/permissions.rs | 0 .../tests/integration/queries/account.rs | 0 .../iroha}/tests/integration/queries/asset.rs | 0 .../iroha}/tests/integration/queries/mod.rs | 0 .../tests/integration/queries/query_errors.rs | 0 .../iroha}/tests/integration/queries/role.rs | 0 .../integration/queries/smart_contract.rs | 4 +- .../iroha}/tests/integration/roles.rs | 0 .../iroha}/tests/integration/set_parameter.rs | 0 .../iroha}/tests/integration/sorting.rs | 0 .../tests/integration/status_response.rs | 0 .../tests/integration/transfer_asset.rs | 0 .../tests/integration/transfer_domain.rs | 0 .../integration/triggers/by_call_trigger.rs | 6 +- .../integration/triggers/data_trigger.rs | 0 .../integration/triggers/event_trigger.rs | 0 .../iroha}/tests/integration/triggers/mod.rs | 0 .../tests/integration/triggers/orphans.rs | 0 .../integration/triggers/time_trigger.rs | 2 +- .../integration/triggers/trigger_rollback.rs | 0 .../iroha}/tests/integration/tx_chain_id.rs | 0 .../iroha}/tests/integration/tx_history.rs | 0 .../iroha}/tests/integration/tx_rollback.rs | 0 .../iroha}/tests/integration/upgrade.rs | 16 +- {iroha => crates/iroha}/tests/mod.rs | 0 .../ui_fail/cant_filter_singular_query.rs | 0 {iroha_cli => crates/iroha_cli}/.gitignore | 0 {iroha_cli => crates/iroha_cli}/Cargo.toml | 0 {iroha_cli => crates/iroha_cli}/README.md | 0 .../src => crates/iroha_cli}/__init__.py | 0 {iroha_cli => crates/iroha_cli}/build.rs | 0 .../iroha_cli}/pytests/.gitignore | 0 .../iroha_cli}/pytests/README.md | 4 +- crates/iroha_cli/pytests/__init__.py | 0 crates/iroha_cli/pytests/common/__init__.py | 0 .../iroha_cli}/pytests/common/consts.py | 0 .../iroha_cli}/pytests/common/helpers.py | 0 .../json_isi_examples/unregister_asset.json | 0 .../iroha_cli}/pytests/common/settings.py | 0 .../iroha_cli}/pytests/models/__init__.py | 0 .../iroha_cli}/pytests/models/account.py | 0 .../iroha_cli}/pytests/models/asset.py | 0 .../iroha_cli}/pytests/models/domain.py | 0 .../iroha_cli}/pytests/poetry.lock | 0 .../iroha_cli}/pytests/pyproject.toml | 0 crates/iroha_cli/pytests/src/__init__.py | 0 .../pytests/src/iroha_cli/__init__.py | 0 .../pytests/src/iroha_cli/configuration.py | 0 .../iroha_cli}/pytests/src/iroha_cli/have.py | 0 .../iroha_cli}/pytests/src/iroha_cli/iroha.py | 0 .../pytests/src/iroha_cli/iroha_cli.py | 0 .../iroha_cli}/pytests/src/iroha_cli/match.py | 0 .../iroha_cli}/pytests/test/__init__.py | 0 .../pytests/test/accounts/__init__.py | 0 .../pytests/test/accounts/conftest.py | 0 .../accounts/test_accounts_query_filters.py | 0 .../test/accounts/test_register_accounts.py | 0 .../iroha_cli/pytests/test/assets/__init__.py | 0 .../pytests/test/assets/conftest.py | 0 .../test/assets/test_assets_query_filters.py | 0 .../pytests/test/assets/test_burn_assets.py | 0 .../pytests/test/assets/test_mint_assets.py | 0 .../assets/test_register_asset_definitions.py | 0 .../test/assets/test_transfer_assets.py | 0 .../test/assets/test_unregister_asset.py | 0 .../pytests/test/atomicity/__init__.py | 0 .../pytests/test/atomicity/conftest.py | 0 ...ultiple_instructions_within_transaction.py | 0 ...st_pair_instructions_within_transaction.py | 0 ...t_wrong_instructions_within_transaction.py | 0 .../iroha_cli}/pytests/test/conftest.py | 0 .../pytests/test/domains/__init__.py | 0 .../pytests/test/domains/conftest.py | 0 .../domains/test_domains_query_filters.py | 0 .../test/domains/test_register_domains.py | 0 .../test/domains/test_transfer_domains.py | 0 .../pytests/test/triggers/__init__.py | 0 .../pytests/test/triggers/conftest.py | 0 .../test/triggers/test_register_trigger.py | 0 {iroha_cli => crates/iroha_cli}/src/main.rs | 0 .../iroha_codec}/Cargo.toml | 0 {iroha_codec => crates/iroha_codec}/README.md | 0 {iroha_codec => crates/iroha_codec}/build.rs | 0 .../iroha_codec}/samples/account.bin | Bin .../iroha_codec}/samples/account.json | 0 .../iroha_codec}/samples/domain.bin | 0 .../iroha_codec}/samples/domain.json | 0 .../iroha_codec}/samples/trigger.bin | Bin .../iroha_codec}/samples/trigger.json | 0 .../iroha_codec}/src/main.rs | 0 .../iroha_config}/Cargo.toml | 0 .../iroha_config}/iroha_test_config.toml | 0 .../iroha_config}/src/client_api.rs | 0 .../iroha_config}/src/kura.rs | 0 .../iroha_config}/src/lib.rs | 0 .../iroha_config}/src/logger.rs | 0 .../iroha_config}/src/parameters/actual.rs | 0 .../iroha_config}/src/parameters/defaults.rs | 0 .../iroha_config}/src/parameters/mod.rs | 0 .../iroha_config}/src/parameters/user.rs | 0 .../iroha_config}/src/snapshot.rs | 0 .../iroha_config}/src/wasm.rs | 0 .../iroha_config}/tests/fixtures.rs | 0 .../tests/fixtures/absolute_paths.toml | 0 .../tests/fixtures/bad.extra_fields.toml | 0 .../tests/fixtures/bad.missing_fields.toml | 0 .../tests/fixtures/bad.multiple_bad_envs.env | 0 .../fixtures/bad.torii_addr_eq_p2p_addr.toml | 0 .../iroha_config}/tests/fixtures/base.toml | 0 .../tests/fixtures/base_trusted_peers.toml | 0 .../iroha_config}/tests/fixtures/full.env | 0 .../iroha_config}/tests/fixtures/full.toml | 0 .../fixtures/minimal_alone_with_genesis.toml | 0 .../tests/fixtures/minimal_file_and_env.env | 0 .../tests/fixtures/minimal_file_and_env.toml | 0 .../fixtures/minimal_with_trusted_peers.toml | 0 .../iroha_config_base}/Cargo.toml | 0 .../iroha_config_base}/src/attach.rs | 0 .../iroha_config_base}/src/env.rs | 0 .../iroha_config_base}/src/lib.rs | 0 .../iroha_config_base}/src/read.rs | 0 .../iroha_config_base}/src/toml.rs | 0 .../iroha_config_base}/src/util.rs | 0 .../tests/bad.invalid-extends.toml | 0 .../bad.invalid-nested-extends.base.toml | 0 .../tests/bad.invalid-nested-extends.toml | 0 .../iroha_config_base}/tests/misc.rs | 0 .../iroha_config_base_derive}/Cargo.toml | 0 .../iroha_config_base_derive}/src/lib.rs | 0 .../iroha_config_base_derive}/tests/ui.rs | 0 .../tests/ui_fail/generics.rs | 0 .../tests/ui_fail/generics.stderr | 0 .../tests/ui_fail/invalid_attrs_commas.rs | 0 .../tests/ui_fail/invalid_attrs_commas.stderr | 0 .../tests/ui_fail/invalid_attrs_conflicts.rs | 0 .../ui_fail/invalid_attrs_conflicts.stderr | 0 .../invalid_attrs_default_invalid_expr.rs | 0 .../invalid_attrs_default_invalid_expr.stderr | 0 .../ui_fail/invalid_attrs_env_without_var.rs | 0 .../invalid_attrs_env_without_var.stderr | 0 .../invalid_attrs_no_comma_between_attrs.rs | 0 ...nvalid_attrs_no_comma_between_attrs.stderr | 0 .../tests/ui_fail/invalid_attrs_struct.rs | 0 .../tests/ui_fail/invalid_attrs_struct.stderr | 0 .../tests/ui_fail/unsupported_shapes.rs | 0 .../tests/ui_fail/unsupported_shapes.stderr | 0 .../tests/ui_pass/happy_path.rs | 0 {iroha_core => crates/iroha_core}/Cargo.toml | 0 .../benches/blocks/apply_blocks.rs | 0 .../benches/blocks/apply_blocks_benchmark.rs | 0 .../benches/blocks/apply_blocks_oneshot.rs | 0 .../iroha_core}/benches/blocks/common.rs | 0 .../benches/blocks/validate_blocks.rs | 0 .../blocks/validate_blocks_benchmark.rs | 0 .../benches/blocks/validate_blocks_oneshot.rs | 0 .../iroha_core}/benches/kura.rs | 0 .../iroha_core}/benches/validation.rs | 0 {iroha_core => crates/iroha_core}/clippy.toml | 0 .../iroha_core}/src/block.rs | 0 .../iroha_core}/src/block_sync.rs | 0 .../iroha_core}/src/executor.rs | 0 .../iroha_core}/src/gossiper.rs | 0 {iroha_core => crates/iroha_core}/src/kiso.rs | 0 {iroha_core => crates/iroha_core}/src/kura.rs | 0 {iroha_core => crates/iroha_core}/src/lib.rs | 0 .../iroha_core}/src/metrics.rs | 0 .../iroha_core}/src/query/cursor.rs | 0 .../iroha_core}/src/query/mod.rs | 0 .../iroha_core}/src/query/pagination.rs | 0 .../iroha_core}/src/query/store.rs | 0 .../iroha_core}/src/queue.rs | 0 .../src/smartcontracts/isi/account.rs | 0 .../src/smartcontracts/isi/asset.rs | 0 .../src/smartcontracts/isi/block.rs | 0 .../src/smartcontracts/isi/domain.rs | 0 .../iroha_core}/src/smartcontracts/isi/mod.rs | 0 .../src/smartcontracts/isi/query.rs | 0 .../src/smartcontracts/isi/triggers/mod.rs | 0 .../src/smartcontracts/isi/triggers/set.rs | 0 .../isi/triggers/specialized.rs | 0 .../iroha_core}/src/smartcontracts/isi/tx.rs | 0 .../src/smartcontracts/isi/world.rs | 0 .../iroha_core}/src/smartcontracts/mod.rs | 0 .../iroha_core}/src/smartcontracts/wasm.rs | 0 .../iroha_core}/src/snapshot.rs | 0 .../iroha_core}/src/state.rs | 0 .../iroha_core}/src/sumeragi/main_loop.rs | 0 .../iroha_core}/src/sumeragi/message.rs | 0 .../iroha_core}/src/sumeragi/mod.rs | 0 .../src/sumeragi/network_topology.rs | 0 .../iroha_core}/src/sumeragi/view_change.rs | 0 {iroha_core => crates/iroha_core}/src/tx.rs | 0 .../iroha_crypto}/Cargo.toml | 0 .../iroha_crypto}/build.rs | 0 .../src/encryption/chacha20poly1305.rs | 0 .../iroha_crypto}/src/encryption/mod.rs | 0 .../iroha_crypto}/src/hash.rs | 0 .../iroha_crypto}/src/kex/mod.rs | 0 .../iroha_crypto}/src/kex/x25519.rs | 0 .../iroha_crypto}/src/lib.rs | 0 .../iroha_crypto}/src/merkle.rs | 0 .../iroha_crypto}/src/multihash.rs | 0 .../iroha_crypto}/src/secrecy.rs | 0 .../src/signature/bls/implementation.rs | 0 .../iroha_crypto}/src/signature/bls/mod.rs | 0 .../iroha_crypto}/src/signature/bls/tests.rs | 0 .../iroha_crypto}/src/signature/ed25519.rs | 0 .../iroha_crypto}/src/signature/mod.rs | 0 .../iroha_crypto}/src/signature/secp256k1.rs | 0 .../iroha_crypto}/src/varint.rs | 0 .../iroha_data_model}/Cargo.toml | 0 .../benches/time_event_filter.rs | 0 .../iroha_data_model}/build.rs | 0 .../iroha_data_model}/clippy.toml | 0 .../iroha_data_model}/src/account.rs | 0 .../iroha_data_model}/src/asset.rs | 0 .../iroha_data_model}/src/block.rs | 0 .../iroha_data_model}/src/domain.rs | 0 .../src/events/data/events.rs | 0 .../src/events/data/filters.rs | 0 .../iroha_data_model}/src/events/data/mod.rs | 0 .../src/events/execute_trigger.rs | 0 .../iroha_data_model}/src/events/mod.rs | 0 .../iroha_data_model}/src/events/pipeline.rs | 0 .../iroha_data_model}/src/events/time.rs | 0 .../src/events/trigger_completed.rs | 0 .../iroha_data_model}/src/executor.rs | 0 .../iroha_data_model}/src/ipfs.rs | 0 .../iroha_data_model}/src/isi.rs | 0 .../iroha_data_model}/src/lib.rs | 0 .../iroha_data_model}/src/metadata.rs | 0 .../iroha_data_model}/src/name.rs | 0 .../iroha_data_model}/src/parameter.rs | 0 .../iroha_data_model}/src/peer.rs | 0 .../iroha_data_model}/src/permission.rs | 0 .../iroha_data_model}/src/query/builder.rs | 0 .../iroha_data_model}/src/query/mod.rs | 0 .../iroha_data_model}/src/query/parameters.rs | 0 .../src/query/predicate/mod.rs | 0 .../predicate/predicate_ast_extensions.rs | 0 .../predicate/predicate_atoms/account.rs | 0 .../query/predicate/predicate_atoms/asset.rs | 0 .../query/predicate/predicate_atoms/block.rs | 0 .../query/predicate/predicate_atoms/domain.rs | 0 .../query/predicate/predicate_atoms/mod.rs | 0 .../predicate/predicate_atoms/parameter.rs | 0 .../query/predicate/predicate_atoms/peer.rs | 0 .../predicate/predicate_atoms/permission.rs | 0 .../query/predicate/predicate_atoms/role.rs | 0 .../predicate/predicate_atoms/trigger.rs | 0 .../query/predicate/predicate_combinators.rs | 0 .../src/query/predicate/projectors.rs | 0 .../src/query/predicate/prototypes/account.rs | 0 .../src/query/predicate/prototypes/asset.rs | 0 .../src/query/predicate/prototypes/block.rs | 0 .../src/query/predicate/prototypes/domain.rs | 0 .../src/query/predicate/prototypes/mod.rs | 0 .../query/predicate/prototypes/parameter.rs | 0 .../src/query/predicate/prototypes/peer.rs | 0 .../query/predicate/prototypes/permission.rs | 0 .../src/query/predicate/prototypes/role.rs | 0 .../src/query/predicate/prototypes/trigger.rs | 0 .../iroha_data_model}/src/role.rs | 0 .../iroha_data_model}/src/smart_contract.rs | 0 .../iroha_data_model}/src/transaction.rs | 0 .../iroha_data_model}/src/trigger.rs | 0 .../iroha_data_model}/src/visit.rs | 0 .../iroha_data_model}/tests/data_model.rs | 0 .../iroha_data_model_derive}/Cargo.toml | 0 .../iroha_data_model_derive}/src/enum_ref.rs | 0 .../iroha_data_model_derive}/src/event_set.rs | 0 .../src/has_origin.rs | 0 .../iroha_data_model_derive}/src/id.rs | 0 .../iroha_data_model_derive}/src/lib.rs | 0 .../iroha_data_model_derive}/src/model.rs | 0 .../src/partially_tagged/mod.rs | 0 .../src/partially_tagged/resolve_self.rs | 0 .../tests/event_set.rs | 0 .../tests/has_origin.rs | 0 .../tests/has_origin_generics.rs | 0 .../tests/id_eq_ord_hash.rs | 0 .../tests/partial_tagged_serde.rs | 0 .../tests/partial_tagged_serde_self.rs | 0 .../iroha_data_model_derive}/tests/ui.rs | 0 .../ui_fail/has_origin_multiple_attributes.rs | 0 .../has_origin_multiple_attributes.stderr | 0 .../ui_fail/transparent_api_private_field.rs | 0 .../transparent_api_private_field.stderr | 0 .../ui_fail/transparent_api_private_item.rs | 0 .../transparent_api_private_item.stderr | 2 +- .../iroha_derive}/Cargo.toml | 0 .../iroha_derive}/src/lib.rs | 0 .../tests/container_enum_from_variant.rs | 0 .../tests/enum_from_variant_attrs.rs | 0 .../iroha_derive}/tests/ui.rs | 0 ...from_variant_conflicting_implementation.rs | 0 ..._variant_conflicting_implementation.stderr | 0 .../from_variant_incorrect_attr_placement.rs | 0 ...om_variant_incorrect_attr_placement.stderr | 0 .../tests/ui_fail/from_variant_same_type.rs | 0 .../ui_fail/from_variant_same_type.stderr | 0 .../tests/ui_fail/struct_from_variant.rs | 0 .../tests/ui_fail/struct_from_variant.stderr | 0 .../tests/ui_pass/enum_from_variant.rs | 0 .../iroha_executor}/Cargo.toml | 0 .../iroha_executor}/src/default.rs | 0 .../iroha_executor}/src/lib.rs | 0 .../iroha_executor}/src/permission.rs | 0 .../iroha_executor_data_model}/Cargo.toml | 0 .../iroha_executor_data_model}/src/lib.rs | 0 .../src/parameter.rs | 0 .../src/permission.rs | 0 .../Cargo.toml | 0 .../src/lib.rs | 0 .../src/parameter.rs | 0 .../src/permission.rs | 0 .../iroha_executor_derive}/Cargo.toml | 0 .../iroha_executor_derive}/src/default.rs | 0 .../iroha_executor_derive}/src/entrypoint.rs | 0 .../iroha_executor_derive}/src/lib.rs | 0 .../iroha_ffi}/.cargo/config.toml | 0 {iroha_ffi => crates/iroha_ffi}/Cargo.toml | 0 {iroha_ffi => crates/iroha_ffi}/src/handle.rs | 0 {iroha_ffi => crates/iroha_ffi}/src/ir.rs | 0 {iroha_ffi => crates/iroha_ffi}/src/lib.rs | 0 {iroha_ffi => crates/iroha_ffi}/src/option.rs | 0 .../iroha_ffi}/src/primitives.rs | 0 {iroha_ffi => crates/iroha_ffi}/src/repr_c.rs | 0 {iroha_ffi => crates/iroha_ffi}/src/slice.rs | 0 .../iroha_ffi}/src/std_impls.rs | 0 .../iroha_ffi}/tests/export_getset.rs | 0 .../iroha_ffi}/tests/export_shared_fns.rs | 0 .../iroha_ffi}/tests/ffi_export.rs | 0 .../tests/ffi_export_import_u128_i128.rs | 0 .../iroha_ffi}/tests/ffi_import.rs | 0 .../iroha_ffi}/tests/ffi_import_opaque.rs | 0 .../iroha_ffi}/tests/generics.rs | 0 .../iroha_ffi}/tests/import_getset.rs | 0 .../iroha_ffi}/tests/import_shared_fns.rs | 0 .../iroha_ffi}/tests/transparent.rs | 0 .../iroha_ffi}/tests/unambiguous.rs | 0 .../iroha_ffi_derive}/Cargo.toml | 0 .../src/attr_parse/derive.rs | 0 .../iroha_ffi_derive}/src/attr_parse/doc.rs | 0 .../src/attr_parse/getset.rs | 0 .../iroha_ffi_derive}/src/attr_parse/mod.rs | 0 .../iroha_ffi_derive}/src/attr_parse/repr.rs | 0 .../iroha_ffi_derive}/src/convert.rs | 0 .../iroha_ffi_derive}/src/ffi_fn.rs | 0 .../iroha_ffi_derive}/src/getset_gen.rs | 0 .../iroha_ffi_derive}/src/impl_visitor.rs | 0 .../iroha_ffi_derive}/src/lib.rs | 0 .../iroha_ffi_derive}/src/wrapper.rs | 0 .../iroha_ffi_derive}/tests/ui.rs | 0 .../tests/ui_fail/array_as_ptr.rs | 0 .../tests/ui_fail/array_as_ptr.stderr | 0 .../tests/ui_fail/derive_skip_field.rs | 0 .../tests/ui_fail/derive_skip_field.stderr | 0 .../tests/ui_fail/derive_skip_struct.rs | 0 .../tests/ui_fail/derive_skip_struct.stderr | 0 .../ui_fail/fallible_transmute_mut_ref.rs | 0 .../ui_fail/fallible_transmute_mut_ref.stderr | 0 ...eldless_enum_with_explicit_discriminant.rs | 0 ...ess_enum_with_explicit_discriminant.stderr | 0 .../ui_fail/fieldless_enum_without_repr.rs | 0 .../fieldless_enum_without_repr.stderr | 0 .../ui_fail/generics_are_forbiden_in_ffi.rs | 0 .../generics_are_forbiden_in_ffi.stderr | 0 .../tests/ui_fail/nested_owned_structure.rs | 0 .../ui_fail/nested_owned_structure.stderr | 0 .../tests/ui_fail/non_robust_repr_c.rs | 0 .../tests/ui_fail/non_robust_repr_c.stderr | 0 .../private_method_inside_impl_are_skipped.rs | 0 ...vate_method_inside_impl_are_skipped.stderr | 0 .../tests/ui_fail/raw_pointer_type.rs | 0 .../tests/ui_fail/raw_pointer_type.stderr | 0 .../tests/ui_fail/uninhabited_enum.rs | 0 .../tests/ui_fail/uninhabited_enum.stderr | 0 .../tests/ui_pass/ffi_export_arg_pattern.rs | 0 .../iroha_futures}/Cargo.toml | 0 .../iroha_futures}/src/lib.rs | 0 .../iroha_futures}/src/supervisor.rs | 0 .../iroha_futures}/tests/basic.rs | 0 .../iroha_futures_derive}/Cargo.toml | 0 .../iroha_futures_derive}/src/lib.rs | 0 .../iroha_genesis}/Cargo.toml | 0 .../iroha_genesis}/src/lib.rs | 0 .../iroha_kagami}/Cargo.toml | 0 .../iroha_kagami}/README.md | 0 .../iroha_kagami}/src/crypto.rs | 0 .../iroha_kagami}/src/genesis.rs | 0 .../iroha_kagami}/src/genesis/generate.rs | 0 .../iroha_kagami}/src/genesis/sign.rs | 0 .../iroha_kagami}/src/main.rs | 0 .../iroha_kagami}/src/schema.rs | 0 .../iroha_logger}/Cargo.toml | 0 .../iroha_logger}/src/actor.rs | 0 .../iroha_logger}/src/layer.rs | 0 .../iroha_logger}/src/lib.rs | 0 .../iroha_logger}/src/telemetry.rs | 0 .../iroha_logger}/tests/configuration.rs | 0 .../iroha_logger}/tests/log_level.rs | 0 .../iroha_logger}/tests/setting_logger.rs | 0 .../iroha_logger}/tests/telemetry.rs | 0 .../iroha_macro}/Cargo.toml | 0 {iroha_macro => crates/iroha_macro}/README.md | 0 .../iroha_macro}/src/lib.rs | 0 .../iroha_macro_utils}/Cargo.toml | 0 .../iroha_macro_utils}/src/emitter.rs | 0 .../iroha_macro_utils}/src/lib.rs | 0 .../iroha_numeric}/Cargo.toml | 0 .../iroha_numeric}/src/lib.rs | 0 {iroha_p2p => crates/iroha_p2p}/Cargo.toml | 0 {iroha_p2p => crates/iroha_p2p}/src/lib.rs | 0 .../iroha_p2p}/src/network.rs | 0 {iroha_p2p => crates/iroha_p2p}/src/peer.rs | 0 .../iroha_p2p}/tests/integration/mod.rs | 0 .../iroha_p2p}/tests/integration/p2p.rs | 0 {iroha_p2p => crates/iroha_p2p}/tests/mod.rs | 0 .../iroha_primitives}/Cargo.toml | 0 .../iroha_primitives}/src/addr.rs | 0 .../iroha_primitives}/src/cmpext.rs | 0 .../iroha_primitives}/src/const_vec.rs | 0 .../iroha_primitives}/src/conststr.rs | 0 .../iroha_primitives}/src/json.rs | 0 .../iroha_primitives}/src/lib.rs | 0 .../iroha_primitives}/src/must_use.rs | 0 .../iroha_primitives}/src/numeric.rs | 0 .../iroha_primitives}/src/riffle_iter.rs | 0 .../iroha_primitives}/src/small.rs | 0 .../iroha_primitives}/src/time.rs | 0 .../iroha_primitives}/src/unique_vec.rs | 0 .../iroha_primitives}/tests/ui.rs | 0 .../tests/ui_fail/must_use_not_used.rs | 0 .../tests/ui_fail/must_use_not_used.stderr | 0 .../iroha_primitives_derive}/Cargo.toml | 0 .../iroha_primitives_derive}/src/lib.rs | 0 .../iroha_primitives_derive}/src/numeric.rs | 0 .../src/socket_addr.rs | 0 .../iroha_schema}/Cargo.toml | 0 .../iroha_schema}/src/lib.rs | 0 .../iroha_schema}/src/serialize.rs | 0 .../tests/architecture-dependent.rs | 0 .../tests/enum_with_default_discriminants.rs | 0 .../tests/enum_with_various_discriminants.rs | 0 .../iroha_schema}/tests/fieldless_enum.rs | 0 .../tests/numbers_compact_and_fixed.rs | 0 .../iroha_schema}/tests/schema_json.rs | 0 .../tests/struct_with_generic_bounds.rs | 0 .../tests/struct_with_named_fields.rs | 0 .../tests/struct_with_unnamed_fields.rs | 0 .../iroha_schema}/tests/transparent_types.rs | 0 .../iroha_schema_derive}/Cargo.toml | 0 .../iroha_schema_derive}/src/lib.rs | 0 .../iroha_schema_derive}/tests/ui.rs | 0 ...eldless_enum_with_explicit_discriminant.rs | 0 ...ess_enum_with_explicit_discriminant.stderr | 0 .../tests/ui_pass/derive_into_schema.rs | 0 .../iroha_schema_gen}/Cargo.toml | 0 .../iroha_schema_gen}/src/lib.rs | 0 .../iroha_smart_contract}/.cargo/config.toml | 0 .../iroha_smart_contract}/Cargo.toml | 0 .../iroha_smart_contract}/LICENSE | 0 .../iroha_smart_contract}/README.md | 0 .../iroha_smart_contract}/src/lib.rs | 0 .../iroha_smart_contract_derive}/Cargo.toml | 0 .../src/entrypoint.rs | 0 .../iroha_smart_contract_derive}/src/lib.rs | 0 .../iroha_smart_contract_utils}/Cargo.toml | 0 .../iroha_smart_contract_utils}/src/debug.rs | 0 .../iroha_smart_contract_utils}/src/lib.rs | 0 .../iroha_smart_contract_utils}/src/log.rs | 0 .../iroha_swarm}/Cargo.toml | 0 {iroha_swarm => crates/iroha_swarm}/README.md | 0 .../iroha_swarm}/src/lib.rs | 0 .../iroha_swarm}/src/main.rs | 0 .../iroha_swarm}/src/path.rs | 0 .../iroha_swarm}/src/peer.rs | 0 .../iroha_swarm}/src/schema.rs | 0 .../iroha_swarm}/src/schema/serde_impls.rs | 0 .../iroha_telemetry}/Cargo.toml | 0 .../iroha_telemetry}/build.rs | 0 .../iroha_telemetry}/src/dev.rs | 0 .../iroha_telemetry}/src/futures.rs | 0 .../iroha_telemetry}/src/lib.rs | 0 .../iroha_telemetry}/src/metrics.rs | 0 .../iroha_telemetry}/src/retry_period.rs | 0 .../iroha_telemetry}/src/ws.rs | 0 .../iroha_telemetry_derive}/Cargo.toml | 0 .../iroha_telemetry_derive}/src/lib.rs | 0 .../iroha_telemetry_derive}/tests/ui.rs | 0 .../tests/ui_fail/args_no_wsv.rs | 0 .../tests/ui_fail/args_no_wsv.stderr | 0 .../tests/ui_fail/bare_spec.rs | 0 .../tests/ui_fail/bare_spec.stderr | 0 .../tests/ui_fail/doubled_plus.rs | 0 .../tests/ui_fail/doubled_plus.stderr | 0 .../tests/ui_fail/no_args.rs | 0 .../tests/ui_fail/no_args.stderr | 0 .../tests/ui_fail/non_snake_case_name.rs | 0 .../tests/ui_fail/non_snake_case_name.stderr | 0 .../tests/ui_fail/not_execute.rs | 0 .../tests/ui_fail/not_execute.stderr | 0 .../tests/ui_fail/not_return_result.rs | 0 .../tests/ui_fail/not_return_result.stderr | 0 .../tests/ui_fail/return_nothing.rs | 0 .../tests/ui_fail/return_nothing.stderr | 0 .../tests/ui_fail/trailing_plus.rs | 0 .../tests/ui_fail/trailing_plus.stderr | 0 .../iroha_test_network}/Cargo.toml | 0 .../iroha_test_network}/src/lib.rs | 0 .../iroha_test_samples}/Cargo.toml | 0 .../iroha_test_samples}/src/lib.rs | 0 .../iroha_torii}/Cargo.toml | 0 crates/iroha_torii/__init__.py | 0 .../iroha_torii}/pytests/README.md | 0 crates/iroha_torii/pytests/__init__.py | 0 crates/iroha_torii/pytests/common/__init__.py | 0 .../get_configuration_response_schema.json | 0 .../common/schemas/get_schema_response.json | 0 .../common/schemas/get_status_response.json | 0 .../iroha_torii}/pytests/common/settings.py | 0 .../iroha_torii}/pytests/poetry.lock | 0 .../iroha_torii}/pytests/pyproject.toml | 0 .../iroha_torii}/pytests/test/__init__.py | 0 .../pytests/test/api_version/__init__.py | 0 .../pytests/test/api_version/conftest.py | 0 .../test/api_version/test_api_version.py | 0 .../pytests/test/configuration/__init__.py | 0 .../pytests/test/configuration/conftest.py | 0 .../configuration/test_get_configuration.py | 0 .../configuration/test_post_configuration.py | 0 .../iroha_torii}/pytests/test/conftest.py | 0 .../pytests/test/general/__init__.py | 0 .../pytests/test/general/conftest.py | 0 .../test/general/test_200_status_codes.py | 0 .../test/general/test_400_status_codes.py | 0 .../pytests/test/health/__init__.py | 0 .../pytests/test/health/conftest.py | 0 .../pytests/test/health/test_health.py | 0 .../pytests/test/schema/__init__.py | 0 .../pytests/test/schema/conftest.py | 0 .../pytests/test/schema/test_schema.py | 0 .../pytests/test/status/__init__.py | 0 .../pytests/test/status/conftest.py | 0 .../pytests/test/status/test_status.py | 0 .../iroha_torii}/src/event.rs | 0 .../iroha_torii}/src/lib.rs | 0 .../iroha_torii}/src/routing.rs | 0 .../iroha_torii}/src/stream.rs | 0 .../iroha_torii}/src/utils.rs | 0 .../iroha_torii_const}/Cargo.toml | 0 .../iroha_torii_const}/src/lib.rs | 0 .../iroha_trigger}/Cargo.toml | 0 .../iroha_trigger}/src/lib.rs | 0 .../iroha_trigger_derive}/Cargo.toml | 0 .../iroha_trigger_derive}/src/entrypoint.rs | 0 .../iroha_trigger_derive}/src/lib.rs | 0 .../iroha_version}/Cargo.toml | 0 .../iroha_version}/src/lib.rs | 0 .../iroha_version_derive}/Cargo.toml | 0 .../iroha_version_derive}/src/lib.rs | 0 .../iroha_version_derive}/tests/json.rs | 0 .../iroha_version_derive}/tests/scale.rs | 0 .../iroha_version_derive}/tests/ui.rs | 0 .../field_missing_in_version_attribute.rs | 0 .../field_missing_in_version_attribute.stderr | 0 .../field_typo_in_version_attribute.rs | 0 .../field_typo_in_version_attribute.stderr | 0 .../tests/ui_fail/invalid_range_equal.rs | 0 .../tests/ui_fail/invalid_range_equal.stderr | 0 .../tests/ui_fail/invalid_range_less.rs | 0 .../tests/ui_fail/invalid_range_less.stderr | 0 .../unknown_field_in_version_attribute.rs | 0 .../unknown_field_in_version_attribute.stderr | 0 .../ui_pass/declare_several_versioned.rs | 0 .../tests/ui_pass/declare_versioned.rs | 0 .../tests/ui_pass/declare_versioned_json.rs | 0 .../tests/ui_pass/declare_versioned_scale.rs | 0 .../iroha_wasm_builder}/Cargo.toml | 0 .../iroha_wasm_builder}/README.md | 0 .../iroha_wasm_builder}/src/lib.rs | 0 .../iroha_wasm_builder}/src/main.rs | 0 .../iroha_wasm_codec}/Cargo.toml | 0 .../iroha_wasm_codec}/src/lib.rs | 0 .../iroha_wasm_codec_derive}/Cargo.toml | 0 .../iroha_wasm_codec_derive}/src/lib.rs | 0 .../iroha_wasm_test_runner}/Cargo.toml | 0 .../iroha_wasm_test_runner}/src/main.rs | 0 {irohad => crates/irohad}/Cargo.toml | 0 {irohad => crates/irohad}/README.md | 2 +- {irohad => crates/irohad}/build.rs | 0 {irohad => crates/irohad}/src/lib.rs | 0 {irohad => crates/irohad}/src/main.rs | 0 {irohad => crates/irohad}/src/samples.rs | 0 .../kura_inspector}/Cargo.toml | 0 .../kura_inspector}/README.md | 0 .../kura_inspector}/src/main.rs | 0 docs/README.md | 8 +- wasm_samples/Cargo.toml | 12 +- wasm_samples/default_executor/README.md | 2 +- wasm_samples/multisig/Cargo.toml | 2 +- wasm_samples/multisig_register/Cargo.toml | 2 +- 646 files changed, 143 insertions(+), 143 deletions(-) rename {iroha_cli/pytests/common => crates}/__init__.py (100%) rename {iroha => crates/iroha}/Cargo.toml (98%) rename {iroha => crates/iroha}/README.md (100%) rename {iroha => crates/iroha}/benches/torii.rs (97%) rename {iroha => crates/iroha}/benches/tps/README.md (100%) rename {iroha => crates/iroha}/benches/tps/config.json (100%) rename {iroha => crates/iroha}/benches/tps/dev.rs (100%) rename {iroha => crates/iroha}/benches/tps/oneshot.rs (100%) rename {iroha => crates/iroha}/benches/tps/utils.rs (100%) rename {iroha => crates/iroha}/examples/million_accounts_genesis.rs (97%) rename {iroha => crates/iroha}/examples/register_1000_triggers.rs (97%) rename {iroha => crates/iroha}/examples/tutorial.rs (100%) rename {iroha => crates/iroha}/src/client.rs (100%) rename {iroha => crates/iroha}/src/config.rs (100%) rename {iroha => crates/iroha}/src/config/user.rs (100%) rename {iroha => crates/iroha}/src/http.rs (100%) rename {iroha => crates/iroha}/src/http_default.rs (100%) rename {iroha => crates/iroha}/src/lib.rs (100%) rename {iroha => crates/iroha}/src/query.rs (100%) rename {iroha => crates/iroha}/tests/integration/asset.rs (100%) rename {iroha => crates/iroha}/tests/integration/asset_propagation.rs (100%) rename {iroha => crates/iroha}/tests/integration/events/data.rs (100%) rename {iroha => crates/iroha}/tests/integration/events/mod.rs (100%) rename {iroha => crates/iroha}/tests/integration/events/notification.rs (100%) rename {iroha => crates/iroha}/tests/integration/events/pipeline.rs (100%) rename {iroha => crates/iroha}/tests/integration/extra_functional/connected_peers.rs (100%) rename {iroha => crates/iroha}/tests/integration/extra_functional/genesis.rs (100%) rename {iroha => crates/iroha}/tests/integration/extra_functional/mod.rs (100%) rename {iroha => crates/iroha}/tests/integration/extra_functional/multiple_blocks_created.rs (100%) rename {iroha => crates/iroha}/tests/integration/extra_functional/normal.rs (100%) rename {iroha => crates/iroha}/tests/integration/extra_functional/offline_peers.rs (100%) rename {iroha => crates/iroha}/tests/integration/extra_functional/restart_peer.rs (100%) rename {iroha => crates/iroha}/tests/integration/extra_functional/unregister_peer.rs (100%) rename {iroha => crates/iroha}/tests/integration/extra_functional/unstable_network.rs (100%) rename {iroha => crates/iroha}/tests/integration/mod.rs (100%) rename {iroha => crates/iroha}/tests/integration/multisig.rs (98%) rename {iroha => crates/iroha}/tests/integration/non_mintable.rs (100%) rename {iroha => crates/iroha}/tests/integration/pagination.rs (100%) rename {iroha => crates/iroha}/tests/integration/permissions.rs (100%) rename {iroha => crates/iroha}/tests/integration/queries/account.rs (100%) rename {iroha => crates/iroha}/tests/integration/queries/asset.rs (100%) rename {iroha => crates/iroha}/tests/integration/queries/mod.rs (100%) rename {iroha => crates/iroha}/tests/integration/queries/query_errors.rs (100%) rename {iroha => crates/iroha}/tests/integration/queries/role.rs (100%) rename {iroha => crates/iroha}/tests/integration/queries/smart_contract.rs (90%) rename {iroha => crates/iroha}/tests/integration/roles.rs (100%) rename {iroha => crates/iroha}/tests/integration/set_parameter.rs (100%) rename {iroha => crates/iroha}/tests/integration/sorting.rs (100%) rename {iroha => crates/iroha}/tests/integration/status_response.rs (100%) rename {iroha => crates/iroha}/tests/integration/transfer_asset.rs (100%) rename {iroha => crates/iroha}/tests/integration/transfer_domain.rs (100%) rename {iroha => crates/iroha}/tests/integration/triggers/by_call_trigger.rs (98%) rename {iroha => crates/iroha}/tests/integration/triggers/data_trigger.rs (100%) rename {iroha => crates/iroha}/tests/integration/triggers/event_trigger.rs (100%) rename {iroha => crates/iroha}/tests/integration/triggers/mod.rs (100%) rename {iroha => crates/iroha}/tests/integration/triggers/orphans.rs (100%) rename {iroha => crates/iroha}/tests/integration/triggers/time_trigger.rs (99%) rename {iroha => crates/iroha}/tests/integration/triggers/trigger_rollback.rs (100%) rename {iroha => crates/iroha}/tests/integration/tx_chain_id.rs (100%) rename {iroha => crates/iroha}/tests/integration/tx_history.rs (100%) rename {iroha => crates/iroha}/tests/integration/tx_rollback.rs (100%) rename {iroha => crates/iroha}/tests/integration/upgrade.rs (95%) rename {iroha => crates/iroha}/tests/mod.rs (100%) rename {iroha => crates/iroha}/tests/ui_fail/cant_filter_singular_query.rs (100%) rename {iroha_cli => crates/iroha_cli}/.gitignore (100%) rename {iroha_cli => crates/iroha_cli}/Cargo.toml (100%) rename {iroha_cli => crates/iroha_cli}/README.md (100%) rename {iroha_cli/pytests/src => crates/iroha_cli}/__init__.py (100%) rename {iroha_cli => crates/iroha_cli}/build.rs (100%) rename {iroha_cli => crates/iroha_cli}/pytests/.gitignore (100%) rename {iroha_cli => crates/iroha_cli}/pytests/README.md (96%) create mode 100644 crates/iroha_cli/pytests/__init__.py create mode 100644 crates/iroha_cli/pytests/common/__init__.py rename {iroha_cli => crates/iroha_cli}/pytests/common/consts.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/common/helpers.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/common/json_isi_examples/unregister_asset.json (100%) rename {iroha_cli => crates/iroha_cli}/pytests/common/settings.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/models/__init__.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/models/account.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/models/asset.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/models/domain.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/poetry.lock (100%) rename {iroha_cli => crates/iroha_cli}/pytests/pyproject.toml (100%) create mode 100644 crates/iroha_cli/pytests/src/__init__.py rename {iroha_cli => crates/iroha_cli}/pytests/src/iroha_cli/__init__.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/src/iroha_cli/configuration.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/src/iroha_cli/have.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/src/iroha_cli/iroha.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/src/iroha_cli/iroha_cli.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/src/iroha_cli/match.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/__init__.py (100%) create mode 100644 crates/iroha_cli/pytests/test/accounts/__init__.py rename {iroha_cli => crates/iroha_cli}/pytests/test/accounts/conftest.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/accounts/test_accounts_query_filters.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/accounts/test_register_accounts.py (100%) create mode 100644 crates/iroha_cli/pytests/test/assets/__init__.py rename {iroha_cli => crates/iroha_cli}/pytests/test/assets/conftest.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/assets/test_assets_query_filters.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/assets/test_burn_assets.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/assets/test_mint_assets.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/assets/test_register_asset_definitions.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/assets/test_transfer_assets.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/assets/test_unregister_asset.py (100%) create mode 100644 crates/iroha_cli/pytests/test/atomicity/__init__.py rename {iroha_cli => crates/iroha_cli}/pytests/test/atomicity/conftest.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/atomicity/test_multiple_instructions_within_transaction.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/atomicity/test_pair_instructions_within_transaction.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/atomicity/test_wrong_instructions_within_transaction.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/conftest.py (100%) create mode 100644 crates/iroha_cli/pytests/test/domains/__init__.py rename {iroha_cli => crates/iroha_cli}/pytests/test/domains/conftest.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/domains/test_domains_query_filters.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/domains/test_register_domains.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/domains/test_transfer_domains.py (100%) create mode 100644 crates/iroha_cli/pytests/test/triggers/__init__.py rename {iroha_cli => crates/iroha_cli}/pytests/test/triggers/conftest.py (100%) rename {iroha_cli => crates/iroha_cli}/pytests/test/triggers/test_register_trigger.py (100%) rename {iroha_cli => crates/iroha_cli}/src/main.rs (100%) rename {iroha_codec => crates/iroha_codec}/Cargo.toml (100%) rename {iroha_codec => crates/iroha_codec}/README.md (100%) rename {iroha_codec => crates/iroha_codec}/build.rs (100%) rename {iroha_codec => crates/iroha_codec}/samples/account.bin (100%) rename {iroha_codec => crates/iroha_codec}/samples/account.json (100%) rename {iroha_codec => crates/iroha_codec}/samples/domain.bin (100%) rename {iroha_codec => crates/iroha_codec}/samples/domain.json (100%) rename {iroha_codec => crates/iroha_codec}/samples/trigger.bin (100%) rename {iroha_codec => crates/iroha_codec}/samples/trigger.json (100%) rename {iroha_codec => crates/iroha_codec}/src/main.rs (100%) rename {iroha_config => crates/iroha_config}/Cargo.toml (100%) rename {iroha_config => crates/iroha_config}/iroha_test_config.toml (100%) rename {iroha_config => crates/iroha_config}/src/client_api.rs (100%) rename {iroha_config => crates/iroha_config}/src/kura.rs (100%) rename {iroha_config => crates/iroha_config}/src/lib.rs (100%) rename {iroha_config => crates/iroha_config}/src/logger.rs (100%) rename {iroha_config => crates/iroha_config}/src/parameters/actual.rs (100%) rename {iroha_config => crates/iroha_config}/src/parameters/defaults.rs (100%) rename {iroha_config => crates/iroha_config}/src/parameters/mod.rs (100%) rename {iroha_config => crates/iroha_config}/src/parameters/user.rs (100%) rename {iroha_config => crates/iroha_config}/src/snapshot.rs (100%) rename {iroha_config => crates/iroha_config}/src/wasm.rs (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures.rs (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/absolute_paths.toml (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/bad.extra_fields.toml (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/bad.missing_fields.toml (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/bad.multiple_bad_envs.env (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/bad.torii_addr_eq_p2p_addr.toml (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/base.toml (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/base_trusted_peers.toml (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/full.env (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/full.toml (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/minimal_alone_with_genesis.toml (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/minimal_file_and_env.env (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/minimal_file_and_env.toml (100%) rename {iroha_config => crates/iroha_config}/tests/fixtures/minimal_with_trusted_peers.toml (100%) rename {iroha_config_base => crates/iroha_config_base}/Cargo.toml (100%) rename {iroha_config_base => crates/iroha_config_base}/src/attach.rs (100%) rename {iroha_config_base => crates/iroha_config_base}/src/env.rs (100%) rename {iroha_config_base => crates/iroha_config_base}/src/lib.rs (100%) rename {iroha_config_base => crates/iroha_config_base}/src/read.rs (100%) rename {iroha_config_base => crates/iroha_config_base}/src/toml.rs (100%) rename {iroha_config_base => crates/iroha_config_base}/src/util.rs (100%) rename {iroha_config_base => crates/iroha_config_base}/tests/bad.invalid-extends.toml (100%) rename {iroha_config_base => crates/iroha_config_base}/tests/bad.invalid-nested-extends.base.toml (100%) rename {iroha_config_base => crates/iroha_config_base}/tests/bad.invalid-nested-extends.toml (100%) rename {iroha_config_base => crates/iroha_config_base}/tests/misc.rs (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/Cargo.toml (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/src/lib.rs (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui.rs (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/generics.rs (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/generics.stderr (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/invalid_attrs_commas.rs (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/invalid_attrs_commas.stderr (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/invalid_attrs_conflicts.rs (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/invalid_attrs_conflicts.stderr (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/invalid_attrs_default_invalid_expr.rs (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/invalid_attrs_env_without_var.rs (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/invalid_attrs_env_without_var.stderr (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/invalid_attrs_struct.rs (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/invalid_attrs_struct.stderr (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/unsupported_shapes.rs (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_fail/unsupported_shapes.stderr (100%) rename {iroha_config_base_derive => crates/iroha_config_base_derive}/tests/ui_pass/happy_path.rs (100%) rename {iroha_core => crates/iroha_core}/Cargo.toml (100%) rename {iroha_core => crates/iroha_core}/benches/blocks/apply_blocks.rs (100%) rename {iroha_core => crates/iroha_core}/benches/blocks/apply_blocks_benchmark.rs (100%) rename {iroha_core => crates/iroha_core}/benches/blocks/apply_blocks_oneshot.rs (100%) rename {iroha_core => crates/iroha_core}/benches/blocks/common.rs (100%) rename {iroha_core => crates/iroha_core}/benches/blocks/validate_blocks.rs (100%) rename {iroha_core => crates/iroha_core}/benches/blocks/validate_blocks_benchmark.rs (100%) rename {iroha_core => crates/iroha_core}/benches/blocks/validate_blocks_oneshot.rs (100%) rename {iroha_core => crates/iroha_core}/benches/kura.rs (100%) rename {iroha_core => crates/iroha_core}/benches/validation.rs (100%) rename {iroha_core => crates/iroha_core}/clippy.toml (100%) rename {iroha_core => crates/iroha_core}/src/block.rs (100%) rename {iroha_core => crates/iroha_core}/src/block_sync.rs (100%) rename {iroha_core => crates/iroha_core}/src/executor.rs (100%) rename {iroha_core => crates/iroha_core}/src/gossiper.rs (100%) rename {iroha_core => crates/iroha_core}/src/kiso.rs (100%) rename {iroha_core => crates/iroha_core}/src/kura.rs (100%) rename {iroha_core => crates/iroha_core}/src/lib.rs (100%) rename {iroha_core => crates/iroha_core}/src/metrics.rs (100%) rename {iroha_core => crates/iroha_core}/src/query/cursor.rs (100%) rename {iroha_core => crates/iroha_core}/src/query/mod.rs (100%) rename {iroha_core => crates/iroha_core}/src/query/pagination.rs (100%) rename {iroha_core => crates/iroha_core}/src/query/store.rs (100%) rename {iroha_core => crates/iroha_core}/src/queue.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/isi/account.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/isi/asset.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/isi/block.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/isi/domain.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/isi/mod.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/isi/query.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/isi/triggers/mod.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/isi/triggers/set.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/isi/triggers/specialized.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/isi/tx.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/isi/world.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/mod.rs (100%) rename {iroha_core => crates/iroha_core}/src/smartcontracts/wasm.rs (100%) rename {iroha_core => crates/iroha_core}/src/snapshot.rs (100%) rename {iroha_core => crates/iroha_core}/src/state.rs (100%) rename {iroha_core => crates/iroha_core}/src/sumeragi/main_loop.rs (100%) rename {iroha_core => crates/iroha_core}/src/sumeragi/message.rs (100%) rename {iroha_core => crates/iroha_core}/src/sumeragi/mod.rs (100%) rename {iroha_core => crates/iroha_core}/src/sumeragi/network_topology.rs (100%) rename {iroha_core => crates/iroha_core}/src/sumeragi/view_change.rs (100%) rename {iroha_core => crates/iroha_core}/src/tx.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/Cargo.toml (100%) rename {iroha_crypto => crates/iroha_crypto}/build.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/encryption/chacha20poly1305.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/encryption/mod.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/hash.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/kex/mod.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/kex/x25519.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/lib.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/merkle.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/multihash.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/secrecy.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/signature/bls/implementation.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/signature/bls/mod.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/signature/bls/tests.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/signature/ed25519.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/signature/mod.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/signature/secp256k1.rs (100%) rename {iroha_crypto => crates/iroha_crypto}/src/varint.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/Cargo.toml (100%) rename {iroha_data_model => crates/iroha_data_model}/benches/time_event_filter.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/build.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/clippy.toml (100%) rename {iroha_data_model => crates/iroha_data_model}/src/account.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/asset.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/block.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/domain.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/events/data/events.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/events/data/filters.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/events/data/mod.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/events/execute_trigger.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/events/mod.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/events/pipeline.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/events/time.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/events/trigger_completed.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/executor.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/ipfs.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/isi.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/lib.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/metadata.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/name.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/parameter.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/peer.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/permission.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/builder.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/mod.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/parameters.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/mod.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/predicate_ast_extensions.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/predicate_atoms/account.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/predicate_atoms/asset.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/predicate_atoms/block.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/predicate_atoms/domain.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/predicate_atoms/mod.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/predicate_atoms/parameter.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/predicate_atoms/peer.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/predicate_atoms/permission.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/predicate_atoms/role.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/predicate_atoms/trigger.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/predicate_combinators.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/projectors.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/prototypes/account.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/prototypes/asset.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/prototypes/block.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/prototypes/domain.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/prototypes/mod.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/prototypes/parameter.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/prototypes/peer.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/prototypes/permission.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/prototypes/role.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/query/predicate/prototypes/trigger.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/role.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/smart_contract.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/transaction.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/trigger.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/src/visit.rs (100%) rename {iroha_data_model => crates/iroha_data_model}/tests/data_model.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/Cargo.toml (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/src/enum_ref.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/src/event_set.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/src/has_origin.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/src/id.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/src/lib.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/src/model.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/src/partially_tagged/mod.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/src/partially_tagged/resolve_self.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/event_set.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/has_origin.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/has_origin_generics.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/id_eq_ord_hash.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/partial_tagged_serde.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/partial_tagged_serde_self.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/ui.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/ui_fail/has_origin_multiple_attributes.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/ui_fail/has_origin_multiple_attributes.stderr (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/ui_fail/transparent_api_private_field.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/ui_fail/transparent_api_private_field.stderr (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/ui_fail/transparent_api_private_item.rs (100%) rename {iroha_data_model_derive => crates/iroha_data_model_derive}/tests/ui_fail/transparent_api_private_item.stderr (85%) rename {iroha_derive => crates/iroha_derive}/Cargo.toml (100%) rename {iroha_derive => crates/iroha_derive}/src/lib.rs (100%) rename {iroha_derive => crates/iroha_derive}/tests/container_enum_from_variant.rs (100%) rename {iroha_derive => crates/iroha_derive}/tests/enum_from_variant_attrs.rs (100%) rename {iroha_derive => crates/iroha_derive}/tests/ui.rs (100%) rename {iroha_derive => crates/iroha_derive}/tests/ui_fail/from_variant_conflicting_implementation.rs (100%) rename {iroha_derive => crates/iroha_derive}/tests/ui_fail/from_variant_conflicting_implementation.stderr (100%) rename {iroha_derive => crates/iroha_derive}/tests/ui_fail/from_variant_incorrect_attr_placement.rs (100%) rename {iroha_derive => crates/iroha_derive}/tests/ui_fail/from_variant_incorrect_attr_placement.stderr (100%) rename {iroha_derive => crates/iroha_derive}/tests/ui_fail/from_variant_same_type.rs (100%) rename {iroha_derive => crates/iroha_derive}/tests/ui_fail/from_variant_same_type.stderr (100%) rename {iroha_derive => crates/iroha_derive}/tests/ui_fail/struct_from_variant.rs (100%) rename {iroha_derive => crates/iroha_derive}/tests/ui_fail/struct_from_variant.stderr (100%) rename {iroha_derive => crates/iroha_derive}/tests/ui_pass/enum_from_variant.rs (100%) rename {iroha_executor => crates/iroha_executor}/Cargo.toml (100%) rename {iroha_executor => crates/iroha_executor}/src/default.rs (100%) rename {iroha_executor => crates/iroha_executor}/src/lib.rs (100%) rename {iroha_executor => crates/iroha_executor}/src/permission.rs (100%) rename {iroha_executor_data_model => crates/iroha_executor_data_model}/Cargo.toml (100%) rename {iroha_executor_data_model => crates/iroha_executor_data_model}/src/lib.rs (100%) rename {iroha_executor_data_model => crates/iroha_executor_data_model}/src/parameter.rs (100%) rename {iroha_executor_data_model => crates/iroha_executor_data_model}/src/permission.rs (100%) rename {iroha_executor_data_model_derive => crates/iroha_executor_data_model_derive}/Cargo.toml (100%) rename {iroha_executor_data_model_derive => crates/iroha_executor_data_model_derive}/src/lib.rs (100%) rename {iroha_executor_data_model_derive => crates/iroha_executor_data_model_derive}/src/parameter.rs (100%) rename {iroha_executor_data_model_derive => crates/iroha_executor_data_model_derive}/src/permission.rs (100%) rename {iroha_executor_derive => crates/iroha_executor_derive}/Cargo.toml (100%) rename {iroha_executor_derive => crates/iroha_executor_derive}/src/default.rs (100%) rename {iroha_executor_derive => crates/iroha_executor_derive}/src/entrypoint.rs (100%) rename {iroha_executor_derive => crates/iroha_executor_derive}/src/lib.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/.cargo/config.toml (100%) rename {iroha_ffi => crates/iroha_ffi}/Cargo.toml (100%) rename {iroha_ffi => crates/iroha_ffi}/src/handle.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/src/ir.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/src/lib.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/src/option.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/src/primitives.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/src/repr_c.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/src/slice.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/src/std_impls.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/tests/export_getset.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/tests/export_shared_fns.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/tests/ffi_export.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/tests/ffi_export_import_u128_i128.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/tests/ffi_import.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/tests/ffi_import_opaque.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/tests/generics.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/tests/import_getset.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/tests/import_shared_fns.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/tests/transparent.rs (100%) rename {iroha_ffi => crates/iroha_ffi}/tests/unambiguous.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/Cargo.toml (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/src/attr_parse/derive.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/src/attr_parse/doc.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/src/attr_parse/getset.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/src/attr_parse/mod.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/src/attr_parse/repr.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/src/convert.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/src/ffi_fn.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/src/getset_gen.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/src/impl_visitor.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/src/lib.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/src/wrapper.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/array_as_ptr.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/array_as_ptr.stderr (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/derive_skip_field.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/derive_skip_field.stderr (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/derive_skip_struct.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/derive_skip_struct.stderr (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/fallible_transmute_mut_ref.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/fallible_transmute_mut_ref.stderr (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/fieldless_enum_without_repr.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/fieldless_enum_without_repr.stderr (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/generics_are_forbiden_in_ffi.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/generics_are_forbiden_in_ffi.stderr (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/nested_owned_structure.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/nested_owned_structure.stderr (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/non_robust_repr_c.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/non_robust_repr_c.stderr (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/private_method_inside_impl_are_skipped.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/private_method_inside_impl_are_skipped.stderr (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/raw_pointer_type.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/raw_pointer_type.stderr (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/uninhabited_enum.rs (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_fail/uninhabited_enum.stderr (100%) rename {iroha_ffi_derive => crates/iroha_ffi_derive}/tests/ui_pass/ffi_export_arg_pattern.rs (100%) rename {iroha_futures => crates/iroha_futures}/Cargo.toml (100%) rename {iroha_futures => crates/iroha_futures}/src/lib.rs (100%) rename {iroha_futures => crates/iroha_futures}/src/supervisor.rs (100%) rename {iroha_futures => crates/iroha_futures}/tests/basic.rs (100%) rename {iroha_futures_derive => crates/iroha_futures_derive}/Cargo.toml (100%) rename {iroha_futures_derive => crates/iroha_futures_derive}/src/lib.rs (100%) rename {iroha_genesis => crates/iroha_genesis}/Cargo.toml (100%) rename {iroha_genesis => crates/iroha_genesis}/src/lib.rs (100%) rename {iroha_kagami => crates/iroha_kagami}/Cargo.toml (100%) rename {iroha_kagami => crates/iroha_kagami}/README.md (100%) rename {iroha_kagami => crates/iroha_kagami}/src/crypto.rs (100%) rename {iroha_kagami => crates/iroha_kagami}/src/genesis.rs (100%) rename {iroha_kagami => crates/iroha_kagami}/src/genesis/generate.rs (100%) rename {iroha_kagami => crates/iroha_kagami}/src/genesis/sign.rs (100%) rename {iroha_kagami => crates/iroha_kagami}/src/main.rs (100%) rename {iroha_kagami => crates/iroha_kagami}/src/schema.rs (100%) rename {iroha_logger => crates/iroha_logger}/Cargo.toml (100%) rename {iroha_logger => crates/iroha_logger}/src/actor.rs (100%) rename {iroha_logger => crates/iroha_logger}/src/layer.rs (100%) rename {iroha_logger => crates/iroha_logger}/src/lib.rs (100%) rename {iroha_logger => crates/iroha_logger}/src/telemetry.rs (100%) rename {iroha_logger => crates/iroha_logger}/tests/configuration.rs (100%) rename {iroha_logger => crates/iroha_logger}/tests/log_level.rs (100%) rename {iroha_logger => crates/iroha_logger}/tests/setting_logger.rs (100%) rename {iroha_logger => crates/iroha_logger}/tests/telemetry.rs (100%) rename {iroha_macro => crates/iroha_macro}/Cargo.toml (100%) rename {iroha_macro => crates/iroha_macro}/README.md (100%) rename {iroha_macro => crates/iroha_macro}/src/lib.rs (100%) rename {iroha_macro_utils => crates/iroha_macro_utils}/Cargo.toml (100%) rename {iroha_macro_utils => crates/iroha_macro_utils}/src/emitter.rs (100%) rename {iroha_macro_utils => crates/iroha_macro_utils}/src/lib.rs (100%) rename {iroha_numeric => crates/iroha_numeric}/Cargo.toml (100%) rename {iroha_numeric => crates/iroha_numeric}/src/lib.rs (100%) rename {iroha_p2p => crates/iroha_p2p}/Cargo.toml (100%) rename {iroha_p2p => crates/iroha_p2p}/src/lib.rs (100%) rename {iroha_p2p => crates/iroha_p2p}/src/network.rs (100%) rename {iroha_p2p => crates/iroha_p2p}/src/peer.rs (100%) rename {iroha_p2p => crates/iroha_p2p}/tests/integration/mod.rs (100%) rename {iroha_p2p => crates/iroha_p2p}/tests/integration/p2p.rs (100%) rename {iroha_p2p => crates/iroha_p2p}/tests/mod.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/Cargo.toml (100%) rename {iroha_primitives => crates/iroha_primitives}/src/addr.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/src/cmpext.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/src/const_vec.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/src/conststr.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/src/json.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/src/lib.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/src/must_use.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/src/numeric.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/src/riffle_iter.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/src/small.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/src/time.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/src/unique_vec.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/tests/ui.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/tests/ui_fail/must_use_not_used.rs (100%) rename {iroha_primitives => crates/iroha_primitives}/tests/ui_fail/must_use_not_used.stderr (100%) rename {iroha_primitives_derive => crates/iroha_primitives_derive}/Cargo.toml (100%) rename {iroha_primitives_derive => crates/iroha_primitives_derive}/src/lib.rs (100%) rename {iroha_primitives_derive => crates/iroha_primitives_derive}/src/numeric.rs (100%) rename {iroha_primitives_derive => crates/iroha_primitives_derive}/src/socket_addr.rs (100%) rename {iroha_schema => crates/iroha_schema}/Cargo.toml (100%) rename {iroha_schema => crates/iroha_schema}/src/lib.rs (100%) rename {iroha_schema => crates/iroha_schema}/src/serialize.rs (100%) rename {iroha_schema => crates/iroha_schema}/tests/architecture-dependent.rs (100%) rename {iroha_schema => crates/iroha_schema}/tests/enum_with_default_discriminants.rs (100%) rename {iroha_schema => crates/iroha_schema}/tests/enum_with_various_discriminants.rs (100%) rename {iroha_schema => crates/iroha_schema}/tests/fieldless_enum.rs (100%) rename {iroha_schema => crates/iroha_schema}/tests/numbers_compact_and_fixed.rs (100%) rename {iroha_schema => crates/iroha_schema}/tests/schema_json.rs (100%) rename {iroha_schema => crates/iroha_schema}/tests/struct_with_generic_bounds.rs (100%) rename {iroha_schema => crates/iroha_schema}/tests/struct_with_named_fields.rs (100%) rename {iroha_schema => crates/iroha_schema}/tests/struct_with_unnamed_fields.rs (100%) rename {iroha_schema => crates/iroha_schema}/tests/transparent_types.rs (100%) rename {iroha_schema_derive => crates/iroha_schema_derive}/Cargo.toml (100%) rename {iroha_schema_derive => crates/iroha_schema_derive}/src/lib.rs (100%) rename {iroha_schema_derive => crates/iroha_schema_derive}/tests/ui.rs (100%) rename {iroha_schema_derive => crates/iroha_schema_derive}/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs (100%) rename {iroha_schema_derive => crates/iroha_schema_derive}/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr (100%) rename {iroha_schema_derive => crates/iroha_schema_derive}/tests/ui_pass/derive_into_schema.rs (100%) rename {iroha_schema_gen => crates/iroha_schema_gen}/Cargo.toml (100%) rename {iroha_schema_gen => crates/iroha_schema_gen}/src/lib.rs (100%) rename {iroha_smart_contract => crates/iroha_smart_contract}/.cargo/config.toml (100%) rename {iroha_smart_contract => crates/iroha_smart_contract}/Cargo.toml (100%) rename {iroha_smart_contract => crates/iroha_smart_contract}/LICENSE (100%) rename {iroha_smart_contract => crates/iroha_smart_contract}/README.md (100%) rename {iroha_smart_contract => crates/iroha_smart_contract}/src/lib.rs (100%) rename {iroha_smart_contract_derive => crates/iroha_smart_contract_derive}/Cargo.toml (100%) rename {iroha_smart_contract_derive => crates/iroha_smart_contract_derive}/src/entrypoint.rs (100%) rename {iroha_smart_contract_derive => crates/iroha_smart_contract_derive}/src/lib.rs (100%) rename {iroha_smart_contract_utils => crates/iroha_smart_contract_utils}/Cargo.toml (100%) rename {iroha_smart_contract_utils => crates/iroha_smart_contract_utils}/src/debug.rs (100%) rename {iroha_smart_contract_utils => crates/iroha_smart_contract_utils}/src/lib.rs (100%) rename {iroha_smart_contract_utils => crates/iroha_smart_contract_utils}/src/log.rs (100%) rename {iroha_swarm => crates/iroha_swarm}/Cargo.toml (100%) rename {iroha_swarm => crates/iroha_swarm}/README.md (100%) rename {iroha_swarm => crates/iroha_swarm}/src/lib.rs (100%) rename {iroha_swarm => crates/iroha_swarm}/src/main.rs (100%) rename {iroha_swarm => crates/iroha_swarm}/src/path.rs (100%) rename {iroha_swarm => crates/iroha_swarm}/src/peer.rs (100%) rename {iroha_swarm => crates/iroha_swarm}/src/schema.rs (100%) rename {iroha_swarm => crates/iroha_swarm}/src/schema/serde_impls.rs (100%) rename {iroha_telemetry => crates/iroha_telemetry}/Cargo.toml (100%) rename {iroha_telemetry => crates/iroha_telemetry}/build.rs (100%) rename {iroha_telemetry => crates/iroha_telemetry}/src/dev.rs (100%) rename {iroha_telemetry => crates/iroha_telemetry}/src/futures.rs (100%) rename {iroha_telemetry => crates/iroha_telemetry}/src/lib.rs (100%) rename {iroha_telemetry => crates/iroha_telemetry}/src/metrics.rs (100%) rename {iroha_telemetry => crates/iroha_telemetry}/src/retry_period.rs (100%) rename {iroha_telemetry => crates/iroha_telemetry}/src/ws.rs (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/Cargo.toml (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/src/lib.rs (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui.rs (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/args_no_wsv.rs (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/args_no_wsv.stderr (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/bare_spec.rs (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/bare_spec.stderr (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/doubled_plus.rs (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/doubled_plus.stderr (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/no_args.rs (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/no_args.stderr (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/non_snake_case_name.rs (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/non_snake_case_name.stderr (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/not_execute.rs (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/not_execute.stderr (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/not_return_result.rs (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/not_return_result.stderr (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/return_nothing.rs (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/return_nothing.stderr (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/trailing_plus.rs (100%) rename {iroha_telemetry_derive => crates/iroha_telemetry_derive}/tests/ui_fail/trailing_plus.stderr (100%) rename {iroha_test_network => crates/iroha_test_network}/Cargo.toml (100%) rename {iroha_test_network => crates/iroha_test_network}/src/lib.rs (100%) rename {iroha_test_samples => crates/iroha_test_samples}/Cargo.toml (100%) rename {iroha_test_samples => crates/iroha_test_samples}/src/lib.rs (100%) rename {iroha_torii => crates/iroha_torii}/Cargo.toml (100%) create mode 100644 crates/iroha_torii/__init__.py rename {iroha_torii => crates/iroha_torii}/pytests/README.md (100%) create mode 100644 crates/iroha_torii/pytests/__init__.py create mode 100644 crates/iroha_torii/pytests/common/__init__.py rename {iroha_torii => crates/iroha_torii}/pytests/common/schemas/get_configuration_response_schema.json (100%) rename {iroha_torii => crates/iroha_torii}/pytests/common/schemas/get_schema_response.json (100%) rename {iroha_torii => crates/iroha_torii}/pytests/common/schemas/get_status_response.json (100%) rename {iroha_torii => crates/iroha_torii}/pytests/common/settings.py (100%) rename {iroha_torii => crates/iroha_torii}/pytests/poetry.lock (100%) rename {iroha_torii => crates/iroha_torii}/pytests/pyproject.toml (100%) rename {iroha_torii => crates/iroha_torii}/pytests/test/__init__.py (100%) create mode 100644 crates/iroha_torii/pytests/test/api_version/__init__.py rename {iroha_torii => crates/iroha_torii}/pytests/test/api_version/conftest.py (100%) rename {iroha_torii => crates/iroha_torii}/pytests/test/api_version/test_api_version.py (100%) create mode 100644 crates/iroha_torii/pytests/test/configuration/__init__.py rename {iroha_torii => crates/iroha_torii}/pytests/test/configuration/conftest.py (100%) rename {iroha_torii => crates/iroha_torii}/pytests/test/configuration/test_get_configuration.py (100%) rename {iroha_torii => crates/iroha_torii}/pytests/test/configuration/test_post_configuration.py (100%) rename {iroha_torii => crates/iroha_torii}/pytests/test/conftest.py (100%) create mode 100644 crates/iroha_torii/pytests/test/general/__init__.py rename {iroha_torii => crates/iroha_torii}/pytests/test/general/conftest.py (100%) rename {iroha_torii => crates/iroha_torii}/pytests/test/general/test_200_status_codes.py (100%) rename {iroha_torii => crates/iroha_torii}/pytests/test/general/test_400_status_codes.py (100%) create mode 100644 crates/iroha_torii/pytests/test/health/__init__.py rename {iroha_torii => crates/iroha_torii}/pytests/test/health/conftest.py (100%) rename {iroha_torii => crates/iroha_torii}/pytests/test/health/test_health.py (100%) create mode 100644 crates/iroha_torii/pytests/test/schema/__init__.py rename {iroha_torii => crates/iroha_torii}/pytests/test/schema/conftest.py (100%) rename {iroha_torii => crates/iroha_torii}/pytests/test/schema/test_schema.py (100%) create mode 100644 crates/iroha_torii/pytests/test/status/__init__.py rename {iroha_torii => crates/iroha_torii}/pytests/test/status/conftest.py (100%) rename {iroha_torii => crates/iroha_torii}/pytests/test/status/test_status.py (100%) rename {iroha_torii => crates/iroha_torii}/src/event.rs (100%) rename {iroha_torii => crates/iroha_torii}/src/lib.rs (100%) rename {iroha_torii => crates/iroha_torii}/src/routing.rs (100%) rename {iroha_torii => crates/iroha_torii}/src/stream.rs (100%) rename {iroha_torii => crates/iroha_torii}/src/utils.rs (100%) rename {iroha_torii_const => crates/iroha_torii_const}/Cargo.toml (100%) rename {iroha_torii_const => crates/iroha_torii_const}/src/lib.rs (100%) rename {iroha_trigger => crates/iroha_trigger}/Cargo.toml (100%) rename {iroha_trigger => crates/iroha_trigger}/src/lib.rs (100%) rename {iroha_trigger_derive => crates/iroha_trigger_derive}/Cargo.toml (100%) rename {iroha_trigger_derive => crates/iroha_trigger_derive}/src/entrypoint.rs (100%) rename {iroha_trigger_derive => crates/iroha_trigger_derive}/src/lib.rs (100%) rename {iroha_version => crates/iroha_version}/Cargo.toml (100%) rename {iroha_version => crates/iroha_version}/src/lib.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/Cargo.toml (100%) rename {iroha_version_derive => crates/iroha_version_derive}/src/lib.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/json.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/scale.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_fail/field_missing_in_version_attribute.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_fail/field_missing_in_version_attribute.stderr (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_fail/field_typo_in_version_attribute.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_fail/field_typo_in_version_attribute.stderr (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_fail/invalid_range_equal.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_fail/invalid_range_equal.stderr (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_fail/invalid_range_less.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_fail/invalid_range_less.stderr (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_fail/unknown_field_in_version_attribute.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_fail/unknown_field_in_version_attribute.stderr (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_pass/declare_several_versioned.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_pass/declare_versioned.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_pass/declare_versioned_json.rs (100%) rename {iroha_version_derive => crates/iroha_version_derive}/tests/ui_pass/declare_versioned_scale.rs (100%) rename {iroha_wasm_builder => crates/iroha_wasm_builder}/Cargo.toml (100%) rename {iroha_wasm_builder => crates/iroha_wasm_builder}/README.md (100%) rename {iroha_wasm_builder => crates/iroha_wasm_builder}/src/lib.rs (100%) rename {iroha_wasm_builder => crates/iroha_wasm_builder}/src/main.rs (100%) rename {iroha_wasm_codec => crates/iroha_wasm_codec}/Cargo.toml (100%) rename {iroha_wasm_codec => crates/iroha_wasm_codec}/src/lib.rs (100%) rename {iroha_wasm_codec_derive => crates/iroha_wasm_codec_derive}/Cargo.toml (100%) rename {iroha_wasm_codec_derive => crates/iroha_wasm_codec_derive}/src/lib.rs (100%) rename {iroha_wasm_test_runner => crates/iroha_wasm_test_runner}/Cargo.toml (100%) rename {iroha_wasm_test_runner => crates/iroha_wasm_test_runner}/src/main.rs (100%) rename {irohad => crates/irohad}/Cargo.toml (100%) rename {irohad => crates/irohad}/README.md (97%) rename {irohad => crates/irohad}/build.rs (100%) rename {irohad => crates/irohad}/src/lib.rs (100%) rename {irohad => crates/irohad}/src/main.rs (100%) rename {irohad => crates/irohad}/src/samples.rs (100%) rename {kura_inspector => crates/kura_inspector}/Cargo.toml (100%) rename {kura_inspector => crates/kura_inspector}/README.md (100%) rename {kura_inspector => crates/kura_inspector}/src/main.rs (100%) diff --git a/.github/workflows/iroha2-dev-pr-static.yml b/.github/workflows/iroha2-dev-pr-static.yml index 9a63801bf3a..261eac4d305 100644 --- a/.github/workflows/iroha2-dev-pr-static.yml +++ b/.github/workflows/iroha2-dev-pr-static.yml @@ -8,7 +8,7 @@ on: - '**.json' - '**.toml' - '.github/workflows/iroha2-dev-pr-static.yml' - - 'iroha_cli/pytests/**/*.py' + - '../../crates/iroha_cli/pytests/**/*.py' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/iroha2-dev-pr-wasm.yaml b/.github/workflows/iroha2-dev-pr-wasm.yaml index 854b0cc94ff..5dc91cd93a3 100644 --- a/.github/workflows/iroha2-dev-pr-wasm.yaml +++ b/.github/workflows/iroha2-dev-pr-wasm.yaml @@ -4,15 +4,15 @@ on: pull_request: branches: [main] paths: - - 'iroha_data_model/**.rs' - - 'iroha_data_model/**.yml' - - 'iroha_data_model/**.json' - - 'iroha_data_model/**.toml' + - '../../crates/iroha_data_model/**.rs' + - '../../crates/iroha_data_model/**.yml' + - '../../crates/iroha_data_model/**.json' + - '../../crates/iroha_data_model/**.toml' - - 'iroha_smart_contract/**.rs' - - 'iroha_smart_contract/**.yml' - - 'iroha_smart_contract/**.json' - - 'iroha_smart_contract/**.toml' + - '../../crates/iroha_smart_contract/**.rs' + - '../../crates/iroha_smart_contract/**.yml' + - '../../crates/iroha_smart_contract/**.json' + - '../../crates/iroha_smart_contract/**.toml' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.gitignore b/.gitignore index 6222d9bd10a..4fc48324b89 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ **/rusty-tags.vi /**/Cargo.lock -iroha_config/__pycaсhe__ +crates/iroha_config/__pycaсhe__ **/__pycache__/* __pycache__/* build/* @@ -32,7 +32,7 @@ CMakeFiles/* cmake-build-debu/* cmake-build-debug/* external/* -iroha_core/infra/protobuf +crates/iroha_core/infra/protobuf include/generated/* .obsidian/ .scannerwork/ diff --git a/Cargo.toml b/Cargo.toml index bc2d86ff317..c92670f1f74 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,41 +14,41 @@ keywords = ["blockchain", "crypto", "iroha", "ledger"] categories = ["cryptography::cryptocurrencies"] [workspace.dependencies] -iroha_core = { version = "=2.0.0-rc.1.0 ", path = "iroha_core" } - -irohad = { version = "=2.0.0-rc.1.0", path = "irohad" } -iroha_torii = { version = "=2.0.0-rc.1.0", path = "iroha_torii" } -iroha_torii_const = { version = "=2.0.0-rc.1.0", path = "iroha_torii_const" } - -iroha = { version = "=2.0.0-rc.1.0", path = "iroha" } - -iroha_macro_utils = { version = "=2.0.0-rc.1.0", path = "iroha_macro_utils" } -iroha_telemetry = { version = "=2.0.0-rc.1.0", path = "iroha_telemetry" } -iroha_p2p = { version = "=2.0.0-rc.1.0", path = "iroha_p2p" } -iroha_primitives = { version = "=2.0.0-rc.1.0", path = "iroha_primitives", default-features = false } -iroha_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_data_model", default-features = false } -iroha_config = { version = "=2.0.0-rc.1.0", path = "iroha_config" } -iroha_config_base = { version = "=2.0.0-rc.1.0", path = "iroha_config_base" } -iroha_schema_gen = { version = "=2.0.0-rc.1.0", path = "iroha_schema_gen" } -iroha_schema = { version = "=2.0.0-rc.1.0", path = "iroha_schema", default-features = false } -iroha_logger = { version = "=2.0.0-rc.1.0", path = "iroha_logger" } -iroha_crypto = { version = "=2.0.0-rc.1.0", path = "iroha_crypto", default-features = false } -iroha_macro = { version = "=2.0.0-rc.1.0", path = "iroha_macro", default-features = false } -iroha_futures = { version = "=2.0.0-rc.1.0", path = "iroha_futures" } -iroha_genesis = { version = "=2.0.0-rc.1.0", path = "iroha_genesis" } -iroha_ffi = { version = "=2.0.0-rc.1.0", path = "iroha_ffi" } -iroha_version = { version = "=2.0.0-rc.1.0", path = "iroha_version", default-features = false } -iroha_wasm_codec = { version = "=2.0.0-rc.1.0", path = "iroha_wasm_codec" } -iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "iroha_wasm_builder" } - -iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "iroha_smart_contract" } -iroha_smart_contract_utils = { version = "=2.0.0-rc.1.0", path = "iroha_smart_contract_utils" } - -iroha_executor = { version = "=2.0.0-rc.1.0", path = "iroha_executor" } -iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "iroha_executor_data_model" } - -iroha_test_network = { version = "=2.0.0-rc.1.0", path = "iroha_test_network" } -iroha_test_samples = { version = "=2.0.0-rc.1.0", path = "iroha_test_samples" } +iroha_core = { version = "=2.0.0-rc.1.0 ", path = "crates/iroha_core" } + +irohad = { version = "=2.0.0-rc.1.0", path = "crates/irohad" } +iroha_torii = { version = "=2.0.0-rc.1.0", path = "crates/iroha_torii" } +iroha_torii_const = { version = "=2.0.0-rc.1.0", path = "crates/iroha_torii_const" } + +iroha = { version = "=2.0.0-rc.1.0", path = "crates/iroha" } + +iroha_macro_utils = { version = "=2.0.0-rc.1.0", path = "crates/iroha_macro_utils" } +iroha_telemetry = { version = "=2.0.0-rc.1.0", path = "crates/iroha_telemetry" } +iroha_p2p = { version = "=2.0.0-rc.1.0", path = "crates/iroha_p2p" } +iroha_primitives = { version = "=2.0.0-rc.1.0", path = "crates/iroha_primitives", default-features = false } +iroha_data_model = { version = "=2.0.0-rc.1.0", path = "crates/iroha_data_model", default-features = false } +iroha_config = { version = "=2.0.0-rc.1.0", path = "crates/iroha_config" } +iroha_config_base = { version = "=2.0.0-rc.1.0", path = "crates/iroha_config_base" } +iroha_schema_gen = { version = "=2.0.0-rc.1.0", path = "crates/iroha_schema_gen" } +iroha_schema = { version = "=2.0.0-rc.1.0", path = "crates/iroha_schema", default-features = false } +iroha_logger = { version = "=2.0.0-rc.1.0", path = "crates/iroha_logger" } +iroha_crypto = { version = "=2.0.0-rc.1.0", path = "crates/iroha_crypto", default-features = false } +iroha_macro = { version = "=2.0.0-rc.1.0", path = "crates/iroha_macro", default-features = false } +iroha_futures = { version = "=2.0.0-rc.1.0", path = "crates/iroha_futures" } +iroha_genesis = { version = "=2.0.0-rc.1.0", path = "crates/iroha_genesis" } +iroha_ffi = { version = "=2.0.0-rc.1.0", path = "crates/iroha_ffi" } +iroha_version = { version = "=2.0.0-rc.1.0", path = "crates/iroha_version", default-features = false } +iroha_wasm_codec = { version = "=2.0.0-rc.1.0", path = "crates/iroha_wasm_codec" } +iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "crates/iroha_wasm_builder" } + +iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "crates/iroha_smart_contract" } +iroha_smart_contract_utils = { version = "=2.0.0-rc.1.0", path = "crates/iroha_smart_contract_utils" } + +iroha_executor = { version = "=2.0.0-rc.1.0", path = "crates/iroha_executor" } +iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "crates/iroha_executor_data_model" } + +iroha_test_network = { version = "=2.0.0-rc.1.0", path = "crates/iroha_test_network" } +iroha_test_samples = { version = "=2.0.0-rc.1.0", path = "crates/iroha_test_samples" } proc-macro2 = "1.0.86" syn = { version = "2.0.72", default-features = false } @@ -194,51 +194,51 @@ clippy.wildcard_dependencies = "deny" [workspace] resolver = "2" members = [ - "irohad", - "iroha", - "iroha_cli", - "iroha_config", - "iroha_config_base", - "iroha_core", - "iroha_test_network", - "iroha_crypto", - "iroha_data_model", - "iroha_genesis", - "iroha_logger", - "iroha_p2p", - "iroha_futures", - "iroha_futures_derive", - "iroha_primitives", - "iroha_primitives_derive", - "iroha_numeric", - "iroha_ffi", - "iroha_ffi_derive", - "iroha_schema", - "iroha_schema_gen", - "iroha_schema_derive", - "iroha_smart_contract", - "iroha_smart_contract_derive", - "iroha_smart_contract_utils", - "iroha_trigger", - "iroha_trigger_derive", - "iroha_executor", - "iroha_executor_derive", - "iroha_executor_data_model", - "iroha_executor_data_model_derive", - "iroha_telemetry", - "iroha_test_samples", - "iroha_swarm", - "iroha_kagami", - "kura_inspector", - "iroha_codec", - "iroha_wasm_test_runner", - "iroha_torii", - "iroha_torii_const", - "iroha_version", - "iroha_version_derive", - "iroha_wasm_codec", - "iroha_wasm_codec_derive", - "iroha_wasm_builder", + "crates/irohad", + "crates/iroha", + "crates/iroha_cli", + "crates/iroha_config", + "crates/iroha_config_base", + "crates/iroha_core", + "crates/iroha_test_network", + "crates/iroha_crypto", + "crates/iroha_data_model", + "crates/iroha_genesis", + "crates/iroha_logger", + "crates/iroha_p2p", + "crates/iroha_futures", + "crates/iroha_futures_derive", + "crates/iroha_primitives", + "crates/iroha_primitives_derive", + "crates/iroha_numeric", + "crates/iroha_ffi", + "crates/iroha_ffi_derive", + "crates/iroha_schema", + "crates/iroha_schema_gen", + "crates/iroha_schema_derive", + "crates/iroha_smart_contract", + "crates/iroha_smart_contract_derive", + "crates/iroha_smart_contract_utils", + "crates/iroha_trigger", + "crates/iroha_trigger_derive", + "crates/iroha_executor", + "crates/iroha_executor_derive", + "crates/iroha_executor_data_model", + "crates/iroha_executor_data_model_derive", + "crates/iroha_telemetry", + "crates/iroha_test_samples", + "crates/iroha_swarm", + "crates/iroha_kagami", + "crates/kura_inspector", + "crates/iroha_codec", + "crates/iroha_wasm_test_runner", + "crates/iroha_torii", + "crates/iroha_torii_const", + "crates/iroha_version", + "crates/iroha_version_derive", + "crates/iroha_wasm_codec", + "crates/iroha_wasm_codec_derive", + "crates/iroha_wasm_builder", ] exclude = [ "wasm_samples", diff --git a/README.md b/README.md index 64d0852582b..02fea5edf46 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Once you have built Iroha, you can instantiate the minimum viable network: docker compose up ``` -With the `docker-compose` instance running, use [Iroha Client CLI](iroha_cli/README.md): +With the `docker-compose` instance running, use [Iroha Client CLI](crates/iroha_cli/README.md): ```bash cargo run --bin iroha -- --config ./defaults/client.toml @@ -131,21 +131,21 @@ cargo run --bin iroha -- --config ./defaults/client.toml Iroha project mainly consists of the following crates: -* [`iroha`](iroha) provides a library for building clients that communicate with peers. -* [`irohad`](irohad) is the command-line application for deploying an Iroha peer. Contains the routing table and definitions of API endpoints. -* [`iroha_cli`](iroha_cli) is the command-line client, a reference application using the client SDK. -* [`iroha_core`](iroha_core) is the primary library used by all other crates, including the peer endpoint management. -* [`iroha_config`](iroha_config) handles configuration and documentation generation for options and run-time changes. -* [`iroha_crypto`](iroha_crypto) defines cryptographic aspects of Iroha. -* [`kagami`](iroha_kagami) is used to generate cryptographic keys, default genesis, configuration reference, and schema. -* [`iroha_data_model`](iroha_data_model) defines common data models in Iroha. -* [`iroha_futures`](iroha_futures) is used for `async` programming. -* [`iroha_logger`](iroha_logger) uses `tracing` to provide logging facilities. -* [`iroha_macro`](iroha_macro) provides the convenience macros. -* [`iroha_p2p`](iroha_p2p) defines peer creation and handshake logic. +* [`iroha`](crates/iroha) provides a library for building clients that communicate with peers. +* [`irohad`](crates/irohad) is the command-line application for deploying an Iroha peer. Contains the routing table and definitions of API endpoints. +* [`iroha_cli`](crates/iroha_cli) is the command-line client, a reference application using the client SDK. +* [`iroha_core`](crates/iroha_core) is the primary library used by all other crates, including the peer endpoint management. +* [`iroha_config`](crates/iroha_config) handles configuration and documentation generation for options and run-time changes. +* [`iroha_crypto`](crates/iroha_crypto) defines cryptographic aspects of Iroha. +* [`kagami`](crates/iroha_kagami) is used to generate cryptographic keys, default genesis, configuration reference, and schema. +* [`iroha_data_model`](crates/iroha_data_model) defines common data models in Iroha. +* [`iroha_futures`](crates/iroha_futures) is used for `async` programming. +* [`iroha_logger`](crates/iroha_logger) uses `tracing` to provide logging facilities. +* [`iroha_macro`](crates/iroha_macro) provides the convenience macros. +* [`iroha_p2p`](crates/iroha_p2p) defines peer creation and handshake logic. * [`iroha_default_executor`](wasm_samples/default_executor) defines runtime validation logic. -* [`iroha_telemetry`](iroha_telemetry) is used for monitoring and analysis of telemetry data. -* [`iroha_version`](iroha_version) provides message versioning for non-simultaneous system updates. +* [`iroha_telemetry`](crates/iroha_telemetry) is used for monitoring and analysis of telemetry data. +* [`iroha_version`](crates/iroha_version) provides message versioning for non-simultaneous system updates. ## Maintenance diff --git a/iroha_cli/pytests/common/__init__.py b/crates/__init__.py similarity index 100% rename from iroha_cli/pytests/common/__init__.py rename to crates/__init__.py diff --git a/iroha/Cargo.toml b/crates/iroha/Cargo.toml similarity index 98% rename from iroha/Cargo.toml rename to crates/iroha/Cargo.toml index b468950845d..c3d8adcc10b 100644 --- a/iroha/Cargo.toml +++ b/crates/iroha/Cargo.toml @@ -91,7 +91,7 @@ irohad = { workspace = true } iroha_wasm_builder = { workspace = true } iroha_genesis = { workspace = true } iroha_test_network = { workspace = true } -executor_custom_data_model = { version = "=2.0.0-rc.1.0", path = "../wasm_samples/executor_custom_data_model" } +executor_custom_data_model = { version = "=2.0.0-rc.1.0", path = "../../wasm_samples/executor_custom_data_model" } tokio = { workspace = true, features = ["rt-multi-thread"] } criterion = { workspace = true, features = ["html_reports"] } diff --git a/iroha/README.md b/crates/iroha/README.md similarity index 100% rename from iroha/README.md rename to crates/iroha/README.md diff --git a/iroha/benches/torii.rs b/crates/iroha/benches/torii.rs similarity index 97% rename from iroha/benches/torii.rs rename to crates/iroha/benches/torii.rs index a36598a2637..9c5abdc35f8 100644 --- a/iroha/benches/torii.rs +++ b/crates/iroha/benches/torii.rs @@ -31,7 +31,7 @@ fn query_requests(criterion: &mut Criterion) { ); let rt = Runtime::test(); - let executor = construct_executor("../wasm_samples/default_executor") + let executor = construct_executor("../../wasm_samples/default_executor") .expect("Failed to construct executor"); let topology = vec![peer.id.clone()]; let genesis = GenesisBuilder::default() @@ -129,7 +129,7 @@ fn instruction_submits(criterion: &mut Criterion) { get_key_pair(iroha_test_network::Signatory::Peer), genesis_key_pair.public_key(), ); - let executor = construct_executor("../wasm_samples/default_executor") + let executor = construct_executor("../../wasm_samples/default_executor") .expect("Failed to construct executor"); let genesis = GenesisBuilder::default() .domain("wonderland".parse().expect("Valid")) diff --git a/iroha/benches/tps/README.md b/crates/iroha/benches/tps/README.md similarity index 100% rename from iroha/benches/tps/README.md rename to crates/iroha/benches/tps/README.md diff --git a/iroha/benches/tps/config.json b/crates/iroha/benches/tps/config.json similarity index 100% rename from iroha/benches/tps/config.json rename to crates/iroha/benches/tps/config.json diff --git a/iroha/benches/tps/dev.rs b/crates/iroha/benches/tps/dev.rs similarity index 100% rename from iroha/benches/tps/dev.rs rename to crates/iroha/benches/tps/dev.rs diff --git a/iroha/benches/tps/oneshot.rs b/crates/iroha/benches/tps/oneshot.rs similarity index 100% rename from iroha/benches/tps/oneshot.rs rename to crates/iroha/benches/tps/oneshot.rs diff --git a/iroha/benches/tps/utils.rs b/crates/iroha/benches/tps/utils.rs similarity index 100% rename from iroha/benches/tps/utils.rs rename to crates/iroha/benches/tps/utils.rs diff --git a/iroha/examples/million_accounts_genesis.rs b/crates/iroha/examples/million_accounts_genesis.rs similarity index 97% rename from iroha/examples/million_accounts_genesis.rs rename to crates/iroha/examples/million_accounts_genesis.rs index f5ccfd30578..882611dd448 100644 --- a/iroha/examples/million_accounts_genesis.rs +++ b/crates/iroha/examples/million_accounts_genesis.rs @@ -34,7 +34,7 @@ fn generate_genesis( .finish_domain(); } - let executor = construct_executor("../wasm_samples/default_executor") + let executor = construct_executor("../../wasm_samples/default_executor") .expect("Failed to construct executor"); builder.build_and_sign(chain_id, executor, topology, genesis_key_pair) } diff --git a/iroha/examples/register_1000_triggers.rs b/crates/iroha/examples/register_1000_triggers.rs similarity index 97% rename from iroha/examples/register_1000_triggers.rs rename to crates/iroha/examples/register_1000_triggers.rs index 45dcbeda959..34d1736aeb6 100644 --- a/iroha/examples/register_1000_triggers.rs +++ b/crates/iroha/examples/register_1000_triggers.rs @@ -63,7 +63,7 @@ fn generate_genesis( }) .fold(builder, GenesisBuilder::append_instruction); - let executor = construct_executor("../wasm_samples/default_executor") + let executor = construct_executor("../../wasm_samples/default_executor") .expect("Failed to construct executor"); Ok(builder.build_and_sign(chain_id, executor, topology, genesis_key_pair)) } diff --git a/iroha/examples/tutorial.rs b/crates/iroha/examples/tutorial.rs similarity index 100% rename from iroha/examples/tutorial.rs rename to crates/iroha/examples/tutorial.rs diff --git a/iroha/src/client.rs b/crates/iroha/src/client.rs similarity index 100% rename from iroha/src/client.rs rename to crates/iroha/src/client.rs diff --git a/iroha/src/config.rs b/crates/iroha/src/config.rs similarity index 100% rename from iroha/src/config.rs rename to crates/iroha/src/config.rs diff --git a/iroha/src/config/user.rs b/crates/iroha/src/config/user.rs similarity index 100% rename from iroha/src/config/user.rs rename to crates/iroha/src/config/user.rs diff --git a/iroha/src/http.rs b/crates/iroha/src/http.rs similarity index 100% rename from iroha/src/http.rs rename to crates/iroha/src/http.rs diff --git a/iroha/src/http_default.rs b/crates/iroha/src/http_default.rs similarity index 100% rename from iroha/src/http_default.rs rename to crates/iroha/src/http_default.rs diff --git a/iroha/src/lib.rs b/crates/iroha/src/lib.rs similarity index 100% rename from iroha/src/lib.rs rename to crates/iroha/src/lib.rs diff --git a/iroha/src/query.rs b/crates/iroha/src/query.rs similarity index 100% rename from iroha/src/query.rs rename to crates/iroha/src/query.rs diff --git a/iroha/tests/integration/asset.rs b/crates/iroha/tests/integration/asset.rs similarity index 100% rename from iroha/tests/integration/asset.rs rename to crates/iroha/tests/integration/asset.rs diff --git a/iroha/tests/integration/asset_propagation.rs b/crates/iroha/tests/integration/asset_propagation.rs similarity index 100% rename from iroha/tests/integration/asset_propagation.rs rename to crates/iroha/tests/integration/asset_propagation.rs diff --git a/iroha/tests/integration/events/data.rs b/crates/iroha/tests/integration/events/data.rs similarity index 100% rename from iroha/tests/integration/events/data.rs rename to crates/iroha/tests/integration/events/data.rs diff --git a/iroha/tests/integration/events/mod.rs b/crates/iroha/tests/integration/events/mod.rs similarity index 100% rename from iroha/tests/integration/events/mod.rs rename to crates/iroha/tests/integration/events/mod.rs diff --git a/iroha/tests/integration/events/notification.rs b/crates/iroha/tests/integration/events/notification.rs similarity index 100% rename from iroha/tests/integration/events/notification.rs rename to crates/iroha/tests/integration/events/notification.rs diff --git a/iroha/tests/integration/events/pipeline.rs b/crates/iroha/tests/integration/events/pipeline.rs similarity index 100% rename from iroha/tests/integration/events/pipeline.rs rename to crates/iroha/tests/integration/events/pipeline.rs diff --git a/iroha/tests/integration/extra_functional/connected_peers.rs b/crates/iroha/tests/integration/extra_functional/connected_peers.rs similarity index 100% rename from iroha/tests/integration/extra_functional/connected_peers.rs rename to crates/iroha/tests/integration/extra_functional/connected_peers.rs diff --git a/iroha/tests/integration/extra_functional/genesis.rs b/crates/iroha/tests/integration/extra_functional/genesis.rs similarity index 100% rename from iroha/tests/integration/extra_functional/genesis.rs rename to crates/iroha/tests/integration/extra_functional/genesis.rs diff --git a/iroha/tests/integration/extra_functional/mod.rs b/crates/iroha/tests/integration/extra_functional/mod.rs similarity index 100% rename from iroha/tests/integration/extra_functional/mod.rs rename to crates/iroha/tests/integration/extra_functional/mod.rs diff --git a/iroha/tests/integration/extra_functional/multiple_blocks_created.rs b/crates/iroha/tests/integration/extra_functional/multiple_blocks_created.rs similarity index 100% rename from iroha/tests/integration/extra_functional/multiple_blocks_created.rs rename to crates/iroha/tests/integration/extra_functional/multiple_blocks_created.rs diff --git a/iroha/tests/integration/extra_functional/normal.rs b/crates/iroha/tests/integration/extra_functional/normal.rs similarity index 100% rename from iroha/tests/integration/extra_functional/normal.rs rename to crates/iroha/tests/integration/extra_functional/normal.rs diff --git a/iroha/tests/integration/extra_functional/offline_peers.rs b/crates/iroha/tests/integration/extra_functional/offline_peers.rs similarity index 100% rename from iroha/tests/integration/extra_functional/offline_peers.rs rename to crates/iroha/tests/integration/extra_functional/offline_peers.rs diff --git a/iroha/tests/integration/extra_functional/restart_peer.rs b/crates/iroha/tests/integration/extra_functional/restart_peer.rs similarity index 100% rename from iroha/tests/integration/extra_functional/restart_peer.rs rename to crates/iroha/tests/integration/extra_functional/restart_peer.rs diff --git a/iroha/tests/integration/extra_functional/unregister_peer.rs b/crates/iroha/tests/integration/extra_functional/unregister_peer.rs similarity index 100% rename from iroha/tests/integration/extra_functional/unregister_peer.rs rename to crates/iroha/tests/integration/extra_functional/unregister_peer.rs diff --git a/iroha/tests/integration/extra_functional/unstable_network.rs b/crates/iroha/tests/integration/extra_functional/unstable_network.rs similarity index 100% rename from iroha/tests/integration/extra_functional/unstable_network.rs rename to crates/iroha/tests/integration/extra_functional/unstable_network.rs diff --git a/iroha/tests/integration/mod.rs b/crates/iroha/tests/integration/mod.rs similarity index 100% rename from iroha/tests/integration/mod.rs rename to crates/iroha/tests/integration/mod.rs diff --git a/iroha/tests/integration/multisig.rs b/crates/iroha/tests/integration/multisig.rs similarity index 98% rename from iroha/tests/integration/multisig.rs rename to crates/iroha/tests/integration/multisig.rs index 889f64dd643..3d6d3711c30 100644 --- a/iroha/tests/integration/multisig.rs +++ b/crates/iroha/tests/integration/multisig.rs @@ -32,7 +32,7 @@ fn mutlisig() -> Result<()> { let account_id = ALICE_ID.clone(); let multisig_register_trigger_id = "multisig_register".parse::()?; - let wasm = iroha_wasm_builder::Builder::new("../wasm_samples/multisig_register") + let wasm = iroha_wasm_builder::Builder::new("../../wasm_samples/multisig_register") .show_output() .build()? .optimize()? diff --git a/iroha/tests/integration/non_mintable.rs b/crates/iroha/tests/integration/non_mintable.rs similarity index 100% rename from iroha/tests/integration/non_mintable.rs rename to crates/iroha/tests/integration/non_mintable.rs diff --git a/iroha/tests/integration/pagination.rs b/crates/iroha/tests/integration/pagination.rs similarity index 100% rename from iroha/tests/integration/pagination.rs rename to crates/iroha/tests/integration/pagination.rs diff --git a/iroha/tests/integration/permissions.rs b/crates/iroha/tests/integration/permissions.rs similarity index 100% rename from iroha/tests/integration/permissions.rs rename to crates/iroha/tests/integration/permissions.rs diff --git a/iroha/tests/integration/queries/account.rs b/crates/iroha/tests/integration/queries/account.rs similarity index 100% rename from iroha/tests/integration/queries/account.rs rename to crates/iroha/tests/integration/queries/account.rs diff --git a/iroha/tests/integration/queries/asset.rs b/crates/iroha/tests/integration/queries/asset.rs similarity index 100% rename from iroha/tests/integration/queries/asset.rs rename to crates/iroha/tests/integration/queries/asset.rs diff --git a/iroha/tests/integration/queries/mod.rs b/crates/iroha/tests/integration/queries/mod.rs similarity index 100% rename from iroha/tests/integration/queries/mod.rs rename to crates/iroha/tests/integration/queries/mod.rs diff --git a/iroha/tests/integration/queries/query_errors.rs b/crates/iroha/tests/integration/queries/query_errors.rs similarity index 100% rename from iroha/tests/integration/queries/query_errors.rs rename to crates/iroha/tests/integration/queries/query_errors.rs diff --git a/iroha/tests/integration/queries/role.rs b/crates/iroha/tests/integration/queries/role.rs similarity index 100% rename from iroha/tests/integration/queries/role.rs rename to crates/iroha/tests/integration/queries/role.rs diff --git a/iroha/tests/integration/queries/smart_contract.rs b/crates/iroha/tests/integration/queries/smart_contract.rs similarity index 90% rename from iroha/tests/integration/queries/smart_contract.rs rename to crates/iroha/tests/integration/queries/smart_contract.rs index 565c081facc..698b148845a 100644 --- a/iroha/tests/integration/queries/smart_contract.rs +++ b/crates/iroha/tests/integration/queries/smart_contract.rs @@ -10,7 +10,7 @@ fn live_query_is_dropped_after_smart_contract_end() -> Result<()> { let (_rt, _peer, client) = ::new().with_port(11_140).start_with_runtime(); wait_for_genesis_committed(&[client.clone()], 0); - let wasm = iroha_wasm_builder::Builder::new("../wasm_samples/query_assets_and_save_cursor") + let wasm = iroha_wasm_builder::Builder::new("../../wasm_samples/query_assets_and_save_cursor") .show_output() .build()? .optimize()? @@ -47,7 +47,7 @@ fn smart_contract_can_filter_queries() -> Result<()> { wait_for_genesis_committed(&[client.clone()], 0); let wasm = - iroha_wasm_builder::Builder::new("../wasm_samples/smart_contract_can_filter_queries") + iroha_wasm_builder::Builder::new("../../wasm_samples/smart_contract_can_filter_queries") .show_output() .build()? .optimize()? diff --git a/iroha/tests/integration/roles.rs b/crates/iroha/tests/integration/roles.rs similarity index 100% rename from iroha/tests/integration/roles.rs rename to crates/iroha/tests/integration/roles.rs diff --git a/iroha/tests/integration/set_parameter.rs b/crates/iroha/tests/integration/set_parameter.rs similarity index 100% rename from iroha/tests/integration/set_parameter.rs rename to crates/iroha/tests/integration/set_parameter.rs diff --git a/iroha/tests/integration/sorting.rs b/crates/iroha/tests/integration/sorting.rs similarity index 100% rename from iroha/tests/integration/sorting.rs rename to crates/iroha/tests/integration/sorting.rs diff --git a/iroha/tests/integration/status_response.rs b/crates/iroha/tests/integration/status_response.rs similarity index 100% rename from iroha/tests/integration/status_response.rs rename to crates/iroha/tests/integration/status_response.rs diff --git a/iroha/tests/integration/transfer_asset.rs b/crates/iroha/tests/integration/transfer_asset.rs similarity index 100% rename from iroha/tests/integration/transfer_asset.rs rename to crates/iroha/tests/integration/transfer_asset.rs diff --git a/iroha/tests/integration/transfer_domain.rs b/crates/iroha/tests/integration/transfer_domain.rs similarity index 100% rename from iroha/tests/integration/transfer_domain.rs rename to crates/iroha/tests/integration/transfer_domain.rs diff --git a/iroha/tests/integration/triggers/by_call_trigger.rs b/crates/iroha/tests/integration/triggers/by_call_trigger.rs similarity index 98% rename from iroha/tests/integration/triggers/by_call_trigger.rs rename to crates/iroha/tests/integration/triggers/by_call_trigger.rs index 787da89adf2..a4a337022d4 100644 --- a/iroha/tests/integration/triggers/by_call_trigger.rs +++ b/crates/iroha/tests/integration/triggers/by_call_trigger.rs @@ -427,7 +427,7 @@ fn trigger_in_genesis_using_base64() -> Result<()> { // Building wasm trigger info!("Building trigger"); - let wasm = iroha_wasm_builder::Builder::new("../wasm_samples/mint_rose_trigger") + let wasm = iroha_wasm_builder::Builder::new("../../wasm_samples/mint_rose_trigger") .show_output() .build()? .optimize()? @@ -592,7 +592,7 @@ fn unregistering_one_of_two_triggers_with_identical_wasm_should_not_cause_origin let first_trigger_id = "mint_rose_1".parse::()?; let second_trigger_id = "mint_rose_2".parse::()?; - let wasm = iroha_wasm_builder::Builder::new("../wasm_samples/mint_rose_trigger") + let wasm = iroha_wasm_builder::Builder::new("../../wasm_samples/mint_rose_trigger") .show_output() .build()? .optimize()? @@ -676,7 +676,7 @@ fn call_execute_trigger_with_args() -> Result<()> { let prev_value = get_asset_value(&mut test_client, asset_id.clone()); let trigger_id = TRIGGER_NAME.parse::()?; - let wasm = iroha_wasm_builder::Builder::new("../wasm_samples/mint_rose_trigger_args") + let wasm = iroha_wasm_builder::Builder::new("../../wasm_samples/mint_rose_trigger_args") .show_output() .build()? .optimize()? diff --git a/iroha/tests/integration/triggers/data_trigger.rs b/crates/iroha/tests/integration/triggers/data_trigger.rs similarity index 100% rename from iroha/tests/integration/triggers/data_trigger.rs rename to crates/iroha/tests/integration/triggers/data_trigger.rs diff --git a/iroha/tests/integration/triggers/event_trigger.rs b/crates/iroha/tests/integration/triggers/event_trigger.rs similarity index 100% rename from iroha/tests/integration/triggers/event_trigger.rs rename to crates/iroha/tests/integration/triggers/event_trigger.rs diff --git a/iroha/tests/integration/triggers/mod.rs b/crates/iroha/tests/integration/triggers/mod.rs similarity index 100% rename from iroha/tests/integration/triggers/mod.rs rename to crates/iroha/tests/integration/triggers/mod.rs diff --git a/iroha/tests/integration/triggers/orphans.rs b/crates/iroha/tests/integration/triggers/orphans.rs similarity index 100% rename from iroha/tests/integration/triggers/orphans.rs rename to crates/iroha/tests/integration/triggers/orphans.rs diff --git a/iroha/tests/integration/triggers/time_trigger.rs b/crates/iroha/tests/integration/triggers/time_trigger.rs similarity index 99% rename from iroha/tests/integration/triggers/time_trigger.rs rename to crates/iroha/tests/integration/triggers/time_trigger.rs index c940afe90aa..155059aa442 100644 --- a/iroha/tests/integration/triggers/time_trigger.rs +++ b/crates/iroha/tests/integration/triggers/time_trigger.rs @@ -221,7 +221,7 @@ fn mint_nft_for_every_user_every_1_sec() -> Result<()> { info!("Building trigger"); let wasm = - iroha_wasm_builder::Builder::new("../wasm_samples/create_nft_for_every_user_trigger") + iroha_wasm_builder::Builder::new("../../wasm_samples/create_nft_for_every_user_trigger") .show_output() .build()? .optimize()? diff --git a/iroha/tests/integration/triggers/trigger_rollback.rs b/crates/iroha/tests/integration/triggers/trigger_rollback.rs similarity index 100% rename from iroha/tests/integration/triggers/trigger_rollback.rs rename to crates/iroha/tests/integration/triggers/trigger_rollback.rs diff --git a/iroha/tests/integration/tx_chain_id.rs b/crates/iroha/tests/integration/tx_chain_id.rs similarity index 100% rename from iroha/tests/integration/tx_chain_id.rs rename to crates/iroha/tests/integration/tx_chain_id.rs diff --git a/iroha/tests/integration/tx_history.rs b/crates/iroha/tests/integration/tx_history.rs similarity index 100% rename from iroha/tests/integration/tx_history.rs rename to crates/iroha/tests/integration/tx_history.rs diff --git a/iroha/tests/integration/tx_rollback.rs b/crates/iroha/tests/integration/tx_rollback.rs similarity index 100% rename from iroha/tests/integration/tx_rollback.rs rename to crates/iroha/tests/integration/tx_rollback.rs diff --git a/iroha/tests/integration/upgrade.rs b/crates/iroha/tests/integration/upgrade.rs similarity index 95% rename from iroha/tests/integration/upgrade.rs rename to crates/iroha/tests/integration/upgrade.rs index 4c9c824d5a3..6c8e49e5be4 100644 --- a/iroha/tests/integration/upgrade.rs +++ b/crates/iroha/tests/integration/upgrade.rs @@ -55,7 +55,7 @@ fn executor_upgrade_should_work() -> Result<()> { .submit_transaction_blocking(&transfer_rose_tx) .expect_err("Should fail"); - upgrade_executor(&client, "../wasm_samples/executor_with_admin")?; + upgrade_executor(&client, "../../wasm_samples/executor_with_admin")?; // Check that admin can transfer alice's rose now // Creating new transaction instead of cloning, because we need to update it's creation time @@ -95,7 +95,7 @@ fn executor_upgrade_should_run_migration() -> Result<()> { .is_ok_and(|permission| permission == can_unregister_domain) })); - upgrade_executor(&client, "../wasm_samples/executor_with_custom_permission")?; + upgrade_executor(&client, "../../wasm_samples/executor_with_custom_permission")?; // Check that `CanUnregisterDomain` doesn't exist let data_model = client.query_single(FindExecutorDataModel)?; @@ -168,7 +168,7 @@ fn executor_upgrade_should_revoke_removed_permissions() -> Result<()> { .is_ok_and(|permission| permission == can_unregister_domain) })); - upgrade_executor(&client, "../wasm_samples/executor_remove_permission")?; + upgrade_executor(&client, "../../wasm_samples/executor_remove_permission")?; // Check that permission doesn't exist assert!(!client @@ -212,7 +212,7 @@ fn executor_custom_instructions_simple() -> Result<()> { upgrade_executor( &client, - "../wasm_samples/executor_custom_instructions_simple", + "../../wasm_samples/executor_custom_instructions_simple", )?; let asset_definition_id: AssetDefinitionId = "rose#wonderland".parse().unwrap(); @@ -258,7 +258,7 @@ fn executor_custom_instructions_complex() -> Result<()> { client.submit_blocking(executor_fuel_limit)?; upgrade_executor( &client, - "../wasm_samples/executor_custom_instructions_complex", + "../../wasm_samples/executor_custom_instructions_complex", )?; // Give 6 roses to bob @@ -329,7 +329,7 @@ fn migration_fail_should_not_cause_any_effects() { "failed_migration_test_domain".parse().expect("Valid"); assert_domain_does_not_exist(&client, &domain_registered_in_migration); - let _err = upgrade_executor(&client, "../wasm_samples/executor_with_migration_fail") + let _err = upgrade_executor(&client, "../../wasm_samples/executor_with_migration_fail") .expect_err("Upgrade should fail due to migration failure"); // Checking that things registered in migration does not exist after failed migration @@ -361,7 +361,7 @@ fn migration_should_cause_upgrade_event() { } }); - upgrade_executor(&client, "../wasm_samples/executor_with_custom_permission").unwrap(); + upgrade_executor(&client, "../../wasm_samples/executor_with_custom_permission").unwrap(); rt.block_on(async { tokio::time::timeout(core::time::Duration::from_secs(60), task) @@ -382,7 +382,7 @@ fn define_custom_parameter() -> Result<()> { let create_domain = Register::domain(Domain::new(long_domain_name)); client.submit_blocking(create_domain)?; - upgrade_executor(&client, "../wasm_samples/executor_with_custom_parameter").unwrap(); + upgrade_executor(&client, "../../wasm_samples/executor_with_custom_parameter").unwrap(); let too_long_domain_name = "1".repeat(2_usize.pow(5)).parse::()?; let create_domain = Register::domain(Domain::new(too_long_domain_name)); diff --git a/iroha/tests/mod.rs b/crates/iroha/tests/mod.rs similarity index 100% rename from iroha/tests/mod.rs rename to crates/iroha/tests/mod.rs diff --git a/iroha/tests/ui_fail/cant_filter_singular_query.rs b/crates/iroha/tests/ui_fail/cant_filter_singular_query.rs similarity index 100% rename from iroha/tests/ui_fail/cant_filter_singular_query.rs rename to crates/iroha/tests/ui_fail/cant_filter_singular_query.rs diff --git a/iroha_cli/.gitignore b/crates/iroha_cli/.gitignore similarity index 100% rename from iroha_cli/.gitignore rename to crates/iroha_cli/.gitignore diff --git a/iroha_cli/Cargo.toml b/crates/iroha_cli/Cargo.toml similarity index 100% rename from iroha_cli/Cargo.toml rename to crates/iroha_cli/Cargo.toml diff --git a/iroha_cli/README.md b/crates/iroha_cli/README.md similarity index 100% rename from iroha_cli/README.md rename to crates/iroha_cli/README.md diff --git a/iroha_cli/pytests/src/__init__.py b/crates/iroha_cli/__init__.py similarity index 100% rename from iroha_cli/pytests/src/__init__.py rename to crates/iroha_cli/__init__.py diff --git a/iroha_cli/build.rs b/crates/iroha_cli/build.rs similarity index 100% rename from iroha_cli/build.rs rename to crates/iroha_cli/build.rs diff --git a/iroha_cli/pytests/.gitignore b/crates/iroha_cli/pytests/.gitignore similarity index 100% rename from iroha_cli/pytests/.gitignore rename to crates/iroha_cli/pytests/.gitignore diff --git a/iroha_cli/pytests/README.md b/crates/iroha_cli/pytests/README.md similarity index 96% rename from iroha_cli/pytests/README.md rename to crates/iroha_cli/pytests/README.md index 64125b57410..fc6f4b2ac0b 100644 --- a/iroha_cli/pytests/README.md +++ b/crates/iroha_cli/pytests/README.md @@ -50,7 +50,7 @@ The test model has the following structure: > However, it is possible to run the tests in a custom environment, e.g., with Docker Compose. > For instructions on how to do so, see [Custom Test Environment with Docker Compose](#custom-test-environment-with-docker-compose). -1. Set up a test environment using the [`test_env.py`](../../scripts/test_env.py) script: +1. Set up a test environment using the [`test_env.py`](../../../scripts/test_env.py) script: ```shell # Must be executed from the repo root: @@ -88,7 +88,7 @@ The test model has the following structure: ### Custom Test Environment with Docker Compose -By default, we provide the [`test_env.py`](../../scripts/test_env.py) script to set up a test environment. This environment is composed of a running network of Iroha peers and an Iroha client configuration to interact with it. +By default, we provide the [`test_env.py`](../../../scripts/test_env.py) script to set up a test environment. This environment is composed of a running network of Iroha peers and an Iroha client configuration to interact with it. However, if for any reason this approach is inconvenient, it is possible to set up a custom network of Iroha peers using the provided Docker Compose configurations. diff --git a/crates/iroha_cli/pytests/__init__.py b/crates/iroha_cli/pytests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/crates/iroha_cli/pytests/common/__init__.py b/crates/iroha_cli/pytests/common/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_cli/pytests/common/consts.py b/crates/iroha_cli/pytests/common/consts.py similarity index 100% rename from iroha_cli/pytests/common/consts.py rename to crates/iroha_cli/pytests/common/consts.py diff --git a/iroha_cli/pytests/common/helpers.py b/crates/iroha_cli/pytests/common/helpers.py similarity index 100% rename from iroha_cli/pytests/common/helpers.py rename to crates/iroha_cli/pytests/common/helpers.py diff --git a/iroha_cli/pytests/common/json_isi_examples/unregister_asset.json b/crates/iroha_cli/pytests/common/json_isi_examples/unregister_asset.json similarity index 100% rename from iroha_cli/pytests/common/json_isi_examples/unregister_asset.json rename to crates/iroha_cli/pytests/common/json_isi_examples/unregister_asset.json diff --git a/iroha_cli/pytests/common/settings.py b/crates/iroha_cli/pytests/common/settings.py similarity index 100% rename from iroha_cli/pytests/common/settings.py rename to crates/iroha_cli/pytests/common/settings.py diff --git a/iroha_cli/pytests/models/__init__.py b/crates/iroha_cli/pytests/models/__init__.py similarity index 100% rename from iroha_cli/pytests/models/__init__.py rename to crates/iroha_cli/pytests/models/__init__.py diff --git a/iroha_cli/pytests/models/account.py b/crates/iroha_cli/pytests/models/account.py similarity index 100% rename from iroha_cli/pytests/models/account.py rename to crates/iroha_cli/pytests/models/account.py diff --git a/iroha_cli/pytests/models/asset.py b/crates/iroha_cli/pytests/models/asset.py similarity index 100% rename from iroha_cli/pytests/models/asset.py rename to crates/iroha_cli/pytests/models/asset.py diff --git a/iroha_cli/pytests/models/domain.py b/crates/iroha_cli/pytests/models/domain.py similarity index 100% rename from iroha_cli/pytests/models/domain.py rename to crates/iroha_cli/pytests/models/domain.py diff --git a/iroha_cli/pytests/poetry.lock b/crates/iroha_cli/pytests/poetry.lock similarity index 100% rename from iroha_cli/pytests/poetry.lock rename to crates/iroha_cli/pytests/poetry.lock diff --git a/iroha_cli/pytests/pyproject.toml b/crates/iroha_cli/pytests/pyproject.toml similarity index 100% rename from iroha_cli/pytests/pyproject.toml rename to crates/iroha_cli/pytests/pyproject.toml diff --git a/crates/iroha_cli/pytests/src/__init__.py b/crates/iroha_cli/pytests/src/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_cli/pytests/src/iroha_cli/__init__.py b/crates/iroha_cli/pytests/src/iroha_cli/__init__.py similarity index 100% rename from iroha_cli/pytests/src/iroha_cli/__init__.py rename to crates/iroha_cli/pytests/src/iroha_cli/__init__.py diff --git a/iroha_cli/pytests/src/iroha_cli/configuration.py b/crates/iroha_cli/pytests/src/iroha_cli/configuration.py similarity index 100% rename from iroha_cli/pytests/src/iroha_cli/configuration.py rename to crates/iroha_cli/pytests/src/iroha_cli/configuration.py diff --git a/iroha_cli/pytests/src/iroha_cli/have.py b/crates/iroha_cli/pytests/src/iroha_cli/have.py similarity index 100% rename from iroha_cli/pytests/src/iroha_cli/have.py rename to crates/iroha_cli/pytests/src/iroha_cli/have.py diff --git a/iroha_cli/pytests/src/iroha_cli/iroha.py b/crates/iroha_cli/pytests/src/iroha_cli/iroha.py similarity index 100% rename from iroha_cli/pytests/src/iroha_cli/iroha.py rename to crates/iroha_cli/pytests/src/iroha_cli/iroha.py diff --git a/iroha_cli/pytests/src/iroha_cli/iroha_cli.py b/crates/iroha_cli/pytests/src/iroha_cli/iroha_cli.py similarity index 100% rename from iroha_cli/pytests/src/iroha_cli/iroha_cli.py rename to crates/iroha_cli/pytests/src/iroha_cli/iroha_cli.py diff --git a/iroha_cli/pytests/src/iroha_cli/match.py b/crates/iroha_cli/pytests/src/iroha_cli/match.py similarity index 100% rename from iroha_cli/pytests/src/iroha_cli/match.py rename to crates/iroha_cli/pytests/src/iroha_cli/match.py diff --git a/iroha_cli/pytests/test/__init__.py b/crates/iroha_cli/pytests/test/__init__.py similarity index 100% rename from iroha_cli/pytests/test/__init__.py rename to crates/iroha_cli/pytests/test/__init__.py diff --git a/crates/iroha_cli/pytests/test/accounts/__init__.py b/crates/iroha_cli/pytests/test/accounts/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_cli/pytests/test/accounts/conftest.py b/crates/iroha_cli/pytests/test/accounts/conftest.py similarity index 100% rename from iroha_cli/pytests/test/accounts/conftest.py rename to crates/iroha_cli/pytests/test/accounts/conftest.py diff --git a/iroha_cli/pytests/test/accounts/test_accounts_query_filters.py b/crates/iroha_cli/pytests/test/accounts/test_accounts_query_filters.py similarity index 100% rename from iroha_cli/pytests/test/accounts/test_accounts_query_filters.py rename to crates/iroha_cli/pytests/test/accounts/test_accounts_query_filters.py diff --git a/iroha_cli/pytests/test/accounts/test_register_accounts.py b/crates/iroha_cli/pytests/test/accounts/test_register_accounts.py similarity index 100% rename from iroha_cli/pytests/test/accounts/test_register_accounts.py rename to crates/iroha_cli/pytests/test/accounts/test_register_accounts.py diff --git a/crates/iroha_cli/pytests/test/assets/__init__.py b/crates/iroha_cli/pytests/test/assets/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_cli/pytests/test/assets/conftest.py b/crates/iroha_cli/pytests/test/assets/conftest.py similarity index 100% rename from iroha_cli/pytests/test/assets/conftest.py rename to crates/iroha_cli/pytests/test/assets/conftest.py diff --git a/iroha_cli/pytests/test/assets/test_assets_query_filters.py b/crates/iroha_cli/pytests/test/assets/test_assets_query_filters.py similarity index 100% rename from iroha_cli/pytests/test/assets/test_assets_query_filters.py rename to crates/iroha_cli/pytests/test/assets/test_assets_query_filters.py diff --git a/iroha_cli/pytests/test/assets/test_burn_assets.py b/crates/iroha_cli/pytests/test/assets/test_burn_assets.py similarity index 100% rename from iroha_cli/pytests/test/assets/test_burn_assets.py rename to crates/iroha_cli/pytests/test/assets/test_burn_assets.py diff --git a/iroha_cli/pytests/test/assets/test_mint_assets.py b/crates/iroha_cli/pytests/test/assets/test_mint_assets.py similarity index 100% rename from iroha_cli/pytests/test/assets/test_mint_assets.py rename to crates/iroha_cli/pytests/test/assets/test_mint_assets.py diff --git a/iroha_cli/pytests/test/assets/test_register_asset_definitions.py b/crates/iroha_cli/pytests/test/assets/test_register_asset_definitions.py similarity index 100% rename from iroha_cli/pytests/test/assets/test_register_asset_definitions.py rename to crates/iroha_cli/pytests/test/assets/test_register_asset_definitions.py diff --git a/iroha_cli/pytests/test/assets/test_transfer_assets.py b/crates/iroha_cli/pytests/test/assets/test_transfer_assets.py similarity index 100% rename from iroha_cli/pytests/test/assets/test_transfer_assets.py rename to crates/iroha_cli/pytests/test/assets/test_transfer_assets.py diff --git a/iroha_cli/pytests/test/assets/test_unregister_asset.py b/crates/iroha_cli/pytests/test/assets/test_unregister_asset.py similarity index 100% rename from iroha_cli/pytests/test/assets/test_unregister_asset.py rename to crates/iroha_cli/pytests/test/assets/test_unregister_asset.py diff --git a/crates/iroha_cli/pytests/test/atomicity/__init__.py b/crates/iroha_cli/pytests/test/atomicity/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_cli/pytests/test/atomicity/conftest.py b/crates/iroha_cli/pytests/test/atomicity/conftest.py similarity index 100% rename from iroha_cli/pytests/test/atomicity/conftest.py rename to crates/iroha_cli/pytests/test/atomicity/conftest.py diff --git a/iroha_cli/pytests/test/atomicity/test_multiple_instructions_within_transaction.py b/crates/iroha_cli/pytests/test/atomicity/test_multiple_instructions_within_transaction.py similarity index 100% rename from iroha_cli/pytests/test/atomicity/test_multiple_instructions_within_transaction.py rename to crates/iroha_cli/pytests/test/atomicity/test_multiple_instructions_within_transaction.py diff --git a/iroha_cli/pytests/test/atomicity/test_pair_instructions_within_transaction.py b/crates/iroha_cli/pytests/test/atomicity/test_pair_instructions_within_transaction.py similarity index 100% rename from iroha_cli/pytests/test/atomicity/test_pair_instructions_within_transaction.py rename to crates/iroha_cli/pytests/test/atomicity/test_pair_instructions_within_transaction.py diff --git a/iroha_cli/pytests/test/atomicity/test_wrong_instructions_within_transaction.py b/crates/iroha_cli/pytests/test/atomicity/test_wrong_instructions_within_transaction.py similarity index 100% rename from iroha_cli/pytests/test/atomicity/test_wrong_instructions_within_transaction.py rename to crates/iroha_cli/pytests/test/atomicity/test_wrong_instructions_within_transaction.py diff --git a/iroha_cli/pytests/test/conftest.py b/crates/iroha_cli/pytests/test/conftest.py similarity index 100% rename from iroha_cli/pytests/test/conftest.py rename to crates/iroha_cli/pytests/test/conftest.py diff --git a/crates/iroha_cli/pytests/test/domains/__init__.py b/crates/iroha_cli/pytests/test/domains/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_cli/pytests/test/domains/conftest.py b/crates/iroha_cli/pytests/test/domains/conftest.py similarity index 100% rename from iroha_cli/pytests/test/domains/conftest.py rename to crates/iroha_cli/pytests/test/domains/conftest.py diff --git a/iroha_cli/pytests/test/domains/test_domains_query_filters.py b/crates/iroha_cli/pytests/test/domains/test_domains_query_filters.py similarity index 100% rename from iroha_cli/pytests/test/domains/test_domains_query_filters.py rename to crates/iroha_cli/pytests/test/domains/test_domains_query_filters.py diff --git a/iroha_cli/pytests/test/domains/test_register_domains.py b/crates/iroha_cli/pytests/test/domains/test_register_domains.py similarity index 100% rename from iroha_cli/pytests/test/domains/test_register_domains.py rename to crates/iroha_cli/pytests/test/domains/test_register_domains.py diff --git a/iroha_cli/pytests/test/domains/test_transfer_domains.py b/crates/iroha_cli/pytests/test/domains/test_transfer_domains.py similarity index 100% rename from iroha_cli/pytests/test/domains/test_transfer_domains.py rename to crates/iroha_cli/pytests/test/domains/test_transfer_domains.py diff --git a/crates/iroha_cli/pytests/test/triggers/__init__.py b/crates/iroha_cli/pytests/test/triggers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_cli/pytests/test/triggers/conftest.py b/crates/iroha_cli/pytests/test/triggers/conftest.py similarity index 100% rename from iroha_cli/pytests/test/triggers/conftest.py rename to crates/iroha_cli/pytests/test/triggers/conftest.py diff --git a/iroha_cli/pytests/test/triggers/test_register_trigger.py b/crates/iroha_cli/pytests/test/triggers/test_register_trigger.py similarity index 100% rename from iroha_cli/pytests/test/triggers/test_register_trigger.py rename to crates/iroha_cli/pytests/test/triggers/test_register_trigger.py diff --git a/iroha_cli/src/main.rs b/crates/iroha_cli/src/main.rs similarity index 100% rename from iroha_cli/src/main.rs rename to crates/iroha_cli/src/main.rs diff --git a/iroha_codec/Cargo.toml b/crates/iroha_codec/Cargo.toml similarity index 100% rename from iroha_codec/Cargo.toml rename to crates/iroha_codec/Cargo.toml diff --git a/iroha_codec/README.md b/crates/iroha_codec/README.md similarity index 100% rename from iroha_codec/README.md rename to crates/iroha_codec/README.md diff --git a/iroha_codec/build.rs b/crates/iroha_codec/build.rs similarity index 100% rename from iroha_codec/build.rs rename to crates/iroha_codec/build.rs diff --git a/iroha_codec/samples/account.bin b/crates/iroha_codec/samples/account.bin similarity index 100% rename from iroha_codec/samples/account.bin rename to crates/iroha_codec/samples/account.bin diff --git a/iroha_codec/samples/account.json b/crates/iroha_codec/samples/account.json similarity index 100% rename from iroha_codec/samples/account.json rename to crates/iroha_codec/samples/account.json diff --git a/iroha_codec/samples/domain.bin b/crates/iroha_codec/samples/domain.bin similarity index 100% rename from iroha_codec/samples/domain.bin rename to crates/iroha_codec/samples/domain.bin diff --git a/iroha_codec/samples/domain.json b/crates/iroha_codec/samples/domain.json similarity index 100% rename from iroha_codec/samples/domain.json rename to crates/iroha_codec/samples/domain.json diff --git a/iroha_codec/samples/trigger.bin b/crates/iroha_codec/samples/trigger.bin similarity index 100% rename from iroha_codec/samples/trigger.bin rename to crates/iroha_codec/samples/trigger.bin diff --git a/iroha_codec/samples/trigger.json b/crates/iroha_codec/samples/trigger.json similarity index 100% rename from iroha_codec/samples/trigger.json rename to crates/iroha_codec/samples/trigger.json diff --git a/iroha_codec/src/main.rs b/crates/iroha_codec/src/main.rs similarity index 100% rename from iroha_codec/src/main.rs rename to crates/iroha_codec/src/main.rs diff --git a/iroha_config/Cargo.toml b/crates/iroha_config/Cargo.toml similarity index 100% rename from iroha_config/Cargo.toml rename to crates/iroha_config/Cargo.toml diff --git a/iroha_config/iroha_test_config.toml b/crates/iroha_config/iroha_test_config.toml similarity index 100% rename from iroha_config/iroha_test_config.toml rename to crates/iroha_config/iroha_test_config.toml diff --git a/iroha_config/src/client_api.rs b/crates/iroha_config/src/client_api.rs similarity index 100% rename from iroha_config/src/client_api.rs rename to crates/iroha_config/src/client_api.rs diff --git a/iroha_config/src/kura.rs b/crates/iroha_config/src/kura.rs similarity index 100% rename from iroha_config/src/kura.rs rename to crates/iroha_config/src/kura.rs diff --git a/iroha_config/src/lib.rs b/crates/iroha_config/src/lib.rs similarity index 100% rename from iroha_config/src/lib.rs rename to crates/iroha_config/src/lib.rs diff --git a/iroha_config/src/logger.rs b/crates/iroha_config/src/logger.rs similarity index 100% rename from iroha_config/src/logger.rs rename to crates/iroha_config/src/logger.rs diff --git a/iroha_config/src/parameters/actual.rs b/crates/iroha_config/src/parameters/actual.rs similarity index 100% rename from iroha_config/src/parameters/actual.rs rename to crates/iroha_config/src/parameters/actual.rs diff --git a/iroha_config/src/parameters/defaults.rs b/crates/iroha_config/src/parameters/defaults.rs similarity index 100% rename from iroha_config/src/parameters/defaults.rs rename to crates/iroha_config/src/parameters/defaults.rs diff --git a/iroha_config/src/parameters/mod.rs b/crates/iroha_config/src/parameters/mod.rs similarity index 100% rename from iroha_config/src/parameters/mod.rs rename to crates/iroha_config/src/parameters/mod.rs diff --git a/iroha_config/src/parameters/user.rs b/crates/iroha_config/src/parameters/user.rs similarity index 100% rename from iroha_config/src/parameters/user.rs rename to crates/iroha_config/src/parameters/user.rs diff --git a/iroha_config/src/snapshot.rs b/crates/iroha_config/src/snapshot.rs similarity index 100% rename from iroha_config/src/snapshot.rs rename to crates/iroha_config/src/snapshot.rs diff --git a/iroha_config/src/wasm.rs b/crates/iroha_config/src/wasm.rs similarity index 100% rename from iroha_config/src/wasm.rs rename to crates/iroha_config/src/wasm.rs diff --git a/iroha_config/tests/fixtures.rs b/crates/iroha_config/tests/fixtures.rs similarity index 100% rename from iroha_config/tests/fixtures.rs rename to crates/iroha_config/tests/fixtures.rs diff --git a/iroha_config/tests/fixtures/absolute_paths.toml b/crates/iroha_config/tests/fixtures/absolute_paths.toml similarity index 100% rename from iroha_config/tests/fixtures/absolute_paths.toml rename to crates/iroha_config/tests/fixtures/absolute_paths.toml diff --git a/iroha_config/tests/fixtures/bad.extra_fields.toml b/crates/iroha_config/tests/fixtures/bad.extra_fields.toml similarity index 100% rename from iroha_config/tests/fixtures/bad.extra_fields.toml rename to crates/iroha_config/tests/fixtures/bad.extra_fields.toml diff --git a/iroha_config/tests/fixtures/bad.missing_fields.toml b/crates/iroha_config/tests/fixtures/bad.missing_fields.toml similarity index 100% rename from iroha_config/tests/fixtures/bad.missing_fields.toml rename to crates/iroha_config/tests/fixtures/bad.missing_fields.toml diff --git a/iroha_config/tests/fixtures/bad.multiple_bad_envs.env b/crates/iroha_config/tests/fixtures/bad.multiple_bad_envs.env similarity index 100% rename from iroha_config/tests/fixtures/bad.multiple_bad_envs.env rename to crates/iroha_config/tests/fixtures/bad.multiple_bad_envs.env diff --git a/iroha_config/tests/fixtures/bad.torii_addr_eq_p2p_addr.toml b/crates/iroha_config/tests/fixtures/bad.torii_addr_eq_p2p_addr.toml similarity index 100% rename from iroha_config/tests/fixtures/bad.torii_addr_eq_p2p_addr.toml rename to crates/iroha_config/tests/fixtures/bad.torii_addr_eq_p2p_addr.toml diff --git a/iroha_config/tests/fixtures/base.toml b/crates/iroha_config/tests/fixtures/base.toml similarity index 100% rename from iroha_config/tests/fixtures/base.toml rename to crates/iroha_config/tests/fixtures/base.toml diff --git a/iroha_config/tests/fixtures/base_trusted_peers.toml b/crates/iroha_config/tests/fixtures/base_trusted_peers.toml similarity index 100% rename from iroha_config/tests/fixtures/base_trusted_peers.toml rename to crates/iroha_config/tests/fixtures/base_trusted_peers.toml diff --git a/iroha_config/tests/fixtures/full.env b/crates/iroha_config/tests/fixtures/full.env similarity index 100% rename from iroha_config/tests/fixtures/full.env rename to crates/iroha_config/tests/fixtures/full.env diff --git a/iroha_config/tests/fixtures/full.toml b/crates/iroha_config/tests/fixtures/full.toml similarity index 100% rename from iroha_config/tests/fixtures/full.toml rename to crates/iroha_config/tests/fixtures/full.toml diff --git a/iroha_config/tests/fixtures/minimal_alone_with_genesis.toml b/crates/iroha_config/tests/fixtures/minimal_alone_with_genesis.toml similarity index 100% rename from iroha_config/tests/fixtures/minimal_alone_with_genesis.toml rename to crates/iroha_config/tests/fixtures/minimal_alone_with_genesis.toml diff --git a/iroha_config/tests/fixtures/minimal_file_and_env.env b/crates/iroha_config/tests/fixtures/minimal_file_and_env.env similarity index 100% rename from iroha_config/tests/fixtures/minimal_file_and_env.env rename to crates/iroha_config/tests/fixtures/minimal_file_and_env.env diff --git a/iroha_config/tests/fixtures/minimal_file_and_env.toml b/crates/iroha_config/tests/fixtures/minimal_file_and_env.toml similarity index 100% rename from iroha_config/tests/fixtures/minimal_file_and_env.toml rename to crates/iroha_config/tests/fixtures/minimal_file_and_env.toml diff --git a/iroha_config/tests/fixtures/minimal_with_trusted_peers.toml b/crates/iroha_config/tests/fixtures/minimal_with_trusted_peers.toml similarity index 100% rename from iroha_config/tests/fixtures/minimal_with_trusted_peers.toml rename to crates/iroha_config/tests/fixtures/minimal_with_trusted_peers.toml diff --git a/iroha_config_base/Cargo.toml b/crates/iroha_config_base/Cargo.toml similarity index 100% rename from iroha_config_base/Cargo.toml rename to crates/iroha_config_base/Cargo.toml diff --git a/iroha_config_base/src/attach.rs b/crates/iroha_config_base/src/attach.rs similarity index 100% rename from iroha_config_base/src/attach.rs rename to crates/iroha_config_base/src/attach.rs diff --git a/iroha_config_base/src/env.rs b/crates/iroha_config_base/src/env.rs similarity index 100% rename from iroha_config_base/src/env.rs rename to crates/iroha_config_base/src/env.rs diff --git a/iroha_config_base/src/lib.rs b/crates/iroha_config_base/src/lib.rs similarity index 100% rename from iroha_config_base/src/lib.rs rename to crates/iroha_config_base/src/lib.rs diff --git a/iroha_config_base/src/read.rs b/crates/iroha_config_base/src/read.rs similarity index 100% rename from iroha_config_base/src/read.rs rename to crates/iroha_config_base/src/read.rs diff --git a/iroha_config_base/src/toml.rs b/crates/iroha_config_base/src/toml.rs similarity index 100% rename from iroha_config_base/src/toml.rs rename to crates/iroha_config_base/src/toml.rs diff --git a/iroha_config_base/src/util.rs b/crates/iroha_config_base/src/util.rs similarity index 100% rename from iroha_config_base/src/util.rs rename to crates/iroha_config_base/src/util.rs diff --git a/iroha_config_base/tests/bad.invalid-extends.toml b/crates/iroha_config_base/tests/bad.invalid-extends.toml similarity index 100% rename from iroha_config_base/tests/bad.invalid-extends.toml rename to crates/iroha_config_base/tests/bad.invalid-extends.toml diff --git a/iroha_config_base/tests/bad.invalid-nested-extends.base.toml b/crates/iroha_config_base/tests/bad.invalid-nested-extends.base.toml similarity index 100% rename from iroha_config_base/tests/bad.invalid-nested-extends.base.toml rename to crates/iroha_config_base/tests/bad.invalid-nested-extends.base.toml diff --git a/iroha_config_base/tests/bad.invalid-nested-extends.toml b/crates/iroha_config_base/tests/bad.invalid-nested-extends.toml similarity index 100% rename from iroha_config_base/tests/bad.invalid-nested-extends.toml rename to crates/iroha_config_base/tests/bad.invalid-nested-extends.toml diff --git a/iroha_config_base/tests/misc.rs b/crates/iroha_config_base/tests/misc.rs similarity index 100% rename from iroha_config_base/tests/misc.rs rename to crates/iroha_config_base/tests/misc.rs diff --git a/iroha_config_base_derive/Cargo.toml b/crates/iroha_config_base_derive/Cargo.toml similarity index 100% rename from iroha_config_base_derive/Cargo.toml rename to crates/iroha_config_base_derive/Cargo.toml diff --git a/iroha_config_base_derive/src/lib.rs b/crates/iroha_config_base_derive/src/lib.rs similarity index 100% rename from iroha_config_base_derive/src/lib.rs rename to crates/iroha_config_base_derive/src/lib.rs diff --git a/iroha_config_base_derive/tests/ui.rs b/crates/iroha_config_base_derive/tests/ui.rs similarity index 100% rename from iroha_config_base_derive/tests/ui.rs rename to crates/iroha_config_base_derive/tests/ui.rs diff --git a/iroha_config_base_derive/tests/ui_fail/generics.rs b/crates/iroha_config_base_derive/tests/ui_fail/generics.rs similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/generics.rs rename to crates/iroha_config_base_derive/tests/ui_fail/generics.rs diff --git a/iroha_config_base_derive/tests/ui_fail/generics.stderr b/crates/iroha_config_base_derive/tests/ui_fail/generics.stderr similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/generics.stderr rename to crates/iroha_config_base_derive/tests/ui_fail/generics.stderr diff --git a/iroha_config_base_derive/tests/ui_fail/invalid_attrs_commas.rs b/crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_commas.rs similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/invalid_attrs_commas.rs rename to crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_commas.rs diff --git a/iroha_config_base_derive/tests/ui_fail/invalid_attrs_commas.stderr b/crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_commas.stderr similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/invalid_attrs_commas.stderr rename to crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_commas.stderr diff --git a/iroha_config_base_derive/tests/ui_fail/invalid_attrs_conflicts.rs b/crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_conflicts.rs similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/invalid_attrs_conflicts.rs rename to crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_conflicts.rs diff --git a/iroha_config_base_derive/tests/ui_fail/invalid_attrs_conflicts.stderr b/crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_conflicts.stderr similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/invalid_attrs_conflicts.stderr rename to crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_conflicts.stderr diff --git a/iroha_config_base_derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs b/crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs rename to crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_default_invalid_expr.rs diff --git a/iroha_config_base_derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr b/crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr rename to crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_default_invalid_expr.stderr diff --git a/iroha_config_base_derive/tests/ui_fail/invalid_attrs_env_without_var.rs b/crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_env_without_var.rs similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/invalid_attrs_env_without_var.rs rename to crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_env_without_var.rs diff --git a/iroha_config_base_derive/tests/ui_fail/invalid_attrs_env_without_var.stderr b/crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_env_without_var.stderr similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/invalid_attrs_env_without_var.stderr rename to crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_env_without_var.stderr diff --git a/iroha_config_base_derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs b/crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs rename to crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.rs diff --git a/iroha_config_base_derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr b/crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr rename to crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_no_comma_between_attrs.stderr diff --git a/iroha_config_base_derive/tests/ui_fail/invalid_attrs_struct.rs b/crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_struct.rs similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/invalid_attrs_struct.rs rename to crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_struct.rs diff --git a/iroha_config_base_derive/tests/ui_fail/invalid_attrs_struct.stderr b/crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_struct.stderr similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/invalid_attrs_struct.stderr rename to crates/iroha_config_base_derive/tests/ui_fail/invalid_attrs_struct.stderr diff --git a/iroha_config_base_derive/tests/ui_fail/unsupported_shapes.rs b/crates/iroha_config_base_derive/tests/ui_fail/unsupported_shapes.rs similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/unsupported_shapes.rs rename to crates/iroha_config_base_derive/tests/ui_fail/unsupported_shapes.rs diff --git a/iroha_config_base_derive/tests/ui_fail/unsupported_shapes.stderr b/crates/iroha_config_base_derive/tests/ui_fail/unsupported_shapes.stderr similarity index 100% rename from iroha_config_base_derive/tests/ui_fail/unsupported_shapes.stderr rename to crates/iroha_config_base_derive/tests/ui_fail/unsupported_shapes.stderr diff --git a/iroha_config_base_derive/tests/ui_pass/happy_path.rs b/crates/iroha_config_base_derive/tests/ui_pass/happy_path.rs similarity index 100% rename from iroha_config_base_derive/tests/ui_pass/happy_path.rs rename to crates/iroha_config_base_derive/tests/ui_pass/happy_path.rs diff --git a/iroha_core/Cargo.toml b/crates/iroha_core/Cargo.toml similarity index 100% rename from iroha_core/Cargo.toml rename to crates/iroha_core/Cargo.toml diff --git a/iroha_core/benches/blocks/apply_blocks.rs b/crates/iroha_core/benches/blocks/apply_blocks.rs similarity index 100% rename from iroha_core/benches/blocks/apply_blocks.rs rename to crates/iroha_core/benches/blocks/apply_blocks.rs diff --git a/iroha_core/benches/blocks/apply_blocks_benchmark.rs b/crates/iroha_core/benches/blocks/apply_blocks_benchmark.rs similarity index 100% rename from iroha_core/benches/blocks/apply_blocks_benchmark.rs rename to crates/iroha_core/benches/blocks/apply_blocks_benchmark.rs diff --git a/iroha_core/benches/blocks/apply_blocks_oneshot.rs b/crates/iroha_core/benches/blocks/apply_blocks_oneshot.rs similarity index 100% rename from iroha_core/benches/blocks/apply_blocks_oneshot.rs rename to crates/iroha_core/benches/blocks/apply_blocks_oneshot.rs diff --git a/iroha_core/benches/blocks/common.rs b/crates/iroha_core/benches/blocks/common.rs similarity index 100% rename from iroha_core/benches/blocks/common.rs rename to crates/iroha_core/benches/blocks/common.rs diff --git a/iroha_core/benches/blocks/validate_blocks.rs b/crates/iroha_core/benches/blocks/validate_blocks.rs similarity index 100% rename from iroha_core/benches/blocks/validate_blocks.rs rename to crates/iroha_core/benches/blocks/validate_blocks.rs diff --git a/iroha_core/benches/blocks/validate_blocks_benchmark.rs b/crates/iroha_core/benches/blocks/validate_blocks_benchmark.rs similarity index 100% rename from iroha_core/benches/blocks/validate_blocks_benchmark.rs rename to crates/iroha_core/benches/blocks/validate_blocks_benchmark.rs diff --git a/iroha_core/benches/blocks/validate_blocks_oneshot.rs b/crates/iroha_core/benches/blocks/validate_blocks_oneshot.rs similarity index 100% rename from iroha_core/benches/blocks/validate_blocks_oneshot.rs rename to crates/iroha_core/benches/blocks/validate_blocks_oneshot.rs diff --git a/iroha_core/benches/kura.rs b/crates/iroha_core/benches/kura.rs similarity index 100% rename from iroha_core/benches/kura.rs rename to crates/iroha_core/benches/kura.rs diff --git a/iroha_core/benches/validation.rs b/crates/iroha_core/benches/validation.rs similarity index 100% rename from iroha_core/benches/validation.rs rename to crates/iroha_core/benches/validation.rs diff --git a/iroha_core/clippy.toml b/crates/iroha_core/clippy.toml similarity index 100% rename from iroha_core/clippy.toml rename to crates/iroha_core/clippy.toml diff --git a/iroha_core/src/block.rs b/crates/iroha_core/src/block.rs similarity index 100% rename from iroha_core/src/block.rs rename to crates/iroha_core/src/block.rs diff --git a/iroha_core/src/block_sync.rs b/crates/iroha_core/src/block_sync.rs similarity index 100% rename from iroha_core/src/block_sync.rs rename to crates/iroha_core/src/block_sync.rs diff --git a/iroha_core/src/executor.rs b/crates/iroha_core/src/executor.rs similarity index 100% rename from iroha_core/src/executor.rs rename to crates/iroha_core/src/executor.rs diff --git a/iroha_core/src/gossiper.rs b/crates/iroha_core/src/gossiper.rs similarity index 100% rename from iroha_core/src/gossiper.rs rename to crates/iroha_core/src/gossiper.rs diff --git a/iroha_core/src/kiso.rs b/crates/iroha_core/src/kiso.rs similarity index 100% rename from iroha_core/src/kiso.rs rename to crates/iroha_core/src/kiso.rs diff --git a/iroha_core/src/kura.rs b/crates/iroha_core/src/kura.rs similarity index 100% rename from iroha_core/src/kura.rs rename to crates/iroha_core/src/kura.rs diff --git a/iroha_core/src/lib.rs b/crates/iroha_core/src/lib.rs similarity index 100% rename from iroha_core/src/lib.rs rename to crates/iroha_core/src/lib.rs diff --git a/iroha_core/src/metrics.rs b/crates/iroha_core/src/metrics.rs similarity index 100% rename from iroha_core/src/metrics.rs rename to crates/iroha_core/src/metrics.rs diff --git a/iroha_core/src/query/cursor.rs b/crates/iroha_core/src/query/cursor.rs similarity index 100% rename from iroha_core/src/query/cursor.rs rename to crates/iroha_core/src/query/cursor.rs diff --git a/iroha_core/src/query/mod.rs b/crates/iroha_core/src/query/mod.rs similarity index 100% rename from iroha_core/src/query/mod.rs rename to crates/iroha_core/src/query/mod.rs diff --git a/iroha_core/src/query/pagination.rs b/crates/iroha_core/src/query/pagination.rs similarity index 100% rename from iroha_core/src/query/pagination.rs rename to crates/iroha_core/src/query/pagination.rs diff --git a/iroha_core/src/query/store.rs b/crates/iroha_core/src/query/store.rs similarity index 100% rename from iroha_core/src/query/store.rs rename to crates/iroha_core/src/query/store.rs diff --git a/iroha_core/src/queue.rs b/crates/iroha_core/src/queue.rs similarity index 100% rename from iroha_core/src/queue.rs rename to crates/iroha_core/src/queue.rs diff --git a/iroha_core/src/smartcontracts/isi/account.rs b/crates/iroha_core/src/smartcontracts/isi/account.rs similarity index 100% rename from iroha_core/src/smartcontracts/isi/account.rs rename to crates/iroha_core/src/smartcontracts/isi/account.rs diff --git a/iroha_core/src/smartcontracts/isi/asset.rs b/crates/iroha_core/src/smartcontracts/isi/asset.rs similarity index 100% rename from iroha_core/src/smartcontracts/isi/asset.rs rename to crates/iroha_core/src/smartcontracts/isi/asset.rs diff --git a/iroha_core/src/smartcontracts/isi/block.rs b/crates/iroha_core/src/smartcontracts/isi/block.rs similarity index 100% rename from iroha_core/src/smartcontracts/isi/block.rs rename to crates/iroha_core/src/smartcontracts/isi/block.rs diff --git a/iroha_core/src/smartcontracts/isi/domain.rs b/crates/iroha_core/src/smartcontracts/isi/domain.rs similarity index 100% rename from iroha_core/src/smartcontracts/isi/domain.rs rename to crates/iroha_core/src/smartcontracts/isi/domain.rs diff --git a/iroha_core/src/smartcontracts/isi/mod.rs b/crates/iroha_core/src/smartcontracts/isi/mod.rs similarity index 100% rename from iroha_core/src/smartcontracts/isi/mod.rs rename to crates/iroha_core/src/smartcontracts/isi/mod.rs diff --git a/iroha_core/src/smartcontracts/isi/query.rs b/crates/iroha_core/src/smartcontracts/isi/query.rs similarity index 100% rename from iroha_core/src/smartcontracts/isi/query.rs rename to crates/iroha_core/src/smartcontracts/isi/query.rs diff --git a/iroha_core/src/smartcontracts/isi/triggers/mod.rs b/crates/iroha_core/src/smartcontracts/isi/triggers/mod.rs similarity index 100% rename from iroha_core/src/smartcontracts/isi/triggers/mod.rs rename to crates/iroha_core/src/smartcontracts/isi/triggers/mod.rs diff --git a/iroha_core/src/smartcontracts/isi/triggers/set.rs b/crates/iroha_core/src/smartcontracts/isi/triggers/set.rs similarity index 100% rename from iroha_core/src/smartcontracts/isi/triggers/set.rs rename to crates/iroha_core/src/smartcontracts/isi/triggers/set.rs diff --git a/iroha_core/src/smartcontracts/isi/triggers/specialized.rs b/crates/iroha_core/src/smartcontracts/isi/triggers/specialized.rs similarity index 100% rename from iroha_core/src/smartcontracts/isi/triggers/specialized.rs rename to crates/iroha_core/src/smartcontracts/isi/triggers/specialized.rs diff --git a/iroha_core/src/smartcontracts/isi/tx.rs b/crates/iroha_core/src/smartcontracts/isi/tx.rs similarity index 100% rename from iroha_core/src/smartcontracts/isi/tx.rs rename to crates/iroha_core/src/smartcontracts/isi/tx.rs diff --git a/iroha_core/src/smartcontracts/isi/world.rs b/crates/iroha_core/src/smartcontracts/isi/world.rs similarity index 100% rename from iroha_core/src/smartcontracts/isi/world.rs rename to crates/iroha_core/src/smartcontracts/isi/world.rs diff --git a/iroha_core/src/smartcontracts/mod.rs b/crates/iroha_core/src/smartcontracts/mod.rs similarity index 100% rename from iroha_core/src/smartcontracts/mod.rs rename to crates/iroha_core/src/smartcontracts/mod.rs diff --git a/iroha_core/src/smartcontracts/wasm.rs b/crates/iroha_core/src/smartcontracts/wasm.rs similarity index 100% rename from iroha_core/src/smartcontracts/wasm.rs rename to crates/iroha_core/src/smartcontracts/wasm.rs diff --git a/iroha_core/src/snapshot.rs b/crates/iroha_core/src/snapshot.rs similarity index 100% rename from iroha_core/src/snapshot.rs rename to crates/iroha_core/src/snapshot.rs diff --git a/iroha_core/src/state.rs b/crates/iroha_core/src/state.rs similarity index 100% rename from iroha_core/src/state.rs rename to crates/iroha_core/src/state.rs diff --git a/iroha_core/src/sumeragi/main_loop.rs b/crates/iroha_core/src/sumeragi/main_loop.rs similarity index 100% rename from iroha_core/src/sumeragi/main_loop.rs rename to crates/iroha_core/src/sumeragi/main_loop.rs diff --git a/iroha_core/src/sumeragi/message.rs b/crates/iroha_core/src/sumeragi/message.rs similarity index 100% rename from iroha_core/src/sumeragi/message.rs rename to crates/iroha_core/src/sumeragi/message.rs diff --git a/iroha_core/src/sumeragi/mod.rs b/crates/iroha_core/src/sumeragi/mod.rs similarity index 100% rename from iroha_core/src/sumeragi/mod.rs rename to crates/iroha_core/src/sumeragi/mod.rs diff --git a/iroha_core/src/sumeragi/network_topology.rs b/crates/iroha_core/src/sumeragi/network_topology.rs similarity index 100% rename from iroha_core/src/sumeragi/network_topology.rs rename to crates/iroha_core/src/sumeragi/network_topology.rs diff --git a/iroha_core/src/sumeragi/view_change.rs b/crates/iroha_core/src/sumeragi/view_change.rs similarity index 100% rename from iroha_core/src/sumeragi/view_change.rs rename to crates/iroha_core/src/sumeragi/view_change.rs diff --git a/iroha_core/src/tx.rs b/crates/iroha_core/src/tx.rs similarity index 100% rename from iroha_core/src/tx.rs rename to crates/iroha_core/src/tx.rs diff --git a/iroha_crypto/Cargo.toml b/crates/iroha_crypto/Cargo.toml similarity index 100% rename from iroha_crypto/Cargo.toml rename to crates/iroha_crypto/Cargo.toml diff --git a/iroha_crypto/build.rs b/crates/iroha_crypto/build.rs similarity index 100% rename from iroha_crypto/build.rs rename to crates/iroha_crypto/build.rs diff --git a/iroha_crypto/src/encryption/chacha20poly1305.rs b/crates/iroha_crypto/src/encryption/chacha20poly1305.rs similarity index 100% rename from iroha_crypto/src/encryption/chacha20poly1305.rs rename to crates/iroha_crypto/src/encryption/chacha20poly1305.rs diff --git a/iroha_crypto/src/encryption/mod.rs b/crates/iroha_crypto/src/encryption/mod.rs similarity index 100% rename from iroha_crypto/src/encryption/mod.rs rename to crates/iroha_crypto/src/encryption/mod.rs diff --git a/iroha_crypto/src/hash.rs b/crates/iroha_crypto/src/hash.rs similarity index 100% rename from iroha_crypto/src/hash.rs rename to crates/iroha_crypto/src/hash.rs diff --git a/iroha_crypto/src/kex/mod.rs b/crates/iroha_crypto/src/kex/mod.rs similarity index 100% rename from iroha_crypto/src/kex/mod.rs rename to crates/iroha_crypto/src/kex/mod.rs diff --git a/iroha_crypto/src/kex/x25519.rs b/crates/iroha_crypto/src/kex/x25519.rs similarity index 100% rename from iroha_crypto/src/kex/x25519.rs rename to crates/iroha_crypto/src/kex/x25519.rs diff --git a/iroha_crypto/src/lib.rs b/crates/iroha_crypto/src/lib.rs similarity index 100% rename from iroha_crypto/src/lib.rs rename to crates/iroha_crypto/src/lib.rs diff --git a/iroha_crypto/src/merkle.rs b/crates/iroha_crypto/src/merkle.rs similarity index 100% rename from iroha_crypto/src/merkle.rs rename to crates/iroha_crypto/src/merkle.rs diff --git a/iroha_crypto/src/multihash.rs b/crates/iroha_crypto/src/multihash.rs similarity index 100% rename from iroha_crypto/src/multihash.rs rename to crates/iroha_crypto/src/multihash.rs diff --git a/iroha_crypto/src/secrecy.rs b/crates/iroha_crypto/src/secrecy.rs similarity index 100% rename from iroha_crypto/src/secrecy.rs rename to crates/iroha_crypto/src/secrecy.rs diff --git a/iroha_crypto/src/signature/bls/implementation.rs b/crates/iroha_crypto/src/signature/bls/implementation.rs similarity index 100% rename from iroha_crypto/src/signature/bls/implementation.rs rename to crates/iroha_crypto/src/signature/bls/implementation.rs diff --git a/iroha_crypto/src/signature/bls/mod.rs b/crates/iroha_crypto/src/signature/bls/mod.rs similarity index 100% rename from iroha_crypto/src/signature/bls/mod.rs rename to crates/iroha_crypto/src/signature/bls/mod.rs diff --git a/iroha_crypto/src/signature/bls/tests.rs b/crates/iroha_crypto/src/signature/bls/tests.rs similarity index 100% rename from iroha_crypto/src/signature/bls/tests.rs rename to crates/iroha_crypto/src/signature/bls/tests.rs diff --git a/iroha_crypto/src/signature/ed25519.rs b/crates/iroha_crypto/src/signature/ed25519.rs similarity index 100% rename from iroha_crypto/src/signature/ed25519.rs rename to crates/iroha_crypto/src/signature/ed25519.rs diff --git a/iroha_crypto/src/signature/mod.rs b/crates/iroha_crypto/src/signature/mod.rs similarity index 100% rename from iroha_crypto/src/signature/mod.rs rename to crates/iroha_crypto/src/signature/mod.rs diff --git a/iroha_crypto/src/signature/secp256k1.rs b/crates/iroha_crypto/src/signature/secp256k1.rs similarity index 100% rename from iroha_crypto/src/signature/secp256k1.rs rename to crates/iroha_crypto/src/signature/secp256k1.rs diff --git a/iroha_crypto/src/varint.rs b/crates/iroha_crypto/src/varint.rs similarity index 100% rename from iroha_crypto/src/varint.rs rename to crates/iroha_crypto/src/varint.rs diff --git a/iroha_data_model/Cargo.toml b/crates/iroha_data_model/Cargo.toml similarity index 100% rename from iroha_data_model/Cargo.toml rename to crates/iroha_data_model/Cargo.toml diff --git a/iroha_data_model/benches/time_event_filter.rs b/crates/iroha_data_model/benches/time_event_filter.rs similarity index 100% rename from iroha_data_model/benches/time_event_filter.rs rename to crates/iroha_data_model/benches/time_event_filter.rs diff --git a/iroha_data_model/build.rs b/crates/iroha_data_model/build.rs similarity index 100% rename from iroha_data_model/build.rs rename to crates/iroha_data_model/build.rs diff --git a/iroha_data_model/clippy.toml b/crates/iroha_data_model/clippy.toml similarity index 100% rename from iroha_data_model/clippy.toml rename to crates/iroha_data_model/clippy.toml diff --git a/iroha_data_model/src/account.rs b/crates/iroha_data_model/src/account.rs similarity index 100% rename from iroha_data_model/src/account.rs rename to crates/iroha_data_model/src/account.rs diff --git a/iroha_data_model/src/asset.rs b/crates/iroha_data_model/src/asset.rs similarity index 100% rename from iroha_data_model/src/asset.rs rename to crates/iroha_data_model/src/asset.rs diff --git a/iroha_data_model/src/block.rs b/crates/iroha_data_model/src/block.rs similarity index 100% rename from iroha_data_model/src/block.rs rename to crates/iroha_data_model/src/block.rs diff --git a/iroha_data_model/src/domain.rs b/crates/iroha_data_model/src/domain.rs similarity index 100% rename from iroha_data_model/src/domain.rs rename to crates/iroha_data_model/src/domain.rs diff --git a/iroha_data_model/src/events/data/events.rs b/crates/iroha_data_model/src/events/data/events.rs similarity index 100% rename from iroha_data_model/src/events/data/events.rs rename to crates/iroha_data_model/src/events/data/events.rs diff --git a/iroha_data_model/src/events/data/filters.rs b/crates/iroha_data_model/src/events/data/filters.rs similarity index 100% rename from iroha_data_model/src/events/data/filters.rs rename to crates/iroha_data_model/src/events/data/filters.rs diff --git a/iroha_data_model/src/events/data/mod.rs b/crates/iroha_data_model/src/events/data/mod.rs similarity index 100% rename from iroha_data_model/src/events/data/mod.rs rename to crates/iroha_data_model/src/events/data/mod.rs diff --git a/iroha_data_model/src/events/execute_trigger.rs b/crates/iroha_data_model/src/events/execute_trigger.rs similarity index 100% rename from iroha_data_model/src/events/execute_trigger.rs rename to crates/iroha_data_model/src/events/execute_trigger.rs diff --git a/iroha_data_model/src/events/mod.rs b/crates/iroha_data_model/src/events/mod.rs similarity index 100% rename from iroha_data_model/src/events/mod.rs rename to crates/iroha_data_model/src/events/mod.rs diff --git a/iroha_data_model/src/events/pipeline.rs b/crates/iroha_data_model/src/events/pipeline.rs similarity index 100% rename from iroha_data_model/src/events/pipeline.rs rename to crates/iroha_data_model/src/events/pipeline.rs diff --git a/iroha_data_model/src/events/time.rs b/crates/iroha_data_model/src/events/time.rs similarity index 100% rename from iroha_data_model/src/events/time.rs rename to crates/iroha_data_model/src/events/time.rs diff --git a/iroha_data_model/src/events/trigger_completed.rs b/crates/iroha_data_model/src/events/trigger_completed.rs similarity index 100% rename from iroha_data_model/src/events/trigger_completed.rs rename to crates/iroha_data_model/src/events/trigger_completed.rs diff --git a/iroha_data_model/src/executor.rs b/crates/iroha_data_model/src/executor.rs similarity index 100% rename from iroha_data_model/src/executor.rs rename to crates/iroha_data_model/src/executor.rs diff --git a/iroha_data_model/src/ipfs.rs b/crates/iroha_data_model/src/ipfs.rs similarity index 100% rename from iroha_data_model/src/ipfs.rs rename to crates/iroha_data_model/src/ipfs.rs diff --git a/iroha_data_model/src/isi.rs b/crates/iroha_data_model/src/isi.rs similarity index 100% rename from iroha_data_model/src/isi.rs rename to crates/iroha_data_model/src/isi.rs diff --git a/iroha_data_model/src/lib.rs b/crates/iroha_data_model/src/lib.rs similarity index 100% rename from iroha_data_model/src/lib.rs rename to crates/iroha_data_model/src/lib.rs diff --git a/iroha_data_model/src/metadata.rs b/crates/iroha_data_model/src/metadata.rs similarity index 100% rename from iroha_data_model/src/metadata.rs rename to crates/iroha_data_model/src/metadata.rs diff --git a/iroha_data_model/src/name.rs b/crates/iroha_data_model/src/name.rs similarity index 100% rename from iroha_data_model/src/name.rs rename to crates/iroha_data_model/src/name.rs diff --git a/iroha_data_model/src/parameter.rs b/crates/iroha_data_model/src/parameter.rs similarity index 100% rename from iroha_data_model/src/parameter.rs rename to crates/iroha_data_model/src/parameter.rs diff --git a/iroha_data_model/src/peer.rs b/crates/iroha_data_model/src/peer.rs similarity index 100% rename from iroha_data_model/src/peer.rs rename to crates/iroha_data_model/src/peer.rs diff --git a/iroha_data_model/src/permission.rs b/crates/iroha_data_model/src/permission.rs similarity index 100% rename from iroha_data_model/src/permission.rs rename to crates/iroha_data_model/src/permission.rs diff --git a/iroha_data_model/src/query/builder.rs b/crates/iroha_data_model/src/query/builder.rs similarity index 100% rename from iroha_data_model/src/query/builder.rs rename to crates/iroha_data_model/src/query/builder.rs diff --git a/iroha_data_model/src/query/mod.rs b/crates/iroha_data_model/src/query/mod.rs similarity index 100% rename from iroha_data_model/src/query/mod.rs rename to crates/iroha_data_model/src/query/mod.rs diff --git a/iroha_data_model/src/query/parameters.rs b/crates/iroha_data_model/src/query/parameters.rs similarity index 100% rename from iroha_data_model/src/query/parameters.rs rename to crates/iroha_data_model/src/query/parameters.rs diff --git a/iroha_data_model/src/query/predicate/mod.rs b/crates/iroha_data_model/src/query/predicate/mod.rs similarity index 100% rename from iroha_data_model/src/query/predicate/mod.rs rename to crates/iroha_data_model/src/query/predicate/mod.rs diff --git a/iroha_data_model/src/query/predicate/predicate_ast_extensions.rs b/crates/iroha_data_model/src/query/predicate/predicate_ast_extensions.rs similarity index 100% rename from iroha_data_model/src/query/predicate/predicate_ast_extensions.rs rename to crates/iroha_data_model/src/query/predicate/predicate_ast_extensions.rs diff --git a/iroha_data_model/src/query/predicate/predicate_atoms/account.rs b/crates/iroha_data_model/src/query/predicate/predicate_atoms/account.rs similarity index 100% rename from iroha_data_model/src/query/predicate/predicate_atoms/account.rs rename to crates/iroha_data_model/src/query/predicate/predicate_atoms/account.rs diff --git a/iroha_data_model/src/query/predicate/predicate_atoms/asset.rs b/crates/iroha_data_model/src/query/predicate/predicate_atoms/asset.rs similarity index 100% rename from iroha_data_model/src/query/predicate/predicate_atoms/asset.rs rename to crates/iroha_data_model/src/query/predicate/predicate_atoms/asset.rs diff --git a/iroha_data_model/src/query/predicate/predicate_atoms/block.rs b/crates/iroha_data_model/src/query/predicate/predicate_atoms/block.rs similarity index 100% rename from iroha_data_model/src/query/predicate/predicate_atoms/block.rs rename to crates/iroha_data_model/src/query/predicate/predicate_atoms/block.rs diff --git a/iroha_data_model/src/query/predicate/predicate_atoms/domain.rs b/crates/iroha_data_model/src/query/predicate/predicate_atoms/domain.rs similarity index 100% rename from iroha_data_model/src/query/predicate/predicate_atoms/domain.rs rename to crates/iroha_data_model/src/query/predicate/predicate_atoms/domain.rs diff --git a/iroha_data_model/src/query/predicate/predicate_atoms/mod.rs b/crates/iroha_data_model/src/query/predicate/predicate_atoms/mod.rs similarity index 100% rename from iroha_data_model/src/query/predicate/predicate_atoms/mod.rs rename to crates/iroha_data_model/src/query/predicate/predicate_atoms/mod.rs diff --git a/iroha_data_model/src/query/predicate/predicate_atoms/parameter.rs b/crates/iroha_data_model/src/query/predicate/predicate_atoms/parameter.rs similarity index 100% rename from iroha_data_model/src/query/predicate/predicate_atoms/parameter.rs rename to crates/iroha_data_model/src/query/predicate/predicate_atoms/parameter.rs diff --git a/iroha_data_model/src/query/predicate/predicate_atoms/peer.rs b/crates/iroha_data_model/src/query/predicate/predicate_atoms/peer.rs similarity index 100% rename from iroha_data_model/src/query/predicate/predicate_atoms/peer.rs rename to crates/iroha_data_model/src/query/predicate/predicate_atoms/peer.rs diff --git a/iroha_data_model/src/query/predicate/predicate_atoms/permission.rs b/crates/iroha_data_model/src/query/predicate/predicate_atoms/permission.rs similarity index 100% rename from iroha_data_model/src/query/predicate/predicate_atoms/permission.rs rename to crates/iroha_data_model/src/query/predicate/predicate_atoms/permission.rs diff --git a/iroha_data_model/src/query/predicate/predicate_atoms/role.rs b/crates/iroha_data_model/src/query/predicate/predicate_atoms/role.rs similarity index 100% rename from iroha_data_model/src/query/predicate/predicate_atoms/role.rs rename to crates/iroha_data_model/src/query/predicate/predicate_atoms/role.rs diff --git a/iroha_data_model/src/query/predicate/predicate_atoms/trigger.rs b/crates/iroha_data_model/src/query/predicate/predicate_atoms/trigger.rs similarity index 100% rename from iroha_data_model/src/query/predicate/predicate_atoms/trigger.rs rename to crates/iroha_data_model/src/query/predicate/predicate_atoms/trigger.rs diff --git a/iroha_data_model/src/query/predicate/predicate_combinators.rs b/crates/iroha_data_model/src/query/predicate/predicate_combinators.rs similarity index 100% rename from iroha_data_model/src/query/predicate/predicate_combinators.rs rename to crates/iroha_data_model/src/query/predicate/predicate_combinators.rs diff --git a/iroha_data_model/src/query/predicate/projectors.rs b/crates/iroha_data_model/src/query/predicate/projectors.rs similarity index 100% rename from iroha_data_model/src/query/predicate/projectors.rs rename to crates/iroha_data_model/src/query/predicate/projectors.rs diff --git a/iroha_data_model/src/query/predicate/prototypes/account.rs b/crates/iroha_data_model/src/query/predicate/prototypes/account.rs similarity index 100% rename from iroha_data_model/src/query/predicate/prototypes/account.rs rename to crates/iroha_data_model/src/query/predicate/prototypes/account.rs diff --git a/iroha_data_model/src/query/predicate/prototypes/asset.rs b/crates/iroha_data_model/src/query/predicate/prototypes/asset.rs similarity index 100% rename from iroha_data_model/src/query/predicate/prototypes/asset.rs rename to crates/iroha_data_model/src/query/predicate/prototypes/asset.rs diff --git a/iroha_data_model/src/query/predicate/prototypes/block.rs b/crates/iroha_data_model/src/query/predicate/prototypes/block.rs similarity index 100% rename from iroha_data_model/src/query/predicate/prototypes/block.rs rename to crates/iroha_data_model/src/query/predicate/prototypes/block.rs diff --git a/iroha_data_model/src/query/predicate/prototypes/domain.rs b/crates/iroha_data_model/src/query/predicate/prototypes/domain.rs similarity index 100% rename from iroha_data_model/src/query/predicate/prototypes/domain.rs rename to crates/iroha_data_model/src/query/predicate/prototypes/domain.rs diff --git a/iroha_data_model/src/query/predicate/prototypes/mod.rs b/crates/iroha_data_model/src/query/predicate/prototypes/mod.rs similarity index 100% rename from iroha_data_model/src/query/predicate/prototypes/mod.rs rename to crates/iroha_data_model/src/query/predicate/prototypes/mod.rs diff --git a/iroha_data_model/src/query/predicate/prototypes/parameter.rs b/crates/iroha_data_model/src/query/predicate/prototypes/parameter.rs similarity index 100% rename from iroha_data_model/src/query/predicate/prototypes/parameter.rs rename to crates/iroha_data_model/src/query/predicate/prototypes/parameter.rs diff --git a/iroha_data_model/src/query/predicate/prototypes/peer.rs b/crates/iroha_data_model/src/query/predicate/prototypes/peer.rs similarity index 100% rename from iroha_data_model/src/query/predicate/prototypes/peer.rs rename to crates/iroha_data_model/src/query/predicate/prototypes/peer.rs diff --git a/iroha_data_model/src/query/predicate/prototypes/permission.rs b/crates/iroha_data_model/src/query/predicate/prototypes/permission.rs similarity index 100% rename from iroha_data_model/src/query/predicate/prototypes/permission.rs rename to crates/iroha_data_model/src/query/predicate/prototypes/permission.rs diff --git a/iroha_data_model/src/query/predicate/prototypes/role.rs b/crates/iroha_data_model/src/query/predicate/prototypes/role.rs similarity index 100% rename from iroha_data_model/src/query/predicate/prototypes/role.rs rename to crates/iroha_data_model/src/query/predicate/prototypes/role.rs diff --git a/iroha_data_model/src/query/predicate/prototypes/trigger.rs b/crates/iroha_data_model/src/query/predicate/prototypes/trigger.rs similarity index 100% rename from iroha_data_model/src/query/predicate/prototypes/trigger.rs rename to crates/iroha_data_model/src/query/predicate/prototypes/trigger.rs diff --git a/iroha_data_model/src/role.rs b/crates/iroha_data_model/src/role.rs similarity index 100% rename from iroha_data_model/src/role.rs rename to crates/iroha_data_model/src/role.rs diff --git a/iroha_data_model/src/smart_contract.rs b/crates/iroha_data_model/src/smart_contract.rs similarity index 100% rename from iroha_data_model/src/smart_contract.rs rename to crates/iroha_data_model/src/smart_contract.rs diff --git a/iroha_data_model/src/transaction.rs b/crates/iroha_data_model/src/transaction.rs similarity index 100% rename from iroha_data_model/src/transaction.rs rename to crates/iroha_data_model/src/transaction.rs diff --git a/iroha_data_model/src/trigger.rs b/crates/iroha_data_model/src/trigger.rs similarity index 100% rename from iroha_data_model/src/trigger.rs rename to crates/iroha_data_model/src/trigger.rs diff --git a/iroha_data_model/src/visit.rs b/crates/iroha_data_model/src/visit.rs similarity index 100% rename from iroha_data_model/src/visit.rs rename to crates/iroha_data_model/src/visit.rs diff --git a/iroha_data_model/tests/data_model.rs b/crates/iroha_data_model/tests/data_model.rs similarity index 100% rename from iroha_data_model/tests/data_model.rs rename to crates/iroha_data_model/tests/data_model.rs diff --git a/iroha_data_model_derive/Cargo.toml b/crates/iroha_data_model_derive/Cargo.toml similarity index 100% rename from iroha_data_model_derive/Cargo.toml rename to crates/iroha_data_model_derive/Cargo.toml diff --git a/iroha_data_model_derive/src/enum_ref.rs b/crates/iroha_data_model_derive/src/enum_ref.rs similarity index 100% rename from iroha_data_model_derive/src/enum_ref.rs rename to crates/iroha_data_model_derive/src/enum_ref.rs diff --git a/iroha_data_model_derive/src/event_set.rs b/crates/iroha_data_model_derive/src/event_set.rs similarity index 100% rename from iroha_data_model_derive/src/event_set.rs rename to crates/iroha_data_model_derive/src/event_set.rs diff --git a/iroha_data_model_derive/src/has_origin.rs b/crates/iroha_data_model_derive/src/has_origin.rs similarity index 100% rename from iroha_data_model_derive/src/has_origin.rs rename to crates/iroha_data_model_derive/src/has_origin.rs diff --git a/iroha_data_model_derive/src/id.rs b/crates/iroha_data_model_derive/src/id.rs similarity index 100% rename from iroha_data_model_derive/src/id.rs rename to crates/iroha_data_model_derive/src/id.rs diff --git a/iroha_data_model_derive/src/lib.rs b/crates/iroha_data_model_derive/src/lib.rs similarity index 100% rename from iroha_data_model_derive/src/lib.rs rename to crates/iroha_data_model_derive/src/lib.rs diff --git a/iroha_data_model_derive/src/model.rs b/crates/iroha_data_model_derive/src/model.rs similarity index 100% rename from iroha_data_model_derive/src/model.rs rename to crates/iroha_data_model_derive/src/model.rs diff --git a/iroha_data_model_derive/src/partially_tagged/mod.rs b/crates/iroha_data_model_derive/src/partially_tagged/mod.rs similarity index 100% rename from iroha_data_model_derive/src/partially_tagged/mod.rs rename to crates/iroha_data_model_derive/src/partially_tagged/mod.rs diff --git a/iroha_data_model_derive/src/partially_tagged/resolve_self.rs b/crates/iroha_data_model_derive/src/partially_tagged/resolve_self.rs similarity index 100% rename from iroha_data_model_derive/src/partially_tagged/resolve_self.rs rename to crates/iroha_data_model_derive/src/partially_tagged/resolve_self.rs diff --git a/iroha_data_model_derive/tests/event_set.rs b/crates/iroha_data_model_derive/tests/event_set.rs similarity index 100% rename from iroha_data_model_derive/tests/event_set.rs rename to crates/iroha_data_model_derive/tests/event_set.rs diff --git a/iroha_data_model_derive/tests/has_origin.rs b/crates/iroha_data_model_derive/tests/has_origin.rs similarity index 100% rename from iroha_data_model_derive/tests/has_origin.rs rename to crates/iroha_data_model_derive/tests/has_origin.rs diff --git a/iroha_data_model_derive/tests/has_origin_generics.rs b/crates/iroha_data_model_derive/tests/has_origin_generics.rs similarity index 100% rename from iroha_data_model_derive/tests/has_origin_generics.rs rename to crates/iroha_data_model_derive/tests/has_origin_generics.rs diff --git a/iroha_data_model_derive/tests/id_eq_ord_hash.rs b/crates/iroha_data_model_derive/tests/id_eq_ord_hash.rs similarity index 100% rename from iroha_data_model_derive/tests/id_eq_ord_hash.rs rename to crates/iroha_data_model_derive/tests/id_eq_ord_hash.rs diff --git a/iroha_data_model_derive/tests/partial_tagged_serde.rs b/crates/iroha_data_model_derive/tests/partial_tagged_serde.rs similarity index 100% rename from iroha_data_model_derive/tests/partial_tagged_serde.rs rename to crates/iroha_data_model_derive/tests/partial_tagged_serde.rs diff --git a/iroha_data_model_derive/tests/partial_tagged_serde_self.rs b/crates/iroha_data_model_derive/tests/partial_tagged_serde_self.rs similarity index 100% rename from iroha_data_model_derive/tests/partial_tagged_serde_self.rs rename to crates/iroha_data_model_derive/tests/partial_tagged_serde_self.rs diff --git a/iroha_data_model_derive/tests/ui.rs b/crates/iroha_data_model_derive/tests/ui.rs similarity index 100% rename from iroha_data_model_derive/tests/ui.rs rename to crates/iroha_data_model_derive/tests/ui.rs diff --git a/iroha_data_model_derive/tests/ui_fail/has_origin_multiple_attributes.rs b/crates/iroha_data_model_derive/tests/ui_fail/has_origin_multiple_attributes.rs similarity index 100% rename from iroha_data_model_derive/tests/ui_fail/has_origin_multiple_attributes.rs rename to crates/iroha_data_model_derive/tests/ui_fail/has_origin_multiple_attributes.rs diff --git a/iroha_data_model_derive/tests/ui_fail/has_origin_multiple_attributes.stderr b/crates/iroha_data_model_derive/tests/ui_fail/has_origin_multiple_attributes.stderr similarity index 100% rename from iroha_data_model_derive/tests/ui_fail/has_origin_multiple_attributes.stderr rename to crates/iroha_data_model_derive/tests/ui_fail/has_origin_multiple_attributes.stderr diff --git a/iroha_data_model_derive/tests/ui_fail/transparent_api_private_field.rs b/crates/iroha_data_model_derive/tests/ui_fail/transparent_api_private_field.rs similarity index 100% rename from iroha_data_model_derive/tests/ui_fail/transparent_api_private_field.rs rename to crates/iroha_data_model_derive/tests/ui_fail/transparent_api_private_field.rs diff --git a/iroha_data_model_derive/tests/ui_fail/transparent_api_private_field.stderr b/crates/iroha_data_model_derive/tests/ui_fail/transparent_api_private_field.stderr similarity index 100% rename from iroha_data_model_derive/tests/ui_fail/transparent_api_private_field.stderr rename to crates/iroha_data_model_derive/tests/ui_fail/transparent_api_private_field.stderr diff --git a/iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.rs b/crates/iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.rs similarity index 100% rename from iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.rs rename to crates/iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.rs diff --git a/iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.stderr b/crates/iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.stderr similarity index 85% rename from iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.stderr rename to crates/iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.stderr index 15a50251409..001be1c7e34 100644 --- a/iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.stderr +++ b/crates/iroha_data_model_derive/tests/ui_fail/transparent_api_private_item.stderr @@ -5,7 +5,7 @@ error[E0603]: struct `BlockPayload` is private | ^^^^^^^^^^^^ private struct | note: the struct `BlockPayload` is defined here - --> $WORKSPACE/iroha_data_model/src/block.rs + --> $WORKSPACE/crates/iroha_data_model/src/block.rs | | pub use self::model::*; | ^^^^^^^^^^^ diff --git a/iroha_derive/Cargo.toml b/crates/iroha_derive/Cargo.toml similarity index 100% rename from iroha_derive/Cargo.toml rename to crates/iroha_derive/Cargo.toml diff --git a/iroha_derive/src/lib.rs b/crates/iroha_derive/src/lib.rs similarity index 100% rename from iroha_derive/src/lib.rs rename to crates/iroha_derive/src/lib.rs diff --git a/iroha_derive/tests/container_enum_from_variant.rs b/crates/iroha_derive/tests/container_enum_from_variant.rs similarity index 100% rename from iroha_derive/tests/container_enum_from_variant.rs rename to crates/iroha_derive/tests/container_enum_from_variant.rs diff --git a/iroha_derive/tests/enum_from_variant_attrs.rs b/crates/iroha_derive/tests/enum_from_variant_attrs.rs similarity index 100% rename from iroha_derive/tests/enum_from_variant_attrs.rs rename to crates/iroha_derive/tests/enum_from_variant_attrs.rs diff --git a/iroha_derive/tests/ui.rs b/crates/iroha_derive/tests/ui.rs similarity index 100% rename from iroha_derive/tests/ui.rs rename to crates/iroha_derive/tests/ui.rs diff --git a/iroha_derive/tests/ui_fail/from_variant_conflicting_implementation.rs b/crates/iroha_derive/tests/ui_fail/from_variant_conflicting_implementation.rs similarity index 100% rename from iroha_derive/tests/ui_fail/from_variant_conflicting_implementation.rs rename to crates/iroha_derive/tests/ui_fail/from_variant_conflicting_implementation.rs diff --git a/iroha_derive/tests/ui_fail/from_variant_conflicting_implementation.stderr b/crates/iroha_derive/tests/ui_fail/from_variant_conflicting_implementation.stderr similarity index 100% rename from iroha_derive/tests/ui_fail/from_variant_conflicting_implementation.stderr rename to crates/iroha_derive/tests/ui_fail/from_variant_conflicting_implementation.stderr diff --git a/iroha_derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs b/crates/iroha_derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs similarity index 100% rename from iroha_derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs rename to crates/iroha_derive/tests/ui_fail/from_variant_incorrect_attr_placement.rs diff --git a/iroha_derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr b/crates/iroha_derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr similarity index 100% rename from iroha_derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr rename to crates/iroha_derive/tests/ui_fail/from_variant_incorrect_attr_placement.stderr diff --git a/iroha_derive/tests/ui_fail/from_variant_same_type.rs b/crates/iroha_derive/tests/ui_fail/from_variant_same_type.rs similarity index 100% rename from iroha_derive/tests/ui_fail/from_variant_same_type.rs rename to crates/iroha_derive/tests/ui_fail/from_variant_same_type.rs diff --git a/iroha_derive/tests/ui_fail/from_variant_same_type.stderr b/crates/iroha_derive/tests/ui_fail/from_variant_same_type.stderr similarity index 100% rename from iroha_derive/tests/ui_fail/from_variant_same_type.stderr rename to crates/iroha_derive/tests/ui_fail/from_variant_same_type.stderr diff --git a/iroha_derive/tests/ui_fail/struct_from_variant.rs b/crates/iroha_derive/tests/ui_fail/struct_from_variant.rs similarity index 100% rename from iroha_derive/tests/ui_fail/struct_from_variant.rs rename to crates/iroha_derive/tests/ui_fail/struct_from_variant.rs diff --git a/iroha_derive/tests/ui_fail/struct_from_variant.stderr b/crates/iroha_derive/tests/ui_fail/struct_from_variant.stderr similarity index 100% rename from iroha_derive/tests/ui_fail/struct_from_variant.stderr rename to crates/iroha_derive/tests/ui_fail/struct_from_variant.stderr diff --git a/iroha_derive/tests/ui_pass/enum_from_variant.rs b/crates/iroha_derive/tests/ui_pass/enum_from_variant.rs similarity index 100% rename from iroha_derive/tests/ui_pass/enum_from_variant.rs rename to crates/iroha_derive/tests/ui_pass/enum_from_variant.rs diff --git a/iroha_executor/Cargo.toml b/crates/iroha_executor/Cargo.toml similarity index 100% rename from iroha_executor/Cargo.toml rename to crates/iroha_executor/Cargo.toml diff --git a/iroha_executor/src/default.rs b/crates/iroha_executor/src/default.rs similarity index 100% rename from iroha_executor/src/default.rs rename to crates/iroha_executor/src/default.rs diff --git a/iroha_executor/src/lib.rs b/crates/iroha_executor/src/lib.rs similarity index 100% rename from iroha_executor/src/lib.rs rename to crates/iroha_executor/src/lib.rs diff --git a/iroha_executor/src/permission.rs b/crates/iroha_executor/src/permission.rs similarity index 100% rename from iroha_executor/src/permission.rs rename to crates/iroha_executor/src/permission.rs diff --git a/iroha_executor_data_model/Cargo.toml b/crates/iroha_executor_data_model/Cargo.toml similarity index 100% rename from iroha_executor_data_model/Cargo.toml rename to crates/iroha_executor_data_model/Cargo.toml diff --git a/iroha_executor_data_model/src/lib.rs b/crates/iroha_executor_data_model/src/lib.rs similarity index 100% rename from iroha_executor_data_model/src/lib.rs rename to crates/iroha_executor_data_model/src/lib.rs diff --git a/iroha_executor_data_model/src/parameter.rs b/crates/iroha_executor_data_model/src/parameter.rs similarity index 100% rename from iroha_executor_data_model/src/parameter.rs rename to crates/iroha_executor_data_model/src/parameter.rs diff --git a/iroha_executor_data_model/src/permission.rs b/crates/iroha_executor_data_model/src/permission.rs similarity index 100% rename from iroha_executor_data_model/src/permission.rs rename to crates/iroha_executor_data_model/src/permission.rs diff --git a/iroha_executor_data_model_derive/Cargo.toml b/crates/iroha_executor_data_model_derive/Cargo.toml similarity index 100% rename from iroha_executor_data_model_derive/Cargo.toml rename to crates/iroha_executor_data_model_derive/Cargo.toml diff --git a/iroha_executor_data_model_derive/src/lib.rs b/crates/iroha_executor_data_model_derive/src/lib.rs similarity index 100% rename from iroha_executor_data_model_derive/src/lib.rs rename to crates/iroha_executor_data_model_derive/src/lib.rs diff --git a/iroha_executor_data_model_derive/src/parameter.rs b/crates/iroha_executor_data_model_derive/src/parameter.rs similarity index 100% rename from iroha_executor_data_model_derive/src/parameter.rs rename to crates/iroha_executor_data_model_derive/src/parameter.rs diff --git a/iroha_executor_data_model_derive/src/permission.rs b/crates/iroha_executor_data_model_derive/src/permission.rs similarity index 100% rename from iroha_executor_data_model_derive/src/permission.rs rename to crates/iroha_executor_data_model_derive/src/permission.rs diff --git a/iroha_executor_derive/Cargo.toml b/crates/iroha_executor_derive/Cargo.toml similarity index 100% rename from iroha_executor_derive/Cargo.toml rename to crates/iroha_executor_derive/Cargo.toml diff --git a/iroha_executor_derive/src/default.rs b/crates/iroha_executor_derive/src/default.rs similarity index 100% rename from iroha_executor_derive/src/default.rs rename to crates/iroha_executor_derive/src/default.rs diff --git a/iroha_executor_derive/src/entrypoint.rs b/crates/iroha_executor_derive/src/entrypoint.rs similarity index 100% rename from iroha_executor_derive/src/entrypoint.rs rename to crates/iroha_executor_derive/src/entrypoint.rs diff --git a/iroha_executor_derive/src/lib.rs b/crates/iroha_executor_derive/src/lib.rs similarity index 100% rename from iroha_executor_derive/src/lib.rs rename to crates/iroha_executor_derive/src/lib.rs diff --git a/iroha_ffi/.cargo/config.toml b/crates/iroha_ffi/.cargo/config.toml similarity index 100% rename from iroha_ffi/.cargo/config.toml rename to crates/iroha_ffi/.cargo/config.toml diff --git a/iroha_ffi/Cargo.toml b/crates/iroha_ffi/Cargo.toml similarity index 100% rename from iroha_ffi/Cargo.toml rename to crates/iroha_ffi/Cargo.toml diff --git a/iroha_ffi/src/handle.rs b/crates/iroha_ffi/src/handle.rs similarity index 100% rename from iroha_ffi/src/handle.rs rename to crates/iroha_ffi/src/handle.rs diff --git a/iroha_ffi/src/ir.rs b/crates/iroha_ffi/src/ir.rs similarity index 100% rename from iroha_ffi/src/ir.rs rename to crates/iroha_ffi/src/ir.rs diff --git a/iroha_ffi/src/lib.rs b/crates/iroha_ffi/src/lib.rs similarity index 100% rename from iroha_ffi/src/lib.rs rename to crates/iroha_ffi/src/lib.rs diff --git a/iroha_ffi/src/option.rs b/crates/iroha_ffi/src/option.rs similarity index 100% rename from iroha_ffi/src/option.rs rename to crates/iroha_ffi/src/option.rs diff --git a/iroha_ffi/src/primitives.rs b/crates/iroha_ffi/src/primitives.rs similarity index 100% rename from iroha_ffi/src/primitives.rs rename to crates/iroha_ffi/src/primitives.rs diff --git a/iroha_ffi/src/repr_c.rs b/crates/iroha_ffi/src/repr_c.rs similarity index 100% rename from iroha_ffi/src/repr_c.rs rename to crates/iroha_ffi/src/repr_c.rs diff --git a/iroha_ffi/src/slice.rs b/crates/iroha_ffi/src/slice.rs similarity index 100% rename from iroha_ffi/src/slice.rs rename to crates/iroha_ffi/src/slice.rs diff --git a/iroha_ffi/src/std_impls.rs b/crates/iroha_ffi/src/std_impls.rs similarity index 100% rename from iroha_ffi/src/std_impls.rs rename to crates/iroha_ffi/src/std_impls.rs diff --git a/iroha_ffi/tests/export_getset.rs b/crates/iroha_ffi/tests/export_getset.rs similarity index 100% rename from iroha_ffi/tests/export_getset.rs rename to crates/iroha_ffi/tests/export_getset.rs diff --git a/iroha_ffi/tests/export_shared_fns.rs b/crates/iroha_ffi/tests/export_shared_fns.rs similarity index 100% rename from iroha_ffi/tests/export_shared_fns.rs rename to crates/iroha_ffi/tests/export_shared_fns.rs diff --git a/iroha_ffi/tests/ffi_export.rs b/crates/iroha_ffi/tests/ffi_export.rs similarity index 100% rename from iroha_ffi/tests/ffi_export.rs rename to crates/iroha_ffi/tests/ffi_export.rs diff --git a/iroha_ffi/tests/ffi_export_import_u128_i128.rs b/crates/iroha_ffi/tests/ffi_export_import_u128_i128.rs similarity index 100% rename from iroha_ffi/tests/ffi_export_import_u128_i128.rs rename to crates/iroha_ffi/tests/ffi_export_import_u128_i128.rs diff --git a/iroha_ffi/tests/ffi_import.rs b/crates/iroha_ffi/tests/ffi_import.rs similarity index 100% rename from iroha_ffi/tests/ffi_import.rs rename to crates/iroha_ffi/tests/ffi_import.rs diff --git a/iroha_ffi/tests/ffi_import_opaque.rs b/crates/iroha_ffi/tests/ffi_import_opaque.rs similarity index 100% rename from iroha_ffi/tests/ffi_import_opaque.rs rename to crates/iroha_ffi/tests/ffi_import_opaque.rs diff --git a/iroha_ffi/tests/generics.rs b/crates/iroha_ffi/tests/generics.rs similarity index 100% rename from iroha_ffi/tests/generics.rs rename to crates/iroha_ffi/tests/generics.rs diff --git a/iroha_ffi/tests/import_getset.rs b/crates/iroha_ffi/tests/import_getset.rs similarity index 100% rename from iroha_ffi/tests/import_getset.rs rename to crates/iroha_ffi/tests/import_getset.rs diff --git a/iroha_ffi/tests/import_shared_fns.rs b/crates/iroha_ffi/tests/import_shared_fns.rs similarity index 100% rename from iroha_ffi/tests/import_shared_fns.rs rename to crates/iroha_ffi/tests/import_shared_fns.rs diff --git a/iroha_ffi/tests/transparent.rs b/crates/iroha_ffi/tests/transparent.rs similarity index 100% rename from iroha_ffi/tests/transparent.rs rename to crates/iroha_ffi/tests/transparent.rs diff --git a/iroha_ffi/tests/unambiguous.rs b/crates/iroha_ffi/tests/unambiguous.rs similarity index 100% rename from iroha_ffi/tests/unambiguous.rs rename to crates/iroha_ffi/tests/unambiguous.rs diff --git a/iroha_ffi_derive/Cargo.toml b/crates/iroha_ffi_derive/Cargo.toml similarity index 100% rename from iroha_ffi_derive/Cargo.toml rename to crates/iroha_ffi_derive/Cargo.toml diff --git a/iroha_ffi_derive/src/attr_parse/derive.rs b/crates/iroha_ffi_derive/src/attr_parse/derive.rs similarity index 100% rename from iroha_ffi_derive/src/attr_parse/derive.rs rename to crates/iroha_ffi_derive/src/attr_parse/derive.rs diff --git a/iroha_ffi_derive/src/attr_parse/doc.rs b/crates/iroha_ffi_derive/src/attr_parse/doc.rs similarity index 100% rename from iroha_ffi_derive/src/attr_parse/doc.rs rename to crates/iroha_ffi_derive/src/attr_parse/doc.rs diff --git a/iroha_ffi_derive/src/attr_parse/getset.rs b/crates/iroha_ffi_derive/src/attr_parse/getset.rs similarity index 100% rename from iroha_ffi_derive/src/attr_parse/getset.rs rename to crates/iroha_ffi_derive/src/attr_parse/getset.rs diff --git a/iroha_ffi_derive/src/attr_parse/mod.rs b/crates/iroha_ffi_derive/src/attr_parse/mod.rs similarity index 100% rename from iroha_ffi_derive/src/attr_parse/mod.rs rename to crates/iroha_ffi_derive/src/attr_parse/mod.rs diff --git a/iroha_ffi_derive/src/attr_parse/repr.rs b/crates/iroha_ffi_derive/src/attr_parse/repr.rs similarity index 100% rename from iroha_ffi_derive/src/attr_parse/repr.rs rename to crates/iroha_ffi_derive/src/attr_parse/repr.rs diff --git a/iroha_ffi_derive/src/convert.rs b/crates/iroha_ffi_derive/src/convert.rs similarity index 100% rename from iroha_ffi_derive/src/convert.rs rename to crates/iroha_ffi_derive/src/convert.rs diff --git a/iroha_ffi_derive/src/ffi_fn.rs b/crates/iroha_ffi_derive/src/ffi_fn.rs similarity index 100% rename from iroha_ffi_derive/src/ffi_fn.rs rename to crates/iroha_ffi_derive/src/ffi_fn.rs diff --git a/iroha_ffi_derive/src/getset_gen.rs b/crates/iroha_ffi_derive/src/getset_gen.rs similarity index 100% rename from iroha_ffi_derive/src/getset_gen.rs rename to crates/iroha_ffi_derive/src/getset_gen.rs diff --git a/iroha_ffi_derive/src/impl_visitor.rs b/crates/iroha_ffi_derive/src/impl_visitor.rs similarity index 100% rename from iroha_ffi_derive/src/impl_visitor.rs rename to crates/iroha_ffi_derive/src/impl_visitor.rs diff --git a/iroha_ffi_derive/src/lib.rs b/crates/iroha_ffi_derive/src/lib.rs similarity index 100% rename from iroha_ffi_derive/src/lib.rs rename to crates/iroha_ffi_derive/src/lib.rs diff --git a/iroha_ffi_derive/src/wrapper.rs b/crates/iroha_ffi_derive/src/wrapper.rs similarity index 100% rename from iroha_ffi_derive/src/wrapper.rs rename to crates/iroha_ffi_derive/src/wrapper.rs diff --git a/iroha_ffi_derive/tests/ui.rs b/crates/iroha_ffi_derive/tests/ui.rs similarity index 100% rename from iroha_ffi_derive/tests/ui.rs rename to crates/iroha_ffi_derive/tests/ui.rs diff --git a/iroha_ffi_derive/tests/ui_fail/array_as_ptr.rs b/crates/iroha_ffi_derive/tests/ui_fail/array_as_ptr.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/array_as_ptr.rs rename to crates/iroha_ffi_derive/tests/ui_fail/array_as_ptr.rs diff --git a/iroha_ffi_derive/tests/ui_fail/array_as_ptr.stderr b/crates/iroha_ffi_derive/tests/ui_fail/array_as_ptr.stderr similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/array_as_ptr.stderr rename to crates/iroha_ffi_derive/tests/ui_fail/array_as_ptr.stderr diff --git a/iroha_ffi_derive/tests/ui_fail/derive_skip_field.rs b/crates/iroha_ffi_derive/tests/ui_fail/derive_skip_field.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/derive_skip_field.rs rename to crates/iroha_ffi_derive/tests/ui_fail/derive_skip_field.rs diff --git a/iroha_ffi_derive/tests/ui_fail/derive_skip_field.stderr b/crates/iroha_ffi_derive/tests/ui_fail/derive_skip_field.stderr similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/derive_skip_field.stderr rename to crates/iroha_ffi_derive/tests/ui_fail/derive_skip_field.stderr diff --git a/iroha_ffi_derive/tests/ui_fail/derive_skip_struct.rs b/crates/iroha_ffi_derive/tests/ui_fail/derive_skip_struct.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/derive_skip_struct.rs rename to crates/iroha_ffi_derive/tests/ui_fail/derive_skip_struct.rs diff --git a/iroha_ffi_derive/tests/ui_fail/derive_skip_struct.stderr b/crates/iroha_ffi_derive/tests/ui_fail/derive_skip_struct.stderr similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/derive_skip_struct.stderr rename to crates/iroha_ffi_derive/tests/ui_fail/derive_skip_struct.stderr diff --git a/iroha_ffi_derive/tests/ui_fail/fallible_transmute_mut_ref.rs b/crates/iroha_ffi_derive/tests/ui_fail/fallible_transmute_mut_ref.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/fallible_transmute_mut_ref.rs rename to crates/iroha_ffi_derive/tests/ui_fail/fallible_transmute_mut_ref.rs diff --git a/iroha_ffi_derive/tests/ui_fail/fallible_transmute_mut_ref.stderr b/crates/iroha_ffi_derive/tests/ui_fail/fallible_transmute_mut_ref.stderr similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/fallible_transmute_mut_ref.stderr rename to crates/iroha_ffi_derive/tests/ui_fail/fallible_transmute_mut_ref.stderr diff --git a/iroha_ffi_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs b/crates/iroha_ffi_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs rename to crates/iroha_ffi_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs diff --git a/iroha_ffi_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr b/crates/iroha_ffi_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr rename to crates/iroha_ffi_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr diff --git a/iroha_ffi_derive/tests/ui_fail/fieldless_enum_without_repr.rs b/crates/iroha_ffi_derive/tests/ui_fail/fieldless_enum_without_repr.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/fieldless_enum_without_repr.rs rename to crates/iroha_ffi_derive/tests/ui_fail/fieldless_enum_without_repr.rs diff --git a/iroha_ffi_derive/tests/ui_fail/fieldless_enum_without_repr.stderr b/crates/iroha_ffi_derive/tests/ui_fail/fieldless_enum_without_repr.stderr similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/fieldless_enum_without_repr.stderr rename to crates/iroha_ffi_derive/tests/ui_fail/fieldless_enum_without_repr.stderr diff --git a/iroha_ffi_derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs b/crates/iroha_ffi_derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs rename to crates/iroha_ffi_derive/tests/ui_fail/generics_are_forbiden_in_ffi.rs diff --git a/iroha_ffi_derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr b/crates/iroha_ffi_derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr rename to crates/iroha_ffi_derive/tests/ui_fail/generics_are_forbiden_in_ffi.stderr diff --git a/iroha_ffi_derive/tests/ui_fail/nested_owned_structure.rs b/crates/iroha_ffi_derive/tests/ui_fail/nested_owned_structure.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/nested_owned_structure.rs rename to crates/iroha_ffi_derive/tests/ui_fail/nested_owned_structure.rs diff --git a/iroha_ffi_derive/tests/ui_fail/nested_owned_structure.stderr b/crates/iroha_ffi_derive/tests/ui_fail/nested_owned_structure.stderr similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/nested_owned_structure.stderr rename to crates/iroha_ffi_derive/tests/ui_fail/nested_owned_structure.stderr diff --git a/iroha_ffi_derive/tests/ui_fail/non_robust_repr_c.rs b/crates/iroha_ffi_derive/tests/ui_fail/non_robust_repr_c.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/non_robust_repr_c.rs rename to crates/iroha_ffi_derive/tests/ui_fail/non_robust_repr_c.rs diff --git a/iroha_ffi_derive/tests/ui_fail/non_robust_repr_c.stderr b/crates/iroha_ffi_derive/tests/ui_fail/non_robust_repr_c.stderr similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/non_robust_repr_c.stderr rename to crates/iroha_ffi_derive/tests/ui_fail/non_robust_repr_c.stderr diff --git a/iroha_ffi_derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs b/crates/iroha_ffi_derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs rename to crates/iroha_ffi_derive/tests/ui_fail/private_method_inside_impl_are_skipped.rs diff --git a/iroha_ffi_derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr b/crates/iroha_ffi_derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr rename to crates/iroha_ffi_derive/tests/ui_fail/private_method_inside_impl_are_skipped.stderr diff --git a/iroha_ffi_derive/tests/ui_fail/raw_pointer_type.rs b/crates/iroha_ffi_derive/tests/ui_fail/raw_pointer_type.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/raw_pointer_type.rs rename to crates/iroha_ffi_derive/tests/ui_fail/raw_pointer_type.rs diff --git a/iroha_ffi_derive/tests/ui_fail/raw_pointer_type.stderr b/crates/iroha_ffi_derive/tests/ui_fail/raw_pointer_type.stderr similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/raw_pointer_type.stderr rename to crates/iroha_ffi_derive/tests/ui_fail/raw_pointer_type.stderr diff --git a/iroha_ffi_derive/tests/ui_fail/uninhabited_enum.rs b/crates/iroha_ffi_derive/tests/ui_fail/uninhabited_enum.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/uninhabited_enum.rs rename to crates/iroha_ffi_derive/tests/ui_fail/uninhabited_enum.rs diff --git a/iroha_ffi_derive/tests/ui_fail/uninhabited_enum.stderr b/crates/iroha_ffi_derive/tests/ui_fail/uninhabited_enum.stderr similarity index 100% rename from iroha_ffi_derive/tests/ui_fail/uninhabited_enum.stderr rename to crates/iroha_ffi_derive/tests/ui_fail/uninhabited_enum.stderr diff --git a/iroha_ffi_derive/tests/ui_pass/ffi_export_arg_pattern.rs b/crates/iroha_ffi_derive/tests/ui_pass/ffi_export_arg_pattern.rs similarity index 100% rename from iroha_ffi_derive/tests/ui_pass/ffi_export_arg_pattern.rs rename to crates/iroha_ffi_derive/tests/ui_pass/ffi_export_arg_pattern.rs diff --git a/iroha_futures/Cargo.toml b/crates/iroha_futures/Cargo.toml similarity index 100% rename from iroha_futures/Cargo.toml rename to crates/iroha_futures/Cargo.toml diff --git a/iroha_futures/src/lib.rs b/crates/iroha_futures/src/lib.rs similarity index 100% rename from iroha_futures/src/lib.rs rename to crates/iroha_futures/src/lib.rs diff --git a/iroha_futures/src/supervisor.rs b/crates/iroha_futures/src/supervisor.rs similarity index 100% rename from iroha_futures/src/supervisor.rs rename to crates/iroha_futures/src/supervisor.rs diff --git a/iroha_futures/tests/basic.rs b/crates/iroha_futures/tests/basic.rs similarity index 100% rename from iroha_futures/tests/basic.rs rename to crates/iroha_futures/tests/basic.rs diff --git a/iroha_futures_derive/Cargo.toml b/crates/iroha_futures_derive/Cargo.toml similarity index 100% rename from iroha_futures_derive/Cargo.toml rename to crates/iroha_futures_derive/Cargo.toml diff --git a/iroha_futures_derive/src/lib.rs b/crates/iroha_futures_derive/src/lib.rs similarity index 100% rename from iroha_futures_derive/src/lib.rs rename to crates/iroha_futures_derive/src/lib.rs diff --git a/iroha_genesis/Cargo.toml b/crates/iroha_genesis/Cargo.toml similarity index 100% rename from iroha_genesis/Cargo.toml rename to crates/iroha_genesis/Cargo.toml diff --git a/iroha_genesis/src/lib.rs b/crates/iroha_genesis/src/lib.rs similarity index 100% rename from iroha_genesis/src/lib.rs rename to crates/iroha_genesis/src/lib.rs diff --git a/iroha_kagami/Cargo.toml b/crates/iroha_kagami/Cargo.toml similarity index 100% rename from iroha_kagami/Cargo.toml rename to crates/iroha_kagami/Cargo.toml diff --git a/iroha_kagami/README.md b/crates/iroha_kagami/README.md similarity index 100% rename from iroha_kagami/README.md rename to crates/iroha_kagami/README.md diff --git a/iroha_kagami/src/crypto.rs b/crates/iroha_kagami/src/crypto.rs similarity index 100% rename from iroha_kagami/src/crypto.rs rename to crates/iroha_kagami/src/crypto.rs diff --git a/iroha_kagami/src/genesis.rs b/crates/iroha_kagami/src/genesis.rs similarity index 100% rename from iroha_kagami/src/genesis.rs rename to crates/iroha_kagami/src/genesis.rs diff --git a/iroha_kagami/src/genesis/generate.rs b/crates/iroha_kagami/src/genesis/generate.rs similarity index 100% rename from iroha_kagami/src/genesis/generate.rs rename to crates/iroha_kagami/src/genesis/generate.rs diff --git a/iroha_kagami/src/genesis/sign.rs b/crates/iroha_kagami/src/genesis/sign.rs similarity index 100% rename from iroha_kagami/src/genesis/sign.rs rename to crates/iroha_kagami/src/genesis/sign.rs diff --git a/iroha_kagami/src/main.rs b/crates/iroha_kagami/src/main.rs similarity index 100% rename from iroha_kagami/src/main.rs rename to crates/iroha_kagami/src/main.rs diff --git a/iroha_kagami/src/schema.rs b/crates/iroha_kagami/src/schema.rs similarity index 100% rename from iroha_kagami/src/schema.rs rename to crates/iroha_kagami/src/schema.rs diff --git a/iroha_logger/Cargo.toml b/crates/iroha_logger/Cargo.toml similarity index 100% rename from iroha_logger/Cargo.toml rename to crates/iroha_logger/Cargo.toml diff --git a/iroha_logger/src/actor.rs b/crates/iroha_logger/src/actor.rs similarity index 100% rename from iroha_logger/src/actor.rs rename to crates/iroha_logger/src/actor.rs diff --git a/iroha_logger/src/layer.rs b/crates/iroha_logger/src/layer.rs similarity index 100% rename from iroha_logger/src/layer.rs rename to crates/iroha_logger/src/layer.rs diff --git a/iroha_logger/src/lib.rs b/crates/iroha_logger/src/lib.rs similarity index 100% rename from iroha_logger/src/lib.rs rename to crates/iroha_logger/src/lib.rs diff --git a/iroha_logger/src/telemetry.rs b/crates/iroha_logger/src/telemetry.rs similarity index 100% rename from iroha_logger/src/telemetry.rs rename to crates/iroha_logger/src/telemetry.rs diff --git a/iroha_logger/tests/configuration.rs b/crates/iroha_logger/tests/configuration.rs similarity index 100% rename from iroha_logger/tests/configuration.rs rename to crates/iroha_logger/tests/configuration.rs diff --git a/iroha_logger/tests/log_level.rs b/crates/iroha_logger/tests/log_level.rs similarity index 100% rename from iroha_logger/tests/log_level.rs rename to crates/iroha_logger/tests/log_level.rs diff --git a/iroha_logger/tests/setting_logger.rs b/crates/iroha_logger/tests/setting_logger.rs similarity index 100% rename from iroha_logger/tests/setting_logger.rs rename to crates/iroha_logger/tests/setting_logger.rs diff --git a/iroha_logger/tests/telemetry.rs b/crates/iroha_logger/tests/telemetry.rs similarity index 100% rename from iroha_logger/tests/telemetry.rs rename to crates/iroha_logger/tests/telemetry.rs diff --git a/iroha_macro/Cargo.toml b/crates/iroha_macro/Cargo.toml similarity index 100% rename from iroha_macro/Cargo.toml rename to crates/iroha_macro/Cargo.toml diff --git a/iroha_macro/README.md b/crates/iroha_macro/README.md similarity index 100% rename from iroha_macro/README.md rename to crates/iroha_macro/README.md diff --git a/iroha_macro/src/lib.rs b/crates/iroha_macro/src/lib.rs similarity index 100% rename from iroha_macro/src/lib.rs rename to crates/iroha_macro/src/lib.rs diff --git a/iroha_macro_utils/Cargo.toml b/crates/iroha_macro_utils/Cargo.toml similarity index 100% rename from iroha_macro_utils/Cargo.toml rename to crates/iroha_macro_utils/Cargo.toml diff --git a/iroha_macro_utils/src/emitter.rs b/crates/iroha_macro_utils/src/emitter.rs similarity index 100% rename from iroha_macro_utils/src/emitter.rs rename to crates/iroha_macro_utils/src/emitter.rs diff --git a/iroha_macro_utils/src/lib.rs b/crates/iroha_macro_utils/src/lib.rs similarity index 100% rename from iroha_macro_utils/src/lib.rs rename to crates/iroha_macro_utils/src/lib.rs diff --git a/iroha_numeric/Cargo.toml b/crates/iroha_numeric/Cargo.toml similarity index 100% rename from iroha_numeric/Cargo.toml rename to crates/iroha_numeric/Cargo.toml diff --git a/iroha_numeric/src/lib.rs b/crates/iroha_numeric/src/lib.rs similarity index 100% rename from iroha_numeric/src/lib.rs rename to crates/iroha_numeric/src/lib.rs diff --git a/iroha_p2p/Cargo.toml b/crates/iroha_p2p/Cargo.toml similarity index 100% rename from iroha_p2p/Cargo.toml rename to crates/iroha_p2p/Cargo.toml diff --git a/iroha_p2p/src/lib.rs b/crates/iroha_p2p/src/lib.rs similarity index 100% rename from iroha_p2p/src/lib.rs rename to crates/iroha_p2p/src/lib.rs diff --git a/iroha_p2p/src/network.rs b/crates/iroha_p2p/src/network.rs similarity index 100% rename from iroha_p2p/src/network.rs rename to crates/iroha_p2p/src/network.rs diff --git a/iroha_p2p/src/peer.rs b/crates/iroha_p2p/src/peer.rs similarity index 100% rename from iroha_p2p/src/peer.rs rename to crates/iroha_p2p/src/peer.rs diff --git a/iroha_p2p/tests/integration/mod.rs b/crates/iroha_p2p/tests/integration/mod.rs similarity index 100% rename from iroha_p2p/tests/integration/mod.rs rename to crates/iroha_p2p/tests/integration/mod.rs diff --git a/iroha_p2p/tests/integration/p2p.rs b/crates/iroha_p2p/tests/integration/p2p.rs similarity index 100% rename from iroha_p2p/tests/integration/p2p.rs rename to crates/iroha_p2p/tests/integration/p2p.rs diff --git a/iroha_p2p/tests/mod.rs b/crates/iroha_p2p/tests/mod.rs similarity index 100% rename from iroha_p2p/tests/mod.rs rename to crates/iroha_p2p/tests/mod.rs diff --git a/iroha_primitives/Cargo.toml b/crates/iroha_primitives/Cargo.toml similarity index 100% rename from iroha_primitives/Cargo.toml rename to crates/iroha_primitives/Cargo.toml diff --git a/iroha_primitives/src/addr.rs b/crates/iroha_primitives/src/addr.rs similarity index 100% rename from iroha_primitives/src/addr.rs rename to crates/iroha_primitives/src/addr.rs diff --git a/iroha_primitives/src/cmpext.rs b/crates/iroha_primitives/src/cmpext.rs similarity index 100% rename from iroha_primitives/src/cmpext.rs rename to crates/iroha_primitives/src/cmpext.rs diff --git a/iroha_primitives/src/const_vec.rs b/crates/iroha_primitives/src/const_vec.rs similarity index 100% rename from iroha_primitives/src/const_vec.rs rename to crates/iroha_primitives/src/const_vec.rs diff --git a/iroha_primitives/src/conststr.rs b/crates/iroha_primitives/src/conststr.rs similarity index 100% rename from iroha_primitives/src/conststr.rs rename to crates/iroha_primitives/src/conststr.rs diff --git a/iroha_primitives/src/json.rs b/crates/iroha_primitives/src/json.rs similarity index 100% rename from iroha_primitives/src/json.rs rename to crates/iroha_primitives/src/json.rs diff --git a/iroha_primitives/src/lib.rs b/crates/iroha_primitives/src/lib.rs similarity index 100% rename from iroha_primitives/src/lib.rs rename to crates/iroha_primitives/src/lib.rs diff --git a/iroha_primitives/src/must_use.rs b/crates/iroha_primitives/src/must_use.rs similarity index 100% rename from iroha_primitives/src/must_use.rs rename to crates/iroha_primitives/src/must_use.rs diff --git a/iroha_primitives/src/numeric.rs b/crates/iroha_primitives/src/numeric.rs similarity index 100% rename from iroha_primitives/src/numeric.rs rename to crates/iroha_primitives/src/numeric.rs diff --git a/iroha_primitives/src/riffle_iter.rs b/crates/iroha_primitives/src/riffle_iter.rs similarity index 100% rename from iroha_primitives/src/riffle_iter.rs rename to crates/iroha_primitives/src/riffle_iter.rs diff --git a/iroha_primitives/src/small.rs b/crates/iroha_primitives/src/small.rs similarity index 100% rename from iroha_primitives/src/small.rs rename to crates/iroha_primitives/src/small.rs diff --git a/iroha_primitives/src/time.rs b/crates/iroha_primitives/src/time.rs similarity index 100% rename from iroha_primitives/src/time.rs rename to crates/iroha_primitives/src/time.rs diff --git a/iroha_primitives/src/unique_vec.rs b/crates/iroha_primitives/src/unique_vec.rs similarity index 100% rename from iroha_primitives/src/unique_vec.rs rename to crates/iroha_primitives/src/unique_vec.rs diff --git a/iroha_primitives/tests/ui.rs b/crates/iroha_primitives/tests/ui.rs similarity index 100% rename from iroha_primitives/tests/ui.rs rename to crates/iroha_primitives/tests/ui.rs diff --git a/iroha_primitives/tests/ui_fail/must_use_not_used.rs b/crates/iroha_primitives/tests/ui_fail/must_use_not_used.rs similarity index 100% rename from iroha_primitives/tests/ui_fail/must_use_not_used.rs rename to crates/iroha_primitives/tests/ui_fail/must_use_not_used.rs diff --git a/iroha_primitives/tests/ui_fail/must_use_not_used.stderr b/crates/iroha_primitives/tests/ui_fail/must_use_not_used.stderr similarity index 100% rename from iroha_primitives/tests/ui_fail/must_use_not_used.stderr rename to crates/iroha_primitives/tests/ui_fail/must_use_not_used.stderr diff --git a/iroha_primitives_derive/Cargo.toml b/crates/iroha_primitives_derive/Cargo.toml similarity index 100% rename from iroha_primitives_derive/Cargo.toml rename to crates/iroha_primitives_derive/Cargo.toml diff --git a/iroha_primitives_derive/src/lib.rs b/crates/iroha_primitives_derive/src/lib.rs similarity index 100% rename from iroha_primitives_derive/src/lib.rs rename to crates/iroha_primitives_derive/src/lib.rs diff --git a/iroha_primitives_derive/src/numeric.rs b/crates/iroha_primitives_derive/src/numeric.rs similarity index 100% rename from iroha_primitives_derive/src/numeric.rs rename to crates/iroha_primitives_derive/src/numeric.rs diff --git a/iroha_primitives_derive/src/socket_addr.rs b/crates/iroha_primitives_derive/src/socket_addr.rs similarity index 100% rename from iroha_primitives_derive/src/socket_addr.rs rename to crates/iroha_primitives_derive/src/socket_addr.rs diff --git a/iroha_schema/Cargo.toml b/crates/iroha_schema/Cargo.toml similarity index 100% rename from iroha_schema/Cargo.toml rename to crates/iroha_schema/Cargo.toml diff --git a/iroha_schema/src/lib.rs b/crates/iroha_schema/src/lib.rs similarity index 100% rename from iroha_schema/src/lib.rs rename to crates/iroha_schema/src/lib.rs diff --git a/iroha_schema/src/serialize.rs b/crates/iroha_schema/src/serialize.rs similarity index 100% rename from iroha_schema/src/serialize.rs rename to crates/iroha_schema/src/serialize.rs diff --git a/iroha_schema/tests/architecture-dependent.rs b/crates/iroha_schema/tests/architecture-dependent.rs similarity index 100% rename from iroha_schema/tests/architecture-dependent.rs rename to crates/iroha_schema/tests/architecture-dependent.rs diff --git a/iroha_schema/tests/enum_with_default_discriminants.rs b/crates/iroha_schema/tests/enum_with_default_discriminants.rs similarity index 100% rename from iroha_schema/tests/enum_with_default_discriminants.rs rename to crates/iroha_schema/tests/enum_with_default_discriminants.rs diff --git a/iroha_schema/tests/enum_with_various_discriminants.rs b/crates/iroha_schema/tests/enum_with_various_discriminants.rs similarity index 100% rename from iroha_schema/tests/enum_with_various_discriminants.rs rename to crates/iroha_schema/tests/enum_with_various_discriminants.rs diff --git a/iroha_schema/tests/fieldless_enum.rs b/crates/iroha_schema/tests/fieldless_enum.rs similarity index 100% rename from iroha_schema/tests/fieldless_enum.rs rename to crates/iroha_schema/tests/fieldless_enum.rs diff --git a/iroha_schema/tests/numbers_compact_and_fixed.rs b/crates/iroha_schema/tests/numbers_compact_and_fixed.rs similarity index 100% rename from iroha_schema/tests/numbers_compact_and_fixed.rs rename to crates/iroha_schema/tests/numbers_compact_and_fixed.rs diff --git a/iroha_schema/tests/schema_json.rs b/crates/iroha_schema/tests/schema_json.rs similarity index 100% rename from iroha_schema/tests/schema_json.rs rename to crates/iroha_schema/tests/schema_json.rs diff --git a/iroha_schema/tests/struct_with_generic_bounds.rs b/crates/iroha_schema/tests/struct_with_generic_bounds.rs similarity index 100% rename from iroha_schema/tests/struct_with_generic_bounds.rs rename to crates/iroha_schema/tests/struct_with_generic_bounds.rs diff --git a/iroha_schema/tests/struct_with_named_fields.rs b/crates/iroha_schema/tests/struct_with_named_fields.rs similarity index 100% rename from iroha_schema/tests/struct_with_named_fields.rs rename to crates/iroha_schema/tests/struct_with_named_fields.rs diff --git a/iroha_schema/tests/struct_with_unnamed_fields.rs b/crates/iroha_schema/tests/struct_with_unnamed_fields.rs similarity index 100% rename from iroha_schema/tests/struct_with_unnamed_fields.rs rename to crates/iroha_schema/tests/struct_with_unnamed_fields.rs diff --git a/iroha_schema/tests/transparent_types.rs b/crates/iroha_schema/tests/transparent_types.rs similarity index 100% rename from iroha_schema/tests/transparent_types.rs rename to crates/iroha_schema/tests/transparent_types.rs diff --git a/iroha_schema_derive/Cargo.toml b/crates/iroha_schema_derive/Cargo.toml similarity index 100% rename from iroha_schema_derive/Cargo.toml rename to crates/iroha_schema_derive/Cargo.toml diff --git a/iroha_schema_derive/src/lib.rs b/crates/iroha_schema_derive/src/lib.rs similarity index 100% rename from iroha_schema_derive/src/lib.rs rename to crates/iroha_schema_derive/src/lib.rs diff --git a/iroha_schema_derive/tests/ui.rs b/crates/iroha_schema_derive/tests/ui.rs similarity index 100% rename from iroha_schema_derive/tests/ui.rs rename to crates/iroha_schema_derive/tests/ui.rs diff --git a/iroha_schema_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs b/crates/iroha_schema_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs similarity index 100% rename from iroha_schema_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs rename to crates/iroha_schema_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.rs diff --git a/iroha_schema_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr b/crates/iroha_schema_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr similarity index 100% rename from iroha_schema_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr rename to crates/iroha_schema_derive/tests/ui_fail/fieldless_enum_with_explicit_discriminant.stderr diff --git a/iroha_schema_derive/tests/ui_pass/derive_into_schema.rs b/crates/iroha_schema_derive/tests/ui_pass/derive_into_schema.rs similarity index 100% rename from iroha_schema_derive/tests/ui_pass/derive_into_schema.rs rename to crates/iroha_schema_derive/tests/ui_pass/derive_into_schema.rs diff --git a/iroha_schema_gen/Cargo.toml b/crates/iroha_schema_gen/Cargo.toml similarity index 100% rename from iroha_schema_gen/Cargo.toml rename to crates/iroha_schema_gen/Cargo.toml diff --git a/iroha_schema_gen/src/lib.rs b/crates/iroha_schema_gen/src/lib.rs similarity index 100% rename from iroha_schema_gen/src/lib.rs rename to crates/iroha_schema_gen/src/lib.rs diff --git a/iroha_smart_contract/.cargo/config.toml b/crates/iroha_smart_contract/.cargo/config.toml similarity index 100% rename from iroha_smart_contract/.cargo/config.toml rename to crates/iroha_smart_contract/.cargo/config.toml diff --git a/iroha_smart_contract/Cargo.toml b/crates/iroha_smart_contract/Cargo.toml similarity index 100% rename from iroha_smart_contract/Cargo.toml rename to crates/iroha_smart_contract/Cargo.toml diff --git a/iroha_smart_contract/LICENSE b/crates/iroha_smart_contract/LICENSE similarity index 100% rename from iroha_smart_contract/LICENSE rename to crates/iroha_smart_contract/LICENSE diff --git a/iroha_smart_contract/README.md b/crates/iroha_smart_contract/README.md similarity index 100% rename from iroha_smart_contract/README.md rename to crates/iroha_smart_contract/README.md diff --git a/iroha_smart_contract/src/lib.rs b/crates/iroha_smart_contract/src/lib.rs similarity index 100% rename from iroha_smart_contract/src/lib.rs rename to crates/iroha_smart_contract/src/lib.rs diff --git a/iroha_smart_contract_derive/Cargo.toml b/crates/iroha_smart_contract_derive/Cargo.toml similarity index 100% rename from iroha_smart_contract_derive/Cargo.toml rename to crates/iroha_smart_contract_derive/Cargo.toml diff --git a/iroha_smart_contract_derive/src/entrypoint.rs b/crates/iroha_smart_contract_derive/src/entrypoint.rs similarity index 100% rename from iroha_smart_contract_derive/src/entrypoint.rs rename to crates/iroha_smart_contract_derive/src/entrypoint.rs diff --git a/iroha_smart_contract_derive/src/lib.rs b/crates/iroha_smart_contract_derive/src/lib.rs similarity index 100% rename from iroha_smart_contract_derive/src/lib.rs rename to crates/iroha_smart_contract_derive/src/lib.rs diff --git a/iroha_smart_contract_utils/Cargo.toml b/crates/iroha_smart_contract_utils/Cargo.toml similarity index 100% rename from iroha_smart_contract_utils/Cargo.toml rename to crates/iroha_smart_contract_utils/Cargo.toml diff --git a/iroha_smart_contract_utils/src/debug.rs b/crates/iroha_smart_contract_utils/src/debug.rs similarity index 100% rename from iroha_smart_contract_utils/src/debug.rs rename to crates/iroha_smart_contract_utils/src/debug.rs diff --git a/iroha_smart_contract_utils/src/lib.rs b/crates/iroha_smart_contract_utils/src/lib.rs similarity index 100% rename from iroha_smart_contract_utils/src/lib.rs rename to crates/iroha_smart_contract_utils/src/lib.rs diff --git a/iroha_smart_contract_utils/src/log.rs b/crates/iroha_smart_contract_utils/src/log.rs similarity index 100% rename from iroha_smart_contract_utils/src/log.rs rename to crates/iroha_smart_contract_utils/src/log.rs diff --git a/iroha_swarm/Cargo.toml b/crates/iroha_swarm/Cargo.toml similarity index 100% rename from iroha_swarm/Cargo.toml rename to crates/iroha_swarm/Cargo.toml diff --git a/iroha_swarm/README.md b/crates/iroha_swarm/README.md similarity index 100% rename from iroha_swarm/README.md rename to crates/iroha_swarm/README.md diff --git a/iroha_swarm/src/lib.rs b/crates/iroha_swarm/src/lib.rs similarity index 100% rename from iroha_swarm/src/lib.rs rename to crates/iroha_swarm/src/lib.rs diff --git a/iroha_swarm/src/main.rs b/crates/iroha_swarm/src/main.rs similarity index 100% rename from iroha_swarm/src/main.rs rename to crates/iroha_swarm/src/main.rs diff --git a/iroha_swarm/src/path.rs b/crates/iroha_swarm/src/path.rs similarity index 100% rename from iroha_swarm/src/path.rs rename to crates/iroha_swarm/src/path.rs diff --git a/iroha_swarm/src/peer.rs b/crates/iroha_swarm/src/peer.rs similarity index 100% rename from iroha_swarm/src/peer.rs rename to crates/iroha_swarm/src/peer.rs diff --git a/iroha_swarm/src/schema.rs b/crates/iroha_swarm/src/schema.rs similarity index 100% rename from iroha_swarm/src/schema.rs rename to crates/iroha_swarm/src/schema.rs diff --git a/iroha_swarm/src/schema/serde_impls.rs b/crates/iroha_swarm/src/schema/serde_impls.rs similarity index 100% rename from iroha_swarm/src/schema/serde_impls.rs rename to crates/iroha_swarm/src/schema/serde_impls.rs diff --git a/iroha_telemetry/Cargo.toml b/crates/iroha_telemetry/Cargo.toml similarity index 100% rename from iroha_telemetry/Cargo.toml rename to crates/iroha_telemetry/Cargo.toml diff --git a/iroha_telemetry/build.rs b/crates/iroha_telemetry/build.rs similarity index 100% rename from iroha_telemetry/build.rs rename to crates/iroha_telemetry/build.rs diff --git a/iroha_telemetry/src/dev.rs b/crates/iroha_telemetry/src/dev.rs similarity index 100% rename from iroha_telemetry/src/dev.rs rename to crates/iroha_telemetry/src/dev.rs diff --git a/iroha_telemetry/src/futures.rs b/crates/iroha_telemetry/src/futures.rs similarity index 100% rename from iroha_telemetry/src/futures.rs rename to crates/iroha_telemetry/src/futures.rs diff --git a/iroha_telemetry/src/lib.rs b/crates/iroha_telemetry/src/lib.rs similarity index 100% rename from iroha_telemetry/src/lib.rs rename to crates/iroha_telemetry/src/lib.rs diff --git a/iroha_telemetry/src/metrics.rs b/crates/iroha_telemetry/src/metrics.rs similarity index 100% rename from iroha_telemetry/src/metrics.rs rename to crates/iroha_telemetry/src/metrics.rs diff --git a/iroha_telemetry/src/retry_period.rs b/crates/iroha_telemetry/src/retry_period.rs similarity index 100% rename from iroha_telemetry/src/retry_period.rs rename to crates/iroha_telemetry/src/retry_period.rs diff --git a/iroha_telemetry/src/ws.rs b/crates/iroha_telemetry/src/ws.rs similarity index 100% rename from iroha_telemetry/src/ws.rs rename to crates/iroha_telemetry/src/ws.rs diff --git a/iroha_telemetry_derive/Cargo.toml b/crates/iroha_telemetry_derive/Cargo.toml similarity index 100% rename from iroha_telemetry_derive/Cargo.toml rename to crates/iroha_telemetry_derive/Cargo.toml diff --git a/iroha_telemetry_derive/src/lib.rs b/crates/iroha_telemetry_derive/src/lib.rs similarity index 100% rename from iroha_telemetry_derive/src/lib.rs rename to crates/iroha_telemetry_derive/src/lib.rs diff --git a/iroha_telemetry_derive/tests/ui.rs b/crates/iroha_telemetry_derive/tests/ui.rs similarity index 100% rename from iroha_telemetry_derive/tests/ui.rs rename to crates/iroha_telemetry_derive/tests/ui.rs diff --git a/iroha_telemetry_derive/tests/ui_fail/args_no_wsv.rs b/crates/iroha_telemetry_derive/tests/ui_fail/args_no_wsv.rs similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/args_no_wsv.rs rename to crates/iroha_telemetry_derive/tests/ui_fail/args_no_wsv.rs diff --git a/iroha_telemetry_derive/tests/ui_fail/args_no_wsv.stderr b/crates/iroha_telemetry_derive/tests/ui_fail/args_no_wsv.stderr similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/args_no_wsv.stderr rename to crates/iroha_telemetry_derive/tests/ui_fail/args_no_wsv.stderr diff --git a/iroha_telemetry_derive/tests/ui_fail/bare_spec.rs b/crates/iroha_telemetry_derive/tests/ui_fail/bare_spec.rs similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/bare_spec.rs rename to crates/iroha_telemetry_derive/tests/ui_fail/bare_spec.rs diff --git a/iroha_telemetry_derive/tests/ui_fail/bare_spec.stderr b/crates/iroha_telemetry_derive/tests/ui_fail/bare_spec.stderr similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/bare_spec.stderr rename to crates/iroha_telemetry_derive/tests/ui_fail/bare_spec.stderr diff --git a/iroha_telemetry_derive/tests/ui_fail/doubled_plus.rs b/crates/iroha_telemetry_derive/tests/ui_fail/doubled_plus.rs similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/doubled_plus.rs rename to crates/iroha_telemetry_derive/tests/ui_fail/doubled_plus.rs diff --git a/iroha_telemetry_derive/tests/ui_fail/doubled_plus.stderr b/crates/iroha_telemetry_derive/tests/ui_fail/doubled_plus.stderr similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/doubled_plus.stderr rename to crates/iroha_telemetry_derive/tests/ui_fail/doubled_plus.stderr diff --git a/iroha_telemetry_derive/tests/ui_fail/no_args.rs b/crates/iroha_telemetry_derive/tests/ui_fail/no_args.rs similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/no_args.rs rename to crates/iroha_telemetry_derive/tests/ui_fail/no_args.rs diff --git a/iroha_telemetry_derive/tests/ui_fail/no_args.stderr b/crates/iroha_telemetry_derive/tests/ui_fail/no_args.stderr similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/no_args.stderr rename to crates/iroha_telemetry_derive/tests/ui_fail/no_args.stderr diff --git a/iroha_telemetry_derive/tests/ui_fail/non_snake_case_name.rs b/crates/iroha_telemetry_derive/tests/ui_fail/non_snake_case_name.rs similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/non_snake_case_name.rs rename to crates/iroha_telemetry_derive/tests/ui_fail/non_snake_case_name.rs diff --git a/iroha_telemetry_derive/tests/ui_fail/non_snake_case_name.stderr b/crates/iroha_telemetry_derive/tests/ui_fail/non_snake_case_name.stderr similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/non_snake_case_name.stderr rename to crates/iroha_telemetry_derive/tests/ui_fail/non_snake_case_name.stderr diff --git a/iroha_telemetry_derive/tests/ui_fail/not_execute.rs b/crates/iroha_telemetry_derive/tests/ui_fail/not_execute.rs similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/not_execute.rs rename to crates/iroha_telemetry_derive/tests/ui_fail/not_execute.rs diff --git a/iroha_telemetry_derive/tests/ui_fail/not_execute.stderr b/crates/iroha_telemetry_derive/tests/ui_fail/not_execute.stderr similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/not_execute.stderr rename to crates/iroha_telemetry_derive/tests/ui_fail/not_execute.stderr diff --git a/iroha_telemetry_derive/tests/ui_fail/not_return_result.rs b/crates/iroha_telemetry_derive/tests/ui_fail/not_return_result.rs similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/not_return_result.rs rename to crates/iroha_telemetry_derive/tests/ui_fail/not_return_result.rs diff --git a/iroha_telemetry_derive/tests/ui_fail/not_return_result.stderr b/crates/iroha_telemetry_derive/tests/ui_fail/not_return_result.stderr similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/not_return_result.stderr rename to crates/iroha_telemetry_derive/tests/ui_fail/not_return_result.stderr diff --git a/iroha_telemetry_derive/tests/ui_fail/return_nothing.rs b/crates/iroha_telemetry_derive/tests/ui_fail/return_nothing.rs similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/return_nothing.rs rename to crates/iroha_telemetry_derive/tests/ui_fail/return_nothing.rs diff --git a/iroha_telemetry_derive/tests/ui_fail/return_nothing.stderr b/crates/iroha_telemetry_derive/tests/ui_fail/return_nothing.stderr similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/return_nothing.stderr rename to crates/iroha_telemetry_derive/tests/ui_fail/return_nothing.stderr diff --git a/iroha_telemetry_derive/tests/ui_fail/trailing_plus.rs b/crates/iroha_telemetry_derive/tests/ui_fail/trailing_plus.rs similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/trailing_plus.rs rename to crates/iroha_telemetry_derive/tests/ui_fail/trailing_plus.rs diff --git a/iroha_telemetry_derive/tests/ui_fail/trailing_plus.stderr b/crates/iroha_telemetry_derive/tests/ui_fail/trailing_plus.stderr similarity index 100% rename from iroha_telemetry_derive/tests/ui_fail/trailing_plus.stderr rename to crates/iroha_telemetry_derive/tests/ui_fail/trailing_plus.stderr diff --git a/iroha_test_network/Cargo.toml b/crates/iroha_test_network/Cargo.toml similarity index 100% rename from iroha_test_network/Cargo.toml rename to crates/iroha_test_network/Cargo.toml diff --git a/iroha_test_network/src/lib.rs b/crates/iroha_test_network/src/lib.rs similarity index 100% rename from iroha_test_network/src/lib.rs rename to crates/iroha_test_network/src/lib.rs diff --git a/iroha_test_samples/Cargo.toml b/crates/iroha_test_samples/Cargo.toml similarity index 100% rename from iroha_test_samples/Cargo.toml rename to crates/iroha_test_samples/Cargo.toml diff --git a/iroha_test_samples/src/lib.rs b/crates/iroha_test_samples/src/lib.rs similarity index 100% rename from iroha_test_samples/src/lib.rs rename to crates/iroha_test_samples/src/lib.rs diff --git a/iroha_torii/Cargo.toml b/crates/iroha_torii/Cargo.toml similarity index 100% rename from iroha_torii/Cargo.toml rename to crates/iroha_torii/Cargo.toml diff --git a/crates/iroha_torii/__init__.py b/crates/iroha_torii/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_torii/pytests/README.md b/crates/iroha_torii/pytests/README.md similarity index 100% rename from iroha_torii/pytests/README.md rename to crates/iroha_torii/pytests/README.md diff --git a/crates/iroha_torii/pytests/__init__.py b/crates/iroha_torii/pytests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/crates/iroha_torii/pytests/common/__init__.py b/crates/iroha_torii/pytests/common/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_torii/pytests/common/schemas/get_configuration_response_schema.json b/crates/iroha_torii/pytests/common/schemas/get_configuration_response_schema.json similarity index 100% rename from iroha_torii/pytests/common/schemas/get_configuration_response_schema.json rename to crates/iroha_torii/pytests/common/schemas/get_configuration_response_schema.json diff --git a/iroha_torii/pytests/common/schemas/get_schema_response.json b/crates/iroha_torii/pytests/common/schemas/get_schema_response.json similarity index 100% rename from iroha_torii/pytests/common/schemas/get_schema_response.json rename to crates/iroha_torii/pytests/common/schemas/get_schema_response.json diff --git a/iroha_torii/pytests/common/schemas/get_status_response.json b/crates/iroha_torii/pytests/common/schemas/get_status_response.json similarity index 100% rename from iroha_torii/pytests/common/schemas/get_status_response.json rename to crates/iroha_torii/pytests/common/schemas/get_status_response.json diff --git a/iroha_torii/pytests/common/settings.py b/crates/iroha_torii/pytests/common/settings.py similarity index 100% rename from iroha_torii/pytests/common/settings.py rename to crates/iroha_torii/pytests/common/settings.py diff --git a/iroha_torii/pytests/poetry.lock b/crates/iroha_torii/pytests/poetry.lock similarity index 100% rename from iroha_torii/pytests/poetry.lock rename to crates/iroha_torii/pytests/poetry.lock diff --git a/iroha_torii/pytests/pyproject.toml b/crates/iroha_torii/pytests/pyproject.toml similarity index 100% rename from iroha_torii/pytests/pyproject.toml rename to crates/iroha_torii/pytests/pyproject.toml diff --git a/iroha_torii/pytests/test/__init__.py b/crates/iroha_torii/pytests/test/__init__.py similarity index 100% rename from iroha_torii/pytests/test/__init__.py rename to crates/iroha_torii/pytests/test/__init__.py diff --git a/crates/iroha_torii/pytests/test/api_version/__init__.py b/crates/iroha_torii/pytests/test/api_version/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_torii/pytests/test/api_version/conftest.py b/crates/iroha_torii/pytests/test/api_version/conftest.py similarity index 100% rename from iroha_torii/pytests/test/api_version/conftest.py rename to crates/iroha_torii/pytests/test/api_version/conftest.py diff --git a/iroha_torii/pytests/test/api_version/test_api_version.py b/crates/iroha_torii/pytests/test/api_version/test_api_version.py similarity index 100% rename from iroha_torii/pytests/test/api_version/test_api_version.py rename to crates/iroha_torii/pytests/test/api_version/test_api_version.py diff --git a/crates/iroha_torii/pytests/test/configuration/__init__.py b/crates/iroha_torii/pytests/test/configuration/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_torii/pytests/test/configuration/conftest.py b/crates/iroha_torii/pytests/test/configuration/conftest.py similarity index 100% rename from iroha_torii/pytests/test/configuration/conftest.py rename to crates/iroha_torii/pytests/test/configuration/conftest.py diff --git a/iroha_torii/pytests/test/configuration/test_get_configuration.py b/crates/iroha_torii/pytests/test/configuration/test_get_configuration.py similarity index 100% rename from iroha_torii/pytests/test/configuration/test_get_configuration.py rename to crates/iroha_torii/pytests/test/configuration/test_get_configuration.py diff --git a/iroha_torii/pytests/test/configuration/test_post_configuration.py b/crates/iroha_torii/pytests/test/configuration/test_post_configuration.py similarity index 100% rename from iroha_torii/pytests/test/configuration/test_post_configuration.py rename to crates/iroha_torii/pytests/test/configuration/test_post_configuration.py diff --git a/iroha_torii/pytests/test/conftest.py b/crates/iroha_torii/pytests/test/conftest.py similarity index 100% rename from iroha_torii/pytests/test/conftest.py rename to crates/iroha_torii/pytests/test/conftest.py diff --git a/crates/iroha_torii/pytests/test/general/__init__.py b/crates/iroha_torii/pytests/test/general/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_torii/pytests/test/general/conftest.py b/crates/iroha_torii/pytests/test/general/conftest.py similarity index 100% rename from iroha_torii/pytests/test/general/conftest.py rename to crates/iroha_torii/pytests/test/general/conftest.py diff --git a/iroha_torii/pytests/test/general/test_200_status_codes.py b/crates/iroha_torii/pytests/test/general/test_200_status_codes.py similarity index 100% rename from iroha_torii/pytests/test/general/test_200_status_codes.py rename to crates/iroha_torii/pytests/test/general/test_200_status_codes.py diff --git a/iroha_torii/pytests/test/general/test_400_status_codes.py b/crates/iroha_torii/pytests/test/general/test_400_status_codes.py similarity index 100% rename from iroha_torii/pytests/test/general/test_400_status_codes.py rename to crates/iroha_torii/pytests/test/general/test_400_status_codes.py diff --git a/crates/iroha_torii/pytests/test/health/__init__.py b/crates/iroha_torii/pytests/test/health/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_torii/pytests/test/health/conftest.py b/crates/iroha_torii/pytests/test/health/conftest.py similarity index 100% rename from iroha_torii/pytests/test/health/conftest.py rename to crates/iroha_torii/pytests/test/health/conftest.py diff --git a/iroha_torii/pytests/test/health/test_health.py b/crates/iroha_torii/pytests/test/health/test_health.py similarity index 100% rename from iroha_torii/pytests/test/health/test_health.py rename to crates/iroha_torii/pytests/test/health/test_health.py diff --git a/crates/iroha_torii/pytests/test/schema/__init__.py b/crates/iroha_torii/pytests/test/schema/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_torii/pytests/test/schema/conftest.py b/crates/iroha_torii/pytests/test/schema/conftest.py similarity index 100% rename from iroha_torii/pytests/test/schema/conftest.py rename to crates/iroha_torii/pytests/test/schema/conftest.py diff --git a/iroha_torii/pytests/test/schema/test_schema.py b/crates/iroha_torii/pytests/test/schema/test_schema.py similarity index 100% rename from iroha_torii/pytests/test/schema/test_schema.py rename to crates/iroha_torii/pytests/test/schema/test_schema.py diff --git a/crates/iroha_torii/pytests/test/status/__init__.py b/crates/iroha_torii/pytests/test/status/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/iroha_torii/pytests/test/status/conftest.py b/crates/iroha_torii/pytests/test/status/conftest.py similarity index 100% rename from iroha_torii/pytests/test/status/conftest.py rename to crates/iroha_torii/pytests/test/status/conftest.py diff --git a/iroha_torii/pytests/test/status/test_status.py b/crates/iroha_torii/pytests/test/status/test_status.py similarity index 100% rename from iroha_torii/pytests/test/status/test_status.py rename to crates/iroha_torii/pytests/test/status/test_status.py diff --git a/iroha_torii/src/event.rs b/crates/iroha_torii/src/event.rs similarity index 100% rename from iroha_torii/src/event.rs rename to crates/iroha_torii/src/event.rs diff --git a/iroha_torii/src/lib.rs b/crates/iroha_torii/src/lib.rs similarity index 100% rename from iroha_torii/src/lib.rs rename to crates/iroha_torii/src/lib.rs diff --git a/iroha_torii/src/routing.rs b/crates/iroha_torii/src/routing.rs similarity index 100% rename from iroha_torii/src/routing.rs rename to crates/iroha_torii/src/routing.rs diff --git a/iroha_torii/src/stream.rs b/crates/iroha_torii/src/stream.rs similarity index 100% rename from iroha_torii/src/stream.rs rename to crates/iroha_torii/src/stream.rs diff --git a/iroha_torii/src/utils.rs b/crates/iroha_torii/src/utils.rs similarity index 100% rename from iroha_torii/src/utils.rs rename to crates/iroha_torii/src/utils.rs diff --git a/iroha_torii_const/Cargo.toml b/crates/iroha_torii_const/Cargo.toml similarity index 100% rename from iroha_torii_const/Cargo.toml rename to crates/iroha_torii_const/Cargo.toml diff --git a/iroha_torii_const/src/lib.rs b/crates/iroha_torii_const/src/lib.rs similarity index 100% rename from iroha_torii_const/src/lib.rs rename to crates/iroha_torii_const/src/lib.rs diff --git a/iroha_trigger/Cargo.toml b/crates/iroha_trigger/Cargo.toml similarity index 100% rename from iroha_trigger/Cargo.toml rename to crates/iroha_trigger/Cargo.toml diff --git a/iroha_trigger/src/lib.rs b/crates/iroha_trigger/src/lib.rs similarity index 100% rename from iroha_trigger/src/lib.rs rename to crates/iroha_trigger/src/lib.rs diff --git a/iroha_trigger_derive/Cargo.toml b/crates/iroha_trigger_derive/Cargo.toml similarity index 100% rename from iroha_trigger_derive/Cargo.toml rename to crates/iroha_trigger_derive/Cargo.toml diff --git a/iroha_trigger_derive/src/entrypoint.rs b/crates/iroha_trigger_derive/src/entrypoint.rs similarity index 100% rename from iroha_trigger_derive/src/entrypoint.rs rename to crates/iroha_trigger_derive/src/entrypoint.rs diff --git a/iroha_trigger_derive/src/lib.rs b/crates/iroha_trigger_derive/src/lib.rs similarity index 100% rename from iroha_trigger_derive/src/lib.rs rename to crates/iroha_trigger_derive/src/lib.rs diff --git a/iroha_version/Cargo.toml b/crates/iroha_version/Cargo.toml similarity index 100% rename from iroha_version/Cargo.toml rename to crates/iroha_version/Cargo.toml diff --git a/iroha_version/src/lib.rs b/crates/iroha_version/src/lib.rs similarity index 100% rename from iroha_version/src/lib.rs rename to crates/iroha_version/src/lib.rs diff --git a/iroha_version_derive/Cargo.toml b/crates/iroha_version_derive/Cargo.toml similarity index 100% rename from iroha_version_derive/Cargo.toml rename to crates/iroha_version_derive/Cargo.toml diff --git a/iroha_version_derive/src/lib.rs b/crates/iroha_version_derive/src/lib.rs similarity index 100% rename from iroha_version_derive/src/lib.rs rename to crates/iroha_version_derive/src/lib.rs diff --git a/iroha_version_derive/tests/json.rs b/crates/iroha_version_derive/tests/json.rs similarity index 100% rename from iroha_version_derive/tests/json.rs rename to crates/iroha_version_derive/tests/json.rs diff --git a/iroha_version_derive/tests/scale.rs b/crates/iroha_version_derive/tests/scale.rs similarity index 100% rename from iroha_version_derive/tests/scale.rs rename to crates/iroha_version_derive/tests/scale.rs diff --git a/iroha_version_derive/tests/ui.rs b/crates/iroha_version_derive/tests/ui.rs similarity index 100% rename from iroha_version_derive/tests/ui.rs rename to crates/iroha_version_derive/tests/ui.rs diff --git a/iroha_version_derive/tests/ui_fail/field_missing_in_version_attribute.rs b/crates/iroha_version_derive/tests/ui_fail/field_missing_in_version_attribute.rs similarity index 100% rename from iroha_version_derive/tests/ui_fail/field_missing_in_version_attribute.rs rename to crates/iroha_version_derive/tests/ui_fail/field_missing_in_version_attribute.rs diff --git a/iroha_version_derive/tests/ui_fail/field_missing_in_version_attribute.stderr b/crates/iroha_version_derive/tests/ui_fail/field_missing_in_version_attribute.stderr similarity index 100% rename from iroha_version_derive/tests/ui_fail/field_missing_in_version_attribute.stderr rename to crates/iroha_version_derive/tests/ui_fail/field_missing_in_version_attribute.stderr diff --git a/iroha_version_derive/tests/ui_fail/field_typo_in_version_attribute.rs b/crates/iroha_version_derive/tests/ui_fail/field_typo_in_version_attribute.rs similarity index 100% rename from iroha_version_derive/tests/ui_fail/field_typo_in_version_attribute.rs rename to crates/iroha_version_derive/tests/ui_fail/field_typo_in_version_attribute.rs diff --git a/iroha_version_derive/tests/ui_fail/field_typo_in_version_attribute.stderr b/crates/iroha_version_derive/tests/ui_fail/field_typo_in_version_attribute.stderr similarity index 100% rename from iroha_version_derive/tests/ui_fail/field_typo_in_version_attribute.stderr rename to crates/iroha_version_derive/tests/ui_fail/field_typo_in_version_attribute.stderr diff --git a/iroha_version_derive/tests/ui_fail/invalid_range_equal.rs b/crates/iroha_version_derive/tests/ui_fail/invalid_range_equal.rs similarity index 100% rename from iroha_version_derive/tests/ui_fail/invalid_range_equal.rs rename to crates/iroha_version_derive/tests/ui_fail/invalid_range_equal.rs diff --git a/iroha_version_derive/tests/ui_fail/invalid_range_equal.stderr b/crates/iroha_version_derive/tests/ui_fail/invalid_range_equal.stderr similarity index 100% rename from iroha_version_derive/tests/ui_fail/invalid_range_equal.stderr rename to crates/iroha_version_derive/tests/ui_fail/invalid_range_equal.stderr diff --git a/iroha_version_derive/tests/ui_fail/invalid_range_less.rs b/crates/iroha_version_derive/tests/ui_fail/invalid_range_less.rs similarity index 100% rename from iroha_version_derive/tests/ui_fail/invalid_range_less.rs rename to crates/iroha_version_derive/tests/ui_fail/invalid_range_less.rs diff --git a/iroha_version_derive/tests/ui_fail/invalid_range_less.stderr b/crates/iroha_version_derive/tests/ui_fail/invalid_range_less.stderr similarity index 100% rename from iroha_version_derive/tests/ui_fail/invalid_range_less.stderr rename to crates/iroha_version_derive/tests/ui_fail/invalid_range_less.stderr diff --git a/iroha_version_derive/tests/ui_fail/unknown_field_in_version_attribute.rs b/crates/iroha_version_derive/tests/ui_fail/unknown_field_in_version_attribute.rs similarity index 100% rename from iroha_version_derive/tests/ui_fail/unknown_field_in_version_attribute.rs rename to crates/iroha_version_derive/tests/ui_fail/unknown_field_in_version_attribute.rs diff --git a/iroha_version_derive/tests/ui_fail/unknown_field_in_version_attribute.stderr b/crates/iroha_version_derive/tests/ui_fail/unknown_field_in_version_attribute.stderr similarity index 100% rename from iroha_version_derive/tests/ui_fail/unknown_field_in_version_attribute.stderr rename to crates/iroha_version_derive/tests/ui_fail/unknown_field_in_version_attribute.stderr diff --git a/iroha_version_derive/tests/ui_pass/declare_several_versioned.rs b/crates/iroha_version_derive/tests/ui_pass/declare_several_versioned.rs similarity index 100% rename from iroha_version_derive/tests/ui_pass/declare_several_versioned.rs rename to crates/iroha_version_derive/tests/ui_pass/declare_several_versioned.rs diff --git a/iroha_version_derive/tests/ui_pass/declare_versioned.rs b/crates/iroha_version_derive/tests/ui_pass/declare_versioned.rs similarity index 100% rename from iroha_version_derive/tests/ui_pass/declare_versioned.rs rename to crates/iroha_version_derive/tests/ui_pass/declare_versioned.rs diff --git a/iroha_version_derive/tests/ui_pass/declare_versioned_json.rs b/crates/iroha_version_derive/tests/ui_pass/declare_versioned_json.rs similarity index 100% rename from iroha_version_derive/tests/ui_pass/declare_versioned_json.rs rename to crates/iroha_version_derive/tests/ui_pass/declare_versioned_json.rs diff --git a/iroha_version_derive/tests/ui_pass/declare_versioned_scale.rs b/crates/iroha_version_derive/tests/ui_pass/declare_versioned_scale.rs similarity index 100% rename from iroha_version_derive/tests/ui_pass/declare_versioned_scale.rs rename to crates/iroha_version_derive/tests/ui_pass/declare_versioned_scale.rs diff --git a/iroha_wasm_builder/Cargo.toml b/crates/iroha_wasm_builder/Cargo.toml similarity index 100% rename from iroha_wasm_builder/Cargo.toml rename to crates/iroha_wasm_builder/Cargo.toml diff --git a/iroha_wasm_builder/README.md b/crates/iroha_wasm_builder/README.md similarity index 100% rename from iroha_wasm_builder/README.md rename to crates/iroha_wasm_builder/README.md diff --git a/iroha_wasm_builder/src/lib.rs b/crates/iroha_wasm_builder/src/lib.rs similarity index 100% rename from iroha_wasm_builder/src/lib.rs rename to crates/iroha_wasm_builder/src/lib.rs diff --git a/iroha_wasm_builder/src/main.rs b/crates/iroha_wasm_builder/src/main.rs similarity index 100% rename from iroha_wasm_builder/src/main.rs rename to crates/iroha_wasm_builder/src/main.rs diff --git a/iroha_wasm_codec/Cargo.toml b/crates/iroha_wasm_codec/Cargo.toml similarity index 100% rename from iroha_wasm_codec/Cargo.toml rename to crates/iroha_wasm_codec/Cargo.toml diff --git a/iroha_wasm_codec/src/lib.rs b/crates/iroha_wasm_codec/src/lib.rs similarity index 100% rename from iroha_wasm_codec/src/lib.rs rename to crates/iroha_wasm_codec/src/lib.rs diff --git a/iroha_wasm_codec_derive/Cargo.toml b/crates/iroha_wasm_codec_derive/Cargo.toml similarity index 100% rename from iroha_wasm_codec_derive/Cargo.toml rename to crates/iroha_wasm_codec_derive/Cargo.toml diff --git a/iroha_wasm_codec_derive/src/lib.rs b/crates/iroha_wasm_codec_derive/src/lib.rs similarity index 100% rename from iroha_wasm_codec_derive/src/lib.rs rename to crates/iroha_wasm_codec_derive/src/lib.rs diff --git a/iroha_wasm_test_runner/Cargo.toml b/crates/iroha_wasm_test_runner/Cargo.toml similarity index 100% rename from iroha_wasm_test_runner/Cargo.toml rename to crates/iroha_wasm_test_runner/Cargo.toml diff --git a/iroha_wasm_test_runner/src/main.rs b/crates/iroha_wasm_test_runner/src/main.rs similarity index 100% rename from iroha_wasm_test_runner/src/main.rs rename to crates/iroha_wasm_test_runner/src/main.rs diff --git a/irohad/Cargo.toml b/crates/irohad/Cargo.toml similarity index 100% rename from irohad/Cargo.toml rename to crates/irohad/Cargo.toml diff --git a/irohad/README.md b/crates/irohad/README.md similarity index 97% rename from irohad/README.md rename to crates/irohad/README.md index 67ad267385a..7a6c37aa96c 100644 --- a/irohad/README.md +++ b/crates/irohad/README.md @@ -110,7 +110,7 @@ You may deploy Iroha as a [native binary](#native-binary) or by using [Docker](# ### Docker -We provide a sample configuration for Docker in [`docker-compose.yml`](../defaults/docker-compose.yml). We highly recommend that you adjust the `config.json` to include a set of new key pairs. +We provide a sample configuration for Docker in [`docker-compose.yml`](../../defaults/docker-compose.yml). We highly recommend that you adjust the `config.json` to include a set of new key pairs. [Generate the keys](#generating-keys) and put them into `services.*.environment` in `docker-compose.yml`. Don't forget to update the public keys of `TRUSTED_PEERS`. diff --git a/irohad/build.rs b/crates/irohad/build.rs similarity index 100% rename from irohad/build.rs rename to crates/irohad/build.rs diff --git a/irohad/src/lib.rs b/crates/irohad/src/lib.rs similarity index 100% rename from irohad/src/lib.rs rename to crates/irohad/src/lib.rs diff --git a/irohad/src/main.rs b/crates/irohad/src/main.rs similarity index 100% rename from irohad/src/main.rs rename to crates/irohad/src/main.rs diff --git a/irohad/src/samples.rs b/crates/irohad/src/samples.rs similarity index 100% rename from irohad/src/samples.rs rename to crates/irohad/src/samples.rs diff --git a/kura_inspector/Cargo.toml b/crates/kura_inspector/Cargo.toml similarity index 100% rename from kura_inspector/Cargo.toml rename to crates/kura_inspector/Cargo.toml diff --git a/kura_inspector/README.md b/crates/kura_inspector/README.md similarity index 100% rename from kura_inspector/README.md rename to crates/kura_inspector/README.md diff --git a/kura_inspector/src/main.rs b/crates/kura_inspector/src/main.rs similarity index 100% rename from kura_inspector/src/main.rs rename to crates/kura_inspector/src/main.rs diff --git a/docs/README.md b/docs/README.md index 88409016276..df5a39ae82f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -11,13 +11,13 @@ This is the main Iroha 2 documentation that you will find useful: Documentation for Iroha 2 tools: -- [Kagami](../iroha_kagami/README.md) -- [Kura Inspector](../kura_inspector/README.md) -- [Parity Scale Decoder Tool](../iroha_codec/README.md) +- [Kagami](../crates/iroha_kagami/README.md) +- [Kura Inspector](../crates/kura_inspector/README.md) +- [Parity Scale Decoder Tool](../crates/iroha_codec/README.md) ## Development The following is useful for development: - [Hot reload Iroha in a Docker container](./source/guides/hot-reload.md) -- [Benchmark your code](../iroha/benches/tps/README.md) +- [Benchmark your code](../crates/iroha/benches/tps/README.md) diff --git a/wasm_samples/Cargo.toml b/wasm_samples/Cargo.toml index 02e8fe79fde..6ebcb8fb9e5 100644 --- a/wasm_samples/Cargo.toml +++ b/wasm_samples/Cargo.toml @@ -40,12 +40,12 @@ codegen-units = 1 # Further reduces binary size but increases compilation time [workspace.dependencies] executor_custom_data_model = { path = "executor_custom_data_model" } -iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "../iroha_smart_contract", features = ["debug"] } -iroha_trigger = { version = "=2.0.0-rc.1.0", path = "../iroha_trigger", features = ["debug"] } -iroha_executor = { version = "=2.0.0-rc.1.0", path = "../iroha_executor", features = ["debug"] } -iroha_schema = { version = "=2.0.0-rc.1.0", path = "../iroha_schema" } -iroha_data_model = { version = "=2.0.0-rc.1.0", path = "../iroha_data_model", default-features = false } -iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "../iroha_executor_data_model" } +iroha_smart_contract = { version = "=2.0.0-rc.1.0", path = "../crates/iroha_smart_contract", features = ["debug"] } +iroha_trigger = { version = "=2.0.0-rc.1.0", path = "../crates/iroha_trigger", features = ["debug"] } +iroha_executor = { version = "=2.0.0-rc.1.0", path = "../crates/iroha_executor", features = ["debug"] } +iroha_schema = { version = "=2.0.0-rc.1.0", path = "../crates/iroha_schema" } +iroha_data_model = { version = "=2.0.0-rc.1.0", path = "../crates/iroha_data_model", default-features = false } +iroha_executor_data_model = { version = "=2.0.0-rc.1.0", path = "../crates/iroha_executor_data_model" } parity-scale-codec = { version = "3.2.1", default-features = false } anyhow = { version = "1.0.71", default-features = false } diff --git a/wasm_samples/default_executor/README.md b/wasm_samples/default_executor/README.md index 5c412408997..f273a8dac61 100644 --- a/wasm_samples/default_executor/README.md +++ b/wasm_samples/default_executor/README.md @@ -1,6 +1,6 @@ # `iroha_default_executor` -Use the [Wasm Builder CLI](../../iroha_wasm_builder) in order to build it: +Use the [Wasm Builder CLI](../../crates/iroha_wasm_builder) in order to build it: ```bash cargo run --bin iroha_wasm_builder -- \ diff --git a/wasm_samples/multisig/Cargo.toml b/wasm_samples/multisig/Cargo.toml index 7c391068869..c84fa2d037f 100644 --- a/wasm_samples/multisig/Cargo.toml +++ b/wasm_samples/multisig/Cargo.toml @@ -22,4 +22,4 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, default-features = false } [build-dependencies] -iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "../../iroha_wasm_builder" } +iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "../../crates/iroha_wasm_builder" } diff --git a/wasm_samples/multisig_register/Cargo.toml b/wasm_samples/multisig_register/Cargo.toml index 2e4c9986e4d..042a19d6e53 100644 --- a/wasm_samples/multisig_register/Cargo.toml +++ b/wasm_samples/multisig_register/Cargo.toml @@ -23,4 +23,4 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, default-features = false } [build-dependencies] -iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "../../iroha_wasm_builder" } +iroha_wasm_builder = { version = "=2.0.0-rc.1.0", path = "../../crates/iroha_wasm_builder" } From 957b0ba0e6a46f157644592b84c37fcfef4550e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 19 Aug 2024 13:18:20 +0400 Subject: [PATCH 52/59] refactor: unnest pytests from crate directories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .github/dependabot.yml | 16 +++----- .github/labeler.yml | 4 +- .github/workflows/iroha2-dev-pr-static.yml | 40 ++++++------------- .github/workflows/iroha2-dev-pr-wasm.yaml | 28 ++++++++----- .github/workflows/iroha2-dev-pr.yml | 14 ++++--- .github/workflows/iroha2-pr-ui.yml | 3 +- crates/iroha/examples/tutorial.rs | 2 +- crates/iroha_core/benches/blocks/common.rs | 2 +- crates/iroha_core/benches/validation.rs | 2 +- .../pytests/test/general/__init__.py | 0 .../pytests/test/health/__init__.py | 0 .../pytests/test/schema/__init__.py | 0 .../pytests/test/status/__init__.py | 0 .../iroha_cli_tests}/.gitignore | 0 .../iroha_cli_tests}/README.md | 10 ++--- .../iroha_cli_tests}/__init__.py | 0 .../iroha_cli_tests/common}/__init__.py | 0 .../iroha_cli_tests}/common/consts.py | 0 .../iroha_cli_tests}/common/helpers.py | 0 .../json_isi_examples/unregister_asset.json | 0 .../iroha_cli_tests}/common/settings.py | 0 .../iroha_cli_tests}/models/__init__.py | 0 .../iroha_cli_tests}/models/account.py | 0 .../iroha_cli_tests}/models/asset.py | 0 .../iroha_cli_tests}/models/domain.py | 0 .../iroha_cli_tests}/poetry.lock | 0 .../iroha_cli_tests}/pyproject.toml | 2 +- .../iroha_cli_tests/src}/__init__.py | 0 .../src/iroha_cli/__init__.py | 0 .../src/iroha_cli/configuration.py | 0 .../iroha_cli_tests}/src/iroha_cli/have.py | 0 .../iroha_cli_tests}/src/iroha_cli/iroha.py | 0 .../src/iroha_cli/iroha_cli.py | 0 .../iroha_cli_tests}/src/iroha_cli/match.py | 0 .../iroha_cli_tests}/test/__init__.py | 0 .../test/accounts}/__init__.py | 0 .../test/accounts/conftest.py | 0 .../accounts/test_accounts_query_filters.py | 0 .../test/accounts/test_register_accounts.py | 0 .../iroha_cli_tests/test/assets}/__init__.py | 0 .../iroha_cli_tests}/test/assets/conftest.py | 0 .../test/assets/test_assets_query_filters.py | 0 .../test/assets/test_burn_assets.py | 0 .../test/assets/test_mint_assets.py | 0 .../assets/test_register_asset_definitions.py | 0 .../test/assets/test_transfer_assets.py | 0 .../test/assets/test_unregister_asset.py | 0 .../test/atomicity}/__init__.py | 0 .../test/atomicity/conftest.py | 0 ...ultiple_instructions_within_transaction.py | 0 ...st_pair_instructions_within_transaction.py | 0 ...t_wrong_instructions_within_transaction.py | 0 .../iroha_cli_tests}/test/conftest.py | 0 .../iroha_cli_tests/test/domains}/__init__.py | 0 .../iroha_cli_tests}/test/domains/conftest.py | 0 .../domains/test_domains_query_filters.py | 0 .../test/domains/test_register_domains.py | 0 .../test/domains/test_transfer_domains.py | 0 .../test/triggers}/__init__.py | 0 .../test/triggers/conftest.py | 0 .../test/triggers/test_register_trigger.py | 0 .../iroha_torii_tests}/README.md | 0 .../iroha_torii_tests}/__init__.py | 0 .../iroha_torii_tests/common}/__init__.py | 0 .../get_configuration_response_schema.json | 0 .../common/schemas/get_schema_response.json | 0 .../common/schemas/get_status_response.json | 0 .../iroha_torii_tests}/common/settings.py | 0 .../iroha_torii_tests}/poetry.lock | 0 .../iroha_torii_tests}/pyproject.toml | 2 +- .../iroha_torii_tests}/test/__init__.py | 0 .../test/api_version/__init__.py | 1 + .../test/api_version/conftest.py | 0 .../test/api_version/test_api_version.py | 0 .../test/configuration}/__init__.py | 0 .../test/configuration/conftest.py | 0 .../configuration/test_get_configuration.py | 0 .../configuration/test_post_configuration.py | 0 .../iroha_torii_tests}/test/conftest.py | 0 .../test/general}/__init__.py | 0 .../test/general/conftest.py | 0 .../test/general/test_200_status_codes.py | 0 .../test/general/test_400_status_codes.py | 0 .../test/health}/__init__.py | 0 .../test/health/conftest.py | 0 .../test/health/test_health.py | 0 .../test/schema}/__init__.py | 0 .../test/schema/conftest.py | 0 .../test/schema/test_schema.py | 0 .../test/status}/__init__.py | 0 .../test/status/conftest.py | 0 .../test/status/test_status.py | 0 92 files changed, 61 insertions(+), 65 deletions(-) delete mode 100644 crates/iroha_torii/pytests/test/general/__init__.py delete mode 100644 crates/iroha_torii/pytests/test/health/__init__.py delete mode 100644 crates/iroha_torii/pytests/test/schema/__init__.py delete mode 100644 crates/iroha_torii/pytests/test/status/__init__.py rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/.gitignore (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/README.md (94%) rename {crates => pytests/iroha_cli_tests}/__init__.py (100%) rename {crates/iroha_cli => pytests/iroha_cli_tests/common}/__init__.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/common/consts.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/common/helpers.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/common/json_isi_examples/unregister_asset.json (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/common/settings.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/models/__init__.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/models/account.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/models/asset.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/models/domain.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/poetry.lock (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/pyproject.toml (95%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests/src}/__init__.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/src/iroha_cli/__init__.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/src/iroha_cli/configuration.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/src/iroha_cli/have.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/src/iroha_cli/iroha.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/src/iroha_cli/iroha_cli.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/src/iroha_cli/match.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/__init__.py (100%) rename {crates/iroha_cli/pytests/common => pytests/iroha_cli_tests/test/accounts}/__init__.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/accounts/conftest.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/accounts/test_accounts_query_filters.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/accounts/test_register_accounts.py (100%) rename {crates/iroha_cli/pytests/src => pytests/iroha_cli_tests/test/assets}/__init__.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/assets/conftest.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/assets/test_assets_query_filters.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/assets/test_burn_assets.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/assets/test_mint_assets.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/assets/test_register_asset_definitions.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/assets/test_transfer_assets.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/assets/test_unregister_asset.py (100%) rename {crates/iroha_cli/pytests/test/accounts => pytests/iroha_cli_tests/test/atomicity}/__init__.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/atomicity/conftest.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/atomicity/test_multiple_instructions_within_transaction.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/atomicity/test_pair_instructions_within_transaction.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/atomicity/test_wrong_instructions_within_transaction.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/conftest.py (100%) rename {crates/iroha_cli/pytests/test/assets => pytests/iroha_cli_tests/test/domains}/__init__.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/domains/conftest.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/domains/test_domains_query_filters.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/domains/test_register_domains.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/domains/test_transfer_domains.py (100%) rename {crates/iroha_cli/pytests/test/atomicity => pytests/iroha_cli_tests/test/triggers}/__init__.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/triggers/conftest.py (100%) rename {crates/iroha_cli/pytests => pytests/iroha_cli_tests}/test/triggers/test_register_trigger.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/README.md (100%) rename {crates/iroha_cli/pytests/test/domains => pytests/iroha_torii_tests}/__init__.py (100%) rename {crates/iroha_cli/pytests/test/triggers => pytests/iroha_torii_tests/common}/__init__.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/common/schemas/get_configuration_response_schema.json (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/common/schemas/get_schema_response.json (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/common/schemas/get_status_response.json (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/common/settings.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/poetry.lock (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/pyproject.toml (94%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/__init__.py (100%) create mode 100644 pytests/iroha_torii_tests/test/api_version/__init__.py rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/api_version/conftest.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/api_version/test_api_version.py (100%) rename {crates/iroha_torii => pytests/iroha_torii_tests/test/configuration}/__init__.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/configuration/conftest.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/configuration/test_get_configuration.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/configuration/test_post_configuration.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/conftest.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests/test/general}/__init__.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/general/conftest.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/general/test_200_status_codes.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/general/test_400_status_codes.py (100%) rename {crates/iroha_torii/pytests/common => pytests/iroha_torii_tests/test/health}/__init__.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/health/conftest.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/health/test_health.py (100%) rename {crates/iroha_torii/pytests/test/api_version => pytests/iroha_torii_tests/test/schema}/__init__.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/schema/conftest.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/schema/test_schema.py (100%) rename {crates/iroha_torii/pytests/test/configuration => pytests/iroha_torii_tests/test/status}/__init__.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/status/conftest.py (100%) rename {crates/iroha_torii/pytests => pytests/iroha_torii_tests}/test/status/test_status.py (100%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 028b57ae5d4..332db91fbce 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -21,7 +21,8 @@ updates: - package-ecosystem: "pip" target-branch: "main" - directory: "/iroha_cli/pytests/" + directories: + - /pytests/* schedule: interval: "daily" commit-message: @@ -30,16 +31,9 @@ updates: - package-ecosystem: "cargo" target-branch: "main" - directory: "/" - schedule: - interval: "daily" - commit-message: - prefix: chore - include: scope - - - package-ecosystem: "cargo" - target-branch: "main" - directory: "/wasm_samples/" + directories: + - / + - /wasm_samples schedule: interval: "daily" commit-message: diff --git a/.github/labeler.yml b/.github/labeler.yml index 2f82aa3ebdc..30d84951f20 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -4,8 +4,8 @@ api-changes: - changed-files: - any-glob-to-any-file: - 'docs/source/references/schema.json' - - 'iroha_torii/src/**' - - 'iroha_torii/const/src/**' + - 'crates/iroha_torii/src/**' + - 'crates/iroha_torii_const/src/**' config-changes: - all: diff --git a/.github/workflows/iroha2-dev-pr-static.yml b/.github/workflows/iroha2-dev-pr-static.yml index 261eac4d305..99df610996b 100644 --- a/.github/workflows/iroha2-dev-pr-static.yml +++ b/.github/workflows/iroha2-dev-pr-static.yml @@ -2,13 +2,13 @@ name: I2::Dev::Static on: pull_request: - branches: [main] + branches: [ main ] paths: - '**.rs' - '**.json' - '**.toml' - '.github/workflows/iroha2-dev-pr-static.yml' - - '../../crates/iroha_cli/pytests/**/*.py' + - 'pytests/**.py' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -62,39 +62,25 @@ jobs: runs-on: ubuntu-latest container: image: hyperledger/iroha2-ci:nightly-2024-09-09 + strategy: + matrix: + suite: [ iroha_cli_tests, iroha_torii_tests ] steps: - uses: actions/checkout@v4 - - name: Install dependencies using Poetry for iroha_cli/pytests - working-directory: iroha_cli/pytests + - name: Install dependencies using Poetry for pytests/${{ matrix.suite }} + working-directory: pytests/${{ matrix.suite }} run: | poetry lock --no-update poetry install - - name: Install dependencies using Poetry for iroha_torii/pytests - working-directory: iroha_torii/pytests - run: | - poetry lock --no-update - poetry install - - name: Check code formatting with Black in iroha_cli/pytests - working-directory: iroha_cli/pytests - run: | - poetry run black --check . - - name: Check code formatting with Black in iroha_torii/pytests - working-directory: iroha_torii/pytests + - name: Check code formatting with Black in pytests/${{ matrix.suite }} + working-directory: pytests/${{ matrix.suite }} run: | poetry run black --check . - - name: Run mypy (Type Checker) in iroha_cli/pytests - working-directory: iroha_cli/pytests + - name: Run mypy (Type Checker) in pytests/${{ matrix.suite }} + working-directory: pytests/${{ matrix.suite }} run: | poetry run mypy --explicit-package-bases --ignore-missing-imports . - - name: Run mypy (Type Checker) in iroha_torii/pytests - working-directory: iroha_torii/pytests - run: | - poetry run mypy --explicit-package-bases --ignore-missing-imports . - - name: Run flake8 (Linter) in iroha_cli/pytests - working-directory: iroha_cli/pytests - run: | - poetry run flake8 . --max-line-length=110 --ignore=F401,W503,E203 - - name: Run flake8 (Linter) in iroha_torii/pytests - working-directory: iroha_torii/pytests + - name: Run flake8 (Linter) in pytests/${{ matrix.suite }} + working-directory: pytests/${{ matrix.suite }} run: | poetry run flake8 . --max-line-length=110 --ignore=F401,W503,E203 diff --git a/.github/workflows/iroha2-dev-pr-wasm.yaml b/.github/workflows/iroha2-dev-pr-wasm.yaml index 5dc91cd93a3..39f94eb6083 100644 --- a/.github/workflows/iroha2-dev-pr-wasm.yaml +++ b/.github/workflows/iroha2-dev-pr-wasm.yaml @@ -4,15 +4,25 @@ on: pull_request: branches: [main] paths: - - '../../crates/iroha_data_model/**.rs' - - '../../crates/iroha_data_model/**.yml' - - '../../crates/iroha_data_model/**.json' - - '../../crates/iroha_data_model/**.toml' - - - '../../crates/iroha_smart_contract/**.rs' - - '../../crates/iroha_smart_contract/**.yml' - - '../../crates/iroha_smart_contract/**.json' - - '../../crates/iroha_smart_contract/**.toml' + - 'crates/iroha_data_model/**.rs' + - 'crates/iroha_data_model/**.yml' + - 'crates/iroha_data_model/**.json' + - 'crates/iroha_data_model/**.toml' + + - 'crates/iroha_smart_contract/**.rs' + - 'crates/iroha_smart_contract/**.yml' + - 'crates/iroha_smart_contract/**.json' + - 'crates/iroha_smart_contract/**.toml' + + - 'crates/iroha_executor/**.rs' + - 'crates/iroha_executor/**.yml' + - 'crates/iroha_executor/**.json' + - 'crates/iroha_executor/**.toml' + + - 'crates/iroha_trigger/**.rs' + - 'crates/iroha_trigger/**.yml' + - 'crates/iroha_trigger/**.json' + - 'crates/iroha_trigger/**.toml' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/iroha2-dev-pr.yml b/.github/workflows/iroha2-dev-pr.yml index d5fe8e3e846..2a8d18bf7a9 100644 --- a/.github/workflows/iroha2-dev-pr.yml +++ b/.github/workflows/iroha2-dev-pr.yml @@ -83,7 +83,7 @@ jobs: LLVM_PROFILE_FILE: "iroha-%p-%m.profraw" - name: Generate lcov report if: always() - run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/iroha_cli" --ignore "**/main.rs" -o lcov.info + run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "crates/iroha_cli" --ignore "**/main.rs" -o lcov.info - name: Upload lcov report artifact if: always() uses: actions/upload-artifact@v4 @@ -230,18 +230,21 @@ jobs: docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.local.yml down - name: Run docker-compose.yml containers run: docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml up --wait || exit 1 + - name: Install Python and Poetry run: | yum install -y python${{ env.PYTHON_VERSION }} python${{ env.PYTHON_VERSION }}-devel curl -sSL https://install.python-poetry.org | python3 - echo 'export PATH="${{ env.POETRY_PATH }}:$PATH"' >> /etc/profile source /etc/profile + - name: Install Torii API Dependencies - working-directory: iroha_torii/pytests + working-directory: pytests/iroha_torii_tests run: ${{ env.POETRY_PATH }} install - name: Run Torii API Tests - working-directory: iroha_torii/pytests + working-directory: pytests/iroha_torii_tests run: ${{ env.POETRY_PATH }} run pytest + - name: Copy Client CLI Binary from Iroha Container if: always() run: | @@ -251,14 +254,15 @@ jobs: - name: Make Binaries Executable run: chmod +x ${{ env.TEST_DIR }}/${{ env.IROHA_BIN }} - name: Install Client CLI Dependencies - working-directory: iroha_cli/pytests + working-directory: pytests/iroha_cli_tests run: ${{ env.POETRY_PATH }} install - name: Run Client CLI Tests - working-directory: iroha_cli/pytests + working-directory: pytests/iroha_cli_tests env: IROHA_CLI_BINARY: ../../${{ env.TEST_DIR }}/${{ env.IROHA_BIN }} IROHA_CLI_CONFIG: ../../${{ env.TEST_DIR }}/client.toml run: ${{ env.POETRY_PATH }} run pytest + - name: Wipe docker-compose.yml containers if: always() run: docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml down diff --git a/.github/workflows/iroha2-pr-ui.yml b/.github/workflows/iroha2-pr-ui.yml index 1da9f8638ee..b107361f161 100644 --- a/.github/workflows/iroha2-pr-ui.yml +++ b/.github/workflows/iroha2-pr-ui.yml @@ -4,7 +4,8 @@ on: pull_request: branches: [main, stable, lts] paths: - - '**/derive/**.rs' + - 'crates/*_derive/**.rs' + - 'crates/*_macro*/**.rs' - '**/tests/ui.rs' - '**/tests/ui_*/**' - 'rust-toolchain.toml' diff --git a/crates/iroha/examples/tutorial.rs b/crates/iroha/examples/tutorial.rs index 0ea88e49751..28a882e0518 100644 --- a/crates/iroha/examples/tutorial.rs +++ b/crates/iroha/examples/tutorial.rs @@ -9,7 +9,7 @@ use iroha_primitives::numeric::Numeric; fn main() { // #region rust_config_load - let config = Config::load("../defaults/client.toml").unwrap(); + let config = Config::load("../../defaults/client.toml").unwrap(); // #endregion rust_config_load // Your code goes here… diff --git a/crates/iroha_core/benches/blocks/common.rs b/crates/iroha_core/benches/blocks/common.rs index a6a79b2b7f0..62b351fbfc7 100644 --- a/crates/iroha_core/benches/blocks/common.rs +++ b/crates/iroha_core/benches/blocks/common.rs @@ -208,7 +208,7 @@ pub fn build_state(rt: &tokio::runtime::Handle, account_id: &AccountId) -> State let mut state_transaction = state_block.transaction(); let path_to_executor = - std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../defaults/executor.wasm"); + std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../defaults/executor.wasm"); let wasm = std::fs::read(&path_to_executor) .unwrap_or_else(|_| panic!("Failed to read file: {}", path_to_executor.display())); let executor = Executor::new(WasmSmartContract::from_compiled(wasm)); diff --git a/crates/iroha_core/benches/validation.rs b/crates/iroha_core/benches/validation.rs index 4c1b7e0d457..c6472e4d8fc 100644 --- a/crates/iroha_core/benches/validation.rs +++ b/crates/iroha_core/benches/validation.rs @@ -52,7 +52,7 @@ fn build_test_and_transient_state() -> State { let mut state_block = state.block(); let mut state_transaction = state_block.transaction(); let path_to_executor = - std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../defaults/executor.wasm"); + std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../defaults/executor.wasm"); let wasm = std::fs::read(&path_to_executor) .unwrap_or_else(|_| panic!("Failed to read file: {}", path_to_executor.display())); let executor = Executor::new(WasmSmartContract::from_compiled(wasm)); diff --git a/crates/iroha_torii/pytests/test/general/__init__.py b/crates/iroha_torii/pytests/test/general/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/crates/iroha_torii/pytests/test/health/__init__.py b/crates/iroha_torii/pytests/test/health/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/crates/iroha_torii/pytests/test/schema/__init__.py b/crates/iroha_torii/pytests/test/schema/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/crates/iroha_torii/pytests/test/status/__init__.py b/crates/iroha_torii/pytests/test/status/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/crates/iroha_cli/pytests/.gitignore b/pytests/iroha_cli_tests/.gitignore similarity index 100% rename from crates/iroha_cli/pytests/.gitignore rename to pytests/iroha_cli_tests/.gitignore diff --git a/crates/iroha_cli/pytests/README.md b/pytests/iroha_cli_tests/README.md similarity index 94% rename from crates/iroha_cli/pytests/README.md rename to pytests/iroha_cli_tests/README.md index fc6f4b2ac0b..52c92e1d3aa 100644 --- a/crates/iroha_cli/pytests/README.md +++ b/pytests/iroha_cli_tests/README.md @@ -50,7 +50,7 @@ The test model has the following structure: > However, it is possible to run the tests in a custom environment, e.g., with Docker Compose. > For instructions on how to do so, see [Custom Test Environment with Docker Compose](#custom-test-environment-with-docker-compose). -1. Set up a test environment using the [`test_env.py`](../../../scripts/test_env.py) script: +1. Set up a test environment using the [`test_env.py`](../../scripts/test_env.py) script: ```shell # Must be executed from the repo root: @@ -63,7 +63,7 @@ The test model has the following structure: 2. Install and configure [Poetry](https://python-poetry.org/).\ For details, see [Poetry Configuration](#poetry-configuration) below. -3. Configure the tests by creating the following `.env` file in _this_ (`/iroha_cli/pytests/`) directory: +3. Configure the tests by creating the following `.env` file in _this_ (`/pytests/iroha_cli/`) directory: ```shell IROHA_CLI_BINARY=/path/to/iroha_cli @@ -88,7 +88,7 @@ The test model has the following structure: ### Custom Test Environment with Docker Compose -By default, we provide the [`test_env.py`](../../../scripts/test_env.py) script to set up a test environment. This environment is composed of a running network of Iroha peers and an Iroha client configuration to interact with it. +By default, we provide the [`test_env.py`](../../scripts/test_env.py) script to set up a test environment. This environment is composed of a running network of Iroha peers and an Iroha client configuration to interact with it. However, if for any reason this approach is inconvenient, it is possible to set up a custom network of Iroha peers using the provided Docker Compose configurations. @@ -152,7 +152,7 @@ exit ### Tests Configuration -Tests are configured via environment variables. These variables can be optionally defined in a `.env` file that must be created in _this_ (`/iroha_cli/pytests/`) directory. +Tests are configured via environment variables. These variables can be optionally defined in a `.env` file that must be created in _this_ (`/pytests/iroha_cli/`) directory. The variables: @@ -164,7 +164,7 @@ The variables: **Example**: ```shell -IROHA_CLI_BINARY=/path/to/iroha_cli +IROHA_CLI_BINARY=/path/to/iroha IROHA_CLI_CONFIG=/path/to/client.toml TORII_API_PORT_MIN=8080 TORII_API_PORT_MAX=8083 diff --git a/crates/__init__.py b/pytests/iroha_cli_tests/__init__.py similarity index 100% rename from crates/__init__.py rename to pytests/iroha_cli_tests/__init__.py diff --git a/crates/iroha_cli/__init__.py b/pytests/iroha_cli_tests/common/__init__.py similarity index 100% rename from crates/iroha_cli/__init__.py rename to pytests/iroha_cli_tests/common/__init__.py diff --git a/crates/iroha_cli/pytests/common/consts.py b/pytests/iroha_cli_tests/common/consts.py similarity index 100% rename from crates/iroha_cli/pytests/common/consts.py rename to pytests/iroha_cli_tests/common/consts.py diff --git a/crates/iroha_cli/pytests/common/helpers.py b/pytests/iroha_cli_tests/common/helpers.py similarity index 100% rename from crates/iroha_cli/pytests/common/helpers.py rename to pytests/iroha_cli_tests/common/helpers.py diff --git a/crates/iroha_cli/pytests/common/json_isi_examples/unregister_asset.json b/pytests/iroha_cli_tests/common/json_isi_examples/unregister_asset.json similarity index 100% rename from crates/iroha_cli/pytests/common/json_isi_examples/unregister_asset.json rename to pytests/iroha_cli_tests/common/json_isi_examples/unregister_asset.json diff --git a/crates/iroha_cli/pytests/common/settings.py b/pytests/iroha_cli_tests/common/settings.py similarity index 100% rename from crates/iroha_cli/pytests/common/settings.py rename to pytests/iroha_cli_tests/common/settings.py diff --git a/crates/iroha_cli/pytests/models/__init__.py b/pytests/iroha_cli_tests/models/__init__.py similarity index 100% rename from crates/iroha_cli/pytests/models/__init__.py rename to pytests/iroha_cli_tests/models/__init__.py diff --git a/crates/iroha_cli/pytests/models/account.py b/pytests/iroha_cli_tests/models/account.py similarity index 100% rename from crates/iroha_cli/pytests/models/account.py rename to pytests/iroha_cli_tests/models/account.py diff --git a/crates/iroha_cli/pytests/models/asset.py b/pytests/iroha_cli_tests/models/asset.py similarity index 100% rename from crates/iroha_cli/pytests/models/asset.py rename to pytests/iroha_cli_tests/models/asset.py diff --git a/crates/iroha_cli/pytests/models/domain.py b/pytests/iroha_cli_tests/models/domain.py similarity index 100% rename from crates/iroha_cli/pytests/models/domain.py rename to pytests/iroha_cli_tests/models/domain.py diff --git a/crates/iroha_cli/pytests/poetry.lock b/pytests/iroha_cli_tests/poetry.lock similarity index 100% rename from crates/iroha_cli/pytests/poetry.lock rename to pytests/iroha_cli_tests/poetry.lock diff --git a/crates/iroha_cli/pytests/pyproject.toml b/pytests/iroha_cli_tests/pyproject.toml similarity index 95% rename from crates/iroha_cli/pytests/pyproject.toml rename to pytests/iroha_cli_tests/pyproject.toml index 67bef271f73..97003f31cd2 100644 --- a/crates/iroha_cli/pytests/pyproject.toml +++ b/pytests/iroha_cli_tests/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "pytestclientcli" +name = "iroha_cli_tests" version = "0.1.0" description = "" authors = ["alexstroke "] diff --git a/crates/iroha_cli/pytests/__init__.py b/pytests/iroha_cli_tests/src/__init__.py similarity index 100% rename from crates/iroha_cli/pytests/__init__.py rename to pytests/iroha_cli_tests/src/__init__.py diff --git a/crates/iroha_cli/pytests/src/iroha_cli/__init__.py b/pytests/iroha_cli_tests/src/iroha_cli/__init__.py similarity index 100% rename from crates/iroha_cli/pytests/src/iroha_cli/__init__.py rename to pytests/iroha_cli_tests/src/iroha_cli/__init__.py diff --git a/crates/iroha_cli/pytests/src/iroha_cli/configuration.py b/pytests/iroha_cli_tests/src/iroha_cli/configuration.py similarity index 100% rename from crates/iroha_cli/pytests/src/iroha_cli/configuration.py rename to pytests/iroha_cli_tests/src/iroha_cli/configuration.py diff --git a/crates/iroha_cli/pytests/src/iroha_cli/have.py b/pytests/iroha_cli_tests/src/iroha_cli/have.py similarity index 100% rename from crates/iroha_cli/pytests/src/iroha_cli/have.py rename to pytests/iroha_cli_tests/src/iroha_cli/have.py diff --git a/crates/iroha_cli/pytests/src/iroha_cli/iroha.py b/pytests/iroha_cli_tests/src/iroha_cli/iroha.py similarity index 100% rename from crates/iroha_cli/pytests/src/iroha_cli/iroha.py rename to pytests/iroha_cli_tests/src/iroha_cli/iroha.py diff --git a/crates/iroha_cli/pytests/src/iroha_cli/iroha_cli.py b/pytests/iroha_cli_tests/src/iroha_cli/iroha_cli.py similarity index 100% rename from crates/iroha_cli/pytests/src/iroha_cli/iroha_cli.py rename to pytests/iroha_cli_tests/src/iroha_cli/iroha_cli.py diff --git a/crates/iroha_cli/pytests/src/iroha_cli/match.py b/pytests/iroha_cli_tests/src/iroha_cli/match.py similarity index 100% rename from crates/iroha_cli/pytests/src/iroha_cli/match.py rename to pytests/iroha_cli_tests/src/iroha_cli/match.py diff --git a/crates/iroha_cli/pytests/test/__init__.py b/pytests/iroha_cli_tests/test/__init__.py similarity index 100% rename from crates/iroha_cli/pytests/test/__init__.py rename to pytests/iroha_cli_tests/test/__init__.py diff --git a/crates/iroha_cli/pytests/common/__init__.py b/pytests/iroha_cli_tests/test/accounts/__init__.py similarity index 100% rename from crates/iroha_cli/pytests/common/__init__.py rename to pytests/iroha_cli_tests/test/accounts/__init__.py diff --git a/crates/iroha_cli/pytests/test/accounts/conftest.py b/pytests/iroha_cli_tests/test/accounts/conftest.py similarity index 100% rename from crates/iroha_cli/pytests/test/accounts/conftest.py rename to pytests/iroha_cli_tests/test/accounts/conftest.py diff --git a/crates/iroha_cli/pytests/test/accounts/test_accounts_query_filters.py b/pytests/iroha_cli_tests/test/accounts/test_accounts_query_filters.py similarity index 100% rename from crates/iroha_cli/pytests/test/accounts/test_accounts_query_filters.py rename to pytests/iroha_cli_tests/test/accounts/test_accounts_query_filters.py diff --git a/crates/iroha_cli/pytests/test/accounts/test_register_accounts.py b/pytests/iroha_cli_tests/test/accounts/test_register_accounts.py similarity index 100% rename from crates/iroha_cli/pytests/test/accounts/test_register_accounts.py rename to pytests/iroha_cli_tests/test/accounts/test_register_accounts.py diff --git a/crates/iroha_cli/pytests/src/__init__.py b/pytests/iroha_cli_tests/test/assets/__init__.py similarity index 100% rename from crates/iroha_cli/pytests/src/__init__.py rename to pytests/iroha_cli_tests/test/assets/__init__.py diff --git a/crates/iroha_cli/pytests/test/assets/conftest.py b/pytests/iroha_cli_tests/test/assets/conftest.py similarity index 100% rename from crates/iroha_cli/pytests/test/assets/conftest.py rename to pytests/iroha_cli_tests/test/assets/conftest.py diff --git a/crates/iroha_cli/pytests/test/assets/test_assets_query_filters.py b/pytests/iroha_cli_tests/test/assets/test_assets_query_filters.py similarity index 100% rename from crates/iroha_cli/pytests/test/assets/test_assets_query_filters.py rename to pytests/iroha_cli_tests/test/assets/test_assets_query_filters.py diff --git a/crates/iroha_cli/pytests/test/assets/test_burn_assets.py b/pytests/iroha_cli_tests/test/assets/test_burn_assets.py similarity index 100% rename from crates/iroha_cli/pytests/test/assets/test_burn_assets.py rename to pytests/iroha_cli_tests/test/assets/test_burn_assets.py diff --git a/crates/iroha_cli/pytests/test/assets/test_mint_assets.py b/pytests/iroha_cli_tests/test/assets/test_mint_assets.py similarity index 100% rename from crates/iroha_cli/pytests/test/assets/test_mint_assets.py rename to pytests/iroha_cli_tests/test/assets/test_mint_assets.py diff --git a/crates/iroha_cli/pytests/test/assets/test_register_asset_definitions.py b/pytests/iroha_cli_tests/test/assets/test_register_asset_definitions.py similarity index 100% rename from crates/iroha_cli/pytests/test/assets/test_register_asset_definitions.py rename to pytests/iroha_cli_tests/test/assets/test_register_asset_definitions.py diff --git a/crates/iroha_cli/pytests/test/assets/test_transfer_assets.py b/pytests/iroha_cli_tests/test/assets/test_transfer_assets.py similarity index 100% rename from crates/iroha_cli/pytests/test/assets/test_transfer_assets.py rename to pytests/iroha_cli_tests/test/assets/test_transfer_assets.py diff --git a/crates/iroha_cli/pytests/test/assets/test_unregister_asset.py b/pytests/iroha_cli_tests/test/assets/test_unregister_asset.py similarity index 100% rename from crates/iroha_cli/pytests/test/assets/test_unregister_asset.py rename to pytests/iroha_cli_tests/test/assets/test_unregister_asset.py diff --git a/crates/iroha_cli/pytests/test/accounts/__init__.py b/pytests/iroha_cli_tests/test/atomicity/__init__.py similarity index 100% rename from crates/iroha_cli/pytests/test/accounts/__init__.py rename to pytests/iroha_cli_tests/test/atomicity/__init__.py diff --git a/crates/iroha_cli/pytests/test/atomicity/conftest.py b/pytests/iroha_cli_tests/test/atomicity/conftest.py similarity index 100% rename from crates/iroha_cli/pytests/test/atomicity/conftest.py rename to pytests/iroha_cli_tests/test/atomicity/conftest.py diff --git a/crates/iroha_cli/pytests/test/atomicity/test_multiple_instructions_within_transaction.py b/pytests/iroha_cli_tests/test/atomicity/test_multiple_instructions_within_transaction.py similarity index 100% rename from crates/iroha_cli/pytests/test/atomicity/test_multiple_instructions_within_transaction.py rename to pytests/iroha_cli_tests/test/atomicity/test_multiple_instructions_within_transaction.py diff --git a/crates/iroha_cli/pytests/test/atomicity/test_pair_instructions_within_transaction.py b/pytests/iroha_cli_tests/test/atomicity/test_pair_instructions_within_transaction.py similarity index 100% rename from crates/iroha_cli/pytests/test/atomicity/test_pair_instructions_within_transaction.py rename to pytests/iroha_cli_tests/test/atomicity/test_pair_instructions_within_transaction.py diff --git a/crates/iroha_cli/pytests/test/atomicity/test_wrong_instructions_within_transaction.py b/pytests/iroha_cli_tests/test/atomicity/test_wrong_instructions_within_transaction.py similarity index 100% rename from crates/iroha_cli/pytests/test/atomicity/test_wrong_instructions_within_transaction.py rename to pytests/iroha_cli_tests/test/atomicity/test_wrong_instructions_within_transaction.py diff --git a/crates/iroha_cli/pytests/test/conftest.py b/pytests/iroha_cli_tests/test/conftest.py similarity index 100% rename from crates/iroha_cli/pytests/test/conftest.py rename to pytests/iroha_cli_tests/test/conftest.py diff --git a/crates/iroha_cli/pytests/test/assets/__init__.py b/pytests/iroha_cli_tests/test/domains/__init__.py similarity index 100% rename from crates/iroha_cli/pytests/test/assets/__init__.py rename to pytests/iroha_cli_tests/test/domains/__init__.py diff --git a/crates/iroha_cli/pytests/test/domains/conftest.py b/pytests/iroha_cli_tests/test/domains/conftest.py similarity index 100% rename from crates/iroha_cli/pytests/test/domains/conftest.py rename to pytests/iroha_cli_tests/test/domains/conftest.py diff --git a/crates/iroha_cli/pytests/test/domains/test_domains_query_filters.py b/pytests/iroha_cli_tests/test/domains/test_domains_query_filters.py similarity index 100% rename from crates/iroha_cli/pytests/test/domains/test_domains_query_filters.py rename to pytests/iroha_cli_tests/test/domains/test_domains_query_filters.py diff --git a/crates/iroha_cli/pytests/test/domains/test_register_domains.py b/pytests/iroha_cli_tests/test/domains/test_register_domains.py similarity index 100% rename from crates/iroha_cli/pytests/test/domains/test_register_domains.py rename to pytests/iroha_cli_tests/test/domains/test_register_domains.py diff --git a/crates/iroha_cli/pytests/test/domains/test_transfer_domains.py b/pytests/iroha_cli_tests/test/domains/test_transfer_domains.py similarity index 100% rename from crates/iroha_cli/pytests/test/domains/test_transfer_domains.py rename to pytests/iroha_cli_tests/test/domains/test_transfer_domains.py diff --git a/crates/iroha_cli/pytests/test/atomicity/__init__.py b/pytests/iroha_cli_tests/test/triggers/__init__.py similarity index 100% rename from crates/iroha_cli/pytests/test/atomicity/__init__.py rename to pytests/iroha_cli_tests/test/triggers/__init__.py diff --git a/crates/iroha_cli/pytests/test/triggers/conftest.py b/pytests/iroha_cli_tests/test/triggers/conftest.py similarity index 100% rename from crates/iroha_cli/pytests/test/triggers/conftest.py rename to pytests/iroha_cli_tests/test/triggers/conftest.py diff --git a/crates/iroha_cli/pytests/test/triggers/test_register_trigger.py b/pytests/iroha_cli_tests/test/triggers/test_register_trigger.py similarity index 100% rename from crates/iroha_cli/pytests/test/triggers/test_register_trigger.py rename to pytests/iroha_cli_tests/test/triggers/test_register_trigger.py diff --git a/crates/iroha_torii/pytests/README.md b/pytests/iroha_torii_tests/README.md similarity index 100% rename from crates/iroha_torii/pytests/README.md rename to pytests/iroha_torii_tests/README.md diff --git a/crates/iroha_cli/pytests/test/domains/__init__.py b/pytests/iroha_torii_tests/__init__.py similarity index 100% rename from crates/iroha_cli/pytests/test/domains/__init__.py rename to pytests/iroha_torii_tests/__init__.py diff --git a/crates/iroha_cli/pytests/test/triggers/__init__.py b/pytests/iroha_torii_tests/common/__init__.py similarity index 100% rename from crates/iroha_cli/pytests/test/triggers/__init__.py rename to pytests/iroha_torii_tests/common/__init__.py diff --git a/crates/iroha_torii/pytests/common/schemas/get_configuration_response_schema.json b/pytests/iroha_torii_tests/common/schemas/get_configuration_response_schema.json similarity index 100% rename from crates/iroha_torii/pytests/common/schemas/get_configuration_response_schema.json rename to pytests/iroha_torii_tests/common/schemas/get_configuration_response_schema.json diff --git a/crates/iroha_torii/pytests/common/schemas/get_schema_response.json b/pytests/iroha_torii_tests/common/schemas/get_schema_response.json similarity index 100% rename from crates/iroha_torii/pytests/common/schemas/get_schema_response.json rename to pytests/iroha_torii_tests/common/schemas/get_schema_response.json diff --git a/crates/iroha_torii/pytests/common/schemas/get_status_response.json b/pytests/iroha_torii_tests/common/schemas/get_status_response.json similarity index 100% rename from crates/iroha_torii/pytests/common/schemas/get_status_response.json rename to pytests/iroha_torii_tests/common/schemas/get_status_response.json diff --git a/crates/iroha_torii/pytests/common/settings.py b/pytests/iroha_torii_tests/common/settings.py similarity index 100% rename from crates/iroha_torii/pytests/common/settings.py rename to pytests/iroha_torii_tests/common/settings.py diff --git a/crates/iroha_torii/pytests/poetry.lock b/pytests/iroha_torii_tests/poetry.lock similarity index 100% rename from crates/iroha_torii/pytests/poetry.lock rename to pytests/iroha_torii_tests/poetry.lock diff --git a/crates/iroha_torii/pytests/pyproject.toml b/pytests/iroha_torii_tests/pyproject.toml similarity index 94% rename from crates/iroha_torii/pytests/pyproject.toml rename to pytests/iroha_torii_tests/pyproject.toml index dae400337db..d030201a66e 100644 --- a/crates/iroha_torii/pytests/pyproject.toml +++ b/pytests/iroha_torii_tests/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "iroha2-torii-api-tests" +name = "iroha_torii_tests" version = "0.1.0" description = "" authors = ["alexstroke <111361420+astrokov7@users.noreply.github.com>"] diff --git a/crates/iroha_torii/pytests/test/__init__.py b/pytests/iroha_torii_tests/test/__init__.py similarity index 100% rename from crates/iroha_torii/pytests/test/__init__.py rename to pytests/iroha_torii_tests/test/__init__.py diff --git a/pytests/iroha_torii_tests/test/api_version/__init__.py b/pytests/iroha_torii_tests/test/api_version/__init__.py new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/pytests/iroha_torii_tests/test/api_version/__init__.py @@ -0,0 +1 @@ + diff --git a/crates/iroha_torii/pytests/test/api_version/conftest.py b/pytests/iroha_torii_tests/test/api_version/conftest.py similarity index 100% rename from crates/iroha_torii/pytests/test/api_version/conftest.py rename to pytests/iroha_torii_tests/test/api_version/conftest.py diff --git a/crates/iroha_torii/pytests/test/api_version/test_api_version.py b/pytests/iroha_torii_tests/test/api_version/test_api_version.py similarity index 100% rename from crates/iroha_torii/pytests/test/api_version/test_api_version.py rename to pytests/iroha_torii_tests/test/api_version/test_api_version.py diff --git a/crates/iroha_torii/__init__.py b/pytests/iroha_torii_tests/test/configuration/__init__.py similarity index 100% rename from crates/iroha_torii/__init__.py rename to pytests/iroha_torii_tests/test/configuration/__init__.py diff --git a/crates/iroha_torii/pytests/test/configuration/conftest.py b/pytests/iroha_torii_tests/test/configuration/conftest.py similarity index 100% rename from crates/iroha_torii/pytests/test/configuration/conftest.py rename to pytests/iroha_torii_tests/test/configuration/conftest.py diff --git a/crates/iroha_torii/pytests/test/configuration/test_get_configuration.py b/pytests/iroha_torii_tests/test/configuration/test_get_configuration.py similarity index 100% rename from crates/iroha_torii/pytests/test/configuration/test_get_configuration.py rename to pytests/iroha_torii_tests/test/configuration/test_get_configuration.py diff --git a/crates/iroha_torii/pytests/test/configuration/test_post_configuration.py b/pytests/iroha_torii_tests/test/configuration/test_post_configuration.py similarity index 100% rename from crates/iroha_torii/pytests/test/configuration/test_post_configuration.py rename to pytests/iroha_torii_tests/test/configuration/test_post_configuration.py diff --git a/crates/iroha_torii/pytests/test/conftest.py b/pytests/iroha_torii_tests/test/conftest.py similarity index 100% rename from crates/iroha_torii/pytests/test/conftest.py rename to pytests/iroha_torii_tests/test/conftest.py diff --git a/crates/iroha_torii/pytests/__init__.py b/pytests/iroha_torii_tests/test/general/__init__.py similarity index 100% rename from crates/iroha_torii/pytests/__init__.py rename to pytests/iroha_torii_tests/test/general/__init__.py diff --git a/crates/iroha_torii/pytests/test/general/conftest.py b/pytests/iroha_torii_tests/test/general/conftest.py similarity index 100% rename from crates/iroha_torii/pytests/test/general/conftest.py rename to pytests/iroha_torii_tests/test/general/conftest.py diff --git a/crates/iroha_torii/pytests/test/general/test_200_status_codes.py b/pytests/iroha_torii_tests/test/general/test_200_status_codes.py similarity index 100% rename from crates/iroha_torii/pytests/test/general/test_200_status_codes.py rename to pytests/iroha_torii_tests/test/general/test_200_status_codes.py diff --git a/crates/iroha_torii/pytests/test/general/test_400_status_codes.py b/pytests/iroha_torii_tests/test/general/test_400_status_codes.py similarity index 100% rename from crates/iroha_torii/pytests/test/general/test_400_status_codes.py rename to pytests/iroha_torii_tests/test/general/test_400_status_codes.py diff --git a/crates/iroha_torii/pytests/common/__init__.py b/pytests/iroha_torii_tests/test/health/__init__.py similarity index 100% rename from crates/iroha_torii/pytests/common/__init__.py rename to pytests/iroha_torii_tests/test/health/__init__.py diff --git a/crates/iroha_torii/pytests/test/health/conftest.py b/pytests/iroha_torii_tests/test/health/conftest.py similarity index 100% rename from crates/iroha_torii/pytests/test/health/conftest.py rename to pytests/iroha_torii_tests/test/health/conftest.py diff --git a/crates/iroha_torii/pytests/test/health/test_health.py b/pytests/iroha_torii_tests/test/health/test_health.py similarity index 100% rename from crates/iroha_torii/pytests/test/health/test_health.py rename to pytests/iroha_torii_tests/test/health/test_health.py diff --git a/crates/iroha_torii/pytests/test/api_version/__init__.py b/pytests/iroha_torii_tests/test/schema/__init__.py similarity index 100% rename from crates/iroha_torii/pytests/test/api_version/__init__.py rename to pytests/iroha_torii_tests/test/schema/__init__.py diff --git a/crates/iroha_torii/pytests/test/schema/conftest.py b/pytests/iroha_torii_tests/test/schema/conftest.py similarity index 100% rename from crates/iroha_torii/pytests/test/schema/conftest.py rename to pytests/iroha_torii_tests/test/schema/conftest.py diff --git a/crates/iroha_torii/pytests/test/schema/test_schema.py b/pytests/iroha_torii_tests/test/schema/test_schema.py similarity index 100% rename from crates/iroha_torii/pytests/test/schema/test_schema.py rename to pytests/iroha_torii_tests/test/schema/test_schema.py diff --git a/crates/iroha_torii/pytests/test/configuration/__init__.py b/pytests/iroha_torii_tests/test/status/__init__.py similarity index 100% rename from crates/iroha_torii/pytests/test/configuration/__init__.py rename to pytests/iroha_torii_tests/test/status/__init__.py diff --git a/crates/iroha_torii/pytests/test/status/conftest.py b/pytests/iroha_torii_tests/test/status/conftest.py similarity index 100% rename from crates/iroha_torii/pytests/test/status/conftest.py rename to pytests/iroha_torii_tests/test/status/conftest.py diff --git a/crates/iroha_torii/pytests/test/status/test_status.py b/pytests/iroha_torii_tests/test/status/test_status.py similarity index 100% rename from crates/iroha_torii/pytests/test/status/test_status.py rename to pytests/iroha_torii_tests/test/status/test_status.py From 9a7ce8ac155abacc7300ba3340c71c79b1b5255b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 20 Aug 2024 10:30:48 +0400 Subject: [PATCH 53/59] refactor: use wildcard in workspace members MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.toml | 46 +--------------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c92670f1f74..f1e82af249e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -194,51 +194,7 @@ clippy.wildcard_dependencies = "deny" [workspace] resolver = "2" members = [ - "crates/irohad", - "crates/iroha", - "crates/iroha_cli", - "crates/iroha_config", - "crates/iroha_config_base", - "crates/iroha_core", - "crates/iroha_test_network", - "crates/iroha_crypto", - "crates/iroha_data_model", - "crates/iroha_genesis", - "crates/iroha_logger", - "crates/iroha_p2p", - "crates/iroha_futures", - "crates/iroha_futures_derive", - "crates/iroha_primitives", - "crates/iroha_primitives_derive", - "crates/iroha_numeric", - "crates/iroha_ffi", - "crates/iroha_ffi_derive", - "crates/iroha_schema", - "crates/iroha_schema_gen", - "crates/iroha_schema_derive", - "crates/iroha_smart_contract", - "crates/iroha_smart_contract_derive", - "crates/iroha_smart_contract_utils", - "crates/iroha_trigger", - "crates/iroha_trigger_derive", - "crates/iroha_executor", - "crates/iroha_executor_derive", - "crates/iroha_executor_data_model", - "crates/iroha_executor_data_model_derive", - "crates/iroha_telemetry", - "crates/iroha_test_samples", - "crates/iroha_swarm", - "crates/iroha_kagami", - "crates/kura_inspector", - "crates/iroha_codec", - "crates/iroha_wasm_test_runner", - "crates/iroha_torii", - "crates/iroha_torii_const", - "crates/iroha_version", - "crates/iroha_version_derive", - "crates/iroha_wasm_codec", - "crates/iroha_wasm_codec_derive", - "crates/iroha_wasm_builder", + "crates/*" ] exclude = [ "wasm_samples", From 6c3bc1dbfac9fae703ca4c98a7b0c144b00046f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 20 Aug 2024 10:39:09 +0400 Subject: [PATCH 54/59] style: formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- crates/iroha/benches/torii.rs | 10 +++++++--- crates/iroha/benches/tps/utils.rs | 2 +- crates/iroha/examples/million_accounts_genesis.rs | 6 ++++-- crates/iroha/examples/register_1000_triggers.rs | 4 ++-- crates/iroha/tests/integration/asset.rs | 2 +- crates/iroha/tests/integration/asset_propagation.rs | 2 +- crates/iroha/tests/integration/events/data.rs | 2 +- .../iroha/tests/integration/events/notification.rs | 2 +- crates/iroha/tests/integration/events/pipeline.rs | 1 + .../integration/extra_functional/connected_peers.rs | 2 +- .../extra_functional/multiple_blocks_created.rs | 2 +- .../tests/integration/extra_functional/normal.rs | 2 +- .../integration/extra_functional/offline_peers.rs | 2 +- .../integration/extra_functional/restart_peer.rs | 2 +- .../integration/extra_functional/unregister_peer.rs | 2 +- .../extra_functional/unstable_network.rs | 2 +- crates/iroha/tests/integration/non_mintable.rs | 2 +- crates/iroha/tests/integration/pagination.rs | 2 +- crates/iroha/tests/integration/permissions.rs | 2 +- crates/iroha/tests/integration/queries/account.rs | 2 +- crates/iroha/tests/integration/queries/role.rs | 2 +- crates/iroha/tests/integration/roles.rs | 2 +- crates/iroha/tests/integration/status_response.rs | 2 +- crates/iroha/tests/integration/transfer_asset.rs | 2 +- crates/iroha/tests/integration/transfer_domain.rs | 2 +- .../tests/integration/triggers/by_call_trigger.rs | 2 +- .../tests/integration/triggers/data_trigger.rs | 2 +- .../tests/integration/triggers/event_trigger.rs | 2 +- crates/iroha/tests/integration/triggers/orphans.rs | 2 +- .../tests/integration/triggers/time_trigger.rs | 2 +- .../tests/integration/triggers/trigger_rollback.rs | 2 +- crates/iroha/tests/integration/tx_chain_id.rs | 2 +- crates/iroha/tests/integration/tx_history.rs | 2 +- crates/iroha/tests/integration/tx_rollback.rs | 2 +- crates/iroha/tests/integration/upgrade.rs | 13 ++++++++++--- crates/iroha_core/benches/blocks/common.rs | 4 ++-- crates/iroha_core/benches/validation.rs | 4 ++-- .../iroha_torii_tests/test/api_version/__init__.py | 1 - 38 files changed, 58 insertions(+), 45 deletions(-) diff --git a/crates/iroha/benches/torii.rs b/crates/iroha/benches/torii.rs index 9c5abdc35f8..a9e5ded3523 100644 --- a/crates/iroha/benches/torii.rs +++ b/crates/iroha/benches/torii.rs @@ -9,11 +9,11 @@ use iroha::{ }; use iroha_genesis::GenesisBuilder; use iroha_primitives::unique_vec; -use iroha_test_samples::gen_account_in; -use irohad::samples::get_config; use iroha_test_network::{ construct_executor, get_chain_id, get_key_pair, Peer as TestPeer, PeerBuilder, TestRuntime, }; +use iroha_test_samples::gen_account_in; +use irohad::samples::get_config; use tokio::runtime::Runtime; const MINIMUM_SUCCESS_REQUEST_RATIO: f32 = 0.9; @@ -36,7 +36,11 @@ fn query_requests(criterion: &mut Criterion) { let topology = vec![peer.id.clone()]; let genesis = GenesisBuilder::default() .domain("wonderland".parse().expect("Valid")) - .account(get_key_pair(iroha_test_network::Signatory::Alice).into_parts().0) + .account( + get_key_pair(iroha_test_network::Signatory::Alice) + .into_parts() + .0, + ) .finish_domain() .build_and_sign(chain_id, executor, topology, &genesis_key_pair); diff --git a/crates/iroha/benches/tps/utils.rs b/crates/iroha/benches/tps/utils.rs index c7b1c9a81c1..08a95111946 100644 --- a/crates/iroha/benches/tps/utils.rs +++ b/crates/iroha/benches/tps/utils.rs @@ -10,10 +10,10 @@ use iroha::{ prelude::*, }, }; +use iroha_test_network::*; use iroha_test_samples::ALICE_ID; use nonzero_ext::nonzero; use serde::Deserialize; -use iroha_test_network::*; pub type Tps = f64; diff --git a/crates/iroha/examples/million_accounts_genesis.rs b/crates/iroha/examples/million_accounts_genesis.rs index 882611dd448..6fe2e5e5b63 100644 --- a/crates/iroha/examples/million_accounts_genesis.rs +++ b/crates/iroha/examples/million_accounts_genesis.rs @@ -7,11 +7,11 @@ use iroha::{ }; use iroha_genesis::{GenesisBlock, GenesisBuilder}; use iroha_primitives::unique_vec; -use irohad::samples::get_config; use iroha_test_network::{ construct_executor, get_chain_id, get_key_pair, wait_for_genesis_committed, Peer as TestPeer, PeerBuilder, TestRuntime, }; +use irohad::samples::get_config; use tokio::runtime::Runtime; fn generate_genesis( @@ -22,7 +22,9 @@ fn generate_genesis( ) -> GenesisBlock { let mut builder = GenesisBuilder::default(); - let signatory_alice = get_key_pair(iroha_test_network::Signatory::Alice).into_parts().0; + let signatory_alice = get_key_pair(iroha_test_network::Signatory::Alice) + .into_parts() + .0; for i in 0_u32..num_domains { builder = builder .domain(format!("wonderland-{i}").parse().expect("Valid")) diff --git a/crates/iroha/examples/register_1000_triggers.rs b/crates/iroha/examples/register_1000_triggers.rs index 34d1736aeb6..c54a9df41c8 100644 --- a/crates/iroha/examples/register_1000_triggers.rs +++ b/crates/iroha/examples/register_1000_triggers.rs @@ -11,12 +11,12 @@ use iroha::{ use iroha_data_model::parameter::{Parameter, SmartContractParameter}; use iroha_genesis::{GenesisBlock, GenesisBuilder}; use iroha_primitives::unique_vec; -use iroha_test_samples::gen_account_in; -use irohad::samples::get_config; use iroha_test_network::{ construct_executor, get_chain_id, get_key_pair, wait_for_genesis_committed_with_max_retries, Peer as TestPeer, PeerBuilder, TestClient, TestRuntime, }; +use iroha_test_samples::gen_account_in; +use irohad::samples::get_config; use tokio::runtime::Runtime; fn generate_genesis( diff --git a/crates/iroha/tests/integration/asset.rs b/crates/iroha/tests/integration/asset.rs index c7eb4e14763..41c3216b51f 100644 --- a/crates/iroha/tests/integration/asset.rs +++ b/crates/iroha/tests/integration/asset.rs @@ -13,8 +13,8 @@ use iroha::{ }; use iroha_config::parameters::actual::Root as Config; use iroha_executor_data_model::permission::asset::CanTransferUserAsset; -use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID}; use iroha_test_network::*; +use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID}; #[test] // This test is also covered at the UI level in the iroha_cli tests diff --git a/crates/iroha/tests/integration/asset_propagation.rs b/crates/iroha/tests/integration/asset_propagation.rs index 3654e722fd5..33254264e6b 100644 --- a/crates/iroha/tests/integration/asset_propagation.rs +++ b/crates/iroha/tests/integration/asset_propagation.rs @@ -6,9 +6,9 @@ use iroha::{ data_model::{parameter::BlockParameter, prelude::*}, }; use iroha_config::parameters::actual::Root as Config; +use iroha_test_network::*; use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; -use iroha_test_network::*; #[test] // This test is also covered at the UI level in the iroha_cli tests diff --git a/crates/iroha/tests/integration/events/data.rs b/crates/iroha/tests/integration/events/data.rs index 44e1daa4ccd..e42e119518a 100644 --- a/crates/iroha/tests/integration/events/data.rs +++ b/crates/iroha/tests/integration/events/data.rs @@ -5,9 +5,9 @@ use iroha::data_model::{prelude::*, transaction::WasmSmartContract}; use iroha_executor_data_model::permission::account::{ CanRemoveKeyValueInAccount, CanSetKeyValueInAccount, }; +use iroha_test_network::*; use iroha_test_samples::{ALICE_ID, BOB_ID}; use parity_scale_codec::Encode as _; -use iroha_test_network::*; /// Return string containing exported memory, dummy allocator, and /// host function imports which you can embed into your wasm module. diff --git a/crates/iroha/tests/integration/events/notification.rs b/crates/iroha/tests/integration/events/notification.rs index c3a621e1548..5bf381c1543 100644 --- a/crates/iroha/tests/integration/events/notification.rs +++ b/crates/iroha/tests/integration/events/notification.rs @@ -2,8 +2,8 @@ use std::{sync::mpsc, thread, time::Duration}; use eyre::{eyre, Result, WrapErr}; use iroha::data_model::prelude::*; -use iroha_test_samples::ALICE_ID; use iroha_test_network::*; +use iroha_test_samples::ALICE_ID; #[test] fn trigger_completion_success_should_produce_event() -> Result<()> { diff --git a/crates/iroha/tests/integration/events/pipeline.rs b/crates/iroha/tests/integration/events/pipeline.rs index 0acaac77810..47826a2dd1d 100644 --- a/crates/iroha/tests/integration/events/pipeline.rs +++ b/crates/iroha/tests/integration/events/pipeline.rs @@ -18,6 +18,7 @@ use iroha::{ use iroha_config::parameters::actual::Root as Config; use nonzero_ext::nonzero; use iroha_test_network::*; +use nonzero_ext::nonzero; // Needed to re-enable ignored tests. const PEER_COUNT: usize = 7; diff --git a/crates/iroha/tests/integration/extra_functional/connected_peers.rs b/crates/iroha/tests/integration/extra_functional/connected_peers.rs index 6971a76a85b..4bc748200d3 100644 --- a/crates/iroha/tests/integration/extra_functional/connected_peers.rs +++ b/crates/iroha/tests/integration/extra_functional/connected_peers.rs @@ -10,8 +10,8 @@ use iroha::{ }; use iroha_config::parameters::actual::Root as Config; use iroha_primitives::unique_vec; -use rand::{seq::SliceRandom, thread_rng, Rng}; use iroha_test_network::*; +use rand::{seq::SliceRandom, thread_rng, Rng}; use tokio::runtime::Runtime; #[ignore = "ignore, more in #2851"] diff --git a/crates/iroha/tests/integration/extra_functional/multiple_blocks_created.rs b/crates/iroha/tests/integration/extra_functional/multiple_blocks_created.rs index 0ba83b4d31a..f66da0e4425 100644 --- a/crates/iroha/tests/integration/extra_functional/multiple_blocks_created.rs +++ b/crates/iroha/tests/integration/extra_functional/multiple_blocks_created.rs @@ -6,9 +6,9 @@ use iroha::{ data_model::{parameter::BlockParameter, prelude::*}, }; use iroha_config::parameters::actual::Root as Config; +use iroha_test_network::*; use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; -use iroha_test_network::*; const N_BLOCKS: usize = 510; diff --git a/crates/iroha/tests/integration/extra_functional/normal.rs b/crates/iroha/tests/integration/extra_functional/normal.rs index 239b57c2eae..4185cd2c6fd 100644 --- a/crates/iroha/tests/integration/extra_functional/normal.rs +++ b/crates/iroha/tests/integration/extra_functional/normal.rs @@ -2,8 +2,8 @@ use iroha::{ client, data_model::{asset::AssetDefinitionId, parameter::BlockParameter, prelude::*}, }; -use nonzero_ext::nonzero; use iroha_test_network::*; +use nonzero_ext::nonzero; #[test] fn tranasctions_should_be_applied() { diff --git a/crates/iroha/tests/integration/extra_functional/offline_peers.rs b/crates/iroha/tests/integration/extra_functional/offline_peers.rs index ac831f036fa..cecd19ee96d 100644 --- a/crates/iroha/tests/integration/extra_functional/offline_peers.rs +++ b/crates/iroha/tests/integration/extra_functional/offline_peers.rs @@ -9,8 +9,8 @@ use iroha::{ }; use iroha_config::parameters::actual::Root as Config; use iroha_primitives::addr::socket_addr; -use iroha_test_samples::ALICE_ID; use iroha_test_network::*; +use iroha_test_samples::ALICE_ID; #[test] fn genesis_block_is_committed_with_some_offline_peers() -> Result<()> { diff --git a/crates/iroha/tests/integration/extra_functional/restart_peer.rs b/crates/iroha/tests/integration/extra_functional/restart_peer.rs index ee68d48a866..4b51e7c2d8d 100644 --- a/crates/iroha/tests/integration/extra_functional/restart_peer.rs +++ b/crates/iroha/tests/integration/extra_functional/restart_peer.rs @@ -6,9 +6,9 @@ use iroha::{ data_model::prelude::*, }; use iroha_config::parameters::actual::Root as Config; +use iroha_test_network::*; use iroha_test_samples::ALICE_ID; use rand::{seq::SliceRandom, thread_rng, Rng}; -use iroha_test_network::*; use tokio::runtime::Runtime; #[test] diff --git a/crates/iroha/tests/integration/extra_functional/unregister_peer.rs b/crates/iroha/tests/integration/extra_functional/unregister_peer.rs index 5f21bf8bb95..d5e485c7d45 100644 --- a/crates/iroha/tests/integration/extra_functional/unregister_peer.rs +++ b/crates/iroha/tests/integration/extra_functional/unregister_peer.rs @@ -6,9 +6,9 @@ use iroha::{ data_model::{parameter::BlockParameter, prelude::*}, }; use iroha_config::parameters::actual::Root as Config; +use iroha_test_network::*; use iroha_test_samples::gen_account_in; use nonzero_ext::nonzero; -use iroha_test_network::*; // Note the test is marked as `unstable`, not the network. #[ignore = "ignore, more in #2851"] diff --git a/crates/iroha/tests/integration/extra_functional/unstable_network.rs b/crates/iroha/tests/integration/extra_functional/unstable_network.rs index 577c2b95ab1..31dc816084a 100644 --- a/crates/iroha/tests/integration/extra_functional/unstable_network.rs +++ b/crates/iroha/tests/integration/extra_functional/unstable_network.rs @@ -8,10 +8,10 @@ use iroha::{ }, }; use iroha_config::parameters::actual::Root as Config; +use iroha_test_network::*; use iroha_test_samples::ALICE_ID; use nonzero_ext::nonzero; use rand::seq::SliceRandom; -use iroha_test_network::*; #[test] fn unstable_network_5_peers_1_fault() { diff --git a/crates/iroha/tests/integration/non_mintable.rs b/crates/iroha/tests/integration/non_mintable.rs index d128368dcc9..cd9954eefca 100644 --- a/crates/iroha/tests/integration/non_mintable.rs +++ b/crates/iroha/tests/integration/non_mintable.rs @@ -3,8 +3,8 @@ use iroha::{ client, data_model::{isi::InstructionBox, prelude::*}, }; -use iroha_test_samples::ALICE_ID; use iroha_test_network::*; +use iroha_test_samples::ALICE_ID; #[test] fn non_mintable_asset_can_be_minted_once_but_not_twice() -> Result<()> { diff --git a/crates/iroha/tests/integration/pagination.rs b/crates/iroha/tests/integration/pagination.rs index 0dac92b9425..97415ca55ed 100644 --- a/crates/iroha/tests/integration/pagination.rs +++ b/crates/iroha/tests/integration/pagination.rs @@ -3,8 +3,8 @@ use iroha::{ client::{asset, Client}, data_model::{asset::AssetDefinition, prelude::*}, }; -use nonzero_ext::nonzero; use iroha_test_network::*; +use nonzero_ext::nonzero; #[test] fn limits_should_work() -> Result<()> { diff --git a/crates/iroha/tests/integration/permissions.rs b/crates/iroha/tests/integration/permissions.rs index 7ed64d185a6..66c79041a0b 100644 --- a/crates/iroha/tests/integration/permissions.rs +++ b/crates/iroha/tests/integration/permissions.rs @@ -14,8 +14,8 @@ use iroha_executor_data_model::permission::{ domain::CanSetKeyValueInDomain, }; use iroha_genesis::GenesisBlock; -use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID}; use iroha_test_network::{PeerBuilder, *}; +use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID}; #[test] fn genesis_transactions_are_validated_by_executor() { diff --git a/crates/iroha/tests/integration/queries/account.rs b/crates/iroha/tests/integration/queries/account.rs index 554d2fd5893..83b63d17e05 100644 --- a/crates/iroha/tests/integration/queries/account.rs +++ b/crates/iroha/tests/integration/queries/account.rs @@ -2,8 +2,8 @@ use std::collections::HashSet; use eyre::Result; use iroha::{client, data_model::prelude::*}; -use iroha_test_samples::{gen_account_in, ALICE_ID}; use iroha_test_network::*; +use iroha_test_samples::{gen_account_in, ALICE_ID}; #[test] fn find_accounts_with_asset() -> Result<()> { diff --git a/crates/iroha/tests/integration/queries/role.rs b/crates/iroha/tests/integration/queries/role.rs index 3c83cf0859e..bd88e982302 100644 --- a/crates/iroha/tests/integration/queries/role.rs +++ b/crates/iroha/tests/integration/queries/role.rs @@ -6,8 +6,8 @@ use iroha::{ data_model::{prelude::*, query::builder::SingleQueryError}, }; use iroha_executor_data_model::permission::account::CanSetKeyValueInAccount; -use iroha_test_samples::ALICE_ID; use iroha_test_network::*; +use iroha_test_samples::ALICE_ID; fn create_role_ids() -> [RoleId; 5] { [ diff --git a/crates/iroha/tests/integration/roles.rs b/crates/iroha/tests/integration/roles.rs index a4010afe611..1430c8a6a4e 100644 --- a/crates/iroha/tests/integration/roles.rs +++ b/crates/iroha/tests/integration/roles.rs @@ -7,9 +7,9 @@ use iroha::{ use iroha_executor_data_model::permission::account::{ CanRemoveKeyValueInAccount, CanSetKeyValueInAccount, }; +use iroha_test_network::*; use iroha_test_samples::{gen_account_in, ALICE_ID}; use serde_json::json; -use iroha_test_network::*; #[test] fn register_empty_role() -> Result<()> { diff --git a/crates/iroha/tests/integration/status_response.rs b/crates/iroha/tests/integration/status_response.rs index 409f4a51146..5b59691cbf3 100644 --- a/crates/iroha/tests/integration/status_response.rs +++ b/crates/iroha/tests/integration/status_response.rs @@ -1,8 +1,8 @@ use eyre::Result; use iroha::{data_model::prelude::*, samples::get_status_json}; use iroha_telemetry::metrics::Status; -use iroha_test_samples::gen_account_in; use iroha_test_network::*; +use iroha_test_samples::gen_account_in; fn status_eq_excluding_uptime_and_queue(lhs: &Status, rhs: &Status) -> bool { lhs.peers == rhs.peers diff --git a/crates/iroha/tests/integration/transfer_asset.rs b/crates/iroha/tests/integration/transfer_asset.rs index 9afab134aa1..20ba04a331a 100644 --- a/crates/iroha/tests/integration/transfer_asset.rs +++ b/crates/iroha/tests/integration/transfer_asset.rs @@ -8,8 +8,8 @@ use iroha::{ Registered, }, }; -use iroha_test_samples::{gen_account_in, ALICE_ID}; use iroha_test_network::*; +use iroha_test_samples::{gen_account_in, ALICE_ID}; #[test] // This test suite is also covered at the UI level in the iroha_cli tests diff --git a/crates/iroha/tests/integration/transfer_domain.rs b/crates/iroha/tests/integration/transfer_domain.rs index bb1d6a22b25..4f006b20818 100644 --- a/crates/iroha/tests/integration/transfer_domain.rs +++ b/crates/iroha/tests/integration/transfer_domain.rs @@ -14,8 +14,8 @@ use iroha_executor_data_model::permission::{ }; use iroha_genesis::GenesisBlock; use iroha_primitives::json::JsonString; -use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID, SAMPLE_GENESIS_ACCOUNT_ID}; use iroha_test_network::{Peer as TestPeer, *}; +use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID, SAMPLE_GENESIS_ACCOUNT_ID}; use tokio::runtime::Runtime; #[test] diff --git a/crates/iroha/tests/integration/triggers/by_call_trigger.rs b/crates/iroha/tests/integration/triggers/by_call_trigger.rs index a4a337022d4..eb11b0c9b3f 100644 --- a/crates/iroha/tests/integration/triggers/by_call_trigger.rs +++ b/crates/iroha/tests/integration/triggers/by_call_trigger.rs @@ -15,8 +15,8 @@ use iroha_data_model::query::{builder::SingleQueryError, trigger::FindTriggers}; use iroha_executor_data_model::permission::trigger::CanRegisterUserTrigger; use iroha_genesis::GenesisBlock; use iroha_logger::info; -use iroha_test_samples::ALICE_ID; use iroha_test_network::{Peer as TestPeer, *}; +use iroha_test_samples::ALICE_ID; use tokio::runtime::Runtime; const TRIGGER_NAME: &str = "mint_rose"; diff --git a/crates/iroha/tests/integration/triggers/data_trigger.rs b/crates/iroha/tests/integration/triggers/data_trigger.rs index 78a7ab77f83..2970fe57f9b 100644 --- a/crates/iroha/tests/integration/triggers/data_trigger.rs +++ b/crates/iroha/tests/integration/triggers/data_trigger.rs @@ -1,7 +1,7 @@ use eyre::Result; use iroha::{client, data_model::prelude::*}; -use iroha_test_samples::{gen_account_in, ALICE_ID}; use iroha_test_network::*; +use iroha_test_samples::{gen_account_in, ALICE_ID}; #[test] fn must_execute_both_triggers() -> Result<()> { diff --git a/crates/iroha/tests/integration/triggers/event_trigger.rs b/crates/iroha/tests/integration/triggers/event_trigger.rs index b3f8af51416..b0e67f982bf 100644 --- a/crates/iroha/tests/integration/triggers/event_trigger.rs +++ b/crates/iroha/tests/integration/triggers/event_trigger.rs @@ -3,8 +3,8 @@ use iroha::{ client::{self, Client}, data_model::prelude::*, }; -use iroha_test_samples::ALICE_ID; use iroha_test_network::*; +use iroha_test_samples::ALICE_ID; #[test] fn test_mint_asset_when_new_asset_definition_created() -> Result<()> { diff --git a/crates/iroha/tests/integration/triggers/orphans.rs b/crates/iroha/tests/integration/triggers/orphans.rs index 6c53003f8f2..41dfc874f3d 100644 --- a/crates/iroha/tests/integration/triggers/orphans.rs +++ b/crates/iroha/tests/integration/triggers/orphans.rs @@ -1,7 +1,7 @@ use iroha::{client::Client, data_model::prelude::*}; use iroha_data_model::query::trigger::FindTriggers; -use iroha_test_samples::gen_account_in; use iroha_test_network::{wait_for_genesis_committed, Peer, PeerBuilder}; +use iroha_test_samples::gen_account_in; use tokio::runtime::Runtime; fn find_trigger(iroha: &Client, trigger_id: TriggerId) -> Option { diff --git a/crates/iroha/tests/integration/triggers/time_trigger.rs b/crates/iroha/tests/integration/triggers/time_trigger.rs index 155059aa442..d42fafb926a 100644 --- a/crates/iroha/tests/integration/triggers/time_trigger.rs +++ b/crates/iroha/tests/integration/triggers/time_trigger.rs @@ -13,8 +13,8 @@ use iroha::{ }, }; use iroha_logger::info; -use iroha_test_samples::{gen_account_in, ALICE_ID}; use iroha_test_network::*; +use iroha_test_samples::{gen_account_in, ALICE_ID}; /// Default estimation of consensus duration. pub fn default_consensus_estimation() -> Duration { diff --git a/crates/iroha/tests/integration/triggers/trigger_rollback.rs b/crates/iroha/tests/integration/triggers/trigger_rollback.rs index f91365812b8..33215299914 100644 --- a/crates/iroha/tests/integration/triggers/trigger_rollback.rs +++ b/crates/iroha/tests/integration/triggers/trigger_rollback.rs @@ -3,8 +3,8 @@ use iroha::{ client, data_model::{prelude::*, trigger::TriggerId}, }; -use iroha_test_samples::ALICE_ID; use iroha_test_network::*; +use iroha_test_samples::ALICE_ID; #[test] fn failed_trigger_revert() -> Result<()> { diff --git a/crates/iroha/tests/integration/tx_chain_id.rs b/crates/iroha/tests/integration/tx_chain_id.rs index 2875896de27..974211e668b 100644 --- a/crates/iroha/tests/integration/tx_chain_id.rs +++ b/crates/iroha/tests/integration/tx_chain_id.rs @@ -1,7 +1,7 @@ use iroha::data_model::prelude::*; use iroha_primitives::numeric::numeric; -use iroha_test_samples::gen_account_in; use iroha_test_network::*; +use iroha_test_samples::gen_account_in; #[test] fn send_tx_with_different_chain_id() { diff --git a/crates/iroha/tests/integration/tx_history.rs b/crates/iroha/tests/integration/tx_history.rs index 9dcda7e169d..1b20be0054f 100644 --- a/crates/iroha/tests/integration/tx_history.rs +++ b/crates/iroha/tests/integration/tx_history.rs @@ -6,9 +6,9 @@ use iroha::{ data_model::{prelude::*, query::parameters::Pagination}, }; use iroha_config::parameters::actual::Root as Config; +use iroha_test_network::*; use iroha_test_samples::ALICE_ID; use nonzero_ext::nonzero; -use iroha_test_network::*; #[ignore = "ignore, more in #2851"] #[test] diff --git a/crates/iroha/tests/integration/tx_rollback.rs b/crates/iroha/tests/integration/tx_rollback.rs index 32cb61c2d61..b69828974d4 100644 --- a/crates/iroha/tests/integration/tx_rollback.rs +++ b/crates/iroha/tests/integration/tx_rollback.rs @@ -1,7 +1,7 @@ use eyre::Result; use iroha::{client, data_model::prelude::*}; -use iroha_test_samples::ALICE_ID; use iroha_test_network::*; +use iroha_test_samples::ALICE_ID; #[test] fn client_sends_transaction_with_invalid_instruction_should_not_see_any_changes() -> Result<()> { diff --git a/crates/iroha/tests/integration/upgrade.rs b/crates/iroha/tests/integration/upgrade.rs index 6c8e49e5be4..a2309416cc0 100644 --- a/crates/iroha/tests/integration/upgrade.rs +++ b/crates/iroha/tests/integration/upgrade.rs @@ -12,9 +12,9 @@ use iroha::{ }; use iroha_executor_data_model::permission::{domain::CanUnregisterDomain, Permission as _}; use iroha_logger::info; +use iroha_test_network::*; use iroha_test_samples::{ALICE_ID, BOB_ID}; use nonzero_ext::nonzero; -use iroha_test_network::*; const ADMIN_PUBLIC_KEY_MULTIHASH: &str = "ed012076E5CA9698296AF9BE2CA45F525CB3BCFDEB7EE068BA56F973E9DD90564EF4FC"; @@ -95,7 +95,10 @@ fn executor_upgrade_should_run_migration() -> Result<()> { .is_ok_and(|permission| permission == can_unregister_domain) })); - upgrade_executor(&client, "../../wasm_samples/executor_with_custom_permission")?; + upgrade_executor( + &client, + "../../wasm_samples/executor_with_custom_permission", + )?; // Check that `CanUnregisterDomain` doesn't exist let data_model = client.query_single(FindExecutorDataModel)?; @@ -361,7 +364,11 @@ fn migration_should_cause_upgrade_event() { } }); - upgrade_executor(&client, "../../wasm_samples/executor_with_custom_permission").unwrap(); + upgrade_executor( + &client, + "../../wasm_samples/executor_with_custom_permission", + ) + .unwrap(); rt.block_on(async { tokio::time::timeout(core::time::Duration::from_secs(60), task) diff --git a/crates/iroha_core/benches/blocks/common.rs b/crates/iroha_core/benches/blocks/common.rs index 62b351fbfc7..d7d3959e7e1 100644 --- a/crates/iroha_core/benches/blocks/common.rs +++ b/crates/iroha_core/benches/blocks/common.rs @@ -207,8 +207,8 @@ pub fn build_state(rt: &tokio::runtime::Handle, account_id: &AccountId) -> State state_block.world.parameters.executor.memory = NonZeroU64::MAX; let mut state_transaction = state_block.transaction(); - let path_to_executor = - std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../defaults/executor.wasm"); + let path_to_executor = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("../../defaults/executor.wasm"); let wasm = std::fs::read(&path_to_executor) .unwrap_or_else(|_| panic!("Failed to read file: {}", path_to_executor.display())); let executor = Executor::new(WasmSmartContract::from_compiled(wasm)); diff --git a/crates/iroha_core/benches/validation.rs b/crates/iroha_core/benches/validation.rs index c6472e4d8fc..56999a2c20f 100644 --- a/crates/iroha_core/benches/validation.rs +++ b/crates/iroha_core/benches/validation.rs @@ -51,8 +51,8 @@ fn build_test_and_transient_state() -> State { { let mut state_block = state.block(); let mut state_transaction = state_block.transaction(); - let path_to_executor = - std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../defaults/executor.wasm"); + let path_to_executor = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("../../defaults/executor.wasm"); let wasm = std::fs::read(&path_to_executor) .unwrap_or_else(|_| panic!("Failed to read file: {}", path_to_executor.display())); let executor = Executor::new(WasmSmartContract::from_compiled(wasm)); diff --git a/pytests/iroha_torii_tests/test/api_version/__init__.py b/pytests/iroha_torii_tests/test/api_version/__init__.py index 8b137891791..e69de29bb2d 100644 --- a/pytests/iroha_torii_tests/test/api_version/__init__.py +++ b/pytests/iroha_torii_tests/test/api_version/__init__.py @@ -1 +0,0 @@ - From 6246d649e5bc368446f667b0bea914be1c791cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 20 Aug 2024 10:43:36 +0400 Subject: [PATCH 55/59] fix: update wasm test related paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- .github/workflows/iroha2-dev-pr-wasm.yaml | 4 ++-- crates/iroha_smart_contract/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/iroha2-dev-pr-wasm.yaml b/.github/workflows/iroha2-dev-pr-wasm.yaml index 39f94eb6083..eadeee1597f 100644 --- a/.github/workflows/iroha2-dev-pr-wasm.yaml +++ b/.github/workflows/iroha2-dev-pr-wasm.yaml @@ -64,7 +64,7 @@ jobs: name: executor.wasm path: ${{ env.DOCKER_COMPOSE_PATH }} - name: Install iroha_wasm_test_runner - run: cargo install --path iroha_wasm_test_runner + run: cargo install --path crates/iroha_wasm_test_runner - name: Run smart contract tests on WebAssembly VM - working-directory: iroha_smart_contract + working-directory: crates/iroha_smart_contract run: mold --run cargo test -p iroha_smart_contract -p iroha_smart_contract_utils --release --tests --target wasm32-unknown-unknown --no-fail-fast --quiet diff --git a/crates/iroha_smart_contract/README.md b/crates/iroha_smart_contract/README.md index 514b314d77c..827c53fe526 100644 --- a/crates/iroha_smart_contract/README.md +++ b/crates/iroha_smart_contract/README.md @@ -11,7 +11,7 @@ Check the [WASM section of our tutorial](https://hyperledger.github.io/iroha-2-d To be able to run tests compiled for `wasm32-unknown-unknown` target install `iroha_wasm_test_runner` from the root of the Iroha repository: ```bash -cargo install --path iroha_wasm_test_runner +cargo install --path crates/iroha_wasm_test_runner ``` Then run tests: From 7c9f72637163d3901e8af673f061edfdd740190e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 20 Aug 2024 12:23:41 +0400 Subject: [PATCH 56/59] fix(pytests): use relative imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- pytests/iroha_cli_tests/README.md | 6 +++--- pytests/iroha_cli_tests/common/helpers.py | 2 +- pytests/iroha_cli_tests/common/settings.py | 5 +++-- pytests/iroha_cli_tests/src/iroha_cli/__init__.py | 8 ++++---- pytests/iroha_cli_tests/src/iroha_cli/have.py | 2 +- pytests/iroha_cli_tests/src/iroha_cli/iroha.py | 2 +- pytests/iroha_cli_tests/src/iroha_cli/iroha_cli.py | 6 +++--- pytests/iroha_cli_tests/test/accounts/conftest.py | 2 +- .../test/accounts/test_accounts_query_filters.py | 2 +- .../test/accounts/test_register_accounts.py | 4 ++-- pytests/iroha_cli_tests/test/assets/conftest.py | 2 +- .../test/assets/test_assets_query_filters.py | 2 +- .../iroha_cli_tests/test/assets/test_burn_assets.py | 2 +- .../iroha_cli_tests/test/assets/test_mint_assets.py | 2 +- .../test/assets/test_register_asset_definitions.py | 4 ++-- .../test/assets/test_transfer_assets.py | 4 ++-- .../test/assets/test_unregister_asset.py | 2 +- pytests/iroha_cli_tests/test/atomicity/conftest.py | 2 +- pytests/iroha_cli_tests/test/conftest.py | 10 +++++----- pytests/iroha_cli_tests/test/domains/conftest.py | 2 +- .../test/domains/test_domains_query_filters.py | 2 +- .../test/domains/test_register_domains.py | 4 ++-- .../test/domains/test_transfer_domains.py | 2 +- pytests/iroha_cli_tests/test/triggers/conftest.py | 2 +- .../test/triggers/test_register_trigger.py | 2 +- pytests/iroha_torii_tests/test/api_version/conftest.py | 4 ++-- .../test/api_version/test_api_version.py | 2 +- .../iroha_torii_tests/test/configuration/conftest.py | 2 +- .../test/configuration/test_get_configuration.py | 2 +- .../test/configuration/test_post_configuration.py | 2 +- pytests/iroha_torii_tests/test/general/conftest.py | 2 +- .../test/general/test_200_status_codes.py | 2 +- .../test/general/test_400_status_codes.py | 2 +- pytests/iroha_torii_tests/test/health/conftest.py | 4 ++-- pytests/iroha_torii_tests/test/health/test_health.py | 2 +- pytests/iroha_torii_tests/test/schema/conftest.py | 2 +- pytests/iroha_torii_tests/test/schema/test_schema.py | 2 +- pytests/iroha_torii_tests/test/status/conftest.py | 2 +- pytests/iroha_torii_tests/test/status/test_status.py | 2 +- 39 files changed, 58 insertions(+), 57 deletions(-) diff --git a/pytests/iroha_cli_tests/README.md b/pytests/iroha_cli_tests/README.md index 52c92e1d3aa..15630ad02ea 100644 --- a/pytests/iroha_cli_tests/README.md +++ b/pytests/iroha_cli_tests/README.md @@ -63,7 +63,7 @@ The test model has the following structure: 2. Install and configure [Poetry](https://python-poetry.org/).\ For details, see [Poetry Configuration](#poetry-configuration) below. -3. Configure the tests by creating the following `.env` file in _this_ (`/pytests/iroha_cli/`) directory: +3. Configure the tests by creating the following `.env` file in _this_ (`/pytests/iroha_cli_tests/`) directory: ```shell IROHA_CLI_BINARY=/path/to/iroha_cli @@ -129,7 +129,7 @@ This test framework uses [Poetry](https://python-poetry.org/) for dependency man To get started with Poetry, follow these steps: 1. Install Poetry by following the [official installation guide](https://python-poetry.org/docs/#installation). -2. Navigate to the `iroha_cli/pytests` directory in your terminal. +2. Navigate to the `pytests/iroha_cli_tests` directory in your terminal. 3. Install the dependencies and set up a virtual environment using Poetry: ```bash @@ -152,7 +152,7 @@ exit ### Tests Configuration -Tests are configured via environment variables. These variables can be optionally defined in a `.env` file that must be created in _this_ (`/pytests/iroha_cli/`) directory. +Tests are configured via environment variables. These variables can be optionally defined in a `.env` file that must be created in _this_ (`/pytests/iroha_cli_tests/`) directory. The variables: diff --git a/pytests/iroha_cli_tests/common/helpers.py b/pytests/iroha_cli_tests/common/helpers.py index aa55466ec9c..3e7dd128367 100644 --- a/pytests/iroha_cli_tests/common/helpers.py +++ b/pytests/iroha_cli_tests/common/helpers.py @@ -12,7 +12,7 @@ from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey -from common.consts import ReservedChars, fake +from .consts import ReservedChars, fake def extract_hash(stdout): diff --git a/pytests/iroha_cli_tests/common/settings.py b/pytests/iroha_cli_tests/common/settings.py index 176344b6dc9..d9fd63c2663 100644 --- a/pytests/iroha_cli_tests/common/settings.py +++ b/pytests/iroha_cli_tests/common/settings.py @@ -9,8 +9,9 @@ load_dotenv() -BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - +BASE_DIR = os.path.dirname( + os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +) ROOT_DIR = os.environ.get("IROHA_CLI_DIR", BASE_DIR) PATH_CONFIG_IROHA_CLI = os.environ["IROHA_CLI_CONFIG"] diff --git a/pytests/iroha_cli_tests/src/iroha_cli/__init__.py b/pytests/iroha_cli_tests/src/iroha_cli/__init__.py index 79ead1cf183..4442645214b 100644 --- a/pytests/iroha_cli_tests/src/iroha_cli/__init__.py +++ b/pytests/iroha_cli_tests/src/iroha_cli/__init__.py @@ -2,10 +2,10 @@ This module initializes the Iroha client and configuration using environment variables. """ -from common.settings import PATH_CONFIG_IROHA_CLI, PORT_MAX, PORT_MIN -from src.iroha_cli.iroha_cli import IrohaCli -from src.iroha_cli.configuration import Config -from src.iroha_cli.iroha import Iroha +from ...common.settings import PATH_CONFIG_IROHA_CLI, PORT_MAX, PORT_MIN +from .iroha_cli import IrohaCli +from .configuration import Config +from .iroha import Iroha config = Config(PORT_MIN, PORT_MAX) config.load(PATH_CONFIG_IROHA_CLI) diff --git a/pytests/iroha_cli_tests/src/iroha_cli/have.py b/pytests/iroha_cli_tests/src/iroha_cli/have.py index 8d91f07526b..b27a25419b8 100644 --- a/pytests/iroha_cli_tests/src/iroha_cli/have.py +++ b/pytests/iroha_cli_tests/src/iroha_cli/have.py @@ -6,7 +6,7 @@ import allure # type: ignore -from src.iroha_cli import iroha_cli, iroha, match +from . import iroha_cli, iroha, match def expected_in_actual(expected, actual) -> bool: diff --git a/pytests/iroha_cli_tests/src/iroha_cli/iroha.py b/pytests/iroha_cli_tests/src/iroha_cli/iroha.py index a0eaf3801d2..f91414e7d9a 100644 --- a/pytests/iroha_cli_tests/src/iroha_cli/iroha.py +++ b/pytests/iroha_cli_tests/src/iroha_cli/iroha.py @@ -5,7 +5,7 @@ import json from typing import Dict, List -from src.iroha_cli.iroha_cli import IrohaCli +from .iroha_cli import IrohaCli class Iroha(IrohaCli): diff --git a/pytests/iroha_cli_tests/src/iroha_cli/iroha_cli.py b/pytests/iroha_cli_tests/src/iroha_cli/iroha_cli.py index 364ba75865c..05490376866 100644 --- a/pytests/iroha_cli_tests/src/iroha_cli/iroha_cli.py +++ b/pytests/iroha_cli_tests/src/iroha_cli/iroha_cli.py @@ -11,9 +11,9 @@ import allure # type: ignore -from common.helpers import extract_hash, read_isi_from_json, write_isi_to_json -from common.settings import BASE_DIR, IROHA_CLI_PATH, PATH_CONFIG_IROHA_CLI, ROOT_DIR -from src.iroha_cli.configuration import Config +from ...common.helpers import extract_hash, read_isi_from_json, write_isi_to_json +from ...common.settings import BASE_DIR, IROHA_CLI_PATH, PATH_CONFIG_IROHA_CLI, ROOT_DIR +from .configuration import Config class IrohaCli: diff --git a/pytests/iroha_cli_tests/test/accounts/conftest.py b/pytests/iroha_cli_tests/test/accounts/conftest.py index f92932bfcb9..c724df8213c 100644 --- a/pytests/iroha_cli_tests/test/accounts/conftest.py +++ b/pytests/iroha_cli_tests/test/accounts/conftest.py @@ -1,4 +1,4 @@ -from test import ( +from .. import ( GIVEN_129_length_name, GIVEN_fake_name, GIVEN_key_with_invalid_character_in_key, diff --git a/pytests/iroha_cli_tests/test/accounts/test_accounts_query_filters.py b/pytests/iroha_cli_tests/test/accounts/test_accounts_query_filters.py index 0972416ef88..fa14dff4918 100644 --- a/pytests/iroha_cli_tests/test/accounts/test_accounts_query_filters.py +++ b/pytests/iroha_cli_tests/test/accounts/test_accounts_query_filters.py @@ -2,7 +2,7 @@ import allure # type: ignore -from src.iroha_cli import iroha_cli, iroha +from ...src.iroha_cli import iroha_cli, iroha # using existing account to have at least one account in response diff --git a/pytests/iroha_cli_tests/test/accounts/test_register_accounts.py b/pytests/iroha_cli_tests/test/accounts/test_register_accounts.py index 1d70dd7d0fd..9ca3f7e72f2 100644 --- a/pytests/iroha_cli_tests/test/accounts/test_register_accounts.py +++ b/pytests/iroha_cli_tests/test/accounts/test_register_accounts.py @@ -1,8 +1,8 @@ import allure # type: ignore import pytest -from common.consts import Stderr -from src.iroha_cli import iroha_cli, have, iroha +from ...common.consts import Stderr +from ...src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_cli_tests/test/assets/conftest.py b/pytests/iroha_cli_tests/test/assets/conftest.py index 5bc69f5b2fc..d600d4b608f 100644 --- a/pytests/iroha_cli_tests/test/assets/conftest.py +++ b/pytests/iroha_cli_tests/test/assets/conftest.py @@ -1,4 +1,4 @@ -from test import ( +from .. import ( GIVEN_129_length_name, GIVEN_currently_account_quantity_with_two_quantity_of_asset, GIVEN_currently_authorized_account, diff --git a/pytests/iroha_cli_tests/test/assets/test_assets_query_filters.py b/pytests/iroha_cli_tests/test/assets/test_assets_query_filters.py index b2623f2e76e..8f6dc5ecd0d 100644 --- a/pytests/iroha_cli_tests/test/assets/test_assets_query_filters.py +++ b/pytests/iroha_cli_tests/test/assets/test_assets_query_filters.py @@ -2,7 +2,7 @@ import allure # type: ignore -from src.iroha_cli import iroha_cli, iroha +from ...src.iroha_cli import iroha_cli, iroha # using existing account with asset to have at least one in response diff --git a/pytests/iroha_cli_tests/test/assets/test_burn_assets.py b/pytests/iroha_cli_tests/test/assets/test_burn_assets.py index 57f09d1424a..d94b77fad0f 100644 --- a/pytests/iroha_cli_tests/test/assets/test_burn_assets.py +++ b/pytests/iroha_cli_tests/test/assets/test_burn_assets.py @@ -1,7 +1,7 @@ import allure # type: ignore import pytest -from src.iroha_cli import iroha_cli, have, iroha +from ...src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_cli_tests/test/assets/test_mint_assets.py b/pytests/iroha_cli_tests/test/assets/test_mint_assets.py index 79c355337ab..a7baf443beb 100644 --- a/pytests/iroha_cli_tests/test/assets/test_mint_assets.py +++ b/pytests/iroha_cli_tests/test/assets/test_mint_assets.py @@ -1,7 +1,7 @@ import allure # type: ignore import pytest -from src.iroha_cli import iroha_cli, have, iroha +from ...src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_cli_tests/test/assets/test_register_asset_definitions.py b/pytests/iroha_cli_tests/test/assets/test_register_asset_definitions.py index cf8bbb9c751..4b30c3093ae 100644 --- a/pytests/iroha_cli_tests/test/assets/test_register_asset_definitions.py +++ b/pytests/iroha_cli_tests/test/assets/test_register_asset_definitions.py @@ -1,8 +1,8 @@ import allure # type: ignore import pytest -from common.consts import Stderr -from src.iroha_cli import iroha_cli, have, iroha +from ...common.consts import Stderr +from ...src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_cli_tests/test/assets/test_transfer_assets.py b/pytests/iroha_cli_tests/test/assets/test_transfer_assets.py index 032646fbe33..f6b1b4ac597 100644 --- a/pytests/iroha_cli_tests/test/assets/test_transfer_assets.py +++ b/pytests/iroha_cli_tests/test/assets/test_transfer_assets.py @@ -1,8 +1,8 @@ import allure # type: ignore import pytest -from common.consts import Stderr -from src.iroha_cli import iroha_cli, have, iroha +from ...common.consts import Stderr +from ...src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_cli_tests/test/assets/test_unregister_asset.py b/pytests/iroha_cli_tests/test/assets/test_unregister_asset.py index f3c92389f7b..7b376d7f4f9 100644 --- a/pytests/iroha_cli_tests/test/assets/test_unregister_asset.py +++ b/pytests/iroha_cli_tests/test/assets/test_unregister_asset.py @@ -1,7 +1,7 @@ import allure # type: ignore import pytest -from src.iroha_cli import iroha_cli, have, iroha +from ...src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_cli_tests/test/atomicity/conftest.py b/pytests/iroha_cli_tests/test/atomicity/conftest.py index dfd54995483..bc9844064f6 100644 --- a/pytests/iroha_cli_tests/test/atomicity/conftest.py +++ b/pytests/iroha_cli_tests/test/atomicity/conftest.py @@ -1,4 +1,4 @@ -from test import before_all, before_each +from .. import before_all, before_each import allure # type: ignore import pytest diff --git a/pytests/iroha_cli_tests/test/conftest.py b/pytests/iroha_cli_tests/test/conftest.py index 6de905a7793..95267fd106a 100644 --- a/pytests/iroha_cli_tests/test/conftest.py +++ b/pytests/iroha_cli_tests/test/conftest.py @@ -6,8 +6,8 @@ import allure # type: ignore import pytest -from common.consts import ValueTypes -from common.helpers import ( +from ..common.consts import ValueTypes +from ..common.helpers import ( fake_asset_name, fake_name, generate_public_key, @@ -20,9 +20,9 @@ random, string, ) -from common.settings import PEERS_CONFIGS_PATH -from models import Account, Asset, AssetDefinition, Domain -from src.iroha_cli import iroha_cli, config +from ..common.settings import PEERS_CONFIGS_PATH +from ..models import Account, Asset, AssetDefinition, Domain +from ..src.iroha_cli import iroha_cli, config # General fixtures diff --git a/pytests/iroha_cli_tests/test/domains/conftest.py b/pytests/iroha_cli_tests/test/domains/conftest.py index 0e887961c09..0edc4ac3e6f 100644 --- a/pytests/iroha_cli_tests/test/domains/conftest.py +++ b/pytests/iroha_cli_tests/test/domains/conftest.py @@ -1,4 +1,4 @@ -from test import ( +from .. import ( GIVEN_128_length_name, GIVEN_129_length_name, GIVEN_currently_authorized_account, diff --git a/pytests/iroha_cli_tests/test/domains/test_domains_query_filters.py b/pytests/iroha_cli_tests/test/domains/test_domains_query_filters.py index 6e910aeb349..4c365012825 100644 --- a/pytests/iroha_cli_tests/test/domains/test_domains_query_filters.py +++ b/pytests/iroha_cli_tests/test/domains/test_domains_query_filters.py @@ -2,7 +2,7 @@ import allure # type: ignore -from src.iroha_cli import iroha_cli, iroha +from ...src.iroha_cli import iroha_cli, iroha def test_filter_by_domain(GIVEN_registered_domain): diff --git a/pytests/iroha_cli_tests/test/domains/test_register_domains.py b/pytests/iroha_cli_tests/test/domains/test_register_domains.py index 1d5ba64af23..b589188de8b 100644 --- a/pytests/iroha_cli_tests/test/domains/test_register_domains.py +++ b/pytests/iroha_cli_tests/test/domains/test_register_domains.py @@ -1,8 +1,8 @@ import allure # type: ignore import pytest -from common.consts import Stderr -from src.iroha_cli import iroha_cli, have, iroha +from ...common.consts import Stderr +from ...src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_cli_tests/test/domains/test_transfer_domains.py b/pytests/iroha_cli_tests/test/domains/test_transfer_domains.py index a2449e3210f..9e4a6791b83 100644 --- a/pytests/iroha_cli_tests/test/domains/test_transfer_domains.py +++ b/pytests/iroha_cli_tests/test/domains/test_transfer_domains.py @@ -1,7 +1,7 @@ import allure # type: ignore import pytest -from src.iroha_cli import iroha_cli, have, iroha +from ...src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_cli_tests/test/triggers/conftest.py b/pytests/iroha_cli_tests/test/triggers/conftest.py index be5e82bd37e..912ce49bce2 100644 --- a/pytests/iroha_cli_tests/test/triggers/conftest.py +++ b/pytests/iroha_cli_tests/test/triggers/conftest.py @@ -1,4 +1,4 @@ -from test import GIVEN_currently_authorized_account +from .. import GIVEN_currently_authorized_account import allure # type: ignore import pytest diff --git a/pytests/iroha_cli_tests/test/triggers/test_register_trigger.py b/pytests/iroha_cli_tests/test/triggers/test_register_trigger.py index b428399c303..05a88c6e9f1 100644 --- a/pytests/iroha_cli_tests/test/triggers/test_register_trigger.py +++ b/pytests/iroha_cli_tests/test/triggers/test_register_trigger.py @@ -1,7 +1,7 @@ import allure # type: ignore import pytest -from src.iroha_cli import iroha_cli, have, iroha +from ...src.iroha_cli import iroha_cli, have, iroha @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_torii_tests/test/api_version/conftest.py b/pytests/iroha_torii_tests/test/api_version/conftest.py index 26895d3c099..c67d080f3e5 100644 --- a/pytests/iroha_torii_tests/test/api_version/conftest.py +++ b/pytests/iroha_torii_tests/test/api_version/conftest.py @@ -1,11 +1,11 @@ -from test import GIVEN_api_up_and_running +from .. import GIVEN_api_up_and_running import allure import pytest import requests -from common.settings import BASE_URL +from ...common.settings import BASE_URL @pytest.fixture(scope="module") diff --git a/pytests/iroha_torii_tests/test/api_version/test_api_version.py b/pytests/iroha_torii_tests/test/api_version/test_api_version.py index c21c6b2e957..fc9c3d66ce8 100644 --- a/pytests/iroha_torii_tests/test/api_version/test_api_version.py +++ b/pytests/iroha_torii_tests/test/api_version/test_api_version.py @@ -5,7 +5,7 @@ import pytest import allure -from common.settings import BASE_URL +from ...common.settings import BASE_URL @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_torii_tests/test/configuration/conftest.py b/pytests/iroha_torii_tests/test/configuration/conftest.py index ac976c6b325..a1f5d820579 100644 --- a/pytests/iroha_torii_tests/test/configuration/conftest.py +++ b/pytests/iroha_torii_tests/test/configuration/conftest.py @@ -3,7 +3,7 @@ import requests -from common.settings import BASE_URL +from ...common.settings import BASE_URL @pytest.fixture(scope="module") diff --git a/pytests/iroha_torii_tests/test/configuration/test_get_configuration.py b/pytests/iroha_torii_tests/test/configuration/test_get_configuration.py index 9e4eaef2fca..422f6800452 100644 --- a/pytests/iroha_torii_tests/test/configuration/test_get_configuration.py +++ b/pytests/iroha_torii_tests/test/configuration/test_get_configuration.py @@ -8,7 +8,7 @@ from jsonschema import validate from jsonschema.exceptions import ValidationError -from common.settings import BASE_URL +from ...common.settings import BASE_URL valid_log_levels = ["trace", "debug", "info", "warn", "error"] diff --git a/pytests/iroha_torii_tests/test/configuration/test_post_configuration.py b/pytests/iroha_torii_tests/test/configuration/test_post_configuration.py index 06f917d05df..1b235bbd4fc 100644 --- a/pytests/iroha_torii_tests/test/configuration/test_post_configuration.py +++ b/pytests/iroha_torii_tests/test/configuration/test_post_configuration.py @@ -5,7 +5,7 @@ from jsonschema import validate from jsonschema.exceptions import ValidationError -from common.settings import BASE_URL +from ...common.settings import BASE_URL valid_log_levels = ["trace", "debug", "info", "warn", "error"] diff --git a/pytests/iroha_torii_tests/test/general/conftest.py b/pytests/iroha_torii_tests/test/general/conftest.py index b20dcc25f4f..2b7de243d04 100644 --- a/pytests/iroha_torii_tests/test/general/conftest.py +++ b/pytests/iroha_torii_tests/test/general/conftest.py @@ -1 +1 @@ -from test import GIVEN_api_up_and_running +from .. import GIVEN_api_up_and_running diff --git a/pytests/iroha_torii_tests/test/general/test_200_status_codes.py b/pytests/iroha_torii_tests/test/general/test_200_status_codes.py index 2b5db7c0d2a..0b8d294f157 100644 --- a/pytests/iroha_torii_tests/test/general/test_200_status_codes.py +++ b/pytests/iroha_torii_tests/test/general/test_200_status_codes.py @@ -3,7 +3,7 @@ import requests import json -from common.settings import BASE_URL +from ...common.settings import BASE_URL @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_torii_tests/test/general/test_400_status_codes.py b/pytests/iroha_torii_tests/test/general/test_400_status_codes.py index 7fa72b4cbe1..5e2e4ef6f80 100644 --- a/pytests/iroha_torii_tests/test/general/test_400_status_codes.py +++ b/pytests/iroha_torii_tests/test/general/test_400_status_codes.py @@ -2,7 +2,7 @@ import pytest import requests -from common.settings import BASE_URL +from ...common.settings import BASE_URL @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_torii_tests/test/health/conftest.py b/pytests/iroha_torii_tests/test/health/conftest.py index ea4fe940154..44df4f13e4a 100644 --- a/pytests/iroha_torii_tests/test/health/conftest.py +++ b/pytests/iroha_torii_tests/test/health/conftest.py @@ -1,11 +1,11 @@ -from test import GIVEN_api_up_and_running +from .. import GIVEN_api_up_and_running import allure import pytest import requests -from common.settings import BASE_URL +from ...common.settings import BASE_URL @pytest.fixture(scope="module") diff --git a/pytests/iroha_torii_tests/test/health/test_health.py b/pytests/iroha_torii_tests/test/health/test_health.py index 587de8452e3..2e6b0d625b9 100644 --- a/pytests/iroha_torii_tests/test/health/test_health.py +++ b/pytests/iroha_torii_tests/test/health/test_health.py @@ -4,7 +4,7 @@ import pytest import allure -from common.settings import BASE_URL +from ...common.settings import BASE_URL @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_torii_tests/test/schema/conftest.py b/pytests/iroha_torii_tests/test/schema/conftest.py index 27a82e6b434..1b474f7fb47 100644 --- a/pytests/iroha_torii_tests/test/schema/conftest.py +++ b/pytests/iroha_torii_tests/test/schema/conftest.py @@ -3,7 +3,7 @@ import requests -from common.settings import BASE_URL +from ...common.settings import BASE_URL @pytest.fixture(scope="module") diff --git a/pytests/iroha_torii_tests/test/schema/test_schema.py b/pytests/iroha_torii_tests/test/schema/test_schema.py index e737a47060c..8fe587dcdbd 100644 --- a/pytests/iroha_torii_tests/test/schema/test_schema.py +++ b/pytests/iroha_torii_tests/test/schema/test_schema.py @@ -8,7 +8,7 @@ from jsonschema import validate from jsonschema.exceptions import ValidationError -from common.settings import BASE_URL +from ...common.settings import BASE_URL @pytest.fixture(scope="function", autouse=True) diff --git a/pytests/iroha_torii_tests/test/status/conftest.py b/pytests/iroha_torii_tests/test/status/conftest.py index b477261e064..b76378bec06 100644 --- a/pytests/iroha_torii_tests/test/status/conftest.py +++ b/pytests/iroha_torii_tests/test/status/conftest.py @@ -3,7 +3,7 @@ import requests -from common.settings import BASE_URL +from ...common.settings import BASE_URL @pytest.fixture(scope="module") diff --git a/pytests/iroha_torii_tests/test/status/test_status.py b/pytests/iroha_torii_tests/test/status/test_status.py index b6ec8182a99..05021070f23 100644 --- a/pytests/iroha_torii_tests/test/status/test_status.py +++ b/pytests/iroha_torii_tests/test/status/test_status.py @@ -8,7 +8,7 @@ from jsonschema import validate from jsonschema.exceptions import ValidationError -from common.settings import BASE_URL +from ...common.settings import BASE_URL @pytest.fixture(scope="function", autouse=True) From 1ddb043fcf92b42ed5ae1042d9d3049dfadff6a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Mon, 9 Sep 2024 12:43:54 +0400 Subject: [PATCH 57/59] fix: use correct defaults directory in `kura_not_miss_replace_block` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- crates/iroha_core/src/kura.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/iroha_core/src/kura.rs b/crates/iroha_core/src/kura.rs index dc94683b779..052df481102 100644 --- a/crates/iroha_core/src/kura.rs +++ b/crates/iroha_core/src/kura.rs @@ -1072,7 +1072,7 @@ mod tests { ); let executor = { - let executor_blob = std::fs::read("../defaults/executor.wasm").unwrap(); + let executor_blob = std::fs::read("../../defaults/executor.wasm").unwrap(); Executor::new(WasmSmartContract::from_compiled(executor_blob)) }; let genesis = GenesisBuilder::default().build_and_sign( From c05feaab92e1a572f3faeb6f4b58965c7e7ccfc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 10 Sep 2024 11:29:30 +0400 Subject: [PATCH 58/59] build: update Cargo.lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- Cargo.lock | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 771a2786952..a3b2578a5cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3075,17 +3075,6 @@ dependencies = [ "wasmtime", ] -[[package]] -name = "iroha_core_wasm_codec_derive" -version = "2.0.0-rc.1.0" -dependencies = [ - "iroha_macro_utils", - "manyhow", - "proc-macro2", - "quote", - "syn 2.0.75", -] - [[package]] name = "iroha_crypto" version = "2.0.0-rc.1.0" @@ -3299,6 +3288,7 @@ dependencies = [ "iroha_crypto", "iroha_data_model", "iroha_schema", + "iroha_test_samples", "parity-scale-codec", "serde", "serde_json", @@ -3584,6 +3574,7 @@ dependencies = [ "iroha_crypto", "iroha_data_model", "iroha_executor_data_model", + "iroha_futures", "iroha_genesis", "iroha_logger", "iroha_primitives", @@ -3604,9 +3595,8 @@ version = "2.0.0-rc.1.0" dependencies = [ "iroha_crypto", "iroha_data_model", - "once_cell", "serde", - "toml 0.8.16", + "toml", ] [[package]] @@ -3733,10 +3723,9 @@ version = "2.0.0-rc.1.0" dependencies = [ "iroha_macro_utils", "manyhow", - "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] From ab4c1dea208cf0c34c72fa88f9f9893bd24f321b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 10 Sep 2024 14:54:44 +0400 Subject: [PATCH 59/59] fix: imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nurzhan Sakén --- crates/iroha/tests/integration/events/pipeline.rs | 5 ++--- crates/iroha/tests/integration/multisig.rs | 1 + crates/iroha/tests/integration/queries/asset.rs | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/iroha/tests/integration/events/pipeline.rs b/crates/iroha/tests/integration/events/pipeline.rs index 47826a2dd1d..d8078b0d8b3 100644 --- a/crates/iroha/tests/integration/events/pipeline.rs +++ b/crates/iroha/tests/integration/events/pipeline.rs @@ -16,7 +16,6 @@ use iroha::{ }, }; use iroha_config::parameters::actual::Root as Config; -use nonzero_ext::nonzero; use iroha_test_network::*; use nonzero_ext::nonzero; @@ -33,7 +32,7 @@ fn transaction_with_no_instructions_should_be_committed() -> Result<()> { // #[ignore = "Experiment"] #[test] fn transaction_with_fail_instruction_should_be_rejected() -> Result<()> { - let unknown_domain_id = "dummy".parse::().unwrap(); + let unknown_domain_id = "dummy".parse::()?; let fail_isi = Unregister::domain(unknown_domain_id.clone()); test_with_instruction_and_status_and_port( @@ -53,7 +52,7 @@ fn test_with_instruction_and_status_and_port( port: u16, ) -> Result<()> { let (_rt, network, client) = - Network::start_test_with_runtime(PEER_COUNT.try_into().unwrap(), Some(port)); + Network::start_test_with_runtime(PEER_COUNT.try_into()?, Some(port)); let clients = network.clients(); wait_for_genesis_committed(&clients, 0); let pipeline_time = Config::pipeline_time(); diff --git a/crates/iroha/tests/integration/multisig.rs b/crates/iroha/tests/integration/multisig.rs index 3d6d3711c30..f1eba4fc63e 100644 --- a/crates/iroha/tests/integration/multisig.rs +++ b/crates/iroha/tests/integration/multisig.rs @@ -13,6 +13,7 @@ use iroha::{ }, }; use iroha_test_network::*; +use iroha_test_samples::{gen_account_in, ALICE_ID}; use nonzero_ext::nonzero; #[test] diff --git a/crates/iroha/tests/integration/queries/asset.rs b/crates/iroha/tests/integration/queries/asset.rs index 23a55aabc7b..b7f66833047 100644 --- a/crates/iroha/tests/integration/queries/asset.rs +++ b/crates/iroha/tests/integration/queries/asset.rs @@ -6,6 +6,7 @@ use iroha::{ }, }; use iroha_test_network::*; +use iroha_test_samples::{gen_account_in, ALICE_ID}; #[test] #[allow(clippy::too_many_lines)]