Skip to content

Commit

Permalink
feat: improve config debug-ability (#4456)
Browse files Browse the repository at this point in the history
* [refactor]: put new API into `iroha_config_base`

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

* [test]: move tests

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

* [feat]: create foundation for `ReadConfig` derive (wip)

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

* [fix]: parse `default` properly

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

* [feat]: impl shape analysis

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

* [test]: update stderr

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

* [fix]: fix macro, it kind of works!

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

* [refactor]: improve errors

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

* [refactor]: update `iroha_config` (wip)

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

* [refactor]: update user layer, mostly

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

* [refactor]: move `iroha_config` onto the new rails

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

* [refactor]: lints & chores

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

* [fix]: fix visibility issues in data model

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

* [fix]: after-rebase chores

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

* [refactor]: update `iroha_core`

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

* [refactor]: update the whole workspace

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

* [refactor]: lints

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

* [chore]: fix cfg

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

* [refactor]: balance trace logs

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

* [refactor]: move high-level validations to CLI layer

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

* [refactor]: change `custom` to `env_custom`

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

* [feat]: attach TOML value to report

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

* [feat]: enhance origin attachments

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

* [fix]: client cli... works?

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

* [refactor]: rehearse errors

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

* [refactor]: chores

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

* [fix]: compiler errors and lints

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

* [test]: fix tests, validate addrs only in `release`

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

* [refactor]: internal docs, renamings, lints

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

* [test]: fix private keys in test configs

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

* [fix]: allow self peer id in trusted peers

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

* [test]: update snapshot

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

* Apply suggestions from code review

Co-authored-by: ⭐️NINIKA⭐️ <[email protected]>
Signed-off-by: 0x009922 <[email protected]>

* [feat]: prefix macro error

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

* [docs]: add a note about syntactic match

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

* [refactor]: delegate parsing to `syn::punctuated`

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

* [refactor]: use mutable reader, split `ReadingDone`

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

* [refactor]: lints

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

* [chore]: link false-positive issue

rust-lang/rust#44752 (comment)
Signed-off-by: Dmitry Balashov <[email protected]>

* [refactor]: ignore report locations

address #4456 (comment)

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

* [fix]: use `ExposedPrivateKey`

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

* [fix]: fix with all-features

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

* [refactor]: chores

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

* [chore]: format

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

* refactor: use stricter `TrustedPeers` struct

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

* chore: remove extra TODO

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

* refactor: remove `env_custom`

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

* chore: remove extra import

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

* revert: return `pub(crate)` vis

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

* chore: dead import

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

* fix: fix path to `iroha_test_config.toml`

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

---------

Signed-off-by: Dmitry Balashov <[email protected]>
Signed-off-by: 0x009922 <[email protected]>
Co-authored-by: ⭐️NINIKA⭐️ <[email protected]>
  • Loading branch information
0x009922 and DCNick3 authored May 17, 2024
1 parent bf789ef commit 9d91c77
Show file tree
Hide file tree
Showing 81 changed files with 4,916 additions and 3,346 deletions.
845 changes: 350 additions & 495 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ iroha_data_model_derive = { version = "=2.0.0-pre-rc.21", path = "data_model/der
iroha_client = { version = "=2.0.0-pre-rc.21", path = "client" }
iroha_config = { version = "=2.0.0-pre-rc.21", path = "config" }
iroha_config_base = { version = "=2.0.0-pre-rc.21", path = "config/base" }
iroha_config_base_derive = { version = "=2.0.0-pre-rc.21", path = "config/base/derive" }
iroha_schema_gen = { version = "=2.0.0-pre-rc.21", path = "schema/gen" }
iroha_schema = { version = "=2.0.0-pre-rc.21", path = "schema", default-features = false }
iroha_schema_derive = { version = "=2.0.0-pre-rc.21", path = "schema/derive" }
Expand Down Expand Up @@ -96,11 +97,13 @@ spinoff = "0.8.0"

criterion = "0.5.1"
expect-test = "1.5.0"
assertables = "7"

eyre = "0.6.12"
color-eyre = "0.6.3"
thiserror = { version = "1.0.60", default-features = false }
displaydoc = { version = "0.2.4", default-features = false }
error-stack = "0.4.1"

cfg-if = "1.0.0"
derive_more = { version = "0.99.17", default-features = false }
Expand Down
7 changes: 4 additions & 3 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,25 @@ iroha_genesis = { workspace = true }
iroha_wasm_builder = { workspace = true }

clap = { workspace = true, features = ["derive", "env", "string"] }
color-eyre = { workspace = true }
eyre = { workspace = true }
error-stack = { workspace = true, features = ["eyre"] }
thiserror = { workspace = true }
tracing = { workspace = true }
tokio = { workspace = true, features = ["macros", "signal"] }
once_cell = { workspace = true }
owo-colors = { workspace = true, features = ["supports-colors"] }
supports-color = { workspace = true }
toml = { workspace = true }

thread-local-panic-hook = { version = "0.1.0", optional = true }

[dev-dependencies]
serial_test = "3.1.1"
tempfile = { workspace = true }
toml = { workspace = true }
json5 = { workspace = true }
futures = { workspace = true }
path-absolutize = { workspace = true }
assertables = "7"
assertables = { workspace = true }

[build-dependencies]
iroha_wasm_builder = { workspace = true }
Expand Down
Loading

0 comments on commit 9d91c77

Please sign in to comment.