Skip to content

Commit

Permalink
[refactor] #4323: telemetry features, tokio console, logs, and config…
Browse files Browse the repository at this point in the history
…uration (#4377)

* [chore] #4323: remove `iroha_config/tokio-console` feature

Signed-off-by: Dmitry Balashov <[email protected]>

* [chore]: format

Signed-off-by: Dmitry Balashov <[email protected]>

* [refactor]: re-arrange telemetry features

- remove `tokio_console_address` configuration
- leverage default ENVs for tokio console config
- `iroha_logger/tokio-console` feature fully controls
  whether it is enabled
- refactoring chores

Signed-off-by: Dmitry Balashov <[email protected]>

* [test]: fixes

Signed-off-by: Dmitry Balashov <[email protected]>

* [chore]: repair `Cargo.toml`

Signed-off-by: Dmitry Balashov <[email protected]>

* [chore]: repair `Cargo.toml` (how often should I?)

Signed-off-by: Dmitry Balashov <[email protected]>

* [refactor]: `[telemetry.dev]` to `[dev_telemetry]`

Signed-off-by: Dmitry Balashov <[email protected]>

* [build]: fix Iroha build with `--no-default-features`

Signed-off-by: Dmitry Balashov <[email protected]>

* [refactor]: move args tests to `lib.rs`

Signed-off-by: Dmitry Balashov <[email protected]>

* [feature]: add cargo features into `iroha --version`

Signed-off-by: Dmitry Balashov <[email protected]>

* [feature]: improve logging a bit

Signed-off-by: Dmitry Balashov <[email protected]>

* [feature]: `mkdir -r` for `dev_telemetry.out_file`

Signed-off-by: Dmitry Balashov <[email protected]>

* [feature]: improve validation of paths in config

Signed-off-by: Dmitry Balashov <[email protected]>

* [fix]: add `\n` separator to file telemetry logs

Signed-off-by: Dmitry Balashov <[email protected]>

* [chore]: update snapshot logs

Signed-off-by: Dmitry Balashov <[email protected]>

* [fix]: use `write_all` again

Signed-off-by: Dmitry Balashov <[email protected]>

* [fix]: disable `genesis.file` validation (#4383)

Signed-off-by: Dmitry Balashov <[email protected]>

* [test]: remove telemetry features from integration tests

Signed-off-by: Dmitry Balashov <[email protected]>

* [chore]: revert "WSV" logs

Signed-off-by: Dmitry Balashov <[email protected]>

---------

Signed-off-by: Dmitry Balashov <[email protected]>
  • Loading branch information
0x009922 authored Mar 26, 2024
1 parent 47f278d commit 0c49284
Show file tree
Hide file tree
Showing 21 changed files with 377 additions and 359 deletions.
103 changes: 47 additions & 56 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ categories = ["cryptography::cryptocurrencies"]

[workspace.dependencies]
iroha = { path = "cli" }
iroha_dsl = { version = "=2.0.0-pre-rc.20", path = "dsl" }
iroha_torii = { version = "=2.0.0-pre-rc.20", path = "torii" }
iroha_torii_derive = { version = "=2.0.0-pre-rc.20", path = "torii/derive" }
iroha_torii_const = { version = "=2.0.0-pre-rc.20", path = "torii/const" }
Expand Down Expand Up @@ -51,14 +50,10 @@ iroha_wasm_builder = { version = "=2.0.0-pre-rc.20", path = "wasm_builder" }
iroha_smart_contract = { version = "=2.0.0-pre-rc.20", path = "smart_contract" }
iroha_smart_contract_derive = { version = "=2.0.0-pre-rc.20", path = "smart_contract/derive" }
iroha_smart_contract_utils = { version = "=2.0.0-pre-rc.20", path = "smart_contract/utils" }
iroha_executor = { version = "=2.0.0-pre-rc.20", path = "smart_contract/executor" }
iroha_executor_derive = { version = "=2.0.0-pre-rc.20", path = "smart_contract/executor/derive" }
iroha_trigger = { version = "=2.0.0-pre-rc.20", path = "smart_contract/trigger" }
iroha_trigger_derive = { version = "=2.0.0-pre-rc.20", path = "smart_contract/trigger/derive" }

test_network = { version = "=2.0.0-pre-rc.20", path = "core/test_network" }

proc-macro-error = "1.0.4"
proc-macro2 = "1.0.69"
syn = { version = "2.0.38", default-features = false }
quote = "1.0.33"
Expand All @@ -71,8 +66,6 @@ tokio = "1.33.0"
tokio-stream = "0.1.14"
tokio-tungstenite = "0.20.1"
tungstenite = "0.20.1"

crossbeam = "0.8.2"
crossbeam-queue = "0.3.8"
parking_lot = { version = "0.12.1" }

Expand All @@ -98,10 +91,8 @@ owo-colors = "3.5.0"
supports-color = "2.1.0"
inquire = "0.6.2"
spinoff = "0.8.0"
duct = "0.13.6"

criterion = "0.5.1"
proptest = "1.3.1"
expect-test = "1.4.1"

eyre = "0.6.8"
Expand Down Expand Up @@ -204,53 +195,53 @@ clippy.wildcard_dependencies = "deny"
[workspace]
resolver = "2"
members = [
"cli",
"client",
"client_cli",
"config",
"config/base",
"core",
"core/test_network",
"crypto",
"data_model",
"genesis",
"primitives",
"primitives/derive",
"primitives/numeric",
"ffi",
"ffi/derive",
"futures",
"futures/derive",
"logger",
"macro",
"macro/derive",
"macro/utils",
"p2p",
"schema",
"schema/derive",
"schema/gen",
"smart_contract",
"smart_contract/derive",
"smart_contract/trigger",
"smart_contract/trigger/derive",
"smart_contract/utils",
"smart_contract/executor",
"smart_contract/executor/derive",
"telemetry",
"tools/kagami",
"tools/kura_inspector",
"tools/parity_scale_decoder",
"tools/swarm",
"tools/wasm_builder_cli",
"tools/wasm_test_runner",
"torii",
"torii/derive",
"torii/const",
"version",
"version/derive",
"wasm_codec",
"wasm_codec/derive",
"wasm_builder",
"cli",
"client",
"client_cli",
"config",
"config/base",
"core",
"core/test_network",
"crypto",
"data_model",
"genesis",
"primitives",
"primitives/derive",
"primitives/numeric",
"ffi",
"ffi/derive",
"futures",
"futures/derive",
"logger",
"macro",
"macro/derive",
"macro/utils",
"p2p",
"schema",
"schema/derive",
"schema/gen",
"smart_contract",
"smart_contract/derive",
"smart_contract/trigger",
"smart_contract/trigger/derive",
"smart_contract/utils",
"smart_contract/executor",
"smart_contract/executor/derive",
"telemetry",
"tools/kagami",
"tools/kura_inspector",
"tools/parity_scale_decoder",
"tools/swarm",
"tools/wasm_builder_cli",
"tools/wasm_test_runner",
"torii",
"torii/derive",
"torii/const",
"version",
"version/derive",
"wasm_codec",
"wasm_codec/derive",
"wasm_builder",
]

[profile.deploy]
Expand Down
10 changes: 6 additions & 4 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ default = ["telemetry", "schema-endpoint"]
telemetry = ["iroha_telemetry", "iroha_core/telemetry", "iroha_torii/telemetry"]
# Support developer-specific telemetry.
# Should not be enabled on production builds.
dev-telemetry = ["iroha_core/dev-telemetry", "iroha_telemetry"]
# Tokio Console is configured via ENV:
# https://docs.rs/console-subscriber/0.2.0/console_subscriber/struct.Builder.html#method.with_default_env
dev-telemetry = ["telemetry", "iroha_telemetry/dev-telemetry", "iroha_logger/tokio-console"]
# Support schema generation from the `schema` endpoint in the local binary.
# Useful for debugging issues with decoding in SDKs.
schema-endpoint = ["iroha_torii/schema"]
Expand Down Expand Up @@ -79,8 +81,8 @@ vergen = { workspace = true, features = ["cargo"] }

[package.metadata.cargo-all-features]
denylist = [
"schema-endpoint",
"telemetry",
"test-network",
"schema-endpoint",
"telemetry",
"test-network",
]
skip_optional_dependencies = true
Loading

0 comments on commit 0c49284

Please sign in to comment.