From 0299b45de3e54f141d53149cd7ca44f0d86731ba Mon Sep 17 00:00:00 2001 From: parazyd Date: Wed, 20 Apr 2022 11:57:33 +0200 Subject: [PATCH] Update all dependencies. --- Cargo.lock | 556 +++++++++--------------------------- Cargo.toml | 11 +- bin/cashierd/Cargo.toml | 8 +- bin/dao-cli/Cargo.toml | 4 +- bin/daod/Cargo.toml | 2 +- bin/darkfid/Cargo.toml | 4 +- bin/darkfid2/Cargo.toml | 4 +- bin/darkfid2/src/client.rs | 75 ----- bin/darkfid2/src/main.rs | 143 ++++------ bin/dnetview/Cargo.toml | 4 +- bin/drk/Cargo.toml | 4 +- bin/faucetd/Cargo.toml | 2 +- bin/gatewayd/Cargo.toml | 4 +- bin/ircd/Cargo.toml | 4 +- bin/tau/tau-cli/Cargo.toml | 4 +- bin/tau/taud/Cargo.toml | 4 +- bin/vanityaddr/Cargo.toml | 2 +- bin/zkas/Cargo.toml | 2 +- example/p2pdebug/Cargo.toml | 4 +- 19 files changed, 227 insertions(+), 614 deletions(-) delete mode 100644 bin/darkfid2/src/client.rs diff --git a/Cargo.lock b/Cargo.lock index b2f6669c0..cf28ea241 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -69,15 +69,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ahash" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" -dependencies = [ - "const-random", -] - [[package]] name = "ahash" version = "0.7.6" @@ -306,7 +297,7 @@ dependencies = [ "async-io", "async-lock", "async-process", - "crossbeam-utils 0.8.8", + "crossbeam-utils", "futures-channel", "futures-core", "futures-io", @@ -353,19 +344,6 @@ dependencies = [ "tungstenite", ] -[[package]] -name = "asynchronous-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" -dependencies = [ - "bytes", - "futures-sink", - "futures-util", - "memchr", - "pin-project-lite", -] - [[package]] name = "atoi" version = "0.4.0" @@ -409,16 +387,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" +checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61" dependencies = [ "addr2line", "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide 0.4.4", - "object 0.27.1", + "miniz_oxide 0.5.1", + "object", "rustc-demangle", ] @@ -504,24 +482,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.59.1" -source = "git+https://github.com/rust-lang/rust-bindgen?rev=2aed6b0216805e27228ed39988ffe1a1ffd7e940#2aed6b0216805e27228ed39988ffe1a1ffd7e940" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "proc-macro2 1.0.37", - "quote 1.0.18", - "regex", - "rustc-hash", - "shlex", -] - [[package]] name = "bit-set" version = "0.5.2" @@ -892,7 +852,7 @@ dependencies = [ "async-trait", "bdk", "bitcoin", - "clap 3.1.9", + "clap 3.1.10", "darkfi", "easy-parallel", "futures", @@ -935,15 +895,6 @@ dependencies = [ "jobserver", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "0.1.10" @@ -989,17 +940,6 @@ dependencies = [ "inout", ] -[[package]] -name = "clang-sys" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cc00842eed744b858222c4c9faf7243aafc6d33f92f96935263ef4d8a41ce21" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" version = "2.34.0" @@ -1017,9 +957,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.1.9" +version = "3.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aad2534fad53df1cc12519c5cda696dd3e20e6118a027e24054aea14a0bdcbe" +checksum = "3124f3f75ce09e22d1410043e1e24f2ecc44fad3afe4f08408f1f7663d68da2b" dependencies = [ "atty", "bitflags", @@ -1128,28 +1068,6 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" -[[package]] -name = "const-random" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f590d95d011aa80b063ffe3253422ed5aa462af4e9867d43ce8337562bac77c4" -dependencies = [ - "const-random-macro", - "proc-macro-hack", -] - -[[package]] -name = "const-random-macro" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615f6e27d000a2bffbc7f2f6a8669179378fa27ee4d0a509e985dfc0a7defb40" -dependencies = [ - "getrandom 0.2.6", - "lazy_static", - "proc-macro-hack", - "tiny-keccak", -] - [[package]] name = "constant_time_eq" version = "0.1.5" @@ -1302,30 +1220,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "crossbeam" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-channel 0.4.4", - "crossbeam-deque 0.7.4", - "crossbeam-epoch 0.8.2", - "crossbeam-queue 0.2.3", - "crossbeam-utils 0.7.2", -] - -[[package]] -name = "crossbeam-channel" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -dependencies = [ - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - [[package]] name = "crossbeam-channel" version = "0.5.4" @@ -1333,18 +1227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.8", -] - -[[package]] -name = "crossbeam-deque" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" -dependencies = [ - "crossbeam-epoch 0.8.2", - "crossbeam-utils 0.7.2", - "maybe-uninit", + "crossbeam-utils", ] [[package]] @@ -1354,23 +1237,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if 1.0.0", - "crossbeam-epoch 0.9.8", - "crossbeam-utils 0.8.8", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg 1.1.0", - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "lazy_static", - "maybe-uninit", - "memoffset 0.5.6", - "scopeguard", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] @@ -1381,23 +1249,12 @@ checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" dependencies = [ "autocfg 1.1.0", "cfg-if 1.0.0", - "crossbeam-utils 0.8.8", + "crossbeam-utils", "lazy_static", - "memoffset 0.6.5", + "memoffset", "scopeguard", ] -[[package]] -name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - [[package]] name = "crossbeam-queue" version = "0.3.5" @@ -1405,18 +1262,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.8", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg 1.1.0", - "cfg-if 0.1.10", - "lazy_static", + "crossbeam-utils", ] [[package]] @@ -1585,7 +1431,7 @@ dependencies = [ "async-executor", "async-std", "async-trait", - "clap 3.1.9", + "clap 3.1.10", "darkfi", "easy-parallel", "futures", @@ -1633,7 +1479,7 @@ dependencies = [ "bs58", "bytes", "chrono", - "clap 3.1.9", + "clap 3.1.10", "crypto_api_chachapoly", "darkfi-derive", "darkfi-derive-internal", @@ -1662,13 +1508,10 @@ dependencies = [ "rand 0.8.5", "rcgen", "regex", - "rocksdb", "rustls-pemfile 0.3.0", "serde", "serde_json", "sha2 0.10.2", - "signal-hook", - "signal-hook-async-std", "simplelog", "sled", "smol", @@ -1683,7 +1526,6 @@ dependencies = [ "wasmer", "wasmer-compiler-singlepass", "wasmer-middlewares", - "zeromq", ] [[package]] @@ -1713,7 +1555,7 @@ dependencies = [ "async-executor", "async-std", "async-trait", - "clap 3.1.9", + "clap 3.1.10", "darkfi", "easy-parallel", "fxhash", @@ -1822,17 +1664,6 @@ dependencies = [ "syn 1.0.91", ] -[[package]] -name = "dashmap" -version = "3.11.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f260e2fc850179ef410018660006951c1b55b79e8087e87111a2c388994b9b5" -dependencies = [ - "ahash 0.3.8", - "cfg-if 0.1.10", - "num_cpus", -] - [[package]] name = "dashmap" version = "4.0.2" @@ -2015,7 +1846,7 @@ version = "0.3.0" dependencies = [ "async-channel", "async-std", - "clap 3.1.9", + "clap 3.1.10", "darkfi", "easy-parallel", "fxhash", @@ -2042,7 +1873,7 @@ name = "drk" version = "0.3.0" dependencies = [ "async-std", - "clap 3.1.9", + "clap 3.1.10", "darkfi", "log", "prettytable-rs", @@ -2207,17 +2038,6 @@ dependencies = [ "syn 1.0.91", ] -[[package]] -name = "enum-primitive-derive" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c375b9c5eadb68d0a6efee2999fef292f45854c3444c86f09d8ab086ba942b0e" -dependencies = [ - "num-traits", - "quote 1.0.18", - "syn 1.0.91", -] - [[package]] name = "enumset" version = "1.0.11" @@ -2410,7 +2230,7 @@ dependencies = [ "futures-core", "futures-sink", "pin-project", - "spin 0.9.2", + "spin 0.9.3", ] [[package]] @@ -2660,7 +2480,7 @@ dependencies = [ "async-channel", "async-executor", "async-std", - "clap 3.1.9", + "clap 3.1.10", "darkfi", "easy-parallel", "log", @@ -2850,7 +2670,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash 0.7.6", + "ahash", ] [[package]] @@ -2859,7 +2679,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758" dependencies = [ - "ahash 0.7.6", + "ahash", ] [[package]] @@ -3135,9 +2955,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e70ee094dc02fd9c13fdad4940090f22dbd6ac7c9e7094a46cf0232a50bc7c" +checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "ircd" @@ -3147,7 +2967,7 @@ dependencies = [ "async-executor", "async-std", "async-trait", - "clap 3.1.9", + "clap 3.1.10", "darkfi", "easy-parallel", "futures", @@ -3257,12 +3077,6 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "leb128" version = "0.2.5" @@ -3271,9 +3085,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.123" +version = "0.2.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb691a747a7ab48abc15c5b42066eaafde10dc427e3b6ee2a1cf43db04c763bd" +checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" [[package]] name = "libloading" @@ -3285,17 +3099,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "librocksdb-sys" -version = "6.20.3" -source = "git+https://github.com/parazyd/rust-rocksdb?rev=bd966750ec861d687913d59a9939a1408ac53131#bd966750ec861d687913d59a9939a1408ac53131" -dependencies = [ - "bindgen", - "cc", - "glob", - "libc", -] - [[package]] name = "libsecp256k1" version = "0.6.0" @@ -3402,6 +3205,15 @@ dependencies = [ "syn 1.0.91", ] +[[package]] +name = "lru" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32613e41de4c47ab04970c348ca7ae7382cf116625755af070b008a15516a889" +dependencies = [ + "hashbrown 0.11.2", +] + [[package]] name = "mach" version = "0.3.2" @@ -3417,12 +3229,6 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "2.4.1" @@ -3438,15 +3244,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg 1.1.0", -] - [[package]] name = "memoffset" version = "0.6.5" @@ -3488,9 +3285,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniscript" -version = "6.0.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d69450033bf162edf854d4aacaff82ca5ef34fa81f6cf69e1c81a103f0834997" +checksum = "1e292b58407dfbf1384e5aca8428d3b0f2eaa09d24cb17088f6db0b7ca31194a" dependencies = [ "bitcoin", "serde", @@ -3505,16 +3302,6 @@ dependencies = [ "adler32", ] -[[package]] -name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg 1.1.0", -] - [[package]] name = "miniz_oxide" version = "0.5.1" @@ -3601,7 +3388,7 @@ dependencies = [ "cc", "cfg-if 1.0.0", "libc", - "memoffset 0.6.5", + "memoffset", ] [[package]] @@ -3740,15 +3527,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" -[[package]] -name = "object" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" -dependencies = [ - "memchr", -] - [[package]] name = "object" version = "0.28.3" @@ -3948,12 +3726,6 @@ dependencies = [ "digest 0.10.3", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pem" version = "1.0.2" @@ -4173,12 +3945,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - [[package]] name = "proc-macro2" version = "0.4.30" @@ -4555,7 +4321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd249e82c21598a9a426a4e00dd7adc1d640b22445ec8545feef801d1a74c221" dependencies = [ "autocfg 1.1.0", - "crossbeam-deque 0.8.1", + "crossbeam-deque", "either", "rayon-core", ] @@ -4566,9 +4332,9 @@ version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f51245e1e62e1f1629cbfec37b5793bbabcaeb90f30e94d2ba03564687353e4" dependencies = [ - "crossbeam-channel 0.5.4", - "crossbeam-deque 0.8.1", - "crossbeam-utils 0.8.8", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", "num_cpus", ] @@ -4781,15 +4547,6 @@ dependencies = [ "syn 1.0.91", ] -[[package]] -name = "rocksdb" -version = "0.17.0" -source = "git+https://github.com/parazyd/rust-rocksdb?rev=bd966750ec861d687913d59a9939a1408ac53131#bd966750ec861d687913d59a9939a1408ac53131" -dependencies = [ - "libc", - "librocksdb-sys", -] - [[package]] name = "rpassword" version = "6.0.1" @@ -4811,7 +4568,7 @@ dependencies = [ "base64 0.13.0", "blake2b_simd 0.5.11", "constant_time_eq", - "crossbeam-utils 0.8.8", + "crossbeam-utils", ] [[package]] @@ -5195,12 +4952,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "shlex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" - [[package]] name = "signal-hook" version = "0.3.13" @@ -5211,18 +4962,6 @@ dependencies = [ "signal-hook-registry", ] -[[package]] -name = "signal-hook-async-std" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4aa94397e2023af5b7cff5b8d4785e935cfb77f0e4aab0cae3b26258ace556" -dependencies = [ - "async-io", - "futures-lite", - "libc", - "signal-hook", -] - [[package]] name = "signal-hook-mio" version = "0.2.3" @@ -5251,9 +4990,9 @@ checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" [[package]] name = "simplelog" -version = "0.12.0-alpha1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31021e5bad039d06565e027d38f6e9f5b0b08862fee977181b47615f89a45fc6" +checksum = "48dfff04aade74dd495b007c831cd6f4e0cee19c344dd9dc0884c0289b70a786" dependencies = [ "log", "termcolor", @@ -5298,8 +5037,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" dependencies = [ "crc32fast", - "crossbeam-epoch 0.9.8", - "crossbeam-utils 0.8.8", + "crossbeam-epoch", + "crossbeam-utils", "fs2", "fxhash", "libc", @@ -5354,9 +5093,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51491fc88da0e2e5f2f7944647dec1f2892c23dff0d9b650bb22d8677f34478a" +checksum = "4c4348b49e8e47cb9f03f3db32638b489b22940867154fcacd14db2974950da2" dependencies = [ "Inflector", "base64 0.13.0", @@ -5377,9 +5116,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "289b5758ac803e745c3fa22e54cd192fbc033f8642b92ede314b591772c837c5" +checksum = "2a686cba166abc2cc6b3b62325018b663299976fd426160dd9b5a805f1c04abb" dependencies = [ "bincode", "bytemuck", @@ -5398,9 +5137,9 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "863139b26f0a94fd5344bc296b2d22c783858a42d2ddbec0a69ded52c59a9fdb" +checksum = "1f0fb8a2c8ddd776b3faf7c7c8ac4202c6d9d0284fabdba31bebf5a48c6ad13f" dependencies = [ "log", "memmap2", @@ -5413,9 +5152,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae8413ec75f3546e4a8ff6e7c6ef2272bef2739eccd87d4edd6c0163cd46735" +checksum = "0819bcf2707ab6ca3632ddbeed21c5bcdfdda71b185e8a100a330a6592d6f247" dependencies = [ "chrono", "clap 2.34.0", @@ -5431,23 +5170,25 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e76df6143afad0bba67a39b8ca80053e2c466781ff8e51e530f277cc1f5f397" +checksum = "65b1ebf314662f6f9bf7b7d0f03eccf44ae0ef77108709ca9f1001525533a86d" dependencies = [ "dirs-next", "lazy_static", "serde", "serde_derive", "serde_yaml", + "solana-clap-utils", + "solana-sdk", "url", ] [[package]] name = "solana-client" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53bc7f31d7976d5a5714d9b37e60aded6677439825da506ffecf52dcf5340454" +checksum = "646e73474695b4b906efa045533ccc9d9abbdaa93bf55e3bd0cb6be460c2dc05" dependencies = [ "async-mutex", "async-trait", @@ -5456,7 +5197,7 @@ dependencies = [ "bs58", "bytes", "clap 2.34.0", - "crossbeam-channel 0.5.4", + "crossbeam-channel", "futures", "futures-util", "indicatif 0.16.2", @@ -5464,7 +5205,9 @@ dependencies = [ "jsonrpc-core", "lazy_static", "log", + "lru", "quinn", + "quinn-proto", "rand 0.7.3", "rand_chacha 0.2.2", "rayon", @@ -5478,6 +5221,7 @@ dependencies = [ "solana-clap-utils", "solana-faucet", "solana-measure", + "solana-metrics", "solana-net-utils", "solana-sdk", "solana-streamer", @@ -5494,9 +5238,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280bd8b2acb12dbc2add4b617658fd99bb50b43d4928d53ddab42d15379a0ac9" +checksum = "cb085fe05c8a42a4283ba4e9d1bc970259b28903d9c85e27be760e2e66f07b0b" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -5504,9 +5248,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4424b1902054296d3e9f1eef7f6e6ad89b5f65604a53d8a92f02e01c0b6a4f4" +checksum = "22102a47604c6e7baa50faea8ae942304c79d5a5ad9d4759b59f91750f4d0681" dependencies = [ "bincode", "chrono", @@ -5518,14 +5262,14 @@ dependencies = [ [[package]] name = "solana-faucet" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f086072fc79c51c5d38824e8e69cd01aee8dcbf75b5ba0cfd13fa713a44acba2" +checksum = "cd3dffea98692d533c3aab77a6c594fb9bf8d80fd81434ee37e0169467dac74f" dependencies = [ "bincode", "byteorder", "clap 2.34.0", - "crossbeam-channel 0.5.4", + "crossbeam-channel", "log", "serde", "serde_derive", @@ -5542,9 +5286,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "995d035b44b8ba111b3ce4af3fbcd0628ed02e6884e570b5236148c174d4f1f0" +checksum = "55e139feda2afd510dea2027584cc35a9ee9ebac0bfef1ab4d23647bf5c091a6" dependencies = [ "bs58", "bv", @@ -5564,9 +5308,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a03f0bbe39da32b7067dbc1713d1b897c30877a5b89d509bdf7be9a6a3d9b77" +checksum = "798b851026ff2366b318f7818a64846dd1ebc7e613f7893fba07a61cd55e6a48" dependencies = [ "proc-macro2 1.0.37", "quote 1.0.18", @@ -5576,9 +5320,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73bf229c30461e7d0228e246cb0fbfae27ae1b9d4612b3a06e416f0eb47826be" +checksum = "f63d0e97c25935253d93bf9c4740a990264185d1cf59a638a87066278ed817f0" dependencies = [ "env_logger", "lazy_static", @@ -5587,9 +5331,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1833159f25b4c45d702acdd3d29987b5b3806b72097ba81b185569e29af9adb1" +checksum = "77b68f328ec2748982a591fd49979948dc46f807e0400b7fd396cb898c60713d" dependencies = [ "log", "solana-sdk", @@ -5597,11 +5341,11 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b3f73222bc6c6c831286b2d4a1d663d7476c246029d7fe4d5d137cdaec0102" +checksum = "b44056221da6cb2efba4a7c53b16a199265ea15a560f68eb704af26a99901fcb" dependencies = [ - "crossbeam-channel 0.5.4", + "crossbeam-channel", "gethostname", "lazy_static", "log", @@ -5611,13 +5355,13 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "813a0b699d9752e183d198fb14b25a50fd8374a696d4181585a0de1bde8577c9" +checksum = "fcaf30fc3e636a8d6336ad46612deca0c880c9b6d42f703fa9e8266585f2b8c2" dependencies = [ "bincode", "clap 2.34.0", - "crossbeam-channel 0.5.4", + "crossbeam-channel", "log", "nix", "rand 0.7.3", @@ -5633,11 +5377,11 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7707afb37a0e22acee012339b97cb47ae1315cd7b06e9ef2286605e967f11b24" +checksum = "c3e5434082959d6cbb387d4d821547ff83f88cde9128e92b132ca98ba391695a" dependencies = [ - "ahash 0.7.6", + "ahash", "bincode", "bv", "caps", @@ -5660,9 +5404,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d73027cf4031a16f174bc2a802fac92d5e712ef08bbf251d8d1519664a04d279" +checksum = "80e41ae6eb080e3ab14e9eda4474b676861af63fb0871db8b9149b0c69aada4d" dependencies = [ "base64 0.13.0", "bincode", @@ -5702,9 +5446,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600bf63c678b9e7881e06c2a51a11e05e9805ad40fe0739238da955d8741b783" +checksum = "516bcd667bc879dadf622ba0b84cbdc7b6618b9e123433998b6c37ba03da81f8" dependencies = [ "base64 0.13.0", "bincode", @@ -5726,9 +5470,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "270a41c4641d8be8b57ecaeab82032c2ba1fca649c943f9479c898bcb31aa04d" +checksum = "f279d5755275501f5bdcf109fb773d835546265ed3e2ffb90a4e6ab191b7db64" dependencies = [ "lazy_static", "num_cpus", @@ -5736,9 +5480,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce759ad4f2b3ee2c1536cf47b8af1330ff2a288308fb0b860fe0a7b6d54aeeaa" +checksum = "92ee4a9f757a8b5943576c1ae2369f17da700813406e40164d22406d8eea7eda" dependencies = [ "console", "dialoguer", @@ -5755,9 +5499,9 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875936043a16a65f43de903bae73bcf6e08408e63cbae33442329bb59587a85f" +checksum = "765eb1373e053d5513eab207f9b9d2fe30d370b6e629c7cdfcced0272cd7eae7" dependencies = [ "arrayref", "bincode", @@ -5766,8 +5510,8 @@ dependencies = [ "bytemuck", "byteorder", "bzip2", - "crossbeam-channel 0.5.4", - "dashmap 4.0.2", + "crossbeam-channel", + "dashmap", "dir-diff", "flate2", "fnv", @@ -5811,9 +5555,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c4dd9c2b237e8373b922d4f8c1b2e7ece79819775513f6d715d86dae1c9f9a" +checksum = "7ef63e9db435bcc173d37073d769871379bb90c0fc60b20616f87edc0b06d890" dependencies = [ "assert_matches", "base64 0.13.0", @@ -5862,9 +5606,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd02c93701b4cd59ddcca7bd0306440ab7ef3b1c78220916d4616d805c5ca020" +checksum = "5f4d6c73b2dea5705afd28266015a00e7a9c3496a98a45104733fa81e8dabbb5" dependencies = [ "bs58", "proc-macro2 1.0.37", @@ -5875,9 +5619,9 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2305d60367df4cffe6b71f84539984703d5f728ea51a289ab31f62d3e957e1b" +checksum = "41b0c454ae9cdc884fcb964ef4b5e5053d2bfce09fed45d0dbf3ed09742e6ba7" dependencies = [ "bincode", "log", @@ -5898,11 +5642,11 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8900ed3e10e5cffb069f8b618a85fb38231e0e3ce901bdfb08a345a323bbe4f7" +checksum = "59fea5ffd8c2af4cea444af5f8ada7e88fb004bb49179bbbb741b783894d8373" dependencies = [ - "crossbeam-channel 0.5.4", + "crossbeam-channel", "futures-util", "histogram", "itertools", @@ -5924,9 +5668,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ea88110562d28160ae84da644834d5499459d825ded11590e6905021bc227e" +checksum = "d3cff388aa40e46921e99f98dc2b82d138588cbbcdcc7cff1212d8aa9d5918a8" dependencies = [ "Inflector", "base64 0.13.0", @@ -5951,9 +5695,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f5dafaa1bcc62cd0f8b6434f65887dddcc780ca3aa5f63317449ad407e996b" +checksum = "c331921cb9b9d3e620cdcd19822b29a80a5360e352aaf08b9da043b2124566bf" dependencies = [ "log", "rustc_version 0.4.0", @@ -5966,9 +5710,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d74ea1007eff5437c32d6c37b819cb6e94b93b15db05e17b1da785303e9900" +checksum = "bf37814a77d89b07a00c75e7976b99a97ded6ae1037c1e5a36c23a66a7158fc6" dependencies = [ "bincode", "log", @@ -5987,9 +5731,9 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93713845391fd6157695667549b0381a912d266e780f9285159facd63a5becd9" +checksum = "e0f6c9d71e341399d2b1f6ed5cb72bc2897a749006750e04ba1a6504d7bdd51f" dependencies = [ "bytemuck", "getrandom 0.1.16", @@ -6002,9 +5746,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.10.8" +version = "1.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdeed90790b5ecab84921ed3486e3bd572c3b214e480074629aa4596d1bfc06" +checksum = "b83cd4399de06ca899a36eb62f69c50abad6265648501d52d3e7b05cf96bae7a" dependencies = [ "aes-gcm-siv", "arrayref", @@ -6038,9 +5782,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511254be0c5bcf062b019a6c89c01a664aa359ded62f78aa72c6fc137c0590e5" +checksum = "c530c2b0d0bf8b69304b39fe2001993e267461948b890cd037d8ad4293fa1a0d" dependencies = [ "lock_api", ] @@ -6115,13 +5859,13 @@ version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5" dependencies = [ - "ahash 0.7.6", + "ahash", "atoi", "bitflags", "byteorder", "bytes", "crc", - "crossbeam-queue 0.3.5", + "crossbeam-queue", "either", "event-listener", "flume", @@ -6360,7 +6104,7 @@ dependencies = [ "async-std", "async-trait", "chrono", - "clap 3.1.9", + "clap 3.1.10", "darkfi", "easy-parallel", "futures", @@ -6383,7 +6127,7 @@ dependencies = [ "async-std", "async-trait", "chrono", - "clap 3.1.9", + "clap 3.1.10", "ctrlc-async", "darkfi", "easy-parallel", @@ -6863,15 +6607,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.6", -] - [[package]] name = "value-bag" version = "1.0.0-alpha.8" @@ -6887,7 +6622,7 @@ name = "vanityaddr" version = "0.3.0" dependencies = [ "bs58", - "clap 3.1.9", + "clap 3.1.10", "ctrlc", "darkfi", "indicatif 0.17.0-rc.10", @@ -7159,7 +6894,7 @@ dependencies = [ "leb128", "libloading", "loupe", - "object 0.28.3", + "object", "rkyv", "serde", "tempfile", @@ -7210,7 +6945,7 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24ce18ac2877050e59580d27ee1a88f3192d7a31e77fbba0852abc7888d6e0b5" dependencies = [ - "object 0.28.3", + "object", "thiserror", "wasmer-compiler", "wasmer-types", @@ -7242,7 +6977,7 @@ dependencies = [ "indexmap", "libc", "loupe", - "memoffset 0.6.5", + "memoffset", "more-asserts", "region", "rkyv", @@ -7522,36 +7257,11 @@ dependencies = [ "synstructure", ] -[[package]] -name = "zeromq" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "667ece59294ccaf617fcf2e5decc9114a06427c1f68990028b9f12d322686bdc" -dependencies = [ - "async-std", - "async-trait", - "asynchronous-codec", - "bytes", - "crossbeam", - "dashmap 3.11.10", - "enum-primitive-derive", - "futures", - "futures-util", - "lazy_static", - "log", - "num-traits", - "parking_lot 0.11.2", - "rand 0.7.3", - "regex", - "thiserror", - "uuid", -] - [[package]] name = "zkas" version = "0.3.0" dependencies = [ - "clap 3.1.9", + "clap 3.1.10", "darkfi", ] diff --git a/Cargo.toml b/Cargo.toml index a331a11d1..e3b5809e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ members = [ [dependencies] # Hard dependencies -libc = "0.2.123" +libc = "0.2.124" log = "0.4.16" thiserror = "1.0.30" @@ -86,7 +86,7 @@ regex = {version = "1.1.9", optional = true} # Misc termion = {version = "1.5.6", optional = true} -simplelog = {version = "0.12.0-alpha1", optional = true} +simplelog = {version = "0.12.0", optional = true} # Websockets tungstenite = {version = "0.17.2", optional = true} @@ -116,14 +116,14 @@ wasmer-compiler-singlepass = {version = "2.2.1", optional = true} wasmer-middlewares = {version = "2.2.1", optional = true} # Wallet management -sqlx = {version = "0.5.12", features = ["runtime-async-std-native-tls", "sqlite"], optional = true} +sqlx = {version = "0.5.13", features = ["runtime-async-std-native-tls", "sqlite"], optional = true} libsqlite3-sys = {version = "0.24.2", features = ["bundled-sqlcipher"], optional = true } # Blockchain store sled = {version = "0.34.7", optional = true} [dev-dependencies] -clap = {version = "3.1.8", features = ["derive"]} +clap = {version = "3.1.10", features = ["derive"]} [features] async-runtime = [ @@ -259,9 +259,6 @@ wasm-runtime = [ node = [ "url", "bytes", - "zeromq", - "signal-hook", - "signal-hook-async-std", "lazy-init", "async-runtime", diff --git a/bin/cashierd/Cargo.toml b/bin/cashierd/Cargo.toml index 66cde4d31..387078480 100644 --- a/bin/cashierd/Cargo.toml +++ b/bin/cashierd/Cargo.toml @@ -21,10 +21,10 @@ easy-parallel = "3.2.0" rand = "0.8.5" # Misc -clap = {version = "3.1.8", features = ["derive"]} +clap = {version = "3.1.10", features = ["derive"]} log = "0.4.16" num_cpus = "1.13.1" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" thiserror = "1.0.30" url = "2.2.2" fxhash = "0.2.1" @@ -49,8 +49,8 @@ num-bigint = {version = "0.4.3", features = ["rand", "serde"], optional = true} # Solana bridge dependencies native-tls = {version = "0.2.10", optional = true} async-native-tls = {version = "0.4.0", optional = true} -solana-client = {version = "1.10.3", optional = true} -solana-sdk = {version = "1.10.3", optional = true} +solana-client = {version = "1.10.9", optional = true} +solana-sdk = {version = "1.10.9", optional = true} spl-associated-token-account = {version = "1.0.3", features = ["no-entrypoint"], optional = true} spl-token = {version = "3.2.0", features = ["no-entrypoint"], optional = true} tungstenite = {version = "0.17.2", optional = true} diff --git a/bin/dao-cli/Cargo.toml b/bin/dao-cli/Cargo.toml index 7523aab23..6a254e778 100644 --- a/bin/dao-cli/Cargo.toml +++ b/bin/dao-cli/Cargo.toml @@ -18,10 +18,10 @@ async-executor = "1.4.1" easy-parallel = "3.2.0" # Misc -clap = {version = "3.1.8", features = ["derive"]} +clap = {version = "3.1.10", features = ["derive"]} log = "0.4.16" num_cpus = "1.13.1" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" url = "2.2.2" # Encoding and parsing diff --git a/bin/daod/Cargo.toml b/bin/daod/Cargo.toml index 6be0df8d8..b1c6c220a 100644 --- a/bin/daod/Cargo.toml +++ b/bin/daod/Cargo.toml @@ -20,7 +20,7 @@ easy-parallel = "3.2.0" # Misc log = "0.4.16" num_cpus = "1.13.1" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" # Encoding and parsing serde_json = "1.0.79" diff --git a/bin/darkfid/Cargo.toml b/bin/darkfid/Cargo.toml index 101da90f8..3c58a06ab 100644 --- a/bin/darkfid/Cargo.toml +++ b/bin/darkfid/Cargo.toml @@ -17,11 +17,11 @@ async-executor = "1.4.1" easy-parallel = "3.2.0" # Misc -clap = {version = "3.1.8", features = ["derive"]} +clap = {version = "3.1.10", features = ["derive"]} url = "2.2.2" log = "0.4.16" num_cpus = "1.13.1" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" fxhash = "0.2.1" # Encoding and parsing diff --git a/bin/darkfid2/Cargo.toml b/bin/darkfid2/Cargo.toml index 71aa19459..3a8c3d8c8 100644 --- a/bin/darkfid2/Cargo.toml +++ b/bin/darkfid2/Cargo.toml @@ -15,14 +15,14 @@ async-std = "1.11.0" async-trait = "0.1.53" chrono = "0.4.19" ctrlc-async = {version = "3.2.2", default-features = false, features = ["async-std", "termination"]} -darkfi = {path = "../../", features = ["blockchain2", "wallet", "rpc", "net"]} +darkfi = {path = "../../", features = ["blockchain", "wallet", "rpc", "net", "node"]} easy-parallel = "3.2.0" futures-lite = "1.12.0" lazy-init = "0.5.0" log = "0.4.16" rand = "0.8.5" serde_json = "1.0.79" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" sled = "0.34.7" url = "2.2.2" diff --git a/bin/darkfid2/src/client.rs b/bin/darkfid2/src/client.rs deleted file mode 100644 index 90edbfafa..000000000 --- a/bin/darkfid2/src/client.rs +++ /dev/null @@ -1,75 +0,0 @@ -use async_std::sync::Mutex; -use lazy_init::Lazy; -use log::info; - -use darkfi::{ - crypto::{ - address::Address, - keypair::{Keypair, PublicKey}, - proof::ProvingKey, - }, - wallet::walletdb::WalletPtr, - Result, -}; - -pub struct Client { - main_keypair: Mutex, - wallet: WalletPtr, - mint_pk: Lazy, - burn_pk: Lazy, -} - -impl Client { - pub async fn new(wallet: WalletPtr) -> Result { - // Initialize or load the wallet - wallet.init_db().await?; - - // Check if there is a default keypair and generate one in - // case we don't have any. - if wallet.get_default_keypair().await.is_err() { - // TODO: Clean this up with Option to have less calls. - if wallet.get_keypairs().await?.is_empty() { - wallet.keygen().await?; - } - - wallet.set_default_keypair(&wallet.get_keypairs().await?[0].public).await?; - } - - // Generate Merkle Tree if we don't have one. - // if wallet.get_tree().await.is_err() { - // wallet.tree_gen().await?; - // } - - let main_keypair = wallet.get_default_keypair().await?; - info!(target: "CLIENT", "Main keypair: {}", Address::from(main_keypair.public)); - - Ok(Self { - main_keypair: Mutex::new(main_keypair), - wallet, - mint_pk: Lazy::new(), - burn_pk: Lazy::new(), - }) - } - - pub async fn keygen(&self) -> Result
{ - let kp = self.wallet.keygen().await?; - Ok(Address::from(kp.public)) - } - - pub async fn get_keypairs(&self) -> Result> { - self.wallet.get_keypairs().await - } - - pub async fn put_keypair(&self, keypair: &Keypair) -> Result<()> { - self.wallet.put_keypair(keypair).await - } - - pub async fn set_default_keypair(&self, public: &PublicKey) -> Result<()> { - self.wallet.set_default_keypair(public).await?; - let kp = self.wallet.get_default_keypair().await?; - let mut mk = self.main_keypair.lock().await; - *mk = kp; - drop(mk); - Ok(()) - } -} diff --git a/bin/darkfid2/src/main.rs b/bin/darkfid2/src/main.rs index 129e2f27b..be2b859b6 100644 --- a/bin/darkfid2/src/main.rs +++ b/bin/darkfid2/src/main.rs @@ -5,6 +5,7 @@ use async_std::sync::{Arc, Mutex}; use async_trait::async_trait; use easy_parallel::Parallel; use futures_lite::future; +use lazy_init::Lazy; use log::{error, info}; use rand::Rng; use serde_derive::Deserialize; @@ -15,6 +16,8 @@ use structopt_toml::StructOptToml; use url::Url; use darkfi::{ + async_daemonize, + blockchain2::{NullifierStore, RootStore}, cli_desc, consensus2::{ proto::{ProtocolParticipant, ProtocolProposal, ProtocolTx, ProtocolVote}, @@ -28,6 +31,7 @@ use darkfi::{ }, net, net::P2pPtr, + node::{Client, State}, rpc::{ jsonrpc, jsonrpc::{ @@ -45,9 +49,6 @@ use darkfi::{ Error, Result, }; -mod client; -use client::Client; - mod error; use error::{server_error, RpcError}; @@ -116,9 +117,9 @@ struct Args { pub struct Darkfid { client: Client, - state: ValidatorStatePtr, p2p: P2pPtr, - synced: Mutex, + validator_state: ValidatorStatePtr, + state: Arc>, } #[async_trait] @@ -137,16 +138,36 @@ impl RequestHandler for Darkfid { Some("export_keypair") => return self.export_keypair(req.id, params).await, Some("import_keypair") => return self.import_keypair(req.id, params).await, Some("set_default_address") => return self.set_default_address(req.id, params).await, - Some("tx") => return self.receive_tx(req.id, params).await, Some(_) | None => return jsonrpc::error(MethodNotFound, None, req.id).into(), } } } impl Darkfid { - pub async fn new(wallet: WalletPtr, state: ValidatorStatePtr, p2p: P2pPtr) -> Result { + pub async fn new( + db: &sled::Db, + wallet: WalletPtr, + validator_state: ValidatorStatePtr, + p2p: P2pPtr, + ) -> Result { + // Initialize Client let client = Client::new(wallet).await?; - Ok(Self { client, state, p2p, synced: Mutex::new(false) }) + let tree = client.get_tree().await?; + let merkle_roots = RootStore::new(db)?; + let nullifiers = NullifierStore::new(db)?; + + // Initialize State + let state = Arc::new(Mutex::new(State { + tree, + merkle_roots, + nullifiers, + cashier_pubkeys: vec![], + faucet_pubkeys: vec![], + mint_vk: Lazy::new(), + burn_vk: Lazy::new(), + })); + + Ok(Self { client, p2p, validator_state, state }) } // RPCAPI: @@ -326,23 +347,6 @@ impl Darkfid { jsonrpc::response(json!(true), id).into() } - - async fn receive_tx(&self, id: Value, params: &[Value]) -> JsonResult { - if params.len() != 1 || !params[0].is_string() { - return jsonrpc::error(InvalidParams, None, id).into() - } - - let payload = String::from(params[0].as_str().unwrap()); - let tx = Tx { payload }; - - self.state.write().await.append_tx(tx.clone()); - - let result = self.p2p.broadcast(tx).await; - match result { - Ok(()) => jsonrpc::response(json!(true), id).into(), - Err(_) => jsonrpc::error(InternalError, None, id).into(), - } - } } async fn init_wallet(wallet_path: &str, wallet_pass: &str) -> Result { @@ -352,6 +356,7 @@ async fn init_wallet(wallet_path: &str, wallet_pass: &str) -> Result Ok(wallet) } +async_daemonize!(realmain); async fn realmain(args: Args, ex: Arc>) -> Result<()> { // We use this handler to block this function after detaching all // tasks, and to catch a shutdown signal, where we can clean up and @@ -383,6 +388,8 @@ async fn realmain(args: Args, ex: Arc>) -> Result<()> { // TODO: Is this ok? let mut rng = rand::thread_rng(); let id: u64 = rng.gen(); + + // Initialize validator state let state = ValidatorState::new(&sled_db, id, genesis_ts, genesis_data)?; // P2P network @@ -398,6 +405,7 @@ async fn realmain(args: Args, ex: Arc>) -> Result<()> { let p2p = net::P2p::new(network_settings).await; let registry = p2p.protocol_registry(); + info!("Registering P2P protocols..."); let _state = state.clone(); registry .register(!net::SESSION_SEED, move |channel, p2p| { @@ -407,33 +415,33 @@ async fn realmain(args: Args, ex: Arc>) -> Result<()> { .await; // Activate these protocols only if we're participating in consensus. - if args.consensus { - info!("Registering consensus P2P protocols..."); + //if args.consensus { + info!("Registering consensus P2P protocols..."); - let _state = state.clone(); - registry - .register(!net::SESSION_SEED, move |channel, p2p| { - let state = _state.clone(); - async move { ProtocolVote::init(channel, state, p2p).await.unwrap() } - }) - .await; + let _state = state.clone(); + registry + .register(!net::SESSION_SEED, move |channel, p2p| { + let state = _state.clone(); + async move { ProtocolVote::init(channel, state, p2p).await.unwrap() } + }) + .await; - let _state = state.clone(); - registry - .register(!net::SESSION_SEED, move |channel, p2p| { - let state = _state.clone(); - async move { ProtocolProposal::init(channel, state, p2p).await.unwrap() } - }) - .await; + let _state = state.clone(); + registry + .register(!net::SESSION_SEED, move |channel, p2p| { + let state = _state.clone(); + async move { ProtocolProposal::init(channel, state, p2p).await.unwrap() } + }) + .await; - let _state = state.clone(); - registry - .register(!net::SESSION_SEED, move |channel, p2p| { - let state = _state.clone(); - async move { ProtocolParticipant::init(channel, state, p2p).await.unwrap() } - }) - .await; - } + let _state = state.clone(); + registry + .register(!net::SESSION_SEED, move |channel, p2p| { + let state = _state.clone(); + async move { ProtocolParticipant::init(channel, state, p2p).await.unwrap() } + }) + .await; + //} info!("Starting P2P networking"); p2p.clone().start(ex.clone()).await?; @@ -447,7 +455,7 @@ async fn realmain(args: Args, ex: Arc>) -> Result<()> { .detach(); // Initialize program state - let darkfid = Darkfid::new(wallet, state.clone(), p2p.clone()).await?; + let darkfid = Darkfid::new(&sled_db, wallet, state.clone(), p2p.clone()).await?; let darkfid = Arc::new(darkfid); // JSON-RPC server @@ -455,10 +463,10 @@ async fn realmain(args: Args, ex: Arc>) -> Result<()> { ex.spawn(listen_and_serve(args.rpc_listen, darkfid)).detach(); // Consensus protocol - if args.consensus { - info!("Starting consensus protocol task"); - ex.spawn(proposal_task(p2p, state)).detach(); - } + //if args.consensus { + info!("Starting consensus protocol task"); + ex.spawn(proposal_task(p2p, state)).detach(); + //} // Wait for SIGINT shutdown.recv().await?; @@ -471,30 +479,3 @@ async fn realmain(args: Args, ex: Arc>) -> Result<()> { Ok(()) } - -fn main() -> Result<()> { - let args = Args::from_args_with_toml("").unwrap(); - let cfg_path = get_config_path(args.config, CONFIG_FILE)?; - spawn_config(&cfg_path, CONFIG_FILE_CONTENTS.as_bytes())?; - let args = Args::from_args_with_toml(&std::fs::read_to_string(cfg_path)?).unwrap(); - - let (lvl, conf) = log_config(args.verbose.into())?; - TermLogger::init(lvl, conf, TerminalMode::Mixed, ColorChoice::Auto)?; - - // https://docs.rs/smol/latest/smol/struct.Executor.html#examples - let ex = Arc::new(Executor::new()); - let (signal, shutdown) = async_channel::unbounded::<()>(); - let (_, result) = Parallel::new() - // Run four executor threads - .each(0..4, |_| future::block_on(ex.run(shutdown.recv()))) - // Run the main future on the current thread. - .finish(|| { - future::block_on(async { - realmain(args, ex.clone()).await?; - drop(signal); - Ok::<(), darkfi::Error>(()) - }) - }); - - result -} diff --git a/bin/dnetview/Cargo.toml b/bin/dnetview/Cargo.toml index e8fc385ea..75bf09d0d 100644 --- a/bin/dnetview/Cargo.toml +++ b/bin/dnetview/Cargo.toml @@ -19,9 +19,9 @@ easy-parallel = "3.2.0" async-channel = "1.6.1" # Misc -clap = "3.1.8" +clap = "3.1.10" rand = "0.8.5" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" log = "0.4.16" num_cpus = "1.13.1" url = "2.2.2" diff --git a/bin/drk/Cargo.toml b/bin/drk/Cargo.toml index aa612d20c..041f73bb2 100644 --- a/bin/drk/Cargo.toml +++ b/bin/drk/Cargo.toml @@ -12,9 +12,9 @@ features = ["rpc"] async-std = {version = "1.11.0", features = ["attributes"]} # Misc -clap = {version = "3.1.8", features = ["derive"]} +clap = {version = "3.1.10", features = ["derive"]} log = "0.4.16" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" prettytable-rs = "0.8.0" url = "2.2.2" diff --git a/bin/faucetd/Cargo.toml b/bin/faucetd/Cargo.toml index 2e2ee4849..f9361d17c 100644 --- a/bin/faucetd/Cargo.toml +++ b/bin/faucetd/Cargo.toml @@ -25,7 +25,7 @@ log = "0.4.16" num-bigint = "0.4.3" rand = "0.8.5" serde_json = "1.0.79" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" sled = "0.34.7" url = "2.2.2" diff --git a/bin/gatewayd/Cargo.toml b/bin/gatewayd/Cargo.toml index 3ffe79341..9db062b77 100644 --- a/bin/gatewayd/Cargo.toml +++ b/bin/gatewayd/Cargo.toml @@ -16,10 +16,10 @@ async-executor = "1.4.1" easy-parallel = "3.2.0" # Misc -clap = {version = "3.1.8", features = ["derive"]} +clap = {version = "3.1.10", features = ["derive"]} log = "0.4.16" num_cpus = "1.13.1" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" # Encoding and parsing serde = {version = "1.0.136", features = ["derive"]} diff --git a/bin/ircd/Cargo.toml b/bin/ircd/Cargo.toml index d56260fd0..ad3d09dcc 100644 --- a/bin/ircd/Cargo.toml +++ b/bin/ircd/Cargo.toml @@ -23,9 +23,9 @@ easy-parallel = "3.2.0" rand = "0.8.5" # Misc -clap = {version = "3.1.8", features = ["derive"]} +clap = {version = "3.1.10", features = ["derive"]} log = "0.4.16" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" fxhash = "0.2.1" # Encoding and parsing diff --git a/bin/tau/tau-cli/Cargo.toml b/bin/tau/tau-cli/Cargo.toml index aa22fe457..a32cf1d86 100644 --- a/bin/tau/tau-cli/Cargo.toml +++ b/bin/tau/tau-cli/Cargo.toml @@ -16,10 +16,10 @@ async-executor = "1.4.1" easy-parallel = "3.2.0" # Misc -clap = {version = "3.1.8", features = ["derive"]} +clap = {version = "3.1.10", features = ["derive"]} log = "0.4.16" num_cpus = "1.13.1" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" url = "2.2.2" chrono = "0.4.19" prettytable-rs = "0.8.0" diff --git a/bin/tau/taud/Cargo.toml b/bin/tau/taud/Cargo.toml index 091be8e6c..15c6ca6a2 100644 --- a/bin/tau/taud/Cargo.toml +++ b/bin/tau/taud/Cargo.toml @@ -18,10 +18,10 @@ async-executor = "1.4.1" easy-parallel = "3.2.0" # Misc -clap = {version = "3.1.8", features = ["derive"]} +clap = {version = "3.1.10", features = ["derive"]} log = "0.4.16" num_cpus = "1.13.1" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" rand = "0.8.5" chrono = "0.4.19" thiserror = "1.0.30" diff --git a/bin/vanityaddr/Cargo.toml b/bin/vanityaddr/Cargo.toml index 37fd9f3b5..a921ad27a 100644 --- a/bin/vanityaddr/Cargo.toml +++ b/bin/vanityaddr/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] bs58 = "0.4.0" -clap = {version = "3.1.8", features = ["derive"]} +clap = {version = "3.1.10", features = ["derive"]} ctrlc = "3.2.1" darkfi = {path = "../../", features = ["crypto"]} indicatif = "0.17.0-rc.10" diff --git a/bin/zkas/Cargo.toml b/bin/zkas/Cargo.toml index 3a303c6d3..52a4be8cb 100644 --- a/bin/zkas/Cargo.toml +++ b/bin/zkas/Cargo.toml @@ -9,5 +9,5 @@ license = "AGPL-3.0-only" edition = "2021" [dependencies] -clap = {version = "3.1.8", features = ["derive"]} +clap = {version = "3.1.10", features = ["derive"]} darkfi = {path = "../../", features = ["zkas"]} diff --git a/example/p2pdebug/Cargo.toml b/example/p2pdebug/Cargo.toml index dd40bbb12..9f70898ec 100644 --- a/example/p2pdebug/Cargo.toml +++ b/example/p2pdebug/Cargo.toml @@ -23,9 +23,9 @@ easy-parallel = "3.2.0" rand = "0.8.5" # Misc -clap = {version = "3.1.8", features = ["derive"]} +clap = {version = "3.1.10", features = ["derive"]} log = "0.4.16" -simplelog = "0.12.0-alpha1" +simplelog = "0.12.0" fxhash = "0.2.1" url = "2.2.2"