diff --git a/Cargo.lock b/Cargo.lock index 8c367955af..3e8a6fcd84 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -146,17 +146,11 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "antidote" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" - [[package]] name = "anyhow" -version = "1.0.66" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "app_dirs" @@ -172,9 +166,9 @@ dependencies = [ [[package]] name = "arc-swap" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "983cd8b9d4b02a6dc6ffa557262eb5858a27a0038ffffe21a0f133eaa819a164" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" [[package]] name = "array-macro" @@ -205,34 +199,35 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +checksum = "ad445822218ce64be7a341abfb0b1ea43b5c23aa83902542a4542e78309d8e5e" dependencies = [ "async-stream-impl", "futures-core", + "pin-project-lite 0.2.9", ] [[package]] name = "async-stream-impl" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +checksum = "e4655ae1a7b0cdf149156f780c5bf3f1352bc53cbd9e0a361a7ef7b22947e965" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] name = "async-trait" -version = "0.1.59" +version = "0.1.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6e93155431f3931513b243d371981bb2770112b370c82745a1d19d2f99364" +checksum = "86ea188f25f0255d8f92797797c97ebf5631fa88178beb1a46fdf5622c9a00e4" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 2.0.5", ] [[package]] @@ -247,8 +242,8 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf13118df3e3dce4b5ac930641343b91b656e4e72c8f8325838b01a4b1c9d45" dependencies = [ - "http 0.2.8", - "log 0.4.17", + "http 0.2.9", + "log", "url 2.3.1", ] @@ -258,7 +253,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi 0.3.9", ] @@ -287,19 +282,15 @@ dependencies = [ [[package]] name = "base64" -version = "0.9.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -dependencies = [ - "byteorder", - "safemem", -] +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.13.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "base64ct" @@ -307,11 +298,20 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6b4d9b1225d28d360ec6a231d65af1fd99a2a095154c8040689617290569c5c" +[[package]] +name = "basic-toml" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0de75129aa8d0cceaf750b89013f0e08804d6ec61416da787b35ad0d7cddf1" +dependencies = [ + "serde", +] + [[package]] name = "bcs" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b06b4c1f053002b70e7084ac944c77d58d5d92b2110dbc5e852735e00ad3ccc" +checksum = "4bd3ffe8b19a604421a5d461d4a70346223e535903fbc3067138bddbebddcf77" dependencies = [ "serde", "thiserror", @@ -330,9 +330,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.57.0" +version = "0.64.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd4865004a46a0aafb2a0a5eb19d3c9fc46ee5f063a6cfc605c69ac9ecf5263d" +checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" dependencies = [ "bitflags", "cexpr", @@ -340,11 +340,12 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2 1.0.53", + "quote 1.0.26", "regex", "rustc-hash", "shlex", + "syn 1.0.109", ] [[package]] @@ -429,9 +430,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array 0.14.6", ] @@ -483,7 +484,7 @@ dependencies = [ "clap", "db", "lazy_static", - "log 0.4.17", + "log", "metrics", "network", "parking_lot 0.11.2", @@ -561,27 +562,25 @@ dependencies = [ name = "bounded-executor" version = "0.1.0" dependencies = [ - "futures 0.3.25", - "tokio 1.23.0", + "futures 0.3.27", + "tokio 1.26.0", ] [[package]] name = "bstr" -version = "0.2.17" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" dependencies = [ - "lazy_static", "memchr", - "regex-automata", "serde", ] [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "byte-slice-cast" @@ -636,9 +635,9 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "bzip2-sys" @@ -681,18 +680,18 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" dependencies = [ "jobserver", ] [[package]] name = "cexpr" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ "nom", ] @@ -734,7 +733,7 @@ dependencies = [ "cfx-types", "derivative", "lazy_static", - "log 0.4.17", + "log", "malloc_size_of", "malloc_size_of_derive", "parking_lot 0.11.2", @@ -780,7 +779,7 @@ dependencies = [ "error-chain", "hashbrown 0.7.2", "lazy_static", - "log 0.4.17", + "log", "parking_lot 0.11.2", "primitives", "rlp", @@ -800,13 +799,13 @@ dependencies = [ "error-chain", "fallible-iterator", "fs_extra", - "futures 0.3.25", + "futures 0.3.27", "hashbrown 0.7.2", "keccak-hash", "kvdb", "kvdb-rocksdb", "lazy_static", - "log 0.4.17", + "log", "log4rs", "malloc_size_of", "malloc_size_of_derive", @@ -838,7 +837,7 @@ dependencies = [ "jsonrpc-core", "jsonrpc-tcp-server", "keccak-hash", - "log 0.4.17", + "log", "parking_lot 0.11.2", "tokio 0.1.22", "tokio-io", @@ -859,13 +858,13 @@ dependencies = [ name = "cfx-utils" version = "0.6.0" dependencies = [ - "log 0.4.17", + "log", "parking_lot 0.11.2", ] [[package]] name = "cfxcore" -version = "2.2.2" +version = "2.2.3" dependencies = [ "anyhow", "async-oneshot", @@ -910,7 +909,7 @@ dependencies = [ "fallible", "fallible-iterator", "fs_extra", - "futures 0.3.25", + "futures 0.3.27", "hashbrown 0.7.2", "heap-map", "hibitset", @@ -922,7 +921,7 @@ dependencies = [ "kvdb-rocksdb", "lazy_static", "link-cut-tree", - "log 0.4.17", + "log", "log4rs", "lru_time_cache", "malloc_size_of", @@ -986,7 +985,7 @@ dependencies = [ "throttling", "tiny-keccak 2.0.2", "tokio 0.2.25", - "tokio 1.23.0", + "tokio 1.26.0", "tokio-stream", "tokio-timer", "toml", @@ -1000,7 +999,7 @@ dependencies = [ "cfx-types", "cfxkey", "cfxstore", - "log 0.4.17", + "log", "parking_lot 0.11.2", "serde", "serde_derive", @@ -1015,7 +1014,7 @@ dependencies = [ "cfx-types", "edit-distance", "lazy_static", - "log 0.4.17", + "log", "malloc_size_of", "malloc_size_of_derive", "parity-crypto", @@ -1038,7 +1037,7 @@ dependencies = [ "cfxkey", "dir", "libc", - "log 0.4.17", + "log", "matches", "parity-crypto", "parity-wordlist", @@ -1062,15 +1061,15 @@ dependencies = [ "diem-infallible", "diem-metrics", "diem-types", - "futures 0.3.25", - "tokio 1.23.0", + "futures 0.3.27", + "tokio 1.26.0", ] [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "iana-time-zone", "js-sys", @@ -1083,9 +1082,9 @@ dependencies = [ [[package]] name = "chunked_transfer" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" +checksum = "cca491388666e04d7248af3f60f0c40cfb0991c72205595d7c396e3510207d1a" [[package]] name = "cipher" @@ -1107,9 +1106,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.4.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" +checksum = "77ed9a53e5d4d9c573ae844bfac6872b159cb1d1585a83b29e7a64b7eef7332a" dependencies = [ "glob", "libc", @@ -1134,7 +1133,7 @@ dependencies = [ [[package]] name = "client" -version = "2.2.2" +version = "2.2.3" dependencies = [ "anyhow", "app_dirs", @@ -1174,7 +1173,7 @@ dependencies = [ "executor", "executor-types", "fail", - "futures 0.3.25", + "futures 0.3.27", "futures01", "io", "itertools 0.9.0", @@ -1188,7 +1187,7 @@ dependencies = [ "keccak-hash", "kvdb-rocksdb", "lazy_static", - "log 0.4.17", + "log", "log4rs", "malloc_size_of", "metrics", @@ -1225,7 +1224,7 @@ dependencies = [ "textwrap 0.9.0", "threadpool", "throttling", - "tokio 1.23.0", + "tokio 1.26.0", "tokio-stream", "tokio-timer", "toml", @@ -1263,7 +1262,7 @@ dependencies = [ [[package]] name = "conflux" -version = "2.2.2" +version = "2.2.3" dependencies = [ "app_dirs", "base64ct", @@ -1297,7 +1296,7 @@ dependencies = [ "jsonrpc-tcp-server", "keccak-hash", "kvdb-rocksdb", - "log 0.4.17", + "log", "log4rs", "malloc_size_of", "mio 0.6.23", @@ -1444,11 +1443,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" dependencies = [ "cfg-if 1.0.0", - "crossbeam-channel 0.5.6", - "crossbeam-deque 0.8.2", - "crossbeam-epoch 0.9.13", + "crossbeam-channel 0.5.7", + "crossbeam-deque 0.8.3", + "crossbeam-epoch 0.9.14", "crossbeam-queue 0.3.8", - "crossbeam-utils 0.8.14", + "crossbeam-utils 0.8.15", ] [[package]] @@ -1463,12 +1462,12 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.14", + "crossbeam-utils 0.8.15", ] [[package]] @@ -1484,13 +1483,13 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ "cfg-if 1.0.0", - "crossbeam-epoch 0.9.13", - "crossbeam-utils 0.8.14", + "crossbeam-epoch 0.9.14", + "crossbeam-utils 0.8.15", ] [[package]] @@ -1510,14 +1509,14 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.13" +version = "0.9.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ "autocfg", "cfg-if 1.0.0", - "crossbeam-utils 0.8.14", - "memoffset 0.7.1", + "crossbeam-utils 0.8.15", + "memoffset 0.8.0", "scopeguard 1.1.0", ] @@ -1539,7 +1538,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.14", + "crossbeam-utils 0.8.15", ] [[package]] @@ -1555,9 +1554,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if 1.0.0", ] @@ -1600,13 +1599,12 @@ dependencies = [ [[package]] name = "csv" -version = "1.1.6" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" +checksum = "0b015497079b9a9d69c02ad25de6c0a6edef051ea6360a327d0bd05802ef64ad" dependencies = [ - "bstr", "csv-core", - "itoa 0.4.8", + "itoa 1.0.6", "ryu", "serde", ] @@ -1655,9 +1653,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.83" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf07d07d6531bfcdbe9b8b739b104610c6508dcc4d63b410585faf338241daf" +checksum = "a9c00419335c41018365ddf7e4d5f1c12ee3659ddcf3e01974650ba1de73d038" dependencies = [ "cc", "cxxbridge-flags", @@ -1667,34 +1665,34 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.83" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2eb5b96ecdc99f72657332953d4d9c50135af1bac34277801cc3937906ebd39" +checksum = "fb8307ad413a98fff033c8545ecf133e3257747b3bae935e7602aab8aa92d4ca" dependencies = [ "cc", "codespan-reporting", "once_cell", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2 1.0.53", + "quote 1.0.26", "scratch", - "syn 1.0.105", + "syn 2.0.5", ] [[package]] name = "cxxbridge-flags" -version = "1.0.83" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac040a39517fd1674e0f32177648334b0f4074625b5588a64519804ba0553b12" +checksum = "edc52e2eb08915cb12596d29d55f0b5384f00d697a646dbd269b6ecb0fbd9d31" [[package]] name = "cxxbridge-macro" -version = "1.0.83" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1362b0ddcfc4eb0a1f57b68bd77dd99f0e826958a96abd0ae9bd092e114ffed6" +checksum = "631569015d0d8d54e6c241733f944042623ab6df7bc3be7466874b05fcdb1c5f" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 2.0.5", ] [[package]] @@ -1710,16 +1708,16 @@ version = "0.1.0" dependencies = [ "kvdb", "kvdb-rocksdb", - "log 0.4.17", + "log", ] [[package]] name = "delegate" version = "0.4.2" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -1728,9 +1726,9 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fd733b5bf0bb5ca3c7cdea2135c91234c80b730e6e8a270851455a63b46c830" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -1748,9 +1746,9 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -1774,7 +1772,7 @@ dependencies = [ "diem-temppath", "diem-types", "get_if_addrs", - "log 0.4.17", + "log", "mirai-annotations", "rand 0.8.5", "serde", @@ -1793,7 +1791,7 @@ dependencies = [ "bitvec 0.22.3", "bls-signatures", "byteorder", - "bytes 1.3.0", + "bytes 1.4.0", "cfx-types", "cfxkey", "criterion", @@ -1834,9 +1832,9 @@ name = "diem-crypto-derive" version = "0.1.0" dependencies = [ "anyhow", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -1887,9 +1885,9 @@ dependencies = [ name = "diem-log-derive" version = "0.1.0" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -1918,13 +1916,13 @@ dependencies = [ "assert_approx_eq", "diem-logger", "diem-metrics-core", - "futures 0.3.25", - "hyper 0.14.23", + "futures 0.3.27", + "hyper 0.14.25", "once_cell", "prometheus 0.12.0", "rusty-fork", "serde_json", - "tokio 1.23.0", + "tokio 1.26.0", ] [[package]] @@ -2034,10 +2032,10 @@ version = "0.1.0" dependencies = [ "diem-infallible", "enum_dispatch", - "futures 0.3.25", + "futures 0.3.27", "pin-project", "thiserror", - "tokio 1.23.0", + "tokio 1.26.0", "tokio-test", ] @@ -2048,7 +2046,7 @@ dependencies = [ "aes-gcm", "anyhow", "bcs", - "bytes 1.3.0", + "bytes 1.4.0", "cfx-types", "chrono", "diem-crypto", @@ -2114,7 +2112,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.3", + "block-buffer 0.10.4", "crypto-common", "subtle", ] @@ -2163,9 +2161,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ "serde", "signature", @@ -2194,28 +2192,37 @@ checksum = "bbbaaaf38131deb9ca518a274a45bfdb8771f139517b073b16c2d3d32ae5037b" [[package]] name = "either" -version = "1.8.0" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" + +[[package]] +name = "encoding_rs" +version = "0.8.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +dependencies = [ + "cfg-if 1.0.0", +] [[package]] name = "enum-iterator" -version = "1.1.3" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a0ac4aeb3a18f92eaf09c6bb9b3ac30ff61ca95514fc58cbead1c9a6bf5401" +checksum = "706d9e7cf1c7664859d79cd524e4e53ea2b67ea03c98cc2870c5e539695d597e" dependencies = [ "enum-iterator-derive", ] [[package]] name = "enum-iterator-derive" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "828de45d0ca18782232dfb8f3ea9cc428e8ced380eb26a520baaacfc70de39ce" +checksum = "355f93763ef7b0ae1c43c4d8eccc9d5848d84ad1a1d8ce61c421d1ac85a19d05" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -2235,21 +2242,21 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5c450cf304c9e18d45db562025a14fb1ca0f5c769b6f609309f81d4c31de455" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] name = "enum_dispatch" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eb359f1476bf611266ac1f5355bc14aeca37b299d0ebccc038ee7058891c9cb" +checksum = "11f36e95862220b211a6e2aa5eca09b4fa391b13cd52ceb8035a24bf65a79de2" dependencies = [ "once_cell", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -2260,20 +2267,41 @@ checksum = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" dependencies = [ "atty", "humantime 1.3.0", - "log 0.4.17", + "log", "regex", "termcolor", ] [[package]] name = "erased-serde" -version = "0.3.23" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54558e0ba96fbe24280072642eceb9d7d442e32c7ec0ea9e7ecd7b4ea2cf4e11" +checksum = "4f2b0c2380453a92ea8b6c8e5f64ecaafccddde8ceab55ff7a8ac1029f894569" dependencies = [ "serde", ] +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "error-chain" version = "0.12.4" @@ -2281,7 +2309,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" dependencies = [ "backtrace", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -2363,7 +2391,7 @@ dependencies = [ "diem-types", "executor-types", "fail", - "futures 0.3.25", + "futures 0.3.27", "itertools 0.10.5", "move-core-types", "once_cell", @@ -2399,7 +2427,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3be3c61c59fdc91f5dbc3ea31ee8623122ce80057058be560654c5d410d181a6" dependencies = [ "lazy_static", - "log 0.4.17", + "log", "rand 0.7.3", ] @@ -2419,9 +2447,9 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", "synstructure", ] @@ -2446,9 +2474,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] @@ -2466,9 +2494,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.17" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a214f5bb88731d436478f3ae1f8a277b62124089ba9fb67f4f93fb100ef73c90" +checksum = "93ace6ec7cc19c8ed33a32eaa9ea692d7faea05006b5356b9e2b668ec4bc3955" [[package]] name = "fixed-hash" @@ -2555,9 +2583,9 @@ dependencies = [ [[package]] name = "fs_extra" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" [[package]] name = "fuchsia-cprng" @@ -2594,9 +2622,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.25" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" dependencies = [ "futures-channel", "futures-core", @@ -2609,9 +2637,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" dependencies = [ "futures-core", "futures-sink", @@ -2619,9 +2647,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" [[package]] name = "futures-cpupool" @@ -2635,9 +2663,9 @@ dependencies = [ [[package]] name = "futures-executor" -version = "0.3.25" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" dependencies = [ "futures-core", "futures-task", @@ -2646,19 +2674,19 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -2672,21 +2700,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" dependencies = [ "futures 0.1.31", "futures-channel", @@ -2732,7 +2760,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -2786,9 +2814,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -2803,39 +2831,39 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.0" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" +checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" [[package]] name = "git2" -version = "0.14.4" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0155506aab710a86160ddb504a480d2964d7ab5b9e62419be69e0032bc5931c" +checksum = "ccf7f68c2995f392c49fffb4f95ae2c873297830eb25c6bc4c114ce8f4562acc" dependencies = [ "bitflags", "libc", "libgit2-sys", - "log 0.4.17", + "log", "url 2.3.1", ] [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a" +checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" dependencies = [ "aho-corasick", "bstr", "fnv", - "log 0.4.17", + "log", "regex", ] @@ -2865,7 +2893,7 @@ dependencies = [ "futures 0.1.31", "http 0.1.21", "indexmap", - "log 0.4.17", + "log", "slab", "string", "tokio-io", @@ -2873,19 +2901,19 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" dependencies = [ - "bytes 1.3.0", + "bytes 1.4.0", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.8", + "http 0.2.9", "indexmap", "slab", - "tokio 1.23.0", + "tokio 1.26.0", "tokio-util", "tracing", ] @@ -2944,6 +2972,21 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + [[package]] name = "hex" version = "0.3.2" @@ -3065,13 +3108,13 @@ dependencies = [ [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "bytes 1.3.0", + "bytes 1.4.0", "fnv", - "itoa 1.0.4", + "itoa 1.0.6", ] [[package]] @@ -3092,8 +3135,8 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.3.0", - "http 0.2.8", + "bytes 1.4.0", + "http 0.2.9", "pin-project-lite 0.2.9", ] @@ -3124,25 +3167,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "hyper" -version = "0.10.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" -dependencies = [ - "base64 0.9.3", - "httparse", - "language-tags", - "log 0.3.9", - "mime", - "num_cpus", - "time 0.1.45", - "traitobject", - "typeable", - "unicase 1.4.2", - "url 1.7.2", -] - [[package]] name = "hyper" version = "0.12.36" @@ -3158,7 +3182,7 @@ dependencies = [ "httparse", "iovec", "itoa 0.4.8", - "log 0.4.17", + "log", "net2", "rustc_version 0.2.3", "time 0.1.45", @@ -3175,51 +3199,53 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.23" +version = "0.14.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" dependencies = [ - "bytes 1.3.0", + "bytes 1.4.0", "futures-channel", "futures-core", "futures-util", - "h2 0.3.15", - "http 0.2.8", + "h2 0.3.16", + "http 0.2.9", "http-body 0.4.5", "httparse", "httpdate", - "itoa 1.0.4", + "itoa 1.0.6", "pin-project-lite 0.2.9", "socket2", - "tokio 1.23.0", + "tokio 1.26.0", "tower-service", "tracing", "want 0.3.0", ] [[package]] -name = "hyper-native-tls" -version = "0.3.0" +name = "hyper-tls" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d375598f442742b0e66208ee12501391f1c7ac0bafb90b4fe53018f81f06068" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "antidote", - "hyper 0.10.16", + "bytes 1.4.0", + "hyper 0.14.25", "native-tls", + "tokio 1.26.0", + "tokio-native-tls", ] [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "0c17cc76786e99f8d2f055c11159e7f0091c42474dcc3189fbab96072e873e6d" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi 0.3.9", + "windows", ] [[package]] @@ -3307,9 +3333,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -3324,14 +3350,14 @@ dependencies = [ [[package]] name = "influx_db_client" -version = "0.3.6" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1af8df5705f0b30bcb504bafc9396d995a555c4d6bd6f9097729ad47b8a49a38" +checksum = "d2ef03268010ccf98c178eed83aa7377b7f6531f8ec8d43a256902c24cadac60" dependencies = [ - "hyper 0.10.16", - "hyper-native-tls", + "bytes 1.4.0", + "futures 0.3.27", + "reqwest", "serde", - "serde_derive", "serde_json", ] @@ -3352,7 +3378,7 @@ dependencies = [ "crossbeam-deque 0.7.4", "fnv", "lazy_static", - "log 0.4.17", + "log", "metrics", "mio 0.6.23", "num_cpus", @@ -3362,6 +3388,17 @@ dependencies = [ "timer", ] +[[package]] +name = "io-lifetimes" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" +dependencies = [ + "hermit-abi 0.3.1", + "libc", + "windows-sys 0.45.0", +] + [[package]] name = "iovec" version = "0.1.4" @@ -3373,9 +3410,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "ipnetwork" @@ -3409,9 +3446,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "jemalloc-sys" @@ -3436,18 +3473,18 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] @@ -3463,7 +3500,7 @@ dependencies = [ "hyper 0.12.36", "jsonrpc-core", "jsonrpc-pubsub", - "log 0.4.17", + "log", "serde", "serde_json", "url 1.7.2", @@ -3476,7 +3513,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa" dependencies = [ "futures 0.1.31", - "log 0.4.17", + "log", "serde", "serde_derive", "serde_json", @@ -3498,9 +3535,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99a847f9ec7bb52149b2786a17c9cb260d6effc6b8eeb8c16b343a487a7563a3" dependencies = [ "proc-macro-crate 0.1.5", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -3512,10 +3549,10 @@ dependencies = [ "hyper 0.12.36", "jsonrpc-core", "jsonrpc-server-utils", - "log 0.4.17", + "log", "net2", "parking_lot 0.10.2", - "unicase 2.6.0", + "unicase", ] [[package]] @@ -3525,7 +3562,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "639558e0604013be9787ae52f798506ae42bf4220fe587bdc5625871cc8b9c77" dependencies = [ "jsonrpc-core", - "log 0.4.17", + "log", "parking_lot 0.10.2", "rand 0.7.3", "serde", @@ -3541,10 +3578,10 @@ dependencies = [ "globset", "jsonrpc-core", "lazy_static", - "log 0.4.17", + "log", "tokio 0.1.22", "tokio-codec", - "unicase 2.6.0", + "unicase", ] [[package]] @@ -3555,7 +3592,7 @@ checksum = "4c2645fad19361780217525afe54984046bab2400346395244e6d74f33aa9a0a" dependencies = [ "jsonrpc-core", "jsonrpc-server-utils", - "log 0.4.17", + "log", "parking_lot 0.10.2", "tokio-service", ] @@ -3568,7 +3605,7 @@ checksum = "6596fe75209b73a2a75ebe1dce4e60e03b88a2b25e8807b667597f6315150d22" dependencies = [ "jsonrpc-core", "jsonrpc-server-utils", - "log 0.4.17", + "log", "parity-ws", "parking_lot 0.10.2", "slab", @@ -3621,7 +3658,7 @@ dependencies = [ "cfx-types", "fs-swap", "kvdb", - "log 0.4.17", + "log", "malloc_size_of", "malloc_size_of_derive", "num_cpus", @@ -3632,12 +3669,6 @@ dependencies = [ "tempdir", ] -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - [[package]] name = "lazy_static" version = "1.4.0" @@ -3655,15 +3686,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.138" +version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" [[package]] name = "libflate" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05605ab2bce11bcfc0e9c635ff29ef8b2ea83f29be257ee7d730cac3ee373093" +checksum = "97822bf791bd4d5b403713886a5fbe8bf49520fe78e323b0dc480ca1a03e50b0" dependencies = [ "adler32", "crc32fast", @@ -3672,18 +3703,18 @@ dependencies = [ [[package]] name = "libflate_lz77" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39a734c0493409afcd49deee13c006a04e3586b9761a03543c6272c9c51f2f5a" +checksum = "a52d3a8bfc85f250440e4424db7d857e241a3aebbbe301f3eb606ab15c39acbf" dependencies = [ "rle-decode-fast", ] [[package]] name = "libgit2-sys" -version = "0.13.4+1.4.2" +version = "0.14.2+1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0fa6563431ede25f5cc7f6d803c6afbc1c5d3ad3d4925d12c882bf2b526f5d1" +checksum = "7f3d95f6b51075fe9810a7ae22c7095f12b98005ab364d8544797a825ce946a4" dependencies = [ "cc", "libc", @@ -3711,10 +3742,16 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "libm" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" + [[package]] name = "librocksdb_sys" version = "0.1.0" -source = "git+https://github.com/Conflux-Chain/rust-rocksdb.git?rev=f34009ab323d6218fe85324bfdaf47762e2d1ec0#f34009ab323d6218fe85324bfdaf47762e2d1ec0" +source = "git+https://github.com/Conflux-Chain/rust-rocksdb.git?rev=29c99ae9b7c26fc3e7e67523fa5007ba9b8a7f15#29c99ae9b7c26fc3e7e67523fa5007ba9b8a7f15" dependencies = [ "bindgen", "bzip2-sys", @@ -3731,7 +3768,7 @@ dependencies = [ [[package]] name = "libtitan_sys" version = "0.0.1" -source = "git+https://github.com/Conflux-Chain/rust-rocksdb.git?rev=f34009ab323d6218fe85324bfdaf47762e2d1ec0#f34009ab323d6218fe85324bfdaf47762e2d1ec0" +source = "git+https://github.com/Conflux-Chain/rust-rocksdb.git?rev=29c99ae9b7c26fc3e7e67523fa5007ba9b8a7f15#29c99ae9b7c26fc3e7e67523fa5007ba9b8a7f15" dependencies = [ "bzip2-sys", "cc", @@ -3758,9 +3795,9 @@ dependencies = [ [[package]] name = "link-cplusplus" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" dependencies = [ "cc", ] @@ -3782,6 +3819,12 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + [[package]] name = "lock_api" version = "0.3.4" @@ -3801,15 +3844,6 @@ dependencies = [ "scopeguard 1.1.0", ] -[[package]] -name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -dependencies = [ - "log 0.4.17", -] - [[package]] name = "log" version = "0.4.17" @@ -3840,7 +3874,7 @@ dependencies = [ "fnv", "humantime 2.1.0", "libc", - "log 0.4.17", + "log", "log-mdc", "parking_lot 0.12.1", "serde", @@ -3895,8 +3929,8 @@ dependencies = [ name = "malloc_size_of_derive" version = "0.1.1" dependencies = [ - "proc-macro2 1.0.47", - "syn 1.0.105", + "proc-macro2 1.0.53", + "syn 1.0.109", "synstructure", ] @@ -3908,9 +3942,9 @@ checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" [[package]] name = "matches" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "maybe-uninit" @@ -3945,9 +3979,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] @@ -3965,24 +3999,29 @@ name = "metrics" version = "0.1.0" dependencies = [ "criterion", + "futures 0.3.27", "influx_db_client", "lazy_static", - "log 0.4.17", + "log", "log4rs", "parking_lot 0.11.2", "rand 0.7.3", "time 0.1.45", "timer", + "tokio 1.26.0", ] [[package]] name = "mime" -version = "0.2.6" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" -dependencies = [ - "log 0.3.9", -] +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" @@ -4005,7 +4044,7 @@ dependencies = [ "iovec", "kernel32-sys", "libc", - "log 0.4.17", + "log", "miow 0.2.2", "net2", "slab", @@ -4014,14 +4053,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", - "log 0.4.17", + "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -4031,7 +4070,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" dependencies = [ "lazycell", - "log 0.4.17", + "log", "mio 0.6.23", "slab", ] @@ -4042,7 +4081,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" dependencies = [ - "log 0.4.17", + "log", "mio 0.6.23", "miow 0.3.7", "winapi 0.3.9", @@ -4114,7 +4153,7 @@ checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", - "log 0.4.17", + "log", "openssl", "openssl-probe", "openssl-sys", @@ -4165,7 +4204,7 @@ dependencies = [ "keccak-hash", "lazy_static", "libc", - "log 0.4.17", + "log", "malloc_size_of", "metrics", "mio 0.6.23", @@ -4187,12 +4226,12 @@ dependencies = [ [[package]] name = "nom" -version = "5.1.2" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", - "version_check 0.9.4", + "minimal-lexical", ] [[package]] @@ -4245,9 +4284,9 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -4290,32 +4329,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", + "libm", ] [[package]] name = "num-variants" version = "0.1.0" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] name = "num_cpus" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc", ] [[package]] name = "object" -version = "0.30.0" +version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" dependencies = [ "memchr", ] @@ -4332,9 +4372,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.16.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "oorandom" @@ -4356,9 +4396,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.44" +version = "0.10.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d971fd5722fec23977260f6e81aa67d2f22cadbdc2aa049f1022d9a3be1566" +checksum = "d8b277f87dacc05a6b709965d1cbafac4649d6ce9f3ce9ceb88508b5666dfec9" dependencies = [ "bitflags", "cfg-if 1.0.0", @@ -4375,9 +4415,9 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -4388,9 +4428,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.79" +version = "0.9.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5454462c0eced1e97f2ec09036abc8da362e66802f66fd20f86854d9d8cbcbc4" +checksum = "a95792af3c4e0153c3914df2261bedd30a98476f94dc892b67dfe1d89d433a04" dependencies = [ "autocfg", "cc", @@ -4508,8 +4548,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ - "proc-macro2 1.0.47", - "syn 1.0.105", + "proc-macro2 1.0.53", + "syn 1.0.109", "synstructure", ] @@ -4541,7 +4581,7 @@ dependencies = [ "byteorder", "bytes 0.4.12", "httparse", - "log 0.4.17", + "log", "mio 0.6.23", "mio-extras", "rand 0.7.3", @@ -4589,7 +4629,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api 0.4.9", - "parking_lot_core 0.9.5", + "parking_lot_core 0.9.7", ] [[package]] @@ -4640,15 +4680,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.5" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall 0.2.16", "smallvec 1.10.0", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -4768,9 +4808,9 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -5012,7 +5052,7 @@ dependencies = [ "fixed-hash 0.5.2", "keccak-hash", "lazy_static", - "log 0.4.17", + "log", "malloc_size_of", "rand 0.7.3", "rlp", @@ -5039,13 +5079,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "thiserror", - "toml", + "toml_edit", ] [[package]] @@ -5055,10 +5094,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", - "version_check 0.9.4", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", + "version_check", ] [[package]] @@ -5067,9 +5106,9 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "version_check 0.9.4", + "proc-macro2 1.0.53", + "quote 1.0.26", + "version_check", ] [[package]] @@ -5083,9 +5122,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" dependencies = [ "unicode-ident", ] @@ -5119,9 +5158,9 @@ dependencies = [ [[package]] name = "proptest" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" +checksum = "29f1b898011ce9595050a68e60f90bad083ff2987a695a42357134c8381fba70" dependencies = [ "bit-set 0.5.3", "bitflags", @@ -5135,6 +5174,7 @@ dependencies = [ "regex-syntax", "rusty-fork", "tempfile", + "unarray", ] [[package]] @@ -5187,11 +5227,11 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.21" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ - "proc-macro2 1.0.47", + "proc-macro2 1.0.53", ] [[package]] @@ -5328,16 +5368,16 @@ name = "random-crash" version = "1.0.0" dependencies = [ "lazy_static", - "log 0.4.17", + "log", "parking_lot 0.11.2", "rand 0.7.3", ] [[package]] name = "rayon" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ "either", "rayon-core", @@ -5345,13 +5385,13 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ - "crossbeam-channel 0.5.6", - "crossbeam-deque 0.8.2", - "crossbeam-utils 0.8.14", + "crossbeam-channel 0.5.7", + "crossbeam-deque 0.8.3", + "crossbeam-utils 0.8.15", "num_cpus", ] @@ -5398,46 +5438,40 @@ checksum = "c6fd6195683d528242d8b017810909f8aaf91f111fdc4dbe8b10e4dd50e0c7f4" [[package]] name = "ref-cast" -version = "1.0.13" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b15debb4f9d60d767cd8ca9ef7abb2452922f3214671ff052defc7f3502c44" +checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.13" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abfa8511e9e94fd3de6585a3d3cd00e01ed556dc9814829280af0e8dc72a8f36" +checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 2.0.5", ] [[package]] name = "regex" -version = "1.7.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" +checksum = "cce168fea28d3e05f158bda4576cf0c844d5045bc2cc3620fa0292ed5bb5814c" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" - [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "remove_dir_all" @@ -5448,6 +5482,43 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "reqwest" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ba30cc2c0cd02af1222ed216ba659cdb2f879dfe3181852fe7c50b1d0005949" +dependencies = [ + "base64 0.21.0", + "bytes 1.4.0", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.3.16", + "http 0.2.9", + "http-body 0.4.5", + "hyper 0.14.25", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding 2.2.0", + "pin-project-lite 0.2.9", + "serde", + "serde_json", + "serde_urlencoded", + "tokio 1.26.0", + "tokio-native-tls", + "tower-service", + "url 2.3.1", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + [[package]] name = "ripemd160" version = "0.9.1" @@ -5487,7 +5558,7 @@ dependencies = [ [[package]] name = "rocksdb" version = "0.3.0" -source = "git+https://github.com/Conflux-Chain/rust-rocksdb.git?rev=f34009ab323d6218fe85324bfdaf47762e2d1ec0#f34009ab323d6218fe85324bfdaf47762e2d1ec0" +source = "git+https://github.com/Conflux-Chain/rust-rocksdb.git?rev=29c99ae9b7c26fc3e7e67523fa5007ba9b8a7f15#29c99ae9b7c26fc3e7e67523fa5007ba9b8a7f15" dependencies = [ "libc", "librocksdb_sys", @@ -5554,14 +5625,28 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.14", + "semver 1.0.17", +] + +[[package]] +name = "rustix" +version = "0.36.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys 0.45.0", ] [[package]] name = "rustversion" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "rusty-fork" @@ -5577,15 +5662,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" - -[[package]] -name = "safemem" -version = "0.3.3" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "safety-rules" @@ -5607,7 +5686,7 @@ dependencies = [ "diem-temppath", "diem-types", "diem-vault-client", - "log 0.4.17", + "log", "once_cell", "proptest", "rand 0.8.5", @@ -5646,12 +5725,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "lazy_static", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] @@ -5683,9 +5761,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scratch" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" +checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] name = "scratchpad" @@ -5742,9 +5820,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.7.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ "bitflags", "core-foundation", @@ -5755,9 +5833,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" dependencies = [ "core-foundation-sys", "libc", @@ -5774,9 +5852,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "semver-parser" @@ -5786,9 +5864,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.150" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" +checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" dependencies = [ "serde_derive", ] @@ -5815,9 +5893,9 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.7" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" +checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" dependencies = [ "serde", ] @@ -5834,22 +5912,34 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.150" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" +checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 2.0.5", ] [[package]] name = "serde_json" -version = "1.0.89" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" +checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" dependencies = [ - "itoa 1.0.4", + "itoa 1.0.6", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa 1.0.6", "ryu", "serde", ] @@ -5883,9 +5973,9 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2acd6defeddb41eb60bb468f8825d0cfd0c2a76bc03bfd235b6a1dc4f6a1ad5" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -5941,9 +6031,9 @@ name = "sha3-macro" version = "0.1.0" dependencies = [ "keccak-hash", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -5958,9 +6048,9 @@ dependencies = [ [[package]] name = "shlex" -version = "0.1.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" +checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "short-hex-str" @@ -5976,9 +6066,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] @@ -5997,9 +6087,9 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "slab" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] @@ -6025,9 +6115,9 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "133659a15339456eeeb07572eb02a91c91e9815e9cbc89566944d2c8d3efdbf6" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -6042,9 +6132,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi 0.3.9", @@ -6065,10 +6155,10 @@ dependencies = [ name = "solidity-abi-derive" version = "0.1.0" dependencies = [ - "proc-macro-crate 1.2.1", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -6197,9 +6287,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" dependencies = [ "heck", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -6242,12 +6332,23 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.105" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2 1.0.53", + "quote 1.0.26", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89c2d1c76a26822187a1fbb5964e3fff108bc208f02e820ab9dac1234f6b388a" +dependencies = [ + "proc-macro2 1.0.53", + "quote 1.0.26", "unicode-ident", ] @@ -6257,17 +6358,17 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", "unicode-xid 0.2.4", ] [[package]] name = "sysinfo" -version = "0.26.8" +version = "0.27.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ddf41e393a9133c81d5f0974195366bd57082deac6e0eb02ed39b8341c2bb6" +checksum = "a902e9050fca0a5d6877550b769abd2bd1ce8c04634b941dbe2809735e1a1e33" dependencies = [ "cfg-if 1.0.0", "core-foundation-sys", @@ -6301,23 +6402,22 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" dependencies = [ "cfg-if 1.0.0", "fastrand", - "libc", "redox_syscall 0.2.16", - "remove_dir_all", - "winapi 0.3.9", + "rustix", + "windows-sys 0.42.0", ] [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] @@ -6342,22 +6442,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 2.0.5", ] [[package]] @@ -6403,11 +6503,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.17" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" dependencies = [ - "itoa 1.0.4", + "itoa 1.0.6", "serde", "time-core", "time-macros", @@ -6421,9 +6521,9 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" [[package]] name = "time-macros" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" dependencies = [ "time-core", ] @@ -6476,9 +6576,9 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" @@ -6530,22 +6630,22 @@ dependencies = [ [[package]] name = "tokio" -version = "1.23.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ "autocfg", - "bytes 1.3.0", + "bytes 1.4.0", "libc", "memchr", - "mio 0.8.5", + "mio 0.8.6", "num_cpus", "parking_lot 0.12.1", "pin-project-lite 0.2.9", "signal-hook-registry", "socket2", "tokio-macros 1.8.2", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -6609,7 +6709,7 @@ checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" dependencies = [ "bytes 0.4.12", "futures 0.1.31", - "log 0.4.17", + "log", ] [[package]] @@ -6618,9 +6718,9 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", ] [[package]] @@ -6629,9 +6729,19 @@ version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio 1.26.0", ] [[package]] @@ -6643,7 +6753,7 @@ dependencies = [ "crossbeam-utils 0.7.2", "futures 0.1.31", "lazy_static", - "log 0.4.17", + "log", "mio 0.6.23", "num_cpus", "parking_lot 0.9.0", @@ -6664,13 +6774,13 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" dependencies = [ "futures-core", "pin-project-lite 0.2.9", - "tokio 1.23.0", + "tokio 1.26.0", ] [[package]] @@ -6704,9 +6814,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53474327ae5e166530d17f2d956afcb4f8a004de581b3cae10f12006bc8163e3" dependencies = [ "async-stream", - "bytes 1.3.0", + "bytes 1.4.0", "futures-core", - "tokio 1.23.0", + "tokio 1.26.0", "tokio-stream", ] @@ -6721,7 +6831,7 @@ dependencies = [ "crossbeam-utils 0.7.2", "futures 0.1.31", "lazy_static", - "log 0.4.17", + "log", "num_cpus", "slab", "tokio-executor", @@ -6747,7 +6857,7 @@ checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" dependencies = [ "bytes 0.4.12", "futures 0.1.31", - "log 0.4.17", + "log", "mio 0.6.23", "tokio-codec", "tokio-io", @@ -6764,7 +6874,7 @@ dependencies = [ "futures 0.1.31", "iovec", "libc", - "log 0.4.17", + "log", "mio 0.6.23", "mio-uds", "tokio-codec", @@ -6774,27 +6884,44 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.4" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" dependencies = [ - "bytes 1.3.0", + "bytes 1.4.0", "futures-core", "futures-sink", "pin-project-lite 0.2.9", - "tokio 1.23.0", + "tokio 1.26.0", "tracing", ] [[package]] name = "toml" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" + +[[package]] +name = "toml_edit" +version = "0.19.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc18466501acd8ac6a3f615dd29a3438f8ca6bb3b19537138b3106e575621274" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + [[package]] name = "tower-service" version = "0.3.2" @@ -6821,12 +6948,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" - [[package]] name = "transient-hashmap" version = "0.4.1" @@ -6835,23 +6956,23 @@ checksum = "aeb4b191d033a35edfce392a38cdcf9790b6cebcb30fa690c312c29da4dc433e" [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "trybuild" -version = "1.0.72" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db29f438342820400f2d9acfec0d363e987a38b2950bdb50a7069ed17b2148ee" +checksum = "501dbdbb99861e4ab6b60eb6a7493956a9defb644fd034bc4a5ef27c693c8a3a" dependencies = [ + "basic-toml", "glob", "once_cell", "serde", "serde_derive", "serde_json", "termcolor", - "toml", ] [[package]] @@ -6866,7 +6987,7 @@ dependencies = [ "db", "io", "lazy_static", - "log 0.4.17", + "log", "metrics", "network", "parking_lot 0.11.2", @@ -6879,12 +7000,6 @@ dependencies = [ "toml", ] -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" - [[package]] name = "typemap-ors" version = "1.0.0" @@ -6912,40 +7027,37 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unexpected" version = "0.1.0" source = "git+https://github.com/Conflux-Chain/conflux-parity-deps.git?rev=1597a9cab02343eb2322ca0ac58d39b64e3f42d1#1597a9cab02343eb2322ca0ac58d39b64e3f42d1" -[[package]] -name = "unicase" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -dependencies = [ - "version_check 0.1.5", -] - [[package]] name = "unicase" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "version_check 0.9.4", + "version_check", ] [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -6958,9 +7070,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" @@ -7007,7 +7119,7 @@ checksum = "2b8b063c2d59218ae09f22b53c42eaad0d53516457905f5235ca4bc9e99daa71" dependencies = [ "base64 0.13.1", "chunked_transfer", - "log 0.4.17", + "log", "native-tls", "once_cell", "qstring", @@ -7052,9 +7164,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "vergen" -version = "7.4.3" +version = "7.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447f9238a4553957277b3ee09d80babeae0811f1b3baefb093de1c0448437a37" +checksum = "f21b881cd6636ece9735721cf03c1fe1e774fe258683d084bb2812ab67435749" dependencies = [ "anyhow", "cfg-if 1.0.0", @@ -7065,15 +7177,9 @@ dependencies = [ "rustversion", "sysinfo", "thiserror", - "time 0.3.17", + "time 0.3.20", ] -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - [[package]] name = "version_check" version = "0.9.4" @@ -7102,12 +7208,11 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi 0.3.9", "winapi-util", ] @@ -7118,7 +7223,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" dependencies = [ "futures 0.1.31", - "log 0.4.17", + "log", "try-lock", ] @@ -7128,7 +7233,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log 0.4.17", + "log", "try-lock", ] @@ -7152,9 +7257,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -7162,53 +7267,65 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", - "log 0.4.17", + "log", "once_cell", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ - "quote 1.0.21", + "quote 1.0.26", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" dependencies = [ "js-sys", "wasm-bindgen", @@ -7258,16 +7375,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-sys" -version = "0.36.1" +name = "windows" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", + "windows-targets", ] [[package]] @@ -7277,85 +7390,97 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc", ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.0" +name = "windows-sys" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] [[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" +name = "windows-targets" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] [[package]] -name = "windows_aarch64_msvc" -version = "0.42.0" +name = "windows_aarch64_gnullvm" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] -name = "windows_i686_gnu" -version = "0.36.1" +name = "windows_aarch64_msvc" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] -name = "windows_x86_64_gnu" -version = "0.42.0" +name = "windows_x86_64_gnullvm" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.0" +name = "windows_x86_64_msvc" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" +name = "winnow" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "23d020b441f92996c80d94ae9166e8501e59c7bb56121189dc9eab3bd8216966" +dependencies = [ + "memchr", +] [[package]] -name = "windows_x86_64_msvc" -version = "0.42.0" +name = "winreg" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi 0.3.9", +] [[package]] name = "ws2_32-sys" @@ -7441,9 +7566,9 @@ version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.105", + "proc-macro2 1.0.53", + "quote 1.0.26", + "syn 1.0.109", "synstructure", ] diff --git a/Cargo.toml b/Cargo.toml index 1fada6d16e..9eff644442 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "conflux" -version = "2.2.2" +version = "2.2.3" edition = "2018" build = "build.rs" @@ -37,7 +37,7 @@ blockgen = { path = "blockgen" } txgen = { path = "transactiongen" } secret-store = { path = "secret_store" } primitives = { path = "primitives" } -log4rs = { version = "1.0.0", features = ["background_rotation", "gzip"] } +log4rs = { version = "1.2.0", features = ["background_rotation", "gzip"] } rlp = "0.4.0" keccak-hash = "0.5" rand = "0.8.3" diff --git a/client/Cargo.toml b/client/Cargo.toml index 9a40b59243..1a9a2e8ed6 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "client" -version = "2.2.2" +version = "2.2.3" edition = "2018" [dependencies] @@ -47,7 +47,7 @@ blockgen = { path = "../blockgen" } txgen = { path = "../transactiongen" } secret-store = { path = "../secret_store" } primitives = { path = "../primitives" } -log4rs = { version = "1.0.0", features = ["background_rotation", "gzip"] } +log4rs = { version = "1.2.0", features = ["background_rotation", "gzip"] } rlp = "0.4.0" keccak-hash = "0.5" rand = "0.7.2" diff --git a/client/src/rpc/impls/cfx.rs b/client/src/rpc/impls/cfx.rs index 970a53b031..3c010a014d 100644 --- a/client/src/rpc/impls/cfx.rs +++ b/client/src/rpc/impls/cfx.rs @@ -5,7 +5,7 @@ use crate::rpc::types::{ call_request::rpc_call_request_network, errors::check_rpc_address_network, pos::PoSEpochReward, PoSEconomics, RpcAddress, SponsorInfo, - TokenSupplyInfo, VoteParamsInfo, + TokenSupplyInfo, VoteParamsInfo, WrapTransaction, }; use blockgen::BlockGenerator; use cfx_state::state_trait::StateOpsTrait; @@ -31,10 +31,10 @@ use network::{ }; use parking_lot::Mutex; use primitives::{ - filter::LogFilter, Account, Block, BlockReceipts, DepositInfo, - SignedTransaction, StorageKey, StorageRoot, StorageValue, Transaction, - TransactionIndex, TransactionOutcome, TransactionWithSignature, - VoteStakeInfo, + filter::LogFilter, receipt::EVM_SPACE_SUCCESS, Account, Block, + BlockReceipts, DepositInfo, SignedTransaction, StorageKey, StorageRoot, + StorageValue, Transaction, TransactionIndex, TransactionOutcome, + TransactionWithSignature, VoteStakeInfo, }; use random_crash::*; use rlp::Rlp; @@ -48,8 +48,8 @@ use crate::{ common::delegate_convert, rpc::{ error_codes::{ - call_execution_error, invalid_params, pivot_assumption_failed, - request_rejected_in_catch_up_mode, + call_execution_error, internal_error, invalid_params, + pivot_assumption_failed, request_rejected_in_catch_up_mode, }, impls::{ common::{self, RpcImpl as CommonImpl}, @@ -57,15 +57,15 @@ use crate::{ }, traits::{cfx::Cfx, debug::LocalRpc, test::TestRpc}, types::{ - pos::Block as PosBlock, sign_call, Account as RpcAccount, - AccountPendingInfo, AccountPendingTransactions, BlameInfo, - Block as RpcBlock, BlockHashOrEpochNumber, Bytes, CallRequest, - CfxRpcLogFilter, CheckBalanceAgainstTransactionResponse, - ConsensusGraphStates, EpochNumber, - EstimateGasAndCollateralResponse, Log as RpcLog, PackedOrExecuted, - Receipt as RpcReceipt, RewardInfo as RpcRewardInfo, SendTxRequest, - Status as RpcStatus, SyncGraphStates, - Transaction as RpcTransaction, + eth::Transaction as EthTransaction, pos::Block as PosBlock, + sign_call, Account as RpcAccount, AccountPendingInfo, + AccountPendingTransactions, BlameInfo, Block as RpcBlock, + BlockHashOrEpochNumber, Bytes, CallRequest, CfxRpcLogFilter, + CheckBalanceAgainstTransactionResponse, ConsensusGraphStates, + EpochNumber, EstimateGasAndCollateralResponse, Log as RpcLog, + PackedOrExecuted, Receipt as RpcReceipt, + RewardInfo as RpcRewardInfo, SendTxRequest, Status as RpcStatus, + SyncGraphStates, Transaction as RpcTransaction, }, RpcResult, }, @@ -1636,6 +1636,282 @@ impl RpcImpl { Ok(Some(epoch_receipts)) } + + fn transactions_by_epoch( + &self, epoch_number: U64, + ) -> JsonRpcResult> { + debug!("cfx_getTransactionsByEpoch {}", epoch_number); + + let block_hashs = self + .consensus + .get_block_hashes_by_epoch(primitives::EpochNumber::Number( + epoch_number.as_u64(), + )) + .map_err(|_| JsonRpcError::internal_error())?; + + let blocks = match self + .consensus + .get_data_manager() + .blocks_by_hash_list(&block_hashs, false) + { + None => return Ok(vec![]), + Some(b) => b, + }; + + let pivot = match blocks.last() { + Some(p) => p, + None => return Err(JsonRpcError::internal_error()), + }; + + self.get_transactions(&blocks, pivot, true, epoch_number.as_u64()) + } + + fn transactions_by_block( + &self, block_hash: H256, + ) -> JsonRpcResult> { + debug!("cfx_getTransactionsByBlock {}", block_hash); + + let epoch_number = match self.get_block_epoch_number(&block_hash) { + None => return Ok(vec![]), + Some(n) => n, + }; + + let block_hashs = self + .consensus + .get_block_hashes_by_epoch(primitives::EpochNumber::Number( + epoch_number, + )) + .map_err(|_| JsonRpcError::internal_error())?; + + let blocks = match self + .consensus + .get_data_manager() + .blocks_by_hash_list(&block_hashs, false) + { + None => return Ok(vec![]), + Some(b) => b, + }; + + let pivot = match blocks.last() { + Some(p) => p, + None => return Err(JsonRpcError::internal_error()), + }; + + let include_eth_tx = if block_hash == pivot.hash() { + true + } else { + false + }; + + let mut block = vec![]; + for b in blocks.iter() { + if b.hash() == block_hash { + block.push((*b).clone()); + break; + } + } + + self.get_transactions(&block, pivot, include_eth_tx, epoch_number) + } + + fn get_transactions( + &self, blocks: &Vec>, pivot: &Arc, + include_eth_tx: bool, epoch_number: u64, + ) -> JsonRpcResult> + { + let mut transactions = vec![]; + + for b in blocks.into_iter() { + match self.get_transactions_for_block( + b, + pivot, + epoch_number, + include_eth_tx, + ) { + Ok(mut txs) => { + transactions.append(&mut txs); + } + Err(e) => bail!(internal_error(e)), + }; + } + + Ok(transactions) + } + + fn get_transactions_for_block( + &self, b: &Arc, pivot: &Arc, epoch_number: u64, + include_eth_tx: bool, + ) -> Result, String> + { + let maybe_state_root = self + .consensus + .get_data_manager() + .get_executed_state_root(&b.hash()); + + let exec_info = self + .consensus + .get_data_manager() + .block_execution_result_by_hash_with_epoch( + &b.hash(), + &pivot.hash(), + false, + false, + ); + + let network = *self.sync.network.get_network_type(); + let mut eth_transaction_idx = 0; + let mut new_index = 0; + + let mut res = vec![]; + + match exec_info { + Some(execution_result) => { + let block_receipts = &execution_result.block_receipts.receipts; + + for (id, tx) in b.transactions.iter().enumerate() { + let receipt = &block_receipts[id]; + + match tx.space() { + Space::Ethereum => { + if !include_eth_tx { + continue; + } + + let status = receipt + .outcome_status + .in_space(Space::Ethereum); + let contract_address = match status + == EVM_SPACE_SUCCESS + { + true => { + EthTransaction::deployed_contract_address( + &tx, + ) + } + false => None, + }; + + res.push(WrapTransaction::EthTransaction( + EthTransaction::from_signed( + tx, + ( + Some(pivot.hash()), + Some( + pivot.block_header.height().into(), + ), + Some(eth_transaction_idx.into()), + ), + (Some(status.into()), contract_address), + ), + )); + eth_transaction_idx += 1; + } + + Space::Native => { + let prior_gas_used = if id == 0 { + U256::zero() + } else { + block_receipts[id - 1].accumulated_gas_used + }; + + match receipt.outcome_status { + TransactionOutcome::Success + | TransactionOutcome::Failure => { + let tx_index = TransactionIndex { + block_hash: b.hash(), + real_index: id, + is_phantom: false, + rpc_index: Some(new_index), + }; + let tx_exec_error_msg = &execution_result + .block_receipts + .tx_execution_error_messages[id]; + res.push( + WrapTransaction::NativeTransaction( + RpcTransaction::from_signed( + tx, + Some( + PackedOrExecuted::Executed( + RpcReceipt::new( + (**tx).clone(), + receipt.clone(), + tx_index, + prior_gas_used, + Some(epoch_number), + execution_result + .block_receipts + .block_number, + maybe_state_root, + if tx_exec_error_msg + .is_empty() + { + None + } else { + Some( + tx_exec_error_msg + .clone(), + ) + }, + network, + )?, + ), + ), + network, + )?, + ), + ); + } + TransactionOutcome::Skipped => { + res.push( + WrapTransaction::NativeTransaction( + RpcTransaction::from_signed( + tx, None, network, + )?, + ), + ); + } + } + + new_index += 1; + } + } + } + } + None => { + for (_, tx) in b.transactions.iter().enumerate() { + match tx.space() { + Space::Ethereum => { + if !include_eth_tx { + continue; + } + + res.push(WrapTransaction::EthTransaction( + EthTransaction::from_signed( + tx, + ( + Some(pivot.hash()), + Some( + pivot.block_header.height().into(), + ), + Some(eth_transaction_idx.into()), + ), + (None, None), + ), + )); + eth_transaction_idx += 1; + } + Space::Native => { + res.push(WrapTransaction::NativeTransaction( + RpcTransaction::from_signed(tx, None, network)?, + )); + } + } + } + } + } + + Ok(res) + } } #[allow(dead_code)] @@ -1831,6 +2107,8 @@ impl LocalRpc for LocalRpcImpl { fn send_transaction( &self, tx: SendTxRequest, password: Option) -> BoxFuture; fn sign_transaction(&self, tx: SendTxRequest, password: Option) -> JsonRpcResult; + fn transactions_by_epoch(&self, epoch_number: U64) -> JsonRpcResult>; + fn transactions_by_block(&self, block_hash: H256) -> JsonRpcResult>; } } } diff --git a/client/src/rpc/impls/light.rs b/client/src/rpc/impls/light.rs index e8fc6a2d13..be6d8a2a7a 100644 --- a/client/src/rpc/impls/light.rs +++ b/client/src/rpc/impls/light.rs @@ -45,7 +45,7 @@ use crate::{ PoSEconomics, Receipt as RpcReceipt, RewardInfo as RpcRewardInfo, RpcAddress, SendTxRequest, SponsorInfo, Status as RpcStatus, SyncGraphStates, TokenSupplyInfo, Transaction as RpcTransaction, - VoteParamsInfo, + VoteParamsInfo, WrapTransaction, }, RpcBoxFuture, RpcResult, }, @@ -1253,5 +1253,7 @@ impl LocalRpc for DebugRpcImpl { fn epoch_receipts(&self, epoch: BlockHashOrEpochNumber) -> JsonRpcResult>>>; fn sign_transaction(&self, tx: SendTxRequest, password: Option) -> JsonRpcResult; fn sync_graph_state(&self) -> JsonRpcResult; + fn transactions_by_epoch(&self, epoch_number: U64) -> JsonRpcResult>; + fn transactions_by_block(&self, block_hash: H256) -> JsonRpcResult>; } } diff --git a/client/src/rpc/traits/cfx_space/debug.rs b/client/src/rpc/traits/cfx_space/debug.rs index 67a239a339..c99bd22495 100644 --- a/client/src/rpc/traits/cfx_space/debug.rs +++ b/client/src/rpc/traits/cfx_space/debug.rs @@ -5,9 +5,9 @@ use crate::rpc::types::{ BlockHashOrEpochNumber, Bytes as RpcBytes, ConsensusGraphStates, Receipt as RpcReceipt, RpcAddress, SendTxRequest, SyncGraphStates, - Transaction as RpcTransaction, + Transaction as RpcTransaction, WrapTransaction, }; -use cfx_types::{H256, H520, U128}; +use cfx_types::{H256, H520, U128, U64}; use jsonrpc_core::{BoxFuture, Result as JsonRpcResult}; use jsonrpc_derive::rpc; use network::{ @@ -109,4 +109,14 @@ pub trait LocalRpc { fn epoch_receipts( &self, epoch: BlockHashOrEpochNumber, ) -> JsonRpcResult>>>; + + #[rpc(name = "cfx_getTransactionsByEpoch")] + fn transactions_by_epoch( + &self, epoch_number: U64, + ) -> JsonRpcResult>; + + #[rpc(name = "cfx_getTransactionsByBlock")] + fn transactions_by_block( + &self, block_hash: H256, + ) -> JsonRpcResult>; } diff --git a/client/src/rpc/types.rs b/client/src/rpc/types.rs index 8fc0361f46..7655179b31 100644 --- a/client/src/rpc/types.rs +++ b/client/src/rpc/types.rs @@ -58,7 +58,7 @@ pub use self::{ Action, LocalizedBlockTrace, LocalizedTrace, LocalizedTransactionTrace, }, trace_filter::TraceFilter, - transaction::{PackedOrExecuted, Transaction}, + transaction::{PackedOrExecuted, Transaction, WrapTransaction}, tx_pool::{ AccountPendingInfo, AccountPendingTransactions, TxPoolPendingNonceRange, TxPoolStatus, TxWithPoolInfo, diff --git a/client/src/rpc/types/transaction.rs b/client/src/rpc/types/transaction.rs index c3395eab3c..b49c1ff0fd 100644 --- a/client/src/rpc/types/transaction.rs +++ b/client/src/rpc/types/transaction.rs @@ -2,7 +2,9 @@ // Conflux is free software and distributed under GNU General Public License. // See http://www.gnu.org/licenses/ -use crate::rpc::types::{receipt::Receipt, Bytes, RpcAddress}; +use crate::rpc::types::{ + eth::Transaction as ETHTransaction, receipt::Receipt, Bytes, RpcAddress, +}; use cfx_addr::Network; use cfx_types::{Space, H256, U256, U64}; use cfxkey::Error; @@ -12,6 +14,13 @@ use primitives::{ TransactionWithSignature, TransactionWithSignatureSerializePart, }; +#[derive(Debug, Clone, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub enum WrapTransaction { + NativeTransaction(Transaction), + EthTransaction(ETHTransaction), +} + #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Transaction { diff --git a/core/Cargo.toml b/core/Cargo.toml index f64c2cea91..b5c31647df 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -3,7 +3,7 @@ description = "Conflux core library" homepage = "https://www.confluxnetwork.org" license = "GPL-3.0" name = "cfxcore" -version = "2.2.2" +version = "2.2.3" edition = "2018" [dependencies] @@ -41,7 +41,7 @@ kvdb-rocksdb = {path="../db/src/kvdb-rocksdb"} lazy_static = "1.4" link-cut-tree = { path = "../util/link-cut-tree" } log = "0.4" -log4rs = { version = "1.0.0", features = ["background_rotation", "gzip"] } +log4rs = { version = "1.2.0", features = ["background_rotation", "gzip"] } lru_time_cache = "0.9.0" malloc_size_of = {path = "../util/malloc_size_of"} malloc_size_of_derive = {path = "../util/malloc_size_of_derive"} diff --git a/core/benchmark/consensus/Cargo.toml b/core/benchmark/consensus/Cargo.toml index c1e51eea5d..c24f71319c 100644 --- a/core/benchmark/consensus/Cargo.toml +++ b/core/benchmark/consensus/Cargo.toml @@ -13,7 +13,7 @@ primitives = { path = "../../../primitives" } db = { path = "../../../db" } threadpool = "1.0" parking_lot = "0.11" -log4rs = { version = "1.0.0", features = ["background_rotation", "gzip"] } +log4rs = { version = "1.2.0", features = ["background_rotation", "gzip"] } log = "0.4" [dev-dependencies] diff --git a/core/src/light_protocol/provider.rs b/core/src/light_protocol/provider.rs index a851489a4a..58b71582d7 100644 --- a/core/src/light_protocol/provider.rs +++ b/core/src/light_protocol/provider.rs @@ -1000,10 +1000,9 @@ impl Provider { } fn check_timeout(&self, io: &dyn NetworkContext, timeout: Duration) { - for peer in self - .peers - .all_peers_satisfying(|p| p.last_heartbeat.elapsed() >= timeout) - { + for peer in self.peers.all_peers_satisfying(|p| { + p.handshake_completed && p.last_heartbeat.elapsed() >= timeout + }) { io.disconnect_peer( &peer, Some(UpdateNodeOperation::Failure), diff --git a/core/src/pos/common/channel/src/lib.rs b/core/src/pos/common/channel/src/lib.rs index 130374ad8c..182adc9a98 100644 --- a/core/src/pos/common/channel/src/lib.rs +++ b/core/src/pos/common/channel/src/lib.rs @@ -9,11 +9,11 @@ //! Provides an mpsc (multi-producer single-consumer) channel wrapped in an //! [`IntGauge`](diem_metrics::IntGauge) that counts the number of currently -//! queued items. While there is only one [`channel::Receiver`], there can be -//! many [`channel::Sender`]s, which are also cheap to clone. +//! queued items. While there is only one `channel::Receiver`, there can be +//! many `channel::Sender`s, which are also cheap to clone. //! //! This channel differs from our other channel implementation, -//! [`channel::diem_channel`], in that it is just a single queue (vs. different +//! `channel::diem_channel`, in that it is just a single queue (vs. different //! queues for different keys) with backpressure (senders will block if the //! queue is full instead of evicting another item in the queue) that only //! implements FIFO (vs. LIFO or KLAST). diff --git a/core/src/pos/common/crash-handler/src/lib.rs b/core/src/pos/common/crash-handler/src/lib.rs index d94e2892a2..7d1dfbee1c 100644 --- a/core/src/pos/common/crash-handler/src/lib.rs +++ b/core/src/pos/common/crash-handler/src/lib.rs @@ -39,7 +39,10 @@ fn handle_panic(panic_info: &PanicInfo<'_>) { let info = CrashInfo { details, backtrace }; eprintln!("{}", toml::to_string_pretty(&info).unwrap()); - diem_error!("{}", crash_info = toml::to_string_pretty(&info).unwrap()); + diem_error!( + "{crash_info}", + crash_info = toml::to_string_pretty(&info).unwrap() + ); // Wait till the logs have been flushed diem_logger::flush(); diff --git a/core/src/pos/common/fallible/src/copy_from_slice.rs b/core/src/pos/common/fallible/src/copy_from_slice.rs index a5353cf823..82d29b64f7 100644 --- a/core/src/pos/common/fallible/src/copy_from_slice.rs +++ b/core/src/pos/common/fallible/src/copy_from_slice.rs @@ -7,7 +7,7 @@ use thiserror::Error; -/// A fallible wrapper around [`std::vec::Vec::copy_from_slice`] +/// A fallible wrapper around `std::vec::Vec::copy_from_slice` pub fn copy_slice_to_vec( slice: &[T], vec: &mut [T], ) -> Result<(), CopySliceError> diff --git a/core/src/pos/common/metrics/Cargo.toml b/core/src/pos/common/metrics/Cargo.toml index 5e52dcde19..f37c8631cc 100644 --- a/core/src/pos/common/metrics/Cargo.toml +++ b/core/src/pos/common/metrics/Cargo.toml @@ -12,7 +12,7 @@ edition = "2018" [dependencies] anyhow = "1.0.38" futures = "0.3.12" -hyper = { version = "0.14.4", features = ["full"] } +hyper = { version = "0.14.24", features = ["full"] } once_cell = "1.7.2" prometheus = { version = "0.12.0", default-features = false } serde_json = "1.0.64" diff --git a/core/src/pos/common/time-service/src/lib.rs b/core/src/pos/common/time-service/src/lib.rs index 0d8e0af151..5ce6fa866f 100644 --- a/core/src/pos/common/time-service/src/lib.rs +++ b/core/src/pos/common/time-service/src/lib.rs @@ -52,7 +52,7 @@ const ZERO_DURATION: Duration = Duration::from_nanos(0); /// instead of `sleep`. Note that the blocking call will actually block the /// current thread until the sleep time has elapsed. /// -/// `TimeService` tries to mirror the API provided by [`tokio::time`] to an +/// `TimeService` tries to mirror the API provided by `tokio::time` to an /// extent. The primary difference is that all time is expressed in relative /// [`Duration`]s. In other words, "sleep for 5s" vs "sleep until unix time /// 1607734460". Absolute time is provided by [`TimeService::now`] which returns @@ -61,8 +61,8 @@ const ZERO_DURATION: Duration = Duration::from_nanos(0); /// Note: you must also include the [`TimeServiceTrait`] to use the actual /// time-related functionality. /// -/// Note: we have to provide our own [`Timeout`] and [`Interval`] types that -/// use the [`Sleep`] future, since tokio's implementations are coupled to its +/// Note: we have to provide our own `Timeout` and `Interval` types that +/// use the `Sleep` future, since tokio's implementations are coupled to its /// internal Sleep future. /// /// Note: `TimeService`'s should be free (or very cheap) to clone and send diff --git a/core/src/pos/common/time-service/src/real.rs b/core/src/pos/common/time-service/src/real.rs index 5d9a42f7ca..e8a5a21664 100644 --- a/core/src/pos/common/time-service/src/real.rs +++ b/core/src/pos/common/time-service/src/real.rs @@ -18,7 +18,7 @@ use std::{ /// The real production tokio [`TimeService`](crate::TimeService). /// /// Note: `RealTimeService` is just a zero-sized type whose methods only -/// delegate to the respective [`tokio::time`] functions. +/// delegate to the respective `tokio::time` functions. #[derive(Copy, Clone, Debug, Default)] pub struct RealTimeService; diff --git a/core/src/pos/config/src/config/network_config.rs b/core/src/pos/config/src/config/network_config.rs index 0e26417d66..f142096d77 100644 --- a/core/src/pos/config/src/config/network_config.rs +++ b/core/src/pos/config/src/config/network_config.rs @@ -34,7 +34,7 @@ use std::{ // are defaults for the configurations of the system, we'll leave it here for // now. /// Current supported protocol negotiation handshake version. See -/// [`network::protocols::wire::v1`](../../network/protocols/wire/handshake/v1/ +/// `network::protocols::wire::v1`(../../network/protocols/wire/handshake/v1/ /// index.html). pub const HANDSHAKE_VERSION: u8 = 0; pub const NETWORK_CHANNEL_SIZE: usize = 1024; diff --git a/core/src/pos/crypto/crypto/src/traits.rs b/core/src/pos/crypto/crypto/src/traits.rs index 333acea172..be0b2848c5 100644 --- a/core/src/pos/crypto/crypto/src/traits.rs +++ b/core/src/pos/crypto/crypto/src/traits.rs @@ -9,7 +9,7 @@ //! primitives. //! //! For examples on how to use these traits, see the implementations of the -//! [`ed25519`] or [`bls12381`] modules. +//! `ed25519` modules. use crate::{hash::CryptoHash, HashValue}; use anyhow::Result; diff --git a/core/src/pos/mempool/shared_mempool/tasks.rs b/core/src/pos/mempool/shared_mempool/tasks.rs index 9541087995..6a8676a6f5 100644 --- a/core/src/pos/mempool/shared_mempool/tasks.rs +++ b/core/src/pos/mempool/shared_mempool/tasks.rs @@ -290,7 +290,7 @@ fn log_txn_process_results( results: &[SubmissionStatusBundle], sender: Option, ) { let sender = match sender { - Some(peer) => (peer), + Some(peer) => peer, None => { return; } diff --git a/core/src/pos/secure/storage/github/src/lib.rs b/core/src/pos/secure/storage/github/src/lib.rs index efb6478818..c47546d5eb 100644 --- a/core/src/pos/secure/storage/github/src/lib.rs +++ b/core/src/pos/secure/storage/github/src/lib.rs @@ -62,7 +62,7 @@ impl From for Error { } /// Client provides a client around the restful interface to GitHub API version -/// 3. Learn more here: https://developer.github.com/v3 +/// 3. Learn more here: `` /// /// This is not intended for securely storing private data, though perhaps it /// could with a private repository. The tooling is intended to be used to diff --git a/core/src/pos/secure/storage/src/vault.rs b/core/src/pos/secure/storage/src/vault.rs index a8a0ae4bfd..fdce88b436 100644 --- a/core/src/pos/secure/storage/src/vault.rs +++ b/core/src/pos/secure/storage/src/vault.rs @@ -32,7 +32,7 @@ const DIEM_DEFAULT: &str = "diem_default"; /// for Diem. This version currently matches the behavior of OnDiskStorage and /// InMemoryStorage. In the future, Vault will be able to create keys, sign /// messages, and handle permissions across different services. The specific -/// vault service leveraged herein is called \[KV (Key Value) Secrets Engine - Version 2\](https://www.vaultproject.io/api/secret/kv/kv-v2.html). So while Diem Secure Storage +/// vault service leveraged herein is called \[KV (Key Value) Secrets Engine - Version 2\](``). So while Diem Secure Storage /// calls pointers to data keys, Vault has actually a secret that contains /// multiple key value pairs. pub struct VaultStorage { diff --git a/core/src/pos/storage/backup/backup-service/Cargo.toml b/core/src/pos/storage/backup/backup-service/Cargo.toml index 4107ce8b0c..379c8c7b65 100644 --- a/core/src/pos/storage/backup/backup-service/Cargo.toml +++ b/core/src/pos/storage/backup/backup-service/Cargo.toml @@ -12,7 +12,7 @@ edition = "2018" anyhow = "1.0.38" bytes = "1.0.1" futures = "0.3.12" -hyper = "0.14.4" +hyper = "0.14.24" once_cell = "1.7.2" serde = { version = "1.0.124", default-features = false } tokio = { version = "1.3.0", features = ["full"] } diff --git a/core/src/pos/storage/cached-pos-ledger-db/src/speculation_cache/mod.rs b/core/src/pos/storage/cached-pos-ledger-db/src/speculation_cache/mod.rs index 4773d16193..e1a9d74bdd 100644 --- a/core/src/pos/storage/cached-pos-ledger-db/src/speculation_cache/mod.rs +++ b/core/src/pos/storage/cached-pos-ledger-db/src/speculation_cache/mod.rs @@ -109,9 +109,9 @@ impl Drop for SpeculationBlock { } } -/// SpeculationCache implements the block tree structrue. The tree is -/// reprensented by a root block id, all the children of root and a global block -/// map. Each block is an Arc> with ref_count = 1. For +/// SpeculationCache implements the block tree structure. The tree is +/// represented by a root block id, all the children of root and a global block +/// map. Each block is an `Arc>` with ref_count = 1. For /// the chidren of the root, the sole owner is `heads`. For the rest, the sole /// owner is their parent block. So when a block is dropped, all its descendants /// will be dropped recursively. In the meanwhile, wheir entries in the block diff --git a/core/src/pos/storage/pos-ledger-db/src/errors.rs b/core/src/pos/storage/pos-ledger-db/src/errors.rs index 38e8951b1d..a29a0ae6a5 100644 --- a/core/src/pos/storage/pos-ledger-db/src/errors.rs +++ b/core/src/pos/storage/pos-ledger-db/src/errors.rs @@ -5,11 +5,12 @@ // Conflux is free software and distributed under GNU General Public License. // See http://www.gnu.org/licenses/ -//! This module defines error types used by [`DiemDB`](crate::DiemDB). +//! This module defines error types used by [`PosLedgerDB`](crate::PosLedgerDB). use thiserror::Error; -/// This enum defines errors commonly used among [`DiemDB`](crate::DiemDB) APIs. +/// This enum defines errors commonly used among +/// [`PosLedgerDB`](crate::PosLedgerDB) APIs. #[derive(Debug, Error)] pub enum DiemDbError { /// A requested item is not found. diff --git a/core/src/pos/storage/pos-ledger-db/src/lib.rs b/core/src/pos/storage/pos-ledger-db/src/lib.rs index 2867c07ce8..17bad4c68e 100644 --- a/core/src/pos/storage/pos-ledger-db/src/lib.rs +++ b/core/src/pos/storage/pos-ledger-db/src/lib.rs @@ -7,8 +7,8 @@ #![forbid(unsafe_code)] -//! This crate provides [`DiemDB`] which represents physical storage of the core -//! Diem data structures. +//! This crate provides [`PosLedgerDB`] which represents physical storage of the +//! core Diem data structures. //! //! It relays read/write operations on the physical storage via [`schemadb`] to //! the underlying Key-Value storage system, and implements diem data structures diff --git a/core/src/pos/storage/schemadb/Cargo.toml b/core/src/pos/storage/schemadb/Cargo.toml index 8a344627c5..56172964fb 100644 --- a/core/src/pos/storage/schemadb/Cargo.toml +++ b/core/src/pos/storage/schemadb/Cargo.toml @@ -18,7 +18,7 @@ diem-metrics = { path = "../../common/metrics" } [dependencies.rocksdb] git = "https://github.com/Conflux-Chain/rust-rocksdb.git" -rev = "f34009ab323d6218fe85324bfdaf47762e2d1ec0" +rev = "29c99ae9b7c26fc3e7e67523fa5007ba9b8a7f15" [dev-dependencies] byteorder = "1.4.3" diff --git a/core/src/pos/storage/scratchpad/src/sparse_merkle/mod.rs b/core/src/pos/storage/scratchpad/src/sparse_merkle/mod.rs index bfec19776b..fd37772684 100644 --- a/core/src/pos/storage/scratchpad/src/sparse_merkle/mod.rs +++ b/core/src/pos/storage/scratchpad/src/sparse_merkle/mod.rs @@ -46,11 +46,11 @@ //! another example, if we want to execute transaction T_{i+2}, we can use the //! tree S_{i+1} that has updated values for both account A and B. //! -//! Each version of the tree holds a strong reference (an Arc) to its root -//! as well as one to its base tree (S_i is the base tree of S_{i+1} in the +//! Each version of the tree holds a strong reference (an `Arc`) to its +//! root as well as one to its base tree (S_i is the base tree of S_{i+1} in the //! above example). The root node in turn, recursively holds all descendant -//! nodes created in the same version, and weak references (a Weak) to all -//! descendant nodes that was created from previous versions. +//! nodes created in the same version, and weak references (a `Weak`) to +//! all descendant nodes that was created from previous versions. //! With this construction: //! 1. Even if a reference to a specific tree is dropped, the nodes //! belonging to it won't be dropped as long as trees depending on it still hold diff --git a/core/src/pos/types/executor-types/src/lib.rs b/core/src/pos/types/executor-types/src/lib.rs index 5e3da91781..d03f739d0a 100644 --- a/core/src/pos/types/executor-types/src/lib.rs +++ b/core/src/pos/types/executor-types/src/lib.rs @@ -80,8 +80,8 @@ pub trait BlockExecutor: Send { /// Commits a block and all its ancestors in a batch manner. /// /// Returns `Ok(Result, Vec)` if - /// successful, where Vec is a vector of transactions that - /// were kept from the submitted blocks, and Vec is a + /// successful, where `Vec` is a vector of transactions that + /// were kept from the submitted blocks, and `Vec` is a /// vector of reconfiguration events in the submitted blocks fn commit_blocks( &self, block_ids: Vec, @@ -113,8 +113,7 @@ pub struct StateComputeResult { /// Consensus. root_hash: HashValue, /// Represents the roots of all the full subtrees from left to right in - /// this accumulator after the execution. For details, please see - /// [`InMemoryAccumulator`](accumulator::InMemoryAccumulator). + /// this accumulator after the execution. frozen_subtree_roots: Vec, /// The frozen subtrees roots of the parent block, diff --git a/core/src/pos/types/move-core-types/src/gas_schedule.rs b/core/src/pos/types/move-core-types/src/gas_schedule.rs index 5cac59a3da..cdc89c749b 100644 --- a/core/src/pos/types/move-core-types/src/gas_schedule.rs +++ b/core/src/pos/types/move-core-types/src/gas_schedule.rs @@ -195,8 +195,8 @@ pub struct GasConstants { /// ~5 microseconds should equal one unit of computational gas. We bound /// the maximum computational time of any given transaction at roughly /// 20 seconds. We want this number and `MAX_PRICE_PER_GAS_UNIT` to - /// always satisfy the inequality that MAXIMUM_NUMBER_OF_GAS_UNITS * - /// MAX_PRICE_PER_GAS_UNIT < min(u64::MAX, GasUnits::MAX) + /// always satisfy the inequality that `MAXIMUM_NUMBER_OF_GAS_UNITS * + /// MAX_PRICE_PER_GAS_UNIT < min(u64::MAX, GasUnits::MAX)` /// NB: The bound is set quite high since custom scripts aren't allowed /// except from predefined and vetted senders. pub maximum_number_of_gas_units: GasUnits, diff --git a/core/src/pos/types/move-core-types/src/identifier.rs b/core/src/pos/types/move-core-types/src/identifier.rs index c66a90074d..a5575ec0bc 100644 --- a/core/src/pos/types/move-core-types/src/identifier.rs +++ b/core/src/pos/types/move-core-types/src/identifier.rs @@ -103,7 +103,7 @@ impl Identifier { /// Returns true if this string is a valid identifier. pub fn is_valid(s: impl AsRef) -> bool { is_valid(s.as_ref()) } - /// Returns if this identifier is "". + /// Returns if this identifier is `""`. /// TODO: remove once we fully separate CompiledScript & CompiledModule. pub fn is_self(&self) -> bool { &*self.0 == "" } diff --git a/core/src/pos/types/src/access_path.rs b/core/src/pos/types/src/access_path.rs index 9cb0b435ca..eebcbd07b9 100644 --- a/core/src/pos/types/src/access_path.rs +++ b/core/src/pos/types/src/access_path.rs @@ -7,6 +7,7 @@ //! Suppose we have the following data structure in a smart contract: //! +//! ```solidity //! struct B { //! Map mymap; //! } @@ -19,7 +20,7 @@ //! struct C { //! List mylist; //! } -//! +//! ``` //! A a; //! C c; //! @@ -29,17 +30,19 @@ //! query `/c/mylist`. //! //! So an account stores its data in a directory structure, for example: +//! ```txt //! /balance: 10 //! /a/b/mymap: {"Bob" => "abcd", "Carol" => "efgh"} //! /a/myint: 20 //! /c/mylist: [3, 5, 7, 9] +//! ``` //! //! If someone needs to query the map above and find out what value associated //! with "Bob" is, `address` will be set to Alice and `path` will be set to //! "/a/b/mymap/Bob". //! -//! On the other hand, if you want to query only /a/*, `address` will be -//! set to Alice and `path` will be set to "/a" and use the `get_prefix()` +//! On the other hand, if you want to query only `/a/*`, `address` will +//! be set to Alice and `path` will be set to "/a" and use the `get_prefix()` //! method from statedb use crate::account_address::AccountAddress; diff --git a/core/src/pos/types/src/proof/definition.rs b/core/src/pos/types/src/proof/definition.rs index 52a1919297..c29018a01e 100644 --- a/core/src/pos/types/src/proof/definition.rs +++ b/core/src/pos/types/src/proof/definition.rs @@ -292,9 +292,6 @@ where V: CryptoHash /// new leaves. If the client can verify that it can indeed obtain the new root /// hash by appending these new leaves, it can be convinced that the two /// accumulators are consistent. -/// -/// See [`crate::proof::accumulator::Accumulator::append_subtrees`] for more -/// details. #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] pub struct AccumulatorConsistencyProof { /// The subtrees representing the newly appended leaves. diff --git a/core/src/pos/types/src/proof/position/mod.rs b/core/src/pos/types/src/proof/position/mod.rs index 5e18b1402e..e843e74b0e 100644 --- a/core/src/pos/types/src/proof/position/mod.rs +++ b/core/src/pos/types/src/proof/position/mod.rs @@ -393,9 +393,6 @@ impl Iterator for FrozenSubTreeIterator { /// `FrozenSubtreeSiblingIterator` yields the positions of required subtrees if /// we want to append these subtrees to the existing accumulator to generate a /// bigger one of size `new_num_leaves`. -/// -/// See [`crate::proof::accumulator::Accumulator::append_subtrees`] for more -/// details. pub struct FrozenSubtreeSiblingIterator { current_num_leaves: LeafCount, remaining_new_leaves: LeafCount, diff --git a/core/src/pos/types/src/validator_config.rs b/core/src/pos/types/src/validator_config.rs index 48c0736d13..3f153212e0 100644 --- a/core/src/pos/types/src/validator_config.rs +++ b/core/src/pos/types/src/validator_config.rs @@ -47,9 +47,9 @@ pub struct ValidatorConfig { pub consensus_public_key: ConsensusPublicKey, /// None if the leader election does not need VRF. pub vrf_public_key: Option, - /// This is an bcs serialized Vec + /// This is an bcs serialized `Vec` pub validator_network_addresses: Vec, - /// This is an bcs serialized Vec + /// This is an bcs serialized `Vec` pub fullnode_network_addresses: Vec, } diff --git a/core/storage/Cargo.toml b/core/storage/Cargo.toml index 7a2e058db7..d43dbf6560 100644 --- a/core/storage/Cargo.toml +++ b/core/storage/Cargo.toml @@ -23,7 +23,7 @@ kvdb = "0.4" kvdb-rocksdb = {path="../../db/src/kvdb-rocksdb"} lazy_static = "1.4" log = "0.4" -log4rs = { version = "1.0.0", features = ["background_rotation", "gzip"] } +log4rs = { version = "1.2.0", features = ["background_rotation", "gzip"] } malloc_size_of = {path = "../../util/malloc_size_of"} malloc_size_of_derive = {path = "../../util/malloc_size_of_derive"} memoffset = "0.5.1" diff --git a/core/storage/src/impls/delta_mpt/cache/algorithm/recent_lfu.rs b/core/storage/src/impls/delta_mpt/cache/algorithm/recent_lfu.rs index e3d5fa4a5e..4cf01f2b71 100644 --- a/core/storage/src/impls/delta_mpt/cache/algorithm/recent_lfu.rs +++ b/core/storage/src/impls/delta_mpt/cache/algorithm/recent_lfu.rs @@ -11,7 +11,7 @@ use super::{ use malloc_size_of_derive::MallocSizeOf as MallocSizeOfDerive; use rand::{Rng, SeedableRng}; use rand_chacha::ChaChaRng; -use std::{hint, mem}; +use std::hint; /// In RecentLFU we keep an LRU to maintain frequency for alpha * cache_slots /// recently visited elements. When inserting the most recent element, evict the @@ -229,22 +229,11 @@ struct CacheStoreUtilLRUMiss< impl<'a, 'b, PosT: PrimitiveNum, CacheIndexT: CacheIndexTrait> CacheStoreUtilLRUMiss<'a, 'b, PosT, CacheIndexT> { - fn new( + fn new( metadata: CacheStoreUtilLRUHit<'a, PosT, CacheIndexT>, - cache_index: CacheIndexT, new_metadata: &'b mut RecentLFUMetadata, - rng: &mut RngT, ) -> Self { - *new_metadata = RecentLFUMetadata:: { - frequency: - RecentLFUMetadata::::init_visit_counter_random_bits( - rng, - ), - lru_handle: Default::default(), - cache_index: cache_index, - }; - Self { new_metadata, metadata, @@ -368,16 +357,20 @@ impl CacheAlgorithm } } } else { + let mut hole = Hole::<_>::new_uninit_pointer(RecentLFUMetadata:: { + frequency: + RecentLFUMetadata::::init_visit_counter_random_bits( + &mut self.counter_rng, + ), + lru_handle: Default::default(), + cache_index, + }); // r_lfu_handle equals NULL_POS. if self.frequency_lru.has_space() { - let mut hole: Hole> = - unsafe { mem::uninitialized() }; { let mut lru_cache_store_util = CacheStoreUtilLRUMiss::new( self.frequency_heap.get_array_mut(), - cache_index, &mut hole.value, - &mut self.counter_rng, ); self.frequency_lru @@ -415,15 +408,11 @@ impl CacheAlgorithm } } } else { - let mut hole: Hole> = - unsafe { mem::uninitialized() }; let lru_access_result; { let mut lru_cache_store_util = CacheStoreUtilLRUMiss::new( self.frequency_heap.get_array_mut(), - cache_index, &mut hole.value, - &mut self.counter_rng, ); lru_access_result = self .frequency_lru @@ -450,7 +439,7 @@ impl CacheAlgorithm }; evicted_cache_index = evicted_r_lfu_metadata.cache_index; - hole.pointer_pos = evicted_r_lfu_metadata; + hole.pointer_pos.write(evicted_r_lfu_metadata); // The caller should read the the returned // CacheAccessResult and diff --git a/core/storage/src/impls/delta_mpt/cache/algorithm/removable_heap.rs b/core/storage/src/impls/delta_mpt/cache/algorithm/removable_heap.rs index 9f7af4f00b..d274b2b3a6 100644 --- a/core/storage/src/impls/delta_mpt/cache/algorithm/removable_heap.rs +++ b/core/storage/src/impls/delta_mpt/cache/algorithm/removable_heap.rs @@ -235,7 +235,7 @@ impl RemovableHeap { ); value_util.set_handle(self.get_unchecked_mut(array_pos), array_pos); } - hole.pointer_pos = self.get_unchecked_mut(pos); + hole.pointer_pos.write(self.get_unchecked_mut(pos)); array_pos } @@ -442,14 +442,21 @@ impl< } pub struct Hole { - pub pointer_pos: *mut ValueType, + pub pointer_pos: MaybeUninit<*mut ValueType>, pub value: ValueType, } impl Hole { + pub fn new_uninit_pointer(value: ValueType) -> Self { + Self { + pointer_pos: MaybeUninit::uninit(), + value, + } + } + pub fn new(pointer_pos: *mut ValueType) -> Self { Self { - pointer_pos, + pointer_pos: MaybeUninit::new(pointer_pos), value: unsafe { ptr::read(pointer_pos) }, } } @@ -458,7 +465,7 @@ impl Hole { pointer_pos: *mut ValueType, value: &ValueType, ) -> Self { Self { - pointer_pos, + pointer_pos: MaybeUninit::new(pointer_pos), value: unsafe { ptr::read(value) }, } } @@ -471,7 +478,7 @@ impl Hole { ) { unsafe { value_updater.set_handle_final(&mut self.value, pos); - ptr::write(self.pointer_pos, self.value); + ptr::write(self.pointer_pos.assume_init(), self.value); }; } @@ -485,8 +492,12 @@ impl Hole { { unsafe { value_updater.set_handle(&mut *pointer_new_pos, pos); - ptr::copy_nonoverlapping(pointer_new_pos, self.pointer_pos, 1); - self.pointer_pos = pointer_new_pos; + ptr::copy_nonoverlapping( + pointer_new_pos, + self.pointer_pos.assume_init(), + 1, + ); + self.pointer_pos.write(pointer_new_pos); } } } diff --git a/core/storage/src/impls/delta_mpt/cache/algorithm/tests/removable_heap.rs b/core/storage/src/impls/delta_mpt/cache/algorithm/tests/removable_heap.rs index 232269b50c..527faea8e5 100644 --- a/core/storage/src/impls/delta_mpt/cache/algorithm/tests/removable_heap.rs +++ b/core/storage/src/impls/delta_mpt/cache/algorithm/tests/removable_heap.rs @@ -7,7 +7,7 @@ use super::{ *, }; use rand::Rng; -use std::{cmp::Ord, collections::HashSet, mem}; +use std::{cmp::Ord, collections::HashSet}; fn initialize_heap( capacity: u32, non_heap_size: u32, @@ -20,10 +20,11 @@ fn initialize_heap( let mut heap_util = TrivialHeapValueUtil::default(); for _i in 0..non_heap_size { let mut hole: Hole> = - unsafe { mem::uninitialized() }; - hole.value = TrivialValueWithHeapHandle::::new( - rng.gen_range(-100, -1), - ); + Hole::<_>::new_uninit_pointer( + TrivialValueWithHeapHandle::::new( + rng.gen_range(-100, -1), + ), + ); unsafe { heap.hole_push_back_and_swap_unchecked(0, &mut hole, &mut heap_util) }; diff --git a/core/storage/src/impls/delta_mpt/slab/mod.rs b/core/storage/src/impls/delta_mpt/slab/mod.rs index 37b495b672..9b385fe15d 100644 --- a/core/storage/src/impls/delta_mpt/slab/mod.rs +++ b/core/storage/src/impls/delta_mpt/slab/mod.rs @@ -127,7 +127,7 @@ use std::{ /// operations. Slab doesn't check if user get &mut and & for the same slot. /// User should maintain a layer which controls the mutability of each specific /// slot. It can be done through the wrapper around the slot index, or in the -/// type which implements EntryTrait. +/// type which implements `EntryTrait`. /// /// Allocation and Deallocation are serialized by mutex because they modify the /// slab link-list. @@ -423,8 +423,11 @@ impl> Slab { /// # Examples /// /// # use cfx_storage::Slab; + /// ``` + /// use cfx_storage::Slab; /// let slab: Slab = Slab::with_capacity(10); /// assert_eq!(slab.capacity(), 10); + /// ``` pub fn capacity(&self) -> usize { self.entries.capacity() } /// Reserve capacity for at least `additional` more values to be stored diff --git a/core/storage/src/impls/merkle_patricia_trie/compressed_path.rs b/core/storage/src/impls/merkle_patricia_trie/compressed_path.rs index 01c2f7179f..3c4dc1b8d7 100644 --- a/core/storage/src/impls/merkle_patricia_trie/compressed_path.rs +++ b/core/storage/src/impls/merkle_patricia_trie/compressed_path.rs @@ -296,7 +296,7 @@ impl CompressedPathRaw { } else { let in_place: [u8; MaybeInPlaceByteArray::MAX_INPLACE_SIZE] = - std::mem::uninitialized(); + Default::default(); path = MaybeInPlaceByteArray { in_place }; slice = &mut path.in_place[0..size]; } diff --git a/core/storage/src/impls/merkle_patricia_trie/maybe_in_place_byte_array.rs b/core/storage/src/impls/merkle_patricia_trie/maybe_in_place_byte_array.rs index e8c610e3d2..4e47e277e8 100644 --- a/core/storage/src/impls/merkle_patricia_trie/maybe_in_place_byte_array.rs +++ b/core/storage/src/impls/merkle_patricia_trie/maybe_in_place_byte_array.rs @@ -202,10 +202,7 @@ impl MaybeInPlaceByteArray { Box::into_raw(value); Self { ptr } } else { - let mut in_place: [u8; Self::MAX_INPLACE_SIZE]; - unsafe { - in_place = std::mem::uninitialized(); - } + let mut in_place: [u8; Self::MAX_INPLACE_SIZE] = Default::default(); in_place[0..size].copy_from_slice(&*value); Self { in_place } } diff --git a/core/storage/src/impls/single_mpt_state.rs b/core/storage/src/impls/single_mpt_state.rs index 0a17f26c39..2694d4e58f 100644 --- a/core/storage/src/impls/single_mpt_state.rs +++ b/core/storage/src/impls/single_mpt_state.rs @@ -91,7 +91,7 @@ impl SingleMptState { self.trie.get_merkle(Some(self.trie_root.clone()))?; match maybe_merkle_root { // Empty state. - None => (Ok(MERKLE_NULL_NODE)), + None => Ok(MERKLE_NULL_NODE), Some(merkle_hash) => { // Non-empty state if merkle_hash.is_zero() { diff --git a/core/storage/src/impls/state.rs b/core/storage/src/impls/state.rs index b1f7fc0223..e2a4ca22e2 100644 --- a/core/storage/src/impls/state.rs +++ b/core/storage/src/impls/state.rs @@ -766,7 +766,7 @@ impl State { self.delta_trie.get_merkle(self.delta_trie_root.clone())?; match maybe_merkle_root { // Empty state. - None => (Ok(MERKLE_NULL_NODE)), + None => Ok(MERKLE_NULL_NODE), Some(merkle_hash) => { // Non-empty state if merkle_hash.is_zero() { diff --git a/core/storage/src/storage_db/snapshot_mpt.rs b/core/storage/src/storage_db/snapshot_mpt.rs index e6fd5e540c..a573aa2f00 100644 --- a/core/storage/src/storage_db/snapshot_mpt.rs +++ b/core/storage/src/storage_db/snapshot_mpt.rs @@ -12,8 +12,8 @@ cfg_if! { } pub type SnapshotMptDbValue = Box<[u8]>; -/// We use VanillaTrieNode<(MerkleHash, i64)> instead of -/// (VanillaTrieNode, i64) to make seeking by rlp size position +/// We use `VanillaTrieNode<(MerkleHash, i64)>` instead of +/// `(VanillaTrieNode, i64)` to make seeking by rlp size position /// faster. #[derive(Clone, Default, Debug)] pub struct SnapshotMptNode(pub VanillaTrieNode); diff --git a/core/storage/src/utils/deref_plus_impl_or_borrow_self.rs b/core/storage/src/utils/deref_plus_impl_or_borrow_self.rs index f0dffab970..5990dfb3c5 100644 --- a/core/storage/src/utils/deref_plus_impl_or_borrow_self.rs +++ b/core/storage/src/utils/deref_plus_impl_or_borrow_self.rs @@ -63,9 +63,9 @@ pub trait ImplOrBorrowMutSelf { } /// Suppose you have a trait Trait and some type T: Trait, this trait is -/// automatically implemented for Trait itself, &Tr, Box, Arc, &T, -/// Box, Arc, etc. When DerefPlusSelf is implemented for T, this trait is -/// also implemented for T. +/// automatically implemented for Trait itself, &Tr, `Box`, `Arc`, &T, +/// `Box`, `Arc`, etc. When DerefPlusSelf is implemented for T, this trait +/// is also implemented for T. pub trait DerefPlusImplOrBorrowSelf { fn borrow(&self) -> &T; } diff --git a/core/storage/src/utils/wrap.rs b/core/storage/src/utils/wrap.rs index ab995e854d..4c8ec91d71 100644 --- a/core/storage/src/utils/wrap.rs +++ b/core/storage/src/utils/wrap.rs @@ -14,21 +14,23 @@ use crate::utils::tuple::ElementSatisfy; /// which render some usages infeasible. /// /// Say if we have the code below: -/// +/// ``` /// trait LifetimeBoundedTrait<'a> { /// fn get(&'a mut self) -> T<'a>; /// } /// /// #[derive(Debug)] /// struct T<'a> { -/// s: &'a i64, +/// s: &'a i64, /// } /// /// struct EndUserType { /// v: TypeImplTrait, /// } /// -/// impl EndUserType where for<'a> T: LifetimeBoundedTrait<'a> { +/// impl EndUserType +/// where for<'a> T: LifetimeBoundedTrait<'a> +/// { /// fn use_t(&mut self) { /// let ret = self.v.get(); /// println!("{:?}", ret); @@ -38,12 +40,13 @@ use crate::utils::tuple::ElementSatisfy; /// struct ConcreteType {} /// /// impl<'a> LifetimeBoundedTrait<'a> for ConcreteType { -/// fn get(&'a mut self) -> T<'a> { T{s: &0} } +/// fn get(&'a mut self) -> T<'a> { T { s: &0 } } /// } /// /// impl<'a: 'b, 'b> LifetimeBoundedTrait<'b> for &'a mut ConcreteType { /// fn get(&'b mut self) -> T<'b> { (*self).get() } /// } +/// ``` /// /// Ideally, we could store &mut ConcreteType in EndUserType#use_t in the /// same way. But It's not possible for the EndUserType to store &mut diff --git a/db/src/kvdb-rocksdb/Cargo.toml b/db/src/kvdb-rocksdb/Cargo.toml index fadcea8276..8743a41692 100644 --- a/db/src/kvdb-rocksdb/Cargo.toml +++ b/db/src/kvdb-rocksdb/Cargo.toml @@ -27,4 +27,4 @@ tempdir = "0.3.7" [dependencies.rocksdb] git = "https://github.com/Conflux-Chain/rust-rocksdb.git" -rev = "f34009ab323d6218fe85324bfdaf47762e2d1ec0" +rev = "29c99ae9b7c26fc3e7e67523fa5007ba9b8a7f15" diff --git a/rust-toolchain b/rust-toolchain index 76d0536205..ee2f4ca913 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.62.0 +1.68.0 diff --git a/tests/evm_space/tx_and_receipt_test.py b/tests/evm_space/tx_and_receipt_test.py index b97756b832..8784153116 100755 --- a/tests/evm_space/tx_and_receipt_test.py +++ b/tests/evm_space/tx_and_receipt_test.py @@ -5,6 +5,9 @@ from test_framework.util import * from conflux.config import default_config from base import Web3Base +from test_framework.blocktools import encode_hex_0x +from conflux.address import b32_address_to_hex + class EvmTx2ReceiptTest(Web3Base): @@ -18,6 +21,11 @@ def run_test(self): self.cross_space_transfer(self.evmAccount.address, 1 * 10 ** 18) assert_equal(self.nodes[0].eth_getBalance(self.evmAccount.address), hex(1 * 10 ** 18)) + x = b32_address_to_hex("NET10:TYPE.USER:AAR8JZYBZV0FHZREAV49SYXNZUT8S0JT1ASMXX99XH") + y = b32_address_to_hex('NET10:TYPE.BUILTIN:AAEJUAAAAAAAAAAAAAAAAAAAAAAAAAAAA27GYVFYR7') + ret = self.nodes[0].cfx_getTransactionsByEpoch("0x1") + assert_equal(len(ret), 1) + nonce = self.w3.eth.getTransactionCount(self.evmAccount.address) signed = self.evmAccount.signTransaction({ "to": self.evmAccount.address, @@ -45,6 +53,12 @@ def run_test(self): # eth_call with zero sender should work (#2472) self.nodes[0].eth_call({ "from": "0x0000000000000000000000000000000000000000" }) + ret1 = self.nodes[0].cfx_getTransactionsByEpoch(hex(receipt["blockNumber"])) + ret2 = self.nodes[0].cfx_getTransactionsByBlock(encode_hex_0x(tx["blockHash"])) + assert_equal(len(ret1), 1) + assert_equal(len(ret2), 1) + assert_equal(ret1[0], ret2[0]) + if __name__ == "__main__": EvmTx2ReceiptTest().main() \ No newline at end of file diff --git a/tests/rpc/test_tx_by_hash.py b/tests/rpc/test_tx_by_hash.py index b2b29f6c2c..4718da973a 100644 --- a/tests/rpc/test_tx_by_hash.py +++ b/tests/rpc/test_tx_by_hash.py @@ -85,3 +85,28 @@ def test_pivot_chain_changed(self): # tx found in referenced block self.wait_for_receipt(tx_hash) assert_equal(self.get_tx(tx_hash)["blockHash"], b1) + + def test_tx_by_epoch(self): + tx = self.new_tx() + tx_hash = self.send_tx(tx) + + tx2 = self.get_tx(tx_hash) + assert_equal(tx2["hash"], tx_hash) + assert_equal(tx2["blockHash"], None) + assert_equal(tx2["transactionIndex"], None) + + self.wait_for_receipt(tx_hash) + + tx3 = self.get_tx(tx_hash) + + block_hash = tx3["blockHash"] + block = self.block_by_hash(block_hash) + + r1 = self.node.cfx_getTransactionsByEpoch(block["epochNumber"]) + assert_equal(r1[0]["nativeTransaction"]["hash"], tx_hash) + assert_equal(r1[0]["nativeTransaction"]["blockHash"], block_hash) + + r2 = self.node.cfx_getTransactionsByBlock(tx3["blockHash"]) + assert_equal(r2[0]["nativeTransaction"]["hash"], tx_hash) + assert_equal(r2[0]["nativeTransaction"]["blockHash"], block_hash) + assert_equal(r1[0]["nativeTransaction"]["epochHeight"], r2[0]["nativeTransaction"]["epochHeight"]) diff --git a/util/metrics/Cargo.toml b/util/metrics/Cargo.toml index 5c527df85d..1ee4795721 100644 --- a/util/metrics/Cargo.toml +++ b/util/metrics/Cargo.toml @@ -9,9 +9,11 @@ parking_lot = "0.11" timer = "0.2.0" time = "0.1" rand = "0.7" -influx_db_client = "0.3.6" +influx_db_client = "0.5.1" log = "0.4" -log4rs = { version = "1.0.0", features = ["background_rotation", "gzip"] } +log4rs = { version = "1.2.0", features = ["background_rotation", "gzip"] } +futures = "0.3.26" +tokio = "1.26.0" [dev-dependencies] criterion = "0.3" diff --git a/util/metrics/src/report_influxdb.rs b/util/metrics/src/report_influxdb.rs index 70f3e522e3..f854541ab3 100644 --- a/util/metrics/src/report_influxdb.rs +++ b/util/metrics/src/report_influxdb.rs @@ -10,34 +10,59 @@ use crate::{ registry::{DEFAULT_GROUPING_REGISTRY, DEFAULT_REGISTRY}, report::Reporter, }; -use influx_db_client::{Client, Point, Points, Precision, Value}; +use influx_db_client::{ + reqwest::ClientBuilder as HttpClientBuilder, Client, Point, Points, + Precision, Value, +}; use log::debug; -use std::collections::HashMap; +use std::{collections::HashMap, convert::TryInto, time::Duration}; +use tokio::runtime::{Builder, Runtime}; const REPORT_TIMEOUT_SECONDS: u64 = 30; pub struct InfluxdbReporter { + runtime: Runtime, client: Client, tags: HashMap, // e.g. node=Node_0, region=east_asia } impl InfluxdbReporter { - pub fn new(host: T, db: T) -> Self { - let mut client = Client::new(host, db); - client.set_read_timeout(REPORT_TIMEOUT_SECONDS); - client.set_write_timeout(REPORT_TIMEOUT_SECONDS); + pub fn new>(host: T, db: T) -> Self { + let mut http_client_builder = HttpClientBuilder::new(); + http_client_builder = http_client_builder + .timeout(Duration::from_secs(REPORT_TIMEOUT_SECONDS)) + .pool_idle_timeout(Duration::from_secs(REPORT_TIMEOUT_SECONDS)); + let http_client = http_client_builder + .build() + .expect("http client build error"); + let client = Client::new_with_client( + host.into().as_str().try_into().expect("wrong url"), + db, + http_client, + ); InfluxdbReporter { + runtime: Builder::new_current_thread() + .enable_all() + .build() + .unwrap(), client, tags: HashMap::new(), } } - pub fn with_auth>( + pub fn with_auth, R: Into>( host: T, db: T, username: R, password: R, ) -> Self { InfluxdbReporter { - client: Client::new(host, db) - .set_authentication(username, password), + runtime: Builder::new_current_thread() + .enable_all() + .build() + .unwrap(), + client: Client::new( + host.into().as_str().try_into().expect("wrong url"), + db, + ) + .set_authentication(username, password), tags: HashMap::new(), } } @@ -53,13 +78,13 @@ impl Reporter for InfluxdbReporter { for (name, metric) in DEFAULT_REGISTRY.read().get_all() { let mut point = Point::new(name); - metric.add_field(&mut point, None); + point = metric.add_field(point, None); for (k, v) in &self.tags { - point.add_tag(k.clone(), Value::String(v.clone())); + point = point.add_tag(k.clone(), Value::String(v.clone())); } - points.push(point); + points = points.push(point); } for (group_name, metrics) in DEFAULT_GROUPING_REGISTRY.read().get_all() @@ -67,21 +92,21 @@ impl Reporter for InfluxdbReporter { let mut point = Point::new(group_name); for (metric_name, metric) in metrics { - metric.add_field(&mut point, Some(metric_name)); + point = metric.add_field(point, Some(metric_name)); } for (k, v) in &self.tags { - point.add_tag(k.clone(), Value::String(v.clone())); + point = point.add_tag(k.clone(), Value::String(v.clone())); } - points.push(point); + points = points.push(point); } - if let Err(e) = self.client.write_points( + if let Err(e) = self.runtime.block_on(self.client.write_points( points, Some(Precision::Milliseconds), None, - ) { + )) { debug!("failed to write points to influxdb, {:?}", e); Ok(false) } else { @@ -91,7 +116,7 @@ impl Reporter for InfluxdbReporter { } pub trait InfluxdbReportable { - fn add_field(&self, point: &mut Point, prefix: Option<&String>); + fn add_field(&self, point: Point, prefix: Option<&String>) -> Point; } fn field(name: &str, prefix: Option<&String>) -> String { @@ -107,87 +132,86 @@ fn field(name: &str, prefix: Option<&String>) -> String { } impl InfluxdbReportable for CounterUsize { - fn add_field(&self, point: &mut Point, prefix: Option<&String>) { + fn add_field(&self, point: Point, prefix: Option<&String>) -> Point { point.add_field( field("count", prefix), Value::Integer(self.count() as i64), - ); + ) } } impl InfluxdbReportable for GaugeUsize { - fn add_field(&self, point: &mut Point, prefix: Option<&String>) { + fn add_field(&self, point: Point, prefix: Option<&String>) -> Point { point.add_field( field("value", prefix), Value::Integer(self.value() as i64), - ); + ) } } impl InfluxdbReportable for StandardMeter { - fn add_field(&self, point: &mut Point, prefix: Option<&String>) { + fn add_field(&self, point: Point, prefix: Option<&String>) -> Point { let snapshot = self.snapshot(); - point.add_field( - field("count", prefix), - Value::Integer(snapshot.count() as i64), - ); - point.add_field(field("m1", prefix), Value::Float(snapshot.rate1())); - point.add_field(field("m5", prefix), Value::Float(snapshot.rate5())); - point.add_field(field("m15", prefix), Value::Float(snapshot.rate15())); - point.add_field( - field("mean", prefix), - Value::Float(snapshot.rate_mean()), - ); + point + .add_field( + field("count", prefix), + Value::Integer(snapshot.count() as i64), + ) + .add_field(field("m1", prefix), Value::Float(snapshot.rate1())) + .add_field(field("m5", prefix), Value::Float(snapshot.rate5())) + .add_field(field("m15", prefix), Value::Float(snapshot.rate15())) + .add_field( + field("mean", prefix), + Value::Float(snapshot.rate_mean()), + ) } } impl InfluxdbReportable for T { - fn add_field(&self, point: &mut Point, prefix: Option<&String>) { + fn add_field(&self, point: Point, prefix: Option<&String>) -> Point { let snapshot = self.snapshot(); - point.add_field( - field("count", prefix), - Value::Integer(snapshot.count() as i64), - ); - point.add_field( - field("min", prefix), - Value::Integer(snapshot.min() as i64), - ); - point.add_field(field("mean", prefix), Value::Float(snapshot.mean())); - point.add_field( - field("max", prefix), - Value::Integer(snapshot.max() as i64), - ); - point.add_field( - field("stddev", prefix), - Value::Float(snapshot.stddev()), - ); - point.add_field( - field("variance", prefix), - Value::Float(snapshot.variance()), - ); - point.add_field( - field("p50", prefix), - Value::Integer(snapshot.percentile(0.5) as i64), - ); - point.add_field( - field("p75", prefix), - Value::Integer(snapshot.percentile(0.75) as i64), - ); - point.add_field( - field("p90", prefix), - Value::Integer(snapshot.percentile(0.9) as i64), - ); - point.add_field( - field("p95", prefix), - Value::Integer(snapshot.percentile(0.95) as i64), - ); - point.add_field( - field("p99", prefix), - Value::Integer(snapshot.percentile(0.99) as i64), - ); - point.add_field( - field("p999", prefix), - Value::Integer(snapshot.percentile(0.999) as i64), - ); + point + .add_field( + field("count", prefix), + Value::Integer(snapshot.count() as i64), + ) + .add_field( + field("min", prefix), + Value::Integer(snapshot.min() as i64), + ) + .add_field(field("mean", prefix), Value::Float(snapshot.mean())) + .add_field( + field("max", prefix), + Value::Integer(snapshot.max() as i64), + ) + .add_field(field("stddev", prefix), Value::Float(snapshot.stddev())) + .add_field( + field("variance", prefix), + Value::Float(snapshot.variance()), + ) + .add_field( + field("p50", prefix), + Value::Integer(snapshot.percentile(0.5) as i64), + ) + .add_field( + field("p75", prefix), + Value::Integer(snapshot.percentile(0.75) as i64), + ) + .add_field( + field("p90", prefix), + Value::Integer(snapshot.percentile(0.9) as i64), + ) + .add_field( + field("p95", prefix), + Value::Integer(snapshot.percentile(0.95) as i64), + ) + .add_field( + field("p99", prefix), + Value::Integer(snapshot.percentile(0.99) as i64), + ) + .add_field( + field("p999", prefix), + Value::Integer(snapshot.percentile(0.999) as i64), + ) } }