diff --git a/.cargo/config b/.cargo/config.toml similarity index 100% rename from .cargo/config rename to .cargo/config.toml diff --git a/.github/workflows/ci_aarch64_build_ubuntu.yaml b/.github/workflows/ci_aarch64_build_ubuntu.yaml index d951832755..6c2b3a9053 100644 --- a/.github/workflows/ci_aarch64_build_ubuntu.yaml +++ b/.github/workflows/ci_aarch64_build_ubuntu.yaml @@ -45,7 +45,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.75.0 + toolchain: 1.81.0 - uses: actions/checkout@v3 - run: rustup component add rustfmt - run: sudo apt-get update && sudo apt-get install libssl-dev pkg-config libclang-dev -y && sudo apt-get install -y gcc-multilib diff --git a/.github/workflows/ci_benchmarks_ubuntu.yaml b/.github/workflows/ci_benchmarks_ubuntu.yaml index fd797d6946..6c05109266 100644 --- a/.github/workflows/ci_benchmarks_ubuntu.yaml +++ b/.github/workflows/ci_benchmarks_ubuntu.yaml @@ -52,7 +52,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.75.0 + toolchain: 1.81.0 - run: rustup component add rustfmt - run: rustup component add clippy - run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config libclang-dev diff --git a/.github/workflows/ci_integration_tests_ubuntu.yaml b/.github/workflows/ci_integration_tests_ubuntu.yaml index 77c2b18c07..06b94b6abe 100644 --- a/.github/workflows/ci_integration_tests_ubuntu.yaml +++ b/.github/workflows/ci_integration_tests_ubuntu.yaml @@ -57,7 +57,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.75.0 + toolchain: 1.81.0 - run: rustup component add rustfmt - run: rustup component add clippy - run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config libclang-dev @@ -86,7 +86,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.75.0 + toolchain: 1.81.0 - run: rustup component add rustfmt - run: rustup component add clippy - run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config libclang-dev diff --git a/.github/workflows/ci_linters_ubuntu.yaml b/.github/workflows/ci_linters_ubuntu.yaml index 3ae10198e2..baf0859879 100644 --- a/.github/workflows/ci_linters_ubuntu.yaml +++ b/.github/workflows/ci_linters_ubuntu.yaml @@ -53,7 +53,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.75.0 + toolchain: 1.81.0 - uses: actions/checkout@v3 - run: rustup component add rustfmt - run: cargo fmt --all -- --check diff --git a/.github/workflows/ci_quick_checks_ubuntu.yaml b/.github/workflows/ci_quick_checks_ubuntu.yaml index c285d6f669..cd63a524ae 100644 --- a/.github/workflows/ci_quick_checks_ubuntu.yaml +++ b/.github/workflows/ci_quick_checks_ubuntu.yaml @@ -53,7 +53,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.75.0 + toolchain: 1.81.0 - run: rustup component add rustfmt - uses: actions/checkout@v3 - run: cargo fmt --all -- --check diff --git a/.github/workflows/ci_unit_tests_ubuntu.yaml b/.github/workflows/ci_unit_tests_ubuntu.yaml index 61be39a165..45d46438da 100644 --- a/.github/workflows/ci_unit_tests_ubuntu.yaml +++ b/.github/workflows/ci_unit_tests_ubuntu.yaml @@ -53,7 +53,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.75.0 + toolchain: 1.81.0 - run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config libclang-dev - name: Install nextest uses: taiki-e/install-action@nextest diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index a81177a393..0b31a870dd 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -82,7 +82,7 @@ jobs: name: ckb_${{env.GIT_TAG_NAME }}_${{env.REL_PKG }}.asc path: ckb_${{env.GIT_TAG_NAME }}_${{env.REL_PKG }}.asc env: - BUILDER_IMAGE: nervos/ckb-docker-builder:bionic-rust-1.75.0 + BUILDER_IMAGE: nervos/ckb-docker-builder:bionic-rust-1.81.0 REL_PKG: ${{ matrix.rel_pkg }} package-for-linux-aarch64: @@ -167,7 +167,7 @@ jobs: name: ckb_${{env.GIT_TAG_NAME }}_${{env.REL_PKG }}.asc path: ckb_${{env.GIT_TAG_NAME }}_${{env.REL_PKG }}.asc env: - BUILDER_IMAGE: nervos/ckb-docker-builder:centos-7-rust-1.75.0 + BUILDER_IMAGE: nervos/ckb-docker-builder:centos-7-rust-1.81.0 REL_PKG: ${{ matrix.rel_pkg }} package-for-mac: diff --git a/Cargo.lock b/Cargo.lock index f163aef6b7..6603fdd4a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aead" @@ -39,7 +39,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -52,7 +52,7 @@ checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "const-random", - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -60,18 +60,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.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "android-tzdata" @@ -96,47 +96,48 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -144,9 +145,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arc-swap" @@ -156,9 +157,9 @@ checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[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", @@ -167,24 +168,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.52", + "syn 2.0.79", ] [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -196,13 +197,19 @@ dependencies = [ "num-traits", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "attohttpc" version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb8867f378f33f78a811a8eb9bf108ad99430d7aad43315dd9319c827ef6247" dependencies = [ - "http", + "http 0.2.12", "log", "url", "wildmatch", @@ -210,9 +217,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" @@ -226,9 +233,9 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http", - "http-body", - "hyper", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.31", "itoa", "matchit", "memchr", @@ -241,7 +248,7 @@ dependencies = [ "serde_path_to_error", "serde_urlencoded", "sha1", - "sync_wrapper", + "sync_wrapper 0.1.2", "tokio", "tokio-tungstenite", "tower", @@ -258,8 +265,8 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", @@ -268,17 +275,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -305,7 +312,7 @@ version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cexpr", "clang-sys", "lazy_static", @@ -318,7 +325,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.52", + "syn 2.0.79", "which", ] @@ -345,9 +352,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -386,12 +393,6 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - [[package]] name = "bs58" version = "0.5.1" @@ -403,9 +404,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "serde", @@ -413,9 +414,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" @@ -434,13 +435,12 @@ dependencies = [ [[package]] name = "cacache" -version = "12.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142316461ed3a3dfcba10417317472da5bfd0461e4d276bf7c07b330766d9490" +checksum = "a61ff12b19d89c752c213316b87fdb4a587f073d219b893cc56974b8c9f39bf7" dependencies = [ "digest", "either", - "futures", "hex", "libc", "memmap2", @@ -454,8 +454,6 @@ dependencies = [ "ssri", "tempfile", "thiserror", - "tokio", - "tokio-stream", "walkdir", ] @@ -467,12 +465,13 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.6" +version = "1.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" +checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -492,9 +491,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[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" @@ -522,21 +521,21 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.35" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] name = "chrono-tz" -version = "0.8.6" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" +checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" dependencies = [ "chrono", "chrono-tz-build", @@ -545,9 +544,9 @@ dependencies = [ [[package]] name = "chrono-tz-build" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" +checksum = "0c088aee841df9c3041febbb73934cfc39708749bf96dc827e3359cd39ef11b1" dependencies = [ "parse-zoneinfo", "phf 0.11.2", @@ -660,7 +659,6 @@ dependencies = [ "ckb-verification", "ckb-verification-traits", "criterion", - "lazy_static", "rand 0.8.5", "tempfile", ] @@ -701,7 +699,7 @@ dependencies = [ "daemonize", "fdlimit", "is-terminal", - "nix 0.24.3", + "nix", "rayon", "sentry", "serde", @@ -763,7 +761,6 @@ dependencies = [ "dashmap", "faux", "is_sorted", - "lazy_static", "minstant", "tempfile", ] @@ -815,7 +812,6 @@ version = "0.119.0-pre" dependencies = [ "ckb-fixed-hash", "faster-hex", - "lazy_static", "rand 0.8.5", "secp256k1", "thiserror", @@ -871,7 +867,6 @@ dependencies = [ "ckb-stop-handler", "console", "indicatif", - "once_cell", "tempfile", ] @@ -885,7 +880,7 @@ version = "0.119.0-pre" dependencies = [ "anyhow", "ckb-occupied-capacity", - "derive_more", + "derive_more 1.0.0", "thiserror", ] @@ -1023,7 +1018,6 @@ dependencies = [ "ckb-types", "ckb_schemars", "faster-hex", - "lazy_static", "proptest", "regex", "serde", @@ -1118,12 +1112,11 @@ dependencies = [ "ckb-util", "env_logger", "log", - "once_cell", "regex", "sentry", "tempfile", "time", - "yansi", + "yansi 0.5.1", ] [[package]] @@ -1134,7 +1127,6 @@ dependencies = [ "ckb-logger", "ckb-metrics", "libc", - "once_cell", "tikv-jemalloc-ctl", "tikv-jemalloc-sys", ] @@ -1152,7 +1144,6 @@ dependencies = [ name = "ckb-metrics" version = "0.119.0-pre" dependencies = [ - "once_cell", "prometheus", "prometheus-static-metric", ] @@ -1174,8 +1165,11 @@ dependencies = [ "ckb-metrics-config", "ckb-stop-handler", "ckb-util", - "hyper", + "http-body-util", + "hyper 1.5.0", + "hyper-util", "prometheus", + "tokio", ] [[package]] @@ -1222,8 +1216,10 @@ dependencies = [ "console", "eaglesong", "futures", - "hyper", + "http-body-util", + "hyper 1.5.0", "hyper-tls", + "hyper-util", "indicatif", "jsonrpc-core", "lru", @@ -1250,7 +1246,7 @@ version = "0.119.0-pre" dependencies = [ "bitflags 1.3.2", "bloom-filters", - "bs58 0.4.0", + "bs58", "ckb-app-config", "ckb-hash", "ckb-logger", @@ -1264,9 +1260,7 @@ dependencies = [ "faster-hex", "futures", "ipnetwork", - "lazy_static", "num_cpus", - "once_cell", "proptest", "rand 0.8.5", "secp256k1", @@ -1274,7 +1268,7 @@ dependencies = [ "serde", "serde_json", "snap", - "socket2 0.5.7", + "socket2", "tempfile", "tentacle", "tokio", @@ -1300,7 +1294,6 @@ dependencies = [ "ckb-util", "faster-hex", "lru", - "once_cell", "semver", "serde_json", ] @@ -1417,7 +1410,6 @@ dependencies = [ "include_dir", "log", "num-bigint", - "once_cell", "rand 0.8.5", "serde_json", "sql-builder", @@ -1499,7 +1491,7 @@ dependencies = [ "ckb_schemars", "proc-macro2", "serde_json", - "syn 2.0.52", + "syn 2.0.79", "tera", "walkdir", ] @@ -1561,7 +1553,6 @@ dependencies = [ "ckb-util", "ckb-verification", "dashmap", - "once_cell", "sled", "tempfile", "tokio", @@ -1597,7 +1588,6 @@ dependencies = [ "ckb-util", "ctrlc", "libc", - "once_cell", "rand 0.8.5", "tokio", "tokio-util", @@ -1657,7 +1647,6 @@ dependencies = [ "itertools 0.11.0", "keyed_priority_queue", "lru", - "once_cell", "rand 0.8.5", "sentry", "tempfile", @@ -1696,7 +1685,6 @@ dependencies = [ "ckb-traits", "ckb-types", "ckb-util", - "lazy_static", "tempfile", ] @@ -1734,7 +1722,9 @@ dependencies = [ "ckb-types", "ckb-util", "ckb-verification", - "hyper", + "http-body-util", + "hyper 1.5.0", + "hyper-util", "lru", "multi_index_map", "num_cpus", @@ -1763,12 +1753,11 @@ dependencies = [ "ckb-merkle-mountain-range", "ckb-occupied-capacity", "ckb-rational", - "derive_more", + "derive_more 1.0.0", "golomb-coded-set", "merkle-cbt", "molecule", "numext-fixed-uint", - "once_cell", "paste", "proptest", ] @@ -1779,8 +1768,7 @@ version = "0.119.0-pre" dependencies = [ "ckb-fixed-hash", "linked-hash-map", - "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "regex", ] @@ -1800,7 +1788,7 @@ dependencies = [ "ckb-traits", "ckb-types", "ckb-verification-traits", - "derive_more", + "derive_more 1.0.0", "lru", "tokio", ] @@ -1849,7 +1837,7 @@ dependencies = [ "bytes", "cc", "ckb-vm-definitions", - "derive_more", + "derive_more 0.99.18", "goblin 0.2.3", "goblin 0.4.0", "rand 0.7.3", @@ -1892,9 +1880,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -1919,7 +1907,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.10.0", "terminal_size", ] @@ -1931,9 +1919,9 @@ checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -2025,7 +2013,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "tiny-keccak", ] @@ -2057,24 +2045,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] [[package]] name = "crc" -version = "3.0.1" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" dependencies = [ "crc-catalog", ] @@ -2087,9 +2075,9 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -2182,9 +2170,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -2215,12 +2203,12 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.4.4" +version = "3.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" +checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" dependencies = [ - "nix 0.28.0", - "windows-sys 0.52.0", + "nix", + "windows-sys 0.59.0", ] [[package]] @@ -2252,7 +2240,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -2275,9 +2263,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -2285,27 +2273,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", - "syn 2.0.52", + "strsim 0.11.1", + "syn 2.0.79", ] [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -2320,9 +2308,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "debugid" @@ -2364,14 +2352,35 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.52", + "syn 2.0.79", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", + "unicode-xid", ] [[package]] name = "deunicode" -version = "1.4.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e854126756c496b8c81dec88f9a706b15b875c5849d4097a3854476b9fdf94" +checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" [[package]] name = "diff" @@ -2420,9 +2429,9 @@ checksum = "8d978bd5d343e8ab9b5c0fc8d93ff9c602fdc96616ffff9c05ac7a155419b824" [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" dependencies = [ "serde", ] @@ -2435,23 +2444,23 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] [[package]] name = "enum-as-inner" -version = "0.3.4" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570d109b813e904becc80d8d5da38376818a143348413f7149f1340fe04754d4" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] @@ -2475,9 +2484,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2524,9 +2533,9 @@ checksum = "51e2ce894d53b295cf97b05685aa077950ff3e8541af83217fc720a6437169f8" [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "faux" @@ -2547,7 +2556,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", "uuid", ] @@ -2567,10 +2576,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] -name = "finl_unicode" -version = "1.2.0" +name = "findshlibs" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" +checksum = "40b9e59cd0f7e0806cca4be089683ecb6434e602038df21fe6bf6711b2f07f64" +dependencies = [ + "cc", + "lazy_static", + "libc", + "winapi", +] [[package]] name = "fixedbitset" @@ -2580,9 +2595,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -2641,9 +2656,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -2656,9 +2671,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -2666,15 +2681,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -2689,37 +2704,37 @@ checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", - "parking_lot 0.12.1", + "parking_lot 0.12.3", ] [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -2729,9 +2744,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -2777,9 +2792,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -2790,9 +2805,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -2802,24 +2817,24 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-automata 0.4.8", + "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.6.0", "ignore", "walkdir", ] @@ -2883,8 +2898,27 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.2.5", + "http 0.2.12", + "indexmap 2.6.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -2893,9 +2927,9 @@ dependencies = [ [[package]] name = "half" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ "cfg-if", "crunchy", @@ -2936,6 +2970,12 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "hashlink" version = "0.9.1" @@ -2967,12 +3007,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -2985,6 +3019,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -3029,6 +3069,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "hostname" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9c7c7c8ac16c798734b8a24560c1362120597c40d5e1459f09498f8f6c8f2ba" +dependencies = [ + "cfg-if", + "libc", + "windows 0.52.0", +] + [[package]] name = "http" version = "0.2.12" @@ -3040,6 +3091,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -3047,7 +3109,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -3059,9 +3144,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -3086,35 +3171,73 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.7", + "socket2", "tokio", "tower-service", "tracing", "want", ] +[[package]] +name = "hyper" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.5.0", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + [[package]] name = "hyper-timeout" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper", + "hyper 0.14.31", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -3122,22 +3245,44 @@ dependencies = [ [[package]] name = "hyper-tls" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", - "hyper", + "http-body-util", + "hyper 1.5.0", + "hyper-util", "native-tls", "tokio", "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.5.0", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -3164,11 +3309,10 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] @@ -3198,15 +3342,15 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", "log", "memchr", - "regex-automata 0.4.6", + "regex-automata 0.4.8", "same-file", "walkdir", "winapi-util", @@ -3264,12 +3408,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", ] [[package]] @@ -3295,47 +3439,47 @@ dependencies = [ [[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", ] [[package]] name = "ipconfig" -version = "0.2.2" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.3.19", + "socket2", "widestring", - "winapi", - "winreg 0.6.2", + "windows-sys 0.48.0", + "winreg", ] [[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 = "ipnetwork" -version = "0.18.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4088d739b183546b239688ddbc79891831df421773df95e236daf7867866d355" +checksum = "bf466541e9d546596ee94f9f69590f89473455f88372423e0008fc1a7daf100e" dependencies = [ "serde", ] [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] @@ -3346,6 +3490,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357376465c37db3372ef6a00585d336ed3d0f11d4345eef77ebcb05865392b21" +[[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.10.5" @@ -3375,9 +3525,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" @@ -3390,9 +3540,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -3439,7 +3589,7 @@ checksum = "34fe3ce66f7e4909575f6be478862325559bf5b5d0a681d106aae2c9849e1857" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -3468,18 +3618,18 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "f0b21006cd1874ae9e650973c565615676dc4a274c965bb0a73796dac838ce4f" [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] @@ -3510,15 +3660,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -3563,12 +3713,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.7.3" @@ -3587,9 +3731,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -3629,7 +3773,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -3646,11 +3790,11 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -3665,13 +3809,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3711,11 +3856,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -3729,22 +3873,11 @@ dependencies = [ [[package]] name = "nix" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", -] - -[[package]] -name = "nix" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cfg-if", "cfg_aliases", "libc", @@ -3783,11 +3916,10 @@ checksum = "44a1290799eababa63ea60af0cbc3f03363e328e58f32fb0294798ed3e85f444" [[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", ] @@ -3817,19 +3949,18 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[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.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -3838,9 +3969,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -3852,7 +3983,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] @@ -3910,24 +4041,24 @@ dependencies = [ [[package]] name = "object" -version = "0.36.1" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "opaque-debug" @@ -3937,11 +4068,11 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -3958,7 +4089,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -3969,18 +4100,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.2.3+3.2.1" +version = "300.3.2+3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" +checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -3999,6 +4130,17 @@ dependencies = [ "hashbrown 0.13.2", ] +[[package]] +name = "os_info" +version = "3.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" +dependencies = [ + "log", + "serde", + "windows-sys 0.52.0", +] + [[package]] name = "parking" version = "2.2.1" @@ -4018,12 +4160,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.10", ] [[package]] @@ -4042,25 +4184,25 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "backtrace", "cfg-if", "libc", "petgraph", - "redox_syscall 0.4.1", + "redox_syscall 0.5.7", "smallvec", "thread-id", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] name = "parse-zoneinfo" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" +checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" dependencies = [ "regex", ] @@ -4100,9 +4242,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.8" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", "thiserror", @@ -4111,9 +4253,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.8" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d24f72393fd16ab6ac5738bc33cdb6a9aa73f8b902e8fe29cf4e67d7dd1026" +checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" dependencies = [ "pest", "pest_generator", @@ -4121,22 +4263,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.8" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc17e2a6c7d0a492f0158d7a4bd66cc17280308bbaff78d5bef566dca35ab80" +checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] name = "pest_meta" -version = "2.7.8" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934cd7631c050f4674352a6e835d5f6711ffbfb9345c2fc0107155ac495ae293" +checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" dependencies = [ "once_cell", "pest", @@ -4145,12 +4287,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.2.5", + "indexmap 2.6.0", ] [[package]] @@ -4231,29 +4373,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -4284,9 +4426,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plain" @@ -4296,9 +4438,9 @@ checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -4309,15 +4451,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", ] @@ -4341,28 +4483,31 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[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", + "yansi 1.0.1", ] [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -4391,24 +4536,24 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" 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", "fnv", "lazy_static", "memchr", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "protobuf", "thiserror", ] @@ -4427,19 +4572,19 @@ dependencies = [ [[package]] name = "proptest" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.4.2", + "bitflags 2.6.0", "lazy_static", "num-traits", "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift", - "regex-syntax 0.8.2", + "regex-syntax 0.8.5", "rusty-fork", "tempfile", "unarray", @@ -4447,9 +4592,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f5d036824e4761737860779c906171497f6d55681139d8312388f8fe398922" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", "prost-derive", @@ -4457,22 +4602,22 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19de2de2a00075bf566bee3bd4db014b11587e84184d3f7a791bc17f1a8e9e48" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] name = "prost-types" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3235c33eb02c1f1e212abdbe34c78b264b038fb58ca612664343271e36e55ffe" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ "prost", ] @@ -4501,9 +4646,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -4568,7 +4713,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", ] [[package]] @@ -4610,9 +4755,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -4639,34 +4784,34 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "reflink-copy" -version = "0.1.15" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52b1349400e2ffd64a9fb5ed9008e33c0b8ef86bd5bae8f73080839c7082f1d5" +checksum = "dc31414597d1cd7fdd2422798b7652a6329dda0fe0219e6335a13d5bcaa9aeb6" dependencies = [ "cfg-if", "rustix", - "windows", + "windows 0.58.0", ] [[package]] name = "regex" -version = "1.10.5" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -4680,13 +4825,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.5", ] [[package]] @@ -4697,26 +4842,30 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[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 = "reqwest" -version = "0.11.20" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bytes", "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.5.0", + "hyper-rustls", "hyper-tls", + "hyper-util", "ipnet", "js-sys", "log", @@ -4725,9 +4874,12 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper 1.0.1", + "system-configuration", "tokio", "tokio-native-tls", "tower-service", @@ -4735,7 +4887,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg 0.50.0", + "windows-registry", ] [[package]] @@ -4744,7 +4896,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" dependencies = [ - "hostname", + "hostname 0.3.1", "quick-error", ] @@ -4755,7 +4907,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61797318be89b1a268a018a92a7657096d83f3ecb31418b9e9c16dcbb043b702" dependencies = [ "ahash 0.8.11", - "bitflags 2.4.2", + "bitflags 2.6.0", "instant", "num-traits", "once_cell", @@ -4773,21 +4925,22 @@ checksum = "a5a11a05ee1ce44058fa3d5961d05194fdbe3ad6b40f904af764d81b86450e6b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "getrandom 0.2.12", + "cfg-if", + "getrandom 0.2.15", "libc", "spin", "untrusted", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4834,20 +4987,20 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[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.31" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -4856,9 +5009,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" dependencies = [ "once_cell", "ring", @@ -4870,19 +5023,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -4897,9 +5049,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "rusty-fork" @@ -4915,9 +5067,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -4930,11 +5082,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4965,29 +5117,29 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.29.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0cc0f1cf93f4969faf3ea1c7d8a9faed25918d96affa959720823dfe86d4f3" +checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1433bd67156263443f14d603720b082dd3121779323fce20cba2aa07b874bc1b" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" dependencies = [ "cc", ] [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -4996,9 +5148,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -5012,40 +5164,45 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "sentry" -version = "0.26.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904eca4fb30c6112a1dae60c0a9e29cfb42f42129da4260f1ee20e94151b62e3" +checksum = "5484316556650182f03b43d4c746ce0e3e48074a21e2f51244b648b6542e1066" dependencies = [ "httpdate", + "native-tls", "reqwest", "sentry-backtrace", "sentry-contexts", "sentry-core", + "sentry-debug-images", "sentry-log", "sentry-panic", + "sentry-tracing", "tokio", + "ureq", ] [[package]] name = "sentry-backtrace" -version = "0.26.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1671189d1b759879fa4bdde46c50a499abb14332ed81f84fc6f60658f41b2fdb" +checksum = "40aa225bb41e2ec9d7c90886834367f560efc1af028f1c5478a6cce6a59c463a" dependencies = [ "backtrace", - "lazy_static", + "once_cell", "regex", "sentry-core", ] [[package]] name = "sentry-contexts" -version = "0.26.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db80ceff16bb1a4b2689b8758e5e61e405fc4d8ff9f2d1b5b845b76ce37fa34e" +checksum = "1a8dd746da3d16cb8c39751619cefd4fcdbd6df9610f3310fd646b55f6e39910" dependencies = [ - "hostname", + "hostname 0.4.0", "libc", + "os_info", "rustc_version", "sentry-core", "uname", @@ -5053,22 +5210,33 @@ dependencies = [ [[package]] name = "sentry-core" -version = "0.26.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c9f509d3959ed4dbbd80ca42572caad682aaa1cdd92c719e0815d0e87f82c96" +checksum = "161283cfe8e99c8f6f236a402b9ccf726b201f365988b5bb637ebca0abbd4a30" dependencies = [ - "lazy_static", + "once_cell", "rand 0.8.5", "sentry-types", "serde", "serde_json", ] +[[package]] +name = "sentry-debug-images" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc6b25e945fcaa5e97c43faee0267eebda9f18d4b09a251775d8fef1086238a" +dependencies = [ + "findshlibs", + "once_cell", + "sentry-core", +] + [[package]] name = "sentry-log" -version = "0.26.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e00357035f6af5404870048167affaa551e15e0bee6efa2157e4b9bec6a453" +checksum = "75bbcc61886955045a1dd4bdb173412a80bb2571be3c5bfcf7eb8f55a442bbf5" dependencies = [ "log", "sentry-core", @@ -5076,23 +5244,35 @@ dependencies = [ [[package]] name = "sentry-panic" -version = "0.26.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b442769cc34115f64393f7bfe4f863c3c38749e0c0b9613a7ae25b37c7ba53" +checksum = "bc74f229c7186dd971a9491ffcbe7883544aa064d1589bd30b83fb856cd22d63" dependencies = [ "sentry-backtrace", "sentry-core", ] +[[package]] +name = "sentry-tracing" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3c5faf2103cd01eeda779ea439b68c4ee15adcdb16600836e97feafab362ec" +dependencies = [ + "sentry-backtrace", + "sentry-core", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "sentry-types" -version = "0.26.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "254b600e93e9ef00a48382c9f1e86d27884bd9a5489efa4eb9210c20c72e88a6" +checksum = "5d68cdf6bc41b8ff3ae2a9c4671e97426dcdd154cc1d4b6b72813f285d6b163f" dependencies = [ "debugid", - "getrandom 0.2.12", "hex", + "rand 0.8.5", "serde", "serde_json", "thiserror", @@ -5118,7 +5298,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -5134,11 +5314,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -5224,9 +5405,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -5274,9 +5455,9 @@ dependencies = [ [[package]] name = "slug" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd94acec9c8da640005f8e135a39fc0372e74535e6b368b7a04b875f784c8c4" +checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" dependencies = [ "deunicode", "wasm-bindgen", @@ -5284,9 +5465,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" dependencies = [ "serde", ] @@ -5308,17 +5489,6 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if", - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.5.7" @@ -5360,11 +5530,10 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" dependencies = [ - "itertools 0.12.1", "nom", "unicode_categories", ] @@ -5403,7 +5572,7 @@ dependencies = [ "hashbrown 0.14.5", "hashlink", "hex", - "indexmap 2.2.5", + "indexmap 2.6.0", "log", "memchr", "once_cell", @@ -5434,7 +5603,7 @@ dependencies = [ "quote", "sqlx-core", "sqlx-macros-core", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -5445,7 +5614,7 @@ checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" dependencies = [ "dotenvy", "either", - "heck 0.5.0", + "heck", "hex", "once_cell", "proc-macro2", @@ -5457,7 +5626,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.52", + "syn 2.0.79", "tempfile", "tokio", "url", @@ -5471,7 +5640,7 @@ checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a" dependencies = [ "atoi", "base64 0.22.1", - "bitflags 2.4.2", + "bitflags 2.6.0", "byteorder", "bytes", "crc", @@ -5513,7 +5682,7 @@ checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" dependencies = [ "atoi", "base64 0.22.1", - "bitflags 2.4.2", + "bitflags 2.6.0", "byteorder", "crc", "dotenvy", @@ -5591,13 +5760,13 @@ 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]] @@ -5606,11 +5775,17 @@ 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 = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -5625,9 +5800,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -5640,16 +5815,47 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tempfile" -version = "3.10.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5668,9 +5874,9 @@ dependencies = [ "molecule", "nohash-hasher", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "rand 0.8.5", - "socket2 0.5.7", + "socket2", "tentacle-multiaddr", "tentacle-secio", "thiserror", @@ -5688,7 +5894,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9e71b28bf0bbf274b92f47cb2c5b42755d84a11e2246cf7bcb7b65c89483b9" dependencies = [ - "bs58 0.5.1", + "bs58", "bytes", "serde", "sha2", @@ -5701,11 +5907,11 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cac8b23a7879426a4961acea6ae66287f7fe9a934d131a722cbb88f145e97fea" dependencies = [ - "bs58 0.5.1", + "bs58", "bytes", "chacha20poly1305", "futures", - "getrandom 0.2.12", + "getrandom 0.2.15", "hmac", "log", "molecule", @@ -5724,9 +5930,9 @@ dependencies = [ [[package]] name = "tera" -version = "1.19.1" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970dff17c11e884a4a09bc76e3a17ef71e01bb13447a11e85226e254fe6d10b8" +checksum = "ab9d851b45e865f178319da0abdbfe6acbc4328759ff18dafc3a41c16b4cd2ee" dependencies = [ "chrono", "chrono-tz", @@ -5771,29 +5977,29 @@ checksum = "a38c90d48152c236a3ab59271da4f4ae63d678c5d7ad6b7714d7cb9760be5e4b" [[package]] name = "thiserror" -version = "1.0.62" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.62" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] name = "thread-id" -version = "4.2.1" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ec81c46e9eb50deaa257be2f148adf052d1fb7701cfd55ccfab2525280b70b" +checksum = "cfe8f25bbdd100db7e1d34acf7fd2dc59c4bf8f7483f505eaa7d4f12f76cc0ea" dependencies = [ "libc", "winapi", @@ -5892,9 +6098,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -5907,22 +6113,21 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.7", + "socket2", "tokio-macros", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -5937,13 +6142,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -5956,11 +6161,22 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -6026,10 +6242,10 @@ dependencies = [ "axum", "base64 0.21.7", "bytes", - "h2", - "http", - "http-body", - "hyper", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.31", "hyper-timeout", "percent-encoding", "pin-project", @@ -6072,8 +6288,8 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "http-range-header", "pin-project-lite", "tokio", @@ -6083,15 +6299,15 @@ 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" @@ -6113,7 +6329,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[package]] @@ -6143,9 +6359,9 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.20.4" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca94d4e9feb6a181c690c4040d7a24ef34018d8313ac5044a61d21222ae24e31" +checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374" dependencies = [ "async-trait", "cfg-if", @@ -6154,35 +6370,36 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "idna 0.2.3", + "idna 0.4.0", "ipnet", - "lazy_static", - "log", + "once_cell", "rand 0.8.5", "smallvec", "thiserror", "tinyvec", "tokio", + "tracing", "url", ] [[package]] name = "trust-dns-resolver" -version = "0.20.4" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecae383baad9995efaa34ce8e57d12c3f305e545887472a492b838f4b5cfb77a" +checksum = "10a3e6c3aff1718b3c73e395d1f35202ba2ffa847c6a62eea0db8fb4cfe30be6" dependencies = [ "cfg-if", "futures-util", "ipconfig", - "lazy_static", - "log", "lru-cache", - "parking_lot 0.11.2", + "once_cell", + "parking_lot 0.12.3", + "rand 0.8.5", "resolv-conf", "smallvec", "thiserror", "tokio", + "tracing", "trust-dns-proto", ] @@ -6201,7 +6418,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 0.2.12", "httparse", "log", "rand 0.8.5", @@ -6228,9 +6445,9 @@ dependencies = [ [[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 = "uname" @@ -6299,36 +6516,48 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +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.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +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-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unicode_categories" @@ -6358,6 +6587,19 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "ureq" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" +dependencies = [ + "base64 0.22.1", + "log", + "native-tls", + "once_cell", + "url", +] + [[package]] name = "url" version = "2.5.2" @@ -6378,17 +6620,17 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[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" -version = "1.7.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "serde", ] @@ -6406,9 +6648,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[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 = "wait-timeout" @@ -6458,34 +6700,35 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -6495,9 +6738,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6505,28 +6748,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -6565,19 +6808,19 @@ dependencies = [ [[package]] name = "whoami" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.4.1", + "redox_syscall 0.5.7", "wasite", ] [[package]] name = "widestring" -version = "0.4.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] name = "wildmatch" @@ -6603,11 +6846,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]] @@ -6618,12 +6861,22 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.54.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-core 0.54.0", - "windows-targets 0.52.4", + "windows-core 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets 0.52.6", ] [[package]] @@ -6632,26 +6885,72 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.54.0" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ "windows-result", - "windows-targets 0.52.4", + "windows-strings", + "windows-targets 0.52.6", ] [[package]] name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd19df78e5168dfb0aedc343d1d1b8d422ab2db6756d2dc3fef75035402a3f64" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-targets 0.52.4", + "windows-result", + "windows-targets 0.52.6", ] [[package]] @@ -6669,7 +6968,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "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]] @@ -6689,17 +6997,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "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]] @@ -6710,9 +7019,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -6722,9 +7031,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -6734,9 +7043,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +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" @@ -6746,9 +7061,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -6758,9 +7073,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -6770,9 +7085,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -6782,18 +7097,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" - -[[package]] -name = "winreg" -version = "0.6.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -dependencies = [ - "winapi", -] +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winreg" @@ -6819,9 +7125,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.19" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" +checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" [[package]] name = "xmltree" @@ -6834,9 +7140,9 @@ dependencies = [ [[package]] name = "xxhash-rust" -version = "0.8.10" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" +checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" [[package]] name = "yansi" @@ -6844,31 +7150,38 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] [[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", ] @@ -6881,5 +7194,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.79", ] diff --git a/Cargo.toml b/Cargo.toml index b6a8d3edb6..21c7230495 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ build = "build.rs" description = "CKB is the layer 1 of Nervos Network, a public/permissionless blockchain." homepage = "https://github.com/nervosnetwork/ckb" repository = "https://github.com/nervosnetwork/ckb" -rust-version = "1.75.0" +rust-version = "1.81.0" [build-dependencies] ckb-build-info = { path = "util/build-info", version = "= 0.119.0-pre" } diff --git a/benches/Cargo.toml b/benches/Cargo.toml index 91858206ef..c5f5037f95 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -24,7 +24,6 @@ ckb-test-chain-utils = { path = "../util/test-chain-utils", version = "= 0.119.0 ckb-dao-utils = { path = "../util/dao/utils", version = "= 0.119.0-pre" } ckb-dao = { path = "../util/dao", version = "= 0.119.0-pre" } ckb-system-scripts = { version = "= 0.5.4" } -lazy_static = "1.3.0" ckb-crypto = { path = "../util/crypto", version = "= 0.119.0-pre" } ckb-jsonrpc-types = { path = "../util/jsonrpc-types", version = "= 0.119.0-pre" } ckb-verification = { path = "../verification", version = "= 0.119.0-pre" } diff --git a/benches/benches/benchmarks/util.rs b/benches/benches/benchmarks/util.rs index a9f64d0a50..e64401c975 100644 --- a/benches/benches/benchmarks/util.rs +++ b/benches/benches/benchmarks/util.rs @@ -23,7 +23,6 @@ use ckb_types::{ utilities::difficulty_to_compact, H160, H256, U256, }; -use lazy_static::lazy_static; use rand::random; use std::collections::HashSet; @@ -200,19 +199,19 @@ pub fn gen_always_success_block( const PRIVKEY: H256 = h256!("0xb2b3324cece882bca684eaf202667bb56ed8e8c2fd4b4dc71f615ebd6d9055a5"); const PUBKEY_HASH: H160 = h160!("0x779e5930892a0a9bf2fedfe048f685466c7d0396"); -lazy_static! { - static ref SECP_DATA_CELL: (CellOutput, Bytes) = { - let raw_data = BUNDLED_CELL - .get("specs/cells/secp256k1_data") - .expect("load secp256k1_blake160_sighash_all"); - let data: Bytes = raw_data.to_vec().into(); +static SECP_DATA_CELL: std::sync::LazyLock<(CellOutput, Bytes)> = std::sync::LazyLock::new(|| { + let raw_data = BUNDLED_CELL + .get("specs/cells/secp256k1_data") + .expect("load secp256k1_blake160_sighash_all"); + let data: Bytes = raw_data.to_vec().into(); - let cell = CellOutput::new_builder() - .capacity(Capacity::bytes(data.len()).unwrap().pack()) - .build(); - (cell, data) - }; - static ref SECP_CELL: (CellOutput, Bytes, Script) = { + let cell = CellOutput::new_builder() + .capacity(Capacity::bytes(data.len()).unwrap().pack()) + .build(); + (cell, data) +}); +static SECP_CELL: std::sync::LazyLock<(CellOutput, Bytes, Script)> = + std::sync::LazyLock::new(|| { let raw_data = BUNDLED_CELL .get("specs/cells/secp256k1_blake160_sighash_all") .expect("load secp256k1_blake160_sighash_all"); @@ -229,8 +228,7 @@ lazy_static! { .build(); (cell, data, script) - }; -} + }); pub fn secp_cell() -> &'static (CellOutput, Bytes, Script) { &SECP_CELL diff --git a/chain/Cargo.toml b/chain/Cargo.toml index ba04ed20b3..3218f54327 100644 --- a/chain/Cargo.toml +++ b/chain/Cargo.toml @@ -41,12 +41,15 @@ dashmap = "4.0" ckb-test-chain-utils = { path = "../util/test-chain-utils", version = "= 0.119.0-pre" } ckb-dao-utils = { path = "../util/dao/utils", version = "= 0.119.0-pre" } ckb-reward-calculator = { path = "../util/reward-calculator", version = "= 0.119.0-pre" } -ckb-tx-pool = { path = "../tx-pool", version = "= 0.119.0-pre", features = ["internal"] } +ckb-tx-pool = { path = "../tx-pool", version = "= 0.119.0-pre", features = [ + "internal", +] } ckb-jsonrpc-types = { path = "../util/jsonrpc-types", version = "= 0.119.0-pre" } ckb-network = { path = "../network", version = "= 0.119.0-pre" } -lazy_static = "1.4" tempfile.workspace = true -ckb-systemtime = { path = "../util/systemtime", version = "= 0.119.0-pre" ,features = ["enable_faketime"]} +ckb-systemtime = { path = "../util/systemtime", version = "= 0.119.0-pre", features = [ + "enable_faketime", +] } ckb-logger-service = { path = "../util/logger-service", version = "= 0.119.0-pre" } [features] diff --git a/chain/src/tests/block_assembler.rs b/chain/src/tests/block_assembler.rs index caf0eb84ca..6e8a71e516 100644 --- a/chain/src/tests/block_assembler.rs +++ b/chain/src/tests/block_assembler.rs @@ -19,7 +19,6 @@ use ckb_types::{ }; use ckb_verification::{BlockVerifier, HeaderVerifier}; use ckb_verification_traits::{Switch, Verifier}; -use lazy_static::lazy_static; use std::sync::Arc; fn start_chain(consensus: Option) -> (ChainController, Shared) { @@ -57,20 +56,6 @@ fn start_chain(consensus: Option) -> (ChainController, Shared) { (chain_controller, shared) } -lazy_static! { - static ref BASIC_BLOCK_SIZE: u64 = { - let (_chain_controller, shared) = start_chain(None); - - let block_template = shared - .get_block_template(None, None, None) - .unwrap() - .unwrap(); - - let block: Block = block_template.into(); - block.serialized_size_without_uncle_proposals() as u64 - }; -} - #[test] fn test_get_block_template() { let (_chain_controller, shared) = start_chain(None); diff --git a/ckb-bin/Cargo.toml b/ckb-bin/Cargo.toml index c6be0d57c7..3e2fdcaa40 100644 --- a/ckb-bin/Cargo.toml +++ b/ckb-bin/Cargo.toml @@ -44,7 +44,7 @@ ckb-constant = { path = "../util/constant", version = "= 0.119.0-pre" } base64 = "0.21.0" tempfile.workspace = true rayon = "1.0" -sentry = { version = "0.26.0", optional = true } +sentry = { version = "0.34.0", optional = true } is-terminal = "0.4.7" fdlimit = "0.2.1" ckb-stop-handler = { path = "../util/stop-handler", version = "= 0.119.0-pre" } @@ -52,7 +52,7 @@ tokio = { version = "1", features = ["sync"] } [target.'cfg(not(target_os="windows"))'.dependencies] daemonize = { version = "0.5.0" } -nix = { version = "0.24.0", default-features = false, features = ["signal"] } +nix = { version = "0.29.0", default-features = false, features = ["signal"] } colored = "2.0" [features] diff --git a/ckb-bin/src/lib.rs b/ckb-bin/src/lib.rs index cb62c8613b..4c5cd5e126 100644 --- a/ckb-bin/src/lib.rs +++ b/ckb-bin/src/lib.rs @@ -36,7 +36,7 @@ pub(crate) const LOG_TARGET_SENTRY: &str = "sentry"; /// ## Parameters /// /// * `version` - The version is passed in so the bin crate can collect the version without trigger -/// re-linking. +/// re-linking. pub fn run_app(version: Version) -> Result<(), ExitCode> { // Always print backtrace on panic. ::std::env::set_var("RUST_BACKTRACE", "full"); diff --git a/db-migration/Cargo.toml b/db-migration/Cargo.toml index 9e2d55a08d..facbfa1997 100644 --- a/db-migration/Cargo.toml +++ b/db-migration/Cargo.toml @@ -17,7 +17,6 @@ ckb-error = { path = "../error", version = "= 0.119.0-pre" } ckb-db-schema = { path = "../db-schema", version = "= 0.119.0-pre" } ckb-channel = { path = "../util/channel", version = "= 0.119.0-pre" } ckb-stop-handler = { path = "../util/stop-handler", version = "= 0.119.0-pre" } -once_cell = "1.8.0" indicatif = "0.16" console = ">=0.9.1, <1.0.0" diff --git a/db-migration/src/lib.rs b/db-migration/src/lib.rs index fa2ba321dc..d3aa913325 100644 --- a/db-migration/src/lib.rs +++ b/db-migration/src/lib.rs @@ -9,17 +9,17 @@ use ckb_logger::{debug, error, info}; use ckb_stop_handler::register_thread; use console::Term; pub use indicatif::{HumanDuration, MultiProgress, ProgressBar, ProgressDrawTarget, ProgressStyle}; -use once_cell::sync::OnceCell; use std::cmp::Ordering; use std::collections::BTreeMap; use std::collections::VecDeque; use std::sync::Arc; use std::sync::Mutex; +use std::sync::OnceLock; use std::thread; use std::thread::JoinHandle; /// Shutdown flag for background migration. -pub static SHUTDOWN_BACKGROUND_MIGRATION: OnceCell = OnceCell::new(); +pub static SHUTDOWN_BACKGROUND_MIGRATION: OnceLock = OnceLock::new(); #[cfg(test)] mod tests; diff --git a/docker/hub/Dockerfile b/docker/hub/Dockerfile index 3058b634c8..155c4c6343 100644 --- a/docker/hub/Dockerfile +++ b/docker/hub/Dockerfile @@ -1,4 +1,4 @@ -FROM nervos/ckb-docker-builder:bionic-rust-1.75.0 as ckb-docker-builder +FROM nervos/ckb-docker-builder:bionic-rust-1.81.0 as ckb-docker-builder WORKDIR /ckb COPY ./ . diff --git a/docker/hub/Dockerfile-aarch64 b/docker/hub/Dockerfile-aarch64 index 58a65ee0e7..94d8172bc7 100644 --- a/docker/hub/Dockerfile-aarch64 +++ b/docker/hub/Dockerfile-aarch64 @@ -1,4 +1,4 @@ -FROM nervos/ckb-docker-builder:aarch64-rust-1.75.0 as ckb-docker-builder +FROM nervos/ckb-docker-builder:aarch64-rust-1.81.0 as ckb-docker-builder WORKDIR /ckb COPY ./ . diff --git a/error/Cargo.toml b/error/Cargo.toml index b9b90d8faa..03fb94d9a7 100644 --- a/error/Cargo.toml +++ b/error/Cargo.toml @@ -12,4 +12,6 @@ repository = "https://github.com/nervosnetwork/ckb" thiserror = "1.0.22" anyhow = "1.0.34" ckb-occupied-capacity = { path = "../util/occupied-capacity", version = "= 0.119.0-pre" } -derive_more = { version = "0.99.0", default-features = false, features = ["display"] } +derive_more = { version = "1", default-features = false, features = [ + "display", +] } diff --git a/error/src/lib.rs b/error/src/lib.rs index 2c2dfa575e..528c1ad513 100644 --- a/error/src/lib.rs +++ b/error/src/lib.rs @@ -89,7 +89,7 @@ impl fmt::Display for AnyError { impl fmt::Debug for AnyError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - self.0.fmt(f) + derive_more::Display::fmt(self, f) } } /// Return whether the error's kind is `InternalErrorKind::Database` diff --git a/freezer/src/freezer.rs b/freezer/src/freezer.rs index 6812e7620a..c45dadc592 100644 --- a/freezer/src/freezer.rs +++ b/freezer/src/freezer.rs @@ -43,6 +43,7 @@ impl Freezer { let lock = OpenOptions::new() .write(true) .create(true) + .truncate(false) .open(lock_path) .map_err(internal_error)?; lock.try_lock_exclusive().map_err(internal_error)?; diff --git a/freezer/src/freezer_files.rs b/freezer/src/freezer_files.rs index 03325d84f1..5b4845721e 100644 --- a/freezer/src/freezer_files.rs +++ b/freezer/src/freezer_files.rs @@ -496,6 +496,7 @@ impl FreezerFilesBuilder { fn open_append>(&self, path: P) -> Result<(File, u64), IoError> { let mut file = fs::OpenOptions::new() .create(true) + .truncate(false) .read(true) .write(true) .open(path)?; diff --git a/miner/Cargo.toml b/miner/Cargo.toml index 29e4fcbc77..dda397ed0b 100644 --- a/miner/Cargo.toml +++ b/miner/Cargo.toml @@ -20,8 +20,14 @@ rand_distr = "0.4" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" ckb-jsonrpc-types = { path = "../util/jsonrpc-types", version = "= 0.119.0-pre" } -hyper = { version = "0.14", features = ["client", "http2", "http1", "server"] } -hyper-tls = "0.5" +hyper = { version = "1", features = ["client", "http2", "http1", "server"] } +hyper-util = { version = "0.1", features = [ + "server-auto", + "server-graceful", + "client-legacy", +] } +http-body-util = "0.1" +hyper-tls = "0.6" futures = "0.3" lru = "0.7.1" ckb-stop-handler = { path = "../util/stop-handler", version = "= 0.119.0-pre" } diff --git a/miner/src/client.rs b/miner/src/client.rs index 1cea7e2ae0..e5f53360aa 100644 --- a/miner/src/client.rs +++ b/miner/src/client.rs @@ -11,11 +11,17 @@ use ckb_types::{ H256, }; use futures::prelude::*; +use http_body_util::{BodyExt, Empty, Full}; use hyper::{ - body::{to_bytes, Buf, Bytes}, + body::{Buf, Bytes}, header::{HeaderValue, CONTENT_TYPE}, - service::{make_service_fn, service_fn}, - Body, Client as HttpClient, Error as HyperError, Method, Request, Response, Server, Uri, + service::service_fn, + Error as HyperError, Request, Response, Uri, +}; +use hyper_util::{ + client::legacy::{Client as HttpClient, Error as ClientError}, + rt::TokioExecutor, + server::{conn::auto, graceful::GracefulShutdown}, }; use jsonrpc_core::{ error::Error as RpcFail, error::ErrorCode as RpcFailCode, id::Id, params::Params, @@ -23,18 +29,21 @@ use jsonrpc_core::{ }; use serde_json::error::Error as JsonError; use serde_json::{self, json, Value}; -use std::convert::Infallible; use std::net::SocketAddr; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::Arc; use std::{convert::Into, time}; -use tokio::sync::{mpsc, oneshot}; +use tokio::{ + net::TcpListener, + sync::{mpsc, oneshot}, +}; type RpcRequest = (oneshot::Sender>, MethodCall); #[derive(Debug)] pub enum RpcError { Http(HyperError), + Client(ClientError), Canceled, //oneshot canceled Json(JsonError), Fail(RpcFail), @@ -53,7 +62,7 @@ impl Rpc { let stop_rx: CancellationToken = new_tokio_exit_rx(); let https = hyper_tls::HttpsConnector::new(); - let client = HttpClient::builder().build(https); + let client = HttpClient::builder(TokioExecutor::new()).build::<_, Full>(https); let loop_handle = handle.clone(); handle.spawn(async move { loop { @@ -62,15 +71,14 @@ impl Rpc { let (sender, call): RpcRequest = item; let req_url = url.clone(); let request_json = serde_json::to_vec(&call).expect("valid rpc call"); - let mut req = Request::new(Body::from(request_json)); - *req.method_mut() = Method::POST; - *req.uri_mut() = req_url; - req.headers_mut() - .insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); + + let mut req = Request::builder().uri(req_url).method("POST").header(CONTENT_TYPE, "application/json"); + if let Some(value) = parse_authorization(&url) { - req.headers_mut() - .append(hyper::header::AUTHORIZATION, value); + req = req + .header(hyper::header::AUTHORIZATION, value); } + let req = req.body(Full::new(Bytes::from(request_json))).unwrap(); let client = client.clone(); loop_handle.spawn(async move { let request = match client @@ -78,8 +86,8 @@ impl Rpc { .await .map(|res|res.into_body()) { - Ok(body) => to_bytes(body).await.map_err(RpcError::Http), - Err(err) => Err(RpcError::Http(err)), + Ok(body) => BodyExt::collect(body).await.map_err(RpcError::Http).map(|t| t.to_bytes()), + Err(err) => Err(RpcError::Client(err)), }; if sender.send(request).is_err() { error!("rpc response send back error") @@ -224,23 +232,42 @@ Otherwise ckb-miner will malfunction and stop submitting valid blocks after a ce } async fn listen_block_template_notify(&self, addr: SocketAddr) { - let client = self.clone(); - let make_service = make_service_fn(move |_conn| { - let client = client.clone(); - let service = service_fn(move |req| handle(client.clone(), req)); - async move { Ok::<_, Infallible>(service) } - }); - - let server = Server::bind(&addr).serve(make_service); + let listener = TcpListener::bind(addr).await.unwrap(); + let server = auto::Builder::new(TokioExecutor::new()); + let graceful = GracefulShutdown::new(); let stop_rx: CancellationToken = new_tokio_exit_rx(); - let graceful = server.with_graceful_shutdown(async move { - stop_rx.cancelled().await; - info!("Miner client received exit signal. Exit now"); - }); - if let Err(e) = graceful.await { - error!("server error: {}", e); + loop { + let client = self.clone(); + let handle = service_fn(move |req| handle(client.clone(), req)); + tokio::select! { + conn = listener.accept() => { + let (stream, _) = match conn { + Ok(conn) => conn, + Err(e) => { + info!("accept error: {}", e); + tokio::time::sleep(std::time::Duration::from_secs(1)).await; + continue; + } + }; + let stream = hyper_util::rt::TokioIo::new(Box::pin(stream)); + let conn = server.serve_connection_with_upgrades(stream, handle); + + let conn = graceful.watch(conn.into_owned()); + tokio::spawn(async move { + if let Err(err) = conn.await { + info!("connection error: {}", err); + } + }); + }, + _ = stop_rx.cancelled() => { + info!("Miner client received exit signal. Exit now"); + break; + } + } } + drop(listener); + graceful.shutdown().await; } async fn poll_block_template(&self) { @@ -327,14 +354,17 @@ Otherwise ckb-miner will malfunction and stop submitting valid blocks after a ce type Error = Box; -async fn handle(client: Client, req: Request) -> Result, Error> { - let body = hyper::body::aggregate(req).await?; +async fn handle( + client: Client, + req: Request, +) -> Result>, Error> { + let body = BodyExt::collect(req).await?.aggregate(); if let Ok(template) = serde_json::from_reader(body.reader()) { client.update_block_template(template); } - Ok(Response::new(Body::empty())) + Ok(Response::new(Empty::new())) } async fn parse_response(output: Output) -> Result { diff --git a/miner/src/worker/mod.rs b/miner/src/worker/mod.rs index 86d5e028d6..ac27e72519 100644 --- a/miner/src/worker/mod.rs +++ b/miner/src/worker/mod.rs @@ -45,11 +45,11 @@ impl WorkerController { } fn partition_nonce(id: u128, total: u128) -> Range { - let span = u128::max_value() / total; + let span = u128::MAX / total; let start = span * id; let end = match id { x if x < total - 1 => start + span, - x if x == total - 1 => u128::max_value(), + x if x == total - 1 => u128::MAX, _ => unreachable!(), }; Range { start, end } diff --git a/network/Cargo.toml b/network/Cargo.toml index 8818bd3fd2..90cf548193 100644 --- a/network/Cargo.toml +++ b/network/Cargo.toml @@ -21,16 +21,15 @@ tokio = { version = "1", features = ["sync", "macros"] } tokio-util = { version = "0.7", features = ["codec"] } futures = "0.3" ckb-systemtime = { path = "../util/systemtime", version = "= 0.119.0-pre" } -lazy_static = { version = "1.3.0", optional = true } -bs58 = { version = "0.4.0", optional = true } -sentry = { version = "0.26.0", optional = true } +bs58 = { version = "0.5.0", optional = true } +sentry = { version = "0.34.0", optional = true } faster-hex = { version = "0.6", optional = true } ckb-hash = { path = "../util/hash", version = "= 0.119.0-pre" } secp256k1 = { version = "0.29", features = ["recovery"], optional = true } -trust-dns-resolver = { version = "0.20", optional = true } +trust-dns-resolver = { version = "0.23", optional = true } snap = "1" ckb-types = { path = "../util/types", version = "= 0.119.0-pre" } -ipnetwork = "0.18" +ipnetwork = "0.20" serde_json = "1.0" bloom-filters = "0.1" ckb-spawn = { path = "../util/spawn", version = "= 0.119.0-pre" } @@ -45,13 +44,7 @@ p2p = { version = "0.6.1", package = "tentacle", features = [ [features] with_sentry = ["sentry"] -with_dns_seeding = [ - "lazy_static", - "bs58", - "faster-hex", - "trust-dns-resolver", - "secp256k1", -] +with_dns_seeding = ["bs58", "faster-hex", "trust-dns-resolver", "secp256k1"] fuzz = [] [dev-dependencies] @@ -59,7 +52,6 @@ tempfile.workspace = true criterion = "0.5" proptest = "1.0" num_cpus = "1.10" -once_cell = "1.8.0" ckb-systemtime = { path = "../util/systemtime", version = "= 0.119.0-pre", features = [ "enable_faketime", ] } diff --git a/network/src/network.rs b/network/src/network.rs index b5814d3482..734c8815ae 100644 --- a/network/src/network.rs +++ b/network/src/network.rs @@ -57,7 +57,6 @@ use std::{ }, thread, time::{Duration, Instant}, - usize, }; use tokio::{self, sync::oneshot}; diff --git a/network/src/peer_registry.rs b/network/src/peer_registry.rs index 8ac8fbb1d0..9f3e55536b 100644 --- a/network/src/peer_registry.rs +++ b/network/src/peer_registry.rs @@ -132,11 +132,11 @@ impl PeerRegistry { let peer1_ping = peer1 .ping_rtt .map(|p| p.as_secs()) - .unwrap_or_else(|| std::u64::MAX); + .unwrap_or_else(|| u64::MAX); let peer2_ping = peer2 .ping_rtt .map(|p| p.as_secs()) - .unwrap_or_else(|| std::u64::MAX); + .unwrap_or_else(|| u64::MAX); peer2_ping.cmp(&peer1_ping) }, ); @@ -150,11 +150,11 @@ impl PeerRegistry { let peer1_last_message = peer1 .last_ping_protocol_message_received_at .map(|t| now.saturating_duration_since(t).as_secs()) - .unwrap_or_else(|| std::u64::MAX); + .unwrap_or_else(|| u64::MAX); let peer2_last_message = peer2 .last_ping_protocol_message_received_at .map(|t| now.saturating_duration_since(t).as_secs()) - .unwrap_or_else(|| std::u64::MAX); + .unwrap_or_else(|| u64::MAX); peer2_last_message.cmp(&peer1_last_message) }, ); diff --git a/network/src/peer_store/peer_store_db.rs b/network/src/peer_store/peer_store_db.rs index a3e71d44ce..efbd195db2 100644 --- a/network/src/peer_store/peer_store_db.rs +++ b/network/src/peer_store/peer_store_db.rs @@ -120,6 +120,7 @@ impl PeerStore { OpenOptions::new() .write(true) .create(true) + .truncate(true) .append(false) .open(&tmp_addr_manager)?, )?; @@ -131,6 +132,7 @@ impl PeerStore { OpenOptions::new() .write(true) .create(true) + .truncate(true) .append(false) .open(&tmp_ban_list)?, )?; diff --git a/network/src/protocols/discovery/addr.rs b/network/src/protocols/discovery/addr.rs index fe81b2ea57..acd0cae369 100644 --- a/network/src/protocols/discovery/addr.rs +++ b/network/src/protocols/discovery/addr.rs @@ -7,6 +7,7 @@ use crate::Flags; pub(crate) const DEFAULT_BUCKETS_NUM: usize = 5000; +#[allow(dead_code)] #[derive(Debug, Clone)] pub enum Misbehavior { // Already received GetNodes message diff --git a/network/src/protocols/identify/mod.rs b/network/src/protocols/identify/mod.rs index 8f2448050d..d2fefde131 100644 --- a/network/src/protocols/identify/mod.rs +++ b/network/src/protocols/identify/mod.rs @@ -31,6 +31,7 @@ const DEFAULT_TIMEOUT: u64 = 8; const MAX_ADDRS: usize = 10; /// The misbehavior to report to underlying peer storage +#[allow(dead_code)] #[derive(Clone, Debug)] pub enum Misbehavior { /// Repeat received message diff --git a/network/src/protocols/tests/mod.rs b/network/src/protocols/tests/mod.rs index 985e5d98d6..663ebf1dad 100644 --- a/network/src/protocols/tests/mod.rs +++ b/network/src/protocols/tests/mod.rs @@ -230,8 +230,7 @@ fn net_service_start( let control = p2p_service.control().clone().into(); let (addr_sender, addr_receiver) = ::std::sync::mpsc::channel(); - static RT: once_cell::sync::OnceCell = - once_cell::sync::OnceCell::new(); + static RT: std::sync::OnceLock = std::sync::OnceLock::new(); let rt = RT.get_or_init(|| { let num_threads = ::std::cmp::max(num_cpus::get(), 4); @@ -285,7 +284,7 @@ fn wait_connect_state(node: &Node, expect_num: usize) { } } -#[allow(clippy::blocks_in_if_conditions)] +#[allow(clippy::blocks_in_conditions)] fn wait_discovery(node: &Node, assert: impl Fn(usize) -> bool) { if !wait_until(100, || { assert( diff --git a/network/src/services/dns_seeding/mod.rs b/network/src/services/dns_seeding/mod.rs index 2b5432cc69..b1adced7c3 100644 --- a/network/src/services/dns_seeding/mod.rs +++ b/network/src/services/dns_seeding/mod.rs @@ -43,6 +43,7 @@ impl DnsSeedingService { } } + #[allow(clippy::const_is_empty)] async fn seeding(&self) -> Result<(), Box> { // TODO: DNS seeding is disabled now, may enable in the future (need discussed) if TXT_VERIFY_PUBKEY.is_empty() { diff --git a/network/src/services/dns_seeding/seed_record.rs b/network/src/services/dns_seeding/seed_record.rs index 80abd6e271..20ec1affcc 100644 --- a/network/src/services/dns_seeding/seed_record.rs +++ b/network/src/services/dns_seeding/seed_record.rs @@ -6,7 +6,6 @@ use std::{ }; use ckb_hash::blake2b_256; -use lazy_static::lazy_static; use p2p::{ multiaddr::{Multiaddr, Protocol}, secio::PeerId, @@ -17,10 +16,9 @@ use secp256k1::{ Message, PublicKey, }; -lazy_static! { - pub(crate) static ref SECP256K1: secp256k1::Secp256k1 = - secp256k1::Secp256k1::new(); -} +pub(crate) static SECP256K1: std::sync::LazyLock> = + std::sync::LazyLock::new(secp256k1::Secp256k1::new); + pub(crate) const SEP: char = ';'; // Format: diff --git a/pow/src/tests.rs b/pow/src/tests.rs index ad4f27ca26..e01a79c0dc 100644 --- a/pow/src/tests.rs +++ b/pow/src/tests.rs @@ -5,7 +5,7 @@ use ckb_types::prelude::*; #[test] fn test_pow_message() { let zero_hash = blake2b_256([]).pack(); - let nonce = u128::max_value(); + let nonce = u128::MAX; let message = pow_message(&zero_hash, nonce); assert_eq!( message.to_vec(), diff --git a/resource/Cargo.toml b/resource/Cargo.toml index ec3b207582..de7f552d7a 100644 --- a/resource/Cargo.toml +++ b/resource/Cargo.toml @@ -26,4 +26,4 @@ ckb-system-scripts = { version = "= 0.5.4" } tempfile.workspace = true [package.metadata.cargo-shear] -ignored = ["phf"] \ No newline at end of file +ignored = ["phf"] diff --git a/resource/src/template.rs b/resource/src/template.rs index 83458206ff..4275b4c3d3 100644 --- a/resource/src/template.rs +++ b/resource/src/template.rs @@ -128,6 +128,7 @@ impl Template { } } +#[allow(unexpected_cfgs)] fn writeln(w: &mut W, s: &str, context: &TemplateContext) -> io::Result<()> { #[cfg(docker)] let s = s.replace("127.0.0.1:{rpc_port}", "0.0.0.0:{rpc_port}"); diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 0249d1e746..7d1675b21e 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -53,7 +53,7 @@ ckb-async-runtime = { path = "../util/runtime", version = "= 0.119.0-pre" } # issue tracking: https://github.com/GREsau/schemars/pull/251 schemars = { version = "0.8.19", package = "ckb_schemars" } [dev-dependencies] -reqwest = { version = "=0.11.20", features = ["blocking", "json"] } +reqwest = { version = "0.12", features = ["blocking", "json"] } serde = { version = "1.0", features = ["derive"] } ckb-shared = { path = "../shared", version = "= 0.119.0-pre" } ckb-test-chain-utils = { path = "../util/test-chain-utils", version = "= 0.119.0-pre" } diff --git a/rpc/src/error.rs b/rpc/src/error.rs index 8f8bd43e99..753f747dbe 100644 --- a/rpc/src/error.rs +++ b/rpc/src/error.rs @@ -25,7 +25,7 @@ use std::fmt::{Debug, Display}; /// /// * -1 ~ -999 are general errors /// * -1000 ~ -2999 are module-specific errors. Each module generally gets 100 reserved error -/// codes. +/// codes. /// /// Unless otherwise noted, all the errors return optional detailed information as `string` in the error /// object `data` field. diff --git a/rpc/src/server.rs b/rpc/src/server.rs index 4835cd6765..9388acc091 100644 --- a/rpc/src/server.rs +++ b/rpc/src/server.rs @@ -62,17 +62,16 @@ impl RpcServer { handler.clone(), false, ) - .map(|local_addr| { + .inspect(|&local_addr| { info!("Listen HTTP RPCServer on address: {}", local_addr); - local_addr }) .unwrap(); let ws_address = if let Some(addr) = config.ws_listen_address { - let local_addr = Self::start_server(&rpc, addr, handler.clone(), true).map(|addr| { - info!("Listen WebSocket RPCServer on address: {}", addr); - addr - }); + let local_addr = + Self::start_server(&rpc, addr, handler.clone(), true).inspect(|&addr| { + info!("Listen WebSocket RPCServer on address: {}", addr); + }); local_addr.ok() } else { None diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7897a24d1a..1de01fa45c 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.75.0" +channel = "1.81.0" diff --git a/script/Cargo.toml b/script/Cargo.toml index 7ba238981b..5c63d38216 100644 --- a/script/Cargo.toml +++ b/script/Cargo.toml @@ -42,3 +42,6 @@ tempfile.workspace = true rand = "0.8.4" daggy = "0.8.0" molecule = "0.8.0" + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(has_asm)'] } diff --git a/script/src/scheduler.rs b/script/src/scheduler.rs index 358acda0e5..eecf423b9d 100644 --- a/script/src/scheduler.rs +++ b/script/src/scheduler.rs @@ -208,7 +208,7 @@ where if self.states.is_empty() { // Booting phase, we will need to initialize the first VM. assert_eq!( - self.boot_vm(&DataPieceId::Program, 0, u64::max_value(), &[])?, + self.boot_vm(&DataPieceId::Program, 0, u64::MAX, &[])?, ROOT_VM_ID ); } @@ -216,7 +216,7 @@ where let (pause, mut limit_cycles) = match mode { RunMode::LimitCycles(limit_cycles) => (Pause::new(), limit_cycles), - RunMode::Pause(pause) => (pause, u64::max_value()), + RunMode::Pause(pause) => (pause, u64::MAX), }; while self.states[&ROOT_VM_ID] != VmState::Terminated { @@ -791,7 +791,7 @@ where version.vm_isa(), version.vm_version(), // We will update max_cycles for each machine when it gets a chance to run - u64::max_value(), + u64::MAX, ); let snapshot2_context = Arc::new(Mutex::new(Snapshot2Context::new(self.tx_data.clone()))); let mut syscalls_generator = self.syscalls_generator.clone(); diff --git a/script/src/syscalls/load_cell_data.rs b/script/src/syscalls/load_cell_data.rs index 3abe9b35b2..d9ee50be4b 100644 --- a/script/src/syscalls/load_cell_data.rs +++ b/script/src/syscalls/load_cell_data.rs @@ -58,7 +58,7 @@ where .lock() .map_err(|e| VMError::Unexpected(e.to_string()))?; - match sc.load_data(&data_piece_id, offset, u64::max_value()) { + match sc.load_data(&data_piece_id, offset, u64::MAX) { Ok((cell, _)) => { let size = machine.memory_mut().load64(&size_addr)?.to_u64(); if size == 0 { @@ -124,10 +124,10 @@ where .snapshot2_context .lock() .map_err(|e| VMError::Unexpected(e.to_string()))?; - // We are using 0..u64::max_value() to fetch full cell, there is + // We are using 0..u64::MAX to fetch full cell, there is // also no need to keep the full length value. Since cell's length // is already full length. - let (cell, _) = match sc.load_data(&data_piece_id, 0, u64::max_value()) { + let (cell, _) = match sc.load_data(&data_piece_id, 0, u64::MAX) { Ok(val) => { if content_size == 0 { (Bytes::new(), val.1) diff --git a/script/src/syscalls/tests/vm_latest/syscalls_1.rs b/script/src/syscalls/tests/vm_latest/syscalls_1.rs index 761537e2ff..f7ca26ecac 100644 --- a/script/src/syscalls/tests/vm_latest/syscalls_1.rs +++ b/script/src/syscalls/tests/vm_latest/syscalls_1.rs @@ -1630,7 +1630,7 @@ fn test_load_overflowed_cell_data_as_code() { machine.set_register(A0, addr); // addr machine.set_register(A1, addr_size); // size machine.set_register(A2, 3); // content offset - machine.set_register(A3, u64::max_value() - 1); // content size + machine.set_register(A3, u64::MAX - 1); // content size machine.set_register(A4, 0); //index machine.set_register(A5, u64::from(Source::Transaction(SourceEntry::CellDep))); //source machine.set_register(A7, LOAD_CELL_DATA_AS_CODE_SYSCALL_NUMBER); // syscall number diff --git a/script/src/verify.rs b/script/src/verify.rs index f91328e598..d20afd5ceb 100644 --- a/script/src/verify.rs +++ b/script/src/verify.rs @@ -615,7 +615,7 @@ where /// ## Params /// /// * `max_cycles` - Maximum allowed cycles to run the scripts. The verification quits early - /// when the consumed cycles exceed the limit. + /// when the consumed cycles exceed the limit. /// /// ## Returns /// @@ -644,7 +644,7 @@ where /// ## Params /// /// * `limit_cycles` - Maximum allowed cycles to run the scripts. The verification quits early - /// when the consumed cycles exceed the limit. + /// when the consumed cycles exceed the limit. /// /// ## Returns /// @@ -729,7 +729,7 @@ where /// * `snap` - Captured transaction verification snapshot. /// /// * `limit_cycles` - Maximum allowed cycles to run the scripts. The verification quits early - /// when the consumed cycles exceed the limit. + /// when the consumed cycles exceed the limit. /// /// ## Returns /// @@ -800,7 +800,7 @@ where /// * `state` - vm state. /// /// * `limit_cycles` - Maximum allowed cycles to run the scripts. The verification quits early - /// when the consumed cycles exceed the limit. + /// when the consumed cycles exceed the limit. /// /// ## Returns /// @@ -880,7 +880,7 @@ where /// * `snap` - Captured transaction verification snapshot. /// /// * `max_cycles` - Maximum allowed cycles to run the scripts. The verification quits early - /// when the consumed cycles exceed the limit. + /// when the consumed cycles exceed the limit. /// /// ## Returns /// diff --git a/shared/Cargo.toml b/shared/Cargo.toml index affce7214d..44794dedcf 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -29,8 +29,7 @@ ckb-systemtime = { path = "../util/systemtime", version = "= 0.119.0-pre" } ckb-channel = { path = "../util/channel", version = "= 0.119.0-pre" } ckb-app-config = { path = "../util/app-config", version = "= 0.119.0-pre" } ckb-migrate = { path = "../util/migrate", version = "= 0.119.0-pre" } -ckb-fee-estimator = {path = "../util/fee-estimator", version = "= 0.119.0-pre"} -once_cell = "1.8.0" +ckb-fee-estimator = { path = "../util/fee-estimator", version = "= 0.119.0-pre"} ckb-util = { path = "../util", version = "= 0.119.0-pre" } ckb-metrics = { path = "../util/metrics", version = "= 0.119.0-pre" } bitflags = "1.0" @@ -40,9 +39,21 @@ sled = "0.34.7" dashmap = "4.0" [dev-dependencies] -ckb-systemtime = { path = "../util/systemtime", version = "= 0.119.0-pre", features = ["enable_faketime"] } +ckb-systemtime = { path = "../util/systemtime", version = "= 0.119.0-pre", features = [ + "enable_faketime", +] } [features] -portable = ["ckb-db/portable", "ckb-store/portable", "ckb-tx-pool/portable", "ckb-migrate/portable"] -march-native = ["ckb-db/march-native", "ckb-store/march-native", "ckb-tx-pool/march-native", "ckb-migrate/march-native"] +portable = [ + "ckb-db/portable", + "ckb-store/portable", + "ckb-tx-pool/portable", + "ckb-migrate/portable", +] +march-native = [ + "ckb-db/march-native", + "ckb-store/march-native", + "ckb-tx-pool/march-native", + "ckb-migrate/march-native", +] stats = [] diff --git a/shared/src/shared_builder.rs b/shared/src/shared_builder.rs index c72f0147a7..47f0a85e4e 100644 --- a/shared/src/shared_builder.rs +++ b/shared/src/shared_builder.rs @@ -164,7 +164,6 @@ impl SharedBuilder { /// Generates the SharedBuilder with temp db /// NOTICE: this is only used in testing pub fn with_temp_db() -> Self { - use once_cell::{sync, unsync}; use std::{ borrow::Borrow, sync::atomic::{AtomicUsize, Ordering}, @@ -176,18 +175,17 @@ impl SharedBuilder { thread_local! { // NOTICE:we can't put the runtime directly into thread_local here, // on windows the runtime in thread_local will get stuck when dropping - static RUNTIME_HANDLE: unsync::OnceCell = unsync::OnceCell::new(); + static RUNTIME_HANDLE: std::cell::OnceCell = const { std::cell::OnceCell::new() }; } static DB_COUNT: AtomicUsize = AtomicUsize::new(0); - static TMP_DIR: sync::OnceCell = sync::OnceCell::new(); + static TMP_DIR: std::sync::OnceLock = std::sync::OnceLock::new(); let db = { let db_id = DB_COUNT.fetch_add(1, Ordering::SeqCst); let db_base_dir = TMP_DIR .borrow() - .get_or_try_init(TempDir::new) - .unwrap() + .get_or_init(|| TempDir::new().unwrap()) .path() .to_path_buf(); let db_dir = db_base_dir.join(format!("db_{db_id}")); diff --git a/shared/src/types/header_map/backend.rs b/shared/src/types/header_map/backend.rs index 9724e89aa9..41ebcd33b9 100644 --- a/shared/src/types/header_map/backend.rs +++ b/shared/src/types/header_map/backend.rs @@ -4,6 +4,7 @@ use ckb_types::packed::Byte32; use crate::types::HeaderIndexView; +#[allow(dead_code)] pub(crate) trait KeyValueBackend { fn new

(tmpdir: Option

) -> Self where diff --git a/spec/Cargo.toml b/spec/Cargo.toml index d25714b549..157e9b140c 100644 --- a/spec/Cargo.toml +++ b/spec/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/nervosnetwork/ckb" [dependencies] serde = { version = "1.0", features = ["derive"] } toml = "0.5" -cacache = { version = "12.0.0", default-features = false, features = ["tokio-runtime", "mmap"] } +cacache = { version = "13.0.0", default-features = false, features = ["mmap"] } ckb-constant = { path = "../util/constant", version = "= 0.119.0-pre" } ckb-types = { path = "../util/types", version = "= 0.119.0-pre" } ckb-pow = { path = "../pow", version = "= 0.119.0-pre" } @@ -19,11 +19,11 @@ ckb-resource = { path = "../resource", version = "= 0.119.0-pre" } ckb-jsonrpc-types = { path = "../util/jsonrpc-types", version = "= 0.119.0-pre" } ckb-dao-utils = { path = "../util/dao/utils", version = "= 0.119.0-pre" } ckb-rational = { path = "../util/rational", version = "= 0.119.0-pre" } -ckb-crypto = { path = "../util/crypto", version = "= 0.119.0-pre"} -ckb-hash = { path = "../util/hash", version = "= 0.119.0-pre"} +ckb-crypto = { path = "../util/crypto", version = "= 0.119.0-pre" } +ckb-hash = { path = "../util/hash", version = "= 0.119.0-pre" } ckb-error = { path = "../error", version = "= 0.119.0-pre" } ckb-traits = { path = "../traits", version = "= 0.119.0-pre" } -ckb-logger = {path = "../util/logger", version = "= 0.119.0-pre"} +ckb-logger = { path = "../util/logger", version = "= 0.119.0-pre" } [dev-dependencies] diff --git a/src/main.rs b/src/main.rs index 55c5dfa74d..8a55ba4f95 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,7 @@ fn main() { } } +#[allow(unexpected_cfgs)] fn get_version() -> Version { let major = env!("CARGO_PKG_VERSION_MAJOR") .parse::() diff --git a/store/src/store.rs b/store/src/store.rs index 8e9b69a6d9..06397bdca7 100644 --- a/store/src/store.rs +++ b/store/src/store.rs @@ -79,9 +79,8 @@ pub trait ChainStore: Send + Sync + Sized { }); if let Some(cache) = self.cache() { - ret.map(|header| { + ret.inspect(|header| { cache.headers.lock().put(hash.clone(), header.clone()); - header }) } else { ret @@ -191,9 +190,8 @@ pub trait ChainStore: Send + Sync + Sized { }); if let Some(cache) = self.cache() { - ret.map(|data| { + ret.inspect(|data| { cache.block_proposals.lock().put(hash.clone(), data.clone()); - data }) } else { ret @@ -214,9 +212,8 @@ pub trait ChainStore: Send + Sync + Sized { }); if let Some(cache) = self.cache() { - ret.map(|uncles| { + ret.inspect(|uncles| { cache.block_uncles.lock().put(hash.clone(), uncles.clone()); - uncles }) } else { ret @@ -374,9 +371,8 @@ pub trait ChainStore: Send + Sync + Sized { }); if let Some(cache) = self.cache() { - ret.map(|cached| { + ret.inspect(|cached| { cache.cell_data.lock().put(key, cached.clone()); - cached }) } else { ret @@ -401,9 +397,8 @@ pub trait ChainStore: Send + Sync + Sized { }); if let Some(cache) = self.cache() { - ret.map(|cached| { + ret.inspect(|cached| { cache.cell_data_hash.lock().put(key, cached.clone()); - cached }) } else { ret diff --git a/sync/Cargo.toml b/sync/Cargo.toml index 9aa237cfcb..7115dacd98 100644 --- a/sync/Cargo.toml +++ b/sync/Cargo.toml @@ -25,7 +25,7 @@ ckb-channel = { path = "../util/channel", version = "= 0.119.0-pre" } ckb-traits = { path = "../traits", version = "= 0.119.0-pre" } ckb-error = { path = "../error", version = "= 0.119.0-pre" } ckb-tx-pool = { path = "../tx-pool", version = "= 0.119.0-pre" } -sentry = { version = "0.26.0", optional = true } +sentry = { version = "0.34.0", optional = true } ckb-constant = { path = "../util/constant", version = "= 0.119.0-pre" } ckb-stop-handler = { path = "../util/stop-handler", version = "= 0.119.0-pre" } tokio = { version = "1", features = ["sync"] } @@ -48,7 +48,6 @@ ckb-chain = { path = "../chain", version = "= 0.119.0-pre", features = [ "mock", ] } faux = "^0.1" -once_cell = "1.8.0" ckb-systemtime = { path = "../util/systemtime", version = "= 0.119.0-pre", features = [ "enable_faketime", ] } diff --git a/sync/src/synchronizer/headers_process.rs b/sync/src/synchronizer/headers_process.rs index c2ae0f7665..9fdeeb94bc 100644 --- a/sync/src/synchronizer/headers_process.rs +++ b/sync/src/synchronizer/headers_process.rs @@ -353,6 +353,7 @@ pub enum ValidationState { Invalid, } +#[allow(dead_code)] #[derive(Debug)] pub enum ValidationError { Verify(Error), diff --git a/sync/src/tests/net_time_checker.rs b/sync/src/tests/net_time_checker.rs index 846e07d796..89d631d5ee 100644 --- a/sync/src/tests/net_time_checker.rs +++ b/sync/src/tests/net_time_checker.rs @@ -109,8 +109,7 @@ fn net_service_start() -> Node { let control = p2p_service.control().clone().into(); let (addr_sender, addr_receiver) = ::std::sync::mpsc::channel(); - static RT: once_cell::sync::OnceCell = - once_cell::sync::OnceCell::new(); + static RT: std::sync::OnceLock = std::sync::OnceLock::new(); let rt = RT.get_or_init(|| { tokio::runtime::Builder::new_multi_thread() diff --git a/sync/src/tests/synchronizer/functions.rs b/sync/src/tests/synchronizer/functions.rs index a63937d727..19f23b06d3 100644 --- a/sync/src/tests/synchronizer/functions.rs +++ b/sync/src/tests/synchronizer/functions.rs @@ -687,7 +687,7 @@ fn test_sync_process() { // Construct a better tip, to trigger fixing last_common_header inside `get_blocks_to_fetch` insert_block(&synchronizer2.chain, &shared2, 201u128, 201); - let headers = vec![synchronizer2.shared.active_chain().tip_header()]; + let headers = [synchronizer2.shared.active_chain().tip_header()]; let sendheaders = SendHeadersBuilder::default() .headers(headers.iter().map(|h| h.data()).pack()) .build(); diff --git a/test/Cargo.toml b/test/Cargo.toml index 3ea017891c..0e8cde775e 100644 --- a/test/Cargo.toml +++ b/test/Cargo.toml @@ -9,7 +9,7 @@ homepage = "https://github.com/nervosnetwork/ckb" repository = "https://github.com/nervosnetwork/ckb" [dependencies] -clap = { version = "=3.2.21" } +clap = { version = "4" } toml = "0.5.0" ckb-jsonrpc-types = { path = "../util/jsonrpc-types", version = "= 0.119.0-pre" } ckb-app-config = { path = "../util/app-config", version = "= 0.119.0-pre" } @@ -33,21 +33,20 @@ ckb-db = { path = "../db", version = "= 0.119.0-pre" } ckb-store = { path = "../store", version = "= 0.119.0-pre" } ckb-shared = { path = "../shared", version = "= 0.119.0-pre" } tempfile = "3" -reqwest = { version = "=0.11.20", features = ["blocking", "json"] } +reqwest = { version = "0.12", features = ["blocking", "json"] } rand = "0.8" ckb-systemtime = { path = "../util/systemtime", version = "= 0.119.0-pre" } serde_json = "1.0" -lazy_static = "1.4.0" byteorder = "1.3.1" jsonrpc-core = "18.0" ctrlc = { version = "3.1", features = ["termination"] } log = "0.4" [target.'cfg(not(target_os="windows"))'.dependencies] -nix = { version = "0.24.0", default-features = false, features = ["signal"] } +nix = { version = "0.29.0", default-features = false, features = ["signal"] } [target.'cfg(target_os="windows")'.dependencies] -windows-sys = { version = "0.52", features = [ +windows-sys = { version = "0.59", features = [ "Win32_Foundation", "Win32_System_Threading", "Win32_Security", diff --git a/test/src/global.rs b/test/src/global.rs index ee453eb6c7..07619ac5dd 100644 --- a/test/src/global.rs +++ b/test/src/global.rs @@ -1,18 +1,17 @@ use ckb_util::Mutex; -use lazy_static::lazy_static; use std::path::PathBuf; use std::sync::atomic::AtomicU16; -lazy_static! { - pub static ref BINARY_PATH: Mutex = Mutex::new(PathBuf::new()); - pub static ref VENDOR_PATH: Mutex = { - let default = ::std::env::current_dir() - .expect("can't get current_dir") - .join("vendor"); - Mutex::new(default) - }; - pub static ref PORT_COUNTER: AtomicU16 = AtomicU16::new(9000); -} +pub static BINARY_PATH: std::sync::LazyLock> = + std::sync::LazyLock::new(|| Mutex::new(PathBuf::new())); +pub static VENDOR_PATH: std::sync::LazyLock> = std::sync::LazyLock::new(|| { + let default = ::std::env::current_dir() + .expect("can't get current_dir") + .join("vendor"); + Mutex::new(default) +}); +pub static PORT_COUNTER: std::sync::LazyLock = + std::sync::LazyLock::new(|| AtomicU16::new(9000)); pub fn binary() -> PathBuf { (*BINARY_PATH.lock()).clone() diff --git a/test/src/main.rs b/test/src/main.rs index 038b947452..d03e672e59 100644 --- a/test/src/main.rs +++ b/test/src/main.rs @@ -8,7 +8,7 @@ use ckb_test::{ }; use ckb_types::core::ScriptHashType; use ckb_util::Mutex; -use clap::{App, Arg}; +use clap::{Arg, Command}; use rand::{seq::SliceRandom, thread_rng}; use std::any::Any; use std::cmp::min; @@ -17,7 +17,6 @@ use std::env; use std::fs::{self, read_to_string, File}; use std::io::{self, BufRead, BufReader, Write}; use std::path::{Path, PathBuf}; -use std::str::FromStr; use std::sync::atomic::Ordering; use std::sync::Arc; use std::time::{Duration, Instant}; @@ -42,27 +41,24 @@ fn main() { let clap_app = clap_app(); let matches = clap_app.get_matches(); - let binary = matches.value_of_t_or_exit::("binary"); - let start_port = matches.value_of_t_or_exit::("port"); - let spec_names_to_run: Vec<_> = matches.values_of("specs").unwrap_or_default().collect(); - let max_time = if matches.is_present("max-time") { - matches.value_of_t_or_exit::("max-time") - } else { - 0 - }; - let worker_count = matches.value_of_t_or_exit::("concurrent"); + let binary = matches.get_one::("binary").cloned().unwrap(); + let start_port = matches.get_one::("port").cloned().unwrap(); + let spec_names_to_run: Vec<_> = matches + .get_many::("specs") + .unwrap_or_default() + .map(|v| v.as_str()) + .collect(); + let max_time = matches.get_one::("max-time").cloned().unwrap(); + let worker_count = matches.get_one::("concurrent").cloned().unwrap(); let vendor = matches - .value_of_t::("vendor") - .unwrap_or_else(|_| current_dir().join("vendor")); - let log_file_opt = matches - .value_of("log-file") - .map(PathBuf::from_str) - .transpose() - .unwrap_or_else(|err| panic!("failed to parse the log file path since {err}")); - let fail_fast = !matches.is_present("no-fail-fast"); - let report = !matches.is_present("no-report"); - let clean_tmp = !matches.is_present("keep-tmp-data"); - let verbose = matches.is_present("verbose"); + .get_one::("vendor") + .cloned() + .unwrap_or_else(|| current_dir().join("vendor")); + let log_file_opt = matches.get_one::("log-file").cloned(); + let fail_fast = !matches.get_flag("no-fail-fast"); + let report = !matches.get_flag("no-report"); + let clean_tmp = !matches.get_flag("keep-tmp-data"); + let verbose = matches.get_flag("verbose"); let logger_guard = { let filter = if !verbose { @@ -100,7 +96,7 @@ fn main() { .unwrap_or_else(|err| panic!("failed to init the logger service since {err}")) }; - if matches.is_present("list-specs") { + if matches.get_flag("list-specs") { list_specs(); return; } @@ -298,71 +294,83 @@ fn main() { drop(logger_guard); } -fn clap_app() -> App<'static> { - App::new("ckb-test") +fn clap_app() -> Command { + Command::new("ckb-test") .arg( - Arg::with_name("binary") + Arg::new("binary") .short('b') .long("bin") - .takes_value(true) - .value_name("PATH") + .action(clap::ArgAction::Set) + .value_parser(clap::value_parser!(PathBuf)) .help("Path to ckb executable") .default_value("../target/release/ckb"), ) .arg( - Arg::with_name("port") + Arg::new("port") .short('p') .long("port") - .takes_value(true) + .action(clap::ArgAction::Set) + .value_parser(clap::value_parser!(u16)) .help("Starting port number used to start ckb nodes") .default_value("9000"), ) .arg( - Arg::with_name("max-time") + Arg::new("max-time") .long("max-time") - .takes_value(true) - .value_name("SECONDS") - .help("Exit when total running time exceeds this limit"), + .action(clap::ArgAction::Set) + .value_parser(clap::value_parser!(u64)) + .help("Exit when total running time exceeds this limit") + .default_value("0"), ) .arg( - Arg::with_name("list-specs") + Arg::new("list-specs") .long("list-specs") + .action(clap::ArgAction::SetTrue) .help("list all specs"), ) - .arg(Arg::with_name("specs").multiple(true).help("Specs to run")) .arg( - Arg::with_name("concurrent") + Arg::new("specs") + .action(clap::ArgAction::Append) + .help("Specs to run"), + ) + .arg( + Arg::new("concurrent") .short('c') .long("concurrent") - .takes_value(true) + .action(clap::ArgAction::Set) + .value_parser(clap::value_parser!(usize)) .help("The number of specs can running concurrently") .default_value("4"), ) .arg( - Arg::with_name("verbose") + Arg::new("verbose") .long("verbose") + .action(clap::ArgAction::SetTrue) .help("Show verbose log"), ) .arg( - Arg::with_name("no-fail-fast") + Arg::new("no-fail-fast") .long("no-fail-fast") + .action(clap::ArgAction::SetTrue) .help("Run all tests regardless of failure"), ) .arg( - Arg::with_name("no-report") + Arg::new("no-report") .long("no-report") + .action(clap::ArgAction::SetTrue) .help("Do not show integration test report"), ) .arg( - Arg::with_name("log-file") + Arg::new("log-file") .long("log-file") - .takes_value(true) + .action(clap::ArgAction::Set) + .value_parser(clap::value_parser!(PathBuf)) .help("Write log outputs into file."), ) - .arg(Arg::with_name("keep-tmp-data").long("keep-tmp-data").help( + .arg(Arg::new("keep-tmp-data").long("keep-tmp-data").action(clap::ArgAction::SetTrue).help( "Keep all temporary files. Default: only keep temporary file for the failed tests.", )) - .arg(Arg::with_name("vendor").long("vendor")) + .arg(Arg::new("vendor").long("vendor").action(clap::ArgAction::SetTrue).value_parser(clap::value_parser!(PathBuf))) } fn filter_specs( diff --git a/test/src/node.rs b/test/src/node.rs index ad25d7fe89..24b511f263 100644 --- a/test/src/node.rs +++ b/test/src/node.rs @@ -164,7 +164,7 @@ impl Node { .system_cells .iter_mut() .for_each(|system_cell| { - system_cell.file.absolutize(&working_dir.join("specs")); + system_cell.file.absolutize(working_dir.join("specs")); }); chain_spec.build_consensus().unwrap() }; diff --git a/test/src/rpc.rs b/test/src/rpc.rs index bb4b9a81dc..0cafcbe572 100644 --- a/test/src/rpc.rs +++ b/test/src/rpc.rs @@ -16,14 +16,14 @@ use ckb_types::core::{ Version as CoreVersion, }; use ckb_types::{packed::Byte32, prelude::*, H256}; -use lazy_static::lazy_static; -lazy_static! { - pub static ref HTTP_CLIENT: reqwest::blocking::Client = reqwest::blocking::Client::builder() - .timeout(::std::time::Duration::from_secs(30)) - .build() - .expect("reqwest Client build"); -} +pub static HTTP_CLIENT: std::sync::LazyLock = + std::sync::LazyLock::new(|| { + reqwest::blocking::Client::builder() + .timeout(::std::time::Duration::from_secs(30)) + .build() + .expect("reqwest Client build") + }); pub struct RpcClient { inner: Inner, diff --git a/test/src/specs/mining/fee.rs b/test/src/specs/mining/fee.rs index abadc4daf8..4f9d2d8b26 100644 --- a/test/src/specs/mining/fee.rs +++ b/test/src/specs/mining/fee.rs @@ -183,7 +183,7 @@ impl Spec for ProposeButNotCommit { let cells = gen_spendable(feed_node, 1); let transaction = always_success_transaction(feed_node, &cells[0]); - let txs = vec![transaction]; + let txs = [transaction]; feed_node.submit_transaction(&txs[0]); feed_node.mine(1); @@ -209,7 +209,7 @@ impl Spec for ProposeDuplicated { let node = &nodes[0]; let cells = gen_spendable(node, 1); let tx = always_success_transaction(node, &cells[0]); - let txs = vec![tx]; + let txs = [tx]; let tx = &txs[0]; let uncle1 = { diff --git a/test/src/specs/sync/block_filter.rs b/test/src/specs/sync/block_filter.rs index 0996da7935..352777a0ee 100644 --- a/test/src/specs/sync/block_filter.rs +++ b/test/src/specs/sync/block_filter.rs @@ -66,13 +66,12 @@ impl Spec for GetBlockFilterCheckPoints { node.get_block_filter(header.hash()).data.into(); let expected_hash = if i == 0 { blake2b_256( - &[&[0u8; 32], block_filter.calc_raw_data_hash().as_slice()] - .concat(), + [&[0u8; 32], block_filter.calc_raw_data_hash().as_slice()].concat(), ) } else { let parent_block_filter = node.get_block_filter(header.parent_hash()); blake2b_256( - &[ + [ parent_block_filter.hash.0.as_slice(), block_filter.calc_raw_data_hash().as_slice(), ] @@ -165,7 +164,7 @@ impl Spec for GetBlockFilterHashes { node.get_block_filter(header.hash()).data.into(); let parent_block_filter = node.get_block_filter(header.parent_hash()); let expected_hash = blake2b_256( - &[ + [ parent_block_filter.hash.0.as_slice(), block_filter.calc_raw_data_hash().as_slice(), ] diff --git a/test/src/specs/sync/sync_churn.rs b/test/src/specs/sync/sync_churn.rs index 4770947053..babcb96ee6 100644 --- a/test/src/specs/sync/sync_churn.rs +++ b/test/src/specs/sync/sync_churn.rs @@ -20,10 +20,10 @@ pub struct SyncChurn; /// But this test is not a complete test, it can only test the robustness of the sync protocol to a certain extent. /// Some weaknesses of this test: /// 1. This test only consider the simple case of some nodes restarting in the middle of mining, -/// while other nodes are always mining correctly. +/// while other nodes are always mining correctly. /// 2. This fault injection of restarting nodes is not comprehensive enough. /// 3. Even if the test fails, we can't deterministically reproduce the same error. -/// We may need some foundationdb-like tools to deterministically reproduce the same error. +/// We may need some foundationdb-like tools to deterministically reproduce the same error. impl Spec for SyncChurn { crate::setup!(num_nodes: 5); diff --git a/tx-pool/Cargo.toml b/tx-pool/Cargo.toml index 20ba77cc70..d7245d5a5d 100644 --- a/tx-pool/Cargo.toml +++ b/tx-pool/Cargo.toml @@ -25,7 +25,7 @@ ckb-util = { path = "../util", version = "= 0.119.0-pre" } ckb-jsonrpc-types = { path = "../util/jsonrpc-types", version = "= 0.119.0-pre" } ckb-chain-spec = { path = "../spec", version = "= 0.119.0-pre" } ckb-snapshot = { path = "../util/snapshot", version = "= 0.119.0-pre" } -ckb-metrics = {path = "../util/metrics", version = "= 0.119.0-pre"} +ckb-metrics = { path = "../util/metrics", version = "= 0.119.0-pre" } ckb-error = { path = "../error", version = "= 0.119.0-pre" } tokio = { version = "1", features = ["sync", "process"] } ckb-async-runtime = { path = "../util/runtime", version = "= 0.119.0-pre" } @@ -36,10 +36,12 @@ ckb-channel = { path = "../util/channel", version = "= 0.119.0-pre" } ckb-traits = { path = "../traits", version = "= 0.119.0-pre" } ckb-db = { path = "../db", version = "= 0.119.0-pre" } ckb-script = { path = "../script", version = "= 0.119.0-pre" } -sentry = { version = "0.26.0", optional = true } +sentry = { version = "0.34.0", optional = true } serde_json = "1.0" rand = "0.8.4" -hyper = { version = "0.14", features = ["http1", "client", "tcp"] } +hyper = { version = "1", features = ["http1", "http2", "client"] } +hyper-util = { version = "0.1", features = ["client-legacy", "http1", "http2"] } +http-body-util = "0.1" multi_index_map = "0.6.0" slab = "0.4" rustc-hash = "1.1" @@ -49,11 +51,17 @@ ckb-fee-estimator = { path = "../util/fee-estimator", version = "= 0.119.0-pre" [dev-dependencies] tempfile.workspace = true ckb-hash = { path = "../util/hash", version = "= 0.119.0-pre" } -ckb-systemtime = {path = "../util/systemtime", version = "= 0.119.0-pre", features = ["enable_faketime"]} +ckb-systemtime = { path = "../util/systemtime", version = "= 0.119.0-pre", features = [ + "enable_faketime", +] } [features] default = [] internal = [] with_sentry = ["sentry"] portable = ["ckb-db/portable", "ckb-store/portable", "ckb-snapshot/portable"] -march-native = ["ckb-db/march-native", "ckb-store/march-native", "ckb-snapshot/march-native"] +march-native = [ + "ckb-db/march-native", + "ckb-store/march-native", + "ckb-snapshot/march-native", +] diff --git a/tx-pool/src/block_assembler/mod.rs b/tx-pool/src/block_assembler/mod.rs index 81acca0951..dc6e0a1e93 100644 --- a/tx-pool/src/block_assembler/mod.rs +++ b/tx-pool/src/block_assembler/mod.rs @@ -21,6 +21,7 @@ use ckb_snapshot::Snapshot; use ckb_store::ChainStore; use ckb_systemtime::unix_time_as_millis; use ckb_types::{ + bytes, core::{ cell::{OverlayCellChecker, TransactionsChecker}, BlockNumber, Capacity, Cycle, EpochExt, EpochNumberWithFraction, ScriptHashType, @@ -32,7 +33,9 @@ use ckb_types::{ }, prelude::*, }; -use hyper::{client::HttpConnector, Body, Client, Method, Request}; +use http_body_util::Full; +use hyper::{Method, Request}; +use hyper_util::client::legacy::{connect::HttpConnector, Client}; use std::collections::HashSet; use std::sync::{ atomic::{AtomicU64, Ordering}, @@ -99,7 +102,7 @@ pub struct BlockAssembler { pub(crate) work_id: Arc, pub(crate) candidate_uncles: Arc>, pub(crate) current: Arc>, - pub(crate) poster: Arc>, + pub(crate) poster: Arc>>, } impl BlockAssembler { @@ -158,7 +161,10 @@ impl BlockAssembler { work_id: Arc::new(work_id), candidate_uncles: Arc::new(Mutex::new(CandidateUncles::new())), current: Arc::new(Mutex::new(current)), - poster: Arc::new(Client::new()), + poster: Arc::new( + Client::builder(hyper_util::rt::TokioExecutor::new()) + .build::<_, Full>(HttpConnector::new()), + ), } } @@ -646,7 +652,7 @@ impl BlockAssembler { .method(Method::POST) .uri(url.as_ref()) .header("content-type", "application/json") - .body(Body::from(template_json.to_owned())) + .body(Full::new(template_json.to_owned().into())) { let client = Arc::clone(&self.poster); let url = url.to_owned(); diff --git a/tx-pool/src/component/orphan.rs b/tx-pool/src/component/orphan.rs index ee92918bae..c840561e5e 100644 --- a/tx-pool/src/component/orphan.rs +++ b/tx-pool/src/component/orphan.rs @@ -72,7 +72,7 @@ impl OrphanPool { } pub fn remove_orphan_tx(&mut self, id: &ProposalShortId) -> Option { - self.entries.remove(id).map(|entry| { + self.entries.remove(id).inspect(|entry| { debug!("remove orphan tx {}", entry.tx.hash()); for out_point in entry.tx.input_pts_iter() { if let Some(ids_set) = self.by_out_point.get_mut(&out_point) { @@ -83,7 +83,6 @@ impl OrphanPool { } } } - entry }) } diff --git a/tx-pool/src/component/pool_map.rs b/tx-pool/src/component/pool_map.rs index 444eb30212..dc54a89bc3 100644 --- a/tx-pool/src/component/pool_map.rs +++ b/tx-pool/src/component/pool_map.rs @@ -28,12 +28,12 @@ pub enum Status { Proposed, } -impl ToString for Status { - fn to_string(&self) -> String { +impl std::fmt::Display for Status { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Status::Pending => "pending".to_string(), - Status::Gap => "gap".to_string(), - Status::Proposed => "proposed".to_string(), + Status::Pending => write!(f, "pending"), + Status::Gap => write!(f, "gap"), + Status::Proposed => write!(f, "proposed"), } } } diff --git a/tx-pool/src/component/sort_key.rs b/tx-pool/src/component/sort_key.rs index e8b1c82830..4921b8571a 100644 --- a/tx-pool/src/component/sort_key.rs +++ b/tx-pool/src/component/sort_key.rs @@ -60,9 +60,10 @@ impl From for CoreAncestorsScoreSortKey { } } -impl ToString for AncestorsScoreSortKey { - fn to_string(&self) -> String { - format!( +impl std::fmt::Display for AncestorsScoreSortKey { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, "fee: {:#02X}, ancestors_fee: {:#02X}, weight: {:#02X}, ancestors_weight: {:#02X}", self.fee.as_u64(), self.ancestors_fee.as_u64(), diff --git a/tx-pool/src/component/tests/score_key.rs b/tx-pool/src/component/tests/score_key.rs index c12cc7426c..af162fcae8 100644 --- a/tx-pool/src/component/tests/score_key.rs +++ b/tx-pool/src/component/tests/score_key.rs @@ -17,9 +17,9 @@ fn test_min_fee_and_weight() { (500, 10, 1000, 30), (10, 500, 30, 1000), (500, 10, 1000, 20), - (std::u64::MAX, 0, std::u64::MAX, 0), - (std::u64::MAX, 100, std::u64::MAX, 2000), - (std::u64::MAX, std::u64::MAX, std::u64::MAX, std::u64::MAX), + (u64::MAX, 0, u64::MAX, 0), + (u64::MAX, 100, u64::MAX, 2000), + (u64::MAX, u64::MAX, u64::MAX, u64::MAX), ] .into_iter() .map(|(fee, weight, ancestors_fee, ancestors_weight)| { @@ -40,9 +40,9 @@ fn test_min_fee_and_weight() { (Capacity::shannons(1000), 30), (Capacity::shannons(10), 500), (Capacity::shannons(1000), 20), - (Capacity::shannons(std::u64::MAX), 0), - (Capacity::shannons(std::u64::MAX), 2000), - (Capacity::shannons(std::u64::MAX), std::u64::MAX), + (Capacity::shannons(u64::MAX), 0), + (Capacity::shannons(u64::MAX), 2000), + (Capacity::shannons(u64::MAX), u64::MAX), ] ); } @@ -57,16 +57,15 @@ fn test_ancestors_sorted_key_order() { (500, 10, 1000, 30), (10, 500, 30, 1000), (500, 10, 1000, 20), - (std::u64::MAX, 0, std::u64::MAX, 0), - (std::u64::MAX, 100, std::u64::MAX, 2000), - (std::u64::MAX, std::u64::MAX, std::u64::MAX, std::u64::MAX), + (u64::MAX, 0, u64::MAX, 0), + (u64::MAX, 100, u64::MAX, 2000), + (u64::MAX, u64::MAX, u64::MAX, u64::MAX), ]; let mut keys = table .clone() .into_iter() - .enumerate() .map( - |(_i, (fee, weight, ancestors_fee, ancestors_weight))| AncestorsScoreSortKey { + |(fee, weight, ancestors_fee, ancestors_weight)| AncestorsScoreSortKey { fee: Capacity::shannons(fee), weight, ancestors_fee: Capacity::shannons(ancestors_fee), diff --git a/util/Cargo.toml b/util/Cargo.toml index ca722018ec..74174a25b7 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -10,9 +10,8 @@ repository = "https://github.com/nervosnetwork/ckb" [dependencies] parking_lot = "0.12" -linked-hash-map = { version = "0.5", features = ["serde_impl"] } +linked-hash-map = { version = "0.5", features = ["serde_impl"] } regex = "1.1.6" -once_cell = "1.8.0" [dev-dependencies] ckb-fixed-hash = { path = "fixed-hash", version = "= 0.119.0-pre" } diff --git a/util/app-config/Cargo.toml b/util/app-config/Cargo.toml index bf57c112eb..dd77fec8a3 100644 --- a/util/app-config/Cargo.toml +++ b/util/app-config/Cargo.toml @@ -25,7 +25,7 @@ ckb-types = { path = "../types", version = "= 0.119.0-pre" } secio = { version = "0.6", package = "tentacle-secio" } multiaddr = { version = "0.3.0", package = "tentacle-multiaddr" } rand = "0.8" -sentry = { version = "0.26.0", optional = true } +sentry = { version = "0.34.0", optional = true } ckb-systemtime = { path = "../systemtime", version = "= 0.119.0-pre" } url = { version = "2.2.2", features = ["serde"] } ubyte = { version = "0.10", features = ["serde"] } diff --git a/util/app-config/src/configs/network.rs b/util/app-config/src/configs/network.rs index 912aca0d8f..b30ff1689f 100644 --- a/util/app-config/src/configs/network.rs +++ b/util/app-config/src/configs/network.rs @@ -183,6 +183,7 @@ pub fn write_secret_to_file(secret: &[u8], path: PathBuf) -> Result<(), Error> { fs::OpenOptions::new() .create(true) .write(true) + .truncate(true) .open(path) .and_then(|mut file| { file.write_all(secret)?; diff --git a/util/app-config/src/configs/rich_indexer.rs b/util/app-config/src/configs/rich_indexer.rs index bdf9a2fd5a..23deb79538 100644 --- a/util/app-config/src/configs/rich_indexer.rs +++ b/util/app-config/src/configs/rich_indexer.rs @@ -15,11 +15,11 @@ pub enum DBDriver { Postgres, } -impl ToString for DBDriver { - fn to_string(&self) -> String { +impl std::fmt::Display for DBDriver { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - DBDriver::Postgres => PGSQL.to_string(), - DBDriver::Sqlite => SQLITE.to_string(), + DBDriver::Postgres => write!(f, "{}", PGSQL), + DBDriver::Sqlite => write!(f, "{}", SQLITE), } } } diff --git a/util/crypto/Cargo.toml b/util/crypto/Cargo.toml index e843e635c3..17b010eab8 100644 --- a/util/crypto/Cargo.toml +++ b/util/crypto/Cargo.toml @@ -10,7 +10,6 @@ repository = "https://github.com/nervosnetwork/ckb" [dependencies] ckb-fixed-hash = { path = "../fixed-hash", version = "= 0.119.0-pre" } -lazy_static = "1.3" secp256k1 = { version = "0.29", features = ["recovery"], optional = true } thiserror = "1.0.22" rand = { version = "0.8", features = ["small_rng"] } diff --git a/util/crypto/src/secp/mod.rs b/util/crypto/src/secp/mod.rs index 32ff3effbf..3ce6a62450 100644 --- a/util/crypto/src/secp/mod.rs +++ b/util/crypto/src/secp/mod.rs @@ -1,15 +1,13 @@ //! `secp256k1` wrapper use ckb_fixed_hash::H256; -use lazy_static::lazy_static; /// A (hashed) message input to an ECDSA signature pub type Message = H256; -lazy_static! { - /// The reference to lazily-initialized static secp256k1 engine, used to execute all signature operations - pub static ref SECP256K1: secp256k1::Secp256k1 = secp256k1::Secp256k1::new(); -} +/// The reference to lazily-initialized static secp256k1 engine, used to execute all signature operations +pub static SECP256K1: std::sync::LazyLock> = + std::sync::LazyLock::new(secp256k1::Secp256k1::new); mod error; mod generator; diff --git a/util/fee-estimator/src/estimator/confirmation_fraction.rs b/util/fee-estimator/src/estimator/confirmation_fraction.rs index cc21d07c7d..628f764263 100644 --- a/util/fee-estimator/src/estimator/confirmation_fraction.rs +++ b/util/fee-estimator/src/estimator/confirmation_fraction.rs @@ -417,14 +417,13 @@ impl Algorithm { } fn drop_tx_inner(&mut self, tx_hash: &Byte32, count_failure: bool) -> Option { - self.tracked_txs.remove(tx_hash).map(|tx_record| { + self.tracked_txs.remove(tx_hash).inspect(|tx_record| { self.tx_confirm_stat.remove_unconfirmed_tx( tx_record.height, self.best_height, tx_record.bucket_index, count_failure, ); - tx_record }) } diff --git a/util/fixed-hash/core/src/std_str.rs b/util/fixed-hash/core/src/std_str.rs index 01ee940cc5..664298d50c 100644 --- a/util/fixed-hash/core/src/std_str.rs +++ b/util/fixed-hash/core/src/std_str.rs @@ -1,6 +1,6 @@ use crate::{error::FromStrError, H160, H256, H512, H520}; -pub(crate) const DICT_HEX_ERROR: u8 = u8::max_value(); +pub(crate) const DICT_HEX_ERROR: u8 = u8::MAX; pub(crate) static DICT_HEX_LO: [u8; 256] = { const ____: u8 = DICT_HEX_ERROR; [ diff --git a/util/gen-types/src/extension/serialized_size.rs b/util/gen-types/src/extension/serialized_size.rs index 405dbea2ac..027cb9e6a6 100644 --- a/util/gen-types/src/extension/serialized_size.rs +++ b/util/gen-types/src/extension/serialized_size.rs @@ -80,6 +80,7 @@ impl packed::UncleBlock { /// - UncleBlockVec has 1 more UncleBlock. /// UncleBlock comes with 1 `total` field, and 2 field offsets, (+NUM_SIZE * 3) /// UncleBlock contains Header (+208) and empty proposals (only one total_size, + NUM_SIZE because it is a fixVec) + /// /// The total is +NUM_SIZE*5 + Header.size() = 228 /// see tests block_size_should_not_include_uncles_proposals. pub fn serialized_size_in_block() -> usize { diff --git a/util/gen-types/src/extension/shortcut.rs b/util/gen-types/src/extension/shortcut.rs index 499145ee90..437047dc4f 100644 --- a/util/gen-types/src/extension/shortcut.rs +++ b/util/gen-types/src/extension/shortcut.rs @@ -10,7 +10,7 @@ impl packed::Byte32 { /// Creates a new `Byte32` whose bits are all ones. pub fn max_value() -> Self { - [u8::max_value(); 32].pack() + [u8::MAX; 32].pack() } /// Checks whether all bits in self are zeros. @@ -55,13 +55,13 @@ impl packed::OutPoint { /// Creates a new null `OutPoint`. pub fn null() -> Self { packed::OutPoint::new_builder() - .index(u32::max_value().pack()) + .index(u32::MAX.pack()) .build() } /// Checks whether self is a null `OutPoint`. pub fn is_null(&self) -> bool { - self.tx_hash().is_zero() && Unpack::::unpack(&self.index()) == u32::max_value() + self.tx_hash().is_zero() && Unpack::::unpack(&self.index()) == u32::MAX } /// Generates a binary data to be used as a key for indexing cells in storage. diff --git a/util/indexer-sync/src/lib.rs b/util/indexer-sync/src/lib.rs index 135d516e17..b69121db56 100644 --- a/util/indexer-sync/src/lib.rs +++ b/util/indexer-sync/src/lib.rs @@ -137,7 +137,7 @@ impl IndexerSyncService { } } - fn try_loop_sync(&self, indexer: I) + fn try_loop_sync(&self, indexer: I) where I: IndexerSync + Clone + Send + 'static, { diff --git a/util/indexer/src/indexer.rs b/util/indexer/src/indexer.rs index 33f0813e86..1062b4b370 100644 --- a/util/indexer/src/indexer.rs +++ b/util/indexer/src/indexer.rs @@ -749,7 +749,7 @@ where .store .iter(&key_prefix_consumed_out_point, IteratorDirection::Forward)? .take_while(|(key, _value)| key.starts_with(&key_prefix_consumed_out_point)); - let mut min_block_number = BlockNumber::max_value(); + let mut min_block_number = BlockNumber::MAX; for (block_number, key) in iter .map(|(key, _value)| { ( @@ -761,7 +761,7 @@ where }) .take_while(|(block_number, _key)| prune_to_block.gt(block_number)) { - if min_block_number == BlockNumber::max_value() { + if min_block_number == BlockNumber::MAX { min_block_number = block_number; } batch.delete(key)?; diff --git a/util/indexer/src/service.rs b/util/indexer/src/service.rs index 849bb434c2..543692b733 100644 --- a/util/indexer/src/service.rs +++ b/util/indexer/src/service.rs @@ -19,7 +19,6 @@ use rocksdb::{prelude::*, Direction, IteratorMode}; use std::convert::TryInto; use std::num::NonZeroUsize; use std::sync::{Arc, RwLock}; -use std::usize; pub(crate) const SUBSCRIBER_NAME: &str = "Indexer"; const DEFAULT_LOG_KEEP_NUM: usize = 1; @@ -794,7 +793,7 @@ impl IndexerHandle { } } -const MAX_PREFIX_SEARCH_SIZE: usize = u16::max_value() as usize; +const MAX_PREFIX_SEARCH_SIZE: usize = u16::MAX as usize; // a helper fn to build query options from search parameters, returns prefix, from_key, direction and skip offset fn build_query_options( diff --git a/util/indexer/src/store/mod.rs b/util/indexer/src/store/mod.rs index 7fecc1146d..6c3664ef70 100644 --- a/util/indexer/src/store/mod.rs +++ b/util/indexer/src/store/mod.rs @@ -11,6 +11,7 @@ pub(crate) enum IteratorDirection { Reverse, } +#[allow(dead_code)] pub(crate) trait Store { type Batch: Batch; type Opts; @@ -40,7 +41,7 @@ pub(crate) trait Batch { key: K, value: V, ) -> Result<(), Error> { - self.put(&Into::>::into(key), &Into::>::into(value)) + self.put(Into::>::into(key), Into::>::into(value)) } fn put, V: AsRef<[u8]>>(&mut self, key: K, value: V) -> Result<(), Error>; diff --git a/util/jsonrpc-types/Cargo.toml b/util/jsonrpc-types/Cargo.toml index 279bcc7382..04afdc6945 100644 --- a/util/jsonrpc-types/Cargo.toml +++ b/util/jsonrpc-types/Cargo.toml @@ -19,4 +19,3 @@ schemars = { version = "0.8.19", package = "ckb_schemars" } [dev-dependencies] proptest = "1.0" regex = "1.1" -lazy_static = "1.3" diff --git a/util/jsonrpc-types/src/cell.rs b/util/jsonrpc-types/src/cell.rs index 887dbc2ab8..5c7dba6a1d 100644 --- a/util/jsonrpc-types/src/cell.rs +++ b/util/jsonrpc-types/src/cell.rs @@ -53,13 +53,13 @@ pub struct CellWithStatus { /// Allowed values: "live", "dead", "unknown". /// /// * `live` - The transaction creating this cell is in the chain, and there are no - /// transactions found in the chain that uses this cell as an input. + /// transactions found in the chain that uses this cell as an input. /// * `dead` - (**Deprecated**: the dead status will be removed since 0.36.0, please do not - /// rely on the logic that differentiates dead and unknown cells.) The transaction creating - /// this cell is in the chain, and a transaction is found in the chain which uses this cell as - /// an input. + /// rely on the logic that differentiates dead and unknown cells.) The transaction creating + /// this cell is in the chain, and a transaction is found in the chain which uses this cell as + /// an input. /// * `unknown` - CKB does not know the status of the cell. Either the transaction creating - /// this cell is not in the chain yet, or it is no longer live. + /// this cell is not in the chain yet, or it is no longer live. pub status: String, } diff --git a/util/jsonrpc-types/src/tests/blockchain.rs b/util/jsonrpc-types/src/tests/blockchain.rs index a82be1a06b..38d1294c82 100644 --- a/util/jsonrpc-types/src/tests/blockchain.rs +++ b/util/jsonrpc-types/src/tests/blockchain.rs @@ -1,5 +1,4 @@ use ckb_types::{bytes::Bytes, core, h256, packed, prelude::*}; -use lazy_static::lazy_static; use proptest::{collection::size_range, prelude::*}; use regex::Regex; @@ -160,9 +159,10 @@ fn _test_block_convert(data: Bytes, arg: Bytes) -> Result<(), TestCaseError> { } fn header_field_format_check(json: &str) { - lazy_static! { - static ref RE: Regex = Regex::new("\"(version|compact_target|parent_hash|timestamp|number|epoch|transactions_root|proposals_hash|extra_hash|dao|nonce)\":\"(?P.*?\")").unwrap(); - } + static RE: std::sync::LazyLock = std::sync::LazyLock::new(|| { + Regex::new("\"(version|compact_target|parent_hash|timestamp|number|epoch|transactions_root|proposals_hash|extra_hash|dao|nonce)\":\"(?P.*?\")").unwrap() + }); + for caps in RE.captures_iter(json) { assert!(&caps["value"].starts_with("0x")); } diff --git a/util/jsonrpc-types/src/uints.rs b/util/jsonrpc-types/src/uints.rs index 7889860140..920b325305 100644 --- a/util/jsonrpc-types/src/uints.rs +++ b/util/jsonrpc-types/src/uints.rs @@ -185,7 +185,8 @@ impl From> for core::Capacity { } } -#[cfg(tests)] +#[allow(dead_code)] +#[cfg(test)] mod tests { macro_rules! test_json_uint { ($tests_name:ident, $name:ident, $inner:ident) => { @@ -209,7 +210,7 @@ mod tests { fn deserialize_decimal() { let s = r#""10""#; let ret: Result<$name, _> = serde_json::from_str(s); - assert!(ret.is_err(), ret); + assert!(ret.is_err(), "{:?}", ret); } #[test] @@ -217,11 +218,12 @@ mod tests { let cases = vec![r#""0x01""#, r#""0x00""#]; for s in cases { let ret: Result<$name, _> = serde_json::from_str(s); - assert!(ret.is_err(), ret); + assert!(ret.is_err(), "{:?}", ret); let err = ret.unwrap_err(); assert!( err.to_string().contains("with redundant leading zeros"), + "{:?}", err, ); } @@ -237,14 +239,15 @@ mod tests { #[test] fn deserialize_too_large() { - let s = format!(r#""0x{:x}0""#, $inner::max_value()); + let s = format!(r#""0x{:x}0""#, $inner::MAX); let ret: Result<$name, _> = serde_json::from_str(&s); - assert!(ret.is_err(), ret); + assert!(ret.is_err(), "{:?}", ret); let err = ret.unwrap_err(); assert!( err.to_string() .contains("number too large to fit in target type"), + "{:?}", err, ); } diff --git a/util/light-client-protocol-server/src/tests/prelude.rs b/util/light-client-protocol-server/src/tests/prelude.rs index 3fc94a7068..4387545934 100644 --- a/util/light-client-protocol-server/src/tests/prelude.rs +++ b/util/light-client-protocol-server/src/tests/prelude.rs @@ -8,6 +8,7 @@ use ckb_types::{ U256, }; +#[allow(dead_code)] pub(crate) trait SnapshotExt { fn get_header_by_number(&self, num: BlockNumber) -> Option; diff --git a/util/logger-service/Cargo.toml b/util/logger-service/Cargo.toml index e9021614cb..e18715b940 100644 --- a/util/logger-service/Cargo.toml +++ b/util/logger-service/Cargo.toml @@ -15,11 +15,10 @@ ckb-channel = { path = "../channel", version = "= 0.119.0-pre" } yansi = "0.5" log = "0.4" env_logger = "0.10" -once_cell = "1.8.0" regex = "1.1.6" backtrace = "0.3" -sentry = { version = "0.26.0", optional = true, features = ["log"] } -time = { version = "0.3.11", features = ["formatting"] } +sentry = { version = "0.34.0", optional = true, features = ["log"] } +time = { version = "0.3.36", features = ["formatting"] } [dev-dependencies] ckb-logger = { path = "../logger", version = "= 0.119.0-pre" } diff --git a/util/logger-service/src/lib.rs b/util/logger-service/src/lib.rs index 37c7eb2684..f4b7765405 100644 --- a/util/logger-service/src/lib.rs +++ b/util/logger-service/src/lib.rs @@ -4,11 +4,11 @@ use backtrace::Backtrace; use ckb_channel::{self, unbounded}; use env_logger::filter::{Builder, Filter}; use log::{LevelFilter, Log, Metadata, Record, SetLoggerError}; -use once_cell::sync::OnceCell; use regex::Regex; use std::collections::HashMap; use std::io::Write; use std::path::{Path, PathBuf}; +use std::sync::OnceLock; use std::{fs, panic, process, sync, thread}; use time::{ format_description::{self, FormatItem}, @@ -22,9 +22,9 @@ use yansi::Paint; #[cfg(test)] mod tests; -static CONTROL_HANDLE: OnceCell> = OnceCell::new(); -static FORMAT: OnceCell>> = OnceCell::new(); -static RE: OnceCell = OnceCell::new(); +static CONTROL_HANDLE: OnceLock> = OnceLock::new(); +static FORMAT: OnceLock>> = OnceLock::new(); +static RE: OnceLock = OnceLock::new(); enum Message { Record { diff --git a/util/memory-tracker/Cargo.toml b/util/memory-tracker/Cargo.toml index 10e1739b0d..8c787a8d2b 100644 --- a/util/memory-tracker/Cargo.toml +++ b/util/memory-tracker/Cargo.toml @@ -17,7 +17,6 @@ ckb-db = { path = "../../db", version = "= 0.119.0-pre" } jemalloc-ctl = { package = "tikv-jemalloc-ctl", version = "0.5.0" } jemalloc-sys = { package = "tikv-jemalloc-sys", version = "0.5.0" } libc = "0.2" -once_cell = "1.8.0" [features] default = [] diff --git a/util/memory-tracker/src/process.rs b/util/memory-tracker/src/process.rs index 0a3ad8d392..8ea2be1a26 100644 --- a/util/memory-tracker/src/process.rs +++ b/util/memory-tracker/src/process.rs @@ -122,7 +122,7 @@ pub struct Memory { impl FromStr for Memory { type Err = io::Error; fn from_str(value: &str) -> Result { - static PAGE_SIZE: once_cell::sync::OnceCell = once_cell::sync::OnceCell::new(); + static PAGE_SIZE: std::sync::OnceLock = std::sync::OnceLock::new(); let page_size = PAGE_SIZE.get_or_init(|| unsafe { libc::sysconf(libc::_SC_PAGESIZE) as u64 }); let mut parts = value.split_ascii_whitespace(); @@ -179,7 +179,7 @@ impl FromStr for Memory { } fn get_current_process_memory() -> Result { - static PID: once_cell::sync::OnceCell = once_cell::sync::OnceCell::new(); + static PID: std::sync::OnceLock = std::sync::OnceLock::new(); let pid = PID.get_or_init(|| unsafe { libc::getpid() }); let content = fs::read_to_string(format!("/proc/{pid}/statm"))?; diff --git a/util/memory-tracker/src/rocksdb.rs b/util/memory-tracker/src/rocksdb.rs index 96b381e372..04e22b157b 100644 --- a/util/memory-tracker/src/rocksdb.rs +++ b/util/memory-tracker/src/rocksdb.rs @@ -1,5 +1,6 @@ use ckb_db::internal::ops::{GetColumnFamilys, GetProperty, GetPropertyCF}; +#[allow(dead_code)] #[derive(Debug, Clone)] enum PropertyValue { Value(T), diff --git a/util/metrics-service/Cargo.toml b/util/metrics-service/Cargo.toml index 5401df511a..aa12084c7c 100644 --- a/util/metrics-service/Cargo.toml +++ b/util/metrics-service/Cargo.toml @@ -15,5 +15,8 @@ ckb-logger = { path = "../logger", version = "= 0.119.0-pre" } ckb-async-runtime = { path = "../runtime", version = "= 0.119.0-pre" } ckb-util = { path = "..", version = "= 0.119.0-pre" } prometheus = "0.13.3" -hyper = { version = "0.14", features = ["http1", "tcp", "server"] } +hyper = { version = "1", features = ["http1", "http2", "server"] } +http-body-util = "0.1" +hyper-util = { version = "0.1", features = ["server-auto", "server-graceful"] } ckb-stop-handler = { path = "../stop-handler", version = "= 0.119.0-pre" } +tokio = { version = "1", features = ["sync"] } diff --git a/util/metrics-service/src/lib.rs b/util/metrics-service/src/lib.rs index c997671c7a..ca6e4505db 100644 --- a/util/metrics-service/src/lib.rs +++ b/util/metrics-service/src/lib.rs @@ -1,13 +1,18 @@ //! The service which handles the metrics data in CKB. -use std::{convert::Infallible, net::SocketAddr}; +use std::net::SocketAddr; +use http_body_util::Full; use hyper::{ - header::CONTENT_TYPE, - service::{make_service_fn, service_fn}, - Body, Error as HyperError, Method, Request, Response, Server, + body::Bytes, header::CONTENT_TYPE, service::service_fn, Error as HyperError, Method, Request, + Response, +}; +use hyper_util::{ + rt::TokioExecutor, + server::{conn::auto, graceful::GracefulShutdown}, }; use prometheus::Encoder as _; +use tokio::net::TcpListener; use ckb_async_runtime::Handle; use ckb_logger::info; @@ -56,28 +61,51 @@ fn run_exporter(exporter: Exporter, handle: &Handle) -> Result<(), String> { let addr = listen_address .parse::() .map_err(|err| format!("failed to parse listen_address because {err}"))?; - let make_svc = make_service_fn(move |_conn| async move { - Ok::<_, Infallible>(service_fn(start_prometheus_service)) - }); + let make_svc = service_fn(start_prometheus_service); ckb_logger::info!("Start prometheus exporter at {}", addr); handle.spawn(async move { - let server = Server::bind(&addr) - .serve(make_svc) - .with_graceful_shutdown(async { - let exit_rx: CancellationToken = new_tokio_exit_rx(); - exit_rx.cancelled().await; - info!("Prometheus server received exit signal; exit now"); - }); - if let Err(err) = server.await { - ckb_logger::error!("prometheus server error: {}", err); + let listener = TcpListener::bind(&addr).await.unwrap(); + let server = auto::Builder::new(TokioExecutor::new()); + let graceful = GracefulShutdown::new(); + let stop_rx: CancellationToken = new_tokio_exit_rx(); + loop { + tokio::select! { + conn = listener.accept() => { + let (stream, _) = match conn { + Ok(conn) => conn, + Err(e) => { + eprintln!("accept error: {}", e); + tokio::time::sleep(std::time::Duration::from_secs(1)).await; + continue; + } + }; + let stream = hyper_util::rt::TokioIo::new(Box::pin(stream)); + let conn = server.serve_connection_with_upgrades(stream, make_svc); + + let conn = graceful.watch(conn.into_owned()); + tokio::spawn(async move { + if let Err(err) = conn.await { + info!("connection error: {}", err); + } + }); + }, + _ = stop_rx.cancelled() => { + info!("Prometheus server received exit signal; exit now"); + break; + } + } } + drop(listener); + graceful.shutdown().await; }); } } Ok(()) } -async fn start_prometheus_service(req: Request) -> Result, HyperError> { +async fn start_prometheus_service( + req: Request, +) -> Result>, HyperError> { Ok(match (req.method(), req.uri().path()) { (&Method::GET, "/") => { let mut buffer = vec![]; @@ -87,11 +115,11 @@ async fn start_prometheus_service(req: Request) -> Result, Response::builder() .status(200) .header(CONTENT_TYPE, encoder.format_type()) - .body(Body::from(buffer)) + .body(Full::new(Bytes::from(buffer))) } _ => Response::builder() .status(404) - .body(Body::from("Page Not Found")), + .body(Full::from("Page Not Found")), } .unwrap()) } diff --git a/util/metrics/Cargo.toml b/util/metrics/Cargo.toml index c74de3d3f3..1f5431300f 100644 --- a/util/metrics/Cargo.toml +++ b/util/metrics/Cargo.toml @@ -11,4 +11,3 @@ repository = "https://github.com/nervosnetwork/ckb" [dependencies] prometheus = "0.13.3" prometheus-static-metric = "0.5.1" -once_cell = "1.17.1" diff --git a/util/metrics/src/lib.rs b/util/metrics/src/lib.rs index 41b9d7d895..6ea701f0e4 100644 --- a/util/metrics/src/lib.rs +++ b/util/metrics/src/lib.rs @@ -126,7 +126,7 @@ pub struct Metrics { pub ckb_inflight_timeout_count: IntCounter, } -static METRICS: once_cell::sync::Lazy = once_cell::sync::Lazy::new(|| { +static METRICS: std::sync::LazyLock = std::sync::LazyLock::new(|| { Metrics { ckb_chain_tip: register_int_gauge!("ckb_chain_tip", "The CKB chain tip header number").unwrap(), ckb_chain_unverified_tip: register_int_gauge!( @@ -314,8 +314,7 @@ static METRICS: once_cell::sync::Lazy = once_cell::sync::Lazy::new(|| { /// Indicate whether the metrics service is enabled. /// This value will set by ckb-metrics-service -pub static METRICS_SERVICE_ENABLED: once_cell::sync::OnceCell = - once_cell::sync::OnceCell::new(); +pub static METRICS_SERVICE_ENABLED: std::sync::OnceLock = std::sync::OnceLock::new(); thread_local! { static ENABLE_COLLECT_METRICS: Cell>= Cell::default(); diff --git a/util/multisig/src/tests/secp256k1.rs b/util/multisig/src/tests/secp256k1.rs index 16ac3ba9d1..c5c59d1a3e 100644 --- a/util/multisig/src/tests/secp256k1.rs +++ b/util/multisig/src/tests/secp256k1.rs @@ -60,8 +60,7 @@ fn test_m_of_n() { let sks: Vec = (0..sigs.len()).map(|_| random_secret_key()).collect(); let pks: HashSet = sks .iter() - .enumerate() - .map(|(_i, sk)| sk.pubkey().expect("pk")) + .map(|sk| sk.pubkey().expect("pk")) .take(*pks) .collect(); let sigs: Vec = sigs diff --git a/util/network-alert/Cargo.toml b/util/network-alert/Cargo.toml index e39cd7272f..0a703190b1 100644 --- a/util/network-alert/Cargo.toml +++ b/util/network-alert/Cargo.toml @@ -13,9 +13,9 @@ ckb-multisig = { path = "../multisig", version = "= 0.119.0-pre" } ckb-types = { path = "../types", version = "= 0.119.0-pre" } ckb-util = { path = "..", version = "= 0.119.0-pre" } ckb-network = { path = "../../network", version = "= 0.119.0-pre" } -ckb-notify = { path = "../../notify", version = "= 0.119.0-pre"} +ckb-notify = { path = "../../notify", version = "= 0.119.0-pre" } ckb-jsonrpc-types = { path = "../jsonrpc-types", version = "= 0.119.0-pre" } -ckb-logger = { path = "../logger", version = "= 0.119.0-pre"} +ckb-logger = { path = "../logger", version = "= 0.119.0-pre" } ckb-app-config = { path = "../app-config", version = "= 0.119.0-pre" } ckb-error = { path = "../../error", version = "= 0.119.0-pre" } ckb-systemtime = { path = "../systemtime", version = "= 0.119.0-pre" } @@ -25,7 +25,8 @@ semver = "1.0" [dev-dependencies] ckb-crypto = { path = "../crypto", version = "= 0.119.0-pre" } ckb-async-runtime = { path = "../runtime", version = "= 0.119.0-pre" } -once_cell = "1.8.0" -ckb-systemtime = {path = "../systemtime", version = "= 0.119.0-pre", features = ["enable_faketime"]} +ckb-systemtime = { path = "../systemtime", version = "= 0.119.0-pre", features = [ + "enable_faketime", +] } faster-hex = "0.6" serde_json = "1.0" diff --git a/util/network-alert/src/notifier.rs b/util/network-alert/src/notifier.rs index 363d5b45e3..3ddbc35535 100644 --- a/util/network-alert/src/notifier.rs +++ b/util/network-alert/src/notifier.rs @@ -117,7 +117,7 @@ impl Notifier { // sort by priority self.noticed_alerts.sort_by_key(|a| { let priority: u32 = a.raw().priority().unpack(); - std::u32::MAX - priority + u32::MAX - priority }); } diff --git a/util/network-alert/src/tests/test_notifier.rs b/util/network-alert/src/tests/test_notifier.rs index 86c77b0982..eb8b906537 100644 --- a/util/network-alert/src/tests/test_notifier.rs +++ b/util/network-alert/src/tests/test_notifier.rs @@ -3,7 +3,6 @@ use ckb_async_runtime::{new_background_runtime, Handle}; use ckb_notify::NotifyService; use ckb_types::{packed, prelude::*}; -use once_cell::unsync; fn build_alert( id: u32, @@ -26,7 +25,7 @@ fn new_notifier(version: &str) -> Notifier { thread_local! { // NOTICE:we can't put the runtime directly into thread_local here, // on windows the runtime in thread_local will get stuck when dropping - static RUNTIME_HANDLE: unsync::OnceCell = unsync::OnceCell::new(); + static RUNTIME_HANDLE: std::cell::OnceCell = const { std::cell::OnceCell::new() }; } let notify_controller = RUNTIME_HANDLE.with(|runtime| { diff --git a/util/reward-calculator/src/lib.rs b/util/reward-calculator/src/lib.rs index e1975b383b..262cc9fb57 100644 --- a/util/reward-calculator/src/lib.rs +++ b/util/reward-calculator/src/lib.rs @@ -23,7 +23,7 @@ mod tests; /// block(i + PROPOSAL_WINDOW.farthest + 1)'s cellbase: /// - cellbase output capacity is block(i)'s total block reward /// - cellbase output lock is block(i)'s miner provided lock in block(i) 's cellbase output-data -/// Conventionally, We say that block(i) is block(i + PROPOSAL_WINDOW.farthest + 1)'s target block. +/// Conventionally, We say that block(i) is block(i + PROPOSAL_WINDOW.farthest + 1)'s target block. /// /// Target block's total reward consists of four parts: /// - primary block reward diff --git a/util/rich-indexer/Cargo.toml b/util/rich-indexer/Cargo.toml index 093008b0fd..b3de5e7bd9 100644 --- a/util/rich-indexer/Cargo.toml +++ b/util/rich-indexer/Cargo.toml @@ -21,7 +21,6 @@ ckb-types = { path = "../types", version = "= 0.119.0-pre" } futures = "0.3" log = "0.4" num-bigint = "0.4" -once_cell = "1.8.0" sql-builder = "3.1" sqlx = { version = "0.8.2", features = [ "runtime-tokio-rustls", diff --git a/util/rich-indexer/src/indexer/mod.rs b/util/rich-indexer/src/indexer/mod.rs index a92d2bfb74..4bddaf1a9d 100644 --- a/util/rich-indexer/src/indexer/mod.rs +++ b/util/rich-indexer/src/indexer/mod.rs @@ -30,8 +30,8 @@ use std::sync::{Arc, RwLock}; /// - block_association_uncle /// - tx_association_header_dep /// - tx_association_cell_dep -/// The detailed table design can be found in the SQL files in the resources folder of this crate - +/// The detailed table design can be found in the SQL files in the resources folder of this crate +/// /// Rich-Indexer, which is based on a relational database #[derive(Clone)] pub(crate) struct RichIndexer { diff --git a/util/rich-indexer/src/indexer_handle/async_indexer_handle/get_cells.rs b/util/rich-indexer/src/indexer_handle/async_indexer_handle/get_cells.rs index fdd501ecc2..ae17b25c56 100644 --- a/util/rich-indexer/src/indexer_handle/async_indexer_handle/get_cells.rs +++ b/util/rich-indexer/src/indexer_handle/async_indexer_handle/get_cells.rs @@ -80,7 +80,7 @@ impl AsyncRichIndexerHandle { query_builder.field("NULL as output_data"); } } - query_builder.join(&format!("{} AS query_script", script_sub_query_sql)); + query_builder.join(format!("{} AS query_script", script_sub_query_sql)); match search_key.script_type { IndexerScriptType::Lock => { query_builder.on("output.lock_script_id = query_script.id"); diff --git a/util/rich-indexer/src/indexer_handle/async_indexer_handle/get_cells_capacity.rs b/util/rich-indexer/src/indexer_handle/async_indexer_handle/get_cells_capacity.rs index 5c5aee71fe..9b72ffff7c 100644 --- a/util/rich-indexer/src/indexer_handle/async_indexer_handle/get_cells_capacity.rs +++ b/util/rich-indexer/src/indexer_handle/async_indexer_handle/get_cells_capacity.rs @@ -26,7 +26,7 @@ impl AsyncRichIndexerHandle { // query output let mut query_builder = SqlBuilder::select_from("output"); query_builder.field("CAST(SUM(output.capacity) AS BIGINT) AS total_capacity"); - query_builder.join(&format!("{} AS query_script", script_sub_query_sql)); + query_builder.join(format!("{} AS query_script", script_sub_query_sql)); match search_key.script_type { IndexerScriptType::Lock => { query_builder.on("output.lock_script_id = query_script.id"); diff --git a/util/rich-indexer/src/indexer_handle/async_indexer_handle/get_transactions.rs b/util/rich-indexer/src/indexer_handle/async_indexer_handle/get_transactions.rs index 5049dedb87..7b9b425455 100644 --- a/util/rich-indexer/src/indexer_handle/async_indexer_handle/get_transactions.rs +++ b/util/rich-indexer/src/indexer_handle/async_indexer_handle/get_transactions.rs @@ -441,7 +441,7 @@ fn build_tx_with_cell_union_sub_query( .field("output.tx_id AS tx_id") .field("1 AS io_type") .field("output.output_index AS io_index"); - query_output_builder.join(&format!( + query_output_builder.join(format!( "{} AS query_script", build_query_script_id_sql(db_driver, &search_key.script_search_mode, &mut param_index)? )); @@ -487,7 +487,7 @@ fn build_tx_with_cell_union_sub_query( query_input_builder .join("output") .on("output.id = input.output_id") - .join(&format!( + .join(format!( "{} AS query_script", build_query_script_id_sql(db_driver, &search_key.script_search_mode, &mut param_index)? )); @@ -556,9 +556,9 @@ fn build_filter( query_builder .and_where_eq("type_script.hash_type", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_ge("type_script.args", &format!("${}", param_index)); + query_builder.and_where_ge("type_script.args", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_lt("type_script.args", &format!("${}", param_index)); + query_builder.and_where_lt("type_script.args", format!("${}", param_index)); *param_index += 1; } IndexerScriptType::Type => { @@ -568,9 +568,9 @@ fn build_filter( query_builder .and_where_eq("lock_script.hash_type", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_ge("lock_script.args", &format!("${}", param_index)); + query_builder.and_where_ge("lock_script.args", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_lt("lock_script.args", &format!("${}", param_index)); + query_builder.and_where_lt("lock_script.args", format!("${}", param_index)); *param_index += 1; } } @@ -596,9 +596,9 @@ fn build_filter( if filter.output_data.is_some() { match filter.output_data_filter_mode { Some(IndexerSearchMode::Prefix) | None => { - query_builder.and_where_ge("output.data", &format!("${}", param_index)); + query_builder.and_where_ge("output.data", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_lt("output.data", &format!("${}", param_index)); + query_builder.and_where_lt("output.data", format!("${}", param_index)); *param_index += 1; } Some(IndexerSearchMode::Exact) => { diff --git a/util/rich-indexer/src/indexer_handle/async_indexer_handle/mod.rs b/util/rich-indexer/src/indexer_handle/async_indexer_handle/mod.rs index 4a99cbcc32..cd1911ab42 100644 --- a/util/rich-indexer/src/indexer_handle/async_indexer_handle/mod.rs +++ b/util/rich-indexer/src/indexer_handle/async_indexer_handle/mod.rs @@ -86,19 +86,19 @@ fn build_query_script_sql( .field("script.code_hash") .field("script.hash_type") .field("script.args") - .and_where_eq("code_hash", &format!("${}", param_index)); + .and_where_eq("code_hash", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_eq("hash_type", &format!("${}", param_index)); + query_builder.and_where_eq("hash_type", format!("${}", param_index)); *param_index += 1; match script_search_mode { Some(IndexerSearchMode::Prefix) | None => { - query_builder.and_where_ge("args", &format!("${}", param_index)); + query_builder.and_where_ge("args", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_lt("args", &format!("${}", param_index)); + query_builder.and_where_lt("args", format!("${}", param_index)); *param_index += 1; } Some(IndexerSearchMode::Exact) => { - query_builder.and_where_eq("args", &format!("${}", param_index)); + query_builder.and_where_eq("args", format!("${}", param_index)); *param_index += 1; } Some(IndexerSearchMode::Partial) => { @@ -127,19 +127,19 @@ fn build_query_script_id_sql( let mut query_builder = SqlBuilder::select_from("script"); query_builder .field("script.id") - .and_where_eq("code_hash", &format!("${}", param_index)); + .and_where_eq("code_hash", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_eq("hash_type", &format!("${}", param_index)); + query_builder.and_where_eq("hash_type", format!("${}", param_index)); *param_index += 1; match script_search_mode { Some(IndexerSearchMode::Prefix) | None => { - query_builder.and_where_ge("args", &format!("${}", param_index)); + query_builder.and_where_ge("args", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_lt("args", &format!("${}", param_index)); + query_builder.and_where_lt("args", format!("${}", param_index)); *param_index += 1; } Some(IndexerSearchMode::Exact) => { - query_builder.and_where_eq("args", &format!("${}", param_index)); + query_builder.and_where_eq("args", format!("${}", param_index)); *param_index += 1; } Some(IndexerSearchMode::Partial) => { @@ -178,9 +178,9 @@ fn build_cell_filter( query_builder .and_where_eq("type_script.hash_type", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_ge("type_script.args", &format!("${}", param_index)); + query_builder.and_where_ge("type_script.args", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_lt("type_script.args", &format!("${}", param_index)); + query_builder.and_where_lt("type_script.args", format!("${}", param_index)); *param_index += 1; } IndexerScriptType::Type => { @@ -190,9 +190,9 @@ fn build_cell_filter( query_builder .and_where_eq("lock_script.hash_type", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_ge("lock_script.args", &format!("${}", param_index)); + query_builder.and_where_ge("lock_script.args", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_lt("lock_script.args", &format!("${}", param_index)); + query_builder.and_where_lt("lock_script.args", format!("${}", param_index)); *param_index += 1; } } @@ -222,9 +222,9 @@ fn build_cell_filter( if filter.output_data.is_some() { match filter.output_data_filter_mode { Some(IndexerSearchMode::Prefix) | None => { - query_builder.and_where_ge("output.data", &format!("${}", param_index)); + query_builder.and_where_ge("output.data", format!("${}", param_index)); *param_index += 1; - query_builder.and_where_lt("output.data", &format!("${}", param_index)); + query_builder.and_where_lt("output.data", format!("${}", param_index)); *param_index += 1; } Some(IndexerSearchMode::Exact) => { diff --git a/util/rich-indexer/src/service.rs b/util/rich-indexer/src/service.rs index 17c680c108..5996f5528e 100644 --- a/util/rich-indexer/src/service.rs +++ b/util/rich-indexer/src/service.rs @@ -1,7 +1,5 @@ //!The rich-indexer service. -use std::usize; - use crate::indexer::RichIndexer; use crate::store::SQLXPool; use crate::{AsyncRichIndexerHandle, RichIndexerHandle}; diff --git a/util/rich-indexer/src/store.rs b/util/rich-indexer/src/store.rs index 1855997983..f4decd8d99 100644 --- a/util/rich-indexer/src/store.rs +++ b/util/rich-indexer/src/store.rs @@ -3,13 +3,13 @@ use ckb_app_config::{DBDriver, RichIndexerConfig}; use futures::TryStreamExt; use include_dir::{include_dir, Dir}; use log::LevelFilter; -use once_cell::sync::OnceCell; use sqlx::{ any::{Any, AnyArguments, AnyConnectOptions, AnyPoolOptions, AnyRow}, migrate::Migrator, query::{Query, QueryAs}, AnyPool, ConnectOptions, IntoArguments, Row, Transaction, }; +use std::sync::OnceLock; use tempfile::tempdir; use std::fs::{self, OpenOptions}; @@ -27,7 +27,7 @@ static MIGRATIONS_DIR: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/resources/mig #[derive(Clone, Default)] pub struct SQLXPool { - pool: Arc>, + pool: Arc>, pub(crate) db_driver: DBDriver, } @@ -261,6 +261,7 @@ fn create_sqlite(db_config: &RichIndexerConfig) { OpenOptions::new() .write(true) .create(true) + .truncate(false) .open(&db_config.store) .expect("Create db file"); } diff --git a/util/rich-indexer/src/tests/insert.rs b/util/rich-indexer/src/tests/insert.rs index 1c8fc9e26a..b48b5d0995 100644 --- a/util/rich-indexer/src/tests/insert.rs +++ b/util/rich-indexer/src/tests/insert.rs @@ -1,5 +1,3 @@ -use std::usize; - use super::*; use ckb_types::{ diff --git a/util/rich-indexer/src/tests/query.rs b/util/rich-indexer/src/tests/query.rs index 8adcba4aeb..6d9d73365b 100644 --- a/util/rich-indexer/src/tests/query.rs +++ b/util/rich-indexer/src/tests/query.rs @@ -12,10 +12,7 @@ use ckb_types::{ H256, }; -use std::{ - sync::{Arc, RwLock}, - usize, -}; +use std::sync::{Arc, RwLock}; use tokio::test; #[test] diff --git a/util/src/strings.rs b/util/src/strings.rs index 9d8b67af58..9fe79a64a8 100644 --- a/util/src/strings.rs +++ b/util/src/strings.rs @@ -18,7 +18,7 @@ use regex::Regex; /// ``` pub fn check_if_identifier_is_valid(ident: &str) -> Result<(), String> { const IDENT_PATTERN: &str = r#"^[0-9a-zA-Z_-]+$"#; - static RE: once_cell::sync::OnceCell = once_cell::sync::OnceCell::new(); + static RE: std::sync::OnceLock = std::sync::OnceLock::new(); // IDENT_PATTERN is a correct regular expression, so unwrap here let re = RE.get_or_init(|| Regex::new(IDENT_PATTERN).unwrap()); diff --git a/util/stop-handler/Cargo.toml b/util/stop-handler/Cargo.toml index 6d8e34936b..60d24bd9a3 100644 --- a/util/stop-handler/Cargo.toml +++ b/util/stop-handler/Cargo.toml @@ -13,7 +13,6 @@ ckb-logger = { path = "../logger", version = "= 0.119.0-pre" } tokio = { version = "1", features = ["sync", "rt-multi-thread"] } ckb-channel = { path = "../channel", version = "= 0.119.0-pre" } ckb-util = { path = "..", version = "= 0.119.0-pre" } -once_cell = "1.8.0" ckb-async-runtime = { path = "../runtime", version = "= 0.119.0-pre" } tokio-util = "0.7.8" diff --git a/util/stop-handler/src/stop_register.rs b/util/stop-handler/src/stop_register.rs index 73b3efbe1d..d522a12e59 100644 --- a/util/stop-handler/src/stop_register.rs +++ b/util/stop-handler/src/stop_register.rs @@ -28,21 +28,21 @@ pub fn wait_all_ckb_services_exit() { info!("All ckb threads have been stopped"); } -static CKB_HANDLES: once_cell::sync::Lazy> = - once_cell::sync::Lazy::new(|| { +static CKB_HANDLES: std::sync::LazyLock> = + std::sync::LazyLock::new(|| { Mutex::new(CkbServiceHandles { thread_handles: vec![], }) }); -static RECEIVED_STOP_SIGNAL: once_cell::sync::Lazy = - once_cell::sync::Lazy::new(AtomicBool::default); +static RECEIVED_STOP_SIGNAL: std::sync::LazyLock = + std::sync::LazyLock::new(AtomicBool::default); -static TOKIO_EXIT: once_cell::sync::Lazy = - once_cell::sync::Lazy::new(CancellationToken::new); +static TOKIO_EXIT: std::sync::LazyLock = + std::sync::LazyLock::new(CancellationToken::new); -static CROSSBEAM_EXIT_SENDERS: once_cell::sync::Lazy>>> = - once_cell::sync::Lazy::new(|| Mutex::new(vec![])); +static CROSSBEAM_EXIT_SENDERS: std::sync::LazyLock>>> = + std::sync::LazyLock::new(|| Mutex::new(vec![])); /// Create a new CancellationToken for exit signal pub fn new_tokio_exit_rx() -> CancellationToken { diff --git a/util/test-chain-utils/Cargo.toml b/util/test-chain-utils/Cargo.toml index 5a53719275..558e8674ef 100644 --- a/util/test-chain-utils/Cargo.toml +++ b/util/test-chain-utils/Cargo.toml @@ -9,14 +9,13 @@ homepage = "https://github.com/nervosnetwork/ckb" repository = "https://github.com/nervosnetwork/ckb" [dependencies] -ckb-types = {path = "../types", version = "= 0.119.0-pre"} +ckb-types = { path = "../types", version = "= 0.119.0-pre" } ckb-db = { path = "../../db", version = "= 0.119.0-pre" } ckb-store = { path = "../../store", version = "= 0.119.0-pre" } ckb-chain-spec = { path = "../../spec", version = "= 0.119.0-pre" } ckb-dao-utils = { path = "../dao/utils", version = "= 0.119.0-pre" } ckb-dao = { path = "../dao", version = "= 0.119.0-pre" } ckb-traits = { path = "../../traits", version = "= 0.119.0-pre" } -lazy_static = "1.3.0" ckb-systemtime = { path = "../systemtime", version = "= 0.119.0-pre" } ckb-resource = { path = "../../resource", version = "= 0.119.0-pre" } ckb-db-schema = { path = "../../db-schema", version = "= 0.119.0-pre" } @@ -24,4 +23,6 @@ ckb-util = { path = "..", version = "= 0.119.0-pre" } tempfile.workspace = true [dev-dependencies] -ckb-systemtime = { path = "../systemtime", version = "= 0.119.0-pre", features = ["enable_faketime"] } +ckb-systemtime = { path = "../systemtime", version = "= 0.119.0-pre", features = [ + "enable_faketime", +] } diff --git a/util/test-chain-utils/src/chain.rs b/util/test-chain-utils/src/chain.rs index 7669089979..7535ea7de4 100644 --- a/util/test-chain-utils/src/chain.rs +++ b/util/test-chain-utils/src/chain.rs @@ -16,7 +16,6 @@ use ckb_types::{ utilities::difficulty_to_compact, H256, U256, }; -use lazy_static::lazy_static; use std::fs::File; use std::io::Read; use std::path::Path; @@ -39,10 +38,8 @@ fn load_cell_from_path(path: &str) -> (CellOutput, Bytes, Script) { (cell, data, script) } -lazy_static! { - static ref SUCCESS_CELL: (CellOutput, Bytes, Script) = - load_cell_from_path("../../script/testdata/always_success"); -} +static SUCCESS_CELL: std::sync::LazyLock<(CellOutput, Bytes, Script)> = + std::sync::LazyLock::new(|| load_cell_from_path("../../script/testdata/always_success")); // #include "ckb_syscalls.h" @@ -60,10 +57,8 @@ lazy_static! { // return 0; // } -lazy_static! { - static ref LOAD_INPUT_DATA_HASH: (CellOutput, Bytes, Script) = - load_cell_from_path("vendor/load_input_data_hash"); -} +static LOAD_INPUT_DATA_HASH: std::sync::LazyLock<(CellOutput, Bytes, Script)> = + std::sync::LazyLock::new(|| load_cell_from_path("vendor/load_input_data_hash")); /// Script for loading input data hash from input data. #[doc(hidden)] @@ -86,10 +81,8 @@ pub fn load_input_data_hash_cell() -> &'static (CellOutput, Bytes, Script) { // return 0; // } -lazy_static! { - static ref LOAD_INPUT_ONE_BYTE: (CellOutput, Bytes, Script) = - load_cell_from_path("vendor/load_input_one_byte"); -} +static LOAD_INPUT_ONE_BYTE: std::sync::LazyLock<(CellOutput, Bytes, Script)> = + std::sync::LazyLock::new(|| load_cell_from_path("vendor/load_input_one_byte")); /// Script for loading one byte from input data. #[doc(hidden)] @@ -103,10 +96,8 @@ pub fn always_success_cell() -> &'static (CellOutput, Bytes, Script) { &SUCCESS_CELL } -lazy_static! { - static ref IS_EVEN_LIB: (CellOutput, Bytes, Script) = - load_cell_from_path("../../script/testdata/is_even.lib"); -} +static IS_EVEN_LIB: std::sync::LazyLock<(CellOutput, Bytes, Script)> = + std::sync::LazyLock::new(|| load_cell_from_path("../../script/testdata/is_even.lib")); #[doc(hidden)] pub fn is_even_lib() -> &'static (CellOutput, Bytes, Script) { @@ -114,10 +105,8 @@ pub fn is_even_lib() -> &'static (CellOutput, Bytes, Script) { } // from script/testdata without ty_pause -lazy_static! { - static ref LOAD_IS_EVEN: (CellOutput, Bytes, Script) = - load_cell_from_path("vendor/load_is_even_with_snapshot"); -} +static LOAD_IS_EVEN: std::sync::LazyLock<(CellOutput, Bytes, Script)> = + std::sync::LazyLock::new(|| load_cell_from_path("vendor/load_is_even_with_snapshot")); #[doc(hidden)] pub fn load_is_even() -> &'static (CellOutput, Bytes, Script) { diff --git a/util/types/Cargo.toml b/util/types/Cargo.toml index f73489ec43..d73cdb39a1 100644 --- a/util/types/Cargo.toml +++ b/util/types/Cargo.toml @@ -26,8 +26,7 @@ ckb-gen-types = { path = "../gen-types", version = "= 0.119.0-pre" } bit-vec = "0.6.3" ckb-error = { path = "../../error", version = "= 0.119.0-pre" } ckb-rational = { path = "../rational", version = "= 0.119.0-pre" } -once_cell = "1.8.0" -derive_more = { version = "0.99.0", default-features = false, features = [ +derive_more = { version = "1", default-features = false, features = [ "display", ] } ckb-merkle-mountain-range = "0.5.2" diff --git a/util/types/src/core/cell.rs b/util/types/src/core/cell.rs index e5b62499ab..c7be1c4d64 100644 --- a/util/types/src/core/cell.rs +++ b/util/types/src/core/cell.rs @@ -8,10 +8,10 @@ use crate::{ }; use ckb_error::Error; use ckb_occupied_capacity::Result as CapacityResult; -use once_cell::sync::OnceCell; use std::collections::{hash_map::Entry, HashMap, HashSet}; use std::fmt; use std::hash::{BuildHasher, Hash, Hasher}; +use std::sync::OnceLock; /// TODO(doc): @quake #[derive(Debug)] @@ -25,7 +25,7 @@ pub enum ResolvedDep { /// type alias system cells map pub type SystemCellMap = HashMap; /// system cell memory map cache -pub static SYSTEM_CELL: OnceCell = OnceCell::new(); +pub static SYSTEM_CELL: OnceLock = OnceLock::new(); const MAX_DEP_EXPANSION_LIMIT: usize = 2048; diff --git a/util/types/src/extension.rs b/util/types/src/extension.rs index 2711c8f90d..cd4f27392e 100644 --- a/util/types/src/extension.rs +++ b/util/types/src/extension.rs @@ -159,7 +159,7 @@ impl<'r> CalcExtraHash for packed::BlockReader<'r> { /// /// - If there is no extension, extra hash is the same as the uncles hash. /// - If there is a extension, then extra hash it the hash of the combination - /// of uncles hash and the extension hash. + /// of uncles hash and the extension hash. fn calc_extra_hash(&self) -> core::ExtraHashView { crate::core::ExtraHashView::new(self.calc_uncles_hash(), self.calc_extension_hash()) } diff --git a/util/types/src/global.rs b/util/types/src/global.rs index 9c02d6aac9..ed43a77516 100644 --- a/util/types/src/global.rs +++ b/util/types/src/global.rs @@ -1,7 +1,7 @@ //! Global data, initialized in the launch phase. -use once_cell::sync::OnceCell; use std::path::PathBuf; +use std::sync::OnceLock; /// ckb data directory path, located under root/data, initialized during the launch phase -pub static DATA_DIR: OnceCell = OnceCell::new(); +pub static DATA_DIR: OnceLock = OnceLock::new(); diff --git a/verification/Cargo.toml b/verification/Cargo.toml index c60cb91800..4565967bc4 100644 --- a/verification/Cargo.toml +++ b/verification/Cargo.toml @@ -19,11 +19,15 @@ ckb-chain-spec = { path = "../spec", version = "= 0.119.0-pre" } ckb-dao = { path = "../util/dao", version = "= 0.119.0-pre" } ckb-dao-utils = { path = "../util/dao/utils", version = "= 0.119.0-pre" } ckb-error = { path = "../error", version = "= 0.119.0-pre" } -derive_more = { version = "0.99.0", default-features=false, features = ["display"] } +derive_more = { version = "1", default-features = false, features = [ + "display", +] } ckb-verification-traits = { path = "./traits", version = "= 0.119.0-pre" } tokio = { version = "1", features = ["sync", "process"] } [dev-dependencies] ckb-test-chain-utils = { path = "../util/test-chain-utils", version = "= 0.119.0-pre" } ckb-resource = { path = "../resource", version = "= 0.119.0-pre" } -ckb-systemtime = {path = "../util/systemtime", version = "= 0.119.0-pre", features=["enable_faketime"]} +ckb-systemtime = { path = "../util/systemtime", version = "= 0.119.0-pre", features = [ + "enable_faketime", +] }