From ec585ba3252d0b3e2da9c1aa4bc62cae3490ad14 Mon Sep 17 00:00:00 2001 From: Boyu Yang Date: Wed, 27 Sep 2023 22:15:01 +0800 Subject: [PATCH] chore(deps): bump ckb-related crates from 0.111.0-rc8 to 0.111.0-rc9 --- Cargo.lock | 387 +++++++++++++++++++++------------------ Cargo.toml | 39 ++-- src/subcmds.rs | 23 ++- src/tests/utils/chain.rs | 3 +- 4 files changed, 242 insertions(+), 210 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3931e4f..aa45841 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -143,7 +143,7 @@ checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -217,7 +217,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn", + "syn 1.0.109", "which", ] @@ -413,9 +413,9 @@ dependencies = [ [[package]] name = "ckb-app-config" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5404b72d3e01c608c07a8b0a344d26c841827b07ba165d4aad08335f6b49349" +checksum = "f0ae7395b14859da01dbff488dcd5220e2b845ff982e241055cb00c80e8ccd9f" dependencies = [ "ckb-build-info", "ckb-chain-spec", @@ -442,21 +442,20 @@ dependencies = [ [[package]] name = "ckb-async-runtime" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86064175a5993d182ab890bac9a4af8a0138692b776dcc1ad176fb7fde3c3d86" +checksum = "ca130cc186ef415c4ab141e8d36373b185452e4410e91fb47826e11ee6782ca7" dependencies = [ "ckb-logger", "ckb-spawn", - "ckb-stop-handler", "tokio", ] [[package]] name = "ckb-block-filter" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2d55d527e677f4501777570c964c62763967bc6d747753b91b0c54eda8cdc5" +checksum = "c557d1b71ab05af712b3fd962b0e12f09183885b17d2e3e1b955fdbdb06bdbfb" dependencies = [ "ckb-async-runtime", "ckb-logger", @@ -468,15 +467,15 @@ dependencies = [ [[package]] name = "ckb-build-info" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816e9e391e610011dd8668f880601abf0756e5f9a17aedf0da006484e4f764c1" +checksum = "4fe0a91fdcee7d246081181dc3ca9591c2441270115e1167f51f80e4321ca655" [[package]] name = "ckb-chain" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42bdfd3f784dec364f2e5b25302c89bbca3c7fb975a83866c05e4724b355767" +checksum = "2fd17684383f6ac40d6cde41752b1699d4b4327bc38bc03b768e754386f35252" dependencies = [ "ckb-app-config", "ckb-chain-spec", @@ -500,9 +499,9 @@ dependencies = [ [[package]] name = "ckb-chain-spec" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5581d1578e3a0bc6f48f7e932974367769f9a19aa16bc9f1161120597ad0d572" +checksum = "93c2c55de29a705cd9ab5355968ef9bef6e8eaaff914f6fc04a32cb0d08b04c8" dependencies = [ "ckb-constant", "ckb-crypto", @@ -522,24 +521,24 @@ dependencies = [ [[package]] name = "ckb-channel" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "764d1ccbd8dcab0ab439d3024daa88f360730c9226a55af827696c933043ba5f" +checksum = "968384f13529b38a0e2160a5e940dd84faf537f296a522161fa0c1817717b0de" dependencies = [ "crossbeam-channel", ] [[package]] name = "ckb-constant" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86674aaa6bafbf7b276c6b5daeb2831a78ab2f3581a5c06ecce1ea0f66c7187c" +checksum = "feeb3174a349acb1aad6cf3f783cff4a197df536daff5bc1bf644d1a70b13fbe" [[package]] name = "ckb-crypto" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ad1f5f2cf38dcb74536079f6215ce858ebf383a1a48872e8792061c5b27dce8" +checksum = "7ccc810e118da6769d6374c742ba2429dddbd4b271d1ce100a176aa2a0b3070b" dependencies = [ "ckb-fixed-hash", "faster-hex", @@ -551,9 +550,9 @@ dependencies = [ [[package]] name = "ckb-dao" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb58c063b0155c858ced36ab171645bfcd96d2e9db34171c2578d29fdea73035" +checksum = "eb66f7f15b3fe8d9974d23a45012e693134fb72c9bc07e620996071f114227a5" dependencies = [ "byteorder", "ckb-chain-spec", @@ -564,9 +563,9 @@ dependencies = [ [[package]] name = "ckb-dao-utils" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931a1d2894abae60530bd9eed81aca34045c7690a61c307491cbd696ab8239f1" +checksum = "48b9382261bc4976bb912fd788ad4aeb535a504c6ee6f40414f4e12192c10131" dependencies = [ "byteorder", "ckb-error", @@ -575,9 +574,9 @@ dependencies = [ [[package]] name = "ckb-db" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "883a4fc286f86f6ce481afdd662bd2bc9fed0416308f92c1559536f5b4de9d6b" +checksum = "6839ec108e86c140bf136dcbf7b2a1e0b2383a00c0b1a3d9ec52ab3f7e5e77cb" dependencies = [ "ckb-app-config", "ckb-db-schema", @@ -589,9 +588,9 @@ dependencies = [ [[package]] name = "ckb-db-migration" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1eed4af9ed2ec6897415e51d427eafc03780fa2750cf82c48a711032c5291fd" +checksum = "7c3d8023f7313d8bf3d8f1d30f35cb7b3abb7cc4d0fe9289e683ba79a20d858e" dependencies = [ "ckb-db", "ckb-db-schema", @@ -603,15 +602,15 @@ dependencies = [ [[package]] name = "ckb-db-schema" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e71e72b02b83037daee4dd9a7af0b64aa237125cd6329d312e726630ac72beb1" +checksum = "0b5f65dfbc93583c70aa6094bf7dce2bf2783136933b9470905dba7952f299f6" [[package]] name = "ckb-error" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d58be6e890d6b8c68b1a126b1476b228cb307ea2c39ec3cff7e68f7b27023e4" +checksum = "77529c8b2f29d4db9eb70f85bb836d00084c00b54a465bdb7366db5f248f52b2" dependencies = [ "anyhow", "ckb-occupied-capacity", @@ -621,9 +620,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999568008a3c4ade53fb034daae13b22b0b16229c48b87679ddf8c7a0c766743" +checksum = "fa4f62a4cbd2ec08122623dbdc44601d793a9c0dcdcfb2d010e8a272605e2e2d" dependencies = [ "ckb-fixed-hash-core", "ckb-fixed-hash-macros", @@ -631,9 +630,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-core" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5035bf7533976ffb1e70984ed8048733d12ba32f41edd32916870dea7eaec0b5" +checksum = "ed0d2a23019e9ce38d54109a65bda36a37cf4d66bf712d596548046230c81da9" dependencies = [ "faster-hex", "serde", @@ -642,21 +641,21 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-macros" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff2f25b239190314a7cbb463db17365f29a89ecb6978d0237e850fec270f578" +checksum = "ae4e3b6dc5866c643f38c6a5f805d386165d340d8d2028b6f5c259e3d7fee831" dependencies = [ "ckb-fixed-hash-core", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "ckb-freezer" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1c12a8f57462565331b52d6121ba9df3447f26b8122a93e799747fc7db440f5" +checksum = "520a87f0c13d9619de3ebc3fd0b0cfdf2eb20332c5f95c1f3e2a4c770821d222" dependencies = [ "ckb-error", "ckb-logger", @@ -671,9 +670,9 @@ dependencies = [ [[package]] name = "ckb-hash" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dc5566890c8e2a43f87c3ee093c20321fdb3fb3081e0bc394c647ef718e0a0b" +checksum = "e618df4a9f44ac6bdbcffe8e6eef51faa104309a80b494042700cc69182a44cd" dependencies = [ "blake2b-ref", "blake2b-rs", @@ -681,9 +680,9 @@ dependencies = [ [[package]] name = "ckb-indexer" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826bf6c2cf92f7a289809f8c014ecbf6bfe4d0b47692374adaf3d878afaf8982" +checksum = "d1713a6f9a00a728a83cfd6344c03745e73610d20a195f4edbfe53a4f245338d" dependencies = [ "ckb-app-config", "ckb-async-runtime", @@ -703,9 +702,9 @@ dependencies = [ [[package]] name = "ckb-jsonrpc-types" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9b05336ec8f108c5a2a926c83d1a8b1bae24563ed8440ff3c8e94708f4f2c7" +checksum = "fcfba85a83d452c1ca6c75010bd12d2ceb3ee782aaf7c864d114a20b9776f72e" dependencies = [ "ckb-types", "faster-hex", @@ -715,9 +714,9 @@ dependencies = [ [[package]] name = "ckb-launcher" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fa8513d8d2917bb209995d95c245b362a76940e8a33b7f10db0fb183ad7a8e" +checksum = "7049b3fd18422cb9cc4ebc8eeeb7b3f8d7b47b097d2c881aeb307249a9514730" dependencies = [ "ckb-app-config", "ckb-async-runtime", @@ -744,7 +743,6 @@ dependencies = [ "ckb-rpc", "ckb-shared", "ckb-snapshot", - "ckb-stop-handler", "ckb-store", "ckb-sync", "ckb-tx-pool", @@ -790,6 +788,7 @@ dependencies = [ "ckb-rocksdb", "ckb-script", "ckb-shared", + "ckb-stop-handler", "ckb-store", "ckb-systemtime", "ckb-traits", @@ -822,9 +821,9 @@ dependencies = [ [[package]] name = "ckb-light-client-protocol-server" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "392e17b7ec361caa30ef986f4cd08719abecad48dcf9e52411a2a74390676a25" +checksum = "520613e265a75e7a3d1e4ea8781d0349485642416cd617542661c52558271fb4" dependencies = [ "ckb-logger", "ckb-merkle-mountain-range", @@ -837,27 +836,27 @@ dependencies = [ [[package]] name = "ckb-logger" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fba08d0db98d1f636ecb93260af14a15365ec42e4db68f9940a82e9d42f4d984" +checksum = "3666729612ac4d90de97bf6d608b5f993c0b5333160b2d707c73943f2a54b94d" dependencies = [ "log", ] [[package]] name = "ckb-logger-config" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a51c7d36e04b8c1314c4ab414ec9f74bd939bdc44716483bde6f151b0d45e7" +checksum = "b3bb3493a4872edfd2808cf548f41dd9f922b3fd45a42deaf7ce39b20e95c544" dependencies = [ "serde", ] [[package]] name = "ckb-logger-service" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "623d2645bcb7452f5ac609a93d3042db3f6733cd0a12e26d190dcf1d045dee7b" +checksum = "c65a6240e4df16c8fd6d62cbc126dcfe1007e54014a5e4dd2d16c710519c5541" dependencies = [ "backtrace", "ckb-channel", @@ -873,9 +872,9 @@ dependencies = [ [[package]] name = "ckb-memory-tracker" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b173196c81551a54c9b84c6c4814f0cc465786749b84e3f05f5c7411b03ecc9e" +checksum = "0c6c7069f373c365852421539c449adb25c55c1adb9eec2b9a711e2d9e2a769b" dependencies = [ "ckb-db", "ckb-logger", @@ -897,9 +896,9 @@ dependencies = [ [[package]] name = "ckb-metrics" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06bf52577eaf98fa8cc028f3614d28ce0e36bfe13b8f1d404d455e724bf6b227" +checksum = "688696d90af11cff93c6074ee5146f84d24ab4c7c213101133734a4d98bff14d" dependencies = [ "once_cell", "prometheus", @@ -908,28 +907,28 @@ dependencies = [ [[package]] name = "ckb-metrics-config" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088ff9a74b89269b5e7d08b95ec6137c793091687ad7d83b024e6a585a70c0fe" +checksum = "cd3f3ac9c87243ff755b61525189da7668499911d247dfb1840a32610495443a" dependencies = [ "serde", ] [[package]] name = "ckb-migration-template" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90903137fd995aa03fd999177ea2418d752f3e14b2a6482612ab363c44ea5735" +checksum = "fafaed4e85765c3c38187367488a085726a3f4c04887a772b93f15c10f9b3e51" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "ckb-multisig" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab046a79e7f89c2d85cf0667f2a2ceb20fe282d6259a14a062f41715339bba90" +checksum = "2929f66ea96a06d1426352f3f6daabf145548c1ca43d361fd827ec684dcc4949" dependencies = [ "ckb-crypto", "ckb-error", @@ -938,9 +937,9 @@ dependencies = [ [[package]] name = "ckb-network" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0468f0e732f8025898a1bed86bc924bb320226149080948521a3643731e6efc1" +checksum = "e25b3cfcf69ddca43a10ec5b480279c7f7ed2e08550aca29e3c8b923d421e229" dependencies = [ "bitflags 1.3.2", "bloom-filters", @@ -959,17 +958,17 @@ dependencies = [ "serde", "serde_json", "snap", - "socket2", + "socket2 0.4.4", "tentacle", "tokio", - "tokio-util 0.7.3", + "tokio-util 0.7.9", ] [[package]] name = "ckb-network-alert" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a65e1d2ddf8ac67f7d8d3e4c22c28d2746cc92bcdf126cb58ea6e5887267" +checksum = "4515f351c4727f37bdfad57e739a02505d6725bd254b0dd8d13bd7d5f9f22c75" dependencies = [ "ckb-app-config", "ckb-error", @@ -987,9 +986,9 @@ dependencies = [ [[package]] name = "ckb-notify" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e38c3fb3fbe912b38765fb86c08e2ed66e57fa56e668dc01f54941a3f526f988" +checksum = "705fb46a17d202cd511e17d318c4ffcf419040d4de4d23fd493d9f7a004bfe6c" dependencies = [ "ckb-app-config", "ckb-async-runtime", @@ -1001,9 +1000,9 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e960d041bb35dbc3dd382279d3b21787d543a5513184e2861249379c7fc8db" +checksum = "57f3eed44f0c2d7c644c1b92f5bde3fcbf0dd233a9121b17ae5e160a38f09e05" dependencies = [ "ckb-occupied-capacity-core", "ckb-occupied-capacity-macros", @@ -1011,29 +1010,29 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity-core" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d7de6492bfb72f0e28342f765dd73c8d54a799bf7ffee0f15515c162b20edae" +checksum = "4994fce88a54189b9750f04a1006b98b7446f006fb389c5ee2fc28505bc6388e" dependencies = [ "serde", ] [[package]] name = "ckb-occupied-capacity-macros" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c84bf32eddc68ae9b70b2d13577eb107572e7dce6b42126798e865bca5587a" +checksum = "eb6279c701cd64bc6122b4c68966d6c0625e26a5ae57bc7ba775d7ee3b8857b2" dependencies = [ "ckb-occupied-capacity-core", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "ckb-pow" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecb43c6f62b574eb6f7e59caae8d3061846a96e72713dd373ed56a2e21c7326e" +checksum = "4624f08b1e183105bd327f1ef83fa257a2b2e73eeacc2aa147806b8a61925d9e" dependencies = [ "byteorder", "ckb-hash", @@ -1045,9 +1044,9 @@ dependencies = [ [[package]] name = "ckb-proposal-table" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeaab932520512a6cc6039cf4d10f5bf4e359e2f7c72a5276bcc51a97d4de998" +checksum = "6cf57a5fc30e31bb44ac811b2e452a31a5016c6072a4764e878d886de361c76c" dependencies = [ "ckb-chain-spec", "ckb-logger", @@ -1056,9 +1055,9 @@ dependencies = [ [[package]] name = "ckb-rational" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190a827525739bc45ffe7cd672802d0c67848c5c647ae66fa24cb4f3a09fb951" +checksum = "7484e86d4581ca94e935c724299f156a5db57b4de11eb7988943d5a014fbb3f7" dependencies = [ "numext-fixed-uint", "serde", @@ -1066,9 +1065,9 @@ dependencies = [ [[package]] name = "ckb-resource" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3c63fe7b27bc03c6eb08c11309f3d59de7620a1972f591e2f93989e3ef5806" +checksum = "2ee6477b8d7d980e856559956b6dfcc36517c39d7e6da570ece9ea90bdf04b6d" dependencies = [ "ckb-system-scripts", "ckb-types", @@ -1081,9 +1080,9 @@ dependencies = [ [[package]] name = "ckb-reward-calculator" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3cbdaf5337f2e45991c67edf99a95196380700a805a393252f992d040806152" +checksum = "5bcc20734dd54107f6fbf3be487a213f14b35d7d5f5678247e01f4d0004dfba1" dependencies = [ "ckb-chain-spec", "ckb-dao", @@ -1106,9 +1105,9 @@ dependencies = [ [[package]] name = "ckb-rpc" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b307fc9d424c34c66d6b248ebc828db29d7c0e98fda4d1064564ac42e697cea1" +checksum = "9a292f36ab84f011724f7aada27a8b1290787b5f4e697fe68d8b0aa8494dd4cb" dependencies = [ "ckb-app-config", "ckb-chain", @@ -1150,18 +1149,18 @@ dependencies = [ [[package]] name = "ckb-rust-unstable-port" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0150d02d54c5753b9d1c11c0bd0843747b3a1086d487a83f58dcb0ff823559" +checksum = "e317248d02e19e5431cc22a759879a2fc9a1c77e8712ae30b3a05fd56cb46b75" dependencies = [ "is_sorted", ] [[package]] name = "ckb-script" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb09cac8d0c7f7e9c4b29dea60a5cc0f445329096520a6ca08bb3df257a7a3af" +checksum = "951dab08b0f7a19890f6378e9f87fcb0d5888d6f8090d01f91a1659e09cf10a5" dependencies = [ "byteorder", "ckb-chain-spec", @@ -1177,14 +1176,13 @@ dependencies = [ [[package]] name = "ckb-shared" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3837150734b376c4be477960a5ec1fa1564b10efb513afb216507103193de1e" +checksum = "4f97756dbceabef66ca5113f25543606e357fd3253b7ae9e1adfdcbf4484ed34" dependencies = [ "arc-swap", "ckb-async-runtime", "ckb-chain-spec", - "ckb-channel", "ckb-constant", "ckb-db", "ckb-db-schema", @@ -1203,9 +1201,9 @@ dependencies = [ [[package]] name = "ckb-snapshot" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d6fc23071a4f9207de4394f8898bb959fdba5e7f8fac53ccda172836e442ad5" +checksum = "7a9d2ec9a48192b921af49795c3c216b6e4d6e4f5e9dcd91ad9675d74a2a4ab4" dependencies = [ "arc-swap", "ckb-chain-spec", @@ -1221,27 +1219,30 @@ dependencies = [ [[package]] name = "ckb-spawn" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c63cfe988d3894b01938b6d71e52f27078f8447137a2cf515044b2943789114" +checksum = "11ce73612ff369939c0f1b31c4aa38db0650a8bd8b6fe9adbf4c10c3f1ce9d64" [[package]] name = "ckb-stop-handler" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbe52648658956c86653ecf94ae92cd8af4c04bec6412e67a46d61bcde09d0ff" +checksum = "400de8ae25f116a147bd476d5dfadeb13c24dfcfe312e91476c23a7b6a8684d2" dependencies = [ + "ckb-async-runtime", "ckb-channel", "ckb-logger", - "parking_lot 0.12.1", + "ckb-util", + "once_cell", "tokio", + "tokio-util 0.7.9", ] [[package]] name = "ckb-store" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad7e69f8ad401a32b024adbe0ad8a4ae9295f3ae894c9dd281cb962ce2e4c699" +checksum = "e37171cbf7aca4d93b332642b156641e01027ac8a16a230f7b3d51963f759ffd" dependencies = [ "ckb-app-config", "ckb-chain-spec", @@ -1258,9 +1259,9 @@ dependencies = [ [[package]] name = "ckb-sync" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb49626894d1866a5b4427a94a70e0508d322342b4d0cd26c00f29cfff825da" +checksum = "46cb2adb57eda5314ebd8447a0d33538c171ccf24d6e789ac345edea16094bc1" dependencies = [ "bitflags 1.3.2", "ckb-app-config", @@ -1286,6 +1287,7 @@ dependencies = [ "dashmap 4.0.2", "futures", "governor", + "itertools", "keyed_priority_queue", "lru", "sled", @@ -1308,24 +1310,24 @@ dependencies = [ [[package]] name = "ckb-systemtime" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ed5bd38515eb15c2ab9657ef736f169d2588d5e2988e1f3f87b0beabe06ecf" +checksum = "2b3030e3149e3caa9595a82d1ee0648513966d30657213385c0f40dba5c40c06" [[package]] name = "ckb-traits" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e61bc797d736c06de7090f35c144a98acb351d5f713ec4ad84177f388ede8740" +checksum = "fc3e504b4a4fc13485e5211d8f7361cfa0ec52cc59ca8c402829713a79f23cae" dependencies = [ "ckb-types", ] [[package]] name = "ckb-tx-pool" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceabfd1ca5ed0aaaeb4dbf666acdcfc1443ed4c5aa7ddcfa231571ec875a6b01" +checksum = "39dc86fa4055520676329ecb5951e0aa84f2370b43292123a6625a6c697e3943" dependencies = [ "ckb-app-config", "ckb-async-runtime", @@ -1354,13 +1356,14 @@ dependencies = [ "serde_json", "slab", "tokio", + "tokio-util 0.7.9", ] [[package]] name = "ckb-types" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f805202ac80736928b61d1d7fd9e71b3fecf6b08ce3ce3571dd47faaefd3ec20" +checksum = "f8adaaf97358d35e474f91e3d7719207b3ffb4394daaec51ef30cd279899cd12" dependencies = [ "bit-vec", "bytes 1.1.0", @@ -1383,9 +1386,9 @@ dependencies = [ [[package]] name = "ckb-util" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842c927ba2bea1bbca88476ec09ada66eea153e2e77fc613bb72b1b95fae5192" +checksum = "8db3f62567b0bc8f0176581aef1ce8289bbd381d6fa08c729033c953a6530081" dependencies = [ "linked-hash-map", "once_cell", @@ -1395,9 +1398,9 @@ dependencies = [ [[package]] name = "ckb-verification" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54491e0e88de476593159c4459ba1ada1caf1d54f2810e0824418335867a6f0" +checksum = "a289e07913e28c8e7682072316d0f615bbc58e7e5643baa08d3e95a29f03a7ea" dependencies = [ "ckb-chain-spec", "ckb-dao", @@ -1415,9 +1418,9 @@ dependencies = [ [[package]] name = "ckb-verification-contextual" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630e46db7116d95f6d397939a5e998e61331faafe8350c44cb4098e1e5559f6c" +checksum = "7e9080519a95a053798d4785c9236f556675824d8d5461377872e4c19e581a53" dependencies = [ "ckb-async-runtime", "ckb-chain-spec", @@ -1439,9 +1442,9 @@ dependencies = [ [[package]] name = "ckb-verification-traits" -version = "0.111.0-rc8" +version = "0.111.0-rc9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7055f47746d86efec4e8589f3fea6d29898e6db0298cbe729d51e8bda102ea5b" +checksum = "d2a6f6688083f403d51f4bb0865bdf2cdbae2582a0228411c2f33fab6c336c6d" dependencies = [ "bitflags 1.3.2", "ckb-error", @@ -1449,9 +1452,9 @@ dependencies = [ [[package]] name = "ckb-vm" -version = "0.24.0" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77a1ce8d1ed8b18041d194ffe0d647c3a707af9347f49b5f543317c73943634" +checksum = "40894adbde925bfc6584d324a06228e19d78bd877146fc7df085927552d29f50" dependencies = [ "byteorder", "bytes 1.1.0", @@ -1467,9 +1470,12 @@ dependencies = [ [[package]] name = "ckb-vm-definitions" -version = "0.24.0" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "328c7a6b5664483d5c02fae7b0ada0c407660e7064b2f1505ee6f5d07a4dbf2b" +checksum = "0253bdea8dc20db90b58fe54e01392f71989e0567d42e09e7f8e588f156551db" +dependencies = [ + "paste", +] [[package]] name = "clang-sys" @@ -1704,7 +1710,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn", + "syn 1.0.109", ] [[package]] @@ -1975,7 +1981,7 @@ checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2262,7 +2268,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.4", "tokio", "tower-service", "tracing", @@ -2391,9 +2397,9 @@ checksum = "357376465c37db3372ef6a00585d336ed3d0f11d4345eef77ebcb05865392b21" [[package]] name = "itertools" -version = "0.10.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" dependencies = [ "either", ] @@ -2446,7 +2452,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2682,14 +2688,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.3" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.36.1", + "windows-sys 0.48.0", ] [[package]] @@ -2739,7 +2744,7 @@ dependencies = [ "quote", "rustc-hash", "slab", - "syn", + "syn 1.0.109", ] [[package]] @@ -2837,7 +2842,7 @@ checksum = "621fe0f044729f810c6815cdd77e8f5e0cd803ce4f6a38380ebfc1322af98661" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2872,7 +2877,7 @@ dependencies = [ "numext-fixed-uint-core", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2925,7 +2930,7 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3081,9 +3086,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -3138,7 +3143,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -3155,9 +3160,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] @@ -3186,7 +3191,7 @@ dependencies = [ "lazy_static", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3213,9 +3218,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.18" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -3498,7 +3503,7 @@ checksum = "36791b0b801159db25130fd46ac726d2751c070260bba3a4a0a3eeb6231bb82a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3598,7 +3603,7 @@ checksum = "aaaae8f38bb311444cfb7f1979af0bc9240d95795f75f9ceddf6a59b79ceffa0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3642,7 +3647,7 @@ checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3764,6 +3769,16 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "socket2" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "spin" version = "0.5.2" @@ -3805,6 +3820,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -3813,7 +3839,7 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "unicode-xid", ] @@ -3849,12 +3875,12 @@ dependencies = [ "once_cell", "parking_lot 0.12.1", "rand 0.8.5", - "socket2", + "socket2 0.4.4", "tentacle-multiaddr", "tentacle-secio", "thiserror", "tokio", - "tokio-util 0.7.3", + "tokio-util 0.7.9", "tokio-yamux", "wasm-bindgen", "wasm-bindgen-futures", @@ -3896,7 +3922,7 @@ dependencies = [ "secp256k1", "sha2", "tokio", - "tokio-util 0.7.3", + "tokio-util 0.7.9", "unsigned-varint", "x25519-dalek", ] @@ -3946,7 +3972,7 @@ checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3999,33 +4025,32 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.20.4" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb78f30e4b41e98ca4cce5acb51168a033839a7af9e42b380355808e14e98ee0" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg 1.1.0", + "backtrace", "bytes 1.1.0", "libc", - "memchr", - "mio 0.8.3", + "mio 0.8.8", "num_cpus", "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.4", "tokio-macros", - "winapi 0.3.9", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.37", ] [[package]] @@ -4055,9 +4080,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.3" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes 1.1.0", "futures-core", @@ -4078,7 +4103,7 @@ dependencies = [ "log", "nohash-hasher", "tokio", - "tokio-util 0.7.3", + "tokio-util 0.7.9", ] [[package]] @@ -4304,7 +4329,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -4338,7 +4363,7 @@ checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4593,6 +4618,6 @@ checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "synstructure", ] diff --git a/Cargo.toml b/Cargo.toml index 84635f6..f6bfb88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,20 +9,21 @@ homepage = "https://github.com/nervosnetwork/ckb-light-client" repository = "https://github.com/nervosnetwork/ckb-light-client" [dependencies] -ckb-app-config = "=0.111.0-rc8" -ckb-async-runtime = "=0.111.0-rc8" -ckb-constant = "=0.111.0-rc8" -ckb-types = "=0.111.0-rc8" -ckb-network = "=0.111.0-rc8" -ckb-jsonrpc-types = "=0.111.0-rc8" -ckb-error = "=0.111.0-rc8" -ckb-script = "=0.111.0-rc8" -ckb-chain-spec = "=0.111.0-rc8" -ckb-traits = "=0.111.0-rc8" -ckb-resource = "=0.111.0-rc8" -ckb-verification = "=0.111.0-rc8" -ckb-systemtime = "=0.111.0-rc8" -ckb-hash = "=0.111.0-rc8" +ckb-app-config = "=0.111.0-rc9" +ckb-async-runtime = "=0.111.0-rc9" +ckb-stop-handler = "=0.111.0-rc9" +ckb-constant = "=0.111.0-rc9" +ckb-types = "=0.111.0-rc9" +ckb-network = "=0.111.0-rc9" +ckb-jsonrpc-types = "=0.111.0-rc9" +ckb-error = "=0.111.0-rc9" +ckb-script = "=0.111.0-rc9" +ckb-chain-spec = "=0.111.0-rc9" +ckb-traits = "=0.111.0-rc9" +ckb-resource = "=0.111.0-rc9" +ckb-verification = "=0.111.0-rc9" +ckb-systemtime = "=0.111.0-rc9" +ckb-hash = "=0.111.0-rc9" ckb-merkle-mountain-range = "0.5.1" golomb-coded-set = "0.2.0" rocksdb = { package = "ckb-rocksdb", version ="=0.20.0", features = ["snappy"], default-features = false } @@ -45,11 +46,11 @@ jsonrpc-http-server = "18.0" jsonrpc-server-utils = "18.0" [dev-dependencies] -ckb-launcher = "=0.111.0-rc8" -ckb-shared = "=0.111.0-rc8" -ckb-chain = "=0.111.0-rc8" -ckb-tx-pool = "=0.111.0-rc8" -ckb-store = "=0.111.0-rc8" +ckb-launcher = "=0.111.0-rc9" +ckb-shared = "=0.111.0-rc9" +ckb-chain = "=0.111.0-rc9" +ckb-tx-pool = "=0.111.0-rc9" +ckb-store = "=0.111.0-rc9" tempfile = "3.0" rand = "0.6" serde_json = "1.0" diff --git a/src/subcmds.rs b/src/subcmds.rs index f37803f..f567885 100644 --- a/src/subcmds.rs +++ b/src/subcmds.rs @@ -3,10 +3,11 @@ use std::sync::{Arc, RwLock}; use ckb_async_runtime::new_global_runtime; use ckb_chain_spec::ChainSpec; use ckb_network::{ - CKBProtocol, CKBProtocolHandler, DefaultExitHandler, ExitHandler, Flags, NetworkService, - NetworkState, SupportProtocols, + tokio, CKBProtocol, CKBProtocolHandler, Flags, NetworkService, NetworkState, SupportProtocols, }; use ckb_resource::Resource; +use ckb_stop_handler::{broadcast_exit_signals, wait_all_ckb_services_exit}; +use log::debug; use crate::{ config::RunConfig, @@ -97,8 +98,7 @@ impl RunConfig { ), ]; - let (handle, _stop_handler) = new_global_runtime(); - let exit_handler = DefaultExitHandler::default(); + let (mut handle, mut handle_stop_rx, _stop_handler) = new_global_runtime(); let network_controller = NetworkService::new( Arc::clone(&network_state), @@ -109,7 +109,6 @@ impl RunConfig { clap::crate_version!().to_owned(), Flags::DISCOVERY, ), - exit_handler.clone(), ) .start(&handle) .map_err(|err| { @@ -120,16 +119,24 @@ impl RunConfig { let service = Service::new(&self.run_env.rpc.listen_address); let rpc_server = service.start(network_controller, storage, peers, pending_txs, consensus); - let exit_handler_clone = exit_handler.clone(); ctrlc::set_handler(move || { - exit_handler_clone.notify_exit(); + broadcast_exit_signals(); }) .map_err(|err| { let errmsg = format!("failed to set Ctrl-C handler since {}", err); Error::runtime(errmsg) })?; - exit_handler.wait_for_exit(); + + wait_all_ckb_services_exit(); + + handle.drop_guard(); rpc_server.close(); + + tokio::task::block_in_place(|| { + debug!("Waiting all tokio tasks finished ..."); + handle_stop_rx.blocking_recv(); + }); + Ok(()) } } diff --git a/src/tests/utils/chain.rs b/src/tests/utils/chain.rs index a5d3153..ed65233 100644 --- a/src/tests/utils/chain.rs +++ b/src/tests/utils/chain.rs @@ -5,7 +5,7 @@ use ckb_chain::chain::{ChainController, ChainService}; use ckb_chain_spec::{consensus::Consensus, ChainSpec}; use ckb_jsonrpc_types::JsonBytes; use ckb_launcher::SharedBuilder; -use ckb_network::{DefaultExitHandler, Flags, NetworkController, NetworkService, NetworkState}; +use ckb_network::{Flags, NetworkController, NetworkService, NetworkState}; use ckb_resource::Resource; use ckb_shared::Shared; use ckb_types::{core, prelude::*}; @@ -145,7 +145,6 @@ fn dummy_network(shared: &Shared) -> NetworkController { "test".to_string(), Flags::all(), ), - DefaultExitHandler::default(), ) .start(shared.async_handle()) .expect("Start network service failed")