diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6e9e1e72b..536148d1c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ on: - "book/**" env: - RUST_LATEST_STABLE_VERSION: 1.71 + RUST_LATEST_STABLE_VERSION: 1.87.0 CARGO_TERM_COLOR: always RUSTFLAGS: -D warnings RUST_BACKTRACE: 1 @@ -123,7 +123,7 @@ jobs: with: name: choco_logs path: C:\ProgramData\chocolatey\logs\* - + - name: Set PostgreSQL env variables working-directory: "C:\\${{ github.event.repository.name }}" shell: powershell diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0663ba2148..71f867302c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,7 +20,7 @@ on: - 'book/**' env: - RUST_LATEST_STABLE_VERSION: 1.71 + RUST_LATEST_STABLE_VERSION: 1.87.0 CARGO_TERM_COLOR: always RUSTFLAGS: -D warnings RUST_BACKTRACE: 1 @@ -387,11 +387,8 @@ jobs: sudo apt install -y protobuf-compiler libssl-dev libpq-dev libsqlite3-dev pkg-config - name: Install uniffi - uses: actions-rs/install@v0.1 - with: - crate: uniffi_bindgen - version: 0.21.1 - use-tool-cache: true + run: | + cargo add uniffi_bindgen@0.29.3 --package wallet-uniffi - name: Clippy and fmt uses: actions-rs/toolchain@v1 diff --git a/Cargo.lock b/Cargo.lock index 8f1eec6842..adeb520082 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "Inflector" @@ -45,9 +45,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -59,19 +59,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] -name = "adler32" -version = "1.2.0" +name = "adler2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] -name = "aead" -version = "0.4.3" +name = "adler32" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array", -] +checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" [[package]] name = "aead" @@ -85,36 +82,24 @@ dependencies = [ [[package]] name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if 1.0.0", - "cipher 0.3.0", - "cpufeatures", - "opaque-debug", -] - -[[package]] -name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ - "cfg-if 1.0.0", - "cipher 0.4.4", + "cfg-if 1.0.1", + "cipher", "cpufeatures", ] [[package]] name = "aes-gcm" -version = "0.9.4" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "cipher 0.3.0", + "aead", + "aes", + "cipher", "ctr", "ghash", "subtle", @@ -122,22 +107,22 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.16", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "once_cell", "version_check", "zerocopy", @@ -145,18 +130,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android-tzdata" @@ -193,69 +178,71 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "once_cell_polyfill", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "arc-swap" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -265,15 +252,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "ascii" -version = "0.9.3" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii_utils" @@ -287,11 +268,24 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb98f10f371286b177db5eeb9a6e5396609555686a35e1d4f7b9a9c6d8af0139" dependencies = [ - "askama_derive", + "askama_derive 0.11.2", "askama_escape", "askama_shared", ] +[[package]] +name = "askama" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4744ed2eef2645831b441d8f5459689ade2ab27c854488fbab1fbe94fce1a7" +dependencies = [ + "askama_derive 0.13.1", + "itoa", + "percent-encoding", + "serde", + "serde_json", +] + [[package]] name = "askama_derive" version = "0.11.2" @@ -303,12 +297,41 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "askama_derive" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d661e0f57be36a5c14c48f78d09011e67e0cb618f269cca9f2fd8d15b68c46ac" +dependencies = [ + "askama_parser", + "basic-toml", + "memchr", + "proc-macro2", + "quote", + "rustc-hash 2.1.1", + "serde", + "serde_derive", + "syn 2.0.103", +] + [[package]] name = "askama_escape" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" +[[package]] +name = "askama_parser" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf315ce6524c857bb129ff794935cf6d42c82a6cff60526fe2a63593de4d0d4f" +dependencies = [ + "memchr", + "serde", + "serde_derive", + "winnow 0.7.11", +] + [[package]] name = "askama_shared" version = "0.12.2" @@ -328,14 +351,15 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "2.0.12" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88903cb14723e4d4003335bb7f8a14f27691649105346a0f0957466c096adfe6" +checksum = "2bd389a4b2970a01282ee455294913c0a43724daedcd1a24c3eb0ec1c1320b66" dependencies = [ "anstyle", "bstr", "doc-comment", - "predicates 3.0.4", + "libc", + "predicates 3.1.3", "predicates-core", "predicates-tree", "wait-timeout", @@ -343,14 +367,14 @@ dependencies = [ [[package]] name = "assert_fs" -version = "1.0.13" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f070617a68e5c2ed5d06ee8dd620ee18fb72b99f6c094bed34cf8ab07c875b48" +checksum = "a652f6cb1f516886fcfee5e7a5c078b9ade62cfcb889524efe5a64d682dd27a9" dependencies = [ "anstyle", "doc-comment", "globwalk", - "predicates 3.0.4", + "predicates 3.1.3", "predicates-core", "predicates-tree", "tempfile", @@ -372,7 +396,7 @@ dependencies = [ "fast_chemail", "fnv", "futures-util", - "http", + "http 0.2.12", "indexmap 1.9.3", "mime", "multer", @@ -385,7 +409,7 @@ dependencies = [ "serde_urlencoded", "static_assertions", "tempfile", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -401,7 +425,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -442,9 +466,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -453,24 +477,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] @@ -497,7 +521,7 @@ dependencies = [ name = "audit" version = "0.1.0" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bech32 0.8.1", "chain-addr", "chain-core", @@ -507,7 +531,7 @@ dependencies = [ "chain-storage", "chain-time", "chain-vote", - "clap 4.4.8", + "clap 4.5.40", "clap_complete_command", "color-eyre", "criterion", @@ -521,7 +545,7 @@ dependencies = [ "serde_json", "serde_yaml 0.8.26", "smoke", - "thiserror", + "thiserror 1.0.69", "tracing", "tracing-subscriber", "wallet", @@ -529,9 +553,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" @@ -544,7 +568,7 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http", + "http 0.2.12", "http-body", "hyper", "itoa", @@ -574,7 +598,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", + "http 0.2.12", "http-body", "mime", "rustversion", @@ -584,17 +608,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ "addr2line", - "cc", - "cfg-if 1.0.0", + "cfg-if 1.0.1", "libc", - "miniz_oxide 0.7.1", + "miniz_oxide 0.8.9", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -617,44 +641,49 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64-url" -version = "2.0.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c5b0a88aa36e9f095ee2e2b13fb8c5e4313e022783aedacc123328c0084916d" +checksum = "38e2b6c78c06f7288d5e3c3d683bde35a79531127c83b087e5d0d77c974b4b28" dependencies = [ - "base64 0.21.5", + "base64 0.22.1", ] [[package]] name = "base64ct" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" [[package]] name = "basic-toml" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f2139706359229bfa8f19142ac1155b4b80beafb7a60471ac5dd109d4a19778" +checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a" dependencies = [ "serde", ] [[package]] name = "bb8" -version = "0.8.1" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98b4b0f25f18bcdc3ac72bdb486ed0acf7e185221fd4dc985bc15db5800b0ba2" +checksum = "d89aabfae550a5c44b43ab941844ffcd2e993cb6900b342debf59e9ea74acdb8" dependencies = [ "async-trait", - "futures-channel", "futures-util", - "parking_lot 0.12.1", + "parking_lot 0.12.4", "tokio", ] @@ -700,20 +729,40 @@ dependencies = [ "serde", ] +[[package]] +name = "bindgen" +version = "0.71.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" +dependencies = [ + "bitflags 2.9.1", + "cexpr", + "clang-sys", + "itertools 0.10.5", + "log", + "prettyplease 0.2.34", + "proc-macro2", + "quote", + "regex", + "rustc-hash 2.1.1", + "shlex", + "syn 2.0.103", +] + [[package]] name = "bit-set" -version = "0.5.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.6.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitflags" @@ -723,9 +772,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "bitvec" @@ -764,14 +813,14 @@ dependencies = [ "chain-impl-mockchain", "chain-time", "lru", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "borsh" -version = "1.2.0" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf617fabf5cdbdc92f774bfe5062d870f228b80056d41180797abf48bed4056e" +checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" dependencies = [ "borsh-derive", "cfg_aliases", @@ -779,16 +828,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.2.0" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f404657a7ea7b5249e36808dff544bc88a28f26e0ac40009f674b7a009d14be3" +checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" dependencies = [ "once_cell", - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.39", - "syn_derive", + "syn 2.0.103", ] [[package]] @@ -799,26 +847,26 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.8.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" dependencies = [ "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.9", "serde", ] [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" [[package]] name = "bytecheck" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -827,9 +875,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ "proc-macro2", "quote", @@ -849,9 +897,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" [[package]] name = "byteorder" @@ -861,18 +909,18 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" dependencies = [ "serde", ] [[package]] name = "bytesize" -version = "1.3.0" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" +checksum = "2e93abca9e28e0a1b9877922aacb20576e05d4679ffa78c3d6dc22a26a216659" [[package]] name = "bzip2" @@ -886,20 +934,19 @@ dependencies = [ [[package]] name = "bzip2-sys" -version = "0.1.11+1.0.8" +version = "0.1.13+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" dependencies = [ "cc", - "libc", "pkg-config", ] [[package]] name = "camino" -version = "1.1.6" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" dependencies = [ "serde", ] @@ -916,25 +963,28 @@ dependencies = [ [[package]] name = "cardano-serialization-lib" -version = "11.5.0" +version = "12.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3fab2c10aa73dae6ea90ed459ef07ed7acb09270ea90d9a37fa00420b9c25c" +checksum = "72a6b87191e22d30d2fd9cf52a8db1acd0611d119f432e3dc676650c76f67840" dependencies = [ "bech32 0.7.3", "cbor_event", - "cfg-if 1.0.0", + "cfg-if 1.0.1", "clear_on_drop", "cryptoxide 0.4.4", "digest 0.9.0", "ed25519-bip32 0.4.1", - "getrandom 0.2.11", + "getrandom 0.2.16", + "hashlink 0.9.1", "hex", "itertools 0.10.5", "js-sys", - "linked-hash-map", "noop_proc_macro", + "num", "num-bigint", + "num-derive 0.4.2", "num-integer", + "num-traits", "rand 0.8.5", "rand_os", "schemars", @@ -947,9 +997,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.5" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" dependencies = [ "serde", ] @@ -967,6 +1017,20 @@ dependencies = [ "serde_json", ] +[[package]] +name = "cargo_metadata" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror 2.0.12", +] + [[package]] name = "cast" version = "0.3.0" @@ -980,7 +1044,7 @@ dependencies = [ "axum", "chain-impl-mockchain", "chrono", - "clap 4.4.8", + "clap 4.5.40", "event-db", "jormungandr-lib", "metrics", @@ -991,7 +1055,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "thiserror", + "thiserror 1.0.69", "tokio", "tower", "tower-http", @@ -1014,7 +1078,7 @@ dependencies = [ "chain-storage", "chain-time", "chain-vote", - "clap 4.4.8", + "clap 4.5.40", "color-eyre", "csv", "fraction", @@ -1045,12 +1109,12 @@ dependencies = [ "serde", "serde_json", "serde_test", - "serde_yaml 0.9.27", + "serde_yaml 0.9.34+deprecated", "snapshot-lib", "sscanf", "symmetric-cipher", "test-strategy", - "thiserror", + "thiserror 1.0.69", "thor", "time", "tokio", @@ -1071,19 +1135,20 @@ checksum = "089a0261d1bc59e54e8e11860031efd88593f0e61b921172c474f1f38c2f2d3c" [[package]] name = "cc" -version = "1.0.83" +version = "1.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] name = "cddl" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436ba47def0bac296c651f18d8b731e1e66b136dcde4016149452535837efdd2" +checksum = "498e60dd4fd981287be993aa72fcac506e97bbf467c53a9e8e5985e0390108db" dependencies = [ "abnf_to_pest", "base16", @@ -1097,19 +1162,31 @@ dependencies = [ "data-encoding", "displaydoc", "hexf-parse", - "itertools 0.11.0", + "itertools 0.14.0", + "js-sys", "lexical-core", "log", "pest_meta", "pest_vm", "regex", - "regex-syntax 0.7.5", + "regex-syntax 0.8.5", "serde", - "serde-wasm-bindgen 0.5.0", + "serde-wasm-bindgen 0.6.5", "serde_json", - "simplelog 0.12.1", + "simplelog 0.12.2", "uriparse", "wasm-bindgen", + "wasm-bindgen-test", + "web-sys", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", ] [[package]] @@ -1120,15 +1197,15 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chacha20" @@ -1136,8 +1213,8 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ - "cfg-if 1.0.0", - "cipher 0.4.4", + "cfg-if 1.0.1", + "cipher", "cpufeatures", ] @@ -1147,9 +1224,9 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.5.2", + "aead", "chacha20", - "cipher 0.4.4", + "cipher", "poly1305", "zeroize", ] @@ -1193,7 +1270,7 @@ dependencies = [ "rand 0.8.5", "rand_core 0.6.4", "rayon", - "sha2 0.10.8", + "sha2 0.10.9", "smoke", "test-strategy", "typed-bytes", @@ -1230,7 +1307,7 @@ dependencies = [ "strum_macros 0.24.3", "tempfile", "test-strategy", - "thiserror", + "thiserror 1.0.69", "tracing", "typed-bytes", ] @@ -1247,7 +1324,7 @@ dependencies = [ "prost 0.9.0", "rand 0.8.5", "rand_core 0.6.4", - "thiserror", + "thiserror 1.0.69", "tonic 0.6.2", "tonic-build 0.6.2", ] @@ -1259,14 +1336,14 @@ dependencies = [ "paste 0.1.18", "quickcheck", "quickcheck_macros", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "chain-ser" version = "0.1.0" dependencies = [ - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1278,7 +1355,7 @@ dependencies = [ "rand_core 0.6.4", "sled", "tempfile", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1296,8 +1373,8 @@ dependencies = [ name = "chain-vote" version = "0.1.0" dependencies = [ - "base64 0.21.5", - "cfg-if 1.0.0", + "base64 0.21.7", + "cfg-if 1.0.1", "chain-core", "chain-crypto", "const_format", @@ -1308,7 +1385,7 @@ dependencies = [ "rand_core 0.6.4", "rayon", "smoke", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1319,9 +1396,9 @@ checksum = "17cc5e6b5ab06331c33589842070416baa137e8b0eb912b008cfd4a78ada7919" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1329,14 +1406,14 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-link", ] [[package]] name = "ciborium" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ "ciborium-io", "ciborium-ll", @@ -1345,27 +1422,18 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" [[package]] name = "ciborium-ll" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half", -] - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array", + "half 2.6.0", ] [[package]] @@ -1379,6 +1447,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "clap" version = "2.34.0" @@ -1390,7 +1469,7 @@ dependencies = [ "bitflags 1.3.2", "strsim 0.8.0", "textwrap 0.11.0", - "unicode-width", + "unicode-width 0.1.14", "vec_map", ] @@ -1408,38 +1487,38 @@ dependencies = [ "once_cell", "strsim 0.10.0", "termcolor", - "textwrap 0.16.0", + "textwrap 0.16.2", ] [[package]] name = "clap" -version = "4.4.8" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64" +checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" dependencies = [ "clap_builder", - "clap_derive 4.4.7", + "clap_derive 4.5.40", ] [[package]] name = "clap_builder" -version = "4.4.8" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc" +checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" dependencies = [ "anstream", "anstyle", - "clap_lex 0.6.0", - "strsim 0.10.0", + "clap_lex 0.7.5", + "strsim 0.11.1", ] [[package]] name = "clap_complete" -version = "4.4.4" +version = "4.5.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffe91f06a11b4b9420f62103854e90867812cd5d01557f853c5ee8e791b12ae" +checksum = "aad5b1b4de04fead402672b48897030eec1f3bfe1550776322f59f6d6e6a5677" dependencies = [ - "clap 4.4.8", + "clap 4.5.40", ] [[package]] @@ -1448,7 +1527,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "183495371ea78d4c9ff638bfc6497d46fed2396e4f9c50aebc1278a4a9919a3d" dependencies = [ - "clap 4.4.8", + "clap 4.5.40", "clap_complete", "clap_complete_fig", "clap_complete_nushell", @@ -1456,11 +1535,11 @@ dependencies = [ [[package]] name = "clap_complete_fig" -version = "4.4.2" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e571d70e22ec91d34e1c5317c8308035a2280d925167646bf094fc5de1737c" +checksum = "d494102c8ff3951810c72baf96910b980fb065ca5d3101243e6a8dc19747c86b" dependencies = [ - "clap 4.4.8", + "clap 4.5.40", "clap_complete", ] @@ -1470,7 +1549,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d02bc8b1a18ee47c4d2eec3fb5ac034dc68ebea6125b1509e9ccdffcddce66e" dependencies = [ - "clap 4.4.8", + "clap 4.5.40", "clap_complete", ] @@ -1489,14 +1568,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] @@ -1510,9 +1589,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "clear_on_drop" @@ -1534,8 +1613,9 @@ dependencies = [ [[package]] name = "cocoon" -version = "0.3.0" -source = "git+https://github.com/dkijania/cocoon.git#85a61e33191ddb209f5d5a3382280419bc55c0fb" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24bf1b609cc3fcf6785a2305e450e3dae64cc0f28854ae0b83a6487a8eeaa64f" dependencies = [ "aes-gcm", "chacha20poly1305", @@ -1553,14 +1633,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" dependencies = [ "termcolor", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] name = "color-eyre" -version = "0.6.2" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a667583cca8c4f8436db8de46ea8233c42a7d9ae424a82d338f2e4675229204" +checksum = "e5920befb47832a6d61ee3a3a846565cfa39b331331e68a3b1d1116630f2f26d" dependencies = [ "backtrace", "color-spantrace", @@ -1573,9 +1653,9 @@ dependencies = [ [[package]] name = "color-spantrace" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" +checksum = "b8b88ea9df13354b55bc7234ebcce36e6ef896aca2e42a15de9e10edce01b427" dependencies = [ "once_cell", "owo-colors", @@ -1591,34 +1671,31 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "combine" -version = "3.8.1" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ - "ascii", - "byteorder", - "either", + "bytes", "memchr", - "unreachable", ] [[package]] name = "console" -version = "0.15.7" +version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" dependencies = [ - "encode_unicode 0.3.6", - "lazy_static", + "encode_unicode", "libc", - "unicode-width", - "windows-sys 0.45.0", + "once_cell", + "unicode-width 0.2.1", + "windows-sys 0.59.0", ] [[package]] @@ -1627,24 +1704,24 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "wasm-bindgen", ] [[package]] name = "const_format" -version = "0.2.32" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.32" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" dependencies = [ "proc-macro2", "quote", @@ -1659,9 +1736,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1669,26 +1746,26 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", ] [[package]] @@ -1731,69 +1808,60 @@ dependencies = [ [[package]] name = "cron" -version = "0.12.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff76b51e4c068c52bfd2866e1567bee7c567ae8f24ada09fd4307019e25eab7" +checksum = "5877d3fbf742507b66bc2a1945106bd30dd8504019d596901ddd012a4dd01740" dependencies = [ "chrono", - "nom", "once_cell", + "winnow 0.6.26", ] [[package]] name = "crossbeam-channel" -version = "0.5.8" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" dependencies = [ - "cfg-if 1.0.0", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ - "cfg-if 1.0.0", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if 1.0.0", "crossbeam-utils", - "memoffset 0.9.0", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crossterm" -version = "0.27.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.9.1", "crossterm_winapi", - "libc", - "mio", - "parking_lot 0.12.1", + "mio 1.0.4", + "parking_lot 0.12.4", + "rustix 0.38.44", "signal-hook", "signal-hook-mio", "winapi", @@ -1808,6 +1876,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "crunchy" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" + [[package]] name = "crypto-common" version = "0.1.6" @@ -1815,7 +1889,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core 0.6.4", "typenum", ] @@ -1843,9 +1916,9 @@ checksum = "382ce8820a5bb815055d3553a610e8cb542b2d767bbacea99038afda96cd760d" [[package]] name = "csv" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" dependencies = [ "csv-core", "itoa", @@ -1855,9 +1928,9 @@ dependencies = [ [[package]] name = "csv-core" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +checksum = "7d02f3b0da4c6504f86e9cd789d8dbafab48c2321be74e9987593de5a894d93d" dependencies = [ "memchr", ] @@ -1874,21 +1947,21 @@ dependencies = [ [[package]] name = "ctr" -version = "0.8.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher 0.3.0", + "cipher", ] [[package]] name = "ctrlc" -version = "3.4.1" +version = "3.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e95fbd621905b854affdc67943b043a0fbb6ed7385fd5a25650d19a8a6cfdf" +checksum = "46f93780a459b7d656ef7f071fe699c4d3d2cb201c4b24d085b6ddc505276e73" dependencies = [ - "nix 0.27.1", - "windows-sys 0.48.0", + "nix 0.30.1", + "windows-sys 0.59.0", ] [[package]] @@ -1934,7 +2007,7 @@ checksum = "08a9f3941234c9f62ceaa2782974827749de9b0a8a6487275a278da068e1baf7" dependencies = [ "proc-macro2", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -1949,12 +2022,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.3" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" dependencies = [ - "darling_core 0.20.3", - "darling_macro 0.20.3", + "darling_core 0.20.11", + "darling_macro 0.20.11", ] [[package]] @@ -1973,16 +2046,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.39", + "strsim 0.11.1", + "syn 2.0.103", ] [[package]] @@ -1998,13 +2071,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ - "darling_core 0.20.3", + "darling_core 0.20.11", "quote", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] @@ -2013,18 +2086,18 @@ version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "cfg-if 1.0.0", - "hashbrown 0.14.2", + "cfg-if 1.0.1", + "hashbrown 0.14.5", "lock_api", "once_cell", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.11", ] [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" [[package]] name = "data-pile" @@ -2047,9 +2120,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", "serde", @@ -2057,9 +2130,9 @@ dependencies = [ [[package]] name = "deunicode" -version = "1.4.1" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a1abaf4d861455be59f64fd2b55606cb151fce304ede7165f410243ce96bde6" +checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04" [[package]] name = "dialoguer" @@ -2172,7 +2245,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "dirs-sys-next", ] @@ -2200,13 +2273,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] @@ -2229,9 +2302,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dyn-clone" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" [[package]] name = "eccoxide" @@ -2293,15 +2366,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "encode_unicode" -version = "0.3.6" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "encode_unicode" @@ -2311,11 +2378,11 @@ checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", ] [[package]] @@ -2342,18 +2409,18 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.7" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -2367,7 +2434,7 @@ dependencies = [ "dotenvy", "rust_decimal", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-postgres", ] @@ -2390,7 +2457,7 @@ dependencies = [ "chain-ser", "chain-time", "chain-vote", - "clap 4.4.8", + "clap 4.5.40", "futures", "futures-channel", "futures-util", @@ -2409,7 +2476,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", "thor", "tokio", "tokio-stream", @@ -2426,9 +2493,9 @@ dependencies = [ [[package]] name = "eyre" -version = "0.6.9" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f656be11ddf91bd709454d15d5bd896fbaf4cc3314e69349e4d1569f5b46cd" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" dependencies = [ "indenter", "once_cell", @@ -2436,13 +2503,13 @@ dependencies = [ [[package]] name = "fake" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26221445034074d46b276e13eb97a265ebdb8ed8da705c4dddd3dd20b66b45d2" +checksum = "2d391ba4af7f1d93f01fcf7b2f29e2bc9348e109dfdbf4dcbdc51dfa38dab0b6" dependencies = [ "chrono", "deunicode", - "http", + "http 1.3.1", "rand 0.8.5", "url-escape", ] @@ -2464,39 +2531,33 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "filedescriptor" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e" +checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d" dependencies = [ "libc", - "thiserror", + "thiserror 1.0.69", "winapi", ] [[package]] name = "filetime" -version = "0.2.22" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "libc", - "redox_syscall 0.3.5", - "windows-sys 0.48.0", + "libredox", + "windows-sys 0.59.0", ] -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - [[package]] name = "fixedbitset" version = "0.4.2" @@ -2505,12 +2566,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.28" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" dependencies = [ "crc32fast", - "miniz_oxide 0.7.1", + "miniz_oxide 0.8.9", ] [[package]] @@ -2530,9 +2591,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -2551,9 +2612,9 @@ dependencies = [ [[package]] name = "fs-err" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5fd9bcbe8b1087cbd395b51498c01bc997cef73e778a80b77a811af5e2d29f" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" dependencies = [ "autocfg", ] @@ -2597,9 +2658,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -2612,9 +2673,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -2622,15 +2683,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -2639,44 +2700,44 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -2725,29 +2786,41 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if 1.0.1", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + [[package]] name = "ghash" -version = "0.4.4" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ "opaque-debug", "polyval", @@ -2765,36 +2838,36 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "globset" -version = "0.4.13" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" +checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" dependencies = [ "aho-corasick", "bstr", - "fnv", "log", - "regex", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] name = "globwalk" -version = "0.8.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" +checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.1", "ignore", "walkdir", ] @@ -2807,7 +2880,18 @@ checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" dependencies = [ "log", "plain", - "scroll", + "scroll 0.11.0", +] + +[[package]] +name = "goblin" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47" +dependencies = [ + "log", + "plain", + "scroll 0.12.0", ] [[package]] @@ -2820,7 +2904,7 @@ dependencies = [ "futures-timer", "no-std-compat", "nonzero_ext", - "parking_lot 0.12.1", + "parking_lot 0.12.4", "rand 0.8.5", "smallvec", ] @@ -2836,12 +2920,12 @@ dependencies = [ [[package]] name = "graphql-parser" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ebc8013b4426d5b81a4364c419a95ed0b404af2b82e2457de52d9348f0e474" +checksum = "7a818c0d883d7c0801df27be910917750932be279c7bc82dc541b8769425f409" dependencies = [ "combine", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2903,28 +2987,38 @@ checksum = "8995bd73dd9ff926fdfe2b146e3e571d4b488488844561c9628cf7a736d973de" [[package]] name = "h2" -version = "0.3.22" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.1.0", + "http 0.2.12", + "indexmap 2.9.0", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.15", "tracing", ] [[package]] name = "half" -version = "1.8.2" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + +[[package]] +name = "half" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" +dependencies = [ + "cfg-if 1.0.1", + "crunchy", +] [[package]] name = "hashbrown" @@ -2932,7 +3026,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash 0.7.7", + "ahash 0.7.8", ] [[package]] @@ -2941,26 +3035,41 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.7", + "ahash 0.7.8", ] [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.12", "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" + [[package]] name = "hashlink" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.2", + "hashbrown 0.14.5", +] + +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", ] [[package]] @@ -2977,7 +3086,7 @@ dependencies = [ "hex", "quickcheck", "quickcheck_macros", - "thiserror", + "thiserror 1.0.69", "zeroize", ] @@ -2987,10 +3096,10 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "headers-core", - "http", + "http 0.2.12", "httpdate", "mime", "sha1", @@ -3002,7 +3111,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http", + "http 0.2.12", ] [[package]] @@ -3020,6 +3129,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -3031,9 +3146,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hersir" @@ -3045,7 +3160,7 @@ dependencies = [ "chain-crypto", "chain-impl-mockchain", "chain-vote", - "clap 4.4.8", + "clap 4.5.40", "ctrlc", "custom_debug", "hex", @@ -3063,7 +3178,7 @@ dependencies = [ "serde_json", "serde_yaml 0.8.26", "slave-pool", - "thiserror", + "thiserror 1.0.69", "thor", "yaml-rust", ] @@ -3101,11 +3216,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -3121,9 +3236,20 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", @@ -3132,12 +3258,12 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", "pin-project-lite", ] @@ -3153,15 +3279,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d10540bb06bfef59fe047376e293e2123e0681e9a57780a0a14776dcac74af0e" dependencies = [ - "http", + "http 0.2.12", "zipkin", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "httpdate" @@ -3171,28 +3297,28 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2", "tokio", "tower-service", "tracing", @@ -3206,9 +3332,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", + "http 0.2.12", "hyper", - "rustls 0.21.9", + "rustls 0.21.12", "tokio", "tokio-rustls 0.24.1", ] @@ -3227,9 +3353,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -3263,7 +3389,7 @@ dependencies = [ "chain-time", "chain-vote", "chrono", - "clap 4.4.8", + "clap 4.5.40", "cocoon", "console", "cryptoxide 0.4.4", @@ -3292,7 +3418,7 @@ dependencies = [ "serde_json", "serde_yaml 0.8.26", "snapshot-lib", - "thiserror", + "thiserror 1.0.69", "thor", "tokio", "url", @@ -3304,6 +3430,92 @@ dependencies = [ "warp-reverse-proxy", ] +[[package]] +name = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -3323,27 +3535,37 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] name = "ignore" -version = "0.4.20" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ + "crossbeam-deque", "globset", - "lazy_static", "log", "memchr", - "regex", + "regex-automata 0.4.9", "same-file", - "thread_local", "walkdir", "winapi-util", ] @@ -3375,7 +3597,7 @@ dependencies = [ "proptest", "rustc_version", "test-strategy", - "thiserror", + "thiserror 1.0.69", "trybuild", ] @@ -3398,12 +3620,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.15.4", ] [[package]] @@ -3440,34 +3662,32 @@ dependencies = [ [[package]] name = "inout" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ "generic-array", ] [[package]] name = "insta" -version = "1.34.0" +version = "1.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d64600be34b2fcfc267740a243fa7744441bb4947a619ac4e5bb6507f35fbfc" +checksum = "154934ea70c58054b556dd430b99a98c2a7ff5309ac9891597e339b5c28f4371" dependencies = [ "console", - "lazy_static", - "linked-hash-map", + "once_cell", "serde", "similar", - "yaml-rust", ] [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", ] [[package]] @@ -3476,9 +3696,9 @@ version = "0.1.0" dependencies = [ "assert_cmd", "assert_fs", - "base64 0.21.5", + "base64 0.21.7", "catalyst-toolbox", - "cfg-if 1.0.0", + "cfg-if 1.0.1", "chain-addr", "chain-core", "chain-crypto", @@ -3507,7 +3727,7 @@ dependencies = [ "serde_json", "snapshot-lib", "snapshot-trigger-service", - "thiserror", + "thiserror 1.0.69", "thor", "tokio", "valgrind", @@ -3523,7 +3743,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.5", + "socket2", "widestring", "windows-sys 0.48.0", "winreg", @@ -3531,21 +3751,27 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ - "hermit-abi 0.3.3", - "rustix", - "windows-sys 0.48.0", + "hermit-abi 0.5.2", + "libc", + "windows-sys 0.59.0", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.9.0" @@ -3566,18 +3792,18 @@ dependencies = [ [[package]] name = "itertools" -version = "0.11.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jcli" @@ -3594,7 +3820,7 @@ dependencies = [ "chain-impl-mockchain", "chain-time", "chain-vote", - "clap 4.4.8", + "clap 4.5.40", "clap_complete", "ed25519-bip32 0.4.1", "gtmpl", @@ -3612,27 +3838,28 @@ dependencies = [ "serde_derive", "serde_json", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", "versionisator", ] [[package]] name = "job_scheduler_ng" -version = "2.0.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10bbdf445513bbe53f4666218b7057d265c76fa0b30475e121a6bf05dbaacaae" +checksum = "b6d2655e8c656a1d51c0464ad9cfd19312e3f3ea61326d26a3400323a6cb9a28" dependencies = [ "chrono", "cron", - "uuid 1.6.0", + "uuid 1.16.0", ] [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ + "getrandom 0.3.3", "libc", ] @@ -3653,7 +3880,7 @@ dependencies = [ "chain-storage", "chain-time", "chain-vote", - "clap 4.4.8", + "clap 4.5.40", "criterion", "enum-as-inner", "futures", @@ -3686,7 +3913,7 @@ dependencies = [ "serde_json", "serde_with", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tokio-stream", @@ -3722,7 +3949,7 @@ dependencies = [ "chain-storage", "chain-time", "chain-vote", - "clap 4.4.8", + "clap 4.5.40", "custom_debug", "flate2", "fs_extra", @@ -3757,7 +3984,7 @@ dependencies = [ "sysinfo", "tar", "tempfile", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", "tonic 0.6.2", @@ -3812,7 +4039,7 @@ dependencies = [ "serde_json", "serde_yaml 0.8.26", "tempfile", - "thiserror", + "thiserror 1.0.69", "thor", "tokio", "tonic 0.6.2", @@ -3837,7 +4064,7 @@ dependencies = [ "chain-vote", "ed25519-bip32 0.4.1", "hex", - "http", + "http 0.2.12", "humantime", "parity-multiaddr", "quickcheck", @@ -3850,7 +4077,7 @@ dependencies = [ "serde_json", "serde_with", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", "time", "typed-bytes", ] @@ -3900,7 +4127,7 @@ dependencies = [ "sha2 0.9.9", "sysinfo", "tar", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "warp", @@ -3938,19 +4165,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8066473754794e7784c61808d25d60dfb68e1025a625792a6a1bc680d1ab700a" dependencies = [ "anyhow", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "async-trait", "beef", "futures-channel", "futures-util", "hyper", "jsonrpsee-types", - "parking_lot 0.12.1", + "parking_lot 0.12.4", "rand 0.8.5", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -3984,7 +4211,7 @@ dependencies = [ "beef", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "tracing", ] @@ -3998,14 +4225,14 @@ dependencies = [ "hex", "rand_chacha 0.3.1", "rand_core 0.6.4", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "kqueue" -version = "1.0.8" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" +checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a" dependencies = [ "kqueue-sys", "libc", @@ -4023,9 +4250,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lazycell" @@ -4035,9 +4262,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "lexical-core" -version = "0.8.5" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" +checksum = "b765c31809609075565a70b4b71402281283aeda7ecaf4818ac14a7b2ade8958" dependencies = [ "lexical-parse-float", "lexical-parse-integer", @@ -4048,9 +4275,9 @@ dependencies = [ [[package]] name = "lexical-parse-float" -version = "0.8.5" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +checksum = "de6f9cb01fb0b08060209a057c048fcbab8717b4c1ecd2eac66ebfe39a65b0f2" dependencies = [ "lexical-parse-integer", "lexical-util", @@ -4059,9 +4286,9 @@ dependencies = [ [[package]] name = "lexical-parse-integer" -version = "0.8.6" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +checksum = "72207aae22fc0a121ba7b6d479e42cbfea549af1479c3f3a4f12c70dd66df12e" dependencies = [ "lexical-util", "static_assertions", @@ -4069,18 +4296,18 @@ dependencies = [ [[package]] name = "lexical-util" -version = "0.8.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +checksum = "5a82e24bf537fd24c177ffbbdc6ebcc8d54732c35b50a3f28cc3f4e4c949a0b3" dependencies = [ "static_assertions", ] [[package]] name = "lexical-write-float" -version = "0.8.5" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +checksum = "c5afc668a27f460fb45a81a757b6bf2f43c2d7e30cb5a2dcd3abf294c78d62bd" dependencies = [ "lexical-util", "lexical-write-integer", @@ -4089,9 +4316,9 @@ dependencies = [ [[package]] name = "lexical-write-integer" -version = "0.8.5" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +checksum = "629ddff1a914a836fb245616a7888b62903aae58fa771e1d83943035efa0f978" dependencies = [ "lexical-util", "static_assertions", @@ -4099,15 +4326,19 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.150" +version = "0.2.173" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "d8cfeafaffdbc32176b64fb251369d52ea9f0a8fbc6f8759edffef7b525d64bb" [[package]] -name = "libm" -version = "0.2.8" +name = "libloading" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" +dependencies = [ + "cfg-if 1.0.1", + "windows-targets 0.52.6", +] [[package]] name = "libmath" @@ -4120,13 +4351,13 @@ dependencies = [ [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.9.1", "libc", - "redox_syscall 0.4.1", + "redox_syscall 0.5.13", ] [[package]] @@ -4148,9 +4379,21 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "litemap" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "local-ip-address" @@ -4160,15 +4403,15 @@ checksum = "9eab7f092fb08006040e656c2adce6670e6a516bea831a8b2b3d0fb24d4488f5" dependencies = [ "libc", "neli", - "thiserror", + "thiserror 1.0.69", "windows-sys 0.42.0", ] [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", @@ -4176,9 +4419,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" dependencies = [ "serde", ] @@ -4191,7 +4434,7 @@ dependencies = [ "chain-core", "chain-crypto", "chain-impl-mockchain", - "clap 4.4.8", + "clap 4.5.40", "custom_debug", "jormungandr-automation", "jormungandr-lib", @@ -4201,7 +4444,7 @@ dependencies = [ "reqwest", "serde", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", "thor", "tokio", "warp", @@ -4258,7 +4501,7 @@ dependencies = [ "serde_json", "snapshot-lib", "tempdir", - "thiserror", + "thiserror 1.0.69", "thor", "tokio", ] @@ -4271,7 +4514,7 @@ dependencies = [ "bech32 0.8.1", "cardano-serialization-lib", "chain-impl-mockchain", - "clap 4.4.8", + "clap 4.5.40", "color-eyre", "futures", "futures-util", @@ -4292,11 +4535,11 @@ dependencies = [ "snapshot-lib", "snapshot-trigger-service", "tempdir", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", "tracing-subscriber", - "uuid 1.6.0", + "uuid 1.16.0", "vit-servicing-station-lib", "vit-servicing-station-tests", "voting_tools_rs", @@ -4336,15 +4579,15 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "digest 0.10.7", ] [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memmap2" @@ -4364,22 +4607,13 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - [[package]] name = "metrics" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e52eb6380b6d2a10eb3434aec0885374490f5b82c8aaf5cd487a183c98be834" dependencies = [ - "ahash 0.7.7", + "ahash 0.7.8", "metrics-macros", ] @@ -4396,7 +4630,7 @@ dependencies = [ "metrics-util", "parking_lot 0.11.2", "quanta", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -4479,9 +4713,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -4514,25 +4748,37 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.48.0", ] +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "log", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + [[package]] name = "mjolnir" version = "0.1.0" @@ -4545,7 +4791,7 @@ dependencies = [ "chain-storage", "chain-time", "chain-vote", - "clap 4.4.8", + "clap 4.5.40", "indicatif", "jormungandr-automation", "jormungandr-lib", @@ -4553,7 +4799,7 @@ dependencies = [ "loki", "rand 0.8.5", "rand_core 0.6.4", - "thiserror", + "thiserror 1.0.69", "thor", "tokio", "versionisator", @@ -4568,7 +4814,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http", + "http 0.2.12", "httparse", "log", "memchr", @@ -4599,7 +4845,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -4619,17 +4865,70 @@ dependencies = [ ] [[package]] -name = "netstat2" -version = "0.9.1" +name = "netlink-packet-core" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72724faf704479d67b388da142b186f916188505e7e0b26719019c525882eda4" +dependencies = [ + "anyhow", + "byteorder", + "netlink-packet-utils", +] + +[[package]] +name = "netlink-packet-sock-diag" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0faa3f4ad230fd2bf2a5dad71476ecbaeaed904b3c7e7e5b1f266c415c03761f" +checksum = "a495cb1de50560a7cd12fdcf023db70eec00e340df81be31cedbbfd4aadd6b76" dependencies = [ + "anyhow", "bitflags 1.3.2", "byteorder", "libc", - "num-derive", + "netlink-packet-core", + "netlink-packet-utils", + "smallvec", +] + +[[package]] +name = "netlink-packet-utils" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" +dependencies = [ + "anyhow", + "byteorder", + "paste 1.0.15", + "thiserror 1.0.69", +] + +[[package]] +name = "netlink-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16c903aa70590cb93691bf97a767c8d1d6122d2cc9070433deb3bbf36ce8bd23" +dependencies = [ + "bytes", + "libc", + "log", +] + +[[package]] +name = "netstat2" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6422b6a8c7635e8a82323e4cdf07a90e91901e07f4c1f0f3a245d54b4637e55c" +dependencies = [ + "bindgen", + "bitflags 2.9.1", + "byteorder", + "netlink-packet-core", + "netlink-packet-sock-diag", + "netlink-packet-utils", + "netlink-sys", + "num-derive 0.3.3", "num-traits", - "thiserror", + "thiserror 2.0.12", ] [[package]] @@ -4640,20 +4939,21 @@ checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" dependencies = [ "autocfg", "bitflags 1.3.2", - "cfg-if 1.0.0", + "cfg-if 1.0.1", "libc", - "memoffset 0.6.5", + "memoffset", "pin-utils", ] [[package]] name = "nix" -version = "0.27.1" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.4.1", - "cfg-if 1.0.0", + "bitflags 2.9.1", + "cfg-if 1.0.1", + "cfg_aliases", "libc", ] @@ -4713,7 +5013,7 @@ dependencies = [ "inotify", "kqueue", "libc", - "mio", + "mio 0.8.11", "walkdir", "windows-sys 0.45.0", ] @@ -4739,25 +5039,24 @@ dependencies = [ [[package]] name = "num" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", "num-integer", "num-iter", - "num-rational 0.4.1", + "num-rational 0.4.2", "num-traits", ] [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", "serde", @@ -4765,14 +5064,20 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", "serde", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-derive" version = "0.3.3" @@ -4784,21 +5089,31 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -4818,11 +5133,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -4831,29 +5145,28 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", - "libm", ] [[package]] name = "num_cpus" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.5.2", "libc", ] [[package]] name = "num_threads" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" dependencies = [ "libc", ] @@ -4866,30 +5179,36 @@ checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" [[package]] name = "object" -version = "0.32.1" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "opentelemetry" @@ -4910,11 +5229,11 @@ dependencies = [ "async-trait", "futures", "futures-util", - "http", + "http 0.2.12", "opentelemetry", "opentelemetry-proto", "prost 0.11.9", - "thiserror", + "thiserror 1.0.69", "tokio", "tonic 0.8.3", ] @@ -4955,7 +5274,7 @@ dependencies = [ "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4975,19 +5294,20 @@ dependencies = [ "opentelemetry_api", "percent-encoding", "rand 0.8.5", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-stream", ] [[package]] name = "os_info" -version = "3.7.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" +checksum = "d0e1ac5fde8d43c34139135df8ea9ee9465394b2d8d20f032d38998f64afffc3" dependencies = [ "log", - "winapi", + "plist", + "windows-sys 0.52.0", ] [[package]] @@ -5013,9 +5333,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "owo-colors" -version = "3.5.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +checksum = "26995317201fa17f3656c36716aed4a7c81743a9634ac4c99c0eeda495db0cec" [[package]] name = "parity-multiaddr" @@ -5048,12 +5368,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.11", ] [[package]] @@ -5062,7 +5382,7 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "instant", "libc", "redox_syscall 0.2.16", @@ -5072,15 +5392,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "libc", - "redox_syscall 0.4.1", + "redox_syscall 0.5.13", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -5106,9 +5426,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "paste-impl" @@ -5145,42 +5465,42 @@ dependencies = [ "digest 0.10.7", "hmac 0.12.1", "password-hash", - "sha2 0.10.8", + "sha2 0.10.9", ] [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.5" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" +checksum = "198db74531d58c70a361c42201efde7e2591e976d518caf7662a47dc5720e7b6" dependencies = [ "memchr", - "thiserror", + "thiserror 2.0.12", "ucd-trie", ] [[package]] name = "pest_meta" -version = "2.7.5" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" +checksum = "7f9f832470494906d1fca5329f8ab5791cc60beb230c74815dff541cbd2b5ca0" dependencies = [ "once_cell", "pest", - "sha2 0.10.8", + "sha2 0.10.9", ] [[package]] name = "pest_vm" -version = "2.7.5" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12d2b440b79b697ca2791334f1cae93409e398e04b206c92388b0ceaa0555453" +checksum = "c2afb338bc5f3c95285865d1ad71b227c8926cfeedd702d962deaacdba4b81ce" dependencies = [ "pest", "pest_meta", @@ -5188,12 +5508,12 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.9.0", ] [[package]] @@ -5208,47 +5528,47 @@ dependencies = [ [[package]] name = "phf" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ "phf_shared", ] [[package]] name = "phf_shared" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ - "siphasher 0.3.11", + "siphasher 1.0.1", ] [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -5258,9 +5578,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "plain" @@ -5274,11 +5594,24 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "989d43012e2ca1c4a02507c67282691a0a3207f9dc67cec596b43fe925b3d325" +[[package]] +name = "plist" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d77244ce2d584cd84f6a15f86195b8c9b2a0dfbfd817c09e0464244091a58ed" +dependencies = [ + "base64 0.22.1", + "indexmap 2.9.0", + "quick-xml", + "serde", + "time", +] + [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" dependencies = [ "num-traits", "plotters-backend", @@ -5289,15 +5622,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] @@ -5323,7 +5656,7 @@ dependencies = [ "hex", "keynesis", "lru", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -5334,26 +5667,26 @@ checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ "cpufeatures", "opaque-debug", - "universal-hash 0.5.1", + "universal-hash", ] [[package]] name = "polyval" -version = "0.5.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "cpufeatures", "opaque-debug", - "universal-hash 0.4.1", + "universal-hash", ] [[package]] name = "postgres" -version = "0.19.7" +version = "0.19.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7915b33ed60abc46040cbcaa25ffa1c7ec240668e0477c4f3070786f5916d451" +checksum = "363e6dfbdd780d3aa3597b6eb430db76bb315fa9bad7fae595bb8def808b8470" dependencies = [ "bytes", "fallible-iterator", @@ -5365,27 +5698,27 @@ dependencies = [ [[package]] name = "postgres-protocol" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" +checksum = "76ff0abab4a9b844b93ef7b81f1efc0a366062aaef2cd702c76256b5dc075c54" dependencies = [ - "base64 0.21.5", + "base64 0.22.1", "byteorder", "bytes", "fallible-iterator", "hmac 0.12.1", "md-5", "memchr", - "rand 0.8.5", - "sha2 0.10.8", + "rand 0.9.1", + "sha2 0.10.9", "stringprep", ] [[package]] name = "postgres-types" -version = "0.2.6" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2234cdee9408b523530a9b6d2d6b373d1db34f6a8e51dc03ded1828d7fb67c" +checksum = "613283563cd90e1dfc3518d548caee47e0e725455ed619881f5cf21f36de4b48" dependencies = [ "bytes", "chrono", @@ -5395,6 +5728,15 @@ dependencies = [ "serde_json", ] +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -5403,9 +5745,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] [[package]] name = "pq-sys" @@ -5432,27 +5777,26 @@ dependencies = [ [[package]] name = "predicates" -version = "3.0.4" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" dependencies = [ "anstyle", "difflib", - "itertools 0.11.0", "predicates-core", ] [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" dependencies = [ "predicates-core", "termtree", @@ -5484,9 +5828,9 @@ dependencies = [ [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", "yansi", @@ -5502,6 +5846,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prettyplease" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6837b9e10d61f45f987d50808f83d1ee3d206c66acf650c3e4ae2e1f6ddedf55" +dependencies = [ + "proc-macro2", + "syn 2.0.103", +] + [[package]] name = "prettytable-rs" version = "0.10.0" @@ -5509,11 +5863,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a" dependencies = [ "csv", - "encode_unicode 1.0.0", + "encode_unicode", "is-terminal", "lazy_static", "term", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] @@ -5528,11 +5882,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ - "toml_edit 0.20.7", + "toml_edit 0.22.27", ] [[package]] @@ -5567,43 +5921,43 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] [[package]] name = "prometheus" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "fnv", "lazy_static", "memchr", - "parking_lot 0.12.1", + "parking_lot 0.12.4", "protobuf", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "proptest" -version = "1.4.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.4.1", + "bitflags 2.9.1", "lazy_static", "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand 0.9.1", + "rand_chacha 0.9.0", "rand_xorshift", - "regex-syntax 0.8.2", + "regex-syntax 0.8.5", "rusty-fork", "tempfile", "unarray", @@ -5662,7 +6016,7 @@ dependencies = [ "log", "multimap", "petgraph", - "prettyplease", + "prettyplease 0.1.25", "prost 0.11.9", "prost-types 0.11.9", "regex", @@ -5774,6 +6128,15 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-xml" +version = "0.37.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +dependencies = [ + "memchr", +] + [[package]] name = "quickcheck" version = "0.9.2" @@ -5799,24 +6162,30 @@ dependencies = [ [[package]] name = "quircs" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a4a2aa9fe525f10ce4ee99dbb78dc3faf31bd0667d50729a6c0eb89e17eca5" +checksum = "ec3fec90fc7a119692a6244ed4404d152878a47f0bf3f90f34dc79bb7a339d24" dependencies = [ - "num-derive", + "num-derive 0.4.2", "num-traits", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "r2d2" version = "0.8.10" @@ -5824,7 +6193,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" dependencies = [ "log", - "parking_lot 0.12.1", + "parking_lot 0.12.4", "scheduled-thread-pool", ] @@ -5881,6 +6250,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -5901,6 +6280,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + [[package]] name = "rand_core" version = "0.3.1" @@ -5931,7 +6320,16 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", ] [[package]] @@ -5960,11 +6358,11 @@ dependencies = [ [[package]] name = "rand_xorshift" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" dependencies = [ - "rand_core 0.6.4", + "rand_core 0.9.3", ] [[package]] @@ -5978,9 +6376,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -5988,9 +6386,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -6016,38 +6414,29 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.1", ] [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.16", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "refinery" -version = "0.8.11" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "529664dbccc0a296947615c997a857912d72d1c44be1fafb7bae54ecfa7a8c24" +checksum = "7ba5d693abf62492c37268512ff35b77655d2e957ca53dab85bf993fe9172d15" dependencies = [ "refinery-core", "refinery-macros", @@ -6055,48 +6444,48 @@ dependencies = [ [[package]] name = "refinery-core" -version = "0.8.11" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e895cb870cf06e92318cbbeb701f274d022d5ca87a16fa8244e291cd035ef954" +checksum = "8a83581f18c1a4c3a6ebd7a174bdc665f17f618d79f7edccb6a0ac67e660b319" dependencies = [ "async-trait", - "cfg-if 1.0.0", - "lazy_static", + "cfg-if 1.0.1", "log", "postgres", "regex", "serde", - "siphasher 1.0.0", - "thiserror", + "siphasher 1.0.1", + "thiserror 1.0.69", "time", - "toml 0.7.8", + "toml 0.8.23", "url", "walkdir", ] [[package]] name = "refinery-macros" -version = "0.8.11" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "123e8b80f8010c3ae38330c81e76938fc7adf6cdbfbaad20295bb8c22718b4f1" +checksum = "72c225407d8e52ef8cf094393781ecda9a99d6544ec28d90a6915751de259264" dependencies = [ + "heck 0.5.0", "proc-macro2", "quote", "refinery-core", "regex", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] name = "regex" -version = "1.10.2" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", - "regex-syntax 0.8.2", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -6110,13 +6499,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.5", ] [[package]] @@ -6127,15 +6516,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - -[[package]] -name = "regex-syntax" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "remove_dir_all" @@ -6148,26 +6531,26 @@ dependencies = [ [[package]] name = "rend" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" dependencies = [ "bytecheck", ] [[package]] name = "reqwest" -version = "0.11.22" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-rustls", @@ -6178,11 +6561,12 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.9", + "rustls 0.21.12", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-rustls 0.24.1", @@ -6197,13 +6581,9 @@ dependencies = [ [[package]] name = "resolv-conf" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" -dependencies = [ - "hostname", - "quick-error", -] +checksum = "95325155c684b1c89f7765e30bc1c42e4a6da51ca513615660cb8a62ef9a88e3" [[package]] name = "ring" @@ -6222,40 +6602,41 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", - "getrandom 0.2.11", + "cfg-if 1.0.1", + "getrandom 0.2.16", "libc", - "spin 0.9.8", "untrusted 0.9.0", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "rkyv" -version = "0.7.42" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ "bitvec", "bytecheck", + "bytes", "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", "seahash", "tinyvec", - "uuid 1.6.0", + "uuid 1.16.0", ] [[package]] name = "rkyv_derive" -version = "0.7.42" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ "proc-macro2", "quote", @@ -6280,7 +6661,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d912f35156a3f99a66ee3e11ac2e0b3f34ac85a07e05263d05a7e2c8810d616f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "proc-macro2", "quote", "rustc_version", @@ -6289,37 +6670,36 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.33.1" +version = "1.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06676aec5ccb8fc1da723cc8c0f9a46549f21ebb8753d3915c6c41db1e7f1dc4" +checksum = "faa7de2ba56ac291bd90c6b9bece784a52ae1411f9506544b3eae36dd2356d50" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "borsh", "bytes", "num-traits", - "postgres", + "postgres-types", "rand 0.8.5", "rkyv", "serde", "serde_json", - "tokio-postgres", ] [[package]] name = "rust_decimal_macros" -version = "1.33.1" +version = "1.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e43721f4ef7060ebc2c3ede757733209564ca8207f47674181bcd425dd76945" +checksum = "f6268b74858287e1a062271b988a0c534bf85bbeb567fe09331bf40ed78113d5" dependencies = [ "quote", - "rust_decimal", + "syn 2.0.103", ] [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" [[package]] name = "rustc-hash" @@ -6327,26 +6707,45 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.25" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.9.1", "errno", "libc", - "linux-raw-sys", - "windows-sys 0.48.0", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +dependencies = [ + "bitflags 2.9.1", + "errno", + "libc", + "linux-raw-sys 0.9.4", + "windows-sys 0.59.0", ] [[package]] @@ -6363,12 +6762,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.9" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring 0.17.5", + "ring 0.17.14", "rustls-webpki", "sct", ] @@ -6379,7 +6778,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", ] [[package]] @@ -6388,15 +6787,15 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", + "ring 0.17.14", "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" [[package]] name = "rusty-fork" @@ -6412,9 +6811,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -6431,7 +6830,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" dependencies = [ - "parking_lot 0.12.1", + "parking_lot 0.12.4", ] [[package]] @@ -6439,26 +6838,26 @@ name = "scheduler-service-lib" version = "0.1.0" dependencies = [ "chrono", - "clap 4.4.8", + "clap 4.5.40", "futures", "jortestkit", "reqwest", "serde", "serde_json", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", - "uuid 1.6.0", + "uuid 1.16.0", "walkdir", "warp", ] [[package]] name = "schemars" -version = "0.8.16" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" dependencies = [ "dyn-clone", "schemars_derive", @@ -6468,14 +6867,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.16" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 1.0.109", + "syn 2.0.103", ] [[package]] @@ -6502,7 +6901,16 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" dependencies = [ - "scroll_derive", + "scroll_derive 0.11.1", +] + +[[package]] +name = "scroll" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" +dependencies = [ + "scroll_derive 0.12.1", ] [[package]] @@ -6513,7 +6921,18 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", +] + +[[package]] +name = "scroll_derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", ] [[package]] @@ -6522,7 +6941,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", + "ring 0.17.14", "untrusted 0.9.0", ] @@ -6544,18 +6963,18 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.192" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] @@ -6573,9 +6992,9 @@ dependencies = [ [[package]] name = "serde-wasm-bindgen" -version = "0.5.0" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3b143e2833c57ab9ad3ea280d21fd34e285a42837aeb0ee301f4f41890fa00e" +checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" dependencies = [ "js-sys", "serde", @@ -6588,48 +7007,49 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" dependencies = [ - "half", + "half 1.8.3", "serde", ] [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] name = "serde_derive_internals" -version = "0.26.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.103", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_path_to_error" -version = "0.1.14" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" +checksum = "59fab13f937fa393d08645bf3a84bdfe86e296747b506ada67bb15f10f218b2a" dependencies = [ "itoa", "serde", @@ -6637,18 +7057,18 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.4" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] [[package]] name = "serde_test" -version = "1.0.176" +version = "1.0.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a2f49ace1498612d14f7e0b8245519584db8299541dfe31a06374a828d620ab" +checksum = "7f901ee573cab6b3060453d2d5f0bae4e6d628c23c0a962ff9b5f1d7c8d4f1ed" dependencies = [ "serde", ] @@ -6687,10 +7107,10 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.3", + "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] @@ -6707,11 +7127,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.27" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.9.0", "itoa", "ryu", "serde", @@ -6723,7 +7143,7 @@ name = "settings" version = "0.1.0" dependencies = [ "sled", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -6733,7 +7153,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if 1.0.1", "cpufeatures", "digest 0.9.0", "opaque-debug", @@ -6745,7 +7165,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "cpufeatures", "digest 0.10.7", ] @@ -6757,7 +7177,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if 1.0.1", "cpufeatures", "digest 0.9.0", "opaque-debug", @@ -6765,11 +7185,11 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "cpufeatures", "digest 0.10.7", ] @@ -6789,6 +7209,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "sign" version = "0.1.0" @@ -6801,7 +7227,7 @@ dependencies = [ "chain-ser", "chain-storage", "chain-vote", - "clap 4.4.8", + "clap 4.5.40", "clap_complete_command", "color-eyre", "cryptoxide 0.4.4", @@ -6816,14 +7242,14 @@ dependencies = [ "serde", "serde_json", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "signal-hook" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" dependencies = [ "libc", "signal-hook-registry", @@ -6831,20 +7257,20 @@ dependencies = [ [[package]] name = "signal-hook-mio" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" +checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" dependencies = [ "libc", - "mio", + "mio 1.0.4", "signal-hook", ] [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" dependencies = [ "libc", ] @@ -6865,15 +7291,15 @@ checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "similar" -version = "2.3.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597" +checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" [[package]] name = "simplelog" @@ -6888,9 +7314,9 @@ dependencies = [ [[package]] name = "simplelog" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acee08041c5de3d5048c8b3f6f13fafb3026b24ba43c6a695a0c76179b844369" +checksum = "16257adbfaef1ee58b1363bdc0664c9b8e1e30aed86049635fb5f147d065a9c0" dependencies = [ "log", "termcolor", @@ -6905,9 +7331,9 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "siphasher" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ac45299ccbd390721be55b412d41931911f654fa99e2cb8bfb57184b2061fe" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "sketches-ddsketch" @@ -6951,9 +7377,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "smawk" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" [[package]] name = "smoke" @@ -6981,9 +7413,9 @@ dependencies = [ "serde", "serde_json", "serde_test", - "serde_yaml 0.9.27", + "serde_yaml 0.9.34+deprecated", "test-strategy", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -6994,7 +7426,7 @@ dependencies = [ "catalyst-toolbox", "chain-addr", "chrono", - "clap 4.4.8", + "clap 4.5.40", "futures", "hex", "jormungandr-lib", @@ -7007,10 +7439,10 @@ dependencies = [ "serde_yaml 0.8.26", "signals-handler", "snapshot-lib", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", - "uuid 1.6.0", + "uuid 1.16.0", "voting_tools_rs", "walkdir", "warp", @@ -7018,22 +7450,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.5" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -7081,20 +7503,26 @@ dependencies = [ ] [[package]] -name = "static_assertions" +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stringprep" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "finl_unicode", "unicode-bidi", "unicode-normalization", + "unicode-properties", ] [[package]] @@ -7109,6 +7537,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "structmeta" version = "0.1.6" @@ -7215,7 +7649,7 @@ dependencies = [ "cryptoxide 0.4.4", "rand 0.8.5", "rand_chacha 0.3.1", - "thiserror", + "thiserror 1.0.69", "zeroize", ] @@ -7232,27 +7666,15 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "e4307e30089d6fd6aff212f2da3a1f9e32f3223b1f010fb09b7c95f90f3ca1e8" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.39", -] - [[package]] name = "sync_wrapper" version = "0.1.2" @@ -7271,13 +7693,24 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + [[package]] name = "sysinfo" version = "0.26.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c18a6156d1f27a9592ee18c1a846ca8dd5c258b7179fc193ae87c74ebb666f5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "core-foundation-sys", "libc", "ntapi", @@ -7315,15 +7748,21 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.40" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" dependencies = [ "filetime", "libc", "xattr", ] +[[package]] +name = "target-triple" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ac9aa371f599d22256307c24a9d748c041e548cbf599f35d890f9d365361790" + [[package]] name = "tempdir" version = "0.3.7" @@ -7336,15 +7775,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.1" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ - "cfg-if 1.0.0", "fastrand", - "redox_syscall 0.4.1", - "rustix", - "windows-sys 0.48.0", + "getrandom 0.3.3", + "once_cell", + "rustix 1.0.7", + "windows-sys 0.59.0", ] [[package]] @@ -7369,9 +7808,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "test-strategy" @@ -7395,33 +7834,56 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width", + "unicode-width 0.1.14", ] [[package]] name = "textwrap" -version = "0.16.0" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" +dependencies = [ + "smawk", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] [[package]] name = "thiserror" -version = "1.0.50" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn 2.0.103", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] @@ -7436,7 +7898,7 @@ dependencies = [ "chain-crypto", "chain-impl-mockchain", "chain-vote", - "clap 4.4.8", + "clap 4.5.40", "cocoon", "custom_debug", "dirs", @@ -7450,18 +7912,17 @@ dependencies = [ "rand_core 0.6.4", "serde", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", "time", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ - "cfg-if 1.0.0", - "once_cell", + "cfg-if 1.0.1", ] [[package]] @@ -7477,13 +7938,14 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" dependencies = [ "deranged", "itoa", "libc", + "num-conv", "num_threads", "powerfmt", "serde", @@ -7493,19 +7955,30 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" dependencies = [ + "num-conv", "time-core", ] +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -7518,9 +7991,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" dependencies = [ "tinyvec_macros", ] @@ -7533,21 +8006,20 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" dependencies = [ "backtrace", "bytes", "libc", - "mio", - "num_cpus", - "parking_lot 0.12.1", + "mio 1.0.4", + "parking_lot 0.12.4", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -7562,20 +8034,20 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] name = "tokio-postgres" -version = "0.7.10" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d340244b32d920260ae7448cb72b6e238bddc3d4f7603394e7dd46ed8e48f5b8" +checksum = "6c95d533c83082bb6490e0189acaa0bbeef9084e60471b696ca6988cd0541fb0" dependencies = [ "async-trait", "byteorder", @@ -7584,16 +8056,16 @@ dependencies = [ "futures-channel", "futures-util", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.4", "percent-encoding", "phf", "pin-project-lite", "postgres-protocol", "postgres-types", - "rand 0.8.5", - "socket2 0.5.5", + "rand 0.9.1", + "socket2", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.15", "whoami", ] @@ -7614,20 +8086,20 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.9", + "rustls 0.21.12", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.15", ] [[package]] @@ -7659,16 +8131,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -7682,21 +8153,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.19.15", + "toml_edit 0.22.27", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] @@ -7707,24 +8178,31 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", - "serde", - "serde_spanned", + "indexmap 2.9.0", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.20.7" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.9.0", + "serde", + "serde_spanned", "toml_datetime", - "winnow", + "toml_write", + "winnow 0.7.11", ] +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + [[package]] name = "tonic" version = "0.6.2" @@ -7738,7 +8216,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-timeout", @@ -7770,7 +8248,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-timeout", @@ -7780,7 +8258,7 @@ dependencies = [ "prost-derive 0.11.9", "tokio", "tokio-stream", - "tokio-util 0.7.10", + "tokio-util 0.7.15", "tower", "tower-layer", "tower-service", @@ -7806,7 +8284,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" dependencies = [ - "prettyplease", + "prettyplease 0.1.25", "proc-macro2", "prost-build 0.11.9", "quote", @@ -7827,7 +8305,7 @@ dependencies = [ "rand 0.8.5", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.15", "tower-layer", "tower-service", "tracing", @@ -7839,11 +8317,11 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.9.1", "bytes", "futures-core", "futures-util", - "http", + "http 0.2.12", "http-body", "http-range-header", "pin-project-lite", @@ -7853,21 +8331,21 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -7882,27 +8360,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" dependencies = [ "crossbeam-channel", - "thiserror", + "thiserror 1.0.69", "time", "tracing-subscriber", ] [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "1b1ffbcf9c6f6b99d386e7444eb608ba646ae452a36b39737deb9663b610f662" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", "valuable", @@ -7910,9 +8388,9 @@ dependencies = [ [[package]] name = "tracing-error" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" +checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db" dependencies = [ "tracing", "tracing-subscriber", @@ -7939,7 +8417,7 @@ dependencies = [ "futures-util", "hostname", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-util 0.6.10", "tracing", @@ -7996,9 +8474,9 @@ dependencies = [ [[package]] name = "tracing-serde" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" dependencies = [ "serde", "tracing-core", @@ -8006,9 +8484,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -8028,11 +8506,10 @@ dependencies = [ [[package]] name = "tracing-test" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a2c0ff408fe918a94c428a3f2ad04e4afd5c95bbc08fcf868eff750c15728a4" +checksum = "557b891436fe0d5e0e363427fc7f217abf9ccd510d5136549847bdcbcd011d68" dependencies = [ - "lazy_static", "tracing-core", "tracing-subscriber", "tracing-test-macro", @@ -8040,13 +8517,12 @@ dependencies = [ [[package]] name = "tracing-test-macro" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bc1c4f8e2e73a977812ab339d503e6feeb92700f6d07a6de4d321522d5c08" +checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ - "lazy_static", "quote", - "syn 1.0.109", + "syn 2.0.103", ] [[package]] @@ -8056,7 +8532,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" dependencies = [ "async-trait", - "cfg-if 1.0.0", + "cfg-if 1.0.1", "data-encoding", "enum-as-inner", "futures-channel", @@ -8067,7 +8543,7 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", - "thiserror", + "thiserror 1.0.69", "tinyvec", "tokio", "tracing", @@ -8080,15 +8556,15 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "futures-util", "ipconfig", "lazy_static", "lru-cache", - "parking_lot 0.12.1", + "parking_lot 0.12.4", "resolv-conf", "smallvec", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", "trust-dns-proto", @@ -8096,23 +8572,23 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "trybuild" -version = "1.0.85" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196a58260a906cedb9bf6d8034b6379d0c11f552416960452f267402ceeddff1" +checksum = "1c9bf9513a2f4aeef5fdac8677d7d349c79fdbcc03b9c86da6e9d254f1e43be2" dependencies = [ - "basic-toml", "glob", - "once_cell", "serde", "serde_derive", "serde_json", + "target-triple", "termcolor", + "toml 0.8.23", ] [[package]] @@ -8124,12 +8600,12 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 0.2.12", "httparse", "log", "rand 0.8.5", "sha1", - "thiserror", + "thiserror 1.0.69", "url", "utf-8", ] @@ -8146,15 +8622,15 @@ version = "0.1.0" [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unarray" @@ -8164,51 +8640,60 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" + [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "uniffi" @@ -8219,10 +8704,10 @@ dependencies = [ "anyhow", "bytes", "camino", - "cargo_metadata", + "cargo_metadata 0.14.2", "log", "once_cell", - "paste 1.0.14", + "paste 1.0.15", "static_assertions", "uniffi_macros", ] @@ -8234,20 +8719,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d46080a4840abccf7c0cce21931dae53215cbd7dd969b5e63c486235ce91a2a" dependencies = [ "anyhow", - "askama", + "askama 0.11.1", "bincode", "camino", "clap 3.2.25", "fs-err", - "goblin", + "goblin 0.5.4", "heck 0.4.1", "once_cell", - "paste 1.0.14", + "paste 1.0.15", "serde", "serde_json", "toml 0.5.11", - "uniffi_meta", - "weedle2", + "uniffi_meta 0.21.1", + "weedle2 4.0.0", +] + +[[package]] +name = "uniffi_bindgen" +version = "0.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ff0132b533483cf19abb30bba5c72c24d9f3e4d9a2ff71cb3e22e73899fd46e" +dependencies = [ + "anyhow", + "askama 0.13.1", + "camino", + "cargo_metadata 0.19.2", + "fs-err", + "glob", + "goblin 0.8.2", + "heck 0.5.0", + "indexmap 2.9.0", + "once_cell", + "serde", + "tempfile", + "textwrap 0.16.2", + "toml 0.5.11", + "uniffi_internal_macros", + "uniffi_meta 0.29.3", + "uniffi_pipeline", + "uniffi_udl", ] [[package]] @@ -8258,7 +8769,7 @@ checksum = "d035e50433ee3d52ab0dcdcf3b9b26f2cc2ec39294b3c07d95865a518709455f" dependencies = [ "anyhow", "camino", - "uniffi_bindgen", + "uniffi_bindgen 0.21.1", ] [[package]] @@ -8271,6 +8782,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "uniffi_internal_macros" +version = "0.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f64bec2f3a33f2f08df8150e67fa45ba59a2ca740bf20c1beb010d4d791f9a1b" +dependencies = [ + "anyhow", + "indexmap 2.9.0", + "proc-macro2", + "quote", + "syn 2.0.103", +] + [[package]] name = "uniffi_macros" version = "0.21.1" @@ -8287,7 +8811,7 @@ dependencies = [ "syn 1.0.109", "toml 0.5.11", "uniffi_build", - "uniffi_meta", + "uniffi_meta 0.21.1", ] [[package]] @@ -8302,39 +8826,57 @@ dependencies = [ ] [[package]] -name = "universal-hash" -version = "0.4.1" +name = "uniffi_meta" +version = "0.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +checksum = "3d226fc167754ce548c5ece9828c8a06f03bf1eea525d2659ba6bd648bd8e2f3" dependencies = [ - "generic-array", - "subtle", + "anyhow", + "siphasher 0.3.11", + "uniffi_internal_macros", + "uniffi_pipeline", ] [[package]] -name = "universal-hash" -version = "0.5.1" +name = "uniffi_pipeline" +version = "0.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +checksum = "b925b6421df15cf4bedee27714022cd9626fb4d7eee0923522a608b274ba4371" dependencies = [ - "crypto-common", - "subtle", + "anyhow", + "heck 0.5.0", + "indexmap 2.9.0", + "tempfile", + "uniffi_internal_macros", ] [[package]] -name = "unreachable" -version = "1.0.0" +name = "uniffi_udl" +version = "0.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +checksum = "9c42649b721df759d9d4692a376b82b62ce3028ec9fc466f4780fb8cdf728996" dependencies = [ - "void", + "anyhow", + "textwrap 0.16.2", + "uniffi_meta 0.29.3", + "weedle2 5.0.0", +] + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", ] [[package]] name = "unsafe-libyaml" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "unsigned-varint" @@ -8372,12 +8914,12 @@ dependencies = [ [[package]] name = "url" -version = "2.4.1" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 1.0.3", "percent-encoding", "serde", ] @@ -8397,11 +8939,17 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" @@ -8409,17 +8957,17 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.16", "serde", ] [[package]] name = "uuid" -version = "1.6.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58fe91d841bc04822c9801002db4ea904b9e4b8e6bbad25127b46eff8dc516b" +checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.3.3", "serde", ] @@ -8434,7 +8982,7 @@ dependencies = [ "chain-ser", "chain-time", "chain-vote", - "clap 4.4.8", + "clap 4.5.40", "hex", "hyper", "itertools 0.10.5", @@ -8445,7 +8993,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "tokio", "url", "vit-servicing-station-lib", @@ -8464,9 +9012,9 @@ checksum = "49a5d03e387f17eeeebf89cf7fffe31b059e7c284169c52541e62387675a348f" [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "vcpkg" @@ -8482,9 +9030,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "versionisator" @@ -8500,7 +9048,7 @@ name = "vit-servicing-station-cli" version = "0.3.4-dev" dependencies = [ "base64 0.13.1", - "clap 4.4.8", + "clap 4.5.40", "csv", "diesel", "diesel_migrations", @@ -8509,7 +9057,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror", + "thiserror 1.0.69", "time", "url", "vit-servicing-station-lib", @@ -8530,7 +9078,7 @@ dependencies = [ "serde_json", "structopt", "tempfile", - "thiserror", + "thiserror 1.0.69", "time", "vit-servicing-station-lib-f10", ] @@ -8542,9 +9090,8 @@ dependencies = [ "async-trait", "base64 0.13.1", "chain-ser", - "clap 4.4.8", + "clap 4.5.40", "diesel", - "diesel_migrations", "dotenv", "eccoxide 0.2.0", "event-db", @@ -8553,7 +9100,7 @@ dependencies = [ "jormungandr-lib", "log", "notify", - "pretty_assertions 1.4.0", + "pretty_assertions 1.4.1", "r2d2", "rand 0.8.5", "serde", @@ -8563,7 +9110,7 @@ dependencies = [ "strum 0.24.1", "strum_macros 0.24.3", "tempfile", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tracing", @@ -8598,7 +9145,7 @@ dependencies = [ "strum 0.21.0", "strum_macros 0.21.1", "tempfile", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tracing", @@ -8611,12 +9158,12 @@ dependencies = [ name = "vit-servicing-station-server" version = "0.3.4-dev" dependencies = [ - "clap 4.4.8", + "clap 4.5.40", "log", "opentelemetry", "opentelemetry-otlp", "opentelemetry-semantic-conventions", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", "tracing-appender", @@ -8653,7 +9200,7 @@ dependencies = [ "chain-crypto", "chain-impl-mockchain", "chrono", - "clap 4.4.8", + "clap 4.5.40", "diesel", "dyn-clone", "fake", @@ -8676,7 +9223,7 @@ dependencies = [ "serde_json", "snapshot-lib", "tempfile", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "url", @@ -8714,7 +9261,7 @@ dependencies = [ "serde_json", "structopt", "tempfile", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "url", @@ -8735,7 +9282,7 @@ dependencies = [ "chain-impl-mockchain", "chain-time", "chain-vote", - "clap 4.4.8", + "clap 4.5.40", "console", "csv", "ctrlc", @@ -8780,7 +9327,7 @@ dependencies = [ "strum 0.24.1", "strum_macros 0.24.3", "tempdir", - "thiserror", + "thiserror 1.0.69", "thor", "time", "tokio", @@ -8801,12 +9348,6 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - [[package]] name = "voting_tools_rs" version = "0.1.0" @@ -8816,7 +9357,7 @@ dependencies = [ "cddl", "chrono", "ciborium", - "clap 4.4.8", + "clap 4.5.40", "color-eyre", "cryptoxide 0.4.4", "dashmap", @@ -8833,7 +9374,7 @@ dependencies = [ "serde", "serde_json", "test-strategy", - "thiserror", + "thiserror 1.0.69", "tracing", "tracing-subscriber", "tracing-test", @@ -8842,18 +9383,18 @@ dependencies = [ [[package]] name = "wait-timeout" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" dependencies = [ "libc", ] [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -8873,7 +9414,7 @@ dependencies = [ "chain-time", "cryptoxide 0.4.4", "ed25519-bip32 0.4.1", - "hashlink", + "hashlink 0.8.4", "hdkeygen", "hex", "imhamt", @@ -8884,7 +9425,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml 0.8.26", - "thiserror", + "thiserror 1.0.69", "zeroize", ] @@ -8905,7 +9446,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "symmetric-cipher", - "thiserror", + "thiserror 1.0.69", "wallet", ] @@ -8920,8 +9461,9 @@ dependencies = [ "chain-time", "chain-vote", "symmetric-cipher", - "thiserror", + "thiserror 1.0.69", "uniffi", + "uniffi_bindgen 0.29.3", "uniffi_build", "uniffi_macros", "wallet", @@ -8939,7 +9481,7 @@ dependencies = [ "chain-vote", "clear_on_drop", "console_error_panic_hook", - "getrandom 0.2.11", + "getrandom 0.2.16", "hex", "js-sys", "rand 0.8.5", @@ -8971,7 +9513,7 @@ dependencies = [ "futures-channel", "futures-util", "headers", - "http", + "http 0.2.12", "hyper", "log", "mime", @@ -8988,7 +9530,7 @@ dependencies = [ "tokio-rustls 0.24.1", "tokio-stream", "tokio-tungstenite", - "tokio-util 0.7.10", + "tokio-util 0.7.15", "tower-service", "tracing", ] @@ -9002,7 +9544,7 @@ dependencies = [ "hyper", "lazy_static", "reqwest", - "thiserror", + "thiserror 1.0.69", "unicase", "warp", ] @@ -9021,32 +9563,47 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasite" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", "wasm-bindgen-shared", ] @@ -9056,7 +9613,7 @@ version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "js-sys", "wasm-bindgen", "web-sys", @@ -9064,9 +9621,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9074,22 +9631,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-bindgen-test" @@ -9131,15 +9688,15 @@ version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.5", + "ring 0.17.14", "untrusted 0.9.0", ] [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "weedle2" @@ -9150,11 +9707,20 @@ dependencies = [ "nom", ] +[[package]] +name = "weedle2" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "998d2c24ec099a87daf9467808859f9d82b61f1d9c9701251aea037f514eae0e" +dependencies = [ + "nom", +] + [[package]] name = "weezl" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3" [[package]] name = "which" @@ -9165,24 +9731,25 @@ dependencies = [ "either", "home", "once_cell", - "rustix", + "rustix 0.38.44", ] [[package]] name = "whoami" -version = "1.4.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" +checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7" dependencies = [ - "wasm-bindgen", + "redox_syscall 0.5.13", + "wasite", "web-sys", ] [[package]] name = "widestring" -version = "1.0.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" +checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d" [[package]] name = "winapi" @@ -9202,11 +9769,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -9217,13 +9784,19 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + [[package]] name = "windows-sys" version = "0.42.0" @@ -9257,6 +9830,24 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -9287,6 +9878,22 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -9299,6 +9906,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -9311,6 +9924,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -9323,6 +9942,18 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -9335,6 +9966,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -9347,6 +9984,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -9359,6 +10002,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -9371,11 +10020,35 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28" +dependencies = [ + "memchr", +] + [[package]] name = "winnow" -version = "0.5.19" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" dependencies = [ "memchr", ] @@ -9386,10 +10059,25 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.1", "windows-sys 0.48.0", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + [[package]] name = "wyz" version = "0.5.1" @@ -9401,11 +10089,12 @@ dependencies = [ [[package]] name = "xattr" -version = "1.0.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" +checksum = "0d65cbf2f12c15564212d48f4e3dfb87923d25d611f2aed18f4cb23f0413d89e" dependencies = [ "libc", + "rustix 1.0.7", ] [[package]] @@ -9419,35 +10108,80 @@ dependencies = [ [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", + "synstructure 0.13.2", +] [[package]] name = "zerocopy" -version = "0.7.26" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.26" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", + "synstructure 0.13.2", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -9460,7 +10194,40 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.103", +] + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", ] [[package]] @@ -9469,7 +10236,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ - "aes 0.8.3", + "aes", "byteorder", "bzip2", "constant_time_eq", @@ -9526,9 +10293,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.15+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index bccc7e4375..b4d06cc8db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "2" members = [ "tests", "src/catalyst-toolbox/catalyst-toolbox", @@ -103,7 +104,7 @@ serde_test = "1" tracing = "0.1.37" tracing-appender = "0.2.2" tracing-futures = "0.2.5" -tracing-subscriber = "0.3.16" +tracing-subscriber = { version = "0.3.16", default-features = false } tracing-opentelemetry = "0.18.0" tracing-test = "0.2.3" diff --git a/book.toml b/book.toml index 137bf9e27b..edde9a5ce1 100644 --- a/book.toml +++ b/book.toml @@ -30,7 +30,7 @@ endpoint = "http://kroki:8000" [preprocessor.admonish] command = "mdbook-admonish" -assets_version = "2.0.0" # do not edit: managed by `mdbook-admonish install` +assets_version = "3.1.0" # do not edit: managed by `mdbook-admonish install` on_failure = "bail" before = [ "kroki-preprocessor" # Ensure we can put diagrams inside admonish blocks. diff --git a/book/assets/css/mdbook-admonish.css b/book/assets/css/mdbook-admonish.css index 5e360387df..eebe4a5b3a 100644 --- a/book/assets/css/mdbook-admonish.css +++ b/book/assets/css/mdbook-admonish.css @@ -1,33 +1,4 @@ @charset "UTF-8"; -:root { - --md-admonition-icon--note: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--abstract: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--info: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--tip: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--success: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--question: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--warning: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--failure: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--danger: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--bug: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--example: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--quote: - url("data:image/svg+xml;charset=utf-8,"); - --md-details-icon: - url("data:image/svg+xml;charset=utf-8,"); -} - :is(.admonition) { display: flow-root; margin: 1.5625em 0; @@ -75,29 +46,34 @@ a.admonition-anchor-link::before { content: "§"; } -:is(.admonition-title, summary) { +:is(.admonition-title, summary.admonition-title) { position: relative; + min-height: 4rem; margin-block: 0; margin-inline: -1.6rem -1.2rem; padding-block: 0.8rem; padding-inline: 4.4rem 1.2rem; font-weight: 700; background-color: rgba(68, 138, 255, 0.1); + print-color-adjust: exact; + -webkit-print-color-adjust: exact; display: flex; } -:is(.admonition-title, summary) p { +:is(.admonition-title, summary.admonition-title) p { margin: 0; } -html :is(.admonition-title, summary):last-child { +html :is(.admonition-title, summary.admonition-title):last-child { margin-bottom: 0; } -:is(.admonition-title, summary)::before { +:is(.admonition-title, summary.admonition-title)::before { position: absolute; top: 0.625em; inset-inline-start: 1.6rem; width: 2rem; height: 2rem; background-color: #448aff; + print-color-adjust: exact; + -webkit-print-color-adjust: exact; mask-image: url('data:image/svg+xml;charset=utf-8,'); -webkit-mask-image: url('data:image/svg+xml;charset=utf-8,'); mask-repeat: no-repeat; @@ -106,10 +82,15 @@ html :is(.admonition-title, summary):last-child { -webkit-mask-size: contain; content: ""; } -:is(.admonition-title, summary):hover a.admonition-anchor-link { +:is(.admonition-title, summary.admonition-title):hover a.admonition-anchor-link { display: initial; } +@media print { + details.admonition::details-content { + display: contents; + } +} details.admonition > summary.admonition-title::after { position: absolute; top: 0.625em; @@ -130,205 +111,227 @@ details.admonition > summary.admonition-title::after { details[open].admonition > summary.admonition-title::after { transform: rotate(90deg); } +summary.admonition-title::-webkit-details-marker { + display: none; +} + +:root { + --md-details-icon: url("data:image/svg+xml;charset=utf-8,"); +} + +:root { + --md-admonition-icon--admonish-note: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-abstract: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-info: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-tip: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-success: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-question: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-warning: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-failure: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-danger: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-bug: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-example: url("data:image/svg+xml;charset=utf-8,"); + --md-admonition-icon--admonish-quote: url("data:image/svg+xml;charset=utf-8,"); +} -:is(.admonition):is(.note) { +:is(.admonition):is(.admonish-note) { border-color: #448aff; } -:is(.note) > :is(.admonition-title, summary) { +:is(.admonish-note) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(68, 138, 255, 0.1); } -:is(.note) > :is(.admonition-title, summary)::before { +:is(.admonish-note) > :is(.admonition-title, summary.admonition-title)::before { background-color: #448aff; - mask-image: var(--md-admonition-icon--note); - -webkit-mask-image: var(--md-admonition-icon--note); + mask-image: var(--md-admonition-icon--admonish-note); + -webkit-mask-image: var(--md-admonition-icon--admonish-note); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.abstract, .summary, .tldr) { +:is(.admonition):is(.admonish-abstract, .admonish-summary, .admonish-tldr) { border-color: #00b0ff; } -:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary) { +:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 176, 255, 0.1); } -:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary)::before { +:is(.admonish-abstract, .admonish-summary, .admonish-tldr) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00b0ff; - mask-image: var(--md-admonition-icon--abstract); - -webkit-mask-image: var(--md-admonition-icon--abstract); + mask-image: var(--md-admonition-icon--admonish-abstract); + -webkit-mask-image: var(--md-admonition-icon--admonish-abstract); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.info, .todo) { +:is(.admonition):is(.admonish-info, .admonish-todo) { border-color: #00b8d4; } -:is(.info, .todo) > :is(.admonition-title, summary) { +:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 184, 212, 0.1); } -:is(.info, .todo) > :is(.admonition-title, summary)::before { +:is(.admonish-info, .admonish-todo) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00b8d4; - mask-image: var(--md-admonition-icon--info); - -webkit-mask-image: var(--md-admonition-icon--info); + mask-image: var(--md-admonition-icon--admonish-info); + -webkit-mask-image: var(--md-admonition-icon--admonish-info); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.tip, .hint, .important) { +:is(.admonition):is(.admonish-tip, .admonish-hint, .admonish-important) { border-color: #00bfa5; } -:is(.tip, .hint, .important) > :is(.admonition-title, summary) { +:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 191, 165, 0.1); } -:is(.tip, .hint, .important) > :is(.admonition-title, summary)::before { +:is(.admonish-tip, .admonish-hint, .admonish-important) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00bfa5; - mask-image: var(--md-admonition-icon--tip); - -webkit-mask-image: var(--md-admonition-icon--tip); + mask-image: var(--md-admonition-icon--admonish-tip); + -webkit-mask-image: var(--md-admonition-icon--admonish-tip); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.success, .check, .done) { +:is(.admonition):is(.admonish-success, .admonish-check, .admonish-done) { border-color: #00c853; } -:is(.success, .check, .done) > :is(.admonition-title, summary) { +:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(0, 200, 83, 0.1); } -:is(.success, .check, .done) > :is(.admonition-title, summary)::before { +:is(.admonish-success, .admonish-check, .admonish-done) > :is(.admonition-title, summary.admonition-title)::before { background-color: #00c853; - mask-image: var(--md-admonition-icon--success); - -webkit-mask-image: var(--md-admonition-icon--success); + mask-image: var(--md-admonition-icon--admonish-success); + -webkit-mask-image: var(--md-admonition-icon--admonish-success); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.question, .help, .faq) { +:is(.admonition):is(.admonish-question, .admonish-help, .admonish-faq) { border-color: #64dd17; } -:is(.question, .help, .faq) > :is(.admonition-title, summary) { +:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(100, 221, 23, 0.1); } -:is(.question, .help, .faq) > :is(.admonition-title, summary)::before { +:is(.admonish-question, .admonish-help, .admonish-faq) > :is(.admonition-title, summary.admonition-title)::before { background-color: #64dd17; - mask-image: var(--md-admonition-icon--question); - -webkit-mask-image: var(--md-admonition-icon--question); + mask-image: var(--md-admonition-icon--admonish-question); + -webkit-mask-image: var(--md-admonition-icon--admonish-question); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.warning, .caution, .attention) { +:is(.admonition):is(.admonish-warning, .admonish-caution, .admonish-attention) { border-color: #ff9100; } -:is(.warning, .caution, .attention) > :is(.admonition-title, summary) { +:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(255, 145, 0, 0.1); } -:is(.warning, .caution, .attention) > :is(.admonition-title, summary)::before { +:is(.admonish-warning, .admonish-caution, .admonish-attention) > :is(.admonition-title, summary.admonition-title)::before { background-color: #ff9100; - mask-image: var(--md-admonition-icon--warning); - -webkit-mask-image: var(--md-admonition-icon--warning); + mask-image: var(--md-admonition-icon--admonish-warning); + -webkit-mask-image: var(--md-admonition-icon--admonish-warning); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.failure, .fail, .missing) { +:is(.admonition):is(.admonish-failure, .admonish-fail, .admonish-missing) { border-color: #ff5252; } -:is(.failure, .fail, .missing) > :is(.admonition-title, summary) { +:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(255, 82, 82, 0.1); } -:is(.failure, .fail, .missing) > :is(.admonition-title, summary)::before { +:is(.admonish-failure, .admonish-fail, .admonish-missing) > :is(.admonition-title, summary.admonition-title)::before { background-color: #ff5252; - mask-image: var(--md-admonition-icon--failure); - -webkit-mask-image: var(--md-admonition-icon--failure); + mask-image: var(--md-admonition-icon--admonish-failure); + -webkit-mask-image: var(--md-admonition-icon--admonish-failure); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.danger, .error) { +:is(.admonition):is(.admonish-danger, .admonish-error) { border-color: #ff1744; } -:is(.danger, .error) > :is(.admonition-title, summary) { +:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(255, 23, 68, 0.1); } -:is(.danger, .error) > :is(.admonition-title, summary)::before { +:is(.admonish-danger, .admonish-error) > :is(.admonition-title, summary.admonition-title)::before { background-color: #ff1744; - mask-image: var(--md-admonition-icon--danger); - -webkit-mask-image: var(--md-admonition-icon--danger); + mask-image: var(--md-admonition-icon--admonish-danger); + -webkit-mask-image: var(--md-admonition-icon--admonish-danger); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.bug) { +:is(.admonition):is(.admonish-bug) { border-color: #f50057; } -:is(.bug) > :is(.admonition-title, summary) { +:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(245, 0, 87, 0.1); } -:is(.bug) > :is(.admonition-title, summary)::before { +:is(.admonish-bug) > :is(.admonition-title, summary.admonition-title)::before { background-color: #f50057; - mask-image: var(--md-admonition-icon--bug); - -webkit-mask-image: var(--md-admonition-icon--bug); + mask-image: var(--md-admonition-icon--admonish-bug); + -webkit-mask-image: var(--md-admonition-icon--admonish-bug); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.example) { +:is(.admonition):is(.admonish-example) { border-color: #7c4dff; } -:is(.example) > :is(.admonition-title, summary) { +:is(.admonish-example) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(124, 77, 255, 0.1); } -:is(.example) > :is(.admonition-title, summary)::before { +:is(.admonish-example) > :is(.admonition-title, summary.admonition-title)::before { background-color: #7c4dff; - mask-image: var(--md-admonition-icon--example); - -webkit-mask-image: var(--md-admonition-icon--example); + mask-image: var(--md-admonition-icon--admonish-example); + -webkit-mask-image: var(--md-admonition-icon--admonish-example); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; -webkit-mask-repeat: no-repeat; } -:is(.admonition):is(.quote, .cite) { +:is(.admonition):is(.admonish-quote, .admonish-cite) { border-color: #9e9e9e; } -:is(.quote, .cite) > :is(.admonition-title, summary) { +:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title) { background-color: rgba(158, 158, 158, 0.1); } -:is(.quote, .cite) > :is(.admonition-title, summary)::before { +:is(.admonish-quote, .admonish-cite) > :is(.admonition-title, summary.admonition-title)::before { background-color: #9e9e9e; - mask-image: var(--md-admonition-icon--quote); - -webkit-mask-image: var(--md-admonition-icon--quote); + mask-image: var(--md-admonition-icon--admonish-quote); + -webkit-mask-image: var(--md-admonition-icon--admonish-quote); mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-size: contain; @@ -339,7 +342,8 @@ details[open].admonition > summary.admonition-title::after { background-color: var(--sidebar-bg); } -.ayu :is(.admonition), .coal :is(.admonition) { +.ayu :is(.admonition), +.coal :is(.admonition) { background-color: var(--theme-hover); } diff --git a/rust-toolchain b/rust-toolchain index f54a91728a..ea26ac45d0 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,3 +1,3 @@ [toolchain] -channel = "1.71.0" +channel = "1.87.0" components = ["rust-src", "rustfmt", "rust-std"] diff --git a/src/audit/src/lib/tally.rs b/src/audit/src/lib/tally.rs index 772d83d8b3..0ebef05ad3 100644 --- a/src/audit/src/lib/tally.rs +++ b/src/audit/src/lib/tally.rs @@ -1,7 +1,6 @@ -use bech32::{self, Error as Bech32Error, FromBase32}; +use bech32::{self, FromBase32}; use bech32::{ToBase32, Variant}; -use chain_crypto::testing::TestCryptoRng; use chain_crypto::{Ed25519, SecretKey}; use chain_vote::committee::MemberSecretKey; use chain_vote::tally::batch_decrypt; @@ -12,6 +11,7 @@ use chain_vote::TallyDecryptShare; use base64::{engine::general_purpose, Engine as _}; use color_eyre::Result; +use rand::rngs::StdRng; use rand_core::SeedableRng; /// A Bech32_encoded address consists of 3 parts: A Human-Readable Part (HRP) + Separator + Data: @@ -24,9 +24,9 @@ const HRP_SK: &str = "ristretto255_membersk"; pub fn get_members_secret_share( key: String, ) -> Result> { - let (_hrp, data, _variant) = bech32::decode(&key).map_err(Bech32Error::from)?; + let (_hrp, data, _variant) = bech32::decode(&key)?; - let bytes = Vec::::from_base32(&data).map_err(Bech32Error::from)?; + let bytes = Vec::::from_base32(&data)?; Ok(MemberSecretKey::from_bytes(&bytes).ok_or("member secret key from bytes")?) } @@ -36,9 +36,9 @@ pub fn get_members_secret_share( pub fn get_members_public_share( key: String, ) -> Result> { - let (_hrp, data, _variant) = bech32::decode(&key).map_err(Bech32Error::from)?; + let (_hrp, data, _variant) = bech32::decode(&key)?; - let bytes = Vec::::from_base32(&data).map_err(Bech32Error::from)?; + let bytes = Vec::::from_base32(&data)?; Ok(MemberPublicKey::from_bytes(&bytes).ok_or("member public key from bytes")?) } @@ -50,7 +50,7 @@ pub fn extract_decrypt_shares( encrypted_tally: EncryptedTally, committee_priv_keys: Vec, ) -> Vec { - let mut rng = TestCryptoRng::seed_from_u64(0); + let mut rng = StdRng::seed_from_u64(0); let mut shares = vec![]; @@ -171,7 +171,7 @@ pub fn decrypt_tally_with_secret_keys( encrypted_tally: EncryptedTally, committee_priv_keys: Vec, ) -> Result, Box> { - let mut rng = TestCryptoRng::seed_from_u64(0); + let mut rng = StdRng::seed_from_u64(0); let mut public_keys = vec![]; diff --git a/src/catalyst-toolbox/catalyst-toolbox/Cargo.toml b/src/catalyst-toolbox/catalyst-toolbox/Cargo.toml index 08c48d34f7..75c880b234 100644 --- a/src/catalyst-toolbox/catalyst-toolbox/Cargo.toml +++ b/src/catalyst-toolbox/catalyst-toolbox/Cargo.toml @@ -65,6 +65,8 @@ fraction = "0.12" tracing.workspace = true tracing-subscriber.workspace = true vit-servicing-station-lib = { path = "../../vit-servicing-station/vit-servicing-station-lib", optional = true } +proptest.workspace = true +test-strategy = "0.2" [dev-dependencies] rand_chacha = "0.3" @@ -72,7 +74,7 @@ assert_cmd = "2" predicates = "2" assert_fs = "1.0.0" chain-vote = { path = "../../chain-libs/chain-vote" } -proptest = { workspace = true, branch = "master" } +proptest = { workspace = true } test-strategy = "0.2" serde_test = "1" snapshot-lib = { path = "../snapshot-lib", features = ["proptest"] } diff --git a/src/catalyst-toolbox/catalyst-toolbox/src/bin/cli/rewards/veterans.rs b/src/catalyst-toolbox/catalyst-toolbox/src/bin/cli/rewards/veterans.rs index 9d97546cbb..3ceb330469 100644 --- a/src/catalyst-toolbox/catalyst-toolbox/src/bin/cli/rewards/veterans.rs +++ b/src/catalyst-toolbox/catalyst-toolbox/src/bin/cli/rewards/veterans.rs @@ -143,11 +143,11 @@ pub fn vca_rewards( min_rankings..=max_rankings_reputation, rewards_agreement_rate_cutoffs .into_iter() - .zip(rewards_agreement_rate_modifiers.into_iter()) + .zip(rewards_agreement_rate_modifiers) .collect(), reputation_agreement_rate_cutoffs .into_iter() - .zip(reputation_agreement_rate_modifiers.into_iter()) + .zip(reputation_agreement_rate_modifiers) .collect(), ); diff --git a/src/catalyst-toolbox/catalyst-toolbox/src/ideascale/models/de/clean_string.rs b/src/catalyst-toolbox/catalyst-toolbox/src/ideascale/models/de/clean_string.rs index 07af297821..505d7c7e4d 100644 --- a/src/catalyst-toolbox/catalyst-toolbox/src/ideascale/models/de/clean_string.rs +++ b/src/catalyst-toolbox/catalyst-toolbox/src/ideascale/models/de/clean_string.rs @@ -52,31 +52,34 @@ impl From for CleanString { } } -impl ToString for CleanString { - fn to_string(&self) -> String { - self.0.clone() - } -} - impl AsRef for CleanString { fn as_ref(&self) -> &str { &self.0 } } +impl std::fmt::Display for CleanString { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.0) + } +} + static REGEX: Lazy = Lazy::new(|| Regex::new("[-*/]").unwrap()); pub fn clean_str(s: &str) -> String { REGEX.replace_all(s, "").to_string() } -#[cfg(any(test, feature = "property-test-api"))] +#[cfg(any(test, feature = "test-api"))] +#[allow(dead_code)] mod tests { + use proptest::arbitrary::any; + use proptest::prelude::*; use proptest::{ arbitrary::{Arbitrary, StrategyFor}, - prelude::*, strategy::Map, }; + #[allow(unused_imports)] use serde_json::json; use test_strategy::proptest; @@ -84,11 +87,11 @@ mod tests { impl Arbitrary for CleanString { type Parameters = (); - type Strategy = Map, fn(String) -> Self>; - fn arbitrary_with((): Self::Parameters) -> Self::Strategy { any::().prop_map(|s| CleanString(clean_str(&s))) } + + type Strategy = Map, fn(String) -> Self>; } fn parse(s: &str) -> CleanString { diff --git a/src/catalyst-toolbox/catalyst-toolbox/src/ideascale/models/de/mod.rs b/src/catalyst-toolbox/catalyst-toolbox/src/ideascale/models/de/mod.rs index a2a241d456..130e1e7b78 100644 --- a/src/catalyst-toolbox/catalyst-toolbox/src/ideascale/models/de/mod.rs +++ b/src/catalyst-toolbox/catalyst-toolbox/src/ideascale/models/de/mod.rs @@ -98,6 +98,7 @@ pub struct Stage { #[serde(alias = "funnelId", default)] pub funnel_id: u32, #[serde(alias = "assessmentId", default)] + #[allow(dead_code)] pub assessment_id: u32, } diff --git a/src/catalyst-toolbox/catalyst-toolbox/src/recovery/tally.rs b/src/catalyst-toolbox/catalyst-toolbox/src/recovery/tally.rs index fc6544dbab..ba21adf0f3 100644 --- a/src/catalyst-toolbox/catalyst-toolbox/src/recovery/tally.rs +++ b/src/catalyst-toolbox/catalyst-toolbox/src/recovery/tally.rs @@ -759,7 +759,7 @@ mod test { match proposal.tally { Tally::Public { result } => { let results = result.results(); - assert_eq!(*results.get(0).unwrap(), 0.into()); + assert_eq!(*results.first().unwrap(), 0.into()); assert_eq!(*results.get(1).unwrap(), funds.into()); assert_eq!(*results.get(2).unwrap(), 0.into()); } diff --git a/src/catalyst-toolbox/catalyst-toolbox/src/rewards/proposers/mod.rs b/src/catalyst-toolbox/catalyst-toolbox/src/rewards/proposers/mod.rs index e45a017289..0bd08ae939 100644 --- a/src/catalyst-toolbox/catalyst-toolbox/src/rewards/proposers/mod.rs +++ b/src/catalyst-toolbox/catalyst-toolbox/src/rewards/proposers/mod.rs @@ -1,4 +1,4 @@ -use self::{io::vecs_to_maps, types::NotFundedReason}; +use self::io::vecs_to_maps; use crate::types::{challenge::Challenge, proposal::Proposal}; use chain_impl_mockchain::value::Value; use color_eyre::{ diff --git a/src/catalyst-toolbox/catalyst-toolbox/src/rewards/veterans.rs b/src/catalyst-toolbox/catalyst-toolbox/src/rewards/veterans.rs index 23598ed91d..67fc203b9f 100644 --- a/src/catalyst-toolbox/catalyst-toolbox/src/rewards/veterans.rs +++ b/src/catalyst-toolbox/catalyst-toolbox/src/rewards/veterans.rs @@ -126,7 +126,7 @@ pub fn calculate_veteran_advisors_incentives( reputation_eligible_rankings .into_iter() - .zip(rewards_eligible_rankings.into_iter()) + .zip(rewards_eligible_rankings) .map(|((vca, reputation), (_vca2, reward))| { assert_eq!(vca, _vca2); // the use of BTreeMaps ensures iteration is consistent ( @@ -226,14 +226,14 @@ mod tests { 2..=2, THRESHOLDS .into_iter() - .zip(REWARDS_DISAGREEMENT_MODIFIERS.into_iter()) + .zip(REWARDS_DISAGREEMENT_MODIFIERS) .collect(), THRESHOLDS .into_iter() - .zip(REPUTATION_DISAGREEMENT_MODIFIERS.into_iter()) + .zip(REPUTATION_DISAGREEMENT_MODIFIERS) .collect(), ); - assert!(results.get(VCA_1).is_none()); + assert!(!results.contains_key(VCA_1)); let res = results.get(VCA_2).unwrap(); assert_eq!(res.reputation, 2); assert_eq!(res.rewards, total_rewards); @@ -255,11 +255,11 @@ mod tests { 1..=1, THRESHOLDS .into_iter() - .zip(REWARDS_DISAGREEMENT_MODIFIERS.into_iter()) + .zip(REWARDS_DISAGREEMENT_MODIFIERS) .collect(), THRESHOLDS .into_iter() - .zip(REPUTATION_DISAGREEMENT_MODIFIERS.into_iter()) + .zip(REPUTATION_DISAGREEMENT_MODIFIERS) .collect(), ); let res1 = results.get(VCA_1).unwrap(); diff --git a/src/catalyst-toolbox/catalyst-toolbox/src/rewards/voters.rs b/src/catalyst-toolbox/catalyst-toolbox/src/rewards/voters.rs index 7e96d9779c..86e27a46e9 100644 --- a/src/catalyst-toolbox/catalyst-toolbox/src/rewards/voters.rs +++ b/src/catalyst-toolbox/catalyst-toolbox/src/rewards/voters.rs @@ -291,7 +291,7 @@ mod tests { for (_, voting_key) in inactive_voters_keys { for contrib in snapshot.contributions_for_voting_key(voting_key.clone()) { - assert!(all_rewards.get(&contrib.reward_address).is_none()); + assert!(!all_rewards.contains_key(&contrib.reward_address)); } } } diff --git a/src/catalyst-toolbox/catalyst-toolbox/tests/notifications/main.rs b/src/catalyst-toolbox/catalyst-toolbox/tests/notifications/main.rs index df7b2b656c..947a31cf59 100644 --- a/src/catalyst-toolbox/catalyst-toolbox/tests/notifications/main.rs +++ b/src/catalyst-toolbox/catalyst-toolbox/tests/notifications/main.rs @@ -39,7 +39,7 @@ pub fn sanity_notification() { let output = std::str::from_utf8(&result.get_output().stdout).unwrap(); let response: CreateMessageResponse = serde_json::from_str(output).unwrap(); println!("{:?}", response); - let id = response.response.messages.get(0).unwrap(); + let id = response.response.messages.first().unwrap(); NotificationsVerifier::new(&access_token) .verify_message_done_with_text(id, &message.to_string()); } diff --git a/src/catalyst-toolbox/catalyst-toolbox/tests/tally/blockchain.rs b/src/catalyst-toolbox/catalyst-toolbox/tests/tally/blockchain.rs index e5e76f21dd..bfda8a7b17 100644 --- a/src/catalyst-toolbox/catalyst-toolbox/tests/tally/blockchain.rs +++ b/src/catalyst-toolbox/catalyst-toolbox/tests/tally/blockchain.rs @@ -45,6 +45,7 @@ pub struct TestBlockchain { pub committee_wallets: HashMap, pub committee_manager: CommitteeMembersManager, pub vote_plans: Vec, + #[allow(dead_code)] pub voting_token: TokenIdentifier, } diff --git a/src/catalyst-toolbox/catalyst-toolbox/tests/tally/generator.rs b/src/catalyst-toolbox/catalyst-toolbox/tests/tally/generator.rs index 4da7a70e8a..d4688ade97 100644 --- a/src/catalyst-toolbox/catalyst-toolbox/tests/tally/generator.rs +++ b/src/catalyst-toolbox/catalyst-toolbox/tests/tally/generator.rs @@ -225,7 +225,7 @@ impl VoteRoundGenerator { let decrypted_tally = DecryptedPrivateTally::new( results .into_iter() - .zip(shares.into_iter()) + .zip(shares) .map(|(tally_result, decrypt_shares)| { DecryptedPrivateTallyProposal { decrypt_shares, diff --git a/src/catalyst-toolbox/catalyst-toolbox/tests/tally/main.rs b/src/catalyst-toolbox/catalyst-toolbox/tests/tally/main.rs index f117cacc86..232d8b5921 100644 --- a/src/catalyst-toolbox/catalyst-toolbox/tests/tally/main.rs +++ b/src/catalyst-toolbox/catalyst-toolbox/tests/tally/main.rs @@ -99,9 +99,7 @@ fn tally_ok() { let (ledger, failed_fragments) = catalyst_toolbox::recovery::tally::recover_ledger_from_logs( &generator.block0(), - vote_fragments - .into_iter() - .chain(tally_fragments.into_iter()), + vote_fragments.into_iter().chain(tally_fragments), ) .unwrap(); @@ -127,9 +125,7 @@ fn shuffle_tally_ok() { let (ledger, _) = catalyst_toolbox::recovery::tally::recover_ledger_from_logs( &generator.block0(), - vote_fragments - .into_iter() - .chain(tally_fragments.into_iter()), + vote_fragments.into_iter().chain(tally_fragments), ) .unwrap(); @@ -153,9 +149,7 @@ fn shuffle_tally_ok_private() { let (ledger, _) = catalyst_toolbox::recovery::tally::recover_ledger_from_logs( &generator.block0(), - vote_fragments - .into_iter() - .chain(tally_fragments.into_iter()), + vote_fragments.into_iter().chain(tally_fragments), ) .unwrap(); @@ -196,7 +190,7 @@ fn wallet_not_in_block0() { time: jump_to_epoch(0, generator.block0_config()), fragment, }))) - .chain(tally_fragments.into_iter()), + .chain(tally_fragments), ) .unwrap(); @@ -242,7 +236,7 @@ fn only_last_vote_is_counted() { fragment, }) }) - .chain(tally_fragments.into_iter()), + .chain(tally_fragments), ) .unwrap(); @@ -289,7 +283,7 @@ fn replay_not_counted() { fragment, }) }) - .chain(tally_fragments.into_iter()), + .chain(tally_fragments), ) .unwrap(); @@ -323,9 +317,7 @@ fn multi_voteplan_ok() { let (ledger, _) = catalyst_toolbox::recovery::tally::recover_ledger_from_logs( &generator.block0(), - vote_fragments - .into_iter() - .chain(tally_fragments.into_iter()), + vote_fragments.into_iter().chain(tally_fragments), ) .unwrap(); @@ -353,9 +345,7 @@ fn multi_voteplan_ok_private() { let (ledger, _) = catalyst_toolbox::recovery::tally::recover_ledger_from_logs( &generator.block0(), - vote_fragments - .into_iter() - .chain(tally_fragments.into_iter()), + vote_fragments.into_iter().chain(tally_fragments), ) .unwrap(); @@ -509,7 +499,7 @@ fn transaction_transfer_does_not_decrease_voting_power() { &generator.block0(), vec![transaction, fragment_yes, fragment_no] .into_iter() - .chain(tally_fragments.into_iter()), + .chain(tally_fragments), ) .unwrap(); @@ -553,9 +543,7 @@ fn expired_transaction() { let (ledger, failed_fragments) = catalyst_toolbox::recovery::tally::recover_ledger_from_logs( &generator.block0(), - vec![fragment_yes] - .into_iter() - .chain(tally_fragments.into_iter()), + vec![fragment_yes].into_iter().chain(tally_fragments), ) .unwrap(); diff --git a/src/catalyst-toolbox/snapshot-lib/Cargo.toml b/src/catalyst-toolbox/snapshot-lib/Cargo.toml index 7422a509d7..8306c3fce7 100644 --- a/src/catalyst-toolbox/snapshot-lib/Cargo.toml +++ b/src/catalyst-toolbox/snapshot-lib/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0" [dependencies] jormungandr-lib = { workspace = true } -proptest = { workspace = true, branch = "master", optional = true } +proptest = { workspace = true, optional = true } chain-addr = { path = "../../chain-libs/chain-addr" } test-strategy = { version = "0.2", optional = true } hex = { version = "0.4" } @@ -39,7 +39,7 @@ serde_test = { workspace = true } serde_json = { workspace = true } serde_yaml = { workspace = true } -proptest = { workspace = true, branch = "master" } +proptest = { workspace = true } chain-addr = { path = "../../chain-libs/chain-addr" } [features] diff --git a/src/catalyst-toolbox/snapshot-lib/src/lib.rs b/src/catalyst-toolbox/snapshot-lib/src/lib.rs index 1cc319a284..6643ae16f3 100644 --- a/src/catalyst-toolbox/snapshot-lib/src/lib.rs +++ b/src/catalyst-toolbox/snapshot-lib/src/lib.rs @@ -360,6 +360,7 @@ pub mod tests { use proptest::prelude::*; //use test_strategy::proptest; + #[allow(dead_code)] struct DummyAssigner; impl VotingGroupAssigner for DummyAssigner { diff --git a/src/catalyst-toolbox/snapshot-lib/src/registration.rs b/src/catalyst-toolbox/snapshot-lib/src/registration.rs index 549c086778..ff10bd1db9 100644 --- a/src/catalyst-toolbox/snapshot-lib/src/registration.rs +++ b/src/catalyst-toolbox/snapshot-lib/src/registration.rs @@ -253,7 +253,7 @@ pub mod serde_impl { let addr_type = match addr_type { // Shelley - 0x0 | 0x1 | 0x2 | 0x3 | 0x4 | 0x5 | 0x6 | 0x7 => AddrType::Shelley, + 0x0..=0x7 => AddrType::Shelley, // Stake 0xf | 0xe => AddrType::Stake, _ => { diff --git a/src/chain-libs/cardano-legacy-address/src/base58.rs b/src/chain-libs/cardano-legacy-address/src/base58.rs index d96e0e4aeb..025297d1c1 100644 --- a/src/chain-libs/cardano-legacy-address/src/base58.rs +++ b/src/chain-libs/cardano-legacy-address/src/base58.rs @@ -31,77 +31,6 @@ pub fn decode(input: &str) -> Result> { base_decode(ALPHABET, input.as_bytes()) } -/// decode from base58 the given input -//pub fn decode_bytes(input: &[u8]) -> Result> { -// base_decode(ALPHABET, input) -//} - -#[cfg(test)] -mod tests { - fn encode(input: &[u8], expected: &str) { - let encoded = super::encode(input); - assert_eq!(encoded, expected); - } - fn decode(expected: &[u8], input: &str) { - let decoded = super::decode(input).unwrap(); - assert_eq!(decoded.as_slice(), expected); - } - - #[test] - fn test_vector_1() { - encode(b"\0\0\0\0", "11111"); - decode(b"\0\0\0\0", "11111"); - } - - #[test] - fn test_vector_2() { - encode(b"This is awesome!", "BRY7dK2V98Sgi7CFWiZbap"); - decode(b"This is awesome!", "BRY7dK2V98Sgi7CFWiZbap"); - } - - #[test] - fn test_vector_3() { - encode(b"Hello World...", "TcgsE5dzphUWfjcb9i5"); - decode(b"Hello World...", "TcgsE5dzphUWfjcb9i5"); - } - - #[test] - fn test_vector_4() { - encode(b"\0abc", "1ZiCa"); - decode(b"\0abc", "1ZiCa"); - } - - #[test] - fn test_vector_5() { - encode(b"\0\0abc", "11ZiCa"); - decode(b"\0\0abc", "11ZiCa"); - } - - #[test] - fn test_vector_6() { - encode(b"\0\0\0abc", "111ZiCa"); - decode(b"\0\0\0abc", "111ZiCa"); - } - - #[test] - fn test_vector_7() { - encode(b"\0\0\0\0abc", "1111ZiCa"); - decode(b"\0\0\0\0abc", "1111ZiCa"); - } - - #[test] - fn test_vector_8() { - encode( - b"abcdefghijklmnopqrstuvwxyz", - "3yxU3u1igY8WkgtjK92fbJQCd4BZiiT1v25f", - ); - decode( - b"abcdefghijklmnopqrstuvwxyz", - "3yxU3u1igY8WkgtjK92fbJQCd4BZiiT1v25f", - ); - } -} - fn base_encode(alphabet_s: &str, input: &[u8]) -> Vec { let alphabet = alphabet_s.as_bytes(); let base = alphabet.len() as u32; @@ -171,3 +100,73 @@ fn base_decode(alphabet_s: &str, input: &[u8]) -> Result> { bytes.reverse(); Ok(bytes) } + +/// decode from base58 the given input +//pub fn decode_bytes(input: &[u8]) -> Result> { +// base_decode(ALPHABET, input) +//} +#[cfg(test)] +mod tests { + fn encode(input: &[u8], expected: &str) { + let encoded = super::encode(input); + assert_eq!(encoded, expected); + } + fn decode(expected: &[u8], input: &str) { + let decoded = super::decode(input).unwrap(); + assert_eq!(decoded.as_slice(), expected); + } + + #[test] + fn test_vector_1() { + encode(b"\0\0\0\0", "11111"); + decode(b"\0\0\0\0", "11111"); + } + + #[test] + fn test_vector_2() { + encode(b"This is awesome!", "BRY7dK2V98Sgi7CFWiZbap"); + decode(b"This is awesome!", "BRY7dK2V98Sgi7CFWiZbap"); + } + + #[test] + fn test_vector_3() { + encode(b"Hello World...", "TcgsE5dzphUWfjcb9i5"); + decode(b"Hello World...", "TcgsE5dzphUWfjcb9i5"); + } + + #[test] + fn test_vector_4() { + encode(b"\0abc", "1ZiCa"); + decode(b"\0abc", "1ZiCa"); + } + + #[test] + fn test_vector_5() { + encode(b"\0\0abc", "11ZiCa"); + decode(b"\0\0abc", "11ZiCa"); + } + + #[test] + fn test_vector_6() { + encode(b"\0\0\0abc", "111ZiCa"); + decode(b"\0\0\0abc", "111ZiCa"); + } + + #[test] + fn test_vector_7() { + encode(b"\0\0\0\0abc", "1111ZiCa"); + decode(b"\0\0\0\0abc", "1111ZiCa"); + } + + #[test] + fn test_vector_8() { + encode( + b"abcdefghijklmnopqrstuvwxyz", + "3yxU3u1igY8WkgtjK92fbJQCd4BZiiT1v25f", + ); + decode( + b"abcdefghijklmnopqrstuvwxyz", + "3yxU3u1igY8WkgtjK92fbJQCd4BZiiT1v25f", + ); + } +} diff --git a/src/chain-libs/cardano-legacy-address/src/crc32.rs b/src/chain-libs/cardano-legacy-address/src/crc32.rs index fc0860f666..1e3bcf0f92 100644 --- a/src/chain-libs/cardano-legacy-address/src/crc32.rs +++ b/src/chain-libs/cardano-legacy-address/src/crc32.rs @@ -277,7 +277,7 @@ impl Crc32 { /// beware that the order in which you update the Crc32 /// matter. #[inline] - pub fn update<'a, I>(&'a mut self, bytes: I) -> &mut Self + pub fn update<'a, I>(&mut self, bytes: I) -> &mut Self where I: IntoIterator, { diff --git a/src/chain-libs/chain-crypto/src/asymlock.rs b/src/chain-libs/chain-crypto/src/asymlock.rs index d25f79875e..5f33b0f148 100644 --- a/src/chain-libs/chain-crypto/src/asymlock.rs +++ b/src/chain-libs/chain-crypto/src/asymlock.rs @@ -69,7 +69,7 @@ pub fn encrypt( /// * data is too small /// * point is not in the first format /// * tag don't match -/// Success otherwise +/// Success otherwise /// /// # Panics /// diff --git a/src/chain-libs/chain-crypto/src/digest.rs b/src/chain-libs/chain-crypto/src/digest.rs index 0f5378f42e..ff24a03f3b 100644 --- a/src/chain-libs/chain-crypto/src/digest.rs +++ b/src/chain-libs/chain-crypto/src/digest.rs @@ -309,7 +309,7 @@ impl Eq for DigestOf {} impl PartialOrd for DigestOf { fn partial_cmp(&self, other: &Self) -> Option { - self.inner.partial_cmp(&other.inner) + Some(self.cmp(other)) } } diff --git a/src/chain-libs/chain-crypto/src/ec/p256k1.rs b/src/chain-libs/chain-crypto/src/ec/p256k1.rs index 530d50ce26..0ab3bb40da 100644 --- a/src/chain-libs/chain-crypto/src/ec/p256k1.rs +++ b/src/chain-libs/chain-crypto/src/ec/p256k1.rs @@ -229,7 +229,7 @@ impl Scalar { rng.fill_bytes(&mut r[..]); if let Some(s) = IScalar::from_bytes(&r) { - break (Scalar(s)); + break Scalar(s); } } } diff --git a/src/chain-libs/chain-crypto/src/ec/ristretto255.rs b/src/chain-libs/chain-crypto/src/ec/ristretto255.rs index 42afdff264..b2845d8ee8 100644 --- a/src/chain-libs/chain-crypto/src/ec/ristretto255.rs +++ b/src/chain-libs/chain-crypto/src/ec/ristretto255.rs @@ -254,7 +254,7 @@ impl From for Scalar { // FE + FE ////////// -impl<'a, 'b> Add<&'b Scalar> for &'a Scalar { +impl<'b> Add<&'b Scalar> for &Scalar { type Output = Scalar; fn add(self, other: &'b Scalar) -> Scalar { @@ -268,7 +268,7 @@ std_ops_gen!(Scalar, Add, Scalar, Scalar, add); // FE - FE ////////// -impl<'a, 'b> Sub<&'b Scalar> for &'a Scalar { +impl<'b> Sub<&'b Scalar> for &Scalar { type Output = Scalar; fn sub(self, other: &'b Scalar) -> Scalar { @@ -282,7 +282,7 @@ std_ops_gen!(Scalar, Sub, Scalar, Scalar, sub); // FE * FE ////////// -impl<'a, 'b> Mul<&'b Scalar> for &'a Scalar { +impl<'b> Mul<&'b Scalar> for &Scalar { type Output = Scalar; fn mul(self, other: &'b Scalar) -> Scalar { @@ -296,7 +296,7 @@ std_ops_gen!(Scalar, Mul, Scalar, Scalar, mul); // FE * GE ////////// -impl<'a, 'b> Mul<&'b GroupElement> for &'a Scalar { +impl<'b> Mul<&'b GroupElement> for &Scalar { type Output = GroupElement; fn mul(self, other: &'b GroupElement) -> GroupElement { @@ -304,7 +304,7 @@ impl<'a, 'b> Mul<&'b GroupElement> for &'a Scalar { } } -impl<'a, 'b> Mul<&'b Scalar> for &'a GroupElement { +impl<'b> Mul<&'b Scalar> for &GroupElement { type Output = GroupElement; fn mul(self, other: &'b Scalar) -> GroupElement { @@ -332,7 +332,7 @@ impl<'a> Mul<&'a GroupElement> for u64 { } } -impl<'a> Mul for &'a GroupElement { +impl Mul for &GroupElement { type Output = GroupElement; fn mul(self, mut other: u64) -> GroupElement { @@ -354,7 +354,7 @@ impl<'a> Mul for &'a GroupElement { // GE + GE ////////// -impl<'a, 'b> Add<&'b GroupElement> for &'a GroupElement { +impl<'b> Add<&'b GroupElement> for &GroupElement { type Output = GroupElement; fn add(self, other: &'b GroupElement) -> GroupElement { @@ -368,7 +368,7 @@ std_ops_gen!(GroupElement, Add, GroupElement, GroupElement, add); // GE - GE ////////// -impl<'a, 'b> Sub<&'b GroupElement> for &'a GroupElement { +impl<'b> Sub<&'b GroupElement> for &GroupElement { type Output = GroupElement; fn sub(self, other: &'b GroupElement) -> GroupElement { diff --git a/src/chain-libs/chain-crypto/src/key.rs b/src/chain-libs/chain-crypto/src/key.rs index 70fe79180b..108d748def 100644 --- a/src/chain-libs/chain-crypto/src/key.rs +++ b/src/chain-libs/chain-crypto/src/key.rs @@ -235,7 +235,7 @@ impl std::cmp::Eq for PublicKey {} impl std::cmp::PartialOrd for PublicKey { fn partial_cmp(&self, other: &Self) -> Option { - self.0.as_ref().partial_cmp(other.0.as_ref()) + Some(self.cmp(other)) } } diff --git a/src/chain-libs/chain-crypto/src/lib.rs b/src/chain-libs/chain-crypto/src/lib.rs index 47267a6ab5..b1f9dc6f5e 100644 --- a/src/chain-libs/chain-crypto/src/lib.rs +++ b/src/chain-libs/chain-crypto/src/lib.rs @@ -13,7 +13,7 @@ mod kes; mod key; pub mod multilock; mod sign; -mod vrf; +pub mod vrf; pub mod role; diff --git a/src/chain-libs/chain-crypto/src/multilock.rs b/src/chain-libs/chain-crypto/src/multilock.rs index dc9c2eb2fc..e6d12d4d48 100644 --- a/src/chain-libs/chain-crypto/src/multilock.rs +++ b/src/chain-libs/chain-crypto/src/multilock.rs @@ -148,7 +148,7 @@ pub fn encrypt( /// * data is too small /// * any of the point is not in the first format /// * tag don't match -/// Success otherwise +/// Success otherwise /// /// # Panics /// diff --git a/src/chain-libs/chain-crypto/src/role.rs b/src/chain-libs/chain-crypto/src/role.rs index 207b2df5f8..f3003cad5c 100644 --- a/src/chain-libs/chain-crypto/src/role.rs +++ b/src/chain-libs/chain-crypto/src/role.rs @@ -75,7 +75,7 @@ impl std::cmp::Eq for PublicKey {} impl std::cmp::PartialOrd for PublicKey { fn partial_cmp(&self, other: &Self) -> Option { - self.inner.partial_cmp(&other.inner) + Some(self.cmp(other)) } } diff --git a/src/chain-libs/chain-impl-mockchain/src/accounting/account/last_rewards.rs b/src/chain-libs/chain-impl-mockchain/src/accounting/account/last_rewards.rs index a17866bbb4..3d8469b930 100644 --- a/src/chain-libs/chain-impl-mockchain/src/accounting/account/last_rewards.rs +++ b/src/chain-libs/chain-impl-mockchain/src/accounting/account/last_rewards.rs @@ -100,11 +100,11 @@ mod tests { #[test] #[should_panic] pub fn add_for_value_overflow() { - let value_to_add = Value(std::u64::MAX); + let value_to_add = Value(u64::MAX); let epoch = 0; let mut last_rewards = LastRewards { epoch: 0, - reward: Value(std::u64::MAX), + reward: Value(u64::MAX), }; last_rewards.add_for(epoch, value_to_add); } diff --git a/src/chain-libs/chain-impl-mockchain/src/header/version.rs b/src/chain-libs/chain-impl-mockchain/src/header/version.rs index f66fcfff34..30f1ab996c 100644 --- a/src/chain-libs/chain-impl-mockchain/src/header/version.rs +++ b/src/chain-libs/chain-impl-mockchain/src/header/version.rs @@ -77,18 +77,18 @@ impl BlockVersion { pub const fn get_size(self) -> NonZeroUsize { const SIZE: [NonZeroUsize; 3] = [ - unsafe { NonZeroUsize::new_unchecked(cstruct::HEADER_COMMON_SIZE) }, - unsafe { NonZeroUsize::new_unchecked(cstruct::HEADER_BFT_SIZE) }, - unsafe { NonZeroUsize::new_unchecked(cstruct::HEADER_GP_SIZE) }, + NonZeroUsize::new(cstruct::HEADER_COMMON_SIZE).unwrap(), + NonZeroUsize::new(cstruct::HEADER_BFT_SIZE).unwrap(), + NonZeroUsize::new(cstruct::HEADER_GP_SIZE).unwrap(), ]; SIZE[self as usize] } pub const fn get_auth_size(self) -> NonZeroUsize { const SIZE: [NonZeroUsize; 3] = [ - unsafe { NonZeroUsize::new_unchecked(cstruct::HEADER_COMMON_SIZE) }, - unsafe { NonZeroUsize::new_unchecked(cstruct::HEADER_BFT_AUTHED_SIZE) }, - unsafe { NonZeroUsize::new_unchecked(cstruct::HEADER_GP_AUTHED_SIZE) }, + NonZeroUsize::new(cstruct::HEADER_COMMON_SIZE).unwrap(), + NonZeroUsize::new(cstruct::HEADER_BFT_AUTHED_SIZE).unwrap(), + NonZeroUsize::new(cstruct::HEADER_GP_AUTHED_SIZE).unwrap(), ]; SIZE[self as usize] } diff --git a/src/chain-libs/chain-impl-mockchain/src/leadership/bft.rs b/src/chain-libs/chain-impl-mockchain/src/leadership/bft.rs index 9e7be64a7f..e45fa97cb0 100644 --- a/src/chain-libs/chain-impl-mockchain/src/leadership/bft.rs +++ b/src/chain-libs/chain-impl-mockchain/src/leadership/bft.rs @@ -17,7 +17,7 @@ pub struct LeadershipData { impl LeadershipData { /// Create a new BFT leadership pub fn new(leaders: Arc<[BftLeaderId]>) -> Option { - if leaders.len() == 0 { + if leaders.is_empty() { return None; } diff --git a/src/chain-libs/chain-impl-mockchain/src/ledger/governance/mod.rs b/src/chain-libs/chain-impl-mockchain/src/ledger/governance/mod.rs index 417c811de5..4958208579 100644 --- a/src/chain-libs/chain-impl-mockchain/src/ledger/governance/mod.rs +++ b/src/chain-libs/chain-impl-mockchain/src/ledger/governance/mod.rs @@ -34,7 +34,7 @@ pub struct GovernanceAcceptanceCriteria { impl Default for GovernanceAcceptanceCriteria { fn default() -> Self { - const CENT: NonZeroU64 = unsafe { NonZeroU64::new_unchecked(100) }; + const CENT: NonZeroU64 = NonZeroU64::new(100).unwrap(); Self { minimum_stake_participation: Some(Ratio { diff --git a/src/chain-libs/chain-impl-mockchain/src/ledger/tests/transaction_tests.rs b/src/chain-libs/chain-impl-mockchain/src/ledger/tests/transaction_tests.rs index bba46e81af..148bdd1481 100644 --- a/src/chain-libs/chain-impl-mockchain/src/ledger/tests/transaction_tests.rs +++ b/src/chain-libs/chain-impl-mockchain/src/ledger/tests/transaction_tests.rs @@ -29,7 +29,7 @@ pub fn transaction_fail_when_255_outputs() { address: receiver.address, value: Value(1), }; - let outputs: Vec<_> = std::iter::repeat(output).take(255).collect(); + let outputs: Vec<_> = std::iter::repeat_n(output, 255).collect(); let fragment = TestTxBuilder::new(test_ledger.block0_hash) .move_to_outputs_from_faucet(&mut test_ledger, &outputs) diff --git a/src/chain-libs/chain-impl-mockchain/src/ledger/token_distribution.rs b/src/chain-libs/chain-impl-mockchain/src/ledger/token_distribution.rs index 72990bce85..32e14b7f2d 100644 --- a/src/chain-libs/chain-impl-mockchain/src/ledger/token_distribution.rs +++ b/src/chain-libs/chain-impl-mockchain/src/ledger/token_distribution.rs @@ -33,7 +33,7 @@ impl<'a> TokenDistribution<'a, ()> { } } - pub fn token(self, token: &'a TokenIdentifier) -> TokenDistribution { + pub fn token(self, token: &'a TokenIdentifier) -> TokenDistribution<'a, TokenIdentifier> { TokenDistribution { token_totals: self.token_totals, account_ledger: self.account_ledger, diff --git a/src/chain-libs/chain-impl-mockchain/src/lib.rs b/src/chain-libs/chain-impl-mockchain/src/lib.rs index b6b8b5b9e9..fc8123368a 100644 --- a/src/chain-libs/chain-impl-mockchain/src/lib.rs +++ b/src/chain-libs/chain-impl-mockchain/src/lib.rs @@ -1,4 +1,3 @@ -#![warn(clippy::all)] #![allow(clippy::derive_partial_eq_without_eq)] #![allow(clippy::result_large_err)] diff --git a/src/chain-libs/chain-impl-mockchain/src/multisig/witness.rs b/src/chain-libs/chain-impl-mockchain/src/multisig/witness.rs index a525c17d05..4452f8e08a 100644 --- a/src/chain-libs/chain-impl-mockchain/src/multisig/witness.rs +++ b/src/chain-libs/chain-impl-mockchain/src/multisig/witness.rs @@ -143,7 +143,6 @@ impl WitnessBuilder { } /// Verify that the declaration and the witnesses in parameters fulfill the requirements: -/// /// * The threshold is met: there's at least T or more witnesses available /// * the witnesses and declaration together can re-create pub fn verify_identifier_threshold( diff --git a/src/chain-libs/chain-impl-mockchain/src/multiverse.rs b/src/chain-libs/chain-impl-mockchain/src/multiverse.rs index 1abf72afca..82d30fdc03 100644 --- a/src/chain-libs/chain-impl-mockchain/src/multiverse.rs +++ b/src/chain-libs/chain-impl-mockchain/src/multiverse.rs @@ -110,7 +110,7 @@ impl Multiverse { pub fn insert(&mut self, chain_length: ChainLength, k: HeaderId, st: State) -> Ref { self.states_by_chain_length .entry(chain_length) - .or_insert_with(HashSet::new) + .or_default() .insert(k); let state = Arc::new(st); self.states_by_hash diff --git a/src/chain-libs/chain-impl-mockchain/src/rewards.rs b/src/chain-libs/chain-impl-mockchain/src/rewards.rs index 89b85dcbc2..b118f1f1da 100644 --- a/src/chain-libs/chain-impl-mockchain/src/rewards.rs +++ b/src/chain-libs/chain-impl-mockchain/src/rewards.rs @@ -150,7 +150,7 @@ impl Parameters { initial_value: 0, compounding_ratio: Ratio::zero(), compounding_type: CompoundingType::Linear, - epoch_rate: NonZeroU32::new(u32::max_value()).unwrap(), + epoch_rate: NonZeroU32::new(u32::MAX).unwrap(), epoch_start: 0, reward_drawing_limit_max: Limit::None, pool_participation_capping: None, diff --git a/src/chain-libs/chain-impl-mockchain/src/setting.rs b/src/chain-libs/chain-impl-mockchain/src/setting.rs index 1215ff505f..2d9f2a2c28 100644 --- a/src/chain-libs/chain-impl-mockchain/src/setting.rs +++ b/src/chain-libs/chain-impl-mockchain/src/setting.rs @@ -266,13 +266,11 @@ impl Settings { self.transaction_max_expiry_epochs, )); - match &self.reward_params { - Some(p) => params.push(ConfigParam::RewardParams(p.clone())), - None => (), + if let Some(p) = &self.reward_params { + params.push(ConfigParam::RewardParams(p.clone())) }; - match &self.treasury_params { - Some(p) => params.push(ConfigParam::TreasuryParams(*p)), - None => (), + if let Some(p) = &self.treasury_params { + params.push(ConfigParam::TreasuryParams(*p)) }; debug_assert_eq!(self, &Settings::new().try_apply(¶ms).unwrap()); diff --git a/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/address.rs b/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/address.rs index 7ae7cba9f3..333affabac 100644 --- a/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/address.rs +++ b/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/address.rs @@ -106,23 +106,23 @@ impl ArbitraryAddressDataValueVec { pub fn utxos(&self) -> Vec { self.0 .iter() + .filter(|&x| matches!(x.address_data.kind(), Kind::Single { .. })) .cloned() - .filter(|x| matches!(x.address_data.kind(), Kind::Single { .. })) .collect() } pub fn accounts(&self) -> Vec { self.0 .iter() + .filter(|&x| matches!(x.address_data.kind(), Kind::Account { .. })) .cloned() - .filter(|x| matches!(x.address_data.kind(), Kind::Account { .. })) .collect() } pub fn delegations(&self) -> Vec { self.0 .iter() + .filter(|&x| matches!(x.address_data.kind(), Kind::Group { .. })) .cloned() - .filter(|x| matches!(x.address_data.kind(), Kind::Group { .. })) .collect() } } diff --git a/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/ledger_builder.rs b/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/ledger_builder.rs index 957d064db5..80a442a749 100644 --- a/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/ledger_builder.rs +++ b/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/ledger_builder.rs @@ -23,7 +23,7 @@ impl Arbitrary for LedgerBuilder { let faucets = WalletCollection::arbitrary(g); let splits = utils::split_vec(&faucets.0, g, 3); - let stake_pools_owners = splits.get(0).unwrap(); + let stake_pools_owners = splits.first().unwrap(); let stake_pools: Vec = stake_pools_owners .iter() .cloned() diff --git a/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/transaction.rs b/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/transaction.rs index 1845f0a14b..d97d7196b4 100644 --- a/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/transaction.rs +++ b/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/transaction.rs @@ -190,8 +190,8 @@ impl AccountStatesVerifier { .0 .addresses .iter() + .filter(|&x| filter_accounts(x)) .cloned() - .filter(filter_accounts) .map(|x| find_equal_and_sub(x, inputs)) .collect(); @@ -232,8 +232,8 @@ impl AccountStatesVerifier { fn find_equal_and_sub(x: AddressDataValue, collection: &[AddressDataValue]) -> AddressDataValue { match collection .iter() + .find(|&y| y.address_data == x.address_data) .cloned() - .find(|y| y.address_data == x.address_data) { Some(y) => AddressDataValue::new(x.address_data, (x.value - y.value).unwrap()), None => x, @@ -243,8 +243,8 @@ fn find_equal_and_sub(x: AddressDataValue, collection: &[AddressDataValue]) -> A fn find_equal_and_add(x: AddressDataValue, collection: &[AddressDataValue]) -> AddressDataValue { match collection .iter() + .find(|&y| y.address_data == x.address_data) .cloned() - .find(|y| y.address_data == x.address_data) { Some(y) => AddressDataValue::new(x.address_data, (x.value + y.value).unwrap()), None => x, @@ -276,12 +276,15 @@ impl UtxoVerifier { let utxo_not_changed: Vec = all .iter() + .filter(|&x| filter_utxo(x)) + .filter(|&x| !inputs.contains(x)) + .cloned() + .collect(); + let utxo_added: Vec = outputs + .iter() + .filter(|&x| filter_utxo(x)) .cloned() - .filter(filter_utxo) - .filter(|x| !inputs.contains(x)) .collect(); - let utxo_added: Vec = - outputs.iter().cloned().filter(filter_utxo).collect(); let mut snapshot = Vec::new(); snapshot.extend(utxo_not_changed); diff --git a/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/utils.rs b/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/utils.rs index d4c9f359a4..e3eaa7761c 100644 --- a/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/utils.rs +++ b/src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/utils.rs @@ -139,8 +139,8 @@ impl Verify { pub fn get_result(&self) -> TestResult { self.0 .iter() + .find(|&x| TestResult::is_failure(x)) .cloned() - .find(TestResult::is_failure) .unwrap_or_else(TestResult::passed) } } diff --git a/src/chain-libs/chain-impl-mockchain/src/testing/builders/tx_builder.rs b/src/chain-libs/chain-impl-mockchain/src/testing/builders/tx_builder.rs index 3eaa4282aa..a76174744d 100644 --- a/src/chain-libs/chain-impl-mockchain/src/testing/builders/tx_builder.rs +++ b/src/chain-libs/chain-impl-mockchain/src/testing/builders/tx_builder.rs @@ -85,7 +85,7 @@ impl TestTxBuilder { ); let mut faucet = test_ledger .faucets - .get(0) + .first() .cloned() .as_mut() .expect("test ledger with no faucet configured") @@ -126,7 +126,7 @@ impl TestTxBuilder { ); let mut faucet = test_ledger .faucets - .get(0) + .first() .as_mut() .expect("test ledger with no faucet configured") .clone(); diff --git a/src/chain-libs/chain-impl-mockchain/src/testing/builders/vote.rs b/src/chain-libs/chain-impl-mockchain/src/testing/builders/vote.rs index 324f3c38ec..2750fdbfbe 100644 --- a/src/chain-libs/chain-impl-mockchain/src/testing/builders/vote.rs +++ b/src/chain-libs/chain-impl-mockchain/src/testing/builders/vote.rs @@ -42,7 +42,7 @@ pub fn decrypt_tally( let proposals = shares .into_iter() - .zip(tallies.into_iter()) + .zip(tallies) .map(|(shares, tally)| DecryptedPrivateTallyProposal { decrypt_shares: shares.into_boxed_slice(), tally_result: tally.votes.into_boxed_slice(), diff --git a/src/chain-libs/chain-impl-mockchain/src/testing/gen/mod.rs b/src/chain-libs/chain-impl-mockchain/src/testing/gen/mod.rs index 031e24bf8a..81853d7fb1 100644 --- a/src/chain-libs/chain-impl-mockchain/src/testing/gen/mod.rs +++ b/src/chain-libs/chain-impl-mockchain/src/testing/gen/mod.rs @@ -211,7 +211,7 @@ impl TestGen { rng.fill_bytes(&mut policy_hash); TokenIdentifier { - policy_hash: TryFrom::try_from(policy_hash).unwrap(), + policy_hash: From::from(policy_hash), token_name: Self::token_name(), } } diff --git a/src/chain-libs/chain-impl-mockchain/src/testing/scenario/controller.rs b/src/chain-libs/chain-impl-mockchain/src/testing/scenario/controller.rs index 11bed05390..bb920489d4 100644 --- a/src/chain-libs/chain-impl-mockchain/src/testing/scenario/controller.rs +++ b/src/chain-libs/chain-impl-mockchain/src/testing/scenario/controller.rs @@ -71,8 +71,8 @@ impl Controller { pub fn wallet(&self, alias: &str) -> Result { self.declared_wallets .iter() + .find(|&x| x.alias() == alias) .cloned() - .find(|x| x.alias() == alias) .ok_or(ControllerError::UnknownWallet { alias: alias.to_owned(), }) @@ -81,8 +81,8 @@ impl Controller { pub fn vote_plan(&self, alias: &str) -> Result { self.declared_vote_plans .iter() + .find(|&x| x.alias() == alias) .cloned() - .find(|x| x.alias() == alias) .ok_or(ControllerError::UnknownVotePlan { alias: alias.to_owned(), }) @@ -95,8 +95,8 @@ impl Controller { pub fn stake_pool(&self, alias: &str) -> Result { self.declared_stake_pools .iter() + .find(|&x| x.alias() == alias) .cloned() - .find(|x| x.alias() == alias) .ok_or(ControllerError::UnknownStakePool { alias: alias.to_owned(), }) diff --git a/src/chain-libs/chain-impl-mockchain/src/testing/scenario/scenario_builder.rs b/src/chain-libs/chain-impl-mockchain/src/testing/scenario/scenario_builder.rs index bae13f5c3f..993460cb9e 100644 --- a/src/chain-libs/chain-impl-mockchain/src/testing/scenario/scenario_builder.rs +++ b/src/chain-libs/chain-impl-mockchain/src/testing/scenario/scenario_builder.rs @@ -113,8 +113,8 @@ impl ScenarioBuilder { let vote_plan_def = x.build(); let owner = wallets .iter() + .find(|&w| w.alias() == vote_plan_def.owner()) .cloned() - .find(|w| w.alias() == vote_plan_def.owner()) .expect("cannot find wallet for vote plan"); let vote_plan: VotePlan = vote_plan_def.into(); create_initial_vote_plan(&vote_plan, &[owner]) @@ -162,8 +162,8 @@ impl ScenarioBuilder { .map(|pk| { wallets .iter() + .find(|&x| x.public_key() == pk) .cloned() - .find(|x| x.public_key() == pk) .expect("unknown key") }) .collect(); @@ -180,8 +180,8 @@ impl ScenarioBuilder { ) -> Vec { initials .iter() + .filter(|&x| x.delegates_stake_pool().is_some()) .cloned() - .filter(|x| x.delegates_stake_pool().is_some()) .map(|wallet_template| { let stake_pool_alias = wallet_template.delegates_stake_pool().unwrap(); let stake_pool = stake_pools diff --git a/src/chain-libs/chain-impl-mockchain/src/testing/scenario/template/mod.rs b/src/chain-libs/chain-impl-mockchain/src/testing/scenario/template/mod.rs index 6828adebf8..e3eec48ebc 100644 --- a/src/chain-libs/chain-impl-mockchain/src/testing/scenario/template/mod.rs +++ b/src/chain-libs/chain-impl-mockchain/src/testing/scenario/template/mod.rs @@ -156,7 +156,7 @@ impl VotePlanDef { } pub fn proposals(&self) -> Vec { - self.proposals.iter().cloned().map(Into::into).collect() + self.proposals.to_vec() } pub fn proposal(&self, index: usize) -> ProposalDef { diff --git a/src/chain-libs/chain-impl-mockchain/src/tokens/minting_policy.rs b/src/chain-libs/chain-impl-mockchain/src/tokens/minting_policy.rs index 5e2725358c..0087450dd8 100644 --- a/src/chain-libs/chain-impl-mockchain/src/tokens/minting_policy.rs +++ b/src/chain-libs/chain-impl-mockchain/src/tokens/minting_policy.rs @@ -50,7 +50,7 @@ impl MintingPolicy { return Err(MintingPolicyViolation::AdditionalMintingNotAllowed); } - for _entry in &self.0 { + if let Some(_entry) = self.0.first() { unreachable!("implement this when we have actual minting policies"); } diff --git a/src/chain-libs/chain-impl-mockchain/src/transaction/witness.rs b/src/chain-libs/chain-impl-mockchain/src/transaction/witness.rs index d5688c42ae..4b4226aa6f 100644 --- a/src/chain-libs/chain-impl-mockchain/src/transaction/witness.rs +++ b/src/chain-libs/chain-impl-mockchain/src/transaction/witness.rs @@ -143,7 +143,6 @@ impl AsRef<[u8]> for WitnessMultisigData { impl Witness { /// Creates new `Witness` value. - pub fn new_utxo_data( block0: &HeaderId, sign_data_hash: &TransactionSignDataHash, diff --git a/src/chain-libs/chain-impl-mockchain/src/value.rs b/src/chain-libs/chain-impl-mockchain/src/value.rs index d57a3ec253..653ec73270 100644 --- a/src/chain-libs/chain-impl-mockchain/src/value.rs +++ b/src/chain-libs/chain-impl-mockchain/src/value.rs @@ -27,11 +27,11 @@ impl Value { Value(0) } - pub fn sum(values: I) -> Result + pub fn sum(mut values: I) -> Result where I: Iterator, { - values.fold(Ok(Value::zero()), |acc, v| acc? + v) + values.try_fold(Value::zero(), |acc, v| acc + v) } #[inline] diff --git a/src/chain-libs/chain-impl-mockchain/src/vote/manager.rs b/src/chain-libs/chain-impl-mockchain/src/vote/manager.rs index 07969d5a3a..ed8f8c38a8 100644 --- a/src/chain-libs/chain-impl-mockchain/src/vote/manager.rs +++ b/src/chain-libs/chain-impl-mockchain/src/vote/manager.rs @@ -909,7 +909,7 @@ mod tests { let vote_cast = VoteCast::new(vote_plan.to_id(), 0, vote_cast_payload); let mut proposal_manager = - ProposalManager::new_public(vote_plan.proposals().get(0).unwrap()); + ProposalManager::new_public(vote_plan.proposals().first().unwrap()); let identifier = TestGen::identifier(); @@ -947,7 +947,7 @@ mod tests { let mut rng = OsRng; let vote_cast_payload = VoteTestGen::private_vote_cast_payload_for( &vote_plan, - vote_plan.proposals().get(0).unwrap(), + vote_plan.proposals().first().unwrap(), vote_choice, &mut rng, ); @@ -955,7 +955,7 @@ mod tests { let identifier = TestGen::identifier(); - let proposal_manager = ProposalManager::new_public(vote_plan.proposals().get(0).unwrap()); + let proposal_manager = ProposalManager::new_public(vote_plan.proposals().first().unwrap()); assert_eq!( proposal_manager @@ -983,7 +983,7 @@ mod tests { let election_pk = ElectionPublicKey::from_participants(vote_plan.committee_public_keys()); let proposal_manager = - ProposalManager::new_private(vote_plan.proposals().get(0).unwrap(), election_pk, crs); + ProposalManager::new_private(vote_plan.proposals().first().unwrap(), election_pk, crs); assert_eq!( proposal_manager @@ -1002,7 +1002,7 @@ mod tests { ); } - const CENT: NonZeroU64 = unsafe { NonZeroU64::new_unchecked(100) }; + const CENT: NonZeroU64 = NonZeroU64::new(100).unwrap(); use crate::certificate::Proposals; use crate::ledger::governance::{ParametersGovernance, ParametersGovernanceAction}; use crate::ledger::governance::{TreasuryGovernance, TreasuryGovernanceAction}; @@ -1290,7 +1290,6 @@ mod tests { #[test] #[cfg(not(feature = "audit"))] - pub fn vote_plan_manager_tally_invalid_date_private() { let ( members, @@ -1476,7 +1475,7 @@ mod tests { ); let mut first_proposal_manager = - ProposalManager::new_public(vote_plan.proposals().get(0).unwrap()); + ProposalManager::new_public(vote_plan.proposals().first().unwrap()); let mut second_proposal_manager = ProposalManager::new_public(vote_plan.proposals().get(1).unwrap()); diff --git a/src/chain-libs/chain-network/src/grpc/server.rs b/src/chain-libs/chain-network/src/grpc/server.rs index fe04779d9a..4f03c30f7a 100644 --- a/src/chain-libs/chain-network/src/grpc/server.rs +++ b/src/chain-libs/chain-network/src/grpc/server.rs @@ -70,22 +70,22 @@ where } } - fn block_service(&self) -> Result<&T::BlockService, Status> { + fn block_service(&self) -> Result<&T::BlockService, Box> { self.inner .block_service() - .ok_or_else(|| Status::new(Code::Unimplemented, "not implemented")) + .ok_or_else(|| Box::new(Status::new(Code::Unimplemented, "not implemented"))) } - fn fragment_service(&self) -> Result<&T::FragmentService, Status> { + fn fragment_service(&self) -> Result<&T::FragmentService, Box> { self.inner .fragment_service() - .ok_or_else(|| Status::new(Code::Unimplemented, "not implemented")) + .ok_or_else(|| Box::new(Status::new(Code::Unimplemented, "not implemented"))) } - fn gossip_service(&self) -> Result<&T::GossipService, Status> { + fn gossip_service(&self) -> Result<&T::GossipService, Box> { self.inner .gossip_service() - .ok_or_else(|| Status::new(Code::Unimplemented, "not implemented")) + .ok_or_else(|| Box::new(Status::new(Code::Unimplemented, "not implemented"))) } #[allow(unused_mut)] @@ -101,12 +101,12 @@ where } } -fn remote_addr_to_peer(maybe_addr: Option) -> Result { +fn remote_addr_to_peer(maybe_addr: Option) -> Result> { match maybe_addr { Some(addr) => Ok(addr.into()), - None => Err(Status::internal( + None => Err(Box::new(Status::internal( "transport does not provide the remote address", - )), + ))), } } @@ -119,7 +119,7 @@ where &self, req: tonic::Request, ) -> Result, tonic::Status> { - let peer = remote_addr_to_peer(req.remote_addr())?; + let peer = remote_addr_to_peer(req.remote_addr()).map_err(|e| *e)?; let req = req.into_inner(); let nonce = &req.nonce; let hr = self.inner.handshake(peer, nonce).await?; @@ -137,7 +137,7 @@ where &self, req: tonic::Request, ) -> Result, tonic::Status> { - let peer = remote_addr_to_peer(req.remote_addr())?; + let peer = remote_addr_to_peer(req.remote_addr()).map_err(|e| *e)?; let req = req.into_inner(); let node_id = NodeId::try_from(&req.node_id[..])?; let auth = node_id.authenticated(&req.signature)?; @@ -150,7 +150,7 @@ where &self, _: tonic::Request, ) -> Result, tonic::Status> { - let service = self.block_service()?; + let service = self.block_service().map_err(|e| *e)?; let header = service.tip().await?; let res = proto::node::TipResponse { block_header: header.into(), @@ -162,7 +162,7 @@ where &self, req: tonic::Request, ) -> Result, tonic::Status> { - let service = self.gossip_service()?; + let service = self.gossip_service().map_err(|e| *e)?; let peers = service.peers(req.into_inner().limit).await?; let res = proto::node::PeersResponse { peers: peers @@ -181,7 +181,7 @@ where &self, req: tonic::Request, ) -> Result, tonic::Status> { - let service = self.block_service()?; + let service = self.block_service().map_err(|e| *e)?; let ids = block::try_ids_from_iter(req.into_inner().ids)?; let stream = service.get_blocks(ids).await?; Ok(tonic::Response::new(OutboundTryStream::new(stream))) @@ -193,7 +193,7 @@ where &self, req: tonic::Request, ) -> Result, tonic::Status> { - let service = self.block_service()?; + let service = self.block_service().map_err(|e| *e)?; let ids = block::try_ids_from_iter(req.into_inner().ids)?; let stream = service.get_headers(ids).await?; Ok(tonic::Response::new(OutboundTryStream::new(stream))) @@ -206,7 +206,7 @@ where &self, req: tonic::Request, ) -> Result, tonic::Status> { - let service = self.fragment_service()?; + let service = self.fragment_service().map_err(|e| *e)?; let ids = fragment::try_ids_from_iter(req.into_inner().ids)?; let stream = service.get_fragments(ids).await?; Ok(tonic::Response::new(OutboundTryStream::new(stream))) @@ -219,7 +219,7 @@ where &self, req: tonic::Request, ) -> Result, tonic::Status> { - let service = self.block_service()?; + let service = self.block_service().map_err(|e| *e)?; let (from, to) = { let req = req.into_inner(); ( @@ -237,7 +237,7 @@ where &self, req: tonic::Request, ) -> Result, tonic::Status> { - let service = self.block_service()?; + let service = self.block_service().map_err(|e| *e)?; let req = req.into_inner(); let from = block::try_ids_from_iter(req.from)?; let to = BlockId::try_from(&req.to[..])?; @@ -252,7 +252,7 @@ where &self, req: tonic::Request, ) -> Result, tonic::Status> { - let service = self.block_service()?; + let service = self.block_service().map_err(|e| *e)?; let from = block::try_ids_from_iter(req.into_inner().from)?; let stream = service.pull_blocks_to_tip(from).await?; Ok(tonic::Response::new(OutboundTryStream::new(stream))) @@ -262,7 +262,7 @@ where &self, req: tonic::Request>, ) -> Result, tonic::Status> { - let service = self.block_service()?; + let service = self.block_service().map_err(|e| *e)?; let stream = InboundStream::new(req.into_inner()); service.push_headers(Box::pin(stream)).await?; Ok(tonic::Response::new(proto::node::PushHeadersResponse {})) @@ -272,7 +272,7 @@ where &self, req: tonic::Request>, ) -> Result, tonic::Status> { - let service = self.block_service()?; + let service = self.block_service().map_err(|e| *e)?; let stream = InboundStream::new(req.into_inner()); service.upload_blocks(Box::pin(stream)).await?; Ok(tonic::Response::new(proto::node::UploadBlocksResponse {})) @@ -285,8 +285,8 @@ where &self, req: tonic::Request>, ) -> Result, tonic::Status> { - let service = self.block_service()?; - let peer = remote_addr_to_peer(req.remote_addr())?; + let service = self.block_service().map_err(|e| *e)?; + let peer = remote_addr_to_peer(req.remote_addr()).map_err(|e| *e)?; let inbound = InboundStream::new(req.into_inner()); let outbound = service.block_subscription(peer, Box::pin(inbound)).await?; let res = self.subscription_response(outbound); @@ -300,8 +300,8 @@ where &self, req: tonic::Request>, ) -> Result, tonic::Status> { - let service = self.fragment_service()?; - let peer = remote_addr_to_peer(req.remote_addr())?; + let service = self.fragment_service().map_err(|e| *e)?; + let peer = remote_addr_to_peer(req.remote_addr()).map_err(|e| *e)?; let inbound = InboundStream::new(req.into_inner()); let outbound = service .fragment_subscription(peer, Box::pin(inbound)) @@ -317,8 +317,8 @@ where &self, req: tonic::Request>, ) -> Result, tonic::Status> { - let service = self.gossip_service()?; - let peer = remote_addr_to_peer(req.remote_addr())?; + let service = self.gossip_service().map_err(|e| *e)?; + let peer = remote_addr_to_peer(req.remote_addr()).map_err(|e| *e)?; let inbound = InboundStream::new(req.into_inner()); let outbound = service.gossip_subscription(peer, Box::pin(inbound)).await?; let res = self.subscription_response(outbound); diff --git a/src/chain-libs/chain-ser/src/abor.rs b/src/chain-libs/chain-ser/src/abor.rs index 5fb52f409a..aa81f671ca 100644 --- a/src/chain-libs/chain-ser/src/abor.rs +++ b/src/chain-libs/chain-ser/src/abor.rs @@ -302,7 +302,7 @@ mod tests { let v2 = 0x12345; let v3 = 0xffee_ddcc_0011_2233; let v4 = 0xff_eedd_cc00_1122_3321_4902_1948_0912; - let bs1 = vec![1, 2, 3, 4, 5, 6, 7, 8, 9]; + let bs1 = [1, 2, 3, 4, 5, 6, 7, 8, 9]; let e = Encoder::new() .u16(v1) .u32(v2) diff --git a/src/chain-libs/chain-storage/src/block_store.rs b/src/chain-libs/chain-storage/src/block_store.rs index aa8d0ca071..f5ba3dd470 100644 --- a/src/chain-libs/chain-storage/src/block_store.rs +++ b/src/chain-libs/chain-storage/src/block_store.rs @@ -250,7 +250,6 @@ impl BlockStore { .map(Value::volatile) }) .collect::, _>>() - .map_err(Into::into) } /// Add a tag for a given block. The block id can be later retrieved by this diff --git a/src/chain-libs/chain-storage/src/tests.rs b/src/chain-libs/chain-storage/src/tests.rs index 813d3fbbd4..02c80d4f95 100644 --- a/src/chain-libs/chain-storage/src/tests.rs +++ b/src/chain-libs/chain-storage/src/tests.rs @@ -320,7 +320,7 @@ fn branch_pruning() { hs.insert(second_branch_blocks.last().unwrap().id.serialize_as_value()); hs }; - let actual_tips = HashSet::from_iter(store.get_tips_ids().unwrap().into_iter()); + let actual_tips = HashSet::from_iter(store.get_tips_ids().unwrap()); assert_eq!(expected_tips, actual_tips); store @@ -394,12 +394,7 @@ fn get_blocks_by_chain_length() { .into_iter() .map(|block| Value::owned(block.into_boxed_slice())), ); - let actual = HashSet::from_iter( - store - .get_blocks_by_chain_length(chain_length) - .unwrap() - .into_iter(), - ); + let actual = HashSet::from_iter(store.get_blocks_by_chain_length(chain_length).unwrap()); assert_eq!(expected, actual); } diff --git a/src/chain-libs/chain-vote/build.rs b/src/chain-libs/chain-vote/build.rs index 1d308005a4..27e3c3bb50 100644 --- a/src/chain-libs/chain-vote/build.rs +++ b/src/chain-libs/chain-vote/build.rs @@ -8,11 +8,12 @@ /// * If no non-default feature is selected, activate the default backend /// /// Flags exported by this module are guaranteed to be mutually exclusive. - const BACKEND_FLAG_P256K1: &str = "__internal_ex_backend_p256k1"; const BACKEND_FLAG_RISTRETTO255: &str = "__internal_ex_backend_ristretto255"; fn main() { + // Register the custom cfg for rustc + println!("cargo:rustc-check-cfg=cfg(crypto_backend, values(\"__internal_ex_backend_p256k1\", \"__internal_ex_backend_ristretto255\"))"); cfg_if::cfg_if! { if #[cfg(feature = "p256k1")] { println!("cargo:rustc-cfg=crypto_backend=\"{}\"", BACKEND_FLAG_P256K1); diff --git a/src/chain-libs/chain-vote/src/cryptography/commitment.rs b/src/chain-libs/chain-vote/src/cryptography/commitment.rs index f6f4f8d8b9..984b8d02fc 100644 --- a/src/chain-libs/chain-vote/src/cryptography/commitment.rs +++ b/src/chain-libs/chain-vote/src/cryptography/commitment.rs @@ -67,7 +67,7 @@ pub struct Open { pub r: Scalar, } -#[cfg(tests)] +#[cfg(test)] mod tests { use super::*; use rand_chacha::rand_core::SeedableRng; @@ -82,8 +82,8 @@ mod tests { let (comm, rand) = commitment_key.commit(&message, &mut rng); let opening = Open { - m: message, - r: rand, + m: message.clone(), + r: rand.clone(), }; assert!(commitment_key.verify(&comm, &opening)); diff --git a/src/chain-libs/chain-vote/src/cryptography/elgamal.rs b/src/chain-libs/chain-vote/src/cryptography/elgamal.rs index 4f1bf98e77..cc7adbda0d 100644 --- a/src/chain-libs/chain-vote/src/cryptography/elgamal.rs +++ b/src/chain-libs/chain-vote/src/cryptography/elgamal.rs @@ -271,7 +271,7 @@ impl HybridCiphertext { } } -impl<'a, 'b> Add<&'b Ciphertext> for &'a Ciphertext { +impl<'b> Add<&'b Ciphertext> for &Ciphertext { type Output = Ciphertext; fn add(self, other: &'b Ciphertext) -> Ciphertext { @@ -284,7 +284,7 @@ impl<'a, 'b> Add<&'b Ciphertext> for &'a Ciphertext { std_ops_gen!(Ciphertext, Add, Ciphertext, Ciphertext, add); -impl<'a, 'b> Sub<&'b Ciphertext> for &'a Ciphertext { +impl<'b> Sub<&'b Ciphertext> for &Ciphertext { type Output = Ciphertext; fn sub(self, other: &'b Ciphertext) -> Ciphertext { @@ -297,7 +297,7 @@ impl<'a, 'b> Sub<&'b Ciphertext> for &'a Ciphertext { std_ops_gen!(Ciphertext, Sub, Ciphertext, Ciphertext, sub); -impl<'a, 'b> Mul<&'b Scalar> for &'a Ciphertext { +impl<'b> Mul<&'b Scalar> for &Ciphertext { type Output = Ciphertext; fn mul(self, rhs: &'b Scalar) -> Self::Output { Ciphertext { @@ -309,7 +309,7 @@ impl<'a, 'b> Mul<&'b Scalar> for &'a Ciphertext { std_ops_gen!(Ciphertext, Mul, Scalar, Ciphertext, mul); -impl<'a> Mul for &'a Ciphertext { +impl Mul for &Ciphertext { type Output = Ciphertext; fn mul(self, rhs: u64) -> Self::Output { Ciphertext { diff --git a/src/chain-libs/chain-vote/src/cryptography/zkps/correct_decryption/mod.rs b/src/chain-libs/chain-vote/src/cryptography/zkps/correct_decryption/mod.rs index 738d4ce350..2a9d6897fd 100644 --- a/src/chain-libs/chain-vote/src/cryptography/zkps/correct_decryption/mod.rs +++ b/src/chain-libs/chain-vote/src/cryptography/zkps/correct_decryption/mod.rs @@ -1,4 +1,2 @@ #[allow(dead_code)] mod zkp; - -pub use zkp::Zkp as CorrectElGamalDecrZkp; diff --git a/src/chain-libs/chain-vote/src/cryptography/zkps/correct_hybrid_decryption_key/mod.rs b/src/chain-libs/chain-vote/src/cryptography/zkps/correct_hybrid_decryption_key/mod.rs index 298bf98845..2a9d6897fd 100644 --- a/src/chain-libs/chain-vote/src/cryptography/zkps/correct_hybrid_decryption_key/mod.rs +++ b/src/chain-libs/chain-vote/src/cryptography/zkps/correct_hybrid_decryption_key/mod.rs @@ -1,4 +1,2 @@ #[allow(dead_code)] mod zkp; - -pub use zkp::Zkp as CorrectHybridDecrKeyZkp; diff --git a/src/chain-libs/chain-vote/src/cryptography/zkps/mod.rs b/src/chain-libs/chain-vote/src/cryptography/zkps/mod.rs index d2a10b6e9e..fd86bc2984 100644 --- a/src/chain-libs/chain-vote/src/cryptography/zkps/mod.rs +++ b/src/chain-libs/chain-vote/src/cryptography/zkps/mod.rs @@ -4,7 +4,5 @@ mod correct_share_generation; mod dl_equality; mod unit_vector; -pub use correct_decryption::CorrectElGamalDecrZkp; -pub use correct_hybrid_decryption_key::CorrectHybridDecrKeyZkp; pub use correct_share_generation::CorrectShareGenerationZkp; pub use unit_vector::UnitVectorZkp; diff --git a/src/chain-libs/chain-vote/src/cryptography/zkps/unit_vector/messages.rs b/src/chain-libs/chain-vote/src/cryptography/zkps/unit_vector/messages.rs index 8e5f99d45e..82ec7c843e 100644 --- a/src/chain-libs/chain-vote/src/cryptography/zkps/unit_vector/messages.rs +++ b/src/chain-libs/chain-vote/src/cryptography/zkps/unit_vector/messages.rs @@ -160,10 +160,7 @@ pub(crate) fn generate_polys( next_level, params, ); - left_subtree - .into_iter() - .chain(right_subtree.into_iter()) - .collect() + left_subtree.into_iter().chain(right_subtree).collect() } else { vec![parent.to_vec()] } @@ -205,8 +202,5 @@ pub(crate) fn generate_polys( 1, &tp, ); - left_subtree - .into_iter() - .chain(right_subtree.into_iter()) - .collect() + left_subtree.into_iter().chain(right_subtree).collect() } diff --git a/src/chain-libs/chain-vote/src/encrypted_vote.rs b/src/chain-libs/chain-vote/src/encrypted_vote.rs index 79bda44fc6..b0cee80c14 100644 --- a/src/chain-libs/chain-vote/src/encrypted_vote.rs +++ b/src/chain-libs/chain-vote/src/encrypted_vote.rs @@ -65,7 +65,6 @@ impl Ballot { #[derive(Clone)] pub struct Ptp { pub elements: Vec, - pub orig_len: usize, } impl Ptp { @@ -97,10 +96,7 @@ impl Ptp { vec.push(a.clone()); } } - Ptp { - orig_len, - elements: vec, - } + Ptp { elements: vec } } /// Iterates over the elements diff --git a/src/chain-libs/imhamt/Cargo.toml b/src/chain-libs/imhamt/Cargo.toml index 086da812e2..e6a2edd8bd 100644 --- a/src/chain-libs/imhamt/Cargo.toml +++ b/src/chain-libs/imhamt/Cargo.toml @@ -23,6 +23,7 @@ name = "imhamt" [features] property-test-api = ["proptest", "test-strategy"] +nightly = [] [build-dependencies] rustc_version = "0.4" diff --git a/src/chain-libs/imhamt/src/lib.rs b/src/chain-libs/imhamt/src/lib.rs index fa5bca77ba..504fee0670 100644 --- a/src/chain-libs/imhamt/src/lib.rs +++ b/src/chain-libs/imhamt/src/lib.rs @@ -262,7 +262,7 @@ mod tests { let mut reference = BTreeMap::new(); let mut h: Hamt, u32> = Hamt::new(); for (k, v) in xs.iter() { - if reference.get(k).is_some() { + if reference.contains_key(k) { continue; } reference.insert(k.clone(), *v); diff --git a/src/chain-libs/sparse-array/src/testing.rs b/src/chain-libs/sparse-array/src/testing.rs index 6f8c57db92..fd3ba8172b 100644 --- a/src/chain-libs/sparse-array/src/testing.rs +++ b/src/chain-libs/sparse-array/src/testing.rs @@ -22,7 +22,7 @@ pub(crate) fn sparse_array_test_data() -> impl Strategy> { // populate an array with the given indexes prop::collection::vec(prop::arbitrary::any::(), indexes.len()).prop_map(move |values| { let indexes = indexes.clone(); - indexes.into_iter().zip(values.into_iter()).collect() + indexes.into_iter().zip(values).collect() }) }) } diff --git a/src/chain-wallet-libs/bindings/wallet-c/src/lib.rs b/src/chain-wallet-libs/bindings/wallet-c/src/lib.rs index 6633c946e3..8ab101e261 100644 --- a/src/chain-wallet-libs/bindings/wallet-c/src/lib.rs +++ b/src/chain-wallet-libs/bindings/wallet-c/src/lib.rs @@ -49,9 +49,9 @@ pub type EncryptingVoteKeyPtr = *mut EncryptingVoteKey; /// # parameters /// /// * account_key: the Ed25519 extended key used wallet's account address private key -/// in the form of a 64 bytes array. +/// in the form of a 64 bytes array. /// * utxo_keys: an array of Ed25519 extended keys in the form of 64 bytes, used as utxo -/// keys for the wallet +/// keys for the wallet /// * utxo_keys_len: the number of keys in the utxo_keys array (not the number of bytes) /// * wallet_out: the recovered wallet /// @@ -243,7 +243,7 @@ pub unsafe extern "C" fn iohk_jormungandr_vote_proposal_new_public( /// build the proposal object /// /// * `vote_encryption_key`: a null terminated string (c-string) with the bech32 -/// representation of the encryption vote key +/// representation of the encryption vote key /// /// # Errors /// diff --git a/src/chain-wallet-libs/bindings/wallet-core/src/c/mod.rs b/src/chain-wallet-libs/bindings/wallet-core/src/c/mod.rs index c91be5d8ce..18129a808d 100644 --- a/src/chain-wallet-libs/bindings/wallet-core/src/c/mod.rs +++ b/src/chain-wallet-libs/bindings/wallet-core/src/c/mod.rs @@ -28,10 +28,6 @@ pub type FragmentPtr = *mut Fragment; #[error("null pointer")] struct NulPtr; -#[derive(Debug, Error)] -#[error("access out of bound")] -struct OutOfBound; - pub const FRAGMENT_ID_LENGTH: usize = 32; pub const NONCES_SIZE: usize = 8 * 4; @@ -45,9 +41,9 @@ pub const NONCES_SIZE: usize = 8 * 4; /// # parameters /// /// * account_key: the Ed25519 extended key used wallet's account address private key -/// in the form of a 64 bytes array. +/// in the form of a 64 bytes array. /// * utxo_keys: an array of Ed25519 keys in the form of 64 bytes, used as utxo -/// keys for the wallet +/// keys for the wallet /// * utxo_keys_len: the number of keys in the utxo_keys array (not the number of bytes) /// * wallet_out: the recovered wallet /// diff --git a/src/chain-wallet-libs/bindings/wallet-uniffi/Cargo.toml b/src/chain-wallet-libs/bindings/wallet-uniffi/Cargo.toml index abeb6ecc1d..f4b5ca6736 100644 --- a/src/chain-wallet-libs/bindings/wallet-uniffi/Cargo.toml +++ b/src/chain-wallet-libs/bindings/wallet-uniffi/Cargo.toml @@ -20,9 +20,11 @@ chain-crypto = { path = "../../../chain-libs/chain-crypto" } chain-time = { path = "../../../chain-libs/chain-time" } chain-ser = { path = "../../../chain-libs/chain-ser" } thiserror = {version = "1.0", default-features = false} +uniffi_bindgen = "0.29.3" [build-dependencies] uniffi_build = "0.21" [features] +default = ["builtin-bindgen"] builtin-bindgen = ["uniffi_build/builtin-bindgen"] diff --git a/src/chain-wallet-libs/bindings/wallet-uniffi/src/lib.rs b/src/chain-wallet-libs/bindings/wallet-uniffi/src/lib.rs index a2b67a9a46..0bfea704b8 100644 --- a/src/chain-wallet-libs/bindings/wallet-uniffi/src/lib.rs +++ b/src/chain-wallet-libs/bindings/wallet-uniffi/src/lib.rs @@ -1,3 +1,7 @@ +#![allow(clippy::unneeded_struct_pattern)] +#![allow(clippy::useless_conversion)] +#![allow(unused_attributes)] + use chain_crypto::bech32::Bech32; use chain_crypto::Ed25519Extended; use chain_crypto::SecretKey; @@ -21,6 +25,7 @@ use wallet_core::Options; use wallet_core::Settings as InnerSettings; use wallet_core::Wallet as InnerWallet; +// Allow clippy warnings for generated uniffi code include!(concat!(env!("OUT_DIR"), "/lib.uniffi.rs")); #[derive(Debug, thiserror::Error)] diff --git a/src/chain-wallet-libs/bindings/wallet-wasm-js/Cargo.toml b/src/chain-wallet-libs/bindings/wallet-wasm-js/Cargo.toml index 114be6e0ea..4993a623aa 100644 --- a/src/chain-wallet-libs/bindings/wallet-wasm-js/Cargo.toml +++ b/src/chain-wallet-libs/bindings/wallet-wasm-js/Cargo.toml @@ -27,7 +27,7 @@ rand = "0.8.3" rand_chacha = "0.3.0" symmetric-cipher = {path = "../../symmetric-cipher"} wallet-core = {path = "../wallet-core"} -wasm-bindgen = "0.2" +wasm-bindgen = "0.2.92" js-sys = "0.3.40" bech32 = "0.7.2" serde_json = "1.0" diff --git a/src/chain-wallet-libs/bindings/wallet-wasm-js/src/certificates/mod.rs b/src/chain-wallet-libs/bindings/wallet-wasm-js/src/certificates/mod.rs index 5fd217aa0e..c97e462fdc 100644 --- a/src/chain-wallet-libs/bindings/wallet-wasm-js/src/certificates/mod.rs +++ b/src/chain-wallet-libs/bindings/wallet-wasm-js/src/certificates/mod.rs @@ -5,6 +5,7 @@ pub mod vote_cast; pub mod vote_plan; #[wasm_bindgen] +#[allow(dead_code)] pub struct Certificate(pub(crate) CertificateLib); #[wasm_bindgen] diff --git a/src/chain-wallet-libs/bindings/wallet-wasm-js/src/fragment.rs b/src/chain-wallet-libs/bindings/wallet-wasm-js/src/fragment.rs index 982cf2cc21..6a7827d3ed 100644 --- a/src/chain-wallet-libs/bindings/wallet-wasm-js/src/fragment.rs +++ b/src/chain-wallet-libs/bindings/wallet-wasm-js/src/fragment.rs @@ -5,6 +5,7 @@ use wasm_bindgen::prelude::*; /// Identifier of a block fragment #[wasm_bindgen] +#[allow(dead_code)] pub struct FragmentId(pub(crate) wallet_core::FragmentId); /// this is used only for giving the Array a type in the typescript generated notation diff --git a/src/chain-wallet-libs/chain-path-derivation/src/derivation.rs b/src/chain-wallet-libs/chain-path-derivation/src/derivation.rs index d64a67c479..29675dd128 100644 --- a/src/chain-wallet-libs/chain-path-derivation/src/derivation.rs +++ b/src/chain-wallet-libs/chain-path-derivation/src/derivation.rs @@ -135,7 +135,7 @@ impl Derivation { /// ``` #[inline] pub const fn max_value() -> Self { - Self::new(u32::max_value()) + Self::new(u32::MAX) } /// returns the min derivation index value @@ -147,7 +147,7 @@ impl Derivation { /// ``` #[inline] pub const fn min_value() -> Self { - Self::new(u32::min_value()) + Self::new(u32::MIN) } /// calculate `derivation + rhs` @@ -423,7 +423,7 @@ impl SoftDerivation { // allow `unwrap_or`, it's 32bits of integer or a function pointer #[allow(clippy::or_fun_call)] - Self::new(d).unwrap_or(Self::min_value()) + Self::new(d).unwrap_or_default() } } @@ -611,7 +611,7 @@ impl HardDerivation { // allow `unwrap_or`, it's 32bits of integer or a function pointer #[allow(clippy::or_fun_call)] - Self::new(d).unwrap_or(Self::min_value()) + Self::new(d).unwrap_or_default() } } @@ -1081,7 +1081,7 @@ mod tests { fn derivation_iterator_4() { let range = DerivationRange::new::<_, u32>(..); - assert_eq!(range.len(), u32::max_value() as usize); + assert_eq!(range.len(), u32::MAX as usize); } #[test] diff --git a/src/chain-wallet-libs/hdkeygen/Cargo.toml b/src/chain-wallet-libs/hdkeygen/Cargo.toml index 3cf69b9869..de87b5dd64 100644 --- a/src/chain-wallet-libs/hdkeygen/Cargo.toml +++ b/src/chain-wallet-libs/hdkeygen/Cargo.toml @@ -24,3 +24,6 @@ cardano-legacy-address = { path = "../../chain-libs/cardano-legacy-address" } [dev-dependencies] quickcheck = "0.9" quickcheck_macros = "0.9" + +[features] +with-bench = [] diff --git a/src/chain-wallet-libs/wallet/src/states.rs b/src/chain-wallet-libs/wallet/src/states.rs index a2c5bbfbb6..dcc3f303d9 100644 --- a/src/chain-wallet-libs/wallet/src/states.rs +++ b/src/chain-wallet-libs/wallet/src/states.rs @@ -62,10 +62,10 @@ where /// check wether the given state associate to this key is present /// in the States - pub fn contains(&self, key: &Q) -> bool + pub fn contains(&self, key: &Q) -> bool where K: Borrow, - Q: Hash + Eq, + Q: ?Sized + Hash + Eq, { self.states.contains_key(key) } @@ -77,10 +77,10 @@ where assert!(self.states.insert(key, state).is_none()); } - pub fn confirm(&mut self, key: &Q) + pub fn confirm(&mut self, key: &Q) where K: Borrow, - Q: Hash + Eq, + Q: ?Sized + Hash + Eq, { if let Some(state) = self.states.get_mut(key) { state.confirm(); diff --git a/src/event-db/src/lib.rs b/src/event-db/src/lib.rs index 46b930c50a..e30eee3a04 100644 --- a/src/event-db/src/lib.rs +++ b/src/event-db/src/lib.rs @@ -37,7 +37,7 @@ pub struct EventDB { /// * `url` set to the postgres connection string needed to connect to the /// database. IF it is None, then the env var "`DATABASE_URL`" will be used /// for this connection string. eg: -/// "`postgres://catalyst-dev:CHANGE_ME@localhost/CatalystDev`" +/// "`postgres://catalyst-dev:CHANGE_ME@localhost/CatalystDev`" /// /// # Errors /// diff --git a/src/event-db/src/queries/event/ballot.rs b/src/event-db/src/queries/event/ballot.rs index 8a82e3c3ff..6f8f294e72 100644 --- a/src/event-db/src/queries/event/ballot.rs +++ b/src/event-db/src/queries/event/ballot.rs @@ -80,7 +80,7 @@ impl BallotQueries for EventDB { ) .await?; let row = rows - .get(0) + .first() .ok_or_else(|| Error::NotFound("cat not find ballot value".to_string()))?; let choices = row.try_get("objective")?; diff --git a/src/event-db/src/queries/event/mod.rs b/src/event-db/src/queries/event/mod.rs index 1878b7666a..e92e0986de 100644 --- a/src/event-db/src/queries/event/mod.rs +++ b/src/event-db/src/queries/event/mod.rs @@ -88,7 +88,7 @@ impl EventQueries for EventDB { let rows = conn.query(Self::EVENT_QUERY, &[&event.0]).await?; let row = rows - .get(0) + .first() .ok_or_else(|| Error::NotFound("can not find event value".to_string()))?; let ends = row diff --git a/src/event-db/src/queries/event/proposal.rs b/src/event-db/src/queries/event/proposal.rs index 50e9c7274f..4174655bb5 100644 --- a/src/event-db/src/queries/event/proposal.rs +++ b/src/event-db/src/queries/event/proposal.rs @@ -61,7 +61,7 @@ impl ProposalQueries for EventDB { .query(Self::PROPOSAL_QUERY, &[&event.0, &objective.0, &proposal.0]) .await?; let row = rows - .get(0) + .first() .ok_or_else(|| Error::NotFound("cat not find proposal value".to_string()))?; let proposer = vec![ProposerDetails { diff --git a/src/event-db/src/queries/registration.rs b/src/event-db/src/queries/registration.rs index 7a782ad78e..47470b5a79 100644 --- a/src/event-db/src/queries/registration.rs +++ b/src/event-db/src/queries/registration.rs @@ -100,7 +100,7 @@ impl RegistrationQueries for EventDB { .await? }; let voter = rows - .get(0) + .first() .ok_or_else(|| Error::NotFound("can not find voter value".to_string()))?; let voting_group = VoterGroupId(voter.try_get("voting_group")?); @@ -118,7 +118,7 @@ impl RegistrationQueries for EventDB { }; let total_voting_power_per_group: i64 = rows - .get(0) + .first() .ok_or_else(|| { Error::NotFound("can not find total voting power per group value".to_string()) })? @@ -186,7 +186,7 @@ impl RegistrationQueries for EventDB { .await? }; let delegator_snapshot_info = rows - .get(0) + .first() .ok_or_else(|| Error::NotFound("can not find delegator value".to_string()))?; let delegation_rows = if let Some(event) = event { @@ -227,7 +227,7 @@ impl RegistrationQueries for EventDB { .await? }; let total_power: i64 = rows - .get(0) + .first() .ok_or_else(|| Error::NotFound("can not find total power value".to_string()))? .try_get("total_voting_power")?; diff --git a/src/event-db/src/queries/search.rs b/src/event-db/src/queries/search.rs index 7a12fde2d4..8755b0efc5 100644 --- a/src/event-db/src/queries/search.rs +++ b/src/event-db/src/queries/search.rs @@ -48,9 +48,7 @@ impl EventDB { where_clause.push_str( format!( "WHERE {0}.{1} LIKE '%{2}%'", - table, - filter.column.to_string(), - filter.search + table, filter.column, filter.search ) .as_str(), ); @@ -58,9 +56,7 @@ impl EventDB { where_clause.push_str( format!( "AND {0}.{1} LIKE '%{2}%'", - table, - filter.column.to_string(), - filter.search + table, filter.column, filter.search ) .as_str(), ); @@ -75,24 +71,12 @@ impl EventDB { if let Some(order_by) = order_by_iter.next() { let order_type = if order_by.descending { "DESC" } else { "ASC" }; order_by_clause.push_str( - format!( - "ORDER BY {0}.{1} {2}", - table, - order_by.column.to_string(), - order_type - ) - .as_str(), + format!("ORDER BY {0}.{1} {2}", table, order_by.column, order_type).as_str(), ); for order_by in order_by_iter { let order_type = if order_by.descending { "DESC" } else { "ASC" }; order_by_clause.push_str( - format!( - ", {0}.{1} LIKE '%{2}%'", - table, - order_by.column.to_string(), - order_type - ) - .as_str(), + format!(", {0}.{1} {2}", table, order_by.column, order_type).as_str(), ); } } @@ -146,7 +130,7 @@ impl SearchQueries for EventDB { ) .await .map_err(|e| Error::NotFound(e.to_string()))?; - let row = rows.get(0).unwrap(); + let row = rows.first().unwrap(); Ok(SearchResult { total: row.try_get("total")?, diff --git a/src/event-db/src/queries/vit_ss/fund.rs b/src/event-db/src/queries/vit_ss/fund.rs index 66d6370a3a..357c24e424 100644 --- a/src/event-db/src/queries/vit_ss/fund.rs +++ b/src/event-db/src/queries/vit_ss/fund.rs @@ -119,7 +119,7 @@ impl VitSSFundQueries for EventDB { let rows = conn.query(Self::FUND_QUERY, &[]).await?; let row = rows - .get(0) + .first() .ok_or_else(|| Error::NotFound("can not find fund value".to_string()))?; let fund_id = row.try_get("id")?; diff --git a/src/event-db/src/types/search.rs b/src/event-db/src/types/search.rs index 3d7681db0b..dd4c39af23 100644 --- a/src/event-db/src/types/search.rs +++ b/src/event-db/src/types/search.rs @@ -1,4 +1,5 @@ use super::{event::EventSummary, objective::ObjectiveSummary, proposal::ProposalSummary}; +use std::fmt::Display; #[derive(Debug, Clone, PartialEq, Eq)] pub enum SearchTable { @@ -16,15 +17,16 @@ pub enum SearchColumn { Funds, } -impl ToString for SearchColumn { - fn to_string(&self) -> String { - match self { +impl Display for SearchColumn { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let str = match self { SearchColumn::Title => "title".to_string(), SearchColumn::Type => "type".to_string(), SearchColumn::Description => "description".to_string(), SearchColumn::Author => "author".to_string(), SearchColumn::Funds => "funds".to_string(), - } + }; + write!(f, "{}", str) } } diff --git a/src/jormungandr/explorer/src/api/graphql/mod.rs b/src/jormungandr/explorer/src/api/graphql/mod.rs index ae8b1878b2..5903cf850a 100644 --- a/src/jormungandr/explorer/src/api/graphql/mod.rs +++ b/src/jormungandr/explorer/src/api/graphql/mod.rs @@ -161,7 +161,7 @@ impl Branch { .state .state() .transactions_by_address(&address) - .unwrap_or_else(PersistentSequence::::new); + .unwrap_or_default(); let len = transactions.len(); @@ -311,8 +311,8 @@ impl Branch { stake_pools.sort_unstable_by_key(|(id, _data)| id.clone()); query( - after.map(Into::into), - before.map(Into::into), + after, + before, first, last, |after, before, first, last| async move { @@ -1080,7 +1080,7 @@ impl Pool { first, last, |after, before, first, last| async move { - let bounds = if blocks.len() > 0 { + let bounds = if !blocks.is_empty() { PaginationInterval::Inclusive(InclusivePaginationInterval { lower_bound: 0u32, upper_bound: blocks diff --git a/src/jormungandr/explorer/src/db/indexing.rs b/src/jormungandr/explorer/src/db/indexing.rs index 11ca48924c..43b0be3e6b 100644 --- a/src/jormungandr/explorer/src/db/indexing.rs +++ b/src/jormungandr/explorer/src/db/indexing.rs @@ -477,7 +477,6 @@ impl ExplorerTransaction { /// the fragment id is the associated to the given AuthenticatedTransaction before 'unwrapping' /// The discrimination is needed to get addresses from account inputs. /// The transactions and blocks are used to resolve utxo inputs - pub fn from<'context, T>( context: &'context ExplorerBlockBuildingContext<'context>, id: &FragmentId, diff --git a/src/jormungandr/explorer/src/logging.rs b/src/jormungandr/explorer/src/logging.rs index dd7b64c2e8..4cfbd881d6 100644 --- a/src/jormungandr/explorer/src/logging.rs +++ b/src/jormungandr/explorer/src/logging.rs @@ -125,7 +125,6 @@ impl LogSettings { LogOutput::File(ref path) => { let file = fs::OpenOptions::new() .create(true) - .write(true) .append(true) .open(path) .map_err(|cause| Error::File { diff --git a/src/jormungandr/jcli/src/jcli_lib/certificate/weighted_pool_ids.rs b/src/jormungandr/jcli/src/jcli_lib/certificate/weighted_pool_ids.rs index 6c9c2563d6..81907a5791 100644 --- a/src/jormungandr/jcli/src/jcli_lib/certificate/weighted_pool_ids.rs +++ b/src/jormungandr/jcli/src/jcli_lib/certificate/weighted_pool_ids.rs @@ -59,7 +59,7 @@ fn delegation_ratio_sum(pool_ids: &[WeightedPoolId]) -> Result { .sum::>()?; u8::try_from(parts).map_err(|_| Error::InvalidPoolDelegationWeights { actual: parts, - max: u8::max_value() as u64, + max: u8::MAX as u64, }) } diff --git a/src/jormungandr/jcli/src/jcli_lib/transaction/mod.rs b/src/jormungandr/jcli/src/jcli_lib/transaction/mod.rs index 67a0aed83d..71b1cf1a65 100644 --- a/src/jormungandr/jcli/src/jcli_lib/transaction/mod.rs +++ b/src/jormungandr/jcli/src/jcli_lib/transaction/mod.rs @@ -205,7 +205,7 @@ pub enum Error { TxWithOwnerStakeDelegationHasOutputs, #[error(transparent)] - Block0Error(#[from] block::Error), + Block0Error(#[from] Box), #[error(transparent)] AccountIdError(#[from] utils::account_id::Error), diff --git a/src/jormungandr/jcli/src/jcli_lib/vote/tally/decrypt_tally.rs b/src/jormungandr/jcli/src/jcli_lib/vote/tally/decrypt_tally.rs index 2e8c33edc1..662c76aca2 100644 --- a/src/jormungandr/jcli/src/jcli_lib/vote/tally/decrypt_tally.rs +++ b/src/jormungandr/jcli/src/jcli_lib/vote/tally/decrypt_tally.rs @@ -10,7 +10,6 @@ use jormungandr_lib::{ interfaces::{PrivateTallyState, Tally}, }; use rayon::prelude::*; -use serde::Serialize; use std::{convert::TryInto, path::PathBuf}; #[derive(Parser)] @@ -37,11 +36,6 @@ pub struct TallyVotePlanWithAllShares { output_format: OutputFormat, } -#[derive(Serialize)] -struct Output { - result: Vec, -} - impl TallyVotePlanWithAllShares { pub fn exec(&self) -> Result<(), Error> { let mut vote_plan = diff --git a/src/jormungandr/jcli/src/jcli_lib/vote/tally/merge_results.rs b/src/jormungandr/jcli/src/jcli_lib/vote/tally/merge_results.rs index aca70b9618..a0c52da5d2 100644 --- a/src/jormungandr/jcli/src/jcli_lib/vote/tally/merge_results.rs +++ b/src/jormungandr/jcli/src/jcli_lib/vote/tally/merge_results.rs @@ -172,7 +172,7 @@ mod tests { tally: Tally::Private { state: PrivateTallyState::Decrypted { result: TallyResult { - results: results.try_into().unwrap(), + results: results.into(), options: 0..2, }, }, diff --git a/src/jormungandr/jormungandr-lib/src/crypto/key.rs b/src/jormungandr/jormungandr-lib/src/crypto/key.rs index 3993288af0..2c7a9657c3 100644 --- a/src/jormungandr/jormungandr-lib/src/crypto/key.rs +++ b/src/jormungandr/jormungandr-lib/src/crypto/key.rs @@ -40,7 +40,6 @@ pub struct Identifier( /// More info at the module documentation /// /// [`Identifier`]: ./struct.Identifier.html - pub struct SigningKey(pub(crate) SecretKey); impl Serialize for SigningKey @@ -460,7 +459,7 @@ impl Eq for Signature {} impl PartialOrd> for Identifier { fn partial_cmp(&self, other: &Self) -> Option { - self.0.partial_cmp(&other.0) + Some(self.cmp(other)) } } diff --git a/src/jormungandr/jormungandr-lib/src/interfaces/block0_configuration/default_values.rs b/src/jormungandr/jormungandr-lib/src/interfaces/block0_configuration/default_values.rs index 629124476c..927fefb6d4 100644 --- a/src/jormungandr/jormungandr-lib/src/interfaces/block0_configuration/default_values.rs +++ b/src/jormungandr/jormungandr-lib/src/interfaces/block0_configuration/default_values.rs @@ -33,7 +33,7 @@ pub const DEFAULT_SLOT_DURATION: u8 = 5; /// minimum slot duration in seconds pub const MINIMUM_SLOT_DURATION: u8 = 1; /// maximum slot duration in seconds (here is it max of u8: 255) -pub const MAXIMUM_SLOT_DURATION: u8 = u8::max_value(); +pub const MAXIMUM_SLOT_DURATION: u8 = u8::MAX; /// default proposal expiration in epochs pub const DEFAULT_PROPOSAL_EXPIRATION: u32 = 100; diff --git a/src/jormungandr/jormungandr-lib/src/interfaces/block0_configuration/initial_config.rs b/src/jormungandr/jormungandr-lib/src/interfaces/block0_configuration/initial_config.rs index 6d7a7a0346..75c7b33dd3 100644 --- a/src/jormungandr/jormungandr-lib/src/interfaces/block0_configuration/initial_config.rs +++ b/src/jormungandr/jormungandr-lib/src/interfaces/block0_configuration/initial_config.rs @@ -43,7 +43,7 @@ pub struct BlockchainConfiguration { /// depending of `block0_consensus` value: /// /// * `bft`: will be the list of BFT leaders, they will write blocks - /// in a round robin fashion, filling every blocks deterministically. + /// in a round robin fashion, filling every blocks deterministically. /// * `genesis`: will be the list of leaders that will take over creating /// blocks from the stake pool. Useful for during transition from BFT /// to genesis. diff --git a/src/jormungandr/jormungandr-lib/src/interfaces/ratio.rs b/src/jormungandr/jormungandr-lib/src/interfaces/ratio.rs index d085bf74ee..4d46196db6 100644 --- a/src/jormungandr/jormungandr-lib/src/interfaces/ratio.rs +++ b/src/jormungandr/jormungandr-lib/src/interfaces/ratio.rs @@ -151,7 +151,7 @@ mod test { #[test] fn value_display_as_u64() { const NUMERATOR: u64 = 928_170; - const DENOMINATOR: NonZeroU64 = unsafe { NonZeroU64::new_unchecked(1291) }; + const DENOMINATOR: NonZeroU64 = NonZeroU64::new(1291).unwrap(); let ratio = Ratio(rewards::Ratio { numerator: NUMERATOR, denominator: DENOMINATOR, @@ -163,7 +163,7 @@ mod test { #[test] fn value_serde_as_u64() { const NUMERATOR: u64 = 928_170; - const DENOMINATOR: NonZeroU64 = unsafe { NonZeroU64::new_unchecked(1291) }; + const DENOMINATOR: NonZeroU64 = NonZeroU64::new(1291).unwrap(); let ratio = Ratio(rewards::Ratio { numerator: NUMERATOR, denominator: DENOMINATOR, diff --git a/src/jormungandr/jormungandr-lib/src/interfaces/reward_parameters.rs b/src/jormungandr/jormungandr-lib/src/interfaces/reward_parameters.rs index 8557e8d026..196f8ae77d 100644 --- a/src/jormungandr/jormungandr-lib/src/interfaces/reward_parameters.rs +++ b/src/jormungandr/jormungandr-lib/src/interfaces/reward_parameters.rs @@ -115,9 +115,9 @@ mod test { fn linear_serde_yaml() { const CONSTANT: u64 = 8170; const RATIO_NUMERATOR: u64 = 13; - const RATIO_DENOMINATOR: NonZeroU64 = unsafe { NonZeroU64::new_unchecked(19) }; + const RATIO_DENOMINATOR: NonZeroU64 = NonZeroU64::new(19).unwrap(); const EPOCH_START: Epoch = 2; - const EPOCH_RATE: NonZeroU32 = unsafe { NonZeroU32::new_unchecked(5) }; + const EPOCH_RATE: NonZeroU32 = NonZeroU32::new(5).unwrap(); let parameters = RewardParams::Linear { constant: CONSTANT, @@ -139,9 +139,9 @@ mod test { fn halving_serde_yaml() { const CONSTANT: u64 = 8170; const RATIO_NUMERATOR: u64 = 13; - const RATIO_DENOMINATOR: NonZeroU64 = unsafe { NonZeroU64::new_unchecked(19) }; + const RATIO_DENOMINATOR: NonZeroU64 = NonZeroU64::new(19).unwrap(); const EPOCH_START: Epoch = 2; - const EPOCH_RATE: NonZeroU32 = unsafe { NonZeroU32::new_unchecked(5) }; + const EPOCH_RATE: NonZeroU32 = NonZeroU32::new(5).unwrap(); let parameters = RewardParams::Halving { constant: CONSTANT, diff --git a/src/jormungandr/jormungandr-lib/src/interfaces/tax_type.rs b/src/jormungandr/jormungandr-lib/src/interfaces/tax_type.rs index d3dd90040f..e779c12864 100644 --- a/src/jormungandr/jormungandr-lib/src/interfaces/tax_type.rs +++ b/src/jormungandr/jormungandr-lib/src/interfaces/tax_type.rs @@ -63,7 +63,7 @@ mod test { fn value_serde_yaml() { const FIXED: u64 = 8170; const NUMERATOR: u64 = 192; - const DENOMINATOR: NonZeroU64 = unsafe { NonZeroU64::new_unchecked(1291) }; + const DENOMINATOR: NonZeroU64 = NonZeroU64::new(1291).unwrap(); let tax_type = TaxType { fixed: FIXED.into(), ratio: Ratio::new(NUMERATOR, DENOMINATOR), @@ -83,7 +83,7 @@ mod test { fn value_serde_yaml_with_max_limit() { const FIXED: u64 = 8170; const NUMERATOR: u64 = 192; - const DENOMINATOR: NonZeroU64 = unsafe { NonZeroU64::new_unchecked(1291) }; + const DENOMINATOR: NonZeroU64 = NonZeroU64::new(1291).unwrap(); const MAX_LIMIT: u64 = 2028; let tax_type = TaxType { fixed: FIXED.into(), diff --git a/src/jormungandr/jormungandr/Cargo.toml b/src/jormungandr/jormungandr/Cargo.toml index 589edd098c..aecaf78146 100644 --- a/src/jormungandr/jormungandr/Cargo.toml +++ b/src/jormungandr/jormungandr/Cargo.toml @@ -90,7 +90,7 @@ harness = false versionisator = "1.0.2" [target.'cfg(unix)'.dependencies] -libc = "0.2.124" +libc = "0.2.173" nix = "0.25" [features] diff --git a/src/jormungandr/jormungandr/src/blockchain/candidate.rs b/src/jormungandr/jormungandr/src/blockchain/candidate.rs index 00c31c1884..e8e08e4173 100644 --- a/src/jormungandr/jormungandr/src/blockchain/candidate.rs +++ b/src/jormungandr/jormungandr/src/blockchain/candidate.rs @@ -24,7 +24,7 @@ pub enum Error { #[error("the incoming header stream is empty")] EmptyHeaderStream, #[error("header chain verification failed")] - Blockchain(#[from] chain::Error), + Blockchain(#[from] Box), #[error("the parent block {0} of the first received block header is not found in storage")] MissingParentBlock(HeaderHash), #[error("the parent hash field {0} of a received block header does not match the hash of the preceding header")] @@ -78,7 +78,10 @@ mod chain_landing { stream, } = state; - let pre_checked = blockchain.pre_check_header(header, false).await?; + let pre_checked = blockchain + .pre_check_header(header, false) + .await + .map_err(|e| Error::Blockchain(Box::new(e)))?; match pre_checked { PreCheckedHeader::AlreadyPresent { .. } => { diff --git a/src/jormungandr/jormungandr/src/blockchain/chain.rs b/src/jormungandr/jormungandr/src/blockchain/chain.rs index 0a93a2968b..329f1b8e3b 100644 --- a/src/jormungandr/jormungandr/src/blockchain/chain.rs +++ b/src/jormungandr/jormungandr/src/blockchain/chain.rs @@ -909,7 +909,6 @@ pub struct StreamReporter { } pub struct StreamInfo { - pub start: std::time::SystemTime, pub last_reported: std::time::SystemTime, pub last_bytes_received: u64, pub bytes_received: u64, @@ -925,7 +924,6 @@ impl StreamReporter { let lbd: Option = None; StreamReporter { stream_info: StreamInfo { - start: now, last_reported: now, last_bytes_received: 0, bytes_received: 0, diff --git a/src/jormungandr/jormungandr/src/blockchain/process.rs b/src/jormungandr/jormungandr/src/blockchain/process.rs index 11011b3596..e57e2ee8cc 100644 --- a/src/jormungandr/jormungandr/src/blockchain/process.rs +++ b/src/jormungandr/jormungandr/src/blockchain/process.rs @@ -61,10 +61,10 @@ pub struct TaskData { /// The blockchain process is comprised mainly of two parts: /// /// * Bookkeeping of all blocks known to the node: -/// This is the most resource heavy operation but can be parallelized depending on the chain structure. +/// This is the most resource heavy operation but can be parallelized depending on the chain structure. /// * Tip selection and update: -/// Tip updates must be serialized to avoid inconsistent states but are very light on resources. -/// No performance penalty should come from this synchronization point. +/// Tip updates must be serialized to avoid inconsistent states but are very light on resources. +/// No performance penalty should come from this synchronization point. struct Process { blockchain: Blockchain, blockchain_tip: Tip, diff --git a/src/jormungandr/jormungandr/src/blockchain/storage.rs b/src/jormungandr/jormungandr/src/blockchain/storage.rs index 55e5473748..b43da991ec 100644 --- a/src/jormungandr/jormungandr/src/blockchain/storage.rs +++ b/src/jormungandr/jormungandr/src/blockchain/storage.rs @@ -289,7 +289,7 @@ impl Storage { descendant: HeaderHash, ) -> Result, Error> { let mut ancestor = None; - let mut closest_found = std::u32::MAX; + let mut closest_found = u32::MAX; for checkpoint in checkpoints { // Checkpoints sent by a peer may not diff --git a/src/jormungandr/jormungandr/src/blockchain/tip.rs b/src/jormungandr/jormungandr/src/blockchain/tip.rs index d004e53e34..e1ebda30bf 100644 --- a/src/jormungandr/jormungandr/src/blockchain/tip.rs +++ b/src/jormungandr/jormungandr/src/blockchain/tip.rs @@ -93,7 +93,8 @@ impl TipUpdater { while let Some(block) = stream.next().await { let block = block?; let fragment_ids = block.fragments().map(|f| f.id()).collect(); - self.try_request_fragment_removal(fragment_ids, block.header())?; + self.try_request_fragment_removal(fragment_ids, block.header()) + .map_err(|e| Error::from(*e))?; } self.blockchain @@ -116,7 +117,8 @@ impl TipUpdater { .put_tag(MAIN_BRANCH_TAG, candidate_hash)?; let fragment_ids = block.fragments().map(|f| f.id()).collect(); - self.try_request_fragment_removal(fragment_ids, block.header())?; + self.try_request_fragment_removal(fragment_ids, block.header()) + .map_err(|e| Error::from(*e))?; self.tip.update_ref(candidate).await; Ok(()) @@ -187,7 +189,7 @@ impl TipUpdater { &mut self, fragment_ids: Vec, header: &Header, - ) -> Result<(), async_msg::TrySendError> { + ) -> Result<(), Box>> { if let Some(ref mut mbox) = self.fragment_mbox { let hash = header.hash().into(); let date = header.block_date(); diff --git a/src/jormungandr/jormungandr/src/fragment/pool.rs b/src/jormungandr/jormungandr/src/fragment/pool.rs index d7ce71054c..8775b203e6 100644 --- a/src/jormungandr/jormungandr/src/fragment/pool.rs +++ b/src/jormungandr/jormungandr/src/fragment/pool.rs @@ -12,7 +12,7 @@ use crate::{ utils::async_msg::MessageBox, }; use chain_core::{packer::Codec, property::Serialize}; -use chain_impl_mockchain::{block::BlockDate, fragment::Contents, transaction::Transaction}; +use chain_impl_mockchain::{fragment::Contents, transaction::Transaction}; use futures::{channel::mpsc::SendError, sink::SinkExt}; use jormungandr_lib::{ interfaces::{ @@ -312,7 +312,6 @@ fn is_transaction_valid(tx: &Transaction) -> bool { pub(super) mod internal { use super::*; use std::{ - cmp::Ordering, collections::HashMap, hash::{Hash, Hasher}, ptr, @@ -431,28 +430,6 @@ pub(super) mod internal { } } - #[derive(Clone, PartialEq, Eq)] - struct TimeoutQueueItem { - valid_until: BlockDate, - id: FragmentId, - } - - impl Ord for TimeoutQueueItem { - fn cmp(&self, other: &Self) -> Ordering { - let res = self.valid_until.cmp(&other.valid_until); - if res != Ordering::Equal { - return res; - } - self.id.cmp(&other.id) - } - } - - impl PartialOrd for TimeoutQueueItem { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } - } - pub struct Pool { entries: IndexedQueue, max_entries: usize, diff --git a/src/jormungandr/jormungandr/src/metrics/backends/prometheus_exporter.rs b/src/jormungandr/jormungandr/src/metrics/backends/prometheus_exporter.rs index 85a574b9b9..bebe1587ea 100644 --- a/src/jormungandr/jormungandr/src/metrics/backends/prometheus_exporter.rs +++ b/src/jormungandr/jormungandr/src/metrics/backends/prometheus_exporter.rs @@ -294,7 +294,7 @@ impl MetricsBackend for Prometheus { .set(block.header().block_date().epoch.into()); self.block_slot .set(block.header().block_date().slot_id.into()); - let chain_length: u32 = block.header().chain_length().try_into().unwrap(); + let chain_length: u32 = block.header().chain_length().into(); self.block_chain_length.set(chain_length as u64); self.block_time.set( block_ref diff --git a/src/jormungandr/jormungandr/src/network/bootstrap.rs b/src/jormungandr/jormungandr/src/network/bootstrap.rs index c17e7deb87..84935ff781 100644 --- a/src/jormungandr/jormungandr/src/network/bootstrap.rs +++ b/src/jormungandr/jormungandr/src/network/bootstrap.rs @@ -55,7 +55,6 @@ pub async fn peers_from_trusted_peer(peer: &Peer) -> Result, .decode() .map_err(Error::PeerDecodingFailed)? .into_iter() - .map(topology::Peer::from) .collect::>(); tracing::info!("peer {} : peers known : {}", peer.connection, peers.len()); diff --git a/src/jormungandr/jormungandr/src/network/client/mod.rs b/src/jormungandr/jormungandr/src/network/client/mod.rs index 5742b99380..be84665901 100644 --- a/src/jormungandr/jormungandr/src/network/client/mod.rs +++ b/src/jormungandr/jormungandr/src/network/client/mod.rs @@ -1,6 +1,6 @@ mod connect; -pub use self::connect::{connect, ConnectError, ConnectFuture, ConnectHandle}; +pub use self::connect::{connect, ConnectError, ConnectHandle}; use super::{ buffer_sizes, convert::{Decode, Encode}, diff --git a/src/jormungandr/jormungandr/src/network/mod.rs b/src/jormungandr/jormungandr/src/network/mod.rs index 46ba79da35..ffaddab1b3 100644 --- a/src/jormungandr/jormungandr/src/network/mod.rs +++ b/src/jormungandr/jormungandr/src/network/mod.rs @@ -231,11 +231,7 @@ impl GlobalState { // established fn num_clients_to_bump(&self) -> usize { let count = self.client_count().saturating_add(1); - if count > self.config.max_client_connections { - count - self.config.max_client_connections - } else { - 0 - } + count.saturating_sub(self.config.max_client_connections) } } diff --git a/src/jormungandr/jormungandr/src/network/service.rs b/src/jormungandr/jormungandr/src/network/service.rs index 7c53ce2495..10fccfea5f 100644 --- a/src/jormungandr/jormungandr/src/network/service.rs +++ b/src/jormungandr/jormungandr/src/network/service.rs @@ -10,7 +10,7 @@ use super::{ use crate::{ blockcfg as app_data, intercom::{self, BlockMsg, ClientMsg, RequestSink, TopologyMsg}, - topology::{self, Gossips, NodeId}, + topology::{Gossips, NodeId}, utils::async_msg::MessageBox, }; use async_trait::async_trait; @@ -334,7 +334,6 @@ impl GossipService for NodeService { std::iter::once(res.self_node) .chain(res.peers.into_iter()) .take(limit as usize) - .map(topology::Gossip::from) .collect::>(), ) .encode(); diff --git a/src/jormungandr/jormungandr/src/network/subscription.rs b/src/jormungandr/jormungandr/src/network/subscription.rs index d861b6fb7e..b89e64ff2c 100644 --- a/src/jormungandr/jormungandr/src/network/subscription.rs +++ b/src/jormungandr/jormungandr/src/network/subscription.rs @@ -198,12 +198,11 @@ impl Sink for BlockAnnouncementProcessor { } fn start_send(mut self: Pin<&mut Self>, raw_header: net_data::Header) -> Result<(), Error> { - let header = raw_header.decode().map_err(|e| { + let header = raw_header.decode().inspect_err(|e| { tracing::info!( reason = %e.source().unwrap(), "failed to decode incoming block announcement header" ); - e })?; tracing::debug!(hash = %header.hash(), "received block announcement"); @@ -593,12 +592,11 @@ impl Sink for FragmentProcessor { self.buffered_fragments.len() < buffer_sizes::inbound::FRAGMENTS, "should call `poll_ready` which returns `Poll::Ready(Ok(()))` before `start_send`", ); - let fragment = raw_fragment.decode().map_err(|e| { + let fragment = raw_fragment.decode().inspect_err(|e| { tracing::info!( reason = %e.source().unwrap(), "failed to decode incoming fragment" ); - e })?; tracing::debug!(hash = %fragment.hash(), "received fragment"); @@ -653,12 +651,11 @@ impl Sink for GossipProcessor { } fn start_send(mut self: Pin<&mut Self>, gossip: net_data::Gossip) -> Result<(), Error> { - let nodes = gossip.nodes.decode().map_err(|e| { + let nodes = gossip.nodes.decode().inspect_err(|e| { tracing::info!( reason = %e.source().unwrap(), "failed to decode incoming gossip" ); - e })?; tracing::debug!("received gossip on {} nodes", nodes.len()); let (nodes, filtered_out): (Vec<_>, Vec<_>) = nodes diff --git a/src/jormungandr/jormungandr/src/rest/mod.rs b/src/jormungandr/jormungandr/src/rest/mod.rs index 344cf67f1d..962e305df8 100644 --- a/src/jormungandr/jormungandr/src/rest/mod.rs +++ b/src/jormungandr/jormungandr/src/rest/mod.rs @@ -156,7 +156,7 @@ async fn run_server_with_app( }; } -pub(self) fn display_internal_server_error(err: &impl Error) -> String { +fn display_internal_server_error(err: &impl Error) -> String { use std::fmt::{self, Write}; fn error_to_body(err: &impl Error) -> Result { diff --git a/src/jormungandr/jormungandr/src/rest/v0/logic.rs b/src/jormungandr/jormungandr/src/rest/v0/logic.rs index 47e4d1abe2..df85b6723e 100644 --- a/src/jormungandr/jormungandr/src/rest/v0/logic.rs +++ b/src/jormungandr/jormungandr/src/rest/v0/logic.rs @@ -59,7 +59,7 @@ pub enum Error { #[error(transparent)] Deserialize(ReadError), #[error(transparent)] - TxMsgSendError(#[from] TrySendError), + TxMsgSendError(#[from] Box>), #[error(transparent)] MsgSendError(#[from] SendError), #[error("Block value calculation error")] @@ -164,7 +164,12 @@ pub async fn post_message( fail_fast: true, reply_handle, }; - context.try_full()?.transaction_task.clone().try_send(msg)?; + context + .try_full()? + .transaction_task + .clone() + .try_send(msg) + .map_err(|e| Error::TxMsgSendError(Box::new(e)))?; let reply = reply_future.await?; if reply.is_error() { Err(Error::Fragment(reply)) @@ -316,11 +321,7 @@ pub async fn get_settings(context: &Context) -> Result { Ok(SettingsDto { block0_hash: static_params.block0_initial_hash.to_string(), block0_time: SystemTime::from_secs_since_epoch(static_params.block0_start_time.0), - curr_slot_start_time: full_context - .stats_counter - .get_stats() - .last_block_time - .map(SystemTime::from), + curr_slot_start_time: full_context.stats_counter.get_stats().last_block_time, consensus_version: consensus_version.to_string(), fees, block_content_max_size, diff --git a/src/jormungandr/jormungandr/src/rest/v1/logic.rs b/src/jormungandr/jormungandr/src/rest/v1/logic.rs index 93af2e5e23..a92ce03f86 100644 --- a/src/jormungandr/jormungandr/src/rest/v1/logic.rs +++ b/src/jormungandr/jormungandr/src/rest/v1/logic.rs @@ -35,7 +35,7 @@ pub enum Error { #[error(transparent)] Intercom(#[from] intercom::Error), #[error(transparent)] - TxMsgSend(#[from] TrySendError), + TxMsgSend(#[from] Box>), #[error(transparent)] MsgSend(#[from] SendError), #[error("Block value calculation error")] @@ -103,7 +103,9 @@ pub async fn post_fragments( fail_fast: batch.fail_fast, reply_handle, }; - msgbox.try_send(msg)?; + msgbox + .try_send(msg) + .map_err(|e| Error::TxMsgSend(Box::new(e)))?; let reply = reply_future.await?; if reply.is_error() { Err(Error::Fragments(reply)) diff --git a/src/jormungandr/jormungandr/src/secure/mod.rs b/src/jormungandr/jormungandr/src/secure/mod.rs index c8736efb7c..8aa48f05c9 100644 --- a/src/jormungandr/jormungandr/src/secure/mod.rs +++ b/src/jormungandr/jormungandr/src/secure/mod.rs @@ -26,6 +26,7 @@ pub struct GenesisPraos { } #[derive(Clone, Deserialize)] +#[allow(dead_code)] pub struct OwnerKey(Identifier); /// Node Secret(s) diff --git a/src/jormungandr/jormungandr/src/settings/logging.rs b/src/jormungandr/jormungandr/src/settings/logging.rs index 982210f6cd..650dadf128 100644 --- a/src/jormungandr/jormungandr/src/settings/logging.rs +++ b/src/jormungandr/jormungandr/src/settings/logging.rs @@ -203,7 +203,6 @@ impl LogSettings { LogOutput::File(path) => { let file = fs::OpenOptions::new() .create(true) - .write(true) .append(true) .open(path) .map_err(|cause| Error::FileError { diff --git a/src/jormungandr/jormungandr/src/settings/start/mod.rs b/src/jormungandr/jormungandr/src/settings/start/mod.rs index ae1f06b268..37132c72a7 100644 --- a/src/jormungandr/jormungandr/src/settings/start/mod.rs +++ b/src/jormungandr/jormungandr/src/settings/start/mod.rs @@ -182,10 +182,10 @@ impl RawSettings { #[cfg(feature = "prometheus-metrics")] let prometheus = command_arguments.prometheus_enabled - || config.as_ref().map_or(false, |cfg| { + || config.as_ref().is_some_and(|cfg| { cfg.prometheus .as_ref() - .map_or(false, |settings| settings.enabled) + .is_some_and(|settings| settings.enabled) }); Ok(Settings { diff --git a/src/jormungandr/jormungandr/src/topology/process.rs b/src/jormungandr/jormungandr/src/topology/process.rs index e296e0f2ba..793ae47c25 100644 --- a/src/jormungandr/jormungandr/src/topology/process.rs +++ b/src/jormungandr/jormungandr/src/topology/process.rs @@ -1,4 +1,4 @@ -use super::{Gossip, Gossips, P2pTopology, Peer}; +use super::{Gossips, P2pTopology, Peer}; use crate::{ intercom::{NetworkMsg, PropagateMsg, TopologyMsg}, metrics::Metrics, @@ -40,12 +40,7 @@ pub async fn start(task_data: TaskData) { let mut topology = P2pTopology::new(&config, stats_counter); - topology.accept_gossips(Gossips::from( - initial_peers - .into_iter() - .map(Gossip::from) - .collect::>(), - )); + topology.accept_gossips(Gossips::from(initial_peers.into_iter().collect::>())); let mut gossip_interval = tokio::time::interval(config.gossip_interval); gossip_interval.set_missed_tick_behavior(MissedTickBehavior::Delay); diff --git a/src/jormungandr/testing/hersir/src/builder/settings/wallet.rs b/src/jormungandr/testing/hersir/src/builder/settings/wallet.rs index ffd785cdd7..0ae104e028 100644 --- a/src/jormungandr/testing/hersir/src/builder/settings/wallet.rs +++ b/src/jormungandr/testing/hersir/src/builder/settings/wallet.rs @@ -151,11 +151,12 @@ impl TryFrom for WalletLib { type Error = Error; fn try_from(wallet: Wallet) -> Result { - Ok(Inner::try_from(wallet) - .map_err(|_| { - Error::OperationUnavailableForExternalWallet("into WalletLib".to_string()) - })? - .into()) + if wallet.inner.is_none() { + return Err(Error::OperationUnavailableForExternalWallet( + "into WalletLib".to_string(), + )); + } + Ok(Inner::from(wallet).into()) } } diff --git a/src/jormungandr/testing/hersir/src/config/blockchain/mod.rs b/src/jormungandr/testing/hersir/src/config/blockchain/mod.rs index eb0e4e4150..40c98dfa30 100644 --- a/src/jormungandr/testing/hersir/src/config/blockchain/mod.rs +++ b/src/jormungandr/testing/hersir/src/config/blockchain/mod.rs @@ -1,5 +1,4 @@ mod configuration; -pub use chain_impl_mockchain::chaintypes::ConsensusVersion; pub use configuration::{BlockchainBuilder, BlockchainConfiguration}; use jormungandr_lib::crypto::hash::Hash; use serde::Deserialize; diff --git a/src/jormungandr/testing/hersir/src/controller/interactive/controller.rs b/src/jormungandr/testing/hersir/src/controller/interactive/controller.rs index 44f5fe1011..8b201dc244 100644 --- a/src/jormungandr/testing/hersir/src/controller/interactive/controller.rs +++ b/src/jormungandr/testing/hersir/src/controller/interactive/controller.rs @@ -187,8 +187,8 @@ impl UserInteractionController { let to = self .wallets() .iter() + .find(|&x| x.address() == to_address) .cloned() - .find(|x| x.address() == to_address) .unwrap_or_else(|| panic!("cannot find wallet with alias: {}", to_str)); let mut temp_wallets = self.wallets_mut().clone(); @@ -216,7 +216,7 @@ impl UserInteractionController { } pub fn spawn_node(&mut self, input_params: SpawnParams) -> Result { - self.controller.spawn(input_params).map_err(Into::into) + self.controller.spawn(input_params) } } diff --git a/src/jormungandr/testing/hersir/src/controller/mod.rs b/src/jormungandr/testing/hersir/src/controller/mod.rs index c2db1952b5..1f009c7b5e 100644 --- a/src/jormungandr/testing/hersir/src/controller/mod.rs +++ b/src/jormungandr/testing/hersir/src/controller/mod.rs @@ -64,27 +64,27 @@ impl Controller { self.settings .wallets .iter() + .find(|&w| w.has_alias(&wallet.to_string())) .cloned() - .find(|w| w.has_alias(&wallet.to_string())) } pub fn controlled_wallet(&self, wallet: &str) -> Option { self.settings .wallets .iter() + .filter(|&x| x.template().is_generated()) + .find(|&w| w.has_alias(&wallet.to_string())) .cloned() - .filter(|x| x.template().is_generated()) - .find(|w| w.has_alias(&wallet.to_string())) - .map(|w| w.try_into().unwrap()) + .map(|w| w.into()) } pub fn controlled_wallets(&self) -> Vec { self.settings() .wallets .iter() + .filter(|&x| x.template().is_generated()) .cloned() - .filter(|x| x.template().is_generated()) - .map(|w| w.try_into().unwrap()) + .map(|w| w.into()) .collect() } diff --git a/src/jormungandr/testing/hersir/src/controller/monitor/mod.rs b/src/jormungandr/testing/hersir/src/controller/monitor/mod.rs index f206108df3..46e0e8f166 100644 --- a/src/jormungandr/testing/hersir/src/controller/monitor/mod.rs +++ b/src/jormungandr/testing/hersir/src/controller/monitor/mod.rs @@ -143,12 +143,9 @@ impl MonitorController { .settings() .wallets .iter() + .filter(|&x| x.template().is_generated()) .cloned() - .filter(|x| x.template().is_generated()) - .map(|x| { - x.try_into() - .expect("internal error.. generated wallet should have inner wallet") - }) + .map(|x| x.into()) .collect() } @@ -176,8 +173,8 @@ impl MonitorController { self.settings() .wallets .iter() + .find(|&w| w.template().alias() == Some(wallet.to_string())) .cloned() - .find(|w| w.template().alias() == Some(wallet.to_string())) .map(|w| w.into()) .ok_or_else(|| Error::WalletNotFound(wallet.to_owned())) } diff --git a/src/jormungandr/testing/hersir/src/controller/monitor/node/legacy.rs b/src/jormungandr/testing/hersir/src/controller/monitor/node/legacy.rs index c37d636f7e..8884aef46b 100644 --- a/src/jormungandr/testing/hersir/src/controller/monitor/node/legacy.rs +++ b/src/jormungandr/testing/hersir/src/controller/monitor/node/legacy.rs @@ -7,9 +7,8 @@ use chain_impl_mockchain::{ header::HeaderId, }; pub use jormungandr_automation::jormungandr::{ - grpc::JormungandrClient, BackwardCompatibleRest, FragmentNode, FragmentNodeError, - JormungandrLogger, JormungandrProcess, JormungandrRest, MemPoolCheck, StartupVerificationMode, - Status, + BackwardCompatibleRest, FragmentNode, FragmentNodeError, JormungandrLogger, JormungandrProcess, + JormungandrRest, MemPoolCheck, StartupVerificationMode, Status, }; use jormungandr_automation::{ jormungandr::{LogLevel, NodeAlias, StartupError}, @@ -73,7 +72,7 @@ impl LegacyNode { pub fn stats(&self) -> Result { let stats = self.legacy_rest().stats()?; let docs = YamlLoader::load_from_str(&stats)?; - Ok(docs.get(0).unwrap().clone()) + Ok(docs.first().unwrap().clone()) } pub fn log_stats(&self) { diff --git a/src/jormungandr/testing/hersir/src/controller/monitor/node/mod.rs b/src/jormungandr/testing/hersir/src/controller/monitor/node/mod.rs index 430eed1fc1..d38af93afe 100644 --- a/src/jormungandr/testing/hersir/src/controller/monitor/node/mod.rs +++ b/src/jormungandr/testing/hersir/src/controller/monitor/node/mod.rs @@ -8,8 +8,7 @@ use chain_impl_mockchain::fragment::{Fragment, FragmentId}; use indicatif::ProgressBar; pub use jormungandr_automation::jormungandr::{ grpc::{client::MockClientError, JormungandrClient}, - uri_from_socket_addr, FragmentNode, FragmentNodeError, JormungandrLogger, JormungandrRest, - MemPoolCheck, RestError, + FragmentNode, FragmentNodeError, JormungandrLogger, JormungandrRest, MemPoolCheck, RestError, }; use jormungandr_automation::{ jormungandr::{ @@ -33,7 +32,7 @@ use std::{ time::Duration, }; -#[derive(custom_debug::Debug, thiserror::Error)] +#[derive(Debug, thiserror::Error)] pub enum Error { #[error(transparent)] Io(#[from] io::Error), @@ -88,7 +87,6 @@ pub enum Error { ShutdownProcedure { alias: String, message: String, - #[debug(skip)] logs: Vec, }, #[error("node '{alias}' failed to shutdown: {e}")] @@ -101,7 +99,6 @@ pub enum Error { FragmentNotInMemPoolLogs { alias: String, fragment_id: FragmentId, - #[debug(skip)] logs: Vec, }, #[error("fragment '{fragment_id}' is pending for too long ({} s) for node '{alias}'", .duration.as_secs())] @@ -109,7 +106,6 @@ pub enum Error { fragment_id: FragmentId, duration: Duration, alias: String, - #[debug(skip)] logs: Vec, }, #[error(transparent)] @@ -217,9 +213,8 @@ impl Node { e, } }) - .map(|exit_status| { + .inspect(|_exit_status| { self.progress_bar.log_info("shutdown successfully."); - exit_status }) } diff --git a/src/jormungandr/testing/hersir/src/utils/vote_plan.rs b/src/jormungandr/testing/hersir/src/utils/vote_plan.rs index 2fc09e20f6..2bd856503b 100644 --- a/src/jormungandr/testing/hersir/src/utils/vote_plan.rs +++ b/src/jormungandr/testing/hersir/src/utils/vote_plan.rs @@ -6,6 +6,7 @@ use chain_impl_mockchain::{ }; pub trait VotePlanExtension { + #[allow(dead_code)] fn convert_to_def(self, key: &VotePlanKey) -> VotePlanDef; } diff --git a/src/jormungandr/testing/jormungandr-automation/Cargo.toml b/src/jormungandr/testing/jormungandr-automation/Cargo.toml index 2c17f486e1..f50ec6167f 100644 --- a/src/jormungandr/testing/jormungandr-automation/Cargo.toml +++ b/src/jormungandr/testing/jormungandr-automation/Cargo.toml @@ -56,7 +56,7 @@ json = "0.12.4" strum = { version = "0.24", features = ["derive"] } tracing.workspace = true log = { version = "0.4", features = ["serde"] } -netstat2 = "0.9" +netstat2 = "0.11.1" multiaddr = { package = "parity-multiaddr", version = "0.11" } keynesis = "1" tempfile = "3" diff --git a/src/jormungandr/testing/jormungandr-automation/src/jcli/command/certificate.rs b/src/jormungandr/testing/jormungandr-automation/src/jcli/command/certificate.rs index cf87706623..7d038f7833 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jcli/command/certificate.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jcli/command/certificate.rs @@ -34,7 +34,7 @@ impl CertificateCommand { .arg("--pool-id") .arg(stake_pool_id.into()) .arg("--retirement-time") - .arg(&retirement_time.to_string()); + .arg(retirement_time.to_string()); self } @@ -136,9 +136,9 @@ impl CertificateCommand { .arg("--vrf-key") .arg(vrf_key.into()) .arg("--start-validity") - .arg(&start_validity.to_string()) + .arg(start_validity.to_string()) .arg("--management-threshold") - .arg(&management_threshold.to_string()) + .arg(management_threshold.to_string()) .arg("--owner") .arg(owner_pk.into()); diff --git a/src/jormungandr/testing/jormungandr-automation/src/jcli/command/transaction.rs b/src/jormungandr/testing/jormungandr-automation/src/jcli/command/transaction.rs index 2d2e053c75..709a9c6186 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jcli/command/transaction.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jcli/command/transaction.rs @@ -211,7 +211,7 @@ impl TransactionCommand { .arg("--block0-hash") .arg(block0_hash) .arg("--valid-until") - .arg(&expiry_date.to_string()) + .arg(expiry_date.to_string()) .arg("--force"); if post { diff --git a/src/jormungandr/testing/jormungandr-automation/src/jcli/command/votes/mod.rs b/src/jormungandr/testing/jormungandr-automation/src/jcli/command/votes/mod.rs index c1ea81db06..e1de4eeb2b 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jcli/command/votes/mod.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jcli/command/votes/mod.rs @@ -9,7 +9,6 @@ mod tally; pub use committee::CommitteeCommand; pub use crs::CrsCommand; -pub use election_public_key::ElectionPublicKeyCommand; pub use tally::TallyCommand; #[derive(Debug)] diff --git a/src/jormungandr/testing/jormungandr-automation/src/jcli/services/fragment_sender.rs b/src/jormungandr/testing/jormungandr-automation/src/jcli/services/fragment_sender.rs index 9ff1f8a948..cd7d8cabc2 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jcli/services/fragment_sender.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jcli/services/fragment_sender.rs @@ -11,7 +11,7 @@ impl<'a> FragmentSender<'a> { Self { jcli, jormungandr } } - pub fn send(self, transaction: &'a str) -> FragmentCheck { + pub fn send(self, transaction: &'a str) -> FragmentCheck<'a> { let summary = self .jcli .rest() @@ -30,7 +30,7 @@ impl<'a> FragmentSender<'a> { FragmentCheck::new(self.jcli, self.jormungandr, id, summary) } - pub fn send_many(self, transactions: &'a [String]) -> FragmentsCheck { + pub fn send_many(self, transactions: &'a [String]) -> FragmentsCheck<'a> { for tx in transactions { self.jcli .rest() diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/configuration/mod.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/configuration/mod.rs index 882c603ed8..374473bec3 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/configuration/mod.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/configuration/mod.rs @@ -13,7 +13,7 @@ mod secret; pub use block0::Block0ConfigurationBuilder; pub use jormungandr_config::EitherHashOrBlock0; pub use node::{NodeConfigBuilder, NodeConfigManager}; -pub use secret::{NodeSecretExtension, SecretModelFactory}; +pub use secret::SecretModelFactory; lazy_static! { static ref NEXT_AVAILABLE_PORT_NUMBER: AtomicU16 = AtomicU16::new(10000); diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/explorer/verifiers/all_blocks_verifier.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/explorer/verifiers/all_blocks_verifier.rs index 1c8b806749..e880c61a89 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/explorer/verifiers/all_blocks_verifier.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/explorer/verifiers/all_blocks_verifier.rs @@ -358,7 +358,7 @@ impl ExplorerVerifier { fn assert_all_block_config_param( config_params: &ConfigParams, - explorer_config_param: &Vec, + explorer_config_param: &[all_blocks::configParam], ) { assert_eq!(explorer_config_param.len(), config_params.iter().len()); diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/explorer/verifiers/block_by_id_verifier.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/explorer/verifiers/block_by_id_verifier.rs index 05e500d3d5..969d607004 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/explorer/verifiers/block_by_id_verifier.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/explorer/verifiers/block_by_id_verifier.rs @@ -355,7 +355,7 @@ impl ExplorerVerifier { fn assert_block_config_param( config_params: &ConfigParams, - explorer_config_param: &Vec, + explorer_config_param: &[block_by_id::configParam], ) { assert_eq!(explorer_config_param.len(), config_params.iter().len()); diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/explorer/verifiers/transactions_by_address_verify.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/explorer/verifiers/transactions_by_address_verify.rs index 5db6f4d23e..2ea59e50c1 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/explorer/verifiers/transactions_by_address_verify.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/explorer/verifiers/transactions_by_address_verify.rs @@ -34,7 +34,7 @@ impl ExplorerVerifier { for edges in explorer_transactions.edges.iter() { let node = &edges.node; - assert!(fragment_statuses.get(&node.id.to_string()).is_some()); + assert!(fragment_statuses.contains_key(&node.id.to_string())); let fragment_status = fragment_statuses.get(&node.id.to_string()).unwrap().1; assert!( matches!(fragment_status, FragmentStatus::InABlock { date, block: _ } if diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/fragment_node.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/fragment_node.rs index a8a36b4ce2..29a84dcd88 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/fragment_node.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/fragment_node.rs @@ -6,14 +6,13 @@ use jormungandr_lib::{ }; use std::collections::HashMap; -#[derive(custom_debug::Debug, thiserror::Error)] +#[derive(Debug, thiserror::Error)] pub enum FragmentNodeError { #[error("cannot send fragment due to '{reason}' to '{fragment_id}' to node '{alias}'")] CannotSendFragment { reason: String, alias: String, fragment_id: FragmentId, - #[debug(skip)] logs: Vec, }, #[error("reqwest error")] @@ -29,7 +28,6 @@ pub enum FragmentNodeError { reason: String, alias: String, fragment_ids: Vec, - #[debug(skip)] logs: Vec, }, } diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/grpc/server/builder.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/grpc/server/builder.rs index 8e9c04e953..967fe54192 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/grpc/server/builder.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/grpc/server/builder.rs @@ -56,7 +56,7 @@ impl MockBuilder { pub fn build_data(&self) -> Arc> { let storage = BlockStore::memory(Hash::zero_hash().as_bytes().to_owned()).unwrap(); - let block0 = if let Some(block) = self.genesis_block.clone().take() { + let block0 = if let Some(block) = self.genesis_block.clone() { block } else { // Block contents do not really matter. diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/grpc/server/controller.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/grpc/server/controller.rs index e01daea627..1286dbaa73 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/grpc/server/controller.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/grpc/server/controller.rs @@ -32,12 +32,9 @@ impl MockController { } } - pub fn finish_and_verify_that( - self, - verify_func: F, - ) -> MockExitCode + pub fn finish_and_verify_that(self, verify_func: F) -> MockExitCode where - F: Fn(&MockVerifier) -> bool, + F: 'static + std::marker::Send + Fn(&MockVerifier) -> bool, { let start = Instant::now(); let timeout = Duration::from_secs(120); diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/legacy/config/node/data.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/legacy/config/node/data.rs index 10a24cd11f..2ea5da7799 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/legacy/config/node/data.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/legacy/config/node/data.rs @@ -69,7 +69,7 @@ pub struct LegacyNodeConfig { pub p2p: P2p, #[serde(skip_serializing_if = "Option::is_none")] pub log: Option, - #[serde(rename = "log", skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub single_log: Option, pub mempool: Option, pub bootstrap_from_trusted_peers: Option, diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/legacy/config/node/mod.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/legacy/config/node/mod.rs index a6bbd0370f..ceaa3c1011 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/legacy/config/node/mod.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/legacy/config/node/mod.rs @@ -122,7 +122,7 @@ impl LegacyNodeConfigConverter { LegacyNodeConfig { storage: source.storage.clone(), - single_log: source.log.clone().map(Into::into), + single_log: source.log.clone(), log: None, rest: Rest { listen: source.rest.listen, @@ -164,7 +164,7 @@ impl LegacyNodeConfigConverter { LegacyNodeConfig { storage: source.storage.clone(), - single_log: source.log.clone().map(Into::into), + single_log: source.log.clone(), log: None, rest: Rest { listen: source.rest.listen, @@ -251,7 +251,7 @@ impl LegacyNodeConfigConverter { mempool: source.mempool.clone(), bootstrap_from_trusted_peers: source.bootstrap_from_trusted_peers, skip_bootstrap: source.skip_bootstrap, - single_log: source.log.clone().map(Into::into), + single_log: source.log.clone(), } } } diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/legacy/mod.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/legacy/mod.rs index cd3be9be35..96d7f7edf3 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/legacy/mod.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/legacy/mod.rs @@ -8,9 +8,6 @@ pub use config::{ LegacyConfigError, LegacyNodeConfig, LegacyNodeConfigBuilder, LegacyNodeConfigConverter, LegacyNodeConfigManager, }; -pub use jormungandr_lib::interfaces::{ - Log, Mempool, NodeConfig, P2p, Policy, Rest, TopicsOfInterest, TrustedPeer, -}; use jortestkit::file; pub use rest::BackwardCompatibleRest; use std::path::PathBuf; @@ -28,9 +25,9 @@ lazy_static::lazy_static! { pub fn download_last_n_releases(n: u32) -> Vec { RELEASES .into_iter() - .cloned() - .filter(|x| !x.version_str().starts_with("nightly")) + .filter(|&x| !x.version_str().starts_with("nightly")) .take(n as usize) + .cloned() .collect() } diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/logger.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/logger.rs index ce6fcdafb4..9460958172 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/logger.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/logger.rs @@ -291,7 +291,7 @@ impl JormungandrLogger { .iter() .filter(|x| x.message().contains("validated block")) .map(|x| x.block_date()) - .last() + .next_back() .unwrap_or(None) } diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/process.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/process.rs index 9964a64c1c..8abc043c62 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/process.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/process.rs @@ -398,7 +398,7 @@ impl SyncNode for JormungandrProcess { self.logger .get_log_lines_with_level(LogLevel::ERROR) .map(|x| x.to_string()) - .chain(self.logger.get_panic_lines().into_iter()) + .chain(self.logger.get_panic_lines()) .collect() } diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/remote.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/remote.rs index 3c72dfcbe0..4b9d08336a 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/remote.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/remote.rs @@ -94,7 +94,7 @@ impl SyncNode for RemoteJormungandr { Some(logger) => logger .get_log_lines_with_level(LogLevel::ERROR) .map(|x| x.to_string()) - .chain(logger.get_panic_lines().into_iter()) + .chain(logger.get_panic_lines()) .collect(), None => vec!["log not available".to_string()], } diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/rest/mod.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/rest/mod.rs index 45f3d95b4e..d090680530 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/rest/mod.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/rest/mod.rs @@ -232,7 +232,7 @@ impl JormungandrRest { } pub fn block_as_bytes(&self, header_hash: &HeaderId) -> Result, RestError> { - self.inner.block_as_bytes(header_hash).map_err(Into::into) + self.inner.block_as_bytes(header_hash) } pub fn shutdown(&self) -> Result { @@ -251,7 +251,7 @@ impl JormungandrRest { &self, ids: Vec, ) -> Result, RestError> { - self.inner.fragments_statuses(ids).map_err(Into::into) + self.inner.fragments_statuses(ids) } pub fn send_fragment_batch( @@ -259,9 +259,7 @@ impl JormungandrRest { fragments: Vec, fail_fast: bool, ) -> Result { - self.inner - .send_fragment_batch(fragments, fail_fast) - .map_err(Into::into) + self.inner.send_fragment_batch(fragments, fail_fast) } pub fn vote_plan_statuses(&self) -> Result, RestError> { diff --git a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/starter/mod.rs b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/starter/mod.rs index 93face58b3..cabbbc1d03 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/jormungandr/starter/mod.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/jormungandr/starter/mod.rs @@ -1,7 +1,7 @@ #![allow(dead_code)] mod commands; -pub use commands::{get_command, CommandBuilder}; +pub use commands::get_command; mod params; mod testing_directory; diff --git a/src/jormungandr/testing/jormungandr-automation/src/testing/benchmark/sync/report.rs b/src/jormungandr/testing/jormungandr-automation/src/testing/benchmark/sync/report.rs index 27b8de9626..8eaafc6d3b 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/testing/benchmark/sync/report.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/testing/benchmark/sync/report.rs @@ -30,18 +30,18 @@ impl MeasurementReporter { self.counter >= self.interval } - pub fn do_if_interval_reached(&self, method: F) + pub fn do_if_interval_reached(&self, method: F) where - F: Fn(), + F: std::marker::Send + Fn(), { if self.is_interval_reached() { method(); } } - pub fn do_if_interval_reached_and_inc(&mut self, method: F) + pub fn do_if_interval_reached_and_inc(&mut self, method: F) where - F: Fn(), + F: std::marker::Send + Fn(), { if self.is_interval_reached() { method(); diff --git a/src/jormungandr/testing/jormungandr-automation/src/testing/blockchain_config.rs b/src/jormungandr/testing/jormungandr-automation/src/testing/blockchain_config.rs index 82d81dd1ec..9e67a70c15 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/testing/blockchain_config.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/testing/blockchain_config.rs @@ -7,10 +7,7 @@ pub trait BlockchainConfigurationExtension { impl BlockchainConfigurationExtension for BlockchainConfiguration { fn reward_parameters(&self) -> Option { - let reward_param = match self.reward_parameters { - None => return None, - Some(r) => r, - }; + let reward_param = self.reward_parameters?; let reward_drawing = match self.reward_constraints.reward_drawing_limit_max { None => Limit::None, diff --git a/src/jormungandr/testing/jormungandr-automation/src/testing/panic.rs b/src/jormungandr/testing/jormungandr-automation/src/testing/panic.rs index 37d0af28e4..479f2709a9 100644 --- a/src/jormungandr/testing/jormungandr-automation/src/testing/panic.rs +++ b/src/jormungandr/testing/jormungandr-automation/src/testing/panic.rs @@ -8,7 +8,7 @@ pub fn persist_dir_on_panic, S2: AsRef>( ) { if panicking() { let logs_dir = match tempfile::Builder::new().prefix("jormungandr_").tempdir() { - Ok(dir) => dir.into_path(), + Ok(dir) => dir.keep(), Err(e) => { eprintln!("Could not create logs dir: {}", e); return; diff --git a/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/tally/merge_results.rs b/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/tally/merge_results.rs index 9d1528934f..dbd36bf9e2 100644 --- a/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/tally/merge_results.rs +++ b/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/tally/merge_results.rs @@ -159,14 +159,14 @@ pub fn merge_two_voteplans() { .merge_results(vote_plan_statuses_file.path()) .unwrap(); - let merged_vote_plan = merged_vote_plans.get(0).unwrap(); + let merged_vote_plan = merged_vote_plans.first().unwrap(); let mut ids: BTreeSet = BTreeSet::new(); ids.insert(first_vote_plan.to_id().into()); ids.insert(second_vote_plan.to_id().into()); assert_eq!(merged_vote_plan.ids, ids); - let merged_proposal = merged_vote_plan.proposals.get(0).unwrap(); + let merged_proposal = merged_vote_plan.proposals.first().unwrap(); assert_eq!(merged_proposal.proposal_id, proposal_external_id.into()); assert_eq!(merged_proposal.votes_cast, 2); assert_eq!( diff --git a/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/explorer/explorer_sanity.rs b/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/explorer/explorer_sanity.rs index 5a65d082cb..ad6a505e07 100644 --- a/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/explorer/explorer_sanity.rs +++ b/src/jormungandr/testing/jormungandr-integration-tests/src/jormungandr/explorer/explorer_sanity.rs @@ -177,6 +177,7 @@ fn epoch(explorer: &Explorer) { assert_eq!(epoch.data.unwrap().epoch.id, "1", "can't find epoch"); } +#[allow(dead_code)] struct ExplorerProcess { handler: Option, logs_dir: Option, diff --git a/src/jormungandr/testing/loki/src/sender.rs b/src/jormungandr/testing/loki/src/sender.rs index 30c34691e7..93a0765d47 100644 --- a/src/jormungandr/testing/loki/src/sender.rs +++ b/src/jormungandr/testing/loki/src/sender.rs @@ -29,14 +29,13 @@ use thor::{ /// Send malformed transactions /// Only supports account based wallets -#[derive(custom_debug::Debug, thiserror::Error)] +#[derive(Debug, thiserror::Error)] pub enum AdversaryFragmentSenderError { #[error("fragment sent to node: {alias} is not in rejected, date: '{date}', block: '{block}'")] FragmentNotRejected { alias: String, date: jormungandr_lib::interfaces::BlockDate, block: Hash, - #[debug(skip)] logs: Vec, }, #[error("cannot build fragment")] diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/bootstrap/mod.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/bootstrap/mod.rs index e0c69200ec..527be96942 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/bootstrap/mod.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/bootstrap/mod.rs @@ -10,12 +10,11 @@ use std::path::PathBuf; use thiserror::Error; #[derive(Error, Debug)] -#[allow(clippy::large_enum_variant)] pub enum ClientLoadCommandError { #[error("No scenario defined for run. Available: [duration,iteration]")] NoScenarioDefined, #[error("Client Error")] - ClientError(#[from] MjolnirError), + ClientError(#[from] Box), } #[derive(Parser, Debug)] @@ -61,7 +60,9 @@ impl ClientLoadCommand { let config = self.build_config(); - Ok(PassiveBootstrapLoad::new(config).exec(scenario_type.unwrap())?) + PassiveBootstrapLoad::new(config) + .exec(scenario_type.unwrap()) + .map_err(|e| ClientLoadCommandError::ClientError(Box::new(e))) } fn get_block0_hash(&self) -> Hash { diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/error.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/error.rs index e001aa2741..e929fb61c9 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/error.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/error.rs @@ -5,7 +5,6 @@ use jormungandr_automation::{ use thiserror::Error; #[derive(Error, Debug)] -#[allow(clippy::large_enum_variant)] pub enum MjolnirError { #[error("cannot query rest")] RestError(#[from] RestError), @@ -18,5 +17,5 @@ pub enum MjolnirError { #[error("pace is too low ({0})")] PaceTooLow(u64), #[error("get block0 error")] - Block0Error(#[from] Block0Error), + Block0Error(#[from] Box), } diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/explorer.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/explorer.rs index c3edcfc463..ace5008556 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/explorer.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/explorer.rs @@ -11,7 +11,7 @@ use thiserror::Error; #[derive(Error, Debug)] pub enum ExplorerLoadCommandError { #[error("Client Error")] - ClientError(#[from] MjolnirError), + ClientError(#[from] Box), } #[derive(Parser, Debug)] diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/adversary/mod.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/adversary/mod.rs index 273e503f2b..016334ffbe 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/adversary/mod.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/adversary/mod.rs @@ -3,7 +3,6 @@ mod votes_only; use crate::mjolnir_lib::MjolnirError; use clap::Parser; -pub use votes_only::VotesOnly; #[derive(Parser, Debug)] pub enum Adversary { VotesOnly(votes_only::VotesOnly), diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/adversary/votes_only.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/adversary/votes_only.rs index 4e82e23042..09a28b8082 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/adversary/votes_only.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/adversary/votes_only.rs @@ -80,7 +80,8 @@ impl VotesOnly { Some(self.faucet_spending_counter.into()), Discrimination::from_testing_bool(self.testing), ); - let block0 = get_block(&self.block0_path)?; + let block0 = + get_block(&self.block0_path).map_err(|e| MjolnirError::Block0Error(Box::new(e)))?; let vote_plans = block0.vote_plans(); let remote_jormungandr = RemoteJormungandrBuilder::new("node".to_owned()) diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/mod.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/mod.rs index 445f72390a..feb642852a 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/mod.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/batch/mod.rs @@ -3,7 +3,6 @@ mod tx_only; use crate::mjolnir_lib::MjolnirError; use clap::Parser; -pub use tx_only::TxOnly; #[derive(Parser, Debug)] pub enum Batch { /// Prints nodes related data, like stats,fragments etc. diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/mod.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/mod.rs index 9c9735cea9..7a2b0fedc6 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/mod.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/mod.rs @@ -18,7 +18,7 @@ pub enum FragmentLoadCommand { #[derive(Error, Debug)] pub enum FragmentLoadCommandError { #[error("Client Error")] - ClientError(#[from] MjolnirError), + ClientError(#[from] Box), } impl FragmentLoadCommand { diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/adversary/mod.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/adversary/mod.rs index 162ba28017..b8930d16e4 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/adversary/mod.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/adversary/mod.rs @@ -3,7 +3,6 @@ mod votes_only; use crate::mjolnir_lib::MjolnirError; use clap::Parser; -pub use votes_only::VotesOnly; #[derive(Parser, Debug)] pub enum Adversary { diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/adversary/votes_only.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/adversary/votes_only.rs index 4e82e23042..09a28b8082 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/adversary/votes_only.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/adversary/votes_only.rs @@ -80,7 +80,8 @@ impl VotesOnly { Some(self.faucet_spending_counter.into()), Discrimination::from_testing_bool(self.testing), ); - let block0 = get_block(&self.block0_path)?; + let block0 = + get_block(&self.block0_path).map_err(|e| MjolnirError::Block0Error(Box::new(e)))?; let vote_plans = block0.vote_plans(); let remote_jormungandr = RemoteJormungandrBuilder::new("node".to_owned()) diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/mod.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/mod.rs index 614f1effb5..42fbbc88a4 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/mod.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/fragment/standard/mod.rs @@ -3,10 +3,7 @@ mod all; mod tx_only; use crate::mjolnir_lib::MjolnirError; -pub use adversary::Adversary; -pub use all::AllFragments; use clap::Parser; -pub use tx_only::TxOnly; #[derive(Parser, Debug)] pub enum Standard { /// Put load on endpoint using transaction fragments only. diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/adversary_generator.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/adversary_generator.rs index ade03ec073..ef2cf59eb7 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/adversary_generator.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/adversary_generator.rs @@ -77,7 +77,7 @@ impl<'a, S: SyncNode + Send> AdversaryFragmentGenerator<'a, S> { self.increment_split_marker(); let (senders, recievers) = self.wallets.split_at_mut(self.split_marker); let sender = senders.get_mut(senders.len() - 1).unwrap(); - let reciever = recievers.get(0).unwrap(); + let reciever = recievers.first().unwrap(); self.adversary_fragment_sender .send_random_faulty_transaction(sender, reciever, &self.jormungandr) diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/adversary_vote_casts_generator.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/adversary_vote_casts_generator.rs index d39da90cdb..327819ea1c 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/adversary_vote_casts_generator.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/adversary_vote_casts_generator.rs @@ -36,7 +36,7 @@ impl<'a, S: SyncNode + Send> AdversaryVoteCastsGenerator<'a, S> { node: RemoteJormungandr, fragment_sender: FragmentSender<'a, S>, ) -> Self { - let voting_privacy = vote_plans.get(0).unwrap().payload_type(); + let voting_privacy = vote_plans.first().unwrap().payload_type(); Self { expiry_generator, @@ -101,7 +101,7 @@ impl<'a, S: SyncNode + Send> AdversaryVoteCastsGenerator<'a, S> { } fn wrong_voting_privacy(&self) -> Fragment { - let vote_plan = self.vote_plans.get(0).unwrap(); + let vote_plan = self.vote_plans.first().unwrap(); let block0_hash = self.fragment_sender.block0_hash(); let fees = self.fragment_sender.fees(); @@ -118,7 +118,7 @@ impl<'a, S: SyncNode + Send> AdversaryVoteCastsGenerator<'a, S> { } fn wrong_choice(&self) -> Fragment { - let vote_plan = self.vote_plans.get(0).unwrap(); + let vote_plan = self.vote_plans.first().unwrap(); let options: u8 = vote_plan.proposals()[0].options().choice_range().end + 1; let block0_hash = self.fragment_sender.block0_hash(); let fees = self.fragment_sender.fees(); diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/batch_generator.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/batch_generator.rs index 7ac795f0ad..05760e74d4 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/batch_generator.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/batch_generator.rs @@ -97,7 +97,7 @@ impl<'a, S: SyncNode + Send> BatchFragmentGenerator<'a, S> { let (split_marker, witness_mode) = self.split_lane.next(self.wallets.len()); let (senders, recievers) = self.wallets.split_at_mut(split_marker); let sender = senders.get_mut(senders.len() - 1).unwrap(); - let reciever = recievers.get(0).unwrap(); + let reciever = recievers.first().unwrap(); let fragment = FragmentBuilder::new( &self.fragment_sender.block0_hash(), diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/fragment_generator.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/fragment_generator.rs index 7a3d04a01a..dfb313caf5 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/fragment_generator.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/fragment_generator.rs @@ -331,7 +331,7 @@ impl<'a, S: SyncNode + Send> FragmentGenerator<'a, S> { // wallet_idx is always 0 because we are using only one wallet let wallet_idx = 0; let wallet_votes_to_cast = vote_cast_register.advance_single(wallet_idx).unwrap(); - let votes_to_cast = wallet_votes_to_cast.get(0).unwrap(); + let votes_to_cast = wallet_votes_to_cast.first().unwrap(); let vote_plan = self .vote_plans_for_casting .iter() diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/transaction_generator.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/transaction_generator.rs index 68aa4bbe68..49279841c9 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/transaction_generator.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/transaction_generator.rs @@ -71,7 +71,7 @@ impl<'a, S: SyncNode + Send> TransactionGenerator<'a, S> { let (split_marker, witness_mode) = self.split_lane.next(self.wallets.len()); let (senders, recievers) = self.wallets.split_at_mut(split_marker); let sender = senders.get_mut(senders.len() - 1).unwrap(); - let reciever = recievers.get(0).unwrap(); + let reciever = recievers.first().unwrap(); self.fragment_sender .send_transaction_with_witness_mode( diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/vote_casts_generator.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/vote_casts_generator.rs index b0f2751bc0..36452d6ee3 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/vote_casts_generator.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/generators/vote_casts_generator.rs @@ -46,7 +46,7 @@ impl<'a, S: SyncNode + Send> VoteCastsGenerator<'a, S> { .votes_register .advance_single(self.send_marker) .unwrap(); - let vote_cast = vote_casts.get(0).unwrap(); + let vote_cast = vote_casts.first().unwrap(); let choice = Choice::new((self.rand.next_u32() % 3) as u8); diff --git a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/rest.rs b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/rest.rs index da7ba0e385..507286da57 100644 --- a/src/jormungandr/testing/mjolnir/src/mjolnir_lib/rest.rs +++ b/src/jormungandr/testing/mjolnir/src/mjolnir_lib/rest.rs @@ -11,7 +11,7 @@ use thiserror::Error; #[derive(Error, Debug)] pub enum RestLoadCommandError { #[error("Client Error")] - ClientError(#[from] MjolnirError), + ClientError(#[from] Box), } #[derive(Parser, Debug)] diff --git a/src/jormungandr/testing/thor/Cargo.toml b/src/jormungandr/testing/thor/Cargo.toml index 0ce4751b9b..f0d2dbd4a3 100644 --- a/src/jormungandr/testing/thor/Cargo.toml +++ b/src/jormungandr/testing/thor/Cargo.toml @@ -17,7 +17,7 @@ chain-core = { path = "../../../chain-libs/chain-core" } chain-vote = { path = "../../../chain-libs/chain-vote" } assert_fs = "1.0" serde = { version = "1.0", features = ["derive"] } -cocoon = { git = "https://github.com/dkijania/cocoon.git" } +cocoon = "0.4.3" dirs = "4.0.0" serde_yaml = "0.8" clap = { workspace = true } diff --git a/src/jormungandr/testing/thor/src/cli/config.rs b/src/jormungandr/testing/thor/src/cli/config.rs index c5fb0bdb46..b224290631 100644 --- a/src/jormungandr/testing/thor/src/cli/config.rs +++ b/src/jormungandr/testing/thor/src/cli/config.rs @@ -205,7 +205,7 @@ mod tests { let encoded: Vec = bincode::serialize(&secret_config).unwrap(); - let cocoon = Cocoon::new(b"password"); + let mut cocoon = Cocoon::new(b"password"); let filename = "secret.key"; { let mut file = File::create(filename).unwrap(); diff --git a/src/jormungandr/testing/thor/src/cli/controller.rs b/src/jormungandr/testing/thor/src/cli/controller.rs index d770e7daad..e11b84b81a 100644 --- a/src/jormungandr/testing/thor/src/cli/controller.rs +++ b/src/jormungandr/testing/thor/src/cli/controller.rs @@ -209,6 +209,6 @@ impl CliController { } pub fn save_config(&self) -> Result<(), Error> { - self.wallets.save_config().map_err(Into::into) + self.wallets.save_config() } } diff --git a/src/jormungandr/testing/thor/src/cli/wallet_controller.rs b/src/jormungandr/testing/thor/src/cli/wallet_controller.rs index 497a953d6c..8bf2745585 100644 --- a/src/jormungandr/testing/thor/src/cli/wallet_controller.rs +++ b/src/jormungandr/testing/thor/src/cli/wallet_controller.rs @@ -120,7 +120,7 @@ impl WalletController { data: Vec, password: &str, ) -> Result<(), Error> { - let cocoon = Cocoon::new(password.as_bytes()); + let mut cocoon = Cocoon::new(password.as_bytes()); let secret_file = self.config_manager.alias_secret_file(&alias)?; let mut file = File::create(&secret_file)?; diff --git a/src/jormungandr/testing/thor/src/fragment/chain_sender.rs b/src/jormungandr/testing/thor/src/fragment/chain_sender.rs index 6c2b277273..027744439e 100644 --- a/src/jormungandr/testing/thor/src/fragment/chain_sender.rs +++ b/src/jormungandr/testing/thor/src/fragment/chain_sender.rs @@ -149,7 +149,7 @@ impl<'a, S: SyncNode + Send> FragmentChainSender<'a, S> { } } -#[derive(custom_debug::Debug, thiserror::Error)] +#[derive(Debug, thiserror::Error)] pub enum FragmentChainSenderError { #[error("fragment sender error")] FragmentSenderError(#[from] FragmentSenderError), diff --git a/src/jormungandr/testing/thor/src/fragment/mod.rs b/src/jormungandr/testing/thor/src/fragment/mod.rs index 236eadd8b9..0279d827b7 100644 --- a/src/jormungandr/testing/thor/src/fragment/mod.rs +++ b/src/jormungandr/testing/thor/src/fragment/mod.rs @@ -4,7 +4,7 @@ pub use self::{ initial_certificates::{signed_delegation_cert, signed_stake_pool_cert, vote_plan_cert}, persistent_log::{write_into_persistent_log, PersistentLogViewer}, sender::{BlockDateGenerator, FragmentSender, FragmentSenderError}, - setup::{DummySyncNode, FragmentSenderSetup, FragmentSenderSetupBuilder, VerifyStrategy}, + setup::{DummySyncNode, FragmentSenderSetup, FragmentSenderSetupBuilder}, verifier::{ExitStrategy as VerifyExitStrategy, FragmentVerifier, FragmentVerifierError}, }; use crate::{ @@ -304,12 +304,9 @@ impl FragmentBuilder { let election_key = chain_vote::ElectionPublicKey::from_participants(vote_plan.committee_public_keys()); - let options = vote_plan - .proposals() - .iter() - .nth((proposal_index).into()) - .unwrap() - .options(); + let proposal: &chain_impl_mockchain::certificate::Proposal = + vote_plan.proposals().get(proposal_index as usize).unwrap(); + let options = proposal.options(); let length = options .choice_range() diff --git a/src/jormungandr/testing/thor/src/fragment/persistent_log.rs b/src/jormungandr/testing/thor/src/fragment/persistent_log.rs index dfd981c5d5..d5840b66f3 100644 --- a/src/jormungandr/testing/thor/src/fragment/persistent_log.rs +++ b/src/jormungandr/testing/thor/src/fragment/persistent_log.rs @@ -54,7 +54,7 @@ pub fn write_into_persistent_log>( Ok(()) } -#[derive(custom_debug::Debug, thiserror::Error)] +#[derive(Debug, thiserror::Error)] pub enum Error { #[error("cannot serialize entry of persistent log")] CannotSerializeEntry, diff --git a/src/jormungandr/testing/thor/src/fragment/sender.rs b/src/jormungandr/testing/thor/src/fragment/sender.rs index bce80c7860..41189e07eb 100644 --- a/src/jormungandr/testing/thor/src/fragment/sender.rs +++ b/src/jormungandr/testing/thor/src/fragment/sender.rs @@ -27,13 +27,12 @@ use jormungandr_lib::{ }; use std::{str::FromStr, time::Duration}; -#[derive(custom_debug::Debug, thiserror::Error)] +#[derive(Debug, thiserror::Error)] pub enum FragmentSenderError { #[error("fragment sent to node: {alias} is not in block due to '{reason}'")] FragmentNotInBlock { alias: String, reason: String, - #[debug(skip)] logs: Vec, }, #[error( diff --git a/src/jormungandr/testing/thor/src/fragment/verifier.rs b/src/jormungandr/testing/thor/src/fragment/verifier.rs index 68193c5444..198fe66a98 100644 --- a/src/jormungandr/testing/thor/src/fragment/verifier.rs +++ b/src/jormungandr/testing/thor/src/fragment/verifier.rs @@ -4,13 +4,12 @@ use jormungandr_lib::interfaces::{FragmentLog, FragmentStatus}; use jortestkit::prelude::Wait; use std::{collections::HashMap, time::Duration}; -#[derive(custom_debug::Debug, thiserror::Error)] +#[derive(Debug, thiserror::Error)] pub enum FragmentVerifierError { #[error("fragment sent to node: {alias} is not in block :({status:?})")] FragmentNotInBlock { alias: String, status: FragmentStatus, - #[debug(skip)] logs: Vec, }, #[error("cannot match rejection reason '{message}' does not contains '{expected_part}'")] @@ -22,7 +21,6 @@ pub enum FragmentVerifierError { FragmentNotRejected { alias: String, status: FragmentStatus, - #[debug(skip)] logs: Vec, }, #[error("transaction is pending for too long")] @@ -30,14 +28,12 @@ pub enum FragmentVerifierError { fragment_id: FragmentId, timeout: Duration, alias: String, - #[debug(skip)] logs: Vec, }, #[error("transactions are pending for too long")] FragmentsArePendingForTooLong { timeout: Duration, alias: String, - #[debug(skip)] logs: Vec, }, @@ -45,7 +41,6 @@ pub enum FragmentVerifierError { FragmentNotInMemPoolLogs { alias: String, fragment_id: FragmentId, - #[debug(skip)] logs: Vec, }, #[error("fragment node error")] @@ -53,14 +48,10 @@ pub enum FragmentVerifierError { #[error("at least on rejected fragment error")] AtLeastOneRejectedFragment { fragment_id: FragmentId, - #[debug(skip)] logs: Vec, }, #[error("timeout reached while waiting for all fragments in a block")] - TimeoutReachedWhileWaitingForAllFragmentsInBlock { - #[debug(skip)] - logs: Vec, - }, + TimeoutReachedWhileWaitingForAllFragmentsInBlock { logs: Vec }, } impl FragmentVerifierError { diff --git a/src/jormungandr/testing/thor/src/wallet/account.rs b/src/jormungandr/testing/thor/src/wallet/account.rs index ea2701ba82..0317c1d8c8 100644 --- a/src/jormungandr/testing/thor/src/wallet/account.rs +++ b/src/jormungandr/testing/thor/src/wallet/account.rs @@ -65,9 +65,7 @@ impl Wallet { Wallet { signing_key, internal_counters: SpendingCounterIncreasing::new_from_counter( - spending_counter - .map(Into::into) - .unwrap_or_else(SpendingCounter::zero), + spending_counter.unwrap_or_else(SpendingCounter::zero), ), discrimination, } diff --git a/src/jormungandr/testing/thor/src/wallet/committee/mod.rs b/src/jormungandr/testing/thor/src/wallet/committee/mod.rs index 4f01de52e0..7bc0baa2b9 100644 --- a/src/jormungandr/testing/thor/src/wallet/committee/mod.rs +++ b/src/jormungandr/testing/thor/src/wallet/committee/mod.rs @@ -222,6 +222,5 @@ impl CommitteeDataManager { ) .collect(), ) - .map_err(Into::into) } } diff --git a/src/jormungandr/testing/thor/src/wallet/mod.rs b/src/jormungandr/testing/thor/src/wallet/mod.rs index 88256ae0fe..9f81be3af5 100644 --- a/src/jormungandr/testing/thor/src/wallet/mod.rs +++ b/src/jormungandr/testing/thor/src/wallet/mod.rs @@ -95,7 +95,7 @@ impl Wallet { let bech32_str = jortestkit::file::read_file(secret_key_file).unwrap(); Wallet::Account(account::Wallet::from_existing_account( &bech32_str, - spending_counter.map(Into::into), + spending_counter, discrimination, )) } @@ -117,7 +117,7 @@ impl Wallet { ) -> Wallet { Wallet::Account(account::Wallet::from_existing_account( signing_key_bech32, - spending_counter.map(Into::into), + spending_counter, discrimination, )) } diff --git a/src/jortestkit/src/file/mod.rs b/src/jortestkit/src/file/mod.rs index 624c315148..f6666640a3 100644 --- a/src/jortestkit/src/file/mod.rs +++ b/src/jortestkit/src/file/mod.rs @@ -91,10 +91,7 @@ pub fn get_file_as_byte_vec>(filename: P) -> Result, std: } pub fn append, S: Into>(filename: P, line: S) -> Result<(), std::io::Error> { - let mut file = OpenOptions::new() - .write(true) - .append(true) - .open(filename.as_ref())?; + let mut file = OpenOptions::new().append(true).open(filename.as_ref())?; writeln!(file, "{}", line.into()) } @@ -103,10 +100,7 @@ pub fn write_lines, S: Into>( filename: P, lines: Vec, ) -> Result<(), std::io::Error> { - let mut file = OpenOptions::new() - .write(true) - .append(true) - .open(filename.as_ref())?; + let mut file = OpenOptions::new().append(true).open(filename.as_ref())?; for line in lines { writeln!(file, "{}", line.into())?; diff --git a/src/jortestkit/src/load/request.rs b/src/jortestkit/src/load/request.rs index 9e7b444321..a1555a4723 100644 --- a/src/jortestkit/src/load/request.rs +++ b/src/jortestkit/src/load/request.rs @@ -1,6 +1,6 @@ use super::Status; use rayon::iter::plumbing::{Folder, UnindexedProducer}; -use std::{collections::HashMap, time::Duration}; +use std::time::Duration; use thiserror::Error; #[derive(Error, Debug, Clone)] @@ -58,10 +58,6 @@ impl UnindexedProducer for RayonWrapper { } } -pub trait RequestStatusProvider { - fn get_status(&self) -> HashMap; -} - #[derive(Debug, Clone)] pub struct Response { id: Option, diff --git a/src/jortestkit/src/load/stats.rs b/src/jortestkit/src/load/stats.rs index 09e6802339..9825f2c60a 100644 --- a/src/jortestkit/src/load/stats.rs +++ b/src/jortestkit/src/load/stats.rs @@ -96,8 +96,8 @@ impl Stats { pub fn errors(&self) -> Vec { self.requests .iter() + .filter(|&r| r.is_err()) .cloned() - .filter(|r| r.is_err()) .map(|r| r.err().unwrap()) .collect() } diff --git a/src/jortestkit/src/load/status.rs b/src/jortestkit/src/load/status.rs index 832d454770..b39e975d2e 100644 --- a/src/jortestkit/src/load/status.rs +++ b/src/jortestkit/src/load/status.rs @@ -100,7 +100,7 @@ pub trait RequestStatusProvider { /// /// * `responses_clone` - input response collection /// * `limit` - Optional parameter which defined limit of statuses in single fetch. This can solve some issues -/// for example: uri is too long etc. +/// for example: uri is too long etc. /// * `request_status_provider` - trait implementation which is capable to provide information about statuses /// fn update_statuses( diff --git a/src/jortestkit/src/measurement/benchmark/mod.rs b/src/jortestkit/src/measurement/benchmark/mod.rs index bb7600a3b6..2e5422e683 100644 --- a/src/jortestkit/src/measurement/benchmark/mod.rs +++ b/src/jortestkit/src/measurement/benchmark/mod.rs @@ -11,8 +11,7 @@ pub use endurance_benchmark::{ }; pub use consumption_benchmark::{ - ConsumptionBenchmarkDef, ConsumptionBenchmarkError, ConsumptionBenchmarkFinish, - ConsumptionBenchmarkRun, + ConsumptionBenchmarkDef, ConsumptionBenchmarkError, ConsumptionBenchmarkRun, }; pub use speed_benchmark::{SpeedBenchmarkDef, SpeedBenchmarkFinish, SpeedBenchmarkRun}; diff --git a/src/jortestkit/src/measurement/marker/resources_usage.rs b/src/jortestkit/src/measurement/marker/resources_usage.rs index 64c780c8dc..2d045a36a6 100644 --- a/src/jortestkit/src/measurement/marker/resources_usage.rs +++ b/src/jortestkit/src/measurement/marker/resources_usage.rs @@ -18,6 +18,7 @@ impl PartialEq for ResourcesUsage { } } +#[allow(clippy::non_canonical_partial_ord_impl)] impl PartialOrd for ResourcesUsage { fn partial_cmp(&self, other: &Self) -> Option { let cpu_cmp = self.cpu_usage().partial_cmp(&other.cpu_usage()).unwrap(); diff --git a/src/sign/Cargo.toml b/src/sign/Cargo.toml index ba7ee33697..7f2be9ff9e 100644 --- a/src/sign/Cargo.toml +++ b/src/sign/Cargo.toml @@ -34,4 +34,4 @@ rand = "0.8.3" bech32 = "0.8" rand_core = { version = "0.5.1", default-features = false } ed25519-dalek = "1.0.1" -reqwest = { version = "*", default_features = false, features = [ "blocking","json", "rustls-tls" ] } +reqwest = { version = "0.11", default-features = false, features = ["blocking", "json", "rustls-tls"] } diff --git a/src/sign/src/fragment.rs b/src/sign/src/fragment.rs index e3bb280063..e75efd4d24 100644 --- a/src/sign/src/fragment.rs +++ b/src/sign/src/fragment.rs @@ -187,7 +187,7 @@ mod tests { // User key for signing witness let keypair = Keypair::generate(&mut csprng); - let pk = keypair.public.as_bytes().clone(); + let pk = *keypair.public.as_bytes(); println!("Secret key: {}", hex::encode(keypair.secret.as_bytes())); println!("Public key: {}", hex::encode(keypair.public.as_bytes())); @@ -204,7 +204,7 @@ mod tests { println!("election public key {:?}", hex::encode(ek.to_bytes())); // vote - let vote = chain_vote::Vote::new(2, 1 as usize).unwrap(); + let vote = chain_vote::Vote::new(2, 1_usize).unwrap(); let crs = chain_vote::Crs::from_hash(&hex::decode(vote_plan_id.as_bytes()).unwrap()); @@ -262,21 +262,18 @@ mod tests { let threshold = 1; let m1 = MemberState::new(&mut rng, threshold, &h, &mc, 0); let participants = vec![m1.public_key()]; - let ek = ElectionPublicKey::from_participants(&participants); - ek + + ElectionPublicKey::from_participants(&participants) } #[test] fn generate_keys_from_bytes() { - let pk = hex::decode( - "ac247e6cbc2106a8858d67a9b6aa9fc6105a2f42abfd8d269f4096488b7e5d81".to_string(), - ) - .unwrap(); + let pk = hex::decode("ac247e6cbc2106a8858d67a9b6aa9fc6105a2f42abfd8d269f4096488b7e5d81") + .unwrap(); - let mut sk = hex::decode( - "40cc7f02e04324b63a4db949854d5f24c9041a2bebe9b42064ff868071d1d72d".to_string(), - ) - .unwrap(); + let mut sk = + hex::decode("40cc7f02e04324b63a4db949854d5f24c9041a2bebe9b42064ff868071d1d72d") + .unwrap(); sk.extend(pk.clone()); let keys = sk.clone(); @@ -301,7 +298,7 @@ mod tests { // election public key let ek = create_election_pub_key(shared_string, rng.clone()); - let vote = chain_vote::Vote::new(2, 1 as usize).unwrap(); + let vote = chain_vote::Vote::new(2, 1_usize).unwrap(); let crs = chain_vote::Crs::from_hash(vote_plan_id.as_bytes()); let (ciphertexts, proof) = ek.encrypt_and_prove_vote(&mut rng, &crs, vote); diff --git a/src/sign/src/main.rs b/src/sign/src/main.rs index 61ac84dbf2..fc4de18f0d 100644 --- a/src/sign/src/main.rs +++ b/src/sign/src/main.rs @@ -2,7 +2,6 @@ //! Fragment generator //! -use bech32::Error as Bech32Error; use bech32::FromBase32; use chain_vote::ElectionPublicKey; use clap::Parser; @@ -61,10 +60,9 @@ fn main() -> Result<(), Box> { // Election pub key published as a Bech32_encoded address // which consists of 3 parts: A Human-Readable Part (HRP) + Separator + Data: - let (_hrp, data, _variant) = - bech32::decode(&args.election_pub_key).map_err(Bech32Error::from)?; + let (_hrp, data, _variant) = bech32::decode(&args.election_pub_key)?; - let election_pk = Vec::::from_base32(&data).map_err(Bech32Error::from)?; + let election_pk = Vec::::from_base32(&data)?; // join sk+pk together, api requirement sk.extend(pk.clone()); diff --git a/src/vit-servicing-station-f10/vit-servicing-station-cli-f10/src/csv/loaders.rs b/src/vit-servicing-station-f10/vit-servicing-station-cli-f10/src/csv/loaders.rs index 8c848503c0..5c51c8f7a6 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-cli-f10/src/csv/loaders.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-cli-f10/src/csv/loaders.rs @@ -160,11 +160,11 @@ impl CsvDataCmd { .ok_or_else(|| Error::InvalidFundData(funds_path.to_string_lossy().to_string()))?, &db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; for fund in funds_iter { vit_servicing_station_lib_f10::db::queries::funds::insert_fund(fund, &db_conn) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; } // apply fund id in voteplans @@ -189,24 +189,24 @@ impl CsvDataCmd { vit_servicing_station_lib_f10::db::queries::voteplans::batch_insert_voteplans( &voteplans, &db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; vit_servicing_station_lib_f10::db::queries::proposals::batch_insert_proposals( &proposals, &db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; vit_servicing_station_lib_f10::db::queries::proposals::batch_insert_simple_challenge_data( &simple_proposals_data, &db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; vit_servicing_station_lib_f10::db::queries::proposals::batch_insert_community_choice_challenge_data( &community_proposals_data, &db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; vit_servicing_station_lib_f10::db::queries::challenges::batch_insert_challenges( &challenges @@ -215,13 +215,13 @@ impl CsvDataCmd { .collect::>(), &db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; vit_servicing_station_lib_f10::db::queries::community_advisors_reviews::batch_insert_advisor_reviews(&reviews, &db_conn) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; vit_servicing_station_lib_f10::db::queries::goals::batch_insert(goals, &db_conn) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; Ok(()) } diff --git a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/models/community_advisors_reviews.rs b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/models/community_advisors_reviews.rs index 88956bbdd3..4dd55b99b1 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/models/community_advisors_reviews.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/models/community_advisors_reviews.rs @@ -1,3 +1,5 @@ +#![allow(non_local_definitions)] + use crate::db::schema::community_advisors_reviews; use diesel::prelude::*; @@ -9,6 +11,7 @@ use diesel::{ }; use serde::{Deserialize, Serialize}; +#[allow(non_local_definitions)] #[derive(Copy, Clone, PartialEq, Eq, Debug, Serialize, FromSqlRow, Deserialize)] pub enum ReviewRanking { Excellent = 0, @@ -33,6 +36,7 @@ where } } +#[allow(non_local_definitions)] #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Queryable)] pub struct AdvisorReview { pub id: i32, diff --git a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/models/goals.rs b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/models/goals.rs index 6c51c76e33..7ac3448e2f 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/models/goals.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/models/goals.rs @@ -1,9 +1,12 @@ +#![allow(non_local_definitions)] + use crate::db::schema::goals; use diesel::{Insertable, Queryable}; use serde::{Deserialize, Serialize}; pub use goals_impl::InsertGoal; +#[allow(non_local_definitions)] #[derive(Serialize, Deserialize, Queryable, Clone, Debug, PartialEq, Eq)] #[diesel(table_name = goals)] pub struct Goal { @@ -19,6 +22,7 @@ mod goals_impl { use super::*; + #[allow(non_local_definitions)] #[derive(Deserialize, Insertable, Clone, Debug)] #[table_name = "goals"] pub struct InsertGoal { diff --git a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/models/voteplans.rs b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/models/voteplans.rs index f24ac0908d..81c1a64b90 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/models/voteplans.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/models/voteplans.rs @@ -1,7 +1,10 @@ +#![allow(non_local_definitions)] + use crate::db::schema::voteplans; use diesel::{ExpressionMethods, Insertable, Queryable}; use serde::{Deserialize, Serialize}; +#[allow(non_local_definitions)] #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Queryable)] pub struct Voteplan { pub id: i32, diff --git a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/schema.rs b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/schema.rs index 615b010578..37c87e1fae 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/schema.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/schema.rs @@ -1,3 +1,5 @@ +#![allow(non_local_definitions)] + table! { api_tokens (token) { token -> Binary, diff --git a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/views_schema.rs b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/views_schema.rs index 528afb64f6..87b7fe26fb 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/views_schema.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/db/views_schema.rs @@ -1,3 +1,5 @@ +#![allow(non_local_definitions)] + use diesel::table; table! { diff --git a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/server/settings/config.rs b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/server/settings/config.rs index c83bc5dfb2..f2ff6d6a41 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/server/settings/config.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/server/settings/config.rs @@ -337,8 +337,7 @@ pub fn dump_settings_to_file( settings: &ServiceSettings, ) -> Result<(), impl std::error::Error> { let f = fs::File::create(file_path)?; - serde_json::to_writer_pretty(&f, settings) - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string())) + serde_json::to_writer_pretty(&f, settings).map_err(|e| std::io::Error::other(e.to_string())) } #[cfg(test)] diff --git a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/server/signals.rs b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/server/signals.rs index e6e940f83c..d6316b4574 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/server/signals.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/server/signals.rs @@ -1,6 +1,6 @@ use tokio::signal; -#[cfg(target_os = "unix")] +#[cfg(target_family = "unix")] pub async fn watch_signal_for_shutdown() { let mut interrupt_signal = signal::unix::signal(signal::unix::SignalKind::interrupt()) .expect("Error setting up interrupt signal"); @@ -13,13 +13,13 @@ pub async fn watch_signal_for_shutdown() { tokio::select! { _ = signal::ctrl_c() => (), - _ = interrupt_stream.recv() => (), + _ = interrupt_signal.recv() => (), _ = terminate_signal.recv() => (), _ = quit_signal.recv() => (), } } -#[cfg(not(target_os = "unix"))] +#[cfg(not(target_family = "unix"))] pub async fn watch_signal_for_shutdown() { signal::ctrl_c().await.ok(); } diff --git a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/utils/serde.rs b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/utils/serde.rs index 28f73f1a5c..9340f9becc 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/utils/serde.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/utils/serde.rs @@ -47,7 +47,7 @@ where } pub fn serialize_bin_as_str(data: &[u8], serializer: S) -> Result { - serializer.serialize_str(&String::from_utf8(data.to_vec()).unwrap()) + serializer.serialize_str(core::str::from_utf8(data).unwrap()) } pub fn deserialize_string_as_bytes<'de, D>(deserializer: D) -> Result, D::Error> diff --git a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/v0/endpoints/funds/handlers.rs b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/v0/endpoints/funds/handlers.rs index 27b782fd4b..d4f6b4a750 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/v0/endpoints/funds/handlers.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/v0/endpoints/funds/handlers.rs @@ -58,7 +58,7 @@ pub mod test { let result = warp::test::request().method("GET").reply(&filter).await; assert_eq!(result.status(), warp::http::StatusCode::OK); let result_fund: FundWithNext = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!(fund, result_fund.fund); let next = result_fund.next.unwrap(); @@ -93,7 +93,7 @@ pub mod test { .await; assert_eq!(result.status(), warp::http::StatusCode::OK); let result_fund: Fund = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!(fund, result_fund); } @@ -123,7 +123,7 @@ pub mod test { let result = warp::test::request().method("GET").reply(&filter).await; assert_eq!(result.status(), warp::http::StatusCode::OK); let result_funds: Vec = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!(vec![fund1.id, fund2.id], result_funds); } @@ -213,6 +213,6 @@ pub mod test { assert_eq!(result.status(), warp::http::StatusCode::OK); - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap() + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap() } } diff --git a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/v0/endpoints/proposals/handlers.rs b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/v0/endpoints/proposals/handlers.rs index 1ba1331589..48efc9ea91 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/v0/endpoints/proposals/handlers.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/v0/endpoints/proposals/handlers.rs @@ -70,7 +70,7 @@ pub mod test { assert_eq!(result.status(), warp::http::StatusCode::OK); println!("{}", String::from_utf8(result.body().to_vec()).unwrap()); let result_proposal: FullProposalInfo = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!(proposal, result_proposal); } @@ -98,7 +98,7 @@ pub mod test { let result = warp::test::request().method("GET").reply(&filter).await; assert_eq!(result.status(), warp::http::StatusCode::OK); let result_proposals: Vec = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!(vec![proposal], result_proposals); } @@ -137,7 +137,7 @@ pub mod test { assert_eq!(result.status(), warp::http::StatusCode::OK); let result_proposals: Vec = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!(vec![proposal], result_proposals); } } diff --git a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/v0/endpoints/service_version/handlers.rs b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/v0/endpoints/service_version/handlers.rs index a7e20a1a31..2a4688c95b 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/v0/endpoints/service_version/handlers.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-lib-f10/src/v0/endpoints/service_version/handlers.rs @@ -31,7 +31,7 @@ pub mod test { assert_eq!(result.status(), warp::http::StatusCode::OK); println!("{}", String::from_utf8(result.body().to_vec()).unwrap()); let service_version_result: ServiceVersion = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!(service_version_result.service_version, "2.0".to_string()); } } diff --git a/src/vit-servicing-station-f10/vit-servicing-station-server-f10/src/main.rs b/src/vit-servicing-station-f10/vit-servicing-station-server-f10/src/main.rs index 9889669fa3..c68c51ba95 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-server-f10/src/main.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-server-f10/src/main.rs @@ -17,7 +17,11 @@ fn check_and_build_proper_path(path: &Path) -> std::io::Result<()> { format!("Cannot create path tree {}", path.to_str().unwrap()), ) })?)?; - fs::OpenOptions::new().create(true).write(true).open(path)?; + fs::OpenOptions::new() + .create(true) + .write(true) + .truncate(true) + .open(path)?; Ok(()) } diff --git a/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/clients/rest/raw.rs b/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/clients/rest/raw.rs index c2a8077f34..23bf013726 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/clients/rest/raw.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/clients/rest/raw.rs @@ -100,7 +100,6 @@ impl RestClient { reqwest::blocking::Client::builder() .danger_accept_invalid_certs(true) .build() - .map_err(Into::into) } pub fn set_api_token(&mut self, token: String) { diff --git a/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/data/generator/arbitrary/snapshot_generator.rs b/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/data/generator/arbitrary/snapshot_generator.rs index c613fb7802..4001e0b312 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/data/generator/arbitrary/snapshot_generator.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/data/generator/arbitrary/snapshot_generator.rs @@ -40,21 +40,12 @@ struct VoteplanDateTimes { tally: OffsetDateTime, } -#[derive(Clone)] +#[derive(Clone, Default)] pub struct ArbitrarySnapshotGenerator { id_generator: ArbitraryGenerator, template_generator: ArbitraryValidVotingTemplateGenerator, } -impl Default for ArbitrarySnapshotGenerator { - fn default() -> Self { - Self { - id_generator: ArbitraryGenerator::new(), - template_generator: ArbitraryValidVotingTemplateGenerator::new(), - } - } -} - impl ArbitrarySnapshotGenerator { pub fn funds(&mut self) -> Vec { let size = self.id_generator.random_size(); @@ -129,7 +120,7 @@ impl ArbitrarySnapshotGenerator { chain_vote_options: proposal.chain_vote_options, chain_voteplan_id: fund .chain_vote_plans - .get(0) + .first() .unwrap() .chain_voteplan_id .clone(), diff --git a/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/data/generator/voting/template/arbitrary.rs b/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/data/generator/voting/template/arbitrary.rs index bab6c200a7..ff845bb725 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/data/generator/voting/template/arbitrary.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/data/generator/voting/template/arbitrary.rs @@ -8,7 +8,7 @@ use fake::faker::internet::en::SafeEmail; use fake::{ faker::lorem::en::*, faker::{ - company::en::{Buzzword, CatchPhase, Industry}, + company::en::{Buzzword, CatchPhrase, Industry}, name::en::Name, }, Fake, @@ -134,15 +134,15 @@ impl ArbitraryValidVotingTemplateGenerator { match challenge_type { ChallengeType::Simple | ChallengeType::Native => { ProposalChallengeInfo::Simple(SimpleChallengeInfo { - proposal_solution: CatchPhase().fake::(), + proposal_solution: CatchPhrase().fake::(), }) } ChallengeType::CommunityChoice => { ProposalChallengeInfo::CommunityChoice(CommunityChoiceChallengeInfo { - proposal_brief: CatchPhase().fake::(), - proposal_importance: CatchPhase().fake::(), - proposal_goal: CatchPhase().fake::(), - proposal_metrics: CatchPhase().fake::(), + proposal_brief: CatchPhrase().fake::(), + proposal_importance: CatchPhrase().fake::(), + proposal_goal: CatchPhrase().fake::(), + proposal_metrics: CatchPhrase().fake::(), }) } } @@ -156,8 +156,8 @@ impl ArbitraryValidVotingTemplateGenerator { proposal_id: self.next_proposal_id().to_string(), internal_id: self.generator.id().to_string(), category_name: Industry().fake::(), - proposal_title: CatchPhase().fake::(), - proposal_summary: CatchPhase().fake::(), + proposal_title: CatchPhrase().fake::(), + proposal_summary: CatchPhrase().fake::(), proposal_funds: funds.to_string(), proposal_url: proposal_url.to_string(), @@ -194,7 +194,7 @@ impl ValidVotingTemplateGenerator for ArbitraryValidVotingTemplateGenerator { internal_id: self.next_challenge_id(), id: self.generator.id().to_string(), challenge_type: self.challenge_type(), - title: CatchPhase().fake::(), + title: CatchPhrase().fake::(), description: Buzzword().fake::(), rewards_total: (self.generator.next_u32() % 10000).to_string(), proposers_rewards: (self.generator.next_u32() % 10000).to_string(), diff --git a/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/startup/server/bootstrap.rs b/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/startup/server/bootstrap.rs index 81d5d8103d..61378f7baf 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/startup/server/bootstrap.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/common/startup/server/bootstrap.rs @@ -76,7 +76,7 @@ impl ServerBootstrapper { let mut command_builder = BootstrapCommandBuilder::new(exe); command_builder - .address(&settings.address.to_string()) + .address(settings.address.to_string()) .db_url(&settings.db_url) .log_file(&logger_file) .enable_api_tokens(settings.enable_api_tokens) diff --git a/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/tests/bootstrap/arguments/out_settings.rs b/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/tests/bootstrap/arguments/out_settings.rs index 2fd74c97f0..77c44e1c64 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/tests/bootstrap/arguments/out_settings.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/tests/bootstrap/arguments/out_settings.rs @@ -26,7 +26,7 @@ pub fn out_settings_provided() { .assert() .success(); - let actual_settings = load_settings(&out_settings_file.path()); + let actual_settings = load_settings(out_settings_file.path()); assert_eq!(settings, actual_settings); } @@ -62,7 +62,7 @@ pub fn out_settings_file_from_cmdline() { .assert() .success(); - let actual_settings = load_settings(&out_settings_file.path()); + let actual_settings = load_settings(out_settings_file.path()); assert_eq!(settings, actual_settings); } diff --git a/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/tests/cli/token.rs b/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/tests/cli/token.rs index a429e4e5a6..a3192ea226 100644 --- a/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/tests/cli/token.rs +++ b/src/vit-servicing-station-f10/vit-servicing-station-tests-f10/src/tests/cli/token.rs @@ -68,7 +68,7 @@ pub fn add_generated_token_to_db() -> Result<(), Box> { .assert() .success(); - let first_token = tokens.get(0).unwrap(); + let first_token = tokens.first().unwrap(); let raw: RawRestClient = server.rest_client_with_token(first_token).into(); assert_eq!(raw.health()?.status(), StatusCode::OK); diff --git a/src/vit-servicing-station/vit-servicing-station-cli/src/csv/loaders.rs b/src/vit-servicing-station/vit-servicing-station-cli/src/csv/loaders.rs index 7cb20e8c1b..cf2e7f0abd 100644 --- a/src/vit-servicing-station/vit-servicing-station-cli/src/csv/loaders.rs +++ b/src/vit-servicing-station/vit-servicing-station-cli/src/csv/loaders.rs @@ -224,11 +224,11 @@ impl LoadCmd { .ok_or_else(|| Error::InvalidFundData(self.funds.to_string_lossy().to_string()))?, db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; for fund in funds_iter { vit_servicing_station_lib::db::queries::funds::insert_fund(fund, db_conn) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; } // apply fund id in voteplans @@ -275,12 +275,12 @@ impl LoadCmd { vit_servicing_station_lib::db::queries::voteplans::batch_insert_voteplans( &voteplans, db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; vit_servicing_station_lib::db::queries::proposals::batch_insert_proposals( &proposals, db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; let proposals_voteplans = csv_proposals .iter() @@ -297,19 +297,19 @@ impl LoadCmd { proposals_voteplans, db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; vit_servicing_station_lib::db::queries::proposals::batch_insert_simple_challenge_data( &simple_proposals_data, db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; vit_servicing_station_lib::db::queries::proposals::batch_insert_community_choice_challenge_data( &community_proposals_data, db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; vit_servicing_station_lib::db::queries::challenges::batch_insert_challenges( &challenges @@ -318,10 +318,10 @@ impl LoadCmd { .collect::>(), db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; vit_servicing_station_lib::db::queries::community_advisors_reviews::batch_insert_advisor_reviews(&reviews, db_conn) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; let groups = if let Some(groups_path) = &self.groups { LoadCmd::load_from_csv::( @@ -343,7 +343,7 @@ impl LoadCmd { &groups.into_iter().map(|c| c.values()).collect::>(), db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; Ok(()) } @@ -378,7 +378,7 @@ impl LoadCmd { &votes.into_iter().map(|c| c.values()).collect::>(), &db_conn, ) - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{}", e)))?; + .map_err(|e| io::Error::other(format!("{}", e)))?; Ok(()) } diff --git a/src/vit-servicing-station/vit-servicing-station-cli/src/csv/models.rs b/src/vit-servicing-station/vit-servicing-station-cli/src/csv/models.rs index ffdabb9b59..15f187e438 100644 --- a/src/vit-servicing-station/vit-servicing-station-cli/src/csv/models.rs +++ b/src/vit-servicing-station/vit-servicing-station-cli/src/csv/models.rs @@ -314,7 +314,7 @@ pub struct Proposal { pub chain_committee_end_time: i64, #[serde(alias = "chainVoteplanPayload", default = "Default::default")] pub chain_voteplan_payload: String, - #[serde(alias = "chainVoteplanPayload", default = "Default::default")] + #[serde(alias = "chainVoteplanId", default = "Default::default")] pub chain_voteplan_id: String, #[serde(alias = "chainVoteEncryptionKey", default = "Default::default")] pub chain_vote_encryption_key: String, diff --git a/src/vit-servicing-station/vit-servicing-station-lib/Cargo.toml b/src/vit-servicing-station/vit-servicing-station-lib/Cargo.toml index 5a2c463d7b..ecb9dc7153 100644 --- a/src/vit-servicing-station/vit-servicing-station-lib/Cargo.toml +++ b/src/vit-servicing-station/vit-servicing-station-lib/Cargo.toml @@ -11,8 +11,7 @@ license = "MIT OR Apache-2.0" async-trait = "0.1.33" base64 = "0.13" time = { version = "0.3", features = ["parsing", "formatting"] } -diesel = { version = "1.4.5", features = ["postgres", "r2d2", "64-column-tables", "serde_json"] } -diesel_migrations = "1.4.0" +diesel = { version = "1.4.8", features = ["postgres", "r2d2", "64-column-tables", "chrono"] } dotenv = "0.15" itertools = "0.10" log = { version = "0.4.11", features = ["serde"] } diff --git a/src/vit-servicing-station/vit-servicing-station-lib/src/lib.rs b/src/vit-servicing-station/vit-servicing-station-lib/src/lib.rs index 36ab6b7f63..0ba47b50c4 100644 --- a/src/vit-servicing-station/vit-servicing-station-lib/src/lib.rs +++ b/src/vit-servicing-station/vit-servicing-station-lib/src/lib.rs @@ -1,3 +1,5 @@ +#![allow(non_local_definitions)] + #[macro_use] extern crate diesel; #[macro_use] diff --git a/src/vit-servicing-station/vit-servicing-station-lib/src/server/settings/config.rs b/src/vit-servicing-station/vit-servicing-station-lib/src/server/settings/config.rs index f7a4f547af..d1d111ea65 100644 --- a/src/vit-servicing-station/vit-servicing-station-lib/src/server/settings/config.rs +++ b/src/vit-servicing-station/vit-servicing-station-lib/src/server/settings/config.rs @@ -349,8 +349,7 @@ pub fn dump_settings_to_file( settings: &ServiceSettings, ) -> Result<(), impl std::error::Error> { let f = fs::File::create(file_path)?; - serde_json::to_writer_pretty(&f, settings) - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string())) + serde_json::to_writer_pretty(&f, settings).map_err(|e| std::io::Error::other(e.to_string())) } #[cfg(test)] diff --git a/src/vit-servicing-station/vit-servicing-station-lib/src/server/signals.rs b/src/vit-servicing-station/vit-servicing-station-lib/src/server/signals.rs index e6e940f83c..d6316b4574 100644 --- a/src/vit-servicing-station/vit-servicing-station-lib/src/server/signals.rs +++ b/src/vit-servicing-station/vit-servicing-station-lib/src/server/signals.rs @@ -1,6 +1,6 @@ use tokio::signal; -#[cfg(target_os = "unix")] +#[cfg(target_family = "unix")] pub async fn watch_signal_for_shutdown() { let mut interrupt_signal = signal::unix::signal(signal::unix::SignalKind::interrupt()) .expect("Error setting up interrupt signal"); @@ -13,13 +13,13 @@ pub async fn watch_signal_for_shutdown() { tokio::select! { _ = signal::ctrl_c() => (), - _ = interrupt_stream.recv() => (), + _ = interrupt_signal.recv() => (), _ = terminate_signal.recv() => (), _ = quit_signal.recv() => (), } } -#[cfg(not(target_os = "unix"))] +#[cfg(not(target_family = "unix"))] pub async fn watch_signal_for_shutdown() { signal::ctrl_c().await.ok(); } diff --git a/src/vit-servicing-station/vit-servicing-station-lib/src/utils/serde.rs b/src/vit-servicing-station/vit-servicing-station-lib/src/utils/serde.rs index 0b9b914777..524e27aaa0 100644 --- a/src/vit-servicing-station/vit-servicing-station-lib/src/utils/serde.rs +++ b/src/vit-servicing-station/vit-servicing-station-lib/src/utils/serde.rs @@ -49,7 +49,7 @@ where } pub fn serialize_bin_as_str(data: &[u8], serializer: S) -> Result { - serializer.serialize_str(&String::from_utf8(data.to_vec()).unwrap()) + serializer.serialize_str(core::str::from_utf8(data).unwrap()) } pub fn deserialize_string_as_bytes<'de, D>(deserializer: D) -> Result, D::Error> diff --git a/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/funds/handlers.rs b/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/funds/handlers.rs index 41a79fbb6f..92a16c9d52 100644 --- a/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/funds/handlers.rs +++ b/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/funds/handlers.rs @@ -61,7 +61,7 @@ pub mod test { let result = warp::test::request().method("GET").reply(&filter).await; assert_eq!(result.status(), warp::http::StatusCode::OK); let mut result_fund: FundWithNext = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); result_fund .fund .challenges @@ -111,7 +111,7 @@ pub mod test { .await; assert_eq!(result.status(), warp::http::StatusCode::OK); let mut result_fund: Fund = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); result_fund .challenges .sort_by(|a, b| a.internal_id.cmp(&b.internal_id)); @@ -156,7 +156,7 @@ pub mod test { let result = warp::test::request().method("GET").reply(&filter).await; assert_eq!(result.status(), warp::http::StatusCode::OK); let result_funds: Vec = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!(funds_ids, result_funds); } diff --git a/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/proposals/handlers.rs b/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/proposals/handlers.rs index 8b33ef7e4d..6bf5bdb3cb 100644 --- a/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/proposals/handlers.rs +++ b/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/proposals/handlers.rs @@ -80,7 +80,7 @@ pub mod test { assert_eq!(result.status(), warp::http::StatusCode::OK); println!("{}", String::from_utf8(result.body().to_vec()).unwrap()); let result_proposal: FullProposalInfo = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!( serde_json::to_value(&proposal).unwrap(), serde_json::to_value(result_proposal).unwrap() @@ -125,7 +125,7 @@ pub mod test { .await; assert_eq!(result.status(), warp::http::StatusCode::OK); let result_proposals: Vec = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!( serde_json::to_value(proposals).unwrap(), serde_json::to_value(result_proposals).unwrap() @@ -171,7 +171,7 @@ pub mod test { assert_eq!(result.status(), warp::http::StatusCode::OK); let result_proposals: Vec = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!( serde_json::to_value(vec![proposal]).unwrap(), serde_json::to_value(result_proposals).unwrap() diff --git a/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/service_version/handlers.rs b/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/service_version/handlers.rs index f7f65edff6..de06a2030c 100644 --- a/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/service_version/handlers.rs +++ b/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/service_version/handlers.rs @@ -35,7 +35,7 @@ pub mod test { assert_eq!(result.status(), warp::http::StatusCode::OK); println!("{}", String::from_utf8(result.body().to_vec()).unwrap()); let service_version_result: ServiceVersion = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!(service_version_result.service_version, "2.0".to_string()); } } diff --git a/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/votes/handlers.rs b/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/votes/handlers.rs index 108d6200a0..d1ce928681 100644 --- a/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/votes/handlers.rs +++ b/src/vit-servicing-station/vit-servicing-station-lib/src/v0/endpoints/votes/handlers.rs @@ -55,7 +55,7 @@ mod test { assert_eq!(result.status(), warp::http::StatusCode::OK); let result_votes: Vec = - serde_json::from_str(&String::from_utf8(result.body().to_vec()).unwrap()).unwrap(); + serde_json::from_str(core::str::from_utf8(result.body()).unwrap()).unwrap(); assert_eq!(vec![vote], result_votes); } } diff --git a/src/vit-servicing-station/vit-servicing-station-server/src/main.rs b/src/vit-servicing-station/vit-servicing-station-server/src/main.rs index 4ebb686432..5d9d68a3de 100644 --- a/src/vit-servicing-station/vit-servicing-station-server/src/main.rs +++ b/src/vit-servicing-station/vit-servicing-station-server/src/main.rs @@ -25,7 +25,11 @@ fn check_and_build_proper_path(path: &Path) -> std::io::Result<()> { format!("Cannot create path tree {}", path.to_str().unwrap()), ) })?)?; - fs::OpenOptions::new().create(true).write(true).open(path)?; + fs::OpenOptions::new() + .create(true) + .write(true) + .truncate(true) + .open(path)?; Ok(()) } diff --git a/src/vit-servicing-station/vit-servicing-station-tests/Cargo.toml b/src/vit-servicing-station/vit-servicing-station-tests/Cargo.toml index acf6fa3d0b..749f25d95b 100644 --- a/src/vit-servicing-station/vit-servicing-station-tests/Cargo.toml +++ b/src/vit-servicing-station/vit-servicing-station-tests/Cargo.toml @@ -12,7 +12,7 @@ hex = "0.4.2" base64 = "0.13" cfg-if = "0.1" time = { version = "0.3", features = ["formatting", "parsing", "macros"] } -diesel = { version = "1.4.4", features = ["postgres", "r2d2", "chrono"] } +diesel = { version = "1.4.8", features = ["postgres", "r2d2", "64-column-tables", "chrono", "serde_json"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0.53" clap = { workspace = true } diff --git a/src/vit-servicing-station/vit-servicing-station-tests/src/common/clients/rest/raw.rs b/src/vit-servicing-station/vit-servicing-station-tests/src/common/clients/rest/raw.rs index cc8ee0e675..8132a297cb 100644 --- a/src/vit-servicing-station/vit-servicing-station-tests/src/common/clients/rest/raw.rs +++ b/src/vit-servicing-station/vit-servicing-station-tests/src/common/clients/rest/raw.rs @@ -124,7 +124,6 @@ impl RestClient { reqwest::blocking::Client::builder() .danger_accept_invalid_certs(true) .build() - .map_err(Into::into) } pub fn set_api_token(&mut self, token: String) { diff --git a/src/vit-servicing-station/vit-servicing-station-tests/src/common/data/generator/arbitrary/snapshot_generator.rs b/src/vit-servicing-station/vit-servicing-station-tests/src/common/data/generator/arbitrary/snapshot_generator.rs index a2839bca05..ca45241b80 100644 --- a/src/vit-servicing-station/vit-servicing-station-tests/src/common/data/generator/arbitrary/snapshot_generator.rs +++ b/src/vit-servicing-station/vit-servicing-station-tests/src/common/data/generator/arbitrary/snapshot_generator.rs @@ -203,7 +203,7 @@ impl ArbitrarySnapshotGenerator { chain_proposal_index: self.id_generator.next_u32() as i64, chain_voteplan_id: fund .chain_vote_plans - .get(0) + .first() .unwrap() .chain_voteplan_id .clone(), diff --git a/src/vit-servicing-station/vit-servicing-station-tests/src/common/data/generator/voting/template/arbitrary.rs b/src/vit-servicing-station/vit-servicing-station-tests/src/common/data/generator/voting/template/arbitrary.rs index f71c8beae3..dd41d96c76 100644 --- a/src/vit-servicing-station/vit-servicing-station-tests/src/common/data/generator/voting/template/arbitrary.rs +++ b/src/vit-servicing-station/vit-servicing-station-tests/src/common/data/generator/voting/template/arbitrary.rs @@ -8,7 +8,7 @@ use fake::faker::internet::en::SafeEmail; use fake::{ faker::lorem::en::*, faker::{ - company::en::{Buzzword, CatchPhase, Industry}, + company::en::{Buzzword, CatchPhrase, Industry}, name::en::Name, }, Fake, @@ -139,14 +139,14 @@ impl ArbitraryValidVotingTemplateGenerator { ) -> ProposalChallengeInfo { match challenge_type { ChallengeType::Simple => ProposalChallengeInfo::Simple(SimpleChallengeInfo { - proposal_solution: CatchPhase().fake::(), + proposal_solution: CatchPhrase().fake::(), }), ChallengeType::CommunityChoice => { ProposalChallengeInfo::CommunityChoice(CommunityChoiceChallengeInfo { - proposal_brief: CatchPhase().fake::(), - proposal_importance: CatchPhase().fake::(), - proposal_goal: CatchPhase().fake::(), - proposal_metrics: CatchPhase().fake::(), + proposal_brief: CatchPhrase().fake::(), + proposal_importance: CatchPhrase().fake::(), + proposal_goal: CatchPhrase().fake::(), + proposal_metrics: CatchPhrase().fake::(), }) } } @@ -160,8 +160,8 @@ impl ArbitraryValidVotingTemplateGenerator { proposal_id: self.next_proposal_id().to_string(), internal_id: self.generator.id().to_string(), category_name: Industry().fake::(), - proposal_title: CatchPhase().fake::(), - proposal_summary: CatchPhase().fake::(), + proposal_title: CatchPhrase().fake::(), + proposal_summary: CatchPhrase().fake::(), proposal_funds: funds.to_string(), proposal_url: proposal_url.to_string(), @@ -198,7 +198,7 @@ impl ValidVotingTemplateGenerator for ArbitraryValidVotingTemplateGenerator { internal_id: self.next_challenge_id(), id: self.generator.id().to_string(), challenge_type: self.challenge_type(), - title: CatchPhase().fake::(), + title: CatchPhrase().fake::(), description: Buzzword().fake::(), rewards_total: (self.generator.next_u32() % 10000).to_string(), proposers_rewards: (self.generator.next_u32() % 10000).to_string(), diff --git a/src/vit-servicing-station/vit-servicing-station-tests/src/common/db/mod.rs b/src/vit-servicing-station/vit-servicing-station-tests/src/common/db/mod.rs index b4705dab69..f90d77db74 100644 --- a/src/vit-servicing-station/vit-servicing-station-tests/src/common/db/mod.rs +++ b/src/vit-servicing-station/vit-servicing-station-tests/src/common/db/mod.rs @@ -1,6 +1,29 @@ use std::collections::BTreeMap; -use diesel::RunQueryDsl; +use diesel::{ + backend::Backend, + deserialize::{self, FromSql}, + row::NamedRow, + sql_types::Integer, + RunQueryDsl, +}; + +// Simple struct to receive row_id without derive macros to avoid non-local impl warnings +struct RowId { + row_id: i32, +} + +impl diesel::deserialize::QueryableByName for RowId +where + DB: Backend, + i32: FromSql, +{ + fn build>(row: &R) -> deserialize::Result { + Ok(RowId { + row_id: NamedRow::get(row, "row_id")?, + }) + } +} use thiserror::Error; use vit_servicing_station_lib::db::models::{ api_tokens::ApiTokenData, @@ -11,12 +34,6 @@ use vit_servicing_station_lib::db::models::{ }; use vit_servicing_station_lib::db::DbConnection; -#[derive(diesel::QueryableByName)] -struct RowId { - #[sql_type = "diesel::sql_types::Integer"] - row_id: i32, -} - pub struct DbInserter<'a> { connection: &'a DbConnection, } @@ -199,60 +216,69 @@ impl<'a> DbInserter<'a> { .bind::(&fund.fund_name) .bind::(&fund.fund_goal) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis( - fund.registration_snapshot_time * 1000, - ), + chrono::DateTime::from_timestamp_millis(fund.registration_snapshot_time * 1000) + .map(|dt| dt.naive_utc()), ) .bind::(fund.voting_power_threshold) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis(fund.fund_start_time * 1000), + chrono::DateTime::from_timestamp_millis(fund.fund_start_time * 1000) + .map(|dt| dt.naive_utc()), ) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis(fund.fund_end_time * 1000), + chrono::DateTime::from_timestamp_millis(fund.fund_end_time * 1000) + .map(|dt| dt.naive_utc()), ) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis( + chrono::DateTime::from_timestamp_millis( fund.stage_dates.insight_sharing_start * 1000, - ), + ) + .map(|dt| dt.naive_utc()), ) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis( + chrono::DateTime::from_timestamp_millis( fund.stage_dates.proposal_submission_start * 1000, - ), + ) + .map(|dt| dt.naive_utc()), ) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis( + chrono::DateTime::from_timestamp_millis( fund.stage_dates.refine_proposals_start * 1000, - ), + ) + .map(|dt| dt.naive_utc()), ) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis( + chrono::DateTime::from_timestamp_millis( fund.stage_dates.finalize_proposals_start * 1000, - ), + ) + .map(|dt| dt.naive_utc()), ) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis( + chrono::DateTime::from_timestamp_millis( fund.stage_dates.proposal_assessment_start * 1000, - ), + ) + .map(|dt| dt.naive_utc()), ) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis( + chrono::DateTime::from_timestamp_millis( fund.stage_dates.assessment_qa_start * 1000, - ), + ) + .map(|dt| dt.naive_utc()), ) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis( - fund.stage_dates.snapshot_start * 1000, - ), + chrono::DateTime::from_timestamp_millis(fund.stage_dates.snapshot_start * 1000) + .map(|dt| dt.naive_utc()), ) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis(fund.stage_dates.voting_start * 1000), + chrono::DateTime::from_timestamp_millis(fund.stage_dates.voting_start * 1000) + .map(|dt| dt.naive_utc()), ) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis(fund.stage_dates.voting_end * 1000), + chrono::DateTime::from_timestamp_millis(fund.stage_dates.voting_end * 1000) + .map(|dt| dt.naive_utc()), ) .bind::, _>( - chrono::NaiveDateTime::from_timestamp_millis(fund.stage_dates.tallying_end * 1000), + chrono::DateTime::from_timestamp_millis(fund.stage_dates.tallying_end * 1000) + .map(|dt| dt.naive_utc()), ) .bind::(serde_json::json!({ "url": { diff --git a/src/vit-servicing-station/vit-servicing-station-tests/src/common/startup/server/bootstrap.rs b/src/vit-servicing-station/vit-servicing-station-tests/src/common/startup/server/bootstrap.rs index 90d7d26e99..9d4b06a965 100644 --- a/src/vit-servicing-station/vit-servicing-station-tests/src/common/startup/server/bootstrap.rs +++ b/src/vit-servicing-station/vit-servicing-station-tests/src/common/startup/server/bootstrap.rs @@ -76,7 +76,7 @@ impl ServerBootstrapper { let mut command_builder = BootstrapCommandBuilder::new(exe); command_builder - .address(&settings.address.to_string()) + .address(settings.address.to_string()) .db_url(&settings.db_url) .log_file(&logger_file) .enable_api_tokens(settings.enable_api_tokens) diff --git a/src/vit-servicing-station/vit-servicing-station-tests/src/tests/cli/token.rs b/src/vit-servicing-station/vit-servicing-station-tests/src/tests/cli/token.rs index b3dd9f7e4a..5368178fcf 100644 --- a/src/vit-servicing-station/vit-servicing-station-tests/src/tests/cli/token.rs +++ b/src/vit-servicing-station/vit-servicing-station-tests/src/tests/cli/token.rs @@ -69,7 +69,7 @@ pub fn add_generated_token_to_db() -> Result<(), Box> { .assert() .success(); - let first_token = tokens.get(0).unwrap(); + let first_token = tokens.first().unwrap(); let raw: RawRestClient = server.rest_client_with_token(first_token).into(); assert_eq!(raw.health()?.status(), StatusCode::OK); diff --git a/src/vit-servicing-station/vit-servicing-station-tests/src/tests/rest/search.rs b/src/vit-servicing-station/vit-servicing-station-tests/src/tests/rest/search.rs index 5769dad1b2..34b5e374fe 100644 --- a/src/vit-servicing-station/vit-servicing-station-tests/src/tests/rest/search.rs +++ b/src/vit-servicing-station/vit-servicing-station-tests/src/tests/rest/search.rs @@ -30,7 +30,9 @@ fn assert_response_contains_challenge( expected_challenge: &Challenge, search_response: SearchResponse, ) { - let SearchResponse::Challenge(challenges) = search_response else { panic!("internal error: querying for challenges but got proposals") }; + let SearchResponse::Challenge(challenges) = search_response else { + panic!("internal error: querying for challenges but got proposals") + }; assert!(challenges .iter() @@ -91,7 +93,9 @@ pub fn search_challenges_by_title_empty() { ) .unwrap(); - let SearchResponse::Challenge(challenges) = response else { panic!("internal error: querying for challenges but got proposals") }; + let SearchResponse::Challenge(challenges) = response else { + panic!("internal error: querying for challenges but got proposals") + }; assert!(challenges.is_empty()); } @@ -250,8 +254,8 @@ pub fn sort_challenges_result_by_title_desc() { ) .unwrap(); - let SearchResponse::Challenge(challenges) = response else { - panic!("internal error: querying for challenges but got proposals"); + let SearchResponse::Challenge(challenges) = response else { + panic!("internal error: querying for challenges but got proposals"); }; let mut expected: Vec<&String> = expected_challenges.iter().map(|x| &x.title).collect(); diff --git a/src/vit-testing/iapyx/Cargo.toml b/src/vit-testing/iapyx/Cargo.toml index 88d18bafcd..409a032ce2 100644 --- a/src/vit-testing/iapyx/Cargo.toml +++ b/src/vit-testing/iapyx/Cargo.toml @@ -53,7 +53,7 @@ image = "0.23" eccoxide = { git = "https://github.com/eugene-babichenko/eccoxide.git", branch = "fast-u64-scalar-mul", features = ["fast-u64-scalar-mul"], optional = true } rayon = "1" bincode = "1.3.3" -cocoon = { git = "https://github.com/dkijania/cocoon.git" } +cocoon = "0.4.3" vit-servicing-station-lib = { path = "../../vit-servicing-station/vit-servicing-station-lib" } prettytable-rs = "0.10.0" reqwest = { workspace = true } diff --git a/src/vit-testing/iapyx/src/bin/interactive/command.rs b/src/vit-testing/iapyx/src/bin/interactive/command.rs index 705d4f0453..98c9a2231d 100644 --- a/src/vit-testing/iapyx/src/bin/interactive/command.rs +++ b/src/vit-testing/iapyx/src/bin/interactive/command.rs @@ -601,7 +601,7 @@ impl WalletAddSubcommand { let img = image::open(qr)?; let bytes: Vec = pin.chars().map(|x| x.to_digit(10).unwrap() as u8).collect(); let secret = KeyQrCode::decode(img, &bytes)? - .get(0) + .first() .unwrap() .clone() .leak_secret(); diff --git a/src/vit-testing/iapyx/src/bin/load/mod.rs b/src/vit-testing/iapyx/src/bin/load/mod.rs index bf247a33ef..41d51bdf24 100644 --- a/src/vit-testing/iapyx/src/bin/load/mod.rs +++ b/src/vit-testing/iapyx/src/bin/load/mod.rs @@ -8,7 +8,7 @@ use iapyx::ArtificialUserLoad; use iapyx::MultiControllerError; use iapyx::NodeLoadError; use iapyx::ServicingStationLoad; -pub use jortestkit::console::progress_bar::{parse_progress_bar_mode_from_str, ProgressBarMode}; +pub use jortestkit::console::progress_bar::ProgressBarMode; use jortestkit::load::Monitor; use std::path::PathBuf; use thiserror::Error; diff --git a/src/vit-testing/iapyx/src/controller/builder.rs b/src/vit-testing/iapyx/src/controller/builder.rs index 3722923fa3..38e1834a0b 100644 --- a/src/vit-testing/iapyx/src/controller/builder.rs +++ b/src/vit-testing/iapyx/src/controller/builder.rs @@ -122,7 +122,7 @@ impl ControllerBuilder { .collect(); let secret = KeyQrCode::decode(img, &bytes) .unwrap() - .get(0) + .first() .ok_or(Error::NoSecretKeyEncoded)? .clone() .leak_secret(); diff --git a/src/vit-testing/iapyx/src/controller/mod.rs b/src/vit-testing/iapyx/src/controller/mod.rs index 4a4e1df2a0..e1acbf1582 100644 --- a/src/vit-testing/iapyx/src/controller/mod.rs +++ b/src/vit-testing/iapyx/src/controller/mod.rs @@ -147,7 +147,7 @@ impl Controller { self.confirm_transaction(*id); } FragmentStatus::Pending => (), - }; + } } } diff --git a/src/vit-testing/iapyx/src/load/config/node.rs b/src/vit-testing/iapyx/src/load/config/node.rs index 8e82e277dd..a1034e1725 100644 --- a/src/vit-testing/iapyx/src/load/config/node.rs +++ b/src/vit-testing/iapyx/src/load/config/node.rs @@ -30,7 +30,7 @@ pub struct Config { /// This parameter work in conjunction with `global_pin` and `qr_codes_folder`. /// If source of account secrets is a specific folder with qr codes, then each qr code need to be /// individually decrypted using pin code. This parameter defines strategy of acquiring pin for qr code. - /// Using this parameter and with correct format of file (which should be for example alice_1234.png) + /// Using this parameter and with correct format of file (which should be for example `alice_1234.png`) /// load tool can successfully decrypt all qr code. Alternative for this setting is global pin. pub read_pin_from_filename: bool, /// Sometimes we may want to run load tool again on the same environment. The problem is that, @@ -118,7 +118,7 @@ pub enum Error { /// Cannot read qr #[error("cannot read folder {0:?}")] CannotReadQrs(PathBuf), - /// MultiController setup + /// `MultiController` setup #[error("multicontoller error")] MultiController(#[from] MultiControllerError), } diff --git a/src/vit-testing/iapyx/src/load/config/servicing_station.rs b/src/vit-testing/iapyx/src/load/config/servicing_station.rs index 2219f3dfe0..5f1daba5cc 100644 --- a/src/vit-testing/iapyx/src/load/config/servicing_station.rs +++ b/src/vit-testing/iapyx/src/load/config/servicing_station.rs @@ -19,7 +19,7 @@ pub enum RequestType { #[derive(Clone, Debug, Serialize, Deserialize)] pub struct Config { - pub config: HashMap, + pub request_configs: HashMap, pub criterion: Option, pub address: String, pub use_https: bool, @@ -27,7 +27,7 @@ pub struct Config { impl Config { pub fn get(&self, request_type: RequestType) -> Result { - self.config + self.request_configs .get(&request_type) .cloned() .ok_or(Error::CannotFindConfigurationFor(request_type)) diff --git a/src/vit-testing/iapyx/src/load/mod.rs b/src/vit-testing/iapyx/src/load/mod.rs index 4a0f2ecc11..bdabd292f6 100644 --- a/src/vit-testing/iapyx/src/load/mod.rs +++ b/src/vit-testing/iapyx/src/load/mod.rs @@ -4,7 +4,7 @@ mod request_generators; mod scenario; mod status_provider; -pub use config::{ArtificialUserLoadConfig, NodeLoadConfig}; +pub use config::NodeLoadConfig; pub use multi_controller::{MultiController, MultiControllerError}; pub use request_generators::{ServicingStationRequestGen, WalletRequestGen}; pub use scenario::*; diff --git a/src/vit-testing/iapyx/src/load/request_generators/jormungandr/post/batch.rs b/src/vit-testing/iapyx/src/load/request_generators/jormungandr/post/batch.rs index 5a3ca7b0b5..e891e20e8f 100644 --- a/src/vit-testing/iapyx/src/load/request_generators/jormungandr/post/batch.rs +++ b/src/vit-testing/iapyx/src/load/request_generators/jormungandr/post/batch.rs @@ -121,15 +121,19 @@ impl BatchWalletRequestGen { for item in &counter { for i in item.range() { - match self.proposals.iter().find(|x| { - x.voteplan.chain_voteplan_id == item.id().to_string() - && (x.voteplan.chain_proposal_index % i64::from(u8::MAX)) == i as i64 - }) { - Some(proposal) => { - println!("vote on: {}/{}", proposal.voteplan.chain_voteplan_id, i); - proposals.push(proposal.clone()); + match i64::try_from(i) { + Ok(i_i64) => { + if let Some(proposal) = self.proposals.iter().find(|x| { + x.voteplan.chain_voteplan_id == item.id().to_string() + && (x.voteplan.chain_proposal_index % i64::from(u8::MAX)) == i_i64 + }) { + println!("vote on: {}/{}", proposal.voteplan.chain_voteplan_id, i); + proposals.push(proposal.clone()); + } else { + return Err(MultiControllerError::NotEnoughProposals); + } } - None => { + Err(_) => { return Err(MultiControllerError::NotEnoughProposals); } } diff --git a/src/vit-testing/iapyx/src/load/request_generators/jormungandr/post/single.rs b/src/vit-testing/iapyx/src/load/request_generators/jormungandr/post/single.rs index 32b2ab434c..15527bfbec 100644 --- a/src/vit-testing/iapyx/src/load/request_generators/jormungandr/post/single.rs +++ b/src/vit-testing/iapyx/src/load/request_generators/jormungandr/post/single.rs @@ -17,11 +17,11 @@ use wallet_core::Choice; /// to load testing framework. Responsibility is to keep track of wallets under tests and prepare /// each time valid vote transaction whenever asked. There are two challenges: /// - keeping track of spending counter and increase it each time fragment is sent. Current limitation -/// is a lack of recovery scenario when transaction is failed (no resend strategy or spending counter revert) +/// is a lack of recovery scenario when transaction is failed (no resend strategy or spending counter revert) /// - keeping track of valid proposals to vote. One can vote only once per proposal. Duplicated votes will -/// result in failed transaction which can skew load test results. Therefore, we need to also know which -/// proposals are eligible to vote on. Having in mind internal structure of vote plan (voteplan can have many proposals) -/// and requirement to send batch of votes may result in different proposals from different voteplan. +/// result in failed transaction which can skew load test results. Therefore, we need to also know which +/// proposals are eligible to vote on. Having in mind internal structure of vote plan (voteplan can have many proposals) +/// and requirement to send batch of votes may result in different proposals from different voteplan. pub struct WalletRequestGen { rand: OsRng, multi_controller: MultiController, diff --git a/src/vit-testing/iapyx/src/utils/qr.rs b/src/vit-testing/iapyx/src/utils/qr.rs index 47eb3e327d..0af6133344 100644 --- a/src/vit-testing/iapyx/src/utils/qr.rs +++ b/src/vit-testing/iapyx/src/utils/qr.rs @@ -145,14 +145,19 @@ pub fn read_qrs>( ) -> Vec { let mut secrets = Vec::new(); for (idx, qr) in qrs.iter().enumerate() { - println!("[{}/{}] Decoding {:?}", idx + 1, qrs.len(), qr.as_ref()); + println!( + "[{}/{}] Decoding {}", + idx + 1, + qrs.len(), + qr.as_ref().display() + ); let pin = match pin_read_mode.into_qr_pin_mode(qr).into_qr_pin() { Ok(pin) => pin, Err(err) => { println!( - "Cannot detect pin from file: {:?}, due to {:?}", - qr.as_ref(), + "Cannot detect pin from file: {}, due to {:?}", + qr.as_ref().display(), err ); continue; @@ -162,8 +167,8 @@ pub fn read_qrs>( Ok(img) => img, Err(err) => { println!( - "Cannot read qr from file: {:?}, due to {:?}", - qr.as_ref(), + "Cannot read qr from file: {}, due to {:?}", + qr.as_ref().display(), err ); continue; @@ -179,14 +184,14 @@ pub fn read_qrs>( Ok(secret) => secret, Err(err) => { println!( - "Cannot decode qr from file: {:?}, due to {:?}", - qr.as_ref(), + "Cannot decode qr from file: {}, due to {:?}", + qr.as_ref().display(), err ); continue; } }; - secrets.push(secret.get(0).unwrap().clone()); + secrets.push(secret.first().unwrap().clone()); } secrets } diff --git a/src/vit-testing/integration-tests/Cargo.toml b/src/vit-testing/integration-tests/Cargo.toml index d1d7d56841..61c61f22c0 100644 --- a/src/vit-testing/integration-tests/Cargo.toml +++ b/src/vit-testing/integration-tests/Cargo.toml @@ -23,9 +23,9 @@ chain-ser = { path = "../../chain-libs/chain-ser" } chain-crypto = { path = "../../chain-libs/chain-crypto" } voting_tools_rs = {path = "../../voting-tools-rs"} chain-impl-mockchain = { workspace = true, features = [ "property-test-api" ] } -vitup = { path = "../vitup"} -iapyx = { path = "../iapyx"} -valgrind = { path = "../valgrind"} +vitup = { path = "../vitup"} +iapyx = { path = "../iapyx"} +valgrind = { path = "../valgrind"} mainnet-tools = { path = "../mainnet-tools"} mainnet-lib = { path = "../mainnet-lib"} snapshot-trigger-service = { path = "../snapshot-trigger-service" } @@ -34,7 +34,7 @@ tokio = { version = "1.1", features = ["macros","rt","rt-multi-thread"] } catalyst-toolbox = { path = "../../catalyst-toolbox/catalyst-toolbox", features=["test-api"]} snapshot-lib = { path = "../../catalyst-toolbox/snapshot-lib", features=["test-api"]} thiserror = "1.0" -netstat2 = "0.9" +netstat2 = "0.11.1" image = "0.23" rand = "0.8" hex = "0.4.3" diff --git a/src/vit-testing/mainnet-lib/Cargo.toml b/src/vit-testing/mainnet-lib/Cargo.toml index 146fc77db4..bf7b6eeb55 100644 --- a/src/vit-testing/mainnet-lib/Cargo.toml +++ b/src/vit-testing/mainnet-lib/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cardano-serialization-lib = "11.3.1" +cardano-serialization-lib = "12" jormungandr-lib = { workspace = true } jortestkit = { path = "../../jortestkit" } tempdir = "0.3.7" diff --git a/src/vit-testing/mainnet-lib/src/cardano_node/block.rs b/src/vit-testing/mainnet-lib/src/cardano_node/block.rs index 2fdb72e06d..fae884b707 100644 --- a/src/vit-testing/mainnet-lib/src/cardano_node/block.rs +++ b/src/vit-testing/mainnet-lib/src/cardano_node/block.rs @@ -1,12 +1,8 @@ use crate::cardano_node::Settings; -use cardano_serialization_lib::crypto::{ - BlockHash, Ed25519Signature, KESSignature, KESVKey, PrivateKey, VRFCert, VRFVKey, Vkey, -}; -use cardano_serialization_lib::metadata::AuxiliaryData; -use cardano_serialization_lib::utils::BigNum; use cardano_serialization_lib::{ - AuxiliaryDataSet, Block, Header, HeaderBody, OperationalCert, ProtocolVersion, Transaction, - TransactionBodies, TransactionWitnessSets, + AuxiliaryData, AuxiliaryDataSet, BigNum, Block, BlockHash, Ed25519Signature, Header, + HeaderBody, KESSignature, KESVKey, OperationalCert, PrivateKey, ProtocolVersion, Transaction, + TransactionBodies, TransactionWitnessSets, VRFCert, VRFVKey, Vkey, }; /// Block0 representation diff --git a/src/vit-testing/mainnet-lib/src/cardano_node/in_memory.rs b/src/vit-testing/mainnet-lib/src/cardano_node/in_memory.rs index a48dd6eba8..cda3114f56 100644 --- a/src/vit-testing/mainnet-lib/src/cardano_node/in_memory.rs +++ b/src/vit-testing/mainnet-lib/src/cardano_node/in_memory.rs @@ -118,7 +118,7 @@ impl Drop for InMemoryNode { #[cfg(test)] mod tests { use crate::{Block0, CardanoWallet, InMemoryNode}; - use cardano_serialization_lib::utils::BigNum; + use cardano_serialization_lib::BigNum; use futures_util::StreamExt; use pharos::{Channel, Observable}; diff --git a/src/vit-testing/mainnet-lib/src/cardano_node/transaction.rs b/src/vit-testing/mainnet-lib/src/cardano_node/transaction.rs index 99d601999d..3492547fc1 100644 --- a/src/vit-testing/mainnet-lib/src/cardano_node/transaction.rs +++ b/src/vit-testing/mainnet-lib/src/cardano_node/transaction.rs @@ -1,9 +1,6 @@ -use cardano_serialization_lib::address::Address; -use cardano_serialization_lib::metadata::{AuxiliaryData, GeneralTransactionMetadata}; -use cardano_serialization_lib::utils::{Coin, Value}; use cardano_serialization_lib::{ - Transaction, TransactionBody, TransactionInputs, TransactionOutput, TransactionOutputs, - TransactionWitnessSet, + Address, AuxiliaryData, Coin, GeneralTransactionMetadata, Transaction, TransactionBody, + TransactionInputs, TransactionOutput, TransactionOutputs, TransactionWitnessSet, Value, }; /// Transaction builder for cardano mainnet diff --git a/src/vit-testing/mainnet-lib/src/db_sync/in_memory.rs b/src/vit-testing/mainnet-lib/src/db_sync/in_memory.rs index 94c5e40fe9..e5ace05f22 100644 --- a/src/vit-testing/mainnet-lib/src/db_sync/in_memory.rs +++ b/src/vit-testing/mainnet-lib/src/db_sync/in_memory.rs @@ -1,6 +1,5 @@ use crate::{Block0, InMemoryNode, CARDANO_MAINNET_SLOTS_PER_EPOCH}; -use cardano_serialization_lib::metadata::GeneralTransactionMetadata; -use cardano_serialization_lib::utils::BigNum; +use cardano_serialization_lib::{BigNum, GeneralTransactionMetadata}; use cardano_serialization_lib::{Block, Transaction, TransactionWitnessSet}; use futures::executor::block_on; use futures_util::StreamExt; @@ -243,10 +242,10 @@ impl InMemoryDbSync { #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct Settings { - pub db_name: String, - pub db_user: String, - pub db_host: String, - pub db_pass: String, + pub name: String, + pub user: String, + pub host: String, + pub pass: String, } /// Basic converter from absolute slot number and {epoch,slot} pair @@ -290,7 +289,7 @@ mod tests { use crate::{CardanoWallet, InMemoryDbSync}; use assert_fs::fixture::PathChild; use assert_fs::TempDir; - use cardano_serialization_lib::utils::BigNum; + use cardano_serialization_lib::BigNum; use std::time::Duration; #[tokio::test] diff --git a/src/vit-testing/mainnet-lib/src/network/wallet_state/mod.rs b/src/vit-testing/mainnet-lib/src/network/wallet_state/mod.rs index 183c625b2a..cb783f57dc 100644 --- a/src/vit-testing/mainnet-lib/src/network/wallet_state/mod.rs +++ b/src/vit-testing/mainnet-lib/src/network/wallet_state/mod.rs @@ -5,7 +5,7 @@ pub use builder::MainnetWalletStateBuilder; use std::fmt::{Debug, Formatter}; pub use template::{build, build_default, Actor, Error as TemplateError, ExternalProvider}; -use cardano_serialization_lib::address::Address; +use cardano_serialization_lib::Address; use cardano_serialization_lib::Transaction; use jormungandr_lib::crypto::account::Identifier; diff --git a/src/vit-testing/mainnet-lib/src/network/wallet_state/template/actor.rs b/src/vit-testing/mainnet-lib/src/network/wallet_state/template/actor.rs index ae601cb964..2a7cb82239 100644 --- a/src/vit-testing/mainnet-lib/src/network/wallet_state/template/actor.rs +++ b/src/vit-testing/mainnet-lib/src/network/wallet_state/template/actor.rs @@ -221,7 +221,7 @@ impl TryFrom for Actor { } else { Err(Error::CannotBuildActor { name: builder.name.clone(), - details: "no voting ke defined for external representative".to_string(), + details: "no voting key defined for external representative".to_string(), }) } } @@ -269,6 +269,7 @@ mod tests { target: vec![("bob", 1), ("alice", 1)].into(), slotno: 1, }) + .with_ada(0) .try_into() .unwrap(), delegator("david") @@ -285,14 +286,14 @@ mod tests { actors[0] ); assert_eq!( - actors[0], + actors[1], Actor::ExternalRep { name: "bob".to_string(), voting_key: String::new() } ); assert_eq!( - actors[0], + actors[2], Actor::GeneratedDelegator { name: "clarice".to_string(), registration: Registration { @@ -303,7 +304,7 @@ mod tests { } ); assert_eq!( - actors[0], + actors[3], Actor::ExternalDelegator { name: "david".to_string(), address: "testadd".to_string() diff --git a/src/vit-testing/mainnet-lib/src/network/wallet_state/template/external_providers.rs b/src/vit-testing/mainnet-lib/src/network/wallet_state/template/external_providers.rs index 32089e48a6..1e172ebd3e 100644 --- a/src/vit-testing/mainnet-lib/src/network/wallet_state/template/external_providers.rs +++ b/src/vit-testing/mainnet-lib/src/network/wallet_state/template/external_providers.rs @@ -3,7 +3,7 @@ use crate::network::wallet_state::template::Error; use crate::wallet_state::MainnetWalletState; use crate::CardanoWallet; use async_trait::async_trait; -use cardano_serialization_lib::address::Address; +use cardano_serialization_lib::Address; use rand::Rng; /// Trait for retrieving information about address registrations from network diff --git a/src/vit-testing/mainnet-lib/src/network/wallet_state/template/mod.rs b/src/vit-testing/mainnet-lib/src/network/wallet_state/template/mod.rs index 7523191e3f..82612a0bf8 100644 --- a/src/vit-testing/mainnet-lib/src/network/wallet_state/template/mod.rs +++ b/src/vit-testing/mainnet-lib/src/network/wallet_state/template/mod.rs @@ -4,8 +4,10 @@ mod external_providers; use super::MainnetWalletState; use crate::CardanoWallet; -pub use actor::{delegator, registration, representative, Actor}; -pub use arbitrary::{generate_arbitrary_delegator, Error as ArbitraryError}; +pub use actor::Actor; +#[cfg(test)] +pub use actor::{delegator, registration, representative}; +pub use arbitrary::generate_arbitrary_delegator; use chain_crypto::PublicKeyFromStrError; pub use external_providers::{DummyExternalProvider, ExternalProvider}; use jormungandr_lib::crypto::account::Identifier; @@ -98,7 +100,7 @@ pub enum Error { Arbitrary(#[from] arbitrary::Error), /// Arbitrary error #[error(transparent)] - CannotParseAddress(#[from] cardano_serialization_lib::error::JsError), + CannotParseAddress(#[from] cardano_serialization_lib::JsError), } #[cfg(test)] diff --git a/src/vit-testing/mainnet-lib/src/wallet/mod.rs b/src/vit-testing/mainnet-lib/src/wallet/mod.rs index 115b9b1594..6908392d78 100644 --- a/src/vit-testing/mainnet-lib/src/wallet/mod.rs +++ b/src/vit-testing/mainnet-lib/src/wallet/mod.rs @@ -6,11 +6,10 @@ pub use crate::wallet::registration::{ REGISTRATION_METADATA_LABEL, REGISTRATION_METADATA_SIGNATURE_LABEL, REGISTRATION_SIGNATURE_METADATA_IDX, }; -use cardano_serialization_lib::address::{ - BaseAddress, NetworkInfo, RewardAddress, StakeCredential, -}; -use cardano_serialization_lib::crypto::{PrivateKey, PublicKey}; use cardano_serialization_lib::Transaction; +use cardano_serialization_lib::{ + BaseAddress, Credential, NetworkInfo, PrivateKey, PublicKey, RewardAddress, +}; use chain_addr::Discrimination; use jormungandr_lib::crypto::account::Identifier; use jormungandr_lib::interfaces::Address; @@ -62,14 +61,14 @@ impl CardanoWallet { /// Stake address based on stake public key #[must_use] - pub fn stake_credential(&self) -> StakeCredential { - StakeCredential::from_keyhash(&self.stake_key.to_public().hash()) + pub fn stake_credential(&self) -> Credential { + Credential::from_keyhash(&self.stake_key.to_public().hash()) } /// Payment address based on stake public key #[must_use] - pub fn payment_credential(&self) -> StakeCredential { - StakeCredential::from_keyhash(&self.payment_key.to_public().hash()) + pub fn payment_credential(&self) -> Credential { + Credential::from_keyhash(&self.payment_key.to_public().hash()) } /// Cardano stake public key diff --git a/src/vit-testing/mainnet-lib/src/wallet/registration.rs b/src/vit-testing/mainnet-lib/src/wallet/registration.rs index dfe5dc5943..5bd4ddc91e 100644 --- a/src/vit-testing/mainnet-lib/src/wallet/registration.rs +++ b/src/vit-testing/mainnet-lib/src/wallet/registration.rs @@ -1,38 +1,42 @@ use crate::cardano_node::TransactionBuilder; use crate::CardanoWallet; -use cardano_serialization_lib::address::Address; use cardano_serialization_lib::chain_crypto::Blake2b256; -use cardano_serialization_lib::crypto::{Ed25519Signature, PublicKey}; -use cardano_serialization_lib::error::JsError; -use cardano_serialization_lib::metadata::{ - decode_metadatum_to_json_str, encode_json_value_to_metadatum, GeneralTransactionMetadata, - MetadataJsonSchema, MetadataList, MetadataMap, TransactionMetadatum, TransactionMetadatumLabel, -}; -use cardano_serialization_lib::utils::{BigNum, Int}; use cardano_serialization_lib::Transaction; +use cardano_serialization_lib::{ + decode_metadatum_to_json_str, encode_json_value_to_metadatum, Address, BigNum, + Ed25519Signature, GeneralTransactionMetadata, Int, JsError, MetadataJsonSchema, MetadataList, + MetadataMap, PublicKey, TransactionMetadatum, TransactionMetadatumLabel, +}; use serde_json::Map; use snapshot_lib::registration::Delegations; -lazy_static::lazy_static! { - /// registration metadata index constant - pub static ref REGISTRATION_METADATA_IDX: u32 = 61284u32; - /// registration signature metadata index constant - pub static ref REGISTRATION_SIGNATURE_METADATA_IDX: u32 = 61285u32; - /// registration metadata constant - pub static ref REGISTRATION_METADATA_LABEL: TransactionMetadatumLabel = TransactionMetadatumLabel::from(*REGISTRATION_METADATA_IDX); - ///registration signature metadata constant - pub static ref REGISTRATION_METADATA_SIGNATURE_LABEL: TransactionMetadatumLabel = TransactionMetadatumLabel::from(*REGISTRATION_SIGNATURE_METADATA_IDX); - /// metadatum label 1 constant - pub static ref METADATUM_1: TransactionMetadatum = TransactionMetadatum::new_int(&Int::new_i32(1)); - /// metadatum label 2 constant - pub static ref METADATUM_2: TransactionMetadatum = TransactionMetadatum::new_int(&Int::new_i32(2)); - /// metadatum label 3 constant - pub static ref METADATUM_3: TransactionMetadatum = TransactionMetadatum::new_int(&Int::new_i32(3)); - /// metadatum label 4 constant - pub static ref METADATUM_4: TransactionMetadatum = TransactionMetadatum::new_int(&Int::new_i32(4)); - /// metadatum label 5 constant - pub static ref METADATUM_5: TransactionMetadatum = TransactionMetadatum::new_int(&Int::new_i32(5)); -} +use std::sync::LazyLock; + +/// registration metadata index constant +pub static REGISTRATION_METADATA_IDX: LazyLock = LazyLock::new(|| 61284u32); +/// registration signature metadata index constant +pub static REGISTRATION_SIGNATURE_METADATA_IDX: LazyLock = LazyLock::new(|| 61285u32); +/// registration metadata constant +pub static REGISTRATION_METADATA_LABEL: LazyLock = + LazyLock::new(|| TransactionMetadatumLabel::from(*REGISTRATION_METADATA_IDX)); +///registration signature metadata constant +pub static REGISTRATION_METADATA_SIGNATURE_LABEL: LazyLock = + LazyLock::new(|| TransactionMetadatumLabel::from(*REGISTRATION_SIGNATURE_METADATA_IDX)); +/// metadatum label 1 constant +pub static METADATUM_1: LazyLock = + LazyLock::new(|| TransactionMetadatum::new_int(&Int::new_i32(1))); +/// metadatum label 2 constant +pub static METADATUM_2: LazyLock = + LazyLock::new(|| TransactionMetadatum::new_int(&Int::new_i32(2))); +/// metadatum label 3 constant +pub static METADATUM_3: LazyLock = + LazyLock::new(|| TransactionMetadatum::new_int(&Int::new_i32(3))); +/// metadatum label 4 constant +pub static METADATUM_4: LazyLock = + LazyLock::new(|| TransactionMetadatum::new_int(&Int::new_i32(4))); +/// metadatum label 5 constant +pub static METADATUM_5: LazyLock = + LazyLock::new(|| TransactionMetadatum::new_int(&Int::new_i32(5))); /// Responsible for building registration transaction metadata pub struct RegistrationTransactionBuilder<'a> { @@ -356,9 +360,6 @@ impl GeneralTransactionMetadataInfo for GeneralTransactionMetadata { #[cfg(test)] mod test { use super::*; - use cardano_serialization_lib::metadata::{ - decode_metadatum_to_json_str, encode_json_value_to_metadatum, MetadataJsonSchema, - }; use jormungandr_lib::crypto::account::Identifier; #[test] diff --git a/src/vit-testing/mainnet-tools/Cargo.toml b/src/vit-testing/mainnet-tools/Cargo.toml index da2e3f87f1..052f1c06d1 100644 --- a/src/vit-testing/mainnet-tools/Cargo.toml +++ b/src/vit-testing/mainnet-tools/Cargo.toml @@ -28,7 +28,7 @@ jortestkit = { path = "../../jortestkit" } jormungandr-automation = { path = "../../jormungandr/testing/jormungandr-automation" } vit-servicing-station-tests = { path = "../../vit-servicing-station/vit-servicing-station-tests" } vit-servicing-station-lib = { path = "../../vit-servicing-station/vit-servicing-station-lib" } -cardano-serialization-lib = "11.3.1" +cardano-serialization-lib = "12" scheduler-service-lib = { path = "../scheduler-service-lib"} tempdir = "0.3.7" num-traits = "0.2.15" diff --git a/src/vit-testing/mainnet-tools/src/cardano_cli/wrapper/mod.rs b/src/vit-testing/mainnet-tools/src/cardano_cli/wrapper/mod.rs index d30e14c48f..695d984573 100644 --- a/src/vit-testing/mainnet-tools/src/cardano_cli/wrapper/mod.rs +++ b/src/vit-testing/mainnet-tools/src/cardano_cli/wrapper/mod.rs @@ -4,5 +4,4 @@ mod error; pub mod utils; pub use cli::Api; -pub use data::CardanoKeyTemplate; pub use error::Error; diff --git a/src/vit-testing/mainnet-tools/src/snapshot/wormhole/command.rs b/src/vit-testing/mainnet-tools/src/snapshot/wormhole/command.rs index ca854f6eb3..3810246316 100644 --- a/src/vit-testing/mainnet-tools/src/snapshot/wormhole/command.rs +++ b/src/vit-testing/mainnet-tools/src/snapshot/wormhole/command.rs @@ -38,8 +38,8 @@ pub struct Command { /// - one-shot - Ends program after single job is done, /// /// - schedule - Run job continuously based on cron string. -/// WARNING: there is custom cron string used which allows to program scheduler based on seconds. -/// The scheduling format is as follows: +/// WARNING: there is custom cron string used which allows to program scheduler based on seconds. +/// The scheduling format is as follows: ///```cron ///sec min hour day of month month day of week year /// @@ -57,6 +57,10 @@ impl Command { /// # Errors /// /// On IO related errors + /// + /// # Panics + /// + /// Panics if the log level string is invalid. pub fn exec(self) -> Result<()> { let subscriber = FmtSubscriber::builder() .with_file(false) diff --git a/src/vit-testing/mainnet-tools/src/voter_registration/mod.rs b/src/vit-testing/mainnet-tools/src/voter_registration/mod.rs index 5031cc3ba6..320093c340 100644 --- a/src/vit-testing/mainnet-tools/src/voter_registration/mod.rs +++ b/src/vit-testing/mainnet-tools/src/voter_registration/mod.rs @@ -4,7 +4,7 @@ pub mod fake; use assert_fs::fixture::PathChild; use assert_fs::TempDir; -use cardano_serialization_lib::metadata::GeneralTransactionMetadata; +use cardano_serialization_lib::GeneralTransactionMetadata; use command::PATH_TO_DYNAMIC_CONTENT; pub use command::{Command, Error}; use std::env; @@ -43,7 +43,7 @@ impl Mock { println!( "VoterRegistrationMock set dynamic response: {:?}", - metadata_file.path() + metadata_file.path().display() ); let mut file = std::fs::File::create(metadata_file.path()).unwrap(); diff --git a/src/vit-testing/snapshot-trigger-service/src/args/mod.rs b/src/vit-testing/snapshot-trigger-service/src/args/mod.rs index 0e48bfedec..9c5ba497d7 100644 --- a/src/vit-testing/snapshot-trigger-service/src/args/mod.rs +++ b/src/vit-testing/snapshot-trigger-service/src/args/mod.rs @@ -39,7 +39,6 @@ impl TriggerServiceCommand { handle, ) .await - .map_err(Into::into) } } diff --git a/src/vit-testing/snapshot-trigger-service/src/rest.rs b/src/vit-testing/snapshot-trigger-service/src/rest.rs index fb6f7c4e1b..fdd1c49c58 100644 --- a/src/vit-testing/snapshot-trigger-service/src/rest.rs +++ b/src/vit-testing/snapshot-trigger-service/src/rest.rs @@ -96,7 +96,7 @@ pub async fn job_status_handler(id: String, context: ContextLock) -> Result Result, Error> { - Ok(self.proxy_client.block0().map(Into::into)?) + Ok(self.proxy_client.block0()?) } pub fn vote_plan_statuses(&self) -> Result, Error> { diff --git a/src/vit-testing/valgrind/src/data.rs b/src/vit-testing/valgrind/src/data.rs index 03e6f40625..046a7761e0 100644 --- a/src/vit-testing/valgrind/src/data.rs +++ b/src/vit-testing/valgrind/src/data.rs @@ -1,14 +1,13 @@ use chain_crypto::bech32::Bech32; use chain_impl_mockchain::{certificate::VotePlanId, vote::Options}; use chain_vote::ElectionPublicKey; -use std::{convert::TryFrom, str}; +use std::str; use vit_servicing_station_lib::db::models::proposals::FullProposalInfo; pub use vit_servicing_station_lib::{ db::models::challenges::Challenge, db::models::community_advisors_reviews::AdvisorReview, db::models::funds::Fund, db::models::proposals::Proposal, v0::endpoints::service_version::ServiceVersion as VitVersion, }; -pub use wallet_core::{Choice, Value}; pub trait ProposalExtension { fn chain_proposal_id_as_str(&self) -> String; @@ -31,13 +30,13 @@ impl ProposalExtension for FullProposalInfo { if self.proposal.chain_voteplan_payload == "public" { return wallet_core::Proposal::new_public( - VotePlanId::try_from(vote_plan_id).unwrap(), + VotePlanId::from(vote_plan_id), chain_proposal_index, Options::new_length(self.proposal.chain_vote_options.0.len() as u8).unwrap(), ); } wallet_core::Proposal::new_private( - VotePlanId::try_from(vote_plan_id).unwrap(), + VotePlanId::from(vote_plan_id), chain_proposal_index, Options::new_length(self.proposal.chain_vote_options.0.len() as u8).unwrap(), ElectionPublicKey::try_from_bech32_str(&self.proposal.chain_vote_encryption_key) diff --git a/src/vit-testing/vitup/Cargo.toml b/src/vit-testing/vitup/Cargo.toml index 49b7b5c21a..71d9271916 100644 --- a/src/vit-testing/vitup/Cargo.toml +++ b/src/vit-testing/vitup/Cargo.toml @@ -41,7 +41,7 @@ valgrind = { path = "../valgrind" } poldercast = "1" rand = "0.8" path-slash = "0.2.0" -netstat2 = "0.9" +netstat2 = "0.11.1" time = { version = "0.3.7", features=["serde","serde-well-known","parsing"]} fake = { version = "2.2", features=['chrono','http']} strum = "0.24" diff --git a/src/vit-testing/vitup/src/bin/vcli.rs b/src/vit-testing/vitup/src/bin/vcli.rs index c9957b7393..26c4041812 100644 --- a/src/vit-testing/vitup/src/bin/vcli.rs +++ b/src/vit-testing/vitup/src/bin/vcli.rs @@ -1,8 +1,7 @@ use clap::Parser; use vitup::client::args::VitupClientCommand; -use vitup::Result; #[tokio::main] -pub async fn main() -> Result<()> { - VitupClientCommand::parse().exec() +pub async fn main() -> std::result::Result<(), Box> { + VitupClientCommand::parse().exec().map_err(Box::new) } diff --git a/src/vit-testing/vitup/src/bin/vitup.rs b/src/vit-testing/vitup/src/bin/vitup.rs index f85a3e365d..8fb7890c4d 100644 --- a/src/vit-testing/vitup/src/bin/vitup.rs +++ b/src/vit-testing/vitup/src/bin/vitup.rs @@ -1,7 +1,6 @@ use clap::Parser; use vitup::cli::VitCliCommand; -use vitup::Result; -pub fn main() -> Result<()> { - VitCliCommand::parse().exec() +pub fn main() -> std::result::Result<(), Box> { + VitCliCommand::parse().exec().map_err(Box::new) } diff --git a/src/vit-testing/vitup/src/builders/helpers/vote_plan.rs b/src/vit-testing/vitup/src/builders/helpers/vote_plan.rs index 4cc6262914..95baca98dc 100644 --- a/src/vit-testing/vitup/src/builders/helpers/vote_plan.rs +++ b/src/vit-testing/vitup/src/builders/helpers/vote_plan.rs @@ -4,7 +4,6 @@ use chain_impl_mockchain::testing::scenario::template::ProposalDefBuilder; use chain_impl_mockchain::testing::TestGen; use hersir::builder::VotePlanKey; use hersir::config::{CommitteeTemplate, PrivateParameters, VotePlanTemplate}; -pub use jormungandr_lib::interfaces::Initial; use jormungandr_lib::interfaces::{BlockDate, TokenIdentifier}; use std::iter; diff --git a/src/vit-testing/vitup/src/builders/mod.rs b/src/vit-testing/vitup/src/builders/mod.rs index 1bee475d92..82dc9a1627 100644 --- a/src/vit-testing/vitup/src/builders/mod.rs +++ b/src/vit-testing/vitup/src/builders/mod.rs @@ -297,7 +297,6 @@ impl VitBackendSettingsBuilder { ) .build() .into_iter() - .map(Into::into) .collect(), ); diff --git a/src/vit-testing/vitup/src/cli/diff.rs b/src/vit-testing/vitup/src/cli/diff.rs index 455c2a8cce..88858d7588 100644 --- a/src/vit-testing/vitup/src/cli/diff.rs +++ b/src/vit-testing/vitup/src/cli/diff.rs @@ -46,7 +46,8 @@ impl DiffCommand { let remote_genesis_yaml = remote.path().join("genesis_remote.yaml"); - decode_block0(remote_client.block0()?, remote_genesis_yaml.clone())?; + decode_block0(remote_client.block0()?, remote_genesis_yaml.clone()) + .map_err(|e| crate::error::Error::Block0Error(Box::new(e)))?; let local_genesis_content = read_file(&local_genesis_yaml)?; let remote_genesis_content = read_file(remote_genesis_yaml)?; diff --git a/src/vit-testing/vitup/src/cli/generate/data/mod.rs b/src/vit-testing/vitup/src/cli/generate/data/mod.rs index b5d3dce9e9..b70440c247 100644 --- a/src/vit-testing/vitup/src/cli/generate/data/mod.rs +++ b/src/vit-testing/vitup/src/cli/generate/data/mod.rs @@ -4,7 +4,6 @@ mod random; use crate::Result; pub use external::ExternalDataCommandArgs; -pub use jormungandr_lib::interfaces::Initial; pub use perf::PerfDataCommandArgs; pub use random::{ AllRandomDataCommandArgs, RandomReviewsDataCommandArgs, RandomScoresDataCommandArgs, diff --git a/src/vit-testing/vitup/src/cli/generate/snapshot.rs b/src/vit-testing/vitup/src/cli/generate/snapshot.rs index ad2cd9cd14..177b2de8e0 100644 --- a/src/vit-testing/vitup/src/cli/generate/snapshot.rs +++ b/src/vit-testing/vitup/src/cli/generate/snapshot.rs @@ -125,7 +125,8 @@ impl SnapshotCommandArgs { } // write snapshot.json - let config = read_genesis_yaml(&genesis_yaml)?; + let config = read_genesis_yaml(&genesis_yaml) + .map_err(|e| crate::error::Error::Block0Error(Box::new(e)))?; let initials: Vec = config .initial diff --git a/src/vit-testing/vitup/src/cli/start/advanced.rs b/src/vit-testing/vitup/src/cli/start/advanced.rs index 905f831bf5..b0fcbffbb8 100644 --- a/src/vit-testing/vitup/src/cli/start/advanced.rs +++ b/src/vit-testing/vitup/src/cli/start/advanced.rs @@ -141,6 +141,5 @@ impl AdvancedStartCommandArgs { testing_directory, ); spawn_network(mode, network_spawn_params, &mut template_generator, config) - .map_err(Into::into) } } diff --git a/src/vit-testing/vitup/src/cli/start/quick.rs b/src/vit-testing/vitup/src/cli/start/quick.rs index b54d422144..52471269f3 100644 --- a/src/vit-testing/vitup/src/cli/start/quick.rs +++ b/src/vit-testing/vitup/src/cli/start/quick.rs @@ -1,5 +1,4 @@ use crate::builders::utils::logger; -pub use crate::builders::{VitBackendSettingsBuilder, FOLLOWER, LEADER_1, LEADER_2, LEADER_3}; use crate::config::read_voter_hirs; use crate::config::ConfigBuilder; use crate::config::{ @@ -180,7 +179,7 @@ impl QuickStartCommandArgs { config_builder = config_builder.use_https(); } - let vote_timestamps = vec![ + let vote_timestamps = [ self.vote_start_timestamp.clone(), self.tally_start_timestamp.clone(), self.tally_end_timestamp.clone(), @@ -236,6 +235,5 @@ impl QuickStartCommandArgs { testing_directory, ); spawn_network(mode, network_spawn_params, &mut template_generator, config) - .map_err(Into::into) } } diff --git a/src/vit-testing/vitup/src/client/args.rs b/src/vit-testing/vitup/src/client/args.rs index 3513c6f87d..34a0fd7d9c 100644 --- a/src/vit-testing/vitup/src/client/args.rs +++ b/src/vit-testing/vitup/src/client/args.rs @@ -134,7 +134,7 @@ impl ControlCommand { Self::SetFundId(set_fund_id) => { rest.set_fund_id(set_fund_id.fund_id).map_err(Into::into) } - Self::Fragments(fragments_command) => fragments_command.exec(rest).map_err(Into::into), + Self::Fragments(fragments_command) => fragments_command.exec(rest), Self::Health => { match rest.is_up() { true => { diff --git a/src/vit-testing/vitup/src/config/builder.rs b/src/vit-testing/vitup/src/config/builder.rs index d05e516cc6..594791bf48 100644 --- a/src/vit-testing/vitup/src/config/builder.rs +++ b/src/vit-testing/vitup/src/config/builder.rs @@ -1,8 +1,4 @@ -pub use crate::builders::ReviewGenerator; -pub use crate::builders::{ - convert_to_blockchain_date, convert_to_human_date, generate_qr_and_hashes, - VitVotePlanDefBuilder, WalletExtension, -}; +pub use crate::builders::convert_to_human_date; use crate::config::Block0Initials; use crate::config::{date_format, Initials}; use crate::config::{Config, VoteTime}; diff --git a/src/vit-testing/vitup/src/error.rs b/src/vit-testing/vitup/src/error.rs index 2139fc7691..a881291b4f 100644 --- a/src/vit-testing/vitup/src/error.rs +++ b/src/vit-testing/vitup/src/error.rs @@ -24,25 +24,25 @@ pub enum Error { #[error(transparent)] ParseTime(#[from] time::error::Parse), #[error(transparent)] - Block0Error(#[from] jormungandr_automation::testing::block0::Block0Error), + Block0Error(#[from] Box), #[error(transparent)] - Node(#[from] NodeError), + Node(#[from] Box), #[error(transparent)] - Wallet(#[from] WalletError), + Wallet(#[from] Box), #[error(transparent)] - FragmentSender(#[from] FragmentSenderError), + FragmentSender(#[from] Box), #[error(transparent)] - FragmentVerifier(#[from] FragmentVerifierError), + FragmentVerifier(#[from] Box), #[error(transparent)] VerificationFailed(#[from] VerificationError), #[error(transparent)] MonitorResourcesError(#[from] ConsumptionBenchmarkError), #[error(transparent)] - VitStationControllerError(#[from] VitStationControllerError), + VitStationControllerError(#[from] Box), #[error(transparent)] - WalletProxyError(#[from] WalletProxyError), + WalletProxyError(#[from] Box), #[error(transparent)] - TemplateLoadError(#[from] vit_servicing_station_tests::common::data::TemplateLoad), + TemplateLoadError(#[from] Box), #[error(transparent)] SerdeError(#[from] serde_json::Error), #[error(transparent)] @@ -58,7 +58,7 @@ pub enum Error { #[error(transparent)] Block0ConfigurationError(#[from] Block0ConfigurationError), #[error(transparent)] - VitServerBootstrapperError(#[from] ServerBootstrapperError), + VitServerBootstrapperError(#[from] Box), #[error(transparent)] VitRestError(#[from] vit_servicing_station_tests::common::clients::RestError), #[error(transparent)] @@ -74,9 +74,9 @@ pub enum Error { #[error(transparent)] Validate(#[from] crate::cli::ValidateError), #[error(transparent)] - ControllerError(#[from] hersir::controller::Error), + ControllerError(#[from] Box), #[error(transparent)] - Block0(#[from] Block0Error), + Block0(#[from] Box), #[error(transparent)] Builder(#[from] crate::builders::Error), #[error(transparent)] @@ -84,7 +84,7 @@ pub enum Error { #[error(transparent)] Data(#[from] crate::mode::standard::DataError), #[error(transparent)] - Main(#[from] crate::mode::standard::VitControllerError), + Main(#[from] Box), #[error(transparent)] WalletProxyController(#[from] WalletProxyControllerError), #[error("Cannot find snapshot file in: {0}")] @@ -119,3 +119,64 @@ pub enum Error { #[error("cannot set tracing")] SetGlobalDefault(#[from] SetGlobalDefaultError), } + +// Helper implementations for automatic boxing +impl From for Error { + fn from(e: hersir::controller::Error) -> Self { + Error::ControllerError(Box::new(e)) + } +} + +impl From for Error { + fn from(e: NodeError) -> Self { + Error::Node(Box::new(e)) + } +} + +impl From for Error { + fn from(e: ServerBootstrapperError) -> Self { + Error::VitServerBootstrapperError(Box::new(e)) + } +} + +impl From for Error { + fn from(e: VitStationControllerError) -> Self { + Error::VitStationControllerError(Box::new(e)) + } +} + +impl From for Error { + fn from(e: WalletProxyError) -> Self { + Error::WalletProxyError(Box::new(e)) + } +} + +impl From for Error { + fn from(e: crate::mode::standard::VitControllerError) -> Self { + Error::Main(Box::new(e)) + } +} + +impl From for Error { + fn from(e: WalletError) -> Self { + Error::Wallet(Box::new(e)) + } +} + +impl From for Error { + fn from(e: FragmentSenderError) -> Self { + Error::FragmentSender(Box::new(e)) + } +} + +impl From for Error { + fn from(e: FragmentVerifierError) -> Self { + Error::FragmentVerifier(Box::new(e)) + } +} + +impl From for Error { + fn from(e: vit_servicing_station_tests::common::data::TemplateLoad) -> Self { + Error::TemplateLoadError(Box::new(e)) + } +} diff --git a/src/vit-testing/vitup/src/mode/mock/rest/vit_ss.rs b/src/vit-testing/vitup/src/mode/mock/rest/vit_ss.rs index 597a5f7d29..2d90013bf8 100644 --- a/src/vit-testing/vitup/src/mode/mock/rest/vit_ss.rs +++ b/src/vit-testing/vitup/src/mode/mock/rest/vit_ss.rs @@ -141,8 +141,8 @@ pub async fn get_challenge_by_id(id: i32, context: ContextLock) -> Result = context .state() @@ -178,8 +178,8 @@ pub async fn get_challenge_by_id_and_group_id( .vit() .challenges() .iter() + .find(|&ch| ch.id == id) .cloned() - .find(|ch| ch.id == id) .ok_or_else(|| HandleError::NotFound(id.to_string()))?; let proposals: Vec = context .state() @@ -218,8 +218,8 @@ pub async fn get_review_by_id(id: i32, context: ContextLock) -> Result>())) diff --git a/src/vit-testing/vitup/src/mode/mock/snapshot.rs b/src/vit-testing/vitup/src/mode/mock/snapshot.rs index 5d2ab7b7ef..977c76a8f4 100644 --- a/src/vit-testing/vitup/src/mode/mock/snapshot.rs +++ b/src/vit-testing/vitup/src/mode/mock/snapshot.rs @@ -251,7 +251,7 @@ impl Arbitrary for VoterSnapshot { type Strategy = BoxedStrategy; fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { - let tags = vec![ + let tags = [ String::from("latest"), String::from("fund8"), String::from("nightly"), diff --git a/src/vit-testing/vitup/src/mode/standard/controllers/main.rs b/src/vit-testing/vitup/src/mode/standard/controllers/main.rs index 9bc3cf4cd4..1b110c4496 100644 --- a/src/vit-testing/vitup/src/mode/standard/controllers/main.rs +++ b/src/vit-testing/vitup/src/mode/standard/controllers/main.rs @@ -327,10 +327,10 @@ impl VitController { .arg("--address") .arg(settings_overriden.base_address().to_string()) .arg("--vit-address") - .arg(&settings_overriden.base_vit_address().to_string()) + .arg(settings_overriden.base_vit_address().to_string()) .arg("--node-address") .arg( - &settings_overriden + settings_overriden .base_node_backend_address() .unwrap() .to_string(), diff --git a/src/vit-testing/vitup/src/mode/standard/controllers/vit_station/mod.rs b/src/vit-testing/vitup/src/mode/standard/controllers/vit_station/mod.rs index 602bcca415..3dc8dd1209 100644 --- a/src/vit-testing/vitup/src/mode/standard/controllers/vit_station/mod.rs +++ b/src/vit-testing/vitup/src/mode/standard/controllers/vit_station/mod.rs @@ -1,3 +1,5 @@ +#![allow(non_local_definitions)] + mod controller; mod data; @@ -12,11 +14,12 @@ pub use vit_servicing_station_tests::common::{ pub use vit_servicing_station_lib::server::settings::dump_settings_to_file; -pub use controller::{VitStationController, VitStationSettings, VIT_CONFIG, VIT_STATION_LOG}; +pub use controller::{VitStationController, VitStationSettings, VIT_CONFIG}; pub use data::{generate_database, generate_random_database, DbGenerator, Error as DataError}; use std::time::Duration; pub type Result = std::result::Result; +#[allow(non_local_definitions)] #[derive(custom_debug::Debug, thiserror::Error)] pub enum Error { #[error(transparent)] diff --git a/src/vit-testing/vitup/src/mode/standard/controllers/wallet_proxy/mod.rs b/src/vit-testing/vitup/src/mode/standard/controllers/wallet_proxy/mod.rs index 35f77ea630..8e2226d11f 100644 --- a/src/vit-testing/vitup/src/mode/standard/controllers/wallet_proxy/mod.rs +++ b/src/vit-testing/vitup/src/mode/standard/controllers/wallet_proxy/mod.rs @@ -1,4 +1,5 @@ #![allow(dead_code)] +#![allow(non_local_definitions)] mod controller; mod settings; @@ -21,6 +22,7 @@ pub use self::settings::WalletProxySettings; pub type Result = std::result::Result; +#[allow(non_local_definitions)] #[derive(custom_debug::Debug, thiserror::Error)] pub enum Error { #[error(transparent)] diff --git a/src/vit-testing/vitup/src/mode/standard/settings.rs b/src/vit-testing/vitup/src/mode/standard/settings.rs index 3a479cab51..0a8a777a03 100644 --- a/src/vit-testing/vitup/src/mode/standard/settings.rs +++ b/src/vit-testing/vitup/src/mode/standard/settings.rs @@ -13,6 +13,7 @@ use vit_servicing_station_tests::common::startup::server::ServerSettingsBuilder; pub const VIT_STATION: &str = "vit_station"; pub const VIT_STATION_ARCHIVE: &str = "vit_station_archive"; +#[allow(dead_code)] pub trait PrepareVitServerSettings: Clone + Send { fn prepare(session_settings: &mut SessionSettings) -> Self; } @@ -24,6 +25,7 @@ pub trait PrepareWalletProxySettings: Clone + Send { ) -> Self; } +#[allow(dead_code)] pub trait PrepareSettings { fn prepare( topology: Topology, diff --git a/src/vit-testing/vitup/tests/data/representative.rs b/src/vit-testing/vitup/tests/data/representative.rs index 206590dc88..311b970851 100644 --- a/src/vit-testing/vitup/tests/data/representative.rs +++ b/src/vit-testing/vitup/tests/data/representative.rs @@ -141,7 +141,7 @@ pub fn representative_multiple_vote_plans() { fn get_expected_tokens(files_tree: &DeploymentTree) -> (String, String) { let contents = std::fs::read_to_string(files_tree.voting_token()).unwrap(); let voting_tokens: Vec<(Role, TokenIdentifier)> = serde_json::from_str(&contents).unwrap(); - let tokens: HashMap = voting_tokens.iter().cloned().map(|(r, t)| (r, t)).collect(); + let tokens: HashMap = voting_tokens.iter().cloned().collect(); ( voting_token_to_string(tokens.get(&Role::Voter).unwrap()), voting_token_to_string(tokens.get(&Role::Representative).unwrap()), diff --git a/src/voting-tools-rs/Cargo.toml b/src/voting-tools-rs/Cargo.toml index 4bc6666b7b..d3b7b07690 100644 --- a/src/voting-tools-rs/Cargo.toml +++ b/src/voting-tools-rs/Cargo.toml @@ -32,7 +32,7 @@ tracing.workspace = true tracing-subscriber.workspace = true rust_decimal = { version = "1.26", features = ["serde", "db-postgres"] } -cardano-serialization-lib = "11.4" +cardano-serialization-lib = "12" thiserror = "1" diff --git a/src/voting-tools-rs/src/data/mod.rs b/src/voting-tools-rs/src/data/mod.rs index 8115187bfa..5421ebd478 100644 --- a/src/voting-tools-rs/src/data/mod.rs +++ b/src/voting-tools-rs/src/data/mod.rs @@ -201,19 +201,13 @@ impl SignedRegistration { /// #[derive(Debug, Clone)] pub struct RawRegistration { - /// cip 15/36: 61284 json from DB. - pub json_reg: serde_json::Value, - - /// cip 15/36: 61285 json from DB. - pub json_sig: serde_json::Value, - /// cip 15/36: 61284 raw binary pub bin_reg: Vec, /// cip 15/36: 61285 raw binary pub bin_sig: Vec, - /// registration tx_id + /// registration `tx_id` pub tx_id: TxId, /// The slot the registration was found in. diff --git a/src/voting-tools-rs/src/testing/test_api/output_assertions.rs b/src/voting-tools-rs/src/testing/test_api/output_assertions.rs index bd50a3b290..2d3f41dfbc 100644 --- a/src/voting-tools-rs/src/testing/test_api/output_assertions.rs +++ b/src/voting-tools-rs/src/testing/test_api/output_assertions.rs @@ -2,8 +2,7 @@ use crate::data::SnapshotEntry; use crate::VotingKey; -use cardano_serialization_lib::address::RewardAddress; -use cardano_serialization_lib::crypto::PublicKey; +use cardano_serialization_lib::{PublicKey, RewardAddress}; /// Allows [`SnapshotEntry`] struct to be assertable pub trait VerifiableSnapshotOutput { diff --git a/src/voting-tools-rs/src/verification/verify.rs b/src/voting-tools-rs/src/verification/verify.rs index d2cfa8feb9..d84ad1329d 100644 --- a/src/voting-tools-rs/src/verification/verify.rs +++ b/src/voting-tools-rs/src/verification/verify.rs @@ -13,9 +13,7 @@ use nonempty::nonempty; /// DB columns const REG_TX_ID: usize = 2; const REG_SLOT_NO: usize = 4; -const REG_JSON: usize = 6; const REG_BIN: usize = 7; -const SIG_JSON: usize = 9; const SIG_BIN: usize = 10; /// Contains the most recent registration for each public stake address @@ -91,8 +89,6 @@ pub fn filter_registrations( // The raw registration data from the database. let rawreg = RawRegistration { - json_reg: row.get(REG_JSON), - json_sig: row.get(SIG_JSON), bin_reg: row.get(REG_BIN), bin_sig: row.get(SIG_BIN), tx_id: TxId(tx_id as u64), @@ -120,7 +116,7 @@ pub fn filter_registrations( }; match reg.validate_signature_bin(rawreg.bin_reg.clone()) { - Ok(_) => (), + Ok(()) => (), Err(err) => { invalids.push(InvalidRegistration { spec_61284: Some(prefix_hex(&rawreg.bin_reg)), @@ -136,7 +132,7 @@ pub fn filter_registrations( } match reg.validate_multi_delegation(cip_36_multidelegations) { - Ok(_) => (), + Ok(()) => (), Err(err) => { invalids.push(InvalidRegistration { spec_61284: Some(prefix_hex(&rawreg.bin_reg)),