From 6e58d6e24dbce799149dea38596e2fb2fa9ec279 Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:19:38 -0800 Subject: [PATCH 01/12] supporting changes for deploy --- Cargo.lock | 1695 ++++++++++++++--- Cargo.toml | 3 + errors/src/errors/cli/cli_errors.rs | 7 + errors/src/errors/package/package_errors.rs | 15 + leo/cli/cli.rs | 36 +- leo/package/Cargo.toml | 3 + .../src/program_context/lock_file_entry.rs | 14 +- 7 files changed, 1511 insertions(+), 262 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 06d79e83e0..95ec2f5783 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -36,6 +36,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + [[package]] name = "aes" version = "0.8.3" @@ -47,11 +57,25 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", "once_cell", @@ -154,9 +178,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" dependencies = [ "anstyle", "anstyle-parse", @@ -174,30 +198,30 @@ checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -233,15 +257,26 @@ dependencies = [ "wait-timeout", ] +[[package]] +name = "async-recursion" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +dependencies = [ + "proc-macro2", + "quote 1.0.35", + "syn 2.0.48", +] + [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -250,6 +285,92 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "headers", + "http 0.2.11", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 0.2.11", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-extra" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ab90e7b70bea63a153137162affb6a0bce26b584c24a4c7885509783e2cf30b" +dependencies = [ + "axum", + "axum-core", + "bytes", + "futures-util", + "http 0.2.11", + "http-body", + "mime", + "pin-project-lite", + "serde", + "serde_json", + "tokio", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backoff" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +dependencies = [ + "futures-core", + "getrandom", + "instant", + "pin-project-lite", + "rand", + "tokio", +] + [[package]] name = "backtrace" version = "0.3.69" @@ -292,6 +413,27 @@ dependencies = [ "serde", ] +[[package]] +name = "bindgen" +version = "0.65.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" +dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "prettyplease", + "proc-macro2", + "quote 1.0.35", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.48", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -344,12 +486,12 @@ dependencies = [ [[package]] name = "bstr" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", - "regex-automata", + "regex-automata 0.4.3", "serde", ] @@ -392,6 +534,12 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "cassowary" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" + [[package]] name = "cast" version = "0.3.0" @@ -408,12 +556,45 @@ dependencies = [ "libc", ] +[[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 = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "chacha20poly1305" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" +dependencies = [ + "aead", + "chacha20", + "cipher", + "poly1305", + "zeroize", +] + [[package]] name = "ci_info" version = "0.10.2" @@ -458,13 +639,25 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", + "zeroize", +] + +[[package]] +name = "clang-sys" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +dependencies = [ + "glob", + "libc", + "libloading", ] [[package]] name = "clap" -version = "4.4.12" +version = "4.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfab8ba68f3668e89f6ff60f5b205cea56aa7b769451a59f34b8682f51c056d" +checksum = "52bdc885e4cacc7f7c9eedc1ef6da641603180c783c41a15c264944deeaab642" dependencies = [ "clap_builder", "clap_derive", @@ -491,7 +684,7 @@ dependencies = [ "heck", "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -518,11 +711,10 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "2.0.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" dependencies = [ - "is-terminal", "lazy_static", "windows-sys 0.48.0", ] @@ -542,9 +734,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "constant_time_eq" @@ -560,9 +752,9 @@ checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -570,15 +762,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -630,9 +822,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -641,26 +833,65 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "0e3681d554572a651dda4186cd47240627c3d0114d45a95f6ad27f2f22e7548d" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" dependencies = [ "cfg-if", ] +[[package]] +name = "crossterm" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" +dependencies = [ + "bitflags 1.3.2", + "crossterm_winapi", + "libc", + "mio", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" +dependencies = [ + "bitflags 2.4.1", + "crossterm_winapi", + "libc", + "mio", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + [[package]] name = "crunchy" version = "0.2.2" @@ -674,9 +905,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", + "rand_core", "typenum", ] +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + [[package]] name = "curl" version = "0.4.44" @@ -694,9 +935,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.68+curl-8.4.0" +version = "0.4.70+curl-8.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a0d18d88360e374b16b2273c832b5e57258ffc1d4aa4f96b108e0738d5752f" +checksum = "3c0333d8849afe78a4c8102a429a446bfdd055832af071945520e835ae2d841e" dependencies = [ "cc", "libc", @@ -732,7 +973,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -742,7 +983,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.2", + "hashbrown 0.14.3", "lock_api", "once_cell", "parking_lot_core", @@ -760,9 +1001,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", ] @@ -1000,9 +1241,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -1015,9 +1256,9 @@ checksum = "c1fd087255f739f4f1aeea69f11b72f8080e9c2e7645cd06955dad4a178a49e3" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -1030,9 +1271,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -1040,48 +1281,61 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", "futures-util", + "num_cpus", ] [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote 1.0.35", + "syn 2.0.48", +] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", "futures-io", + "futures-macro", "futures-sink", "futures-task", "memchr", @@ -1125,15 +1379,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", +] + +[[package]] +name = "ghash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +dependencies = [ + "opaque-debug", + "polyval", ] [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "glob" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" @@ -1146,7 +1418,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.11", "indexmap 2.1.0", "slab", "tokio", @@ -1168,14 +1440,47 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", "allocator-api2", ] +[[package]] +name = "headers" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" +dependencies = [ + "base64", + "bytes", + "headers-core", + "http 0.2.11", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +dependencies = [ + "http 0.2.11", +] + [[package]] name = "heck" version = "0.4.1" @@ -1214,17 +1519,34 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.11", "pin-project-lite", ] +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + [[package]] name = "httparse" version = "1.8.0" @@ -1239,22 +1561,22 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", "h2", - "http", + "http 0.2.11", "http-body", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2 0.5.5", "tokio", "tower-service", "tracing", @@ -1276,9 +1598,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1302,7 +1624,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", "rayon", "serde", ] @@ -1346,13 +1668,13 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ "hermit-abi", "rustix", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1384,9 +1706,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" @@ -1399,19 +1721,40 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jsonwebtoken" +version = "9.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7ea04a7c5c055c175f189b6dc6ba036fd62306b58c66c9f6389036c503a3f4" +dependencies = [ + "base64", + "js-sys", + "pem", + "ring", + "serde", + "serde_json", + "simple_asn1", +] + [[package]] name = "lazy_static" 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 = "leo-abnf" version = "1.10.0" @@ -1504,6 +1847,7 @@ dependencies = [ "serde", "serde_json", "serial_test", + "snarkos-cli", "snarkvm", "sys-info", "test_dir", @@ -1526,6 +1870,7 @@ dependencies = [ "retriever", "serde", "serial_test", + "snarkos-cli", "snarkvm", "toml 0.8.8", "tracing", @@ -1596,9 +1941,19 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.150" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "libloading" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] [[package]] name = "libredox" @@ -1611,6 +1966,21 @@ dependencies = [ "redox_syscall", ] +[[package]] +name = "librocksdb-sys" +version = "0.11.0+8.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" +dependencies = [ + "bindgen", + "bzip2-sys", + "cc", + "glob", + "libc", + "libz-sys", + "lz4-sys", +] + [[package]] name = "libz-sys" version = "1.1.12" @@ -1631,9 +2001,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" @@ -1651,21 +2021,119 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +[[package]] +name = "lru" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7" +dependencies = [ + "hashbrown 0.14.3", +] + +[[package]] +name = "lz4-sys" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "mach2" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" +dependencies = [ + "libc", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memoffset" -version = "0.9.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ "autocfg", ] +[[package]] +name = "metrics" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fde3af1a009ed76a778cb84fdef9e7dbbdf5775ae3e4cc1f434a6a307f6f76c5" +dependencies = [ + "ahash", + "metrics-macros", + "portable-atomic", +] + +[[package]] +name = "metrics-exporter-prometheus" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d4fa7ce7c4862db464a37b0b31d89bca874562f034bd7993895572783d02950" +dependencies = [ + "base64", + "hyper", + "indexmap 1.9.3", + "ipnet", + "metrics", + "metrics-util", + "quanta", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "metrics-macros" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f" +dependencies = [ + "proc-macro2", + "quote 1.0.35", + "syn 2.0.48", +] + +[[package]] +name = "metrics-util" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4de2ed6e491ed114b40b732e4d1659a9d53992ebd87490c44a6ffe23739d973e" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.13.1", + "metrics", + "num_cpus", + "quanta", + "sketches-ddsketch", +] + [[package]] name = "mime" version = "0.3.17" @@ -1699,11 +2167,12 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", + "log", "wasi", "windows-sys 0.48.0", ] @@ -1732,6 +2201,19 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab250442c86f1850815b5d268639dff018c0627022bc1940eb2d642ca1ce12f0" +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset", + "pin-utils", +] + [[package]] name = "nom" version = "7.1.3" @@ -1771,7 +2253,7 @@ checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" dependencies = [ "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -1821,18 +2303,21 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +dependencies = [ + "parking_lot_core", +] [[package]] name = "oorandom" @@ -1840,11 +2325,17 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + [[package]] name = "openssl" -version = "0.10.59" +version = "0.10.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" +checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" dependencies = [ "bitflags 2.4.1", "cfg-if", @@ -1863,7 +2354,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -1874,9 +2365,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.95" +version = "0.9.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" +checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" dependencies = [ "cc", "libc", @@ -1948,11 +2439,47 @@ dependencies = [ "sha2", ] +[[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 = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" +dependencies = [ + "base64", + "serde", +] + [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote 1.0.35", + "syn 2.0.48", +] [[package]] name = "pin-project-lite" @@ -1978,15 +2505,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" [[package]] name = "platforms" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" +checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" [[package]] name = "plotters" @@ -2016,11 +2543,34 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "polyval" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + [[package]] name = "portable-atomic" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" [[package]] name = "powerfmt" @@ -2062,15 +2612,41 @@ dependencies = [ "termtree", ] +[[package]] +name = "prettyplease" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +dependencies = [ + "proc-macro2", + "syn 2.0.48", +] + [[package]] name = "proc-macro2" -version = "1.0.74" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2de98502f212cfcea8d0bb305bd0f49d7ebdd75b64ba0a68f937d888f4e0d6db" +checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" dependencies = [ "unicode-ident", ] +[[package]] +name = "quanta" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17e662a7a8291a865152364c20c7abc5e60486ab2001e8ec10b24862de0b9ab" +dependencies = [ + "crossbeam-utils", + "libc", + "mach2", + "once_cell", + "raw-cpuid", + "wasi", + "web-sys", + "winapi", +] + [[package]] name = "quick-xml" version = "0.23.1" @@ -2134,6 +2710,15 @@ dependencies = [ "rand_core", ] +[[package]] +name = "raw-cpuid" +version = "10.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "rayon" version = "1.8.0" @@ -2182,8 +2767,17 @@ checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -2194,9 +2788,15 @@ checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.2", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + [[package]] name = "regex-syntax" version = "0.8.2" @@ -2215,7 +2815,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.11", "http-body", "hyper", "hyper-tls", @@ -2264,9 +2864,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", "getrandom", @@ -2276,12 +2876,28 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "rocksdb" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" +dependencies = [ + "libc", + "librocksdb-sys", +] + [[package]] name = "rustc-demangle" version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc_version" version = "0.4.0" @@ -2306,9 +2922,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.9" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring", @@ -2326,6 +2942,12 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + [[package]] name = "rusty-hook" version = "0.11.2" @@ -2340,9 +2962,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "same-file" @@ -2355,11 +2977,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2460,9 +3082,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "serde" @@ -2481,14 +3103,14 @@ checksum = "a3385e45322e8f9931410f01b3031ec534c3947d0e94c18049af4d9f9907d4e0" dependencies = [ "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "indexmap 2.1.0", "itoa", @@ -2496,130 +3118,564 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" +dependencies = [ + "itoa", + "serde", +] + [[package]] name = "serde_spanned" -version = "0.6.4" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ + "form_urlencoded", + "itoa", + "ryu", "serde", ] [[package]] -name = "serde_urlencoded" -version = "0.7.1" +name = "serde_yaml" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +dependencies = [ + "indexmap 1.9.3", + "ryu", + "serde", + "yaml-rust", +] + +[[package]] +name = "serial_test" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" +dependencies = [ + "dashmap", + "futures", + "lazy_static", + "log", + "parking_lot", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" +dependencies = [ + "proc-macro2", + "quote 1.0.35", + "syn 2.0.48", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" + +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror", + "time", +] + +[[package]] +name = "sketches-ddsketch" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a406c1882ed7f29cd5e248c9848a80e7cb6ae0fea82346d2746f2f941c07e1" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +dependencies = [ + "serde", +] + +[[package]] +name = "smol_str" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c" +dependencies = [ + "serde", +] + +[[package]] +name = "snarkos-account" +version = "2.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0057351d17108cfe3e0a1d79a3daeec69656e549a98d3837b2a600b0fef0251" +dependencies = [ + "anyhow", + "colored", + "rand", + "snarkvm", +] + +[[package]] +name = "snarkos-cli" +version = "2.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f3b0864a6b4add97c35bbb9141f5ec95ac0adb9e149aecdd2376ade8e25819" +dependencies = [ + "aleo-std", + "anstyle", + "anyhow", + "bincode", + "clap", + "colored", + "crossterm 0.27.0", + "indexmap 2.1.0", + "nix", + "num_cpus", + "parking_lot", + "rand", + "rand_chacha", + "rayon", + "self_update 0.39.0", + "serde", + "serde_json", + "snarkos-account", + "snarkos-display", + "snarkos-node", + "snarkos-node-cdn", + "snarkos-node-metrics", + "snarkos-node-rest", + "snarkvm", + "sys-info", + "thiserror", + "tokio", + "tracing-subscriber", + "ureq", +] + +[[package]] +name = "snarkos-display" +version = "2.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58591ca2c2ecb9b87b81fa7801f28670a818214b42070c8256fa6de4ed999b34" +dependencies = [ + "anyhow", + "crossterm 0.27.0", + "snarkos-node", + "snarkvm", + "tokio", + "tui", +] + +[[package]] +name = "snarkos-node" +version = "2.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7571262ed633a61d85dfe77ee7e56536662a29e4e4c86242ff2c79977e086f0b" +dependencies = [ + "aleo-std", + "anyhow", + "async-trait", + "colored", + "futures-util", + "indexmap 2.1.0", + "num_cpus", + "once_cell", + "parking_lot", + "rand", + "rayon", + "serde_json", + "snarkos-account", + "snarkos-node-bft", + "snarkos-node-cdn", + "snarkos-node-consensus", + "snarkos-node-metrics", + "snarkos-node-rest", + "snarkos-node-router", + "snarkos-node-sync", + "snarkos-node-tcp", + "snarkvm", + "time", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "snarkos-node-bft" +version = "2.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a255ef99e9a686b2dfd752f7818adb41307f921add20e37c7ab1cf9b0ccfed2c" +dependencies = [ + "anyhow", + "async-recursion", + "async-trait", + "bytes", + "colored", + "futures", + "indexmap 2.1.0", + "parking_lot", + "rand", + "rayon", + "serde", + "sha2", + "snarkos-account", + "snarkos-node-bft-events", + "snarkos-node-bft-ledger-service", + "snarkos-node-bft-storage-service", + "snarkos-node-metrics", + "snarkos-node-sync", + "snarkos-node-tcp", + "snarkvm", + "snow", + "time", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", +] + +[[package]] +name = "snarkos-node-bft-events" +version = "2.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cedb2347053a728c4f8a902f5e7fb823d8450d18ccabae33aee1c2c9c7bc1a" +dependencies = [ + "anyhow", + "bytes", + "indexmap 2.1.0", + "rayon", + "serde", + "snarkos-node-metrics", + "snarkos-node-sync-locators", + "snarkvm", + "snow", + "tokio-util", + "tracing", +] + +[[package]] +name = "snarkos-node-bft-ledger-service" +version = "2.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622519cc68ba7b5857a84148b6b23794089229fdb39c1d41c56c1314b77132c2" +dependencies = [ + "async-trait", + "indexmap 2.1.0", + "rand", + "snarkvm", + "tokio", + "tracing", +] + +[[package]] +name = "snarkos-node-bft-storage-service" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +checksum = "4be8e3687de55a8fc52ee1a07cdd95a5c9946562ac05a06f2df7d0af4951fda6" dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", + "indexmap 2.1.0", + "parking_lot", + "snarkvm", + "tracing", ] [[package]] -name = "serde_yaml" -version = "0.8.26" +name = "snarkos-node-cdn" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +checksum = "f5d98073a0477176388926c20ee1fe7ffe1f5677630448fbf95ea8e16fd8132a" dependencies = [ - "indexmap 1.9.3", - "ryu", + "anyhow", + "backoff", + "bincode", + "colored", + "futures", + "parking_lot", + "rayon", + "reqwest", "serde", - "yaml-rust", + "serde_json", + "snarkvm", + "tokio", + "tracing", ] [[package]] -name = "serial_test" -version = "2.0.0" +name = "snarkos-node-consensus" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" +checksum = "c5731dbd576f3cb110b6a75b3452fa8298197730d1a788da728a01b176c7b90d" dependencies = [ - "dashmap", - "futures", - "lazy_static", - "log", + "anyhow", + "colored", + "indexmap 2.1.0", + "lru", "parking_lot", - "serial_test_derive", + "rand", + "snarkos-account", + "snarkos-node-bft", + "snarkos-node-bft-ledger-service", + "snarkos-node-bft-storage-service", + "snarkos-node-metrics", + "snarkvm", + "tokio", + "tracing", ] [[package]] -name = "serial_test_derive" -version = "2.0.0" +name = "snarkos-node-metrics" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" +checksum = "1f8dfc02b2dea898c796a729122bc8f5b12e34c5ad1681e71370f470d4686111" dependencies = [ - "proc-macro2", - "quote 1.0.35", - "syn 2.0.46", + "metrics", + "metrics-exporter-prometheus", + "snarkvm", + "tokio", ] [[package]] -name = "sha1" -version = "0.10.6" +name = "snarkos-node-rest" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +checksum = "eb6d13284aa70ff244932af67d74aeab1eca9635e0723b6b9ede4cc71857f7fc" dependencies = [ - "cfg-if", - "cpufeatures", - "digest", + "anyhow", + "axum", + "axum-extra", + "http 1.0.0", + "indexmap 2.1.0", + "jsonwebtoken", + "once_cell", + "parking_lot", + "rand", + "rayon", + "serde", + "serde_json", + "snarkos-node-consensus", + "snarkos-node-router", + "snarkvm", + "time", + "tokio", + "tower-http", + "tracing", ] [[package]] -name = "sha2" -version = "0.10.8" +name = "snarkos-node-router" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "d2649b18700e034d6e1ae085c6e0f797a7117995f78452f096c22d9a43e407c1" dependencies = [ - "cfg-if", - "cpufeatures", - "digest", + "anyhow", + "async-trait", + "bincode", + "bytes", + "colored", + "futures", + "indexmap 2.1.0", + "linked-hash-map", + "parking_lot", + "rand", + "reqwest", + "serde", + "snarkos-account", + "snarkos-node-metrics", + "snarkos-node-router-messages", + "snarkos-node-sync-locators", + "snarkos-node-tcp", + "snarkvm", + "time", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", ] [[package]] -name = "sharded-slab" -version = "0.1.7" +name = "snarkos-node-router-messages" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +checksum = "b4d944e2183d71d5bf9b68c5eb8a9141abf9710996556859fa5b23932ab4d628" dependencies = [ - "lazy_static", + "anyhow", + "bytes", + "indexmap 2.1.0", + "rayon", + "serde", + "snarkos-node-bft-events", + "snarkos-node-sync-locators", + "snarkvm", + "snow", + "tokio", + "tokio-util", + "tracing", ] [[package]] -name = "signature" -version = "2.2.0" +name = "snarkos-node-sync" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +checksum = "11d7c347a5e1f90619f3b608d0d6a02174ac2e690474aaef4127335f48bc0795" dependencies = [ - "digest", - "rand_core", + "anyhow", + "indexmap 2.1.0", + "itertools 0.12.0", + "once_cell", + "parking_lot", + "rand", + "serde", + "snarkos-node-bft-ledger-service", + "snarkos-node-sync-communication-service", + "snarkos-node-sync-locators", + "snarkvm", + "tokio", + "tracing", ] [[package]] -name = "slab" -version = "0.4.9" +name = "snarkos-node-sync-communication-service" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +checksum = "6fb9c67ce191470fc34660b011db15584fce6f57d6de60c26d22ad7c562a5c55" dependencies = [ - "autocfg", + "async-trait", + "tokio", ] [[package]] -name = "smallvec" -version = "1.11.2" +name = "snarkos-node-sync-locators" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "1c0120cc26d081132a64fac21e79c52b0fdad64c349702f78411f486bbeb743a" dependencies = [ + "anyhow", + "indexmap 2.1.0", "serde", + "snarkvm", + "tracing", ] [[package]] -name = "smol_str" -version = "0.2.0" +name = "snarkos-node-tcp" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c" +checksum = "f3c27e06f7691728de00228bced9b1eb69d92799df65b5a4740c4f9b452b970e" dependencies = [ - "serde", + "async-trait", + "bytes", + "futures-util", + "once_cell", + "parking_lot", + "snarkos-node-metrics", + "tokio", + "tokio-util", + "tracing", ] [[package]] @@ -2644,6 +3700,7 @@ dependencies = [ "snarkvm-circuit", "snarkvm-console", "snarkvm-ledger", + "snarkvm-metrics", "snarkvm-parameters", "snarkvm-synthesizer", "snarkvm-utilities", @@ -2663,7 +3720,7 @@ dependencies = [ "blake2", "cfg-if", "fxhash", - "hashbrown 0.14.2", + "hashbrown 0.14.3", "hex", "indexmap 2.1.0", "itertools 0.11.0", @@ -3221,6 +4278,7 @@ dependencies = [ "indexmap 2.1.0", "serde_json", "snarkvm-console", + "snarkvm-metrics", ] [[package]] @@ -3334,11 +4392,14 @@ version = "0.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56a3aac4e1dc3fd253b71ea018b0159364c501cc8f576924e491f50664d13c7c" dependencies = [ + "aleo-std", "anyhow", "bincode", "indexmap 2.1.0", + "once_cell", "parking_lot", "rayon", + "rocksdb", "serde", "snarkvm-console", "snarkvm-ledger-authority", @@ -3348,6 +4409,17 @@ dependencies = [ "snarkvm-ledger-narwhal-batch-certificate", "snarkvm-synthesizer-program", "snarkvm-synthesizer-snark", + "tracing", +] + +[[package]] +name = "snarkvm-metrics" +version = "0.16.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89c911acab53cd3e0b76f5ea7289f71c84dceab4511af0e523113ce4aeb719e" +dependencies = [ + "metrics", + "metrics-exporter-prometheus", ] [[package]] @@ -3485,7 +4557,23 @@ checksum = "187aec7253eb17296d6f41334f02287a24c49419c1d18f4233274e489bd2e6bd" dependencies = [ "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", +] + +[[package]] +name = "snow" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" +dependencies = [ + "aes-gcm", + "blake2", + "chacha20poly1305", + "curve25519-dalek", + "rand_core", + "rustc_version", + "sha2", + "subtle", ] [[package]] @@ -3516,9 +4604,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der", @@ -3560,15 +4648,21 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.46" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89456b690ff72fddcecf231caedbe615c59480c93358a93dfae7fc29e3ebbf0e" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote 1.0.35", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "synom" version = "0.11.3" @@ -3648,22 +4742,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.55" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3de26b0965292219b4287ff031fcba86837900fe9cd2b34ea8ad893c0953d2" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.55" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268026685b2be38d7103e9e507c938a1fcb3d7e6eb15e87870b617bf37b6d581" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -3678,14 +4772,16 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ "deranged", + "itoa", "powerfmt", "serde", "time-core", + "time-macros", ] [[package]] @@ -3694,6 +4790,15 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +[[package]] +name = "time-macros" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +dependencies = [ + "time-core", +] + [[package]] name = "tiny-keccak" version = "2.0.2" @@ -3730,20 +4835,34 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", "bytes", "libc", "mio", "num_cpus", + "parking_lot", "pin-project-lite", + "signal-hook-registry", "socket2 0.5.5", + "tokio-macros", "windows-sys 0.48.0", ] +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote 1.0.35", + "syn 2.0.48", +] + [[package]] name = "tokio-native-tls" version = "0.3.1" @@ -3754,6 +4873,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.10" @@ -3811,6 +4941,47 @@ dependencies = [ "winnow", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" +dependencies = [ + "bitflags 2.4.1", + "bytes", + "futures-core", + "futures-util", + "http 0.2.11", + "http-body", + "http-range-header", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -3823,6 +4994,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3836,7 +5008,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -3866,19 +5038,36 @@ version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ + "matchers", "nu-ansi-term", + "once_cell", + "regex", "sharded-slab", "smallvec", "thread_local", + "tracing", "tracing-core", "tracing-log", ] [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tui" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1" +dependencies = [ + "bitflags 1.3.2", + "cassowary", + "crossterm 0.25.0", + "unicode-segmentation", + "unicode-width", +] [[package]] name = "typenum" @@ -3897,9 +5086,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" @@ -3916,6 +5105,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + [[package]] name = "unicode-width" version = "0.1.11" @@ -3928,6 +5123,16 @@ version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + [[package]] name = "untrusted" version = "0.9.0" @@ -3936,9 +5141,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7830e33f6e25723d41a63f77e434159dad02919f18f55a512b5f16f3b1d77138" +checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" dependencies = [ "base64", "flate2", @@ -3954,9 +5159,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -4029,9 +5234,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -4039,24 +5244,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ "cfg-if", "js-sys", @@ -4066,9 +5271,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote 1.0.35", "wasm-bindgen-macro-support", @@ -4076,28 +5281,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -4105,9 +5310,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "winapi" @@ -4340,9 +5545,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.19" +version = "0.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "8434aeec7b290e8da5c3f0d628cb0eac6cabcb31d14bb74f779a08109a5914d6" dependencies = [ "memchr", ] @@ -4368,22 +5573,22 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.31" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.31" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] @@ -4403,7 +5608,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote 1.0.35", - "syn 2.0.46", + "syn 2.0.48", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 99066dbd0b..8df5e35276 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -150,6 +150,9 @@ version = "1.0" [dependencies.serial_test] version = "2.0.0" +[dependencies.snarkos-cli] +version = "2.2.4" + [dependencies.snarkvm] workspace = true features = [ "circuit", "console" ] diff --git a/errors/src/errors/cli/cli_errors.rs b/errors/src/errors/cli/cli_errors.rs index ca13d0ead5..816faf5aa1 100644 --- a/errors/src/errors/cli/cli_errors.rs +++ b/errors/src/errors/cli/cli_errors.rs @@ -178,4 +178,11 @@ create_messages!( msg: format!("Failed to write file.\nIO Error: {error}"), help: None, } + + @backtraced + failed_to_read_environment_private_key { + args: (error: impl Display), + msg: format!("Failed to read private key from environment.\nIO Error: {error}"), + help: Some("Pass in private key using `--private-key ` or create a .env file with your private key information. See examples for formatting information.".to_string()), + } ); diff --git a/errors/src/errors/package/package_errors.rs b/errors/src/errors/package/package_errors.rs index 8297b597f7..637aad11cb 100644 --- a/errors/src/errors/package/package_errors.rs +++ b/errors/src/errors/package/package_errors.rs @@ -348,4 +348,19 @@ create_messages!( msg: format!("Failed to update `program.json` from the provided file path {path} - {error}"), help: None, } + + @backtraced + failed_to_deserialize_lock_file { + args: (error: impl ErrorArg), + msg: format!("Failed to deserialize `leo.lock` - {error}"), + help: None, + } + + @backtraced + invalid_lock_file_formatting { + args: (), + msg: "Invalid `leo.lock` formatting.".to_string(), + help: Some("Delete the lock file and rebuild the project".to_string()), + } + ); diff --git a/leo/cli/cli.rs b/leo/cli/cli.rs index 241692aba9..6405a75fd6 100644 --- a/leo/cli/cli.rs +++ b/leo/cli/cli.rs @@ -43,11 +43,6 @@ pub struct CLI { ///Leo compiler and package manager #[derive(Parser, Debug)] enum Commands { - #[clap(about = "Add a new dependency to the current package. Defaults to testnet3 network")] - Add { - #[clap(flatten)] - command: Add, - }, #[clap(about = "Create a new Aleo account")] Account { #[clap(subcommand)] @@ -63,16 +58,6 @@ enum Commands { #[clap(subcommand)] command: Example, }, - #[clap(about = "Compile the current package as a program")] - Build { - #[clap(flatten)] - command: Build, - }, - #[clap(about = "Clean the output directory")] - Clean { - #[clap(flatten)] - command: Clean, - }, #[clap(about = "Run a program with input variables")] Run { #[clap(flatten)] @@ -83,6 +68,26 @@ enum Commands { #[clap(flatten)] command: Execute, }, + #[clap(about = "Deploy a program")] + Deploy { + #[clap(flatten)] + command: Deploy, + }, + #[clap(about = "Add a new dependency to the current package. Defaults to testnet3 network")] + Add { + #[clap(flatten)] + command: Add, + }, + #[clap(about = "Compile the current package as a program")] + Build { + #[clap(flatten)] + command: Build, + }, + #[clap(about = "Clean the output directory")] + Clean { + #[clap(flatten)] + command: Clean, + }, #[clap(about = "Update the Leo CLI")] Update { #[clap(flatten)] @@ -135,6 +140,7 @@ pub fn run_with_args(cli: CLI) -> Result<()> { command.try_execute(context) } Commands::Clean { command } => command.try_execute(context), + Commands::Deploy { command } => command.try_execute(context), Commands::Example { command } => command.try_execute(context), Commands::Run { command } => command.try_execute(context), Commands::Execute { command } => command.try_execute(context), diff --git a/leo/package/Cargo.toml b/leo/package/Cargo.toml index 94bf297c7e..0276ac2933 100644 --- a/leo/package/Cargo.toml +++ b/leo/package/Cargo.toml @@ -25,6 +25,9 @@ default-features = false [dependencies.snarkvm] workspace = true +[dependencies.snarkos-cli] +version = "2.2.4" + [dependencies.leo-errors] path = "../../errors" version = "=1.10.0" diff --git a/utils/retriever/src/program_context/lock_file_entry.rs b/utils/retriever/src/program_context/lock_file_entry.rs index df4f354acf..3540072ab0 100644 --- a/utils/retriever/src/program_context/lock_file_entry.rs +++ b/utils/retriever/src/program_context/lock_file_entry.rs @@ -28,13 +28,23 @@ pub struct LockFileEntry { dependencies: Vec, } +impl LockFileEntry { + pub fn path(&self) -> Option<&PathBuf> { + self.path.as_ref() + } + + pub fn name(&self) -> &str { + &self.name + } +} + impl From<&ProgramContext> for LockFileEntry { fn from(context: &ProgramContext) -> Self { LockFileEntry { - name: context.name().to_string(), + name: context.full_name().to_string(), network: context.network.clone(), // Direct access as per instruction location: context.location().clone(), - path: context.path.clone(), // Direct access as per instruction + path: context.full_path.clone(), // Direct access as per instruction checksum: context.checksum().to_string(), dependencies: context.dependencies().iter().map(|dep| format!("{}.aleo", dep)).collect(), } From 2b450b93460f6b5f4f4b6ef471b7b0e3bd22137c Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:19:58 -0800 Subject: [PATCH 02/12] read and filter lock file --- leo/cli/helpers/context.rs | 39 +++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/leo/cli/helpers/context.rs b/leo/cli/helpers/context.rs index e7a5de3bbc..fc404f945f 100644 --- a/leo/cli/helpers/context.rs +++ b/leo/cli/helpers/context.rs @@ -22,10 +22,12 @@ use leo_package::build::{BuildDirectory, BUILD_DIRECTORY_NAME}; use snarkvm::file::Manifest; use aleo_std::aleo_dir; +use indexmap::IndexMap; +use retriever::LockFileEntry; use std::{ env::current_dir, fs::File, - io::Write, + io::{Read, Write}, path::{Path, PathBuf}, }; @@ -106,4 +108,39 @@ impl Context { // Get package name from program id. Ok(manifest) } + + /// Returns a post ordering of the local dependencies. + /// Found by reading the lock file `leo.lock`. + pub fn local_dependency_paths(&self) -> Result> { + let path = self.dir()?; + let lock_path = path.join("leo.lock"); + + // If there is no lock file can assume no local dependencies + if !lock_path.exists() { + return Ok(Vec::new()); + } + + dbg!(&lock_path); + let contents = std::fs::read_to_string(&lock_path) + .map_err(|err| PackageError::failed_to_read_file(&lock_path.to_str().unwrap(), err))?; + dbg!(contents.clone()); + + let entry_map: IndexMap> = + toml::from_str(&contents).map_err(PackageError::failed_to_deserialize_lock_file)?; + dbg!(&entry_map); + + let lock_entries = entry_map.get("package").ok_or_else(PackageError::invalid_lock_file_formatting)?; + + let list: Vec<(String, PathBuf)> = lock_entries + .iter() + .filter_map(|entry| match entry.path() { + Some(local_path) => Some((entry.name().to_string(), local_path.clone().join("build"))), + None => None, + }) + .collect(); + + dbg!(list.clone()); + + Ok(list) + } } From eb58b83a85962ce1fd1f70af707992f59f71b942 Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:20:24 -0800 Subject: [PATCH 03/12] recursive leo deploy working --- leo/cli/commands/deploy.rs | 70 +++++++++++++++++++++++++++++--------- leo/cli/commands/mod.rs | 6 ++-- 2 files changed, 57 insertions(+), 19 deletions(-) diff --git a/leo/cli/commands/deploy.rs b/leo/cli/commands/deploy.rs index 19e82419c8..94a5266bca 100644 --- a/leo/cli/commands/deploy.rs +++ b/leo/cli/commands/deploy.rs @@ -15,10 +15,24 @@ // along with the Leo library. If not, see . use super::*; +use snarkos_cli::commands::{Deploy as SnarkOSDeploy, Developer}; +use snarkvm::cli::helpers::dotenv_private_key; +use std::path::PathBuf; /// Deploys an Aleo program. #[derive(Parser, Debug)] -pub struct Deploy; +pub struct Deploy { + #[clap(long, help = "Custom priority fee in microcredits", default_value = "1000000")] + pub(crate) priority_fee: String, + #[clap(long, help = "Custom query endpoint", default_value = "http://api.explorer.aleo.org/v1")] + pub(crate) endpoint: String, + #[clap(long, help = "Custom network", default_value = "testnet3")] + pub(crate) network: String, + #[clap(long, help = "Custom private key")] + pub(crate) private_key: Option, + #[clap(long, help = "Disables building of the project before deployment", default_value = "false")] + pub(crate) no_build: bool, +} impl Command for Deploy { type Input = (); @@ -28,29 +42,53 @@ impl Command for Deploy { tracing::span!(tracing::Level::INFO, "Leo") } - fn prelude(&self, _: Context) -> Result { + fn prelude(&self, context: Context) -> Result { + if !self.no_build { + (Build { options: BuildOptions::default() }).execute(context)?; + } Ok(()) } fn apply(self, context: Context, _: Self::Input) -> Result { - // Open the Leo build/ directory - let path = context.dir()?; - let build_directory = BuildDirectory::open(&path).map_err(|_| CliError::needs_leo_build())?; + // Get the program name + let project_name = context.open_manifest()?.program_id().to_string(); + + // Get the private key + let mut private_key = self.private_key; + if private_key.is_none() { + private_key = + Some(dotenv_private_key().map_err(CliError::failed_to_read_environment_private_key)?.to_string()); + } + + // Extract post-ordered list of local dependencies' paths from `leo.lock` + let mut all_paths: Vec<(String, PathBuf)> = context.local_dependency_paths()?; - // Change the cwd to the Leo build/ directory to deploy aleo files. - std::env::set_current_dir(&build_directory) - .map_err(|err| PackageError::failed_to_set_cwd(build_directory.display(), err))?; + // Add the parent program to be deployed last + all_paths.push((project_name, context.dir()?.join("build"))); - // Unset the Leo panic hook. - let _ = std::panic::take_hook(); + for (name, path) in all_paths { + // Set deploy arguments + let deploy = SnarkOSDeploy::try_parse_from([ + "snarkos", + "--private-key", + private_key.as_ref().unwrap(), + "--query", + self.endpoint.as_str(), + "--priority-fee", + self.priority_fee.as_str(), + "--path", + path.to_str().unwrap(), + "--broadcast", + format!("{}/{}/transaction/broadcast", self.endpoint, self.network).as_str(), + &name, + ]) + .unwrap(); - // Call the `node` command. - println!(); - let command = SnarkVMDeploy::try_parse_from([ALEO_CLI_COMMAND]).map_err(CliError::failed_to_parse_aleo_node)?; - let res = command.parse().map_err(CliError::failed_to_execute_aleo_node)?; + dbg!(&deploy); // TODO: remove - // Log the output of the `node` command. - tracing::info!("{}", res); + // Deploy program + Developer::Deploy(deploy).parse().map_err(CliError::failed_to_execute_deploy)?; + } Ok(()) } diff --git a/leo/cli/commands/mod.rs b/leo/cli/commands/mod.rs index a06cf64560..230f4657cf 100644 --- a/leo/cli/commands/mod.rs +++ b/leo/cli/commands/mod.rs @@ -26,15 +26,15 @@ pub use build::Build; pub mod clean; pub use clean::Clean; +pub mod deploy; +pub use deploy::Deploy; + pub mod example; pub use example::Example; pub mod execute; pub use execute::Execute; -// pub mod deploy; -// pub use deploy::Deploy; - pub mod new; pub use new::New; From 67f30038d39991d24842c644c4b1bcce5597592e Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Mon, 8 Jan 2024 14:23:54 -0800 Subject: [PATCH 04/12] custom endpoints for dependency retrieval --- errors/src/errors/utils/util_errors.rs | 9 +++++- leo/cli/helpers/context.rs | 5 --- utils/retriever/src/lib.rs | 6 ++-- utils/retriever/src/retriever/mod.rs | 44 ++++++++++++++++++-------- 4 files changed, 42 insertions(+), 22 deletions(-) diff --git a/errors/src/errors/utils/util_errors.rs b/errors/src/errors/utils/util_errors.rs index deb719824b..903a721945 100644 --- a/errors/src/errors/utils/util_errors.rs +++ b/errors/src/errors/utils/util_errors.rs @@ -134,7 +134,7 @@ create_messages!( @formatted snarkvm_error_building_program_id { args: (), - msg: format!("Snarkvm error building program id"), + msg: "Snarkvm error building program id".to_string(), help: None, } @@ -144,4 +144,11 @@ create_messages!( msg: format!("Failed to retrieve from endpoint `{endpoint}`. Error: {error}"), help: None, } + + @formatted + build_file_does_not_exist { + args: (path: impl Display), + msg: format!("Compiled file at `{path}` does not exist, cannot compile parent."), + help: Some("If you were using the `--non-recursive` flag, remove it and try again.".to_string()), + } ); diff --git a/leo/cli/helpers/context.rs b/leo/cli/helpers/context.rs index fc404f945f..790a301fc4 100644 --- a/leo/cli/helpers/context.rs +++ b/leo/cli/helpers/context.rs @@ -120,14 +120,11 @@ impl Context { return Ok(Vec::new()); } - dbg!(&lock_path); let contents = std::fs::read_to_string(&lock_path) .map_err(|err| PackageError::failed_to_read_file(&lock_path.to_str().unwrap(), err))?; - dbg!(contents.clone()); let entry_map: IndexMap> = toml::from_str(&contents).map_err(PackageError::failed_to_deserialize_lock_file)?; - dbg!(&entry_map); let lock_entries = entry_map.get("package").ok_or_else(PackageError::invalid_lock_file_formatting)?; @@ -139,8 +136,6 @@ impl Context { }) .collect(); - dbg!(list.clone()); - Ok(list) } } diff --git a/utils/retriever/src/lib.rs b/utils/retriever/src/lib.rs index 9406dba287..851b9008d3 100644 --- a/utils/retriever/src/lib.rs +++ b/utils/retriever/src/lib.rs @@ -42,7 +42,7 @@ mod tests { Retriever::new(Symbol::intern("nested"), &build_dir, &home_dir).expect("Failed to build retriever"); retriever.retrieve().expect("failed to retrieve"); retriever.prepare_local(Symbol::intern("nested")).expect("failed to prepare local"); - retriever.process_local(Symbol::intern("nested")).expect("failed to process local"); + retriever.process_local(Symbol::intern("nested"), true).expect("failed to process local"); }); } @@ -60,7 +60,7 @@ mod tests { Retriever::new(Symbol::intern("nested"), &build_dir, &aleo_dir()).expect("Failed to build retriever"); retriever.retrieve().expect("failed to retrieve"); retriever.prepare_local(Symbol::intern("nested")).expect("failed to prepare local"); - retriever.process_local(Symbol::intern("nested")).expect("failed to process local"); + retriever.process_local(Symbol::intern("nested"), true).expect("failed to process local"); }); } @@ -78,7 +78,7 @@ mod tests { Retriever::new(Symbol::intern("simple"), &build_dir, &home_dir).expect("Failed to build retriever"); retriever.retrieve().expect("failed to retrieve"); retriever.prepare_local(Symbol::intern("simple")).expect("failed to prepare local"); - retriever.process_local(Symbol::intern("simple")).expect("failed to process local"); + retriever.process_local(Symbol::intern("simple"), true).expect("failed to process local"); }); } diff --git a/utils/retriever/src/retriever/mod.rs b/utils/retriever/src/retriever/mod.rs index c846549b3f..4a4f288290 100644 --- a/utils/retriever/src/retriever/mod.rs +++ b/utils/retriever/src/retriever/mod.rs @@ -29,7 +29,7 @@ use std::{ path::{Path, PathBuf}, }; -const ALEO_EXPLORER_URL: &str = "https://api.explorer.aleo.org/v1"; +// TODO: Remove: const ALEO_EXPLORER_URL: &str = "https://api.explorer.aleo.org/v1"; // Retriever is responsible for retrieving external programs pub struct Retriever { @@ -37,11 +37,12 @@ pub struct Retriever { contexts: IndexMap, project_path: PathBuf, registry_path: PathBuf, + endpoint: String, } impl Retriever { // Initialize a new Retriever. - pub fn new(name: Symbol, path: &PathBuf, home: &Path) -> Result { + pub fn new(name: Symbol, path: &PathBuf, home: &Path, endpoint: String) -> Result { // Starting point is all of the dependencies specified in the main `program.json` file let dependencies = retrieve_local(&format!("{name}.aleo"), path)?; let mut contexts = IndexMap::from([(name, ProgramContext::new_main(name, path.clone(), dependencies.clone()))]); @@ -49,7 +50,13 @@ impl Retriever { contexts.insert(Symbol::from(&dep), ProgramContext::from(dep)); } - Ok(Self { name, contexts, project_path: path.clone(), registry_path: home.join("registry") }) + Ok(Self { + name, + contexts, + project_path: path.clone(), + registry_path: home.join("registry"), + endpoint: endpoint.clone(), + }) } pub fn get_context(&self, name: &Symbol) -> &ProgramContext { @@ -83,6 +90,7 @@ impl Retriever { &self.registry_path, cur_context.full_name(), cur_context.network(), + &self.endpoint, )?; // Cache the stubs @@ -276,12 +284,16 @@ impl Retriever { } // Creates the stub of the program, caches it, and writes the local `leo.lock` file - pub fn process_local(&mut self, name: Symbol) -> Result<(), UtilError> { + pub fn process_local(&mut self, name: Symbol, recursive: bool) -> Result<(), UtilError> { let cur_context = self.contexts.get_mut(&name).unwrap(); // Don't need to disassemble the main file if name != self.name { // Disassemble the program - let mut file = File::open(cur_context.compiled_file_path()).unwrap_or_else(|_| { + let compiled_path = cur_context.compiled_file_path(); + if !compiled_path.exists() { + return Err(UtilError::build_file_does_not_exist(compiled_path.to_str().unwrap(), Default::default())); + } + let mut file = File::open(compiled_path).unwrap_or_else(|_| { panic!("Failed to open file {}", cur_context.compiled_file_path().to_str().unwrap()) }); let mut content = String::new(); @@ -292,19 +304,24 @@ impl Retriever { Default::default(), ) })?; - let stub: Stub = disassemble_from_str(content)?; - // Cache the stub + // Cache the disassembled stub + let stub: Stub = disassemble_from_str(content)?; if cur_context.add_stub(stub.clone()) { Err(UtilError::duplicate_dependency_name_error(stub.stub_id.name.name, Default::default()))?; } // Cache the hash cur_context.add_checksum(); - } - // Write lock file - self.write_lock_file(&name)?; + // Only write lock file when recursive building + if recursive { + self.write_lock_file(&name)?; + } + } else { + // Write lock file + self.write_lock_file(&name)?; + } Ok(()) } @@ -408,6 +425,7 @@ fn retrieve_from_network( home_path: &Path, name: &String, network: &Network, + endpoint: &String, ) -> Result<(Stub, Vec), UtilError> { // Check if the file is already cached in `~/.aleo/registry/{network}/{program}` let move_to_path = home_path.join(format!("{network}")); @@ -425,7 +443,7 @@ fn retrieve_from_network( // Fetch from network println!("Retrieving {} from {:?}.", name, network.clone()); - file_str = fetch_from_network(name, network.clone())?; + file_str = fetch_from_network(endpoint, name, network.clone())?; file_str = file_str.replace("\\n", "\n").replace('\"', ""); println!("Successfully retrieved {} from {:?}!", name, network); @@ -488,8 +506,8 @@ fn retrieve_from_network( )) } -fn fetch_from_network(program: &String, network: Network) -> Result { - let url = format!("{}/{}/program/{}", ALEO_EXPLORER_URL, network.clone(), program); +fn fetch_from_network(endpoint: &String, program: &String, network: Network) -> Result { + let url = format!("{}/{}/program/{}", endpoint, network.clone(), program); let response = ureq::get(&url.clone()) .call() .map_err(|err| UtilError::failed_to_retrieve_from_endpoint(url.clone(), err, Default::default()))?; From 0d5cfb33fb2dfda8fe1f3fae463a72ec88e9706c Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Mon, 8 Jan 2024 14:24:18 -0800 Subject: [PATCH 05/12] enable on-chain execution --- leo/cli/commands/execute.rs | 70 +++++++++++++++++++++++++++++-------- leo/cli/commands/mod.rs | 8 +++++ 2 files changed, 63 insertions(+), 15 deletions(-) diff --git a/leo/cli/commands/execute.rs b/leo/cli/commands/execute.rs index 2df5b01510..58bca065cf 100644 --- a/leo/cli/commands/execute.rs +++ b/leo/cli/commands/execute.rs @@ -15,28 +15,26 @@ // along with the Leo library. If not, see . use super::*; - -use snarkvm::cli::Execute as SnarkVMExecute; +use snarkos_cli::commands::{Developer, Execute as SnarkOSExecute}; +use snarkvm::cli::{dotenv_private_key, Execute as SnarkVMExecute}; /// Build, Prove and Run Leo program with inputs #[derive(Parser, Debug)] pub struct Execute { - #[clap(name = "NAME", help = "The name of the program to execute.", default_value = "main")] + #[clap(name = "NAME", help = "The name of the function to execute.", default_value = "main")] name: String, - #[clap(name = "INPUTS", help = "The inputs to the program. If none are provided, the input file is used.")] inputs: Vec, - - #[clap( - name = "ENDPOINT", - help = "The specified network endpoint.", - default_value = "https://api.explorer.aleo.org/v1", - long - )] - endpoint: String, - + #[clap(long, help = "Execute the transition on chain", default_value = "false")] + broadcast: bool, + #[clap(long, help = "Custom priority fee in microcredits", default_value = "1000000")] + priority_fee: String, + #[clap(long, help = "Custom network", default_value = "testnet3")] + network: String, + #[clap(long, help = "Custom private key")] + private_key: Option, #[clap(flatten)] - pub(crate) compiler_options: BuildOptions, + compiler_options: BuildOptions, } impl Command for Execute { @@ -52,6 +50,48 @@ impl Command for Execute { } fn apply(self, context: Context, input: Self::Input) -> Result { + // If the `broadcast` flag is set, then broadcast the transaction. + if self.broadcast { + // Get the program name + let project_name = context.open_manifest()?.program_id().to_string(); + + // Get the private key + let mut private_key = self.private_key; + if private_key.is_none() { + private_key = + Some(dotenv_private_key().map_err(CliError::failed_to_read_environment_private_key)?.to_string()); + } + + // Execute program + Developer::Execute( + SnarkOSExecute::try_parse_from( + [ + vec![ + "snarkos", + "--private-key", + private_key.as_ref().unwrap(), + "--query", + self.compiler_options.endpoint.as_str(), + "--priority-fee", + self.priority_fee.as_str(), + "--broadcast", + format!("{}/{}/transaction/broadcast", self.compiler_options.endpoint, self.network) + .as_str(), + project_name.as_str(), + &self.name, + ], + self.inputs.iter().map(|input| input.as_str()).collect(), + ] + .concat(), + ) + .unwrap(), + ) + .parse() + .map_err(CliError::failed_to_execute_deploy)?; + + return Ok(()); + } + // If input values are provided, then run the program with those inputs. // Otherwise, use the input file. let mut inputs = match self.inputs.is_empty() { @@ -75,7 +115,7 @@ impl Command for Execute { // Add the endpoint to the arguments. arguments.push(String::from("--endpoint")); - arguments.push(self.endpoint); + arguments.push(self.compiler_options.endpoint.clone()); // Open the Leo build/ directory let path = context.dir()?; diff --git a/leo/cli/commands/mod.rs b/leo/cli/commands/mod.rs index 230f4657cf..a42aaf8d08 100644 --- a/leo/cli/commands/mod.rs +++ b/leo/cli/commands/mod.rs @@ -122,6 +122,14 @@ pub trait Command { /// require Build command output as their input. #[derive(Parser, Clone, Debug, Default)] pub struct BuildOptions { + #[clap( + long, + help = "Endpoint to retrieve on-chain dependencies from.", + default_value = "http://api.explorer.aleo.org/v1" + )] + pub endpoint: String, + #[clap(long, help = "Does not recursively compile dependencies.")] + pub non_recursive: bool, #[clap(long, help = "Enables offline mode.")] pub offline: bool, #[clap(long, help = "Enable spans in AST snapshots.")] From e46b40f929ba51e2b438f7e1beea9beece847c61 Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Mon, 8 Jan 2024 14:24:37 -0800 Subject: [PATCH 06/12] --non-recursive build --- leo/cli/commands/build.rs | 63 +++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/leo/cli/commands/build.rs b/leo/cli/commands/build.rs index 5727132dfb..8e5b50dcbc 100644 --- a/leo/cli/commands/build.rs +++ b/leo/cli/commands/build.rs @@ -115,7 +115,7 @@ impl Command for Build { // Retrieve all local dependencies in post order let main_sym = Symbol::intern(&program_id.name().to_string()); - let mut retriever = Retriever::new(main_sym, &package_path, &home_path) + let mut retriever = Retriever::new(main_sym, &package_path, &home_path, self.options.endpoint.clone()) .map_err(|err| UtilError::failed_to_retrieve_dependencies(err, Default::default()))?; let mut local_dependencies = retriever.retrieve().map_err(|err| UtilError::failed_to_retrieve_dependencies(err, Default::default()))?; @@ -123,39 +123,44 @@ impl Command for Build { // Push the main program at the end of the list to be compiled after all of its dependencies have been processed local_dependencies.push(main_sym); + // Recursive build will recursively compile all local dependencies. Can disable to save compile time. + let recursive_build = !self.options.non_recursive; + // Loop through all local dependencies and compile them in order for dependency in local_dependencies.into_iter() { - // Get path to the local project - let (local_path, stubs) = retriever.prepare_local(dependency)?; - - // Create the outputs directory. - let local_outputs_directory = OutputsDirectory::create(&local_path)?; - - // Open the build directory. - let local_build_directory = BuildDirectory::create(&local_path)?; - - // Fetch paths to all .leo files in the source directory. - let local_source_files = SourceDirectory::files(&local_path)?; - - // Check the source files. - SourceDirectory::check_files(&local_source_files)?; - - // Compile all .leo files into .aleo files. - for file_path in local_source_files { - structs.extend(compile_leo_file( - file_path, - &ProgramID::::try_from(format!("{}.aleo", dependency)) - .map_err(|_| UtilError::snarkvm_error_building_program_id(Default::default()))?, - &local_outputs_directory, - &local_build_directory, - &handler, - self.options.clone(), - stubs.clone(), - )?); + if recursive_build || dependency == main_sym { + // Get path to the local project + let (local_path, stubs) = retriever.prepare_local(dependency)?; + + // Create the outputs directory. + let local_outputs_directory = OutputsDirectory::create(&local_path)?; + + // Open the build directory. + let local_build_directory = BuildDirectory::create(&local_path)?; + + // Fetch paths to all .leo files in the source directory. + let local_source_files = SourceDirectory::files(&local_path)?; + + // Check the source files. + SourceDirectory::check_files(&local_source_files)?; + + // Compile all .leo files into .aleo files. + for file_path in local_source_files { + structs.extend(compile_leo_file( + file_path, + &ProgramID::::try_from(format!("{}.aleo", dependency)) + .map_err(|_| UtilError::snarkvm_error_building_program_id(Default::default()))?, + &local_outputs_directory, + &local_build_directory, + &handler, + self.options.clone(), + stubs.clone(), + )?); + } } // Writes `leo.lock` as well as caches objects (when target is an intermediate dependency) - retriever.process_local(dependency)?; + retriever.process_local(dependency, recursive_build)?; } // Load the input file at `package_name.in` From 47a5e1a44d14bba13d74a5396c97b842e0e8f244 Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Mon, 8 Jan 2024 14:25:01 -0800 Subject: [PATCH 07/12] wait times between nested deployments --- leo/cli/commands/deploy.rs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/leo/cli/commands/deploy.rs b/leo/cli/commands/deploy.rs index 94a5266bca..43d8a24bed 100644 --- a/leo/cli/commands/deploy.rs +++ b/leo/cli/commands/deploy.rs @@ -18,6 +18,7 @@ use super::*; use snarkos_cli::commands::{Deploy as SnarkOSDeploy, Developer}; use snarkvm::cli::helpers::dotenv_private_key; use std::path::PathBuf; +use tracing_subscriber::fmt::time; /// Deploys an Aleo program. #[derive(Parser, Debug)] @@ -32,6 +33,10 @@ pub struct Deploy { pub(crate) private_key: Option, #[clap(long, help = "Disables building of the project before deployment", default_value = "false")] pub(crate) no_build: bool, + #[clap(long, help = "Disables recursive deployment of dependencies", default_value = "false")] + pub(crate) non_recursive: bool, + #[clap(long, help = "Custom wait gap between consecutive deployments", default_value = "12")] + pub(crate) wait_gap: u64, } impl Command for Deploy { @@ -60,13 +65,17 @@ impl Command for Deploy { Some(dotenv_private_key().map_err(CliError::failed_to_read_environment_private_key)?.to_string()); } + let mut all_paths: Vec<(String, PathBuf)> = Vec::new(); + // Extract post-ordered list of local dependencies' paths from `leo.lock` - let mut all_paths: Vec<(String, PathBuf)> = context.local_dependency_paths()?; + if !self.non_recursive { + all_paths = context.local_dependency_paths()?; + } // Add the parent program to be deployed last all_paths.push((project_name, context.dir()?.join("build"))); - for (name, path) in all_paths { + for (index, (name, path)) in all_paths.iter().enumerate() { // Set deploy arguments let deploy = SnarkOSDeploy::try_parse_from([ "snarkos", @@ -84,10 +93,14 @@ impl Command for Deploy { ]) .unwrap(); - dbg!(&deploy); // TODO: remove - // Deploy program Developer::Deploy(deploy).parse().map_err(CliError::failed_to_execute_deploy)?; + + // Sleep for `wait_gap` seconds. + // This helps avoid parents from being serialized before children. + if index < all_paths.len() - 1 { + std::thread::sleep(std::time::Duration::from_secs(self.wait_gap)); + } } Ok(()) From 7c957ced1be46357395be7a9382ceae73bb8418f Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Mon, 8 Jan 2024 14:51:13 -0800 Subject: [PATCH 08/12] update error messages --- errors/src/errors/compiler/compiler_errors.rs | 2 +- leo/cli/cli.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/errors/src/errors/compiler/compiler_errors.rs b/errors/src/errors/compiler/compiler_errors.rs index 224949c3b4..43f7b5855f 100644 --- a/errors/src/errors/compiler/compiler_errors.rs +++ b/errors/src/errors/compiler/compiler_errors.rs @@ -74,7 +74,7 @@ create_messages!( @formatted imported_program_not_found { args: (main_program_name: impl Display, dependency_name: impl Display), - msg: format!("`{main_program_name}` imports `{dependency_name}.aleo`, but `{dependency_name}.aleo` is not found in `program.json`."), + msg: format!("`{main_program_name}` imports `{dependency_name}.aleo`, but `{dependency_name}.aleo` is not found in program manifest. Use `leo add --help` for more information on how to add a dependency."), help: None, } ); diff --git a/leo/cli/cli.rs b/leo/cli/cli.rs index 6405a75fd6..03ca39255a 100644 --- a/leo/cli/cli.rs +++ b/leo/cli/cli.rs @@ -73,7 +73,7 @@ enum Commands { #[clap(flatten)] command: Deploy, }, - #[clap(about = "Add a new dependency to the current package. Defaults to testnet3 network")] + #[clap(about = "Add a new on-chain or local dependency to the current package.")] Add { #[clap(flatten)] command: Add, From cec1145a850e4878607d8d3f063efbd219d027d8 Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Mon, 8 Jan 2024 16:19:13 -0800 Subject: [PATCH 09/12] compile error --- utils/retriever/src/lib.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/utils/retriever/src/lib.rs b/utils/retriever/src/lib.rs index 851b9008d3..30d96ac295 100644 --- a/utils/retriever/src/lib.rs +++ b/utils/retriever/src/lib.rs @@ -39,7 +39,8 @@ mod tests { let build_dir = PathBuf::from(BUILD_DIRECTORY); let home_dir = PathBuf::from(HOME_DIRECTORY); let mut retriever = - Retriever::new(Symbol::intern("nested"), &build_dir, &home_dir).expect("Failed to build retriever"); + Retriever::new(Symbol::intern("nested"), &build_dir, &home_dir, "http://0.0.0.0:3030".to_string()) + .expect("Failed to build retriever"); retriever.retrieve().expect("failed to retrieve"); retriever.prepare_local(Symbol::intern("nested")).expect("failed to prepare local"); retriever.process_local(Symbol::intern("nested"), true).expect("failed to process local"); @@ -57,7 +58,8 @@ mod tests { println!("aleo_dir: {:?}", aleo_dir()); let mut retriever = - Retriever::new(Symbol::intern("nested"), &build_dir, &aleo_dir()).expect("Failed to build retriever"); + Retriever::new(Symbol::intern("nested"), &build_dir, &aleo_dir(), "http://0.0.0.0:3030".to_string()) + .expect("Failed to build retriever"); retriever.retrieve().expect("failed to retrieve"); retriever.prepare_local(Symbol::intern("nested")).expect("failed to prepare local"); retriever.process_local(Symbol::intern("nested"), true).expect("failed to process local"); @@ -75,7 +77,8 @@ mod tests { let build_dir = PathBuf::from(BUILD_DIRECTORY); let home_dir = PathBuf::from(HOME_DIRECTORY); let mut retriever = - Retriever::new(Symbol::intern("simple"), &build_dir, &home_dir).expect("Failed to build retriever"); + Retriever::new(Symbol::intern("simple"), &build_dir, &home_dir, "http://0.0.0.0:3030".to_string()) + .expect("Failed to build retriever"); retriever.retrieve().expect("failed to retrieve"); retriever.prepare_local(Symbol::intern("simple")).expect("failed to prepare local"); retriever.process_local(Symbol::intern("simple"), true).expect("failed to process local"); @@ -93,7 +96,8 @@ mod tests { let build_dir = PathBuf::from(BUILD_DIRECTORY); let home_dir = PathBuf::from(HOME_DIRECTORY); let mut retriever = - Retriever::new(Symbol::intern("local_test"), &build_dir, &home_dir).expect("Failed to build retriever"); + Retriever::new(Symbol::intern("local_test"), &build_dir, &home_dir, "http://0.0.0.0:3030".to_string()) + .expect("Failed to build retriever"); let _deps = retriever.retrieve().expect("failed to retrieve"); retriever.prepare_local(Symbol::intern("nested")).expect("failed to prepare local"); // retriever.process_local(Symbol::intern("nested")).expect("failed to process local"); From 95feacbb21ebc4903f0b2182be2031463f5bb376 Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Tue, 9 Jan 2024 10:21:24 -0800 Subject: [PATCH 10/12] clean --- utils/retriever/src/retriever/mod.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/utils/retriever/src/retriever/mod.rs b/utils/retriever/src/retriever/mod.rs index 4a4f288290..d17da1c4db 100644 --- a/utils/retriever/src/retriever/mod.rs +++ b/utils/retriever/src/retriever/mod.rs @@ -29,8 +29,6 @@ use std::{ path::{Path, PathBuf}, }; -// TODO: Remove: const ALEO_EXPLORER_URL: &str = "https://api.explorer.aleo.org/v1"; - // Retriever is responsible for retrieving external programs pub struct Retriever { name: Symbol, From c5776790e8bb99167ccb0b33cc842ba837d66d75 Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Fri, 9 Feb 2024 13:22:52 -0800 Subject: [PATCH 11/12] clippy --- compiler/passes/src/loop_unrolling/mod.rs | 3 --- compiler/passes/src/type_checking/check_program.rs | 2 +- compiler/passes/src/type_checking/mod.rs | 4 ---- errors/src/common/mod.rs | 1 - leo/cli/commands/deploy.rs | 1 - leo/cli/helpers/context.rs | 9 ++++----- 6 files changed, 5 insertions(+), 15 deletions(-) diff --git a/compiler/passes/src/loop_unrolling/mod.rs b/compiler/passes/src/loop_unrolling/mod.rs index ef87844540..282a7502c1 100644 --- a/compiler/passes/src/loop_unrolling/mod.rs +++ b/compiler/passes/src/loop_unrolling/mod.rs @@ -21,13 +21,10 @@ pub mod unroller; pub use unroller::*; pub mod unroll_expression; -pub use unroll_expression::*; pub mod unroll_program; -pub use unroll_program::*; pub mod unroll_statement; -pub use unroll_statement::*; use crate::{Pass, SymbolTable, TypeTable}; diff --git a/compiler/passes/src/type_checking/check_program.rs b/compiler/passes/src/type_checking/check_program.rs index 8215b76ae1..76b3c1b5b3 100644 --- a/compiler/passes/src/type_checking/check_program.rs +++ b/compiler/passes/src/type_checking/check_program.rs @@ -49,7 +49,7 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> { fn visit_stub(&mut self, input: &'a Stub) { // Cannot have constant declarations in stubs. if !input.consts.is_empty() { - self.emit_err(TypeCheckerError::stubs_cannot_have_const_declarations(input.consts.get(0).unwrap().1.span)); + self.emit_err(TypeCheckerError::stubs_cannot_have_const_declarations(input.consts.first().unwrap().1.span)); } // Typecheck the program's structs. diff --git a/compiler/passes/src/type_checking/mod.rs b/compiler/passes/src/type_checking/mod.rs index 98052729ca..7ba8c79914 100644 --- a/compiler/passes/src/type_checking/mod.rs +++ b/compiler/passes/src/type_checking/mod.rs @@ -16,13 +16,9 @@ pub mod check_expressions; -pub use check_expressions::*; - pub mod check_program; -pub use check_program::*; pub mod check_statements; -pub use check_statements::*; pub mod checker; pub use checker::*; diff --git a/errors/src/common/mod.rs b/errors/src/common/mod.rs index 985716b435..dd83c1a04c 100644 --- a/errors/src/common/mod.rs +++ b/errors/src/common/mod.rs @@ -25,7 +25,6 @@ pub use self::formatted::*; /// This module contains the macros for making errors easily. #[macro_use] pub mod macros; -pub use self::macros::*; /// This module contains traits for making errors easily. pub mod traits; diff --git a/leo/cli/commands/deploy.rs b/leo/cli/commands/deploy.rs index 43d8a24bed..175f2f301b 100644 --- a/leo/cli/commands/deploy.rs +++ b/leo/cli/commands/deploy.rs @@ -18,7 +18,6 @@ use super::*; use snarkos_cli::commands::{Deploy as SnarkOSDeploy, Developer}; use snarkvm::cli::helpers::dotenv_private_key; use std::path::PathBuf; -use tracing_subscriber::fmt::time; /// Deploys an Aleo program. #[derive(Parser, Debug)] diff --git a/leo/cli/helpers/context.rs b/leo/cli/helpers/context.rs index 790a301fc4..e6dbf96299 100644 --- a/leo/cli/helpers/context.rs +++ b/leo/cli/helpers/context.rs @@ -27,7 +27,7 @@ use retriever::LockFileEntry; use std::{ env::current_dir, fs::File, - io::{Read, Write}, + io::Write, path::{Path, PathBuf}, }; @@ -121,7 +121,7 @@ impl Context { } let contents = std::fs::read_to_string(&lock_path) - .map_err(|err| PackageError::failed_to_read_file(&lock_path.to_str().unwrap(), err))?; + .map_err(|err| PackageError::failed_to_read_file(lock_path.to_str().unwrap(), err))?; let entry_map: IndexMap> = toml::from_str(&contents).map_err(PackageError::failed_to_deserialize_lock_file)?; @@ -130,9 +130,8 @@ impl Context { let list: Vec<(String, PathBuf)> = lock_entries .iter() - .filter_map(|entry| match entry.path() { - Some(local_path) => Some((entry.name().to_string(), local_path.clone().join("build"))), - None => None, + .filter_map(|entry| { + entry.path().map(|local_path| (entry.name().to_string(), local_path.clone().join("build"))) }) .collect(); From d8e8a1dbe4ca7c051d0e4279a84bb4913f6ac12d Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:08:12 -0800 Subject: [PATCH 12/12] comment out --- Cargo.lock | 1361 +------------------ Cargo.toml | 4 +- errors/src/errors/package/package_errors.rs | 7 + leo/cli/commands/deploy.rs | 104 +- leo/cli/commands/execute.rs | 80 +- leo/package/Cargo.toml | 4 +- 6 files changed, 174 insertions(+), 1386 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 95ec2f5783..368d4e796d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -36,16 +36,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" -dependencies = [ - "crypto-common", - "generic-array", -] - [[package]] name = "aes" version = "0.8.3" @@ -57,20 +47,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "aes-gcm" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - [[package]] name = "ahash" version = "0.8.7" @@ -257,17 +233,6 @@ dependencies = [ "wait-timeout", ] -[[package]] -name = "async-recursion" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" -dependencies = [ - "proc-macro2", - "quote 1.0.35", - "syn 2.0.48", -] - [[package]] name = "async-trait" version = "0.1.77" @@ -285,92 +250,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "axum" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" -dependencies = [ - "async-trait", - "axum-core", - "bitflags 1.3.2", - "bytes", - "futures-util", - "headers", - "http 0.2.11", - "http-body", - "hyper", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 0.2.11", - "http-body", - "mime", - "rustversion", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-extra" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ab90e7b70bea63a153137162affb6a0bce26b584c24a4c7885509783e2cf30b" -dependencies = [ - "axum", - "axum-core", - "bytes", - "futures-util", - "http 0.2.11", - "http-body", - "mime", - "pin-project-lite", - "serde", - "serde_json", - "tokio", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "backoff" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" -dependencies = [ - "futures-core", - "getrandom", - "instant", - "pin-project-lite", - "rand", - "tokio", -] - [[package]] name = "backtrace" version = "0.3.69" @@ -413,27 +292,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.65.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote 1.0.35", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.48", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -491,7 +349,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", - "regex-automata 0.4.3", + "regex-automata", "serde", ] @@ -534,12 +392,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "cassowary" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" - [[package]] name = "cast" version = "0.3.0" @@ -556,45 +408,12 @@ dependencies = [ "libc", ] -[[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 = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chacha20" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "chacha20poly1305" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" -dependencies = [ - "aead", - "chacha20", - "cipher", - "poly1305", - "zeroize", -] - [[package]] name = "ci_info" version = "0.10.2" @@ -639,18 +458,6 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", - "zeroize", -] - -[[package]] -name = "clang-sys" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" -dependencies = [ - "glob", - "libc", - "libloading", ] [[package]] @@ -851,47 +658,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossterm" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" -dependencies = [ - "bitflags 1.3.2", - "crossterm_winapi", - "libc", - "mio", - "parking_lot", - "signal-hook", - "signal-hook-mio", - "winapi", -] - -[[package]] -name = "crossterm" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" -dependencies = [ - "bitflags 2.4.1", - "crossterm_winapi", - "libc", - "mio", - "parking_lot", - "signal-hook", - "signal-hook-mio", - "winapi", -] - -[[package]] -name = "crossterm_winapi" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" -dependencies = [ - "winapi", -] - [[package]] name = "crunchy" version = "0.2.2" @@ -905,19 +671,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core", "typenum", ] -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - [[package]] name = "curl" version = "0.4.44" @@ -1294,7 +1050,6 @@ dependencies = [ "futures-core", "futures-task", "futures-util", - "num_cpus", ] [[package]] @@ -1303,17 +1058,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote 1.0.35", - "syn 2.0.48", -] - [[package]] name = "futures-sink" version = "0.3.30" @@ -1335,7 +1079,6 @@ dependencies = [ "futures-channel", "futures-core", "futures-io", - "futures-macro", "futures-sink", "futures-task", "memchr", @@ -1379,20 +1122,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi", - "wasm-bindgen", -] - -[[package]] -name = "ghash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" -dependencies = [ - "opaque-debug", - "polyval", ] [[package]] @@ -1401,12 +1132,6 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "h2" version = "0.3.22" @@ -1418,7 +1143,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http 0.2.11", + "http", "indexmap 2.1.0", "slab", "tokio", @@ -1438,15 +1163,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.14.3" @@ -1457,30 +1173,6 @@ dependencies = [ "allocator-api2", ] -[[package]] -name = "headers" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" -dependencies = [ - "base64", - "bytes", - "headers-core", - "http 0.2.11", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" -dependencies = [ - "http 0.2.11", -] - [[package]] name = "heck" version = "0.4.1" @@ -1519,17 +1211,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http-body" version = "0.4.6" @@ -1537,16 +1218,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http 0.2.11", + "http", "pin-project-lite", ] -[[package]] -name = "http-range-header" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" - [[package]] name = "httparse" version = "1.8.0" @@ -1570,7 +1245,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 0.2.11", + "http", "http-body", "httparse", "httpdate", @@ -1728,33 +1403,12 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonwebtoken" -version = "9.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7ea04a7c5c055c175f189b6dc6ba036fd62306b58c66c9f6389036c503a3f4" -dependencies = [ - "base64", - "js-sys", - "pem", - "ring", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "lazy_static" 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 = "leo-abnf" version = "1.10.0" @@ -1847,7 +1501,6 @@ dependencies = [ "serde", "serde_json", "serial_test", - "snarkos-cli", "snarkvm", "sys-info", "test_dir", @@ -1870,7 +1523,6 @@ dependencies = [ "retriever", "serde", "serial_test", - "snarkos-cli", "snarkvm", "toml 0.8.8", "tracing", @@ -1945,16 +1597,6 @@ version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" -[[package]] -name = "libloading" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "libredox" version = "0.0.1" @@ -1966,21 +1608,6 @@ dependencies = [ "redox_syscall", ] -[[package]] -name = "librocksdb-sys" -version = "0.11.0+8.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" -dependencies = [ - "bindgen", - "bzip2-sys", - "cc", - "glob", - "libc", - "libz-sys", - "lz4-sys", -] - [[package]] name = "libz-sys" version = "1.1.12" @@ -2022,118 +1649,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] -name = "lru" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7" -dependencies = [ - "hashbrown 0.14.3", -] - -[[package]] -name = "lz4-sys" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "mach2" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" -dependencies = [ - "libc", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - -[[package]] -name = "memchr" -version = "2.7.1" +name = "memchr" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - -[[package]] -name = "metrics" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fde3af1a009ed76a778cb84fdef9e7dbbdf5775ae3e4cc1f434a6a307f6f76c5" -dependencies = [ - "ahash", - "metrics-macros", - "portable-atomic", -] - -[[package]] -name = "metrics-exporter-prometheus" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d4fa7ce7c4862db464a37b0b31d89bca874562f034bd7993895572783d02950" -dependencies = [ - "base64", - "hyper", - "indexmap 1.9.3", - "ipnet", - "metrics", - "metrics-util", - "quanta", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "metrics-macros" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f" -dependencies = [ - "proc-macro2", - "quote 1.0.35", - "syn 2.0.48", -] - -[[package]] -name = "metrics-util" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de2ed6e491ed114b40b732e4d1659a9d53992ebd87490c44a6ffe23739d973e" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", - "hashbrown 0.13.1", - "metrics", - "num_cpus", - "quanta", - "sketches-ddsketch", -] - [[package]] name = "mime" version = "0.3.17" @@ -2172,7 +1692,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", - "log", "wasi", "windows-sys 0.48.0", ] @@ -2201,19 +1720,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab250442c86f1850815b5d268639dff018c0627022bc1940eb2d642ca1ce12f0" -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset", - "pin-utils", -] - [[package]] name = "nom" version = "7.1.3" @@ -2315,9 +1821,6 @@ name = "once_cell" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -dependencies = [ - "parking_lot_core", -] [[package]] name = "oorandom" @@ -2325,12 +1828,6 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - [[package]] name = "openssl" version = "0.10.62" @@ -2439,48 +1936,12 @@ dependencies = [ "sha2", ] -[[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 = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" -dependencies = [ - "base64", - "serde", -] - [[package]] name = "percent-encoding" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "pin-project" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" -dependencies = [ - "proc-macro2", - "quote 1.0.35", - "syn 2.0.48", -] - [[package]] name = "pin-project-lite" version = "0.2.13" @@ -2543,29 +2004,6 @@ dependencies = [ "plotters-backend", ] -[[package]] -name = "poly1305" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" -dependencies = [ - "cpufeatures", - "opaque-debug", - "universal-hash", -] - -[[package]] -name = "polyval" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash", -] - [[package]] name = "portable-atomic" version = "1.6.0" @@ -2612,16 +2050,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "prettyplease" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" -dependencies = [ - "proc-macro2", - "syn 2.0.48", -] - [[package]] name = "proc-macro2" version = "1.0.75" @@ -2631,22 +2059,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "quanta" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17e662a7a8291a865152364c20c7abc5e60486ab2001e8ec10b24862de0b9ab" -dependencies = [ - "crossbeam-utils", - "libc", - "mach2", - "once_cell", - "raw-cpuid", - "wasi", - "web-sys", - "winapi", -] - [[package]] name = "quick-xml" version = "0.23.1" @@ -2710,15 +2122,6 @@ dependencies = [ "rand_core", ] -[[package]] -name = "raw-cpuid" -version = "10.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "rayon" version = "1.8.0" @@ -2767,17 +2170,8 @@ checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] @@ -2788,15 +2182,9 @@ checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax", ] -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "regex-syntax" version = "0.8.2" @@ -2815,7 +2203,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 0.2.11", + "http", "http-body", "hyper", "hyper-tls", @@ -2876,28 +2264,12 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rocksdb" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" -dependencies = [ - "libc", - "librocksdb-sys", -] - [[package]] name = "rustc-demangle" version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc_version" version = "0.4.0" @@ -2942,12 +2314,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - [[package]] name = "rusty-hook" version = "0.11.2" @@ -3118,564 +2484,130 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_path_to_error" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" -dependencies = [ - "itoa", - "serde", -] - [[package]] name = "serde_spanned" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" -dependencies = [ - "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", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" -dependencies = [ - "indexmap 1.9.3", - "ryu", - "serde", - "yaml-rust", -] - -[[package]] -name = "serial_test" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" -dependencies = [ - "dashmap", - "futures", - "lazy_static", - "log", - "parking_lot", - "serial_test_derive", -] - -[[package]] -name = "serial_test_derive" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" -dependencies = [ - "proc-macro2", - "quote 1.0.35", - "syn 2.0.48", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shlex" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" - -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-mio" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" -dependencies = [ - "libc", - "mio", - "signal-hook", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest", - "rand_core", -] - -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror", - "time", -] - -[[package]] -name = "sketches-ddsketch" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a406c1882ed7f29cd5e248c9848a80e7cb6ae0fea82346d2746f2f941c07e1" - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" -dependencies = [ - "serde", -] - -[[package]] -name = "smol_str" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c" -dependencies = [ - "serde", -] - -[[package]] -name = "snarkos-account" -version = "2.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0057351d17108cfe3e0a1d79a3daeec69656e549a98d3837b2a600b0fef0251" -dependencies = [ - "anyhow", - "colored", - "rand", - "snarkvm", -] - -[[package]] -name = "snarkos-cli" -version = "2.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f3b0864a6b4add97c35bbb9141f5ec95ac0adb9e149aecdd2376ade8e25819" -dependencies = [ - "aleo-std", - "anstyle", - "anyhow", - "bincode", - "clap", - "colored", - "crossterm 0.27.0", - "indexmap 2.1.0", - "nix", - "num_cpus", - "parking_lot", - "rand", - "rand_chacha", - "rayon", - "self_update 0.39.0", - "serde", - "serde_json", - "snarkos-account", - "snarkos-display", - "snarkos-node", - "snarkos-node-cdn", - "snarkos-node-metrics", - "snarkos-node-rest", - "snarkvm", - "sys-info", - "thiserror", - "tokio", - "tracing-subscriber", - "ureq", -] - -[[package]] -name = "snarkos-display" -version = "2.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58591ca2c2ecb9b87b81fa7801f28670a818214b42070c8256fa6de4ed999b34" -dependencies = [ - "anyhow", - "crossterm 0.27.0", - "snarkos-node", - "snarkvm", - "tokio", - "tui", -] - -[[package]] -name = "snarkos-node" -version = "2.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7571262ed633a61d85dfe77ee7e56536662a29e4e4c86242ff2c79977e086f0b" -dependencies = [ - "aleo-std", - "anyhow", - "async-trait", - "colored", - "futures-util", - "indexmap 2.1.0", - "num_cpus", - "once_cell", - "parking_lot", - "rand", - "rayon", - "serde_json", - "snarkos-account", - "snarkos-node-bft", - "snarkos-node-cdn", - "snarkos-node-consensus", - "snarkos-node-metrics", - "snarkos-node-rest", - "snarkos-node-router", - "snarkos-node-sync", - "snarkos-node-tcp", - "snarkvm", - "time", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "snarkos-node-bft" -version = "2.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a255ef99e9a686b2dfd752f7818adb41307f921add20e37c7ab1cf9b0ccfed2c" -dependencies = [ - "anyhow", - "async-recursion", - "async-trait", - "bytes", - "colored", - "futures", - "indexmap 2.1.0", - "parking_lot", - "rand", - "rayon", - "serde", - "sha2", - "snarkos-account", - "snarkos-node-bft-events", - "snarkos-node-bft-ledger-service", - "snarkos-node-bft-storage-service", - "snarkos-node-metrics", - "snarkos-node-sync", - "snarkos-node-tcp", - "snarkvm", - "snow", - "time", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", -] - -[[package]] -name = "snarkos-node-bft-events" -version = "2.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9cedb2347053a728c4f8a902f5e7fb823d8450d18ccabae33aee1c2c9c7bc1a" -dependencies = [ - "anyhow", - "bytes", - "indexmap 2.1.0", - "rayon", - "serde", - "snarkos-node-metrics", - "snarkos-node-sync-locators", - "snarkvm", - "snow", - "tokio-util", - "tracing", -] - -[[package]] -name = "snarkos-node-bft-ledger-service" -version = "2.2.7" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622519cc68ba7b5857a84148b6b23794089229fdb39c1d41c56c1314b77132c2" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ - "async-trait", - "indexmap 2.1.0", - "rand", - "snarkvm", - "tokio", - "tracing", + "serde", ] [[package]] -name = "snarkos-node-bft-storage-service" -version = "2.2.7" +name = "serde_urlencoded" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be8e3687de55a8fc52ee1a07cdd95a5c9946562ac05a06f2df7d0af4951fda6" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ - "indexmap 2.1.0", - "parking_lot", - "snarkvm", - "tracing", + "form_urlencoded", + "itoa", + "ryu", + "serde", ] [[package]] -name = "snarkos-node-cdn" -version = "2.2.7" +name = "serde_yaml" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5d98073a0477176388926c20ee1fe7ffe1f5677630448fbf95ea8e16fd8132a" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" dependencies = [ - "anyhow", - "backoff", - "bincode", - "colored", - "futures", - "parking_lot", - "rayon", - "reqwest", + "indexmap 1.9.3", + "ryu", "serde", - "serde_json", - "snarkvm", - "tokio", - "tracing", + "yaml-rust", ] [[package]] -name = "snarkos-node-consensus" -version = "2.2.7" +name = "serial_test" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5731dbd576f3cb110b6a75b3452fa8298197730d1a788da728a01b176c7b90d" +checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" dependencies = [ - "anyhow", - "colored", - "indexmap 2.1.0", - "lru", + "dashmap", + "futures", + "lazy_static", + "log", "parking_lot", - "rand", - "snarkos-account", - "snarkos-node-bft", - "snarkos-node-bft-ledger-service", - "snarkos-node-bft-storage-service", - "snarkos-node-metrics", - "snarkvm", - "tokio", - "tracing", + "serial_test_derive", ] [[package]] -name = "snarkos-node-metrics" -version = "2.2.7" +name = "serial_test_derive" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f8dfc02b2dea898c796a729122bc8f5b12e34c5ad1681e71370f470d4686111" +checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ - "metrics", - "metrics-exporter-prometheus", - "snarkvm", - "tokio", + "proc-macro2", + "quote 1.0.35", + "syn 2.0.48", ] [[package]] -name = "snarkos-node-rest" -version = "2.2.7" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb6d13284aa70ff244932af67d74aeab1eca9635e0723b6b9ede4cc71857f7fc" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "anyhow", - "axum", - "axum-extra", - "http 1.0.0", - "indexmap 2.1.0", - "jsonwebtoken", - "once_cell", - "parking_lot", - "rand", - "rayon", - "serde", - "serde_json", - "snarkos-node-consensus", - "snarkos-node-router", - "snarkvm", - "time", - "tokio", - "tower-http", - "tracing", + "cfg-if", + "cpufeatures", + "digest", ] [[package]] -name = "snarkos-node-router" -version = "2.2.7" +name = "sha2" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2649b18700e034d6e1ae085c6e0f797a7117995f78452f096c22d9a43e407c1" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "anyhow", - "async-trait", - "bincode", - "bytes", - "colored", - "futures", - "indexmap 2.1.0", - "linked-hash-map", - "parking_lot", - "rand", - "reqwest", - "serde", - "snarkos-account", - "snarkos-node-metrics", - "snarkos-node-router-messages", - "snarkos-node-sync-locators", - "snarkos-node-tcp", - "snarkvm", - "time", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", + "cfg-if", + "cpufeatures", + "digest", ] [[package]] -name = "snarkos-node-router-messages" -version = "2.2.7" +name = "sharded-slab" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4d944e2183d71d5bf9b68c5eb8a9141abf9710996556859fa5b23932ab4d628" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ - "anyhow", - "bytes", - "indexmap 2.1.0", - "rayon", - "serde", - "snarkos-node-bft-events", - "snarkos-node-sync-locators", - "snarkvm", - "snow", - "tokio", - "tokio-util", - "tracing", + "lazy_static", ] [[package]] -name = "snarkos-node-sync" -version = "2.2.7" +name = "signature" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7c347a5e1f90619f3b608d0d6a02174ac2e690474aaef4127335f48bc0795" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "anyhow", - "indexmap 2.1.0", - "itertools 0.12.0", - "once_cell", - "parking_lot", - "rand", - "serde", - "snarkos-node-bft-ledger-service", - "snarkos-node-sync-communication-service", - "snarkos-node-sync-locators", - "snarkvm", - "tokio", - "tracing", + "digest", + "rand_core", ] [[package]] -name = "snarkos-node-sync-communication-service" -version = "2.2.7" +name = "slab" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb9c67ce191470fc34660b011db15584fce6f57d6de60c26d22ad7c562a5c55" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "async-trait", - "tokio", + "autocfg", ] [[package]] -name = "snarkos-node-sync-locators" -version = "2.2.7" +name = "smallvec" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c0120cc26d081132a64fac21e79c52b0fdad64c349702f78411f486bbeb743a" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" dependencies = [ - "anyhow", - "indexmap 2.1.0", "serde", - "snarkvm", - "tracing", ] [[package]] -name = "snarkos-node-tcp" -version = "2.2.7" +name = "smol_str" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c27e06f7691728de00228bced9b1eb69d92799df65b5a4740c4f9b452b970e" +checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c" dependencies = [ - "async-trait", - "bytes", - "futures-util", - "once_cell", - "parking_lot", - "snarkos-node-metrics", - "tokio", - "tokio-util", - "tracing", + "serde", ] [[package]] @@ -3700,7 +2632,6 @@ dependencies = [ "snarkvm-circuit", "snarkvm-console", "snarkvm-ledger", - "snarkvm-metrics", "snarkvm-parameters", "snarkvm-synthesizer", "snarkvm-utilities", @@ -4278,7 +3209,6 @@ dependencies = [ "indexmap 2.1.0", "serde_json", "snarkvm-console", - "snarkvm-metrics", ] [[package]] @@ -4392,14 +3322,11 @@ version = "0.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56a3aac4e1dc3fd253b71ea018b0159364c501cc8f576924e491f50664d13c7c" dependencies = [ - "aleo-std", "anyhow", "bincode", "indexmap 2.1.0", - "once_cell", "parking_lot", "rayon", - "rocksdb", "serde", "snarkvm-console", "snarkvm-ledger-authority", @@ -4409,17 +3336,6 @@ dependencies = [ "snarkvm-ledger-narwhal-batch-certificate", "snarkvm-synthesizer-program", "snarkvm-synthesizer-snark", - "tracing", -] - -[[package]] -name = "snarkvm-metrics" -version = "0.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89c911acab53cd3e0b76f5ea7289f71c84dceab4511af0e523113ce4aeb719e" -dependencies = [ - "metrics", - "metrics-exporter-prometheus", ] [[package]] @@ -4560,22 +3476,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "snow" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" -dependencies = [ - "aes-gcm", - "blake2", - "chacha20poly1305", - "curve25519-dalek", - "rand_core", - "rustc_version", - "sha2", - "subtle", -] - [[package]] name = "socket2" version = "0.4.10" @@ -4657,12 +3557,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "synom" version = "0.11.3" @@ -4777,11 +3671,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ "deranged", - "itoa", "powerfmt", "serde", "time-core", - "time-macros", ] [[package]] @@ -4790,15 +3682,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" -[[package]] -name = "time-macros" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" -dependencies = [ - "time-core", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -4844,25 +3727,11 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot", "pin-project-lite", - "signal-hook-registry", "socket2 0.5.5", - "tokio-macros", "windows-sys 0.48.0", ] -[[package]] -name = "tokio-macros" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" -dependencies = [ - "proc-macro2", - "quote 1.0.35", - "syn 2.0.48", -] - [[package]] name = "tokio-native-tls" version = "0.3.1" @@ -4873,17 +3742,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-stream" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-util" version = "0.7.10" @@ -4941,47 +3799,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-http" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" -dependencies = [ - "bitflags 2.4.1", - "bytes", - "futures-core", - "futures-util", - "http 0.2.11", - "http-body", - "http-range-header", - "pin-project-lite", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - [[package]] name = "tower-service" version = "0.3.2" @@ -4994,7 +3811,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -5038,14 +3854,10 @@ version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ - "matchers", "nu-ansi-term", - "once_cell", - "regex", "sharded-slab", "smallvec", "thread_local", - "tracing", "tracing-core", "tracing-log", ] @@ -5056,19 +3868,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tui" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1" -dependencies = [ - "bitflags 1.3.2", - "cassowary", - "crossterm 0.25.0", - "unicode-segmentation", - "unicode-width", -] - [[package]] name = "typenum" version = "1.17.0" @@ -5105,12 +3904,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" - [[package]] name = "unicode-width" version = "0.1.11" @@ -5123,16 +3916,6 @@ version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" -[[package]] -name = "universal-hash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" -dependencies = [ - "crypto-common", - "subtle", -] - [[package]] name = "untrusted" version = "0.9.0" diff --git a/Cargo.toml b/Cargo.toml index 8df5e35276..f8fd3732c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -150,8 +150,8 @@ version = "1.0" [dependencies.serial_test] version = "2.0.0" -[dependencies.snarkos-cli] -version = "2.2.4" +#[dependencies.snarkos-cli] +#version = "2.2.4" [dependencies.snarkvm] workspace = true diff --git a/errors/src/errors/package/package_errors.rs b/errors/src/errors/package/package_errors.rs index 637aad11cb..d98776635d 100644 --- a/errors/src/errors/package/package_errors.rs +++ b/errors/src/errors/package/package_errors.rs @@ -363,4 +363,11 @@ create_messages!( help: Some("Delete the lock file and rebuild the project".to_string()), } + @backtraced + unimplemented_command { + args: (command: impl Display), + msg: format!("The `{command}` command is not implemented."), + help: None, + } + ); diff --git a/leo/cli/commands/deploy.rs b/leo/cli/commands/deploy.rs index 175f2f301b..a002363d4a 100644 --- a/leo/cli/commands/deploy.rs +++ b/leo/cli/commands/deploy.rs @@ -15,9 +15,7 @@ // along with the Leo library. If not, see . use super::*; -use snarkos_cli::commands::{Deploy as SnarkOSDeploy, Developer}; -use snarkvm::cli::helpers::dotenv_private_key; -use std::path::PathBuf; +//use snarkos_cli::commands::{Deploy as SnarkOSDeploy, Developer}; /// Deploys an Aleo program. #[derive(Parser, Debug)] @@ -53,55 +51,55 @@ impl Command for Deploy { Ok(()) } - fn apply(self, context: Context, _: Self::Input) -> Result { - // Get the program name - let project_name = context.open_manifest()?.program_id().to_string(); - - // Get the private key - let mut private_key = self.private_key; - if private_key.is_none() { - private_key = - Some(dotenv_private_key().map_err(CliError::failed_to_read_environment_private_key)?.to_string()); - } - - let mut all_paths: Vec<(String, PathBuf)> = Vec::new(); - - // Extract post-ordered list of local dependencies' paths from `leo.lock` - if !self.non_recursive { - all_paths = context.local_dependency_paths()?; - } - - // Add the parent program to be deployed last - all_paths.push((project_name, context.dir()?.join("build"))); - - for (index, (name, path)) in all_paths.iter().enumerate() { - // Set deploy arguments - let deploy = SnarkOSDeploy::try_parse_from([ - "snarkos", - "--private-key", - private_key.as_ref().unwrap(), - "--query", - self.endpoint.as_str(), - "--priority-fee", - self.priority_fee.as_str(), - "--path", - path.to_str().unwrap(), - "--broadcast", - format!("{}/{}/transaction/broadcast", self.endpoint, self.network).as_str(), - &name, - ]) - .unwrap(); - - // Deploy program - Developer::Deploy(deploy).parse().map_err(CliError::failed_to_execute_deploy)?; - - // Sleep for `wait_gap` seconds. - // This helps avoid parents from being serialized before children. - if index < all_paths.len() - 1 { - std::thread::sleep(std::time::Duration::from_secs(self.wait_gap)); - } - } - - Ok(()) + fn apply(self, _context: Context, _: Self::Input) -> Result { + // // Get the program name + // let project_name = context.open_manifest()?.program_id().to_string(); + // + // // Get the private key + // let mut private_key = self.private_key; + // if private_key.is_none() { + // private_key = + // Some(dotenv_private_key().map_err(CliError::failed_to_read_environment_private_key)?.to_string()); + // } + // + // let mut all_paths: Vec<(String, PathBuf)> = Vec::new(); + // + // // Extract post-ordered list of local dependencies' paths from `leo.lock` + // if !self.non_recursive { + // all_paths = context.local_dependency_paths()?; + // } + // + // // Add the parent program to be deployed last + // all_paths.push((project_name, context.dir()?.join("build"))); + // + // for (index, (name, path)) in all_paths.iter().enumerate() { + // // Set deploy arguments + // let deploy = SnarkOSDeploy::try_parse_from([ + // "snarkos", + // "--private-key", + // private_key.as_ref().unwrap(), + // "--query", + // self.endpoint.as_str(), + // "--priority-fee", + // self.priority_fee.as_str(), + // "--path", + // path.to_str().unwrap(), + // "--broadcast", + // format!("{}/{}/transaction/broadcast", self.endpoint, self.network).as_str(), + // &name, + // ]) + // .unwrap(); + // + // // Deploy program + // Developer::Deploy(deploy).parse().map_err(CliError::failed_to_execute_deploy)?; + // + // // Sleep for `wait_gap` seconds. + // // This helps avoid parents from being serialized before children. + // if index < all_paths.len() - 1 { + // std::thread::sleep(std::time::Duration::from_secs(self.wait_gap)); + // } + // } + + Err(PackageError::unimplemented_command("leo deploy").into()) } } diff --git a/leo/cli/commands/execute.rs b/leo/cli/commands/execute.rs index 58bca065cf..62e77ac14b 100644 --- a/leo/cli/commands/execute.rs +++ b/leo/cli/commands/execute.rs @@ -15,8 +15,8 @@ // along with the Leo library. If not, see . use super::*; -use snarkos_cli::commands::{Developer, Execute as SnarkOSExecute}; -use snarkvm::cli::{dotenv_private_key, Execute as SnarkVMExecute}; +//use snarkos_cli::commands::{Developer, Execute as SnarkOSExecute}; +use snarkvm::cli::Execute as SnarkVMExecute; /// Build, Prove and Run Leo program with inputs #[derive(Parser, Debug)] @@ -52,44 +52,44 @@ impl Command for Execute { fn apply(self, context: Context, input: Self::Input) -> Result { // If the `broadcast` flag is set, then broadcast the transaction. if self.broadcast { - // Get the program name - let project_name = context.open_manifest()?.program_id().to_string(); - - // Get the private key - let mut private_key = self.private_key; - if private_key.is_none() { - private_key = - Some(dotenv_private_key().map_err(CliError::failed_to_read_environment_private_key)?.to_string()); - } - - // Execute program - Developer::Execute( - SnarkOSExecute::try_parse_from( - [ - vec![ - "snarkos", - "--private-key", - private_key.as_ref().unwrap(), - "--query", - self.compiler_options.endpoint.as_str(), - "--priority-fee", - self.priority_fee.as_str(), - "--broadcast", - format!("{}/{}/transaction/broadcast", self.compiler_options.endpoint, self.network) - .as_str(), - project_name.as_str(), - &self.name, - ], - self.inputs.iter().map(|input| input.as_str()).collect(), - ] - .concat(), - ) - .unwrap(), - ) - .parse() - .map_err(CliError::failed_to_execute_deploy)?; - - return Ok(()); + // // Get the program name + // let project_name = context.open_manifest()?.program_id().to_string(); + // + // // Get the private key + // let mut private_key = self.private_key; + // if private_key.is_none() { + // private_key = + // Some(dotenv_private_key().map_err(CliError::failed_to_read_environment_private_key)?.to_string()); + // } + // + // // Execute program + // Developer::Execute( + // SnarkOSExecute::try_parse_from( + // [ + // vec![ + // "snarkos", + // "--private-key", + // private_key.as_ref().unwrap(), + // "--query", + // self.compiler_options.endpoint.as_str(), + // "--priority-fee", + // self.priority_fee.as_str(), + // "--broadcast", + // format!("{}/{}/transaction/broadcast", self.compiler_options.endpoint, self.network) + // .as_str(), + // project_name.as_str(), + // &self.name, + // ], + // self.inputs.iter().map(|input| input.as_str()).collect(), + // ] + // .concat(), + // ) + // .unwrap(), + // ) + // .parse() + // .map_err(CliError::failed_to_execute_deploy)?; + + return Err(PackageError::unimplemented_command("leo execute --broadcast").into()); } // If input values are provided, then run the program with those inputs. diff --git a/leo/package/Cargo.toml b/leo/package/Cargo.toml index 0276ac2933..3a6ca3dd48 100644 --- a/leo/package/Cargo.toml +++ b/leo/package/Cargo.toml @@ -25,8 +25,8 @@ default-features = false [dependencies.snarkvm] workspace = true -[dependencies.snarkos-cli] -version = "2.2.4" +#[dependencies.snarkos-cli] +#version = "2.2.4" [dependencies.leo-errors] path = "../../errors"