diff --git a/.changelog/unreleased/testing/1714-refactor-e2e-tests.md b/.changelog/unreleased/testing/1714-refactor-e2e-tests.md new file mode 100644 index 0000000000..7bf4e78be3 --- /dev/null +++ b/.changelog/unreleased/testing/1714-refactor-e2e-tests.md @@ -0,0 +1,3 @@ +- Added integration testing infrastructure for node, client and + the wallet and replaced MASP E2E tests with integration tests. + ([\#1714](https://github.com/anoma/namada/pull/1714)) \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 5a76fbfa4d..dfd0ef14e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,11 +14,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli", + "gimli 0.27.2", ] [[package]] @@ -34,7 +34,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ "crypto-common", - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -51,9 +51,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if 1.0.0", "cipher 0.4.4", @@ -66,7 +66,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", "once_cell", "version_check", ] @@ -149,9 +149,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.65" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" [[package]] name = "ark-bls12-381" @@ -277,9 +277,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" @@ -321,34 +321,35 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-stream" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", + "pin-project-lite", ] [[package]] name = "async-stream-impl" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] name = "async-trait" -version = "0.1.58" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -380,9 +381,9 @@ dependencies = [ [[package]] name = "auto_impl" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a8c1df849285fbacd587de7818cc7d13be6cd2cbcd47a04fb1801b0e2706e33" +checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" dependencies = [ "proc-macro-error", "proc-macro2", @@ -398,13 +399,13 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.7" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fb79c228270dcf2426e74864cabc94babb5dbab01a4314e702d2f16540e1591" +checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", + "bitflags 1.2.1", "bytes", "futures-util", "http", @@ -417,19 +418,18 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustversion", - "serde 1.0.147", + "serde 1.0.163", "sync_wrapper", "tower", - "tower-http", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2f958c80c248b34b9a877a643811be8dbca03ca5ba827f2b63baf3a81e5fc4e" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", "bytes", @@ -444,16 +444,16 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ "addr2line", "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide", - "object 0.29.0", + "miniz_oxide 0.6.2", + "object 0.30.3", "rustc-demangle", ] @@ -463,6 +463,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base58" version = "0.1.0" @@ -475,22 +481,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" -[[package]] -name = "base58check" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee2fe4c9a0c84515f136aaae2466744a721af6d63339c18689d9e995d74d99b" -dependencies = [ - "base58 0.1.0", - "sha2 0.8.2", -] - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - [[package]] name = "base64" version = "0.13.1" @@ -536,9 +526,9 @@ dependencies = [ "bitvec 1.0.1", "blake2s_simd", "byteorder", - "crossbeam-channel 0.5.6", - "ff", - "group", + "crossbeam-channel 0.5.8", + "ff 0.12.1", + "group 0.12.1", "lazy_static", "log", "num_cpus", @@ -550,11 +540,11 @@ dependencies = [ [[package]] name = "bimap" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0455254eb5c6964c4545d8bac815e1a1be4f3afe0ae695ea539c12d728d44b" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -563,7 +553,7 @@ version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -572,19 +562,19 @@ version = "0.65.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" dependencies = [ - "bitflags 1.3.2", + "bitflags 1.2.1", "cexpr", "clang-sys", "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.6", + "prettyplease 0.2.4", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.16", + "syn 2.0.15", ] [[package]] @@ -625,7 +615,7 @@ dependencies = [ "bech32 0.9.1", "bitcoin_hashes", "secp256k1", - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -634,14 +624,14 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", ] [[package]] name = "bitflags" -version = "1.3.2" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bitflags" @@ -673,11 +663,11 @@ dependencies = [ [[package]] name = "blake2" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b12e5fd123190ce1c2e559308a94c9bacad77907d4c6005d9e58fe1a0689e55e" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.7", + "digest 0.10.6", ] [[package]] @@ -692,9 +682,9 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72936ee4afc7f8f736d1c38383b56480b5497b4617b4a77bdbf1d2ababc76127" +checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" dependencies = [ "arrayref", "arrayvec 0.7.2", @@ -703,9 +693,9 @@ dependencies = [ [[package]] name = "blake2s_simd" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db539cc2b5f6003621f1cd9ef92d7ded8ea5232c7de0f9faa2de251cd98730d4" +checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" dependencies = [ "arrayref", "arrayvec 0.7.2", @@ -714,16 +704,16 @@ dependencies = [ [[package]] name = "blake3" -version = "1.3.1" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f" +checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" dependencies = [ "arrayref", "arrayvec 0.7.2", "cc", "cfg-if 1.0.0", "constant_time_eq", - "digest 0.10.7", + "digest 0.10.6", ] [[package]] @@ -744,16 +734,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -787,8 +777,8 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3c196a77437e7cc2fb515ce413a6401291578b5afc8ecb29a3c7ab957f05941" dependencies = [ - "ff", - "group", + "ff 0.12.1", + "group 0.12.1", "pairing", "rand_core 0.6.4", "subtle 2.4.1", @@ -840,6 +830,9 @@ name = "bs58" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +dependencies = [ + "sha2 0.9.9", +] [[package]] name = "bstr" @@ -852,21 +845,11 @@ dependencies = [ "regex-automata", ] -[[package]] -name = "buf_redux" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" -dependencies = [ - "memchr", - "safemem", -] - [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" [[package]] name = "byte-slice-cast" @@ -882,29 +865,30 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byte-unit" -version = "4.0.17" +version = "4.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581ad4b3d627b0c09a0ccb2912148f839acaca0b93cf54cbe42b6c674e86079c" +checksum = "da78b32057b8fdfc352504708feeba7216dcd65a2c9ab02978cbd288d1279b6c" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", "utf8-width", ] [[package]] name = "bytecheck" -version = "0.6.9" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" +checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" dependencies = [ "bytecheck_derive", "ptr_meta", + "simdutf8", ] [[package]] name = "bytecheck_derive" -version = "0.6.9" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" +checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" dependencies = [ "proc-macro2", "quote", @@ -929,7 +913,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -945,11 +929,11 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.1" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad0e1e3e88dd237a156ab9f571021b8a158caa0ae44b1968a241efb5144c1e" +checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -958,7 +942,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -970,29 +954,29 @@ dependencies = [ "camino", "cargo-platform", "semver 1.0.17", - "serde 1.0.147", + "serde 1.0.163", "serde_json", ] [[package]] name = "cargo_metadata" -version = "0.15.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", "semver 1.0.17", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "thiserror", ] [[package]] name = "cc" -version = "1.0.76" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a284da2e6fe2092f2353e51713435363112dfd60030e22add80be333fb928f" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" dependencies = [ "jobserver", ] @@ -1003,7 +987,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom 7.1.1", + "nom 7.1.3", ] [[package]] @@ -1055,9 +1039,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "iana-time-zone", "num-integer", @@ -1067,9 +1051,9 @@ dependencies = [ [[package]] name = "chunked_transfer" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" +checksum = "cca491388666e04d7248af3f60f0c40cfb0991c72205595d7c396e3510207d1a" [[package]] name = "cipher" @@ -1077,7 +1061,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -1102,9 +1086,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.4.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ "glob", "libc", @@ -1113,21 +1097,22 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.10" +version = "4.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384e169cc618c613d5e3ca6404dda77a8685a63e08660dcc64abaf7da7cb0c7a" +checksum = "2686c4115cb0810d9a984776e197823d08ec94f176549a89a9efded477c456dc" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.3.10" +version = "4.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef137bbe35aab78bdb468ccfba75a5f4d8321ae011d34063770780545176af2d" +checksum = "2e53afce1efce6ed1f633cf0e57612fe51db54a1ee4fd8f8503d078fe02d69ae" dependencies = [ "anstream", "anstyle", + "bitflags 1.2.1", "clap_lex", "strsim", ] @@ -1143,47 +1128,37 @@ name = "clru" version = "0.5.0" source = "git+https://github.com/marmeladema/clru-rs.git?rev=71ca566#71ca566915f21f3c308091ca7756a91b0f8b5afc" -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - [[package]] name = "coins-bip32" -version = "0.7.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634c509653de24b439672164bbf56f5f582a2ab0e313d3b0f6af0b7345cf2560" +checksum = "b30a84aab436fcb256a2ab3c80663d8aec686e6bae12827bb05fef3e1e439c9f" dependencies = [ "bincode", "bs58", "coins-core", - "digest 0.10.7", - "getrandom 0.2.8", + "digest 0.10.6", + "getrandom 0.2.9", "hmac 0.12.1", - "k256", + "k256 0.13.1", "lazy_static", - "serde 1.0.147", + "serde 1.0.163", "sha2 0.10.6", "thiserror", ] [[package]] name = "coins-bip39" -version = "0.7.0" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a11892bcac83b4c6e95ab84b5b06c76d9d70ad73548dd07418269c5c7977171" +checksum = "84f4d04ee18e58356accd644896aeb2094ddeafb6a713e056cef0c0a8e468c15" dependencies = [ "bitvec 0.17.4", "coins-bip32", - "getrandom 0.2.8", - "hex", + "getrandom 0.2.9", "hmac 0.12.1", - "pbkdf2 0.11.0", + "once_cell", + "pbkdf2 0.12.1", "rand 0.8.5", "sha2 0.10.6", "thiserror", @@ -1191,19 +1166,18 @@ dependencies = [ [[package]] name = "coins-core" -version = "0.7.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94090a6663f224feae66ab01e41a2555a8296ee07b5f20dab8888bdefc9f617" +checksum = "9b949a1c63fb7eb591eb7ba438746326aedf0ae843e51ec92ba6bec5bb382c4f" dependencies = [ - "base58check", - "base64 0.12.3", + "base64 0.21.0", "bech32 0.7.3", - "blake2", - "digest 0.10.7", - "generic-array 0.14.6", + "bs58", + "digest 0.10.6", + "generic-array 0.14.7", "hex", "ripemd", - "serde 1.0.147", + "serde 1.0.163", "serde_derive", "sha2 0.10.6", "sha3", @@ -1233,7 +1207,7 @@ checksum = "b6eee477a4a8a72f4addd4de416eb56d54bc307b284d6601bafdee1f4ea462d1" dependencies = [ "once_cell", "owo-colors 1.3.0", - "tracing-core 0.1.30", + "tracing-core 0.1.31", "tracing-error", ] @@ -1260,12 +1234,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b1b9d958c2b1368a663f05538fc1b5975adce1e19f435acceae987aceeeb369" dependencies = [ "lazy_static", - "nom 5.1.2", + "nom 5.1.3", "rust-ini", - "serde 1.0.147", + "serde 1.0.163", "serde-hjson", "serde_json", - "toml", + "toml 0.5.9", "yaml-rust", ] @@ -1275,20 +1249,20 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b72b06487a0d4683349ad74d62e87ad639b09667082b3c495c5b6bab7d84b3da" dependencies = [ - "windows", + "windows 0.44.0", ] [[package]] name = "const-oid" -version = "0.9.1" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" +checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" [[package]] name = "constant_time_eq" -version = "0.1.5" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" [[package]] name = "contracts" @@ -1301,15 +1275,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "convert_case" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "core-foundation" version = "0.9.3" @@ -1322,9 +1287,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "corosensei" @@ -1341,9 +1306,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" dependencies = [ "libc", ] @@ -1367,7 +1332,7 @@ dependencies = [ "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli", + "gimli 0.26.2", "log", "regalloc", "smallvec", @@ -1428,35 +1393,35 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.12", + "crossbeam-utils 0.8.15", ] [[package]] name = "crossbeam-deque" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", - "crossbeam-utils 0.8.12", + "crossbeam-utils 0.8.15", ] [[package]] name = "crossbeam-epoch" -version = "0.9.11" +version = "0.9.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ "autocfg", "cfg-if 1.0.0", - "crossbeam-utils 0.8.12", - "memoffset 0.6.5", + "crossbeam-utils 0.8.15", + "memoffset 0.8.0", "scopeguard", ] @@ -1473,9 +1438,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if 1.0.0", ] @@ -1492,7 +1457,19 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", + "rand_core 0.6.4", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" +dependencies = [ + "generic-array 0.14.7", "rand_core 0.6.4", "subtle 2.4.1", "zeroize", @@ -1504,7 +1481,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "typenum", ] @@ -1524,7 +1501,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle 2.4.1", ] @@ -1534,7 +1511,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle 2.4.1", ] @@ -1604,55 +1581,11 @@ dependencies = [ "zeroize", ] -[[package]] -name = "cxx" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97abf9f0eca9e52b7f81b945524e76710e6cb2366aead23b7d4fbf72e281f888" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc32cc5fea1d894b77d269ddb9f192110069a8a9c1f1d441195fba90553dea3" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 1.0.109", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca220e4794c934dc6b1207c3b42856ad4c302f2df1712e9f8d2eec5afaacf1f" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b846f081361125bfc8dc9d3940c84e1fd83ba54bbca7b17cd29483c828be0704" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling" -version = "0.14.2" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" +checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" dependencies = [ "darling_core", "darling_macro", @@ -1660,39 +1593,48 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.2" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" +checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] name = "darling_macro" -version = "0.14.2" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" +checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] name = "data-encoding" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" +checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" [[package]] name = "der" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +dependencies = [ + "const-oid", +] + +[[package]] +name = "der" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" dependencies = [ "const-oid", "zeroize", @@ -1753,16 +1695,17 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] name = "digest" -version = "0.10.7" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.3", + "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle 2.4.1", ] @@ -1816,7 +1759,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.15", ] [[package]] @@ -1833,9 +1776,9 @@ checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" [[package]] name = "dunce" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "dyn-clone" @@ -1849,7 +1792,7 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ - "bitflags 1.3.2", + "bitflags 1.2.1", "byteorder", "lazy_static", "proc-macro-error", @@ -1875,10 +1818,24 @@ version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", + "der 0.6.1", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", +] + +[[package]] +name = "ecdsa" +version = "0.16.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +dependencies = [ + "der 0.7.7", + "digest 0.10.6", + "elliptic-curve 0.13.5", + "rfc6979 0.4.0", + "signature 2.1.0", + "spki", ] [[package]] @@ -1887,8 +1844,8 @@ version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ - "serde 1.0.147", - "signature", + "serde 1.0.163", + "signature 1.6.4", ] [[package]] @@ -1900,7 +1857,7 @@ dependencies = [ "curve25519-dalek-ng", "hex", "rand_core 0.6.4", - "serde 1.0.147", + "serde 1.0.163", "sha2 0.9.9", "thiserror", "zeroize", @@ -1916,7 +1873,7 @@ dependencies = [ "ed25519", "merlin", "rand 0.7.3", - "serde 1.0.147", + "serde 1.0.163", "serde_bytes", "sha2 0.9.9", "zeroize", @@ -1936,9 +1893,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "elliptic-curve" @@ -1946,44 +1903,61 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ - "base16ct", - "crypto-bigint", - "der", - "digest 0.10.7", - "ff", - "generic-array 0.14.6", - "group", + "base16ct 0.1.1", + "crypto-bigint 0.4.9", + "der 0.6.1", + "digest 0.10.6", + "ff 0.12.1", + "generic-array 0.14.7", + "group 0.12.1", + "rand_core 0.6.4", + "sec1 0.3.0", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +dependencies = [ + "base16ct 0.2.0", + "crypto-bigint 0.5.2", + "digest 0.10.6", + "ff 0.13.0", + "generic-array 0.14.7", + "group 0.13.0", "pkcs8", "rand_core 0.6.4", - "sec1", + "sec1 0.7.2", "subtle 2.4.1", "zeroize", ] [[package]] name = "encoding_rs" -version = "0.8.31" +version = "0.8.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "enr" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "492a7e5fc2504d5fdce8e124d3e263b244a68b283cac67a69eda0cd43e0aebad" +checksum = "cf56acd72bb22d2824e66ae8e9e5ada4d0de17a69c7fd35569dde2ada8ec9116" dependencies = [ "base64 0.13.1", - "bs58", "bytes", "hex", - "k256", + "k256 0.13.1", "log", "rand 0.8.5", "rlp", - "serde 1.0.147", + "serde 1.0.163", "sha3", "zeroize", ] @@ -2010,43 +1984,38 @@ dependencies = [ [[package]] name = "enumset" -version = "1.0.12" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" +checksum = "e875f1719c16de097dee81ed675e2d9bb63096823ed3f0ca827b7dea3028bbbb" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.6.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" +checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" dependencies = [ "darling", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] -name = "erased-serde" -version = "0.3.25" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2b0c2380453a92ea8b6c8e5f64ecaafccddde8ceab55ff7a8ac1029f894569" -dependencies = [ - "serde 1.0.147", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "errno" -version = "0.2.8" +name = "erased-serde" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "4f2b0c2380453a92ea8b6c8e5f64ecaafccddde8ceab55ff7a8ac1029f894569" dependencies = [ - "errno-dragonfly", - "libc", - "winapi", + "serde 1.0.163", ] [[package]] @@ -2087,7 +2056,7 @@ checksum = "f5584ba17d7ab26a8a7284f13e5bd196294dd2f2d79773cff29b9e9edef601a6" dependencies = [ "log", "once_cell", - "serde 1.0.147", + "serde 1.0.163", "serde_json", ] @@ -2097,15 +2066,15 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" dependencies = [ - "aes 0.8.2", + "aes 0.8.3", "ctr", - "digest 0.10.7", + "digest 0.10.6", "hex", "hmac 0.12.1", "pbkdf2 0.11.0", "rand 0.8.5", "scrypt", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "sha2 0.10.6", "sha3", @@ -2123,7 +2092,7 @@ dependencies = [ "hex", "once_cell", "regex", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "sha3", "thiserror", @@ -2243,21 +2212,21 @@ dependencies = [ [[package]] name = "ethers-addressbook" -version = "2.0.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1e010165c08a2a3fa43c0bb8bc9d596f079a021aaa2cc4e8d921df09709c95" +checksum = "7b856b7b8ff5c961093cb8efe151fbcce724b451941ce20781de11a531ccd578" dependencies = [ "ethers-core", "once_cell", - "serde 1.0.147", + "serde 1.0.163", "serde_json", ] [[package]] name = "ethers-contract" -version = "2.0.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be33fd47a06cc8f97caf614cf7cf91af9dd6dcd767511578895fa884b430c4b8" +checksum = "e066a0d9cfc70c454672bf16bb433b0243427420076dc5b2f49c448fb5a10628" dependencies = [ "ethers-contract-abigen", "ethers-contract-derive", @@ -2267,83 +2236,73 @@ dependencies = [ "hex", "once_cell", "pin-project", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "thiserror", ] [[package]] name = "ethers-contract-abigen" -version = "2.0.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60d9f9ecb4a18c1693de954404b66e0c9df31dac055b411645e38c4efebf3dbc" +checksum = "c113e3e86b6bc16d98484b2c3bb2d01d6fed9f489fe2e592e5cc87c3024d616b" dependencies = [ "Inflector", - "cfg-if 1.0.0", "dunce", "ethers-core", - "ethers-etherscan", "eyre", - "getrandom 0.2.8", "hex", - "prettyplease 0.1.24", + "prettyplease 0.2.4", "proc-macro2", "quote", "regex", - "reqwest", - "serde 1.0.147", + "serde 1.0.163", "serde_json", - "syn 1.0.109", - "tokio", - "toml", - "url", + "syn 2.0.15", + "toml 0.7.6", "walkdir", ] [[package]] name = "ethers-contract-derive" -version = "2.0.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "001b33443a67e273120923df18bab907a0744ad4b5fef681a8b0691f2ee0f3de" +checksum = "8c3fb5adee25701c79ec58fcf2c63594cd8829bc9ad6037ff862d5a111101ed2" dependencies = [ + "Inflector", "ethers-contract-abigen", "ethers-core", - "eyre", "hex", "proc-macro2", "quote", "serde_json", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] name = "ethers-core" -version = "2.0.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5925cba515ac18eb5c798ddf6069cc33ae00916cb08ae64194364a1b35c100b" +checksum = "6da5fa198af0d3be20c19192df2bd9590b92ce09a8421e793bec8851270f1b05" dependencies = [ "arrayvec 0.7.2", "bytes", - "cargo_metadata 0.15.3", + "cargo_metadata 0.15.4", "chrono", - "convert_case", - "elliptic-curve", + "elliptic-curve 0.13.5", "ethabi", - "generic-array 0.14.6", - "getrandom 0.2.8", + "generic-array 0.14.7", "hex", - "k256", + "k256 0.13.1", "num_enum", "once_cell", "open-fastrlp", - "proc-macro2", "rand 0.8.5", "rlp", - "rlp-derive", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "strum", - "syn 1.0.109", + "syn 2.0.15", "tempfile", "thiserror", "tiny-keccak", @@ -2352,16 +2311,14 @@ dependencies = [ [[package]] name = "ethers-etherscan" -version = "2.0.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d769437fafd0b47ea8b95e774e343c5195c77423f0f54b48d11c0d9ed2148ad" +checksum = "84ebb401ba97c6f5af278c2c9936c4546cad75dec464b439ae6df249906f4caa" dependencies = [ "ethers-core", - "getrandom 0.2.8", "reqwest", "semver 1.0.17", - "serde 1.0.147", - "serde-aux", + "serde 1.0.163", "serde_json", "thiserror", "tracing 0.1.37", @@ -2369,9 +2326,9 @@ dependencies = [ [[package]] name = "ethers-middleware" -version = "2.0.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dd311b76eab9d15209e4fd16bb419e25543709cbdf33079e8923dfa597517c" +checksum = "740f4a773c19dd6d6a68c8c2e0996c096488d38997d524e21dc612c55da3bd24" dependencies = [ "async-trait", "auto_impl", @@ -2380,11 +2337,12 @@ dependencies = [ "ethers-etherscan", "ethers-providers", "ethers-signers", + "futures-channel", "futures-locks", "futures-util", "instant", "reqwest", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "thiserror", "tokio", @@ -2395,27 +2353,27 @@ dependencies = [ [[package]] name = "ethers-providers" -version = "2.0.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7174af93619e81844d3d49887106a3721e5caecdf306e0b824bfb4316db3be" +checksum = "56b498fd2a6c019d023e43e83488cd1fb0721f299055975aa6bac8dbf1e95f2c" dependencies = [ "async-trait", "auto_impl", "base64 0.21.0", + "bytes", "enr", "ethers-core", "futures-core", "futures-timer", "futures-util", - "getrandom 0.2.8", "hashers", "hex", "http", + "instant", "once_cell", - "parking_lot 0.11.2", "pin-project", "reqwest", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "thiserror", "tokio", @@ -2424,21 +2382,20 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-timer", "web-sys", "ws_stream_wasm", ] [[package]] name = "ethers-signers" -version = "2.0.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d45ff294473124fd5bb96be56516ace179eef0eaec5b281f68c953ddea1a8bf" +checksum = "02c4b7e15f212fa7cc2e1251868320221d4ff77a3d48068e69f47ce1c491df2d" dependencies = [ "async-trait", "coins-bip32", "coins-bip39", - "elliptic-curve", + "elliptic-curve 0.13.5", "eth-keystore", "ethers-core", "hex", @@ -2484,9 +2441,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] @@ -2498,7 +2455,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5" dependencies = [ "cfg-if 1.0.0", - "rustix 0.38.3", + "rustix 0.38.4", "windows-sys 0.48.0", ] @@ -2519,7 +2476,7 @@ dependencies = [ "blake2", "blake2b_simd", "borsh", - "digest 0.10.7", + "digest 0.10.6", "ed25519-dalek", "either", "ferveo-common", @@ -2531,7 +2488,7 @@ dependencies = [ "num 0.4.0", "rand 0.7.3", "rand 0.8.5", - "serde 1.0.147", + "serde 1.0.163", "serde_bytes", "serde_json", "subproductdomain", @@ -2548,7 +2505,7 @@ dependencies = [ "ark-ec", "ark-serialize", "ark-std", - "serde 1.0.147", + "serde 1.0.163", "serde_bytes", ] @@ -2563,11 +2520,21 @@ dependencies = [ "subtle 2.4.1", ] +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core 0.6.4", + "subtle 2.4.1", +] + [[package]] name = "file-serve" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e43addbb09a5dcb5609cb44a01a79e67716fe40b50c109f50112ef201a8c7c59" +checksum = "547ebf393d987692a02b5d2be1c0b398b16a5b185c23a047c1d3fc3050d6d803" dependencies = [ "log", "mime_guess", @@ -2576,14 +2543,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9663d381d07ae25dc88dbdf27df458faa83a9b25336bcac83d5e452b5fc9d3" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall", - "windows-sys 0.42.0", + "redox_syscall 0.2.16", + "windows-sys 0.48.0", ] [[package]] @@ -2606,12 +2573,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.24" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.7.1", ] [[package]] @@ -2670,9 +2637,9 @@ dependencies = [ [[package]] name = "fs_extra" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" [[package]] name = "funty" @@ -2746,7 +2713,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.15", ] [[package]] @@ -2766,6 +2733,10 @@ name = "futures-timer" version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] [[package]] name = "futures-util" @@ -2805,12 +2776,13 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -2828,9 +2800,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -2846,17 +2818,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", - "indexmap", + "indexmap 1.9.3", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" + [[package]] name = "git2" version = "0.13.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f29229cc1b24c0e6062f6e742aa3e256492a5323365e5ed3413599f8a5eff7d6" dependencies = [ - "bitflags 1.3.2", + "bitflags 1.2.1", "libc", "libgit2-sys", "log", @@ -2867,9 +2845,21 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "gloo-timers" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] [[package]] name = "group" @@ -2877,12 +2867,23 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ - "ff", + "ff 0.12.1", "memuse", "rand_core 0.6.4", "subtle 2.4.1", ] +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", + "rand_core 0.6.4", + "subtle 2.4.1", +] + [[package]] name = "group-threshold-cryptography" version = "0.1.0" @@ -2929,9 +2930,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.15" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" dependencies = [ "bytes", "fnv", @@ -2939,10 +2940,10 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", - "tokio-util 0.7.4", + "tokio-util 0.7.8", "tracing 0.1.37", ] @@ -2970,6 +2971,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "hashers" version = "1.0.1" @@ -2981,9 +2988,9 @@ dependencies = [ [[package]] name = "hdpath" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dafb09e5d85df264339ad786a147d9de1da13687a3697c52244297e5e7c32d9c" +checksum = "dfa5bc9db2c17d2660f53ce217b778d06d68de13d1cd01c0f4e5de4b7918935f" dependencies = [ "byteorder", ] @@ -3005,7 +3012,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64 0.13.1", - "bitflags 1.3.2", + "bitflags 1.2.1", "bytes", "headers-core", "http", @@ -3025,24 +3032,24 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" dependencies = [ "libc", ] [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" [[package]] name = "hex" @@ -3086,7 +3093,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest 0.10.6", ] [[package]] @@ -3107,7 +3114,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "hmac 0.8.1", ] @@ -3119,9 +3126,9 @@ checksum = "77e806677ce663d0a199541030c816847b36e8dc095f70dae4a4f4ad63da5383" [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", @@ -3139,12 +3146,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "http-range-header" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" - [[package]] name = "httparse" version = "1.8.0" @@ -3170,14 +3171,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" dependencies = [ "humantime", - "serde 1.0.147", + "serde 1.0.163", ] [[package]] name = "hyper" -version = "0.14.23" +version = "0.14.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" dependencies = [ "bytes", "futures-channel", @@ -3208,7 +3209,7 @@ dependencies = [ "headers", "http", "hyper", - "hyper-rustls 0.22.1", + "hyper-rustls", "rustls-native-certs 0.5.0", "tokio", "tokio-rustls 0.22.0", @@ -3234,19 +3235,6 @@ dependencies = [ "webpki-roots 0.21.1", ] -[[package]] -name = "hyper-rustls" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" -dependencies = [ - "http", - "hyper", - "rustls 0.20.7", - "tokio", - "tokio-rustls 0.23.4", -] - [[package]] name = "hyper-timeout" version = "0.4.1" @@ -3274,26 +3262,25 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows 0.48.0", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -3310,11 +3297,11 @@ dependencies = [ "ibc-proto", "ics23", "num-traits 0.2.15", - "parking_lot 0.12.1", + "parking_lot", "primitive-types", "prost", "safe-regex", - "serde 1.0.147", + "serde 1.0.163", "serde_derive", "serde_json", "sha2 0.10.6", @@ -3337,7 +3324,7 @@ dependencies = [ "bytes", "flex-error", "prost", - "serde 1.0.147", + "serde 1.0.163", "subtle-encoding", "tendermint-proto", "tonic", @@ -3354,15 +3341,15 @@ dependencies = [ "bitcoin", "bs58", "bytes", - "crossbeam-channel 0.5.6", - "digest 0.10.7", + "crossbeam-channel 0.5.8", + "digest 0.10.6", "dirs-next", "ed25519", "ed25519-dalek", "ed25519-dalek-bip32", "flex-error", "futures", - "generic-array 0.14.6", + "generic-array 0.14.7", "hdpath", "hex", "http", @@ -3380,11 +3367,11 @@ dependencies = [ "ripemd", "secp256k1", "semver 1.0.17", - "serde 1.0.147", + "serde 1.0.163", "serde_derive", "serde_json", "sha2 0.10.6", - "signature", + "signature 1.6.4", "strum", "subtle-encoding", "tendermint", @@ -3396,10 +3383,10 @@ dependencies = [ "tiny-bip39 1.0.0", "tiny-keccak", "tokio", - "toml", + "toml 0.5.9", "tonic", "tracing 0.1.37", - "uuid 1.2.1", + "uuid 1.3.2", ] [[package]] @@ -3419,7 +3406,7 @@ dependencies = [ "primitive-types", "prost", "safe-regex", - "serde 1.0.147", + "serde 1.0.163", "serde_derive", "serde_json", "subtle-encoding", @@ -3498,7 +3485,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -3518,7 +3505,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5ad43a3f5795945459d577f6589cf62a476e92c79b75e70cd954364e14ce17b" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -3533,18 +3520,28 @@ version = "0.7.1" source = "git+https://github.com/heliaxdev/index-set?tag=v0.7.1#dc24cdbbe3664514d59f1a4c4031863fc565f1c2" dependencies = [ "borsh", - "serde 1.0.147", + "serde 1.0.163", ] [[package]] name = "indexmap" -version = "1.9.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", - "serde 1.0.147", + "serde 1.0.163", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", ] [[package]] @@ -3553,7 +3550,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -3588,28 +3585,30 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.4" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" dependencies = [ + "hermit-abi 0.3.1", "libc", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "ipnet" -version = "2.5.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745" +checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" [[package]] name = "is-terminal" -version = "0.4.8" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.3", + "hermit-abi 0.3.1", + "io-lifetimes", + "rustix 0.37.13", "windows-sys 0.48.0", ] @@ -3624,24 +3623,24 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "jobserver" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "68c16e1bfd491478ab155fd8b4896b86f9ede344949b641e61501e07c2b8b4d5" dependencies = [ "wasm-bindgen", ] @@ -3654,8 +3653,8 @@ checksum = "a575df5f985fe1cd5b2b05664ff6accfc46559032b954529fd225a2168d27b0f" dependencies = [ "bitvec 1.0.1", "bls12_381", - "ff", - "group", + "ff 0.12.1", + "group 0.12.1", "rand_core 0.6.4", "subtle 2.4.1", ] @@ -3667,17 +3666,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ "cfg-if 1.0.0", - "ecdsa", - "elliptic-curve", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", "sha2 0.10.6", - "sha3", +] + +[[package]] +name = "k256" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +dependencies = [ + "cfg-if 1.0.0", + "ecdsa 0.16.7", + "elliptic-curve 0.13.5", + "once_cell", + "sha2 0.10.6", + "signature 2.1.0", ] [[package]] name = "keccak" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] [[package]] name = "lazy_static" @@ -3704,7 +3719,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ "arrayvec 0.5.2", - "bitflags 1.3.2", + "bitflags 1.2.1", "cfg-if 1.0.0", "ryu", "static_assertions", @@ -3791,7 +3806,7 @@ dependencies = [ "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", "rand 0.8.5", - "serde 1.0.147", + "serde 1.0.163", "sha2 0.9.9", "typenum", ] @@ -3838,9 +3853,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" +checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" dependencies = [ "cc", "libc", @@ -3848,29 +3863,20 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "link-cplusplus" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" -dependencies = [ - "cc", -] - [[package]] name = "linked-hash-map" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", ] [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f" [[package]] name = "linux-raw-sys" @@ -3890,12 +3896,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "loupe" @@ -3903,7 +3906,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d" dependencies = [ - "indexmap", + "indexmap 1.9.3", "loupe-derive", "rustversion", ] @@ -3927,16 +3930,25 @@ dependencies = [ "libc", ] +[[package]] +name = "mach2" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d0d1830bcd151a6fc4aea1369af235b36c1528fe976b8ff678683c9995eade8" +dependencies = [ + "libc", +] + [[package]] name = "madato" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c36112680b23ee7a5d2a10e56b59a74e4028963e9080b8abec4e69d0d773dc06" dependencies = [ - "indexmap", + "indexmap 1.9.3", "linked-hash-map", "regex", - "serde 1.0.147", + "serde 1.0.163", "serde_derive", "serde_yaml", ] @@ -3967,9 +3979,9 @@ dependencies = [ "bls12_381", "borsh", "byteorder", - "ff", + "ff 0.12.1", "fpe", - "group", + "group 0.12.1", "hex", "incrementalmerkletree", "jubjub", @@ -3993,8 +4005,8 @@ dependencies = [ "blake2b_simd", "bls12_381", "directories", - "getrandom 0.2.8", - "group", + "getrandom 0.2.9", + "group 0.12.1", "itertools", "jubjub", "lazy_static", @@ -4045,9 +4057,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.8" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" dependencies = [ "libc", ] @@ -4070,6 +4082,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +dependencies = [ + "autocfg", +] + [[package]] name = "memuse" version = "0.2.1" @@ -4096,9 +4117,9 @@ dependencies = [ [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" @@ -4118,36 +4139,45 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.5.4" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", +] + +[[package]] +name = "miniz_oxide" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] [[package]] name = "minreq" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c785bc6027fd359756e538541c8624012ba3776d3d3fe123885643092ed4132" +checksum = "cb6c6973f78ef55d0e5fc04fdb8f9ad67c87c9e86bca0ff77b6a3102b0eb36b7" dependencies = [ - "lazy_static", "log", - "rustls 0.20.7", + "once_cell", + "rustls 0.20.8", "webpki 0.22.0", - "webpki-roots 0.22.5", + "webpki-roots 0.22.6", ] [[package]] name = "mio" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -4158,16 +4188,16 @@ checksum = "94c7128ba23c81f6471141b90f17654f89ef44a56e14b8a4dd0fddfccd655277" [[package]] name = "moka" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b9268097a2cf211ac9955b1cc95e80fa84fff5c2d13ba292916445dc8a311f" +checksum = "19ca9b167ed904bc89a2f64c4be5014615c26fd9c4ddd2042c6094744c7df11a" dependencies = [ - "crossbeam-channel 0.5.6", + "crossbeam-channel 0.5.8", "crossbeam-epoch", - "crossbeam-utils 0.8.12", + "crossbeam-utils 0.8.15", "num_cpus", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "quanta", "rustc_version 0.4.0", "scheduled-thread-pool", @@ -4176,7 +4206,7 @@ dependencies = [ "tagptr", "thiserror", "triomphe", - "uuid 1.2.1", + "uuid 1.3.2", ] [[package]] @@ -4186,29 +4216,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - -[[package]] -name = "multipart" -version = "0.18.0" +name = "multer" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00dec633863867f29cb39df64a397cdf4a6354708ddd7759f70c7fb51c5f9182" +checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" dependencies = [ - "buf_redux", + "bytes", + "encoding_rs", + "futures-util", + "http", "httparse", "log", + "memchr", "mime", - "mime_guess", - "quick-error", - "rand 0.8.5", - "safemem", - "tempfile", - "twoway", + "spin 0.9.8", + "version_check", ] +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + [[package]] name = "namada" version = "0.19.0" @@ -4251,7 +4281,7 @@ dependencies = [ "rand_core 0.6.4", "rayon", "ripemd", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "sha2 0.9.9", "slip10_ed25519", @@ -4262,9 +4292,9 @@ dependencies = [ "tiny-bip39 0.8.2", "tiny-hderive", "tokio", - "toml", + "toml 0.5.9", "tracing 0.1.37", - "tracing-subscriber 0.3.16", + "tracing-subscriber 0.3.17", "wasm-instrument", "wasmer", "wasmer-cache", @@ -4313,6 +4343,7 @@ dependencies = [ "futures", "git2", "itertools", + "lazy_static", "libc", "libloading", "masp_primitives", @@ -4338,7 +4369,7 @@ dependencies = [ "rlimit", "rocksdb", "rpassword", - "serde 1.0.147", + "serde 1.0.163", "serde_bytes", "serde_json", "sha2 0.9.9", @@ -4352,14 +4383,14 @@ dependencies = [ "thiserror", "tokio", "tokio-test", - "toml", + "toml 0.5.9", "tonic", "tower", "tower-abci", "tracing 0.1.37", "tracing-appender", "tracing-log", - "tracing-subscriber 0.3.16", + "tracing-subscriber 0.3.17", "warp", "winapi", "zeroize", @@ -4405,7 +4436,7 @@ dependencies = [ "rand 0.8.5", "rand_core 0.6.4", "rayon", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "sha2 0.9.9", "sparse-merkle-tree", @@ -4414,10 +4445,10 @@ dependencies = [ "test-log", "thiserror", "tiny-keccak", - "toml", + "toml 0.5.9", "tonic-build", "tracing 0.1.37", - "tracing-subscriber 0.3.16", + "tracing-subscriber 0.3.17", "uint", "zeroize", ] @@ -4448,12 +4479,12 @@ dependencies = [ "namada_macros", "namada_proof_of_stake", "rand 0.8.5", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "tendermint", "tendermint-proto", "tendermint-rpc", - "toml", + "toml 0.5.9", "tracing 0.1.37", ] @@ -4481,7 +4512,7 @@ dependencies = [ "test-log", "thiserror", "tracing 0.1.37", - "tracing-subscriber 0.3.16", + "tracing-subscriber 0.3.17", ] [[package]] @@ -4498,8 +4529,10 @@ name = "namada_tests" version = "0.19.0" dependencies = [ "assert_cmd", + "async-trait", "borsh", "chrono", + "clap", "color-eyre", "concat-idents", "data-encoding", @@ -4513,12 +4546,14 @@ dependencies = [ "ibc-relayer", "ibc-relayer-types", "itertools", + "lazy_static", "namada", "namada_apps", "namada_core", "namada_test_utils", "namada_tx_prelude", "namada_vp_prelude", + "num-traits 0.2.15", "once_cell", "pretty_assertions", "proptest", @@ -4531,9 +4566,9 @@ dependencies = [ "tempfile", "test-log", "tokio", - "toml", + "toml 0.5.9", "tracing 0.1.37", - "tracing-subscriber 0.3.16", + "tracing-subscriber 0.3.17", ] [[package]] @@ -4596,7 +4631,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ - "bitflags 1.3.2", + "bitflags 1.2.1", "cfg-if 1.0.0", "libc", "memoffset 0.7.1", @@ -4606,9 +4641,9 @@ dependencies = [ [[package]] name = "nom" -version = "5.1.2" +version = "5.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +checksum = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b" dependencies = [ "lexical-core", "memchr", @@ -4617,9 +4652,9 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", @@ -4671,7 +4706,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" dependencies = [ "num-bigint 0.4.3", - "num-complex 0.4.2", + "num-complex 0.4.3", "num-integer", "num-iter", "num-rational 0.4.1", @@ -4698,7 +4733,7 @@ dependencies = [ "autocfg", "num-integer", "num-traits 0.2.15", - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -4713,9 +4748,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" +checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" dependencies = [ "num-traits 0.2.15", ] @@ -4774,7 +4809,7 @@ dependencies = [ "num-bigint 0.4.3", "num-integer", "num-traits 0.2.15", - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -4806,39 +4841,39 @@ dependencies = [ "num 0.4.0", "num-derive", "num-traits 0.2.15", - "serde 1.0.147", + "serde 1.0.163", "serde_derive", ] [[package]] name = "num_cpus" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi 0.2.6", "libc", ] [[package]] name = "num_enum" -version = "0.5.11" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.11" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ - "proc-macro-crate 1.2.1", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -4849,15 +4884,15 @@ checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "crc32fast", "hashbrown 0.11.2", - "indexmap", + "indexmap 1.9.3", "memchr", ] [[package]] name = "object" -version = "0.29.0" +version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" dependencies = [ "memchr", ] @@ -4907,11 +4942,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.42" +version = "0.10.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13" +checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" dependencies = [ - "bitflags 1.3.2", + "bitflags 1.2.1", "cfg-if 1.0.0", "foreign-types", "libc", @@ -4922,13 +4957,13 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -4939,11 +4974,10 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.77" +version = "0.9.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03b84c3b2d099b81f0953422b4d4ad58761589d0229b5506356afca05a3670a" +checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" dependencies = [ - "autocfg", "cc", "libc", "pkg-config", @@ -4957,7 +4991,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6624905ddd92e460ff0685567539ed1ac985b2dee4c92c7edcd64fce905b00c" dependencies = [ "ct-codecs", - "getrandom 0.2.8", + "getrandom 0.2.9", "subtle 2.4.1", "zeroize", ] @@ -4995,30 +5029,30 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "135590d8bdba2b31346f9cd1fb2a912329f5135e832a4f422942eb6ead8b6b3b" dependencies = [ - "group", + "group 0.12.1", ] [[package]] name = "parity-scale-codec" -version = "3.2.1" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "366e44391a8af4cfd6002ef6ba072bae071a96aafca98d7d448a34c5dca38b6a" +checksum = "5ddb756ca205bd108aee3c62c6d3c994e1df84a59b9d6d4a5ea42ee1fd5a9a28" dependencies = [ "arrayvec 0.7.2", "bitvec 1.0.1", "byte-slice-cast", "impl-trait-for-tuples", "parity-scale-codec-derive", - "serde 1.0.147", + "serde 1.0.163", ] [[package]] name = "parity-scale-codec-derive" -version = "3.1.3" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9299338969a3d2f491d65f140b00ddec470858402f888af98e8642fb5e8965cd" +checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" dependencies = [ - "proc-macro-crate 1.2.1", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -5030,17 +5064,6 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -5048,34 +5071,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.4", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.9.4" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -5100,22 +5109,11 @@ dependencies = [ "subtle 2.4.1", ] -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core 0.6.4", - "subtle 2.4.1", -] - [[package]] name = "paste" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "pbkdf2" @@ -5133,7 +5131,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f05894bce6a1ba4be299d0c5f29563e08af2bc18bb7d48313113bed71e904739" dependencies = [ "crypto-mac 0.11.1", - "password-hash 0.3.2", + "password-hash", ] [[package]] @@ -5142,10 +5140,17 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "digest 0.10.7", + "digest 0.10.6", +] + +[[package]] +name = "pbkdf2" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31" +dependencies = [ + "digest 0.10.6", "hmac 0.12.1", - "password-hash 0.4.2", - "sha2 0.10.6", ] [[package]] @@ -5189,21 +5194,22 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.1.3" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" dependencies = [ + "thiserror", "ucd-trie", ] [[package]] name = "petgraph" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" +checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 1.9.3", ] [[package]] @@ -5218,22 +5224,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -5250,19 +5256,19 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs8" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der", + "der 0.7.7", "spki", ] [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "poly1305" @@ -5283,9 +5289,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "predicates" -version = "2.1.3" +version = "2.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6bd09a7f7e68f3f0bf710fb7ab9c4615a488b58b5f653382a687701e458c92" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "itertools", @@ -5294,15 +5300,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f883590242d3c6fc5bf50299011695fa6590c2c70eac95ee1bdb9a733ad1a2" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" [[package]] name = "predicates-tree" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" dependencies = [ "predicates-core", "termtree", @@ -5322,9 +5328,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebcd279d20a4a0a2404a33056388e950504d891c855c7975b9a8fef75f3bf04" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ "proc-macro2", "syn 1.0.109", @@ -5332,12 +5338,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.6" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b69d39aab54d069e7f2fe8cb970493e7834601ca2d8c65fd7bbd183578080d1" +checksum = "1ceca8aaf45b5c46ec7ed39fff75f57290368c1846d33d24a122ca81416ab058" dependencies = [ "proc-macro2", - "syn 2.0.16", + "syn 2.0.15", ] [[package]] @@ -5360,18 +5366,17 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.9", ] [[package]] name = "proc-macro-crate" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "thiserror", - "toml", + "toml_edit", ] [[package]] @@ -5400,9 +5405,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] @@ -5414,14 +5419,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e35c06b98bf36aba164cc17cb25f7e232f5c4aeea73baa14b8a9f0d92dbfa65" dependencies = [ "bit-set", - "bitflags 1.3.2", + "bitflags 1.2.1", "byteorder", "lazy_static", "num-traits 0.2.15", "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift", - "regex-syntax 0.6.28", + "regex-syntax 0.6.29", "rusty-fork", "tempfile", "unarray", @@ -5459,7 +5464,7 @@ dependencies = [ "log", "multimap", "petgraph", - "prettyplease 0.1.24", + "prettyplease 0.1.25", "prost", "prost-types", "regex", @@ -5525,23 +5530,23 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34f197a544b0c9ab3ae46c359a7ec9cbbb5c7bf97054266fecb7ead794a181d6" dependencies = [ - "bitflags 1.3.2", + "bitflags 1.2.1", "memchr", "unicase", ] [[package]] name = "quanta" -version = "0.10.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e31331286705f455e56cca62e0e717158474ff02b7936c1fa596d983f4ae27" +checksum = "a17e662a7a8291a865152364c20c7abc5e60486ab2001e8ec10b24862de0b9ab" dependencies = [ - "crossbeam-utils 0.8.12", + "crossbeam-utils 0.8.15", "libc", - "mach", + "mach2", "once_cell", "raw-cpuid", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", "web-sys", "winapi", ] @@ -5632,7 +5637,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", ] [[package]] @@ -5655,11 +5660,11 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "10.6.0" +version = "10.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6823ea29436221176fe662da99998ad3b4db2c7f31e7b6f5fe43adccd6320bb" +checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" dependencies = [ - "bitflags 1.3.2", + "bitflags 1.2.1", ] [[package]] @@ -5676,13 +5681,13 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.3" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ - "crossbeam-channel 0.5.6", + "crossbeam-channel 0.5.8", "crossbeam-deque", - "crossbeam-utils 0.8.12", + "crossbeam-utils 0.8.15", "num_cpus", ] @@ -5697,7 +5702,7 @@ dependencies = [ "digest 0.9.0", "jubjub", "rand_core 0.6.4", - "serde 1.0.147", + "serde 1.0.163", "thiserror", "zeroize", ] @@ -5708,7 +5713,16 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags 1.3.2", + "bitflags 1.2.1", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.2.1", ] [[package]] @@ -5717,8 +5731,8 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.8", - "redox_syscall", + "getrandom 0.2.9", + "redox_syscall 0.2.16", "thiserror", ] @@ -5750,14 +5764,14 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax 0.6.28", + "regex-syntax 0.6.29", ] [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" @@ -5771,7 +5785,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" dependencies = [ - "bitflags 1.3.2", + "bitflags 1.2.1", "libc", "mach", "winapi", @@ -5779,18 +5793,18 @@ dependencies = [ [[package]] name = "rend" -version = "0.3.6" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" +checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" dependencies = [ "bytecheck", ] [[package]] name = "reqwest" -version = "0.11.14" +version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" +checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ "base64 0.21.0", "bytes", @@ -5801,7 +5815,6 @@ dependencies = [ "http", "http-body", "hyper", - "hyper-rustls 0.23.2", "hyper-tls", "ipnet", "js-sys", @@ -5811,20 +5824,16 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.20.7", - "rustls-pemfile 1.0.2", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", - "tokio-rustls 0.23.4", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.22.5", "winreg", ] @@ -5840,11 +5849,21 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ - "crypto-bigint", + "crypto-bigint 0.4.9", "hmac 0.12.1", "zeroize", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle 2.4.1", +] + [[package]] name = "ring" version = "0.16.20" @@ -5854,7 +5873,7 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", + "spin 0.5.2", "untrusted", "web-sys", "winapi", @@ -5866,7 +5885,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "digest 0.10.7", + "digest 0.10.6", ] [[package]] @@ -5882,23 +5901,26 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.39" +version = "0.7.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" +checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" dependencies = [ + "bitvec 1.0.1", "bytecheck", "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", "seahash", + "tinyvec", + "uuid 1.3.2", ] [[package]] name = "rkyv_derive" -version = "0.7.39" +version = "0.7.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" +checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" dependencies = [ "proc-macro2", "quote", @@ -5921,6 +5943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", + "rlp-derive", "rustc-hex", ] @@ -5963,9 +5986,9 @@ checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -5999,26 +6022,26 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.5" +version = "0.37.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588" +checksum = "f79bef90eb6d984c72722595b5b1348ab39275a5e5123faca6863bf07d75a4e0" dependencies = [ - "bitflags 1.3.2", - "errno 0.2.8", + "bitflags 1.2.1", + "errno", "io-lifetimes", "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.42.0", + "linux-raw-sys 0.3.7", + "windows-sys 0.48.0", ] [[package]] name = "rustix" -version = "0.38.3" +version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5ffa1efe7548069688cd7028f32591853cd7b5b756d41bcffd2353e4fc75b4" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" dependencies = [ "bitflags 2.3.3", - "errno 0.3.1", + "errno", "libc", "linux-raw-sys 0.4.3", "windows-sys 0.48.0", @@ -6039,9 +6062,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.7" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", "ring", @@ -6063,39 +6086,30 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.2", + "rustls-pemfile", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "0.2.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.13.1", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" -dependencies = [ - "base64 0.21.0", + "base64 0.21.0", ] [[package]] name = "rustversion" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "rusty-fork" @@ -6111,9 +6125,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "safe-proc-macro2" @@ -6162,12 +6176,6 @@ dependencies = [ "safe-regex-compiler", ] -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - [[package]] name = "salsa20" version = "0.10.2" @@ -6188,9 +6196,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.3.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "001cf62ece89779fd16105b5f515ad0e5cedcd5440d3dd806bb067978e7c3608" +checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" dependencies = [ "cfg-if 1.0.0", "derive_more", @@ -6200,11 +6208,11 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.3.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "303959cf613a6f6efd19ed4b4ad5bf79966a13352716299ad532cfb115f4205c" +checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" dependencies = [ - "proc-macro-crate 1.2.1", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -6212,21 +6220,20 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "lazy_static", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "scheduled-thread-pool" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "977a7519bff143a44f842fd07e80ad1329295bd71686457f18e496736f4bf9bf" +checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" dependencies = [ - "parking_lot 0.12.1", + "parking_lot", ] [[package]] @@ -6241,12 +6248,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "scratch" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" - [[package]] name = "scrypt" version = "0.10.0" @@ -6291,9 +6292,22 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ - "base16ct", - "der", - "generic-array 0.14.6", + "base16ct 0.1.1", + "der 0.6.1", + "generic-array 0.14.7", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "sec1" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" +dependencies = [ + "base16ct 0.2.0", + "der 0.7.7", + "generic-array 0.14.7", "pkcs8", "subtle 2.4.1", "zeroize", @@ -6308,7 +6322,7 @@ dependencies = [ "bitcoin_hashes", "rand 0.8.5", "secp256k1-sys", - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -6326,7 +6340,7 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467" dependencies = [ - "bitflags 1.3.2", + "bitflags 1.2.1", "core-foundation", "core-foundation-sys", "libc", @@ -6335,9 +6349,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" dependencies = [ "core-foundation-sys", "libc", @@ -6358,7 +6372,7 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -6370,6 +6384,12 @@ dependencies = [ "pest", ] +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + [[package]] name = "send_wrapper" version = "0.6.0" @@ -6384,23 +6404,13 @@ checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" [[package]] name = "serde" -version = "1.0.147" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" dependencies = [ "serde_derive", ] -[[package]] -name = "serde-aux" -version = "4.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c599b3fd89a75e0c18d6d2be693ddb12cccaf771db4ff9e39097104808a014c0" -dependencies = [ - "serde 1.0.147", - "serde_json", -] - [[package]] name = "serde-hjson" version = "0.9.1" @@ -6415,11 +6425,11 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.7" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" +checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -6429,40 +6439,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" dependencies = [ "half", - "serde 1.0.147", + "serde 1.0.163", ] [[package]] name = "serde_derive" -version = "1.0.147" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] name = "serde_json" -version = "1.0.87" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", - "serde 1.0.147", + "serde 1.0.163", ] [[package]] name = "serde_repr" -version = "0.1.9" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fe39d9fbb0ebf5eb2c7cb7e2a47e4f462fad1379f1166b8ae49ad9eae89a7ca" +checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", +] + +[[package]] +name = "serde_spanned" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +dependencies = [ + "serde 1.0.163", ] [[package]] @@ -6474,7 +6493,7 @@ dependencies = [ "form_urlencoded", "itoa", "ryu", - "serde 1.0.147", + "serde 1.0.163", ] [[package]] @@ -6485,7 +6504,7 @@ checksum = "ef8099d3df28273c99a1728190c7a9f19d444c941044f64adf986bee7ec53051" dependencies = [ "dtoa", "linked-hash-map", - "serde 1.0.147", + "serde 1.0.163", "yaml-rust", ] @@ -6502,17 +6521,6 @@ dependencies = [ "opaque-debug 0.3.0", ] -[[package]] -name = "sha-1" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "sha1" version = "0.10.5" @@ -6521,7 +6529,7 @@ checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.7", + "digest 0.10.6", ] [[package]] @@ -6557,16 +6565,16 @@ checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.7", + "digest 0.10.6", ] [[package]] name = "sha3" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.7", + "digest 0.10.6", "keccak", ] @@ -6587,9 +6595,9 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "signal-hook" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" +checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" dependencies = [ "libc", "signal-hook-registry", @@ -6597,9 +6605,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] @@ -6610,10 +6618,26 @@ version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.7", + "digest 0.10.6", + "rand_core 0.6.4", +] + +[[package]] +name = "signature" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +dependencies = [ + "digest 0.10.6", "rand_core 0.6.4", ] +[[package]] +name = "simdutf8" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" + [[package]] name = "simple-error" version = "0.2.3" @@ -6637,9 +6661,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] @@ -6661,9 +6685,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -6687,14 +6711,20 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "spki" -version = "0.6.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der", + "der 0.7.7", ] [[package]] @@ -6790,9 +6820,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" dependencies = [ "proc-macro2", "quote", @@ -6805,23 +6835,11 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - [[package]] name = "sysinfo" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "751e810399bba86e9326f5762b7f32ac5a085542df78da6a78d94e07d14d7c11" +checksum = "6b949f01f9c23823744b71e0060472ecbde578ef68cc2a9e46d114efd77c3034" dependencies = [ "cfg-if 1.0.0", "core-foundation-sys", @@ -6856,21 +6874,21 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.5" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" +checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" [[package]] name = "tempfile" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if 1.0.0", "fastrand", - "redox_syscall", - "rustix 0.36.5", - "windows-sys 0.42.0", + "redox_syscall 0.3.5", + "rustix 0.37.13", + "windows-sys 0.45.0", ] [[package]] @@ -6884,18 +6902,18 @@ dependencies = [ "ed25519-dalek", "flex-error", "futures", - "k256", + "k256 0.11.6", "num-traits 0.2.15", "once_cell", "prost", "prost-types", "ripemd160", - "serde 1.0.147", + "serde 1.0.163", "serde_bytes", "serde_json", "serde_repr", "sha2 0.9.9", - "signature", + "signature 1.6.4", "subtle 2.4.1", "subtle-encoding", "tendermint-proto", @@ -6909,10 +6927,10 @@ version = "0.23.6" source = "git+https://github.com/heliaxdev/tendermint-rs.git?rev=b7d1e5afc6f2ccb3fd1545c2174bab1cc48d7fa7#b7d1e5afc6f2ccb3fd1545c2174bab1cc48d7fa7" dependencies = [ "flex-error", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "tendermint", - "toml", + "toml 0.5.9", "url", ] @@ -6926,7 +6944,7 @@ dependencies = [ "derive_more", "flex-error", "futures", - "serde 1.0.147", + "serde 1.0.163", "serde_cbor", "serde_derive", "static_assertions", @@ -6944,7 +6962,7 @@ source = "git+https://github.com/heliaxdev/tendermint-rs.git?rev=b7d1e5afc6f2ccb dependencies = [ "derive_more", "flex-error", - "serde 1.0.147", + "serde 1.0.163", "tendermint", "time", ] @@ -6960,7 +6978,7 @@ dependencies = [ "num-traits 0.2.15", "prost", "prost-types", - "serde 1.0.147", + "serde 1.0.163", "serde_bytes", "subtle-encoding", "time", @@ -6976,14 +6994,14 @@ dependencies = [ "bytes", "flex-error", "futures", - "getrandom 0.2.8", + "getrandom 0.2.9", "http", "hyper", "hyper-proxy", - "hyper-rustls 0.22.1", + "hyper-rustls", "peg", "pin-project", - "serde 1.0.147", + "serde 1.0.163", "serde_bytes", "serde_json", "subtle-encoding", @@ -7006,7 +7024,7 @@ source = "git+https://github.com/heliaxdev/tendermint-rs.git?rev=b7d1e5afc6f2ccb dependencies = [ "ed25519-dalek", "gumdrop", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "simple-error", "tempfile", @@ -7014,20 +7032,11 @@ dependencies = [ "time", ] -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - [[package]] name = "termtree" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-log" @@ -7042,41 +7051,41 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] name = "thread_local" -version = "1.1.4" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ + "cfg-if 1.0.0", "once_cell", ] [[package]] name = "tikv-jemalloc-sys" -version = "0.5.2+5.3.0-patched" +version = "0.5.3+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec45c14da997d0925c7835883e4d5c181f196fa142f8c19d7643d1e9af2592c3" +checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8" dependencies = [ "cc", - "fs_extra", "libc", ] @@ -7087,7 +7096,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" dependencies = [ "itoa", - "serde 1.0.147", + "serde 1.0.163", "time-core", "time-macros", ] @@ -7168,15 +7177,14 @@ dependencies = [ [[package]] name = "tiny_http" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0d6ef4e10d23c1efb862eecad25c5054429a71958b4eeef85eb5e7170b477ca" +checksum = "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82" dependencies = [ "ascii", "chunked_transfer", + "httpdate", "log", - "time", - "url", ] [[package]] @@ -7190,28 +7198,27 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.21.2" +version = "1.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" +checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -7226,20 +7233,20 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.8.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] name = "tokio-native-tls" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", "tokio", @@ -7262,16 +7269,16 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.7", + "rustls 0.20.8", "tokio", "webpki 0.22.0", ] [[package]] name = "tokio-stream" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -7293,14 +7300,14 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" +checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" dependencies = [ "futures-util", "log", "tokio", - "tungstenite 0.17.3", + "tungstenite 0.18.0", ] [[package]] @@ -7319,9 +7326,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.4" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -7337,7 +7344,41 @@ version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ - "serde 1.0.147", + "serde 1.0.163", +] + +[[package]] +name = "toml" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +dependencies = [ + "serde 1.0.163", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde 1.0.163", +] + +[[package]] +name = "toml_edit" +version = "0.19.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" +dependencies = [ + "indexmap 2.0.0", + "serde 1.0.163", + "serde_spanned", + "toml_datetime", + "winnow", ] [[package]] @@ -7362,12 +7403,12 @@ dependencies = [ "pin-project", "prost", "prost-derive", - "rustls-native-certs 0.6.2", - "rustls-pemfile 1.0.2", + "rustls-native-certs 0.6.3", + "rustls-pemfile", "tokio", "tokio-rustls 0.23.4", "tokio-stream", - "tokio-util 0.7.4", + "tokio-util 0.7.8", "tower", "tower-layer", "tower-service", @@ -7381,7 +7422,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" dependencies = [ - "prettyplease 0.1.24", + "prettyplease 0.1.25", "proc-macro2", "prost-build", "quote", @@ -7397,13 +7438,13 @@ dependencies = [ "futures-core", "futures-util", "hdrhistogram", - "indexmap", + "indexmap 1.9.3", "pin-project", "pin-project-lite", "rand 0.8.5", "slab", "tokio", - "tokio-util 0.7.4", + "tokio-util 0.7.8", "tower-layer", "tower-service", "tracing 0.1.37", @@ -7427,25 +7468,6 @@ dependencies = [ "tracing-tower", ] -[[package]] -name = "tower-http" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" -dependencies = [ - "bitflags 1.3.2", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-range-header", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", -] - [[package]] name = "tower-layer" version = "0.3.2" @@ -7487,8 +7509,8 @@ dependencies = [ "cfg-if 1.0.0", "log", "pin-project-lite", - "tracing-attributes 0.1.23", - "tracing-core 0.1.30", + "tracing-attributes 0.1.24", + "tracing-core 0.1.31", ] [[package]] @@ -7497,9 +7519,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e" dependencies = [ - "crossbeam-channel 0.5.6", + "crossbeam-channel 0.5.8", "time", - "tracing-subscriber 0.3.16", + "tracing-subscriber 0.3.17", ] [[package]] @@ -7514,13 +7536,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -7533,9 +7555,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", "valuable", @@ -7578,7 +7600,7 @@ checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ "lazy_static", "log", - "tracing-core 0.1.30", + "tracing-core 0.1.31", ] [[package]] @@ -7587,8 +7609,8 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" dependencies = [ - "serde 1.0.147", - "tracing-core 0.1.30", + "serde 1.0.163", + "tracing-core 0.1.31", ] [[package]] @@ -7599,25 +7621,25 @@ checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" dependencies = [ "sharded-slab", "thread_local", - "tracing-core 0.1.30", + "tracing-core 0.1.31", ] [[package]] name = "tracing-subscriber" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ "matchers", "nu-ansi-term", "once_cell", "regex", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "sharded-slab", "thread_local", "tracing 0.1.37", - "tracing-core 0.1.30", + "tracing-core 0.1.31", "tracing-log", "tracing-serde", ] @@ -7638,15 +7660,15 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1ee9bd9239c339d714d657fac840c6d2a4f9c45f4f9ec7b0975113458be78db" +checksum = "0eee8098afad3fb0c54a9007aab6804558410503ad676d4633f9c2559a00ac0f" [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "tungstenite" @@ -7662,16 +7684,16 @@ dependencies = [ "input_buffer", "log", "rand 0.8.5", - "sha-1 0.9.8", + "sha-1", "url", "utf-8", ] [[package]] name = "tungstenite" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" +checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" dependencies = [ "base64 0.13.1", "byteorder", @@ -7680,26 +7702,17 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "sha-1 0.10.0", + "sha1", "thiserror", "url", "utf-8", ] -[[package]] -name = "twoway" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" -dependencies = [ - "memchr", -] - [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" @@ -7736,15 +7749,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -7755,12 +7768,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" - [[package]] name = "unicode-width" version = "0.1.10" @@ -7824,17 +7831,17 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.8", - "serde 1.0.147", + "getrandom 0.2.9", + "serde 1.0.163", ] [[package]] name = "uuid" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83" +checksum = "4dad5567ad0cf5b760e5665964bec1b47dfd077ba8a2544b513f3556d3d239a2" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", ] [[package]] @@ -7916,12 +7923,11 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -7937,9 +7943,9 @@ dependencies = [ [[package]] name = "warp" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7b8be92646fc3d18b06147664ebc5f48d222686cb11a8755e561a735aacc6d" +checksum = "ba431ef570df1287f7f8b07e376491ad54f84d26ac473489427231e1718e1f69" dependencies = [ "bytes", "futures-channel", @@ -7950,18 +7956,18 @@ dependencies = [ "log", "mime", "mime_guess", - "multipart", + "multer", "percent-encoding", "pin-project", - "rustls-pemfile 0.2.1", + "rustls-pemfile", "scoped-tls", - "serde 1.0.147", + "serde 1.0.163", "serde_json", "serde_urlencoded", "tokio", "tokio-stream", "tokio-tungstenite", - "tokio-util 0.7.4", + "tokio-util 0.7.8", "tower-service", "tracing 0.1.37", ] @@ -7972,12 +7978,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -7986,9 +7986,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "5b6cb788c4e39112fbe1822277ef6fb3c55cd86b95cb3d3c4c1c9597e4ac74b4" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -7996,24 +7996,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "35e522ed4105a9d626d885b35d62501b30d9666283a5c8be12c14a8bdafe7822" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.33" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +checksum = "083abe15c5d88556b77bdf7aef403625be9e327ad37c62c4e4129af740168163" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -8023,9 +8023,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "358a79a0cb89d21db8120cbfb91392335913e4890665b1a7981d9e956903b434" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8033,28 +8033,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "4783ce29f09b9d93134d41297aded3a712b7b979e9c6f28c32cb88c973a94869" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "a901d592cafaa4d711bc324edfaff879ac700b19c3dfd60058d2b445be2691eb" [[package]] name = "wasm-encoder" -version = "0.19.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9424cdab516a16d4ea03c8f4a01b14e7b2d04a129dcc2bcdde5bcc5f68f06c41" +checksum = "d05d0b6fcd0aeb98adf16e7975331b3c17222aa815148f5b976370ce589d80ef" dependencies = [ "leb128", ] @@ -8068,21 +8068,6 @@ dependencies = [ "parity-wasm", ] -[[package]] -name = "wasm-timer" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" -dependencies = [ - "futures", - "js-sys", - "parking_lot 0.11.2", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wasmer" version = "2.3.0" @@ -8090,7 +8075,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" dependencies = [ "cfg-if 1.0.0", - "indexmap", + "indexmap 1.9.3", "js-sys", "loupe", "more-asserts", @@ -8144,7 +8129,7 @@ dependencies = [ "enumset", "loupe", "rkyv", - "serde 1.0.147", + "serde 1.0.163", "serde_bytes", "smallvec", "target-lexicon", @@ -8162,7 +8147,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "loupe", "more-asserts", "rayon", @@ -8182,7 +8167,7 @@ dependencies = [ "byteorder", "dynasm", "dynasmrt", - "gimli", + "gimli 0.26.2", "lazy_static", "loupe", "more-asserts", @@ -8217,7 +8202,7 @@ dependencies = [ "memmap2", "more-asserts", "rustc-demangle", - "serde 1.0.147", + "serde 1.0.163", "serde_bytes", "target-lexicon", "thiserror", @@ -8241,7 +8226,7 @@ dependencies = [ "loupe", "object 0.28.4", "rkyv", - "serde 1.0.147", + "serde 1.0.163", "tempfile", "tracing 0.1.37", "wasmer-artifact", @@ -8309,11 +8294,11 @@ checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" dependencies = [ "backtrace", "enum-iterator", - "indexmap", + "indexmap 1.9.3", "loupe", "more-asserts", "rkyv", - "serde 1.0.147", + "serde 1.0.163", "thiserror", ] @@ -8328,7 +8313,7 @@ dependencies = [ "cfg-if 1.0.0", "corosensei", "enum-iterator", - "indexmap", + "indexmap 1.9.3", "lazy_static", "libc", "loupe", @@ -8338,7 +8323,7 @@ dependencies = [ "region", "rkyv", "scopeguard", - "serde 1.0.147", + "serde 1.0.163", "thiserror", "wasmer-artifact", "wasmer-types", @@ -8357,7 +8342,7 @@ version = "0.107.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" dependencies = [ - "indexmap", + "indexmap 1.9.3", "semver 1.0.17", ] @@ -8369,7 +8354,7 @@ checksum = "5f656cd8858a5164932d8a90f936700860976ec21eb00e0fe2aa8cab13f6b4cf" dependencies = [ "futures", "js-sys", - "parking_lot 0.12.1", + "parking_lot", "pin-utils", "slab", "wasm-bindgen", @@ -8377,9 +8362,9 @@ dependencies = [ [[package]] name = "wast" -version = "49.0.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ef81fcd60d244cafffeafac3d17615fdb2fddda6aca18f34a8ae233353587c" +checksum = "6eb0f5ed17ac4421193c7477da05892c2edafd67f9639e3c11a82086416662dc" dependencies = [ "leb128", "memchr", @@ -8389,18 +8374,18 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.51" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c347c4460ffb311e95aafccd8c29e4888f241b9e4b3bb0e0ccbd998de2c8c0d" +checksum = "ab9ab0d87337c3be2bb6fc5cd331c4ba9fd6bcb4ee85048a0dd59ed9ecf92e53" dependencies = [ "wast", ] [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "16b5f940c7edfdc6d12126d98c9ef4d1b3d470011c47c76a6581df47ad9ba721" dependencies = [ "js-sys", "wasm-bindgen", @@ -8437,18 +8422,18 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.5" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368bfe657969fb01238bb756d351dcade285e0f6fcbd36dcb23359a5169975be" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ "webpki 0.22.0", ] [[package]] name = "which" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" dependencies = [ "either", "libc", @@ -8495,6 +8480,15 @@ dependencies = [ "windows-targets 0.42.2", ] +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + [[package]] name = "windows-sys" version = "0.33.0" @@ -8508,19 +8502,6 @@ dependencies = [ "windows_x86_64_msvc 0.33.0", ] -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -8536,13 +8517,22 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.0", ] [[package]] @@ -8562,9 +8552,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -8593,12 +8583,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -8617,12 +8601,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -8641,12 +8619,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -8665,12 +8637,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -8701,12 +8667,6 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -8719,6 +8679,15 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "winnow" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.10.1" @@ -8740,7 +8709,7 @@ dependencies = [ "log", "pharos", "rustc_version 0.4.0", - "send_wrapper", + "send_wrapper 0.6.0", "thiserror", "wasm-bindgen", "wasm-bindgen-futures", @@ -8785,31 +8754,31 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure", + "syn 2.0.15", ] [[package]] name = "zstd-sys" -version = "2.0.1+zstd.1.5.2" +version = "2.0.8+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" dependencies = [ "cc", "libc", + "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index 40921fb5ea..51bda1eb33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,6 +81,7 @@ ibc-relayer-types = {git = "https://github.com/heliaxdev/hermes.git", rev = "fea ics23 = "0.9.0" index-set = {git = "https://github.com/heliaxdev/index-set", tag = "v0.7.1", features = ["serialize-borsh", "serialize-serde"]} itertools = "0.10.0" +lazy_static = "1.4.0" libc = "0.2.97" libloading = "0.7.2" libsecp256k1 = {git = "https://github.com/heliaxdev/libsecp256k1", rev = "bbb3bd44a49db361f21d9db80f9a087c194c0ae9", default-features = false, features = ["std", "static-context"]} diff --git a/Makefile b/Makefile index a0d9f4a600..a347ff8e27 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ build: $(cargo) build $(jobs) build-test: - $(cargo) build --tests $(jobs) + $(cargo) +$(nightly) build --tests $(jobs) build-release: NAMADA_DEV=false $(cargo) build $(jobs) --release --package namada_apps --manifest-path Cargo.toml @@ -119,7 +119,7 @@ test-unit-coverage: $(cargo) +$(nightly) llvm-cov --output-dir target \ --features namada/testing \ --html \ - -- --skip e2e -Z unstable-options --report-time + -- --skip e2e --skip integration -Z unstable-options --report-time # NOTE: `TEST_FILTER` is prepended with `e2e::`. Since filters in `cargo test` # work with a substring search, TEST_FILTER only works if it contains a string @@ -135,11 +135,18 @@ test-e2e: --test-threads=1 \ -Z unstable-options --report-time +test-integration: + RUST_BACKTRACE=$(RUST_BACKTRACE) \ + $(cargo) +$(nightly) test integration::$(TEST_FILTER) \ + -Z unstable-options \ + -- \ + -Z unstable-options --report-time + test-unit: $(cargo) +$(nightly) test \ $(TEST_FILTER) \ $(jobs) \ - -- --skip e2e \ + -- --skip e2e --skip integration \ -Z unstable-options --report-time test-unit-mainnet: @@ -147,14 +154,14 @@ test-unit-mainnet: --features "mainnet" \ $(TEST_FILTER) \ $(jobs) \ - -- --skip e2e \ + -- --skip e2e --skip integration \ -Z unstable-options --report-time test-unit-debug: $(debug-cargo) +$(nightly) test \ $(jobs) \ $(TEST_FILTER) \ - -- --skip e2e \ + -- --skip e2e --skip integration \ --nocapture \ -Z unstable-options --report-time diff --git a/apps/Cargo.toml b/apps/Cargo.toml index 2d44bc0443..992abbef33 100644 --- a/apps/Cargo.toml +++ b/apps/Cargo.toml @@ -64,6 +64,7 @@ abciplus = [ "namada/tendermint-rpc", ] + [dependencies] namada = {path = "../shared", features = ["ferveo-tpke", "masp-tx-gen", "multicore", "http-client"]} ark-serialize.workspace = true @@ -96,6 +97,7 @@ ferveo.workspace = true flate2.workspace = true futures.workspace = true itertools.workspace = true +lazy_static.workspace= true libc.workspace = true libloading.workspace = true masp_primitives = { workspace = true, features = ["transparent-inputs"] } @@ -125,6 +127,7 @@ sha2.workspace = true signal-hook.workspace = true sysinfo.workspace = true tar.workspace = true +tempfile.workspace = true tendermint-config.workspace = true thiserror.workspace = true tokio = {workspace = true, features = ["full"]} @@ -148,7 +151,6 @@ namada = {path = "../shared", default-features = false, features = ["testing", " namada_test_utils = {path = "../test_utils"} bit-set.workspace = true proptest.workspace = true -tempfile.workspace = true test-log.workspace = true tokio-test.workspace = true diff --git a/apps/src/lib/cli.rs b/apps/src/lib/cli.rs index d499e623a6..a7301a9c22 100644 --- a/apps/src/lib/cli.rs +++ b/apps/src/lib/cli.rs @@ -15,8 +15,8 @@ pub mod wallet; use clap::{ArgGroup, ArgMatches, ColorChoice}; use color_eyre::eyre::Result; -pub use utils::safe_exit; use utils::*; +pub use utils::{dispatch_prompt, safe_exit, Cmd, TESTIN}; pub use self::context::Context; diff --git a/apps/src/lib/cli/utils.rs b/apps/src/lib/cli/utils.rs index eac233ed28..7bcd9c5bd9 100644 --- a/apps/src/lib/cli/utils.rs +++ b/apps/src/lib/cli/utils.rs @@ -1,10 +1,12 @@ //! Command line interface utilities use std::fmt::Debug; +use std::io::Write; use std::marker::PhantomData; use std::str::FromStr; use clap::{ArgAction, ArgMatches}; use color_eyre::eyre::Result; +use lazy_static::lazy_static; use super::args; use super::context::{Context, FromContext}; @@ -322,6 +324,7 @@ where }) } +#[cfg(not(feature = "testing"))] /// A helper to exit after flushing output, borrowed from `clap::util` module. pub fn safe_exit(code: i32) -> ! { use std::io::Write; @@ -331,3 +334,62 @@ pub fn safe_exit(code: i32) -> ! { std::process::exit(code) } + +#[cfg(feature = "testing")] +/// A helper to exit after flushing output, borrowed from `clap::util` module. +pub fn safe_exit(_: i32) -> ! { + let _ = std::io::stdout().lock().flush(); + let _ = std::io::stderr().lock().flush(); + + panic!("Test failed because the client exited unexpectedly.") +} + +lazy_static! { + /// A replacement for stdin in testing. + pub static ref TESTIN: std::sync::Arc>> = + std::sync::Arc::new(std::sync::Mutex::new(vec![])); +} + +/// A generic function for displaying a prompt to users and reading +/// in their response. +fn prompt_aux(mut reader: R, mut writer: W, question: &str) -> String +where + R: std::io::Read, + W: Write, +{ + write!(&mut writer, "{}", question).expect("Unable to write"); + writer.flush().unwrap(); + let mut s = String::new(); + reader.read_to_string(&mut s).expect("Unable to read"); + s +} + +/// A function that chooses how to dispatch prompts +/// to users. There is a hierarchy of feature flags +/// that determines this. If no flags are set, +/// the question is printed to stdout and response +/// read from stdin. +pub fn dispatch_prompt(question: impl AsRef) -> String { + if cfg!(feature = "testing") { + prompt_aux( + TESTIN.lock().unwrap().as_slice(), + std::io::stdout(), + question.as_ref(), + ) + } else { + prompt_aux( + std::io::stdin().lock(), + std::io::stdout(), + question.as_ref(), + ) + } +} + +#[macro_export] +/// A convenience macro for formatting the user prompt before +/// forwarding it to the `[dispatch_prompt]` method. +macro_rules! prompt { + ($($arg:tt)*) => {{ + $crate::cli::dispatch_prompt(format!("{}", format_args!($($arg)*))) + }} +} diff --git a/apps/src/lib/client/rpc.rs b/apps/src/lib/client/rpc.rs index 236bafb57d..42043cd5c3 100644 --- a/apps/src/lib/client/rpc.rs +++ b/apps/src/lib/client/rpc.rs @@ -53,6 +53,7 @@ use tokio::time::Instant; use crate::cli::{self, args}; use crate::facade::tendermint::merkle::proof::Proof; use crate::facade::tendermint_rpc::error::Error as TError; +use crate::prompt; use crate::wallet::CliWalletUtils; /// Query the status of a given transaction. @@ -439,10 +440,7 @@ pub async fn query_pinned_balance< } // If a suitable viewing key was not found, then demand it from the user if balance == pinned_error { - print!("Enter the viewing key for {}: ", owner); - io::stdout().flush().unwrap(); - let mut vk_str = String::new(); - io::stdin().read_line(&mut vk_str).unwrap(); + let vk_str = prompt!("Enter the viewing key for {}: ", owner); let fvk = match ExtendedViewingKey::from_str(vk_str.trim()) { Ok(fvk) => fvk, _ => { diff --git a/apps/src/lib/client/utils.rs b/apps/src/lib/client/utils.rs index 272d74b6eb..6f20fe165a 100644 --- a/apps/src/lib/client/utils.rs +++ b/apps/src/lib/client/utils.rs @@ -47,41 +47,6 @@ const DEFAULT_NETWORK_CONFIGS_SERVER: &str = /// We do pre-genesis validator set up in this directory pub const PRE_GENESIS_DIR: &str = "pre-genesis"; -/// Environment variable set to reduce the amount of printing the CLI -/// tools perform. Extra prints, while good for UI, clog up test tooling. -pub const REDUCED_CLI_PRINTING: &str = "REDUCED_CLI_PRINTING"; - -macro_rules! cli_print { - ($($arg:tt)*) => {{ - if std::env::var(REDUCED_CLI_PRINTING) - .map(|v| if v.to_lowercase().trim() == "true" { - false - } else { - true - }).unwrap_or(true) { - let mut stdout = std::io::stdout().lock(); - _ = stdout.write_all(format!("{}", std::format_args!($($arg)*)).as_bytes()); - _ = stdout.flush(); - } - }}; -} - -#[allow(unused)] -macro_rules! cli_println { - ($($arg:tt)*) => {{ - if std::env::var(REDUCED_CLI_PRINTING) - .map(|v| if v.to_lowercase().trim() == "true" { - false - } else { - true - }).unwrap_or(true) { - let mut stdout = std::io::stdout().lock(); - _ = stdout.write_all(format!("{}\n", std::format_args!($($arg)*)).as_bytes()); - _ = stdout.flush(); - } - }}; -} - /// Configure Namada to join an existing network. The chain must be released in /// the repository. pub async fn join_network( @@ -1204,9 +1169,9 @@ where print!("{}", msg); _ = std::io::stdout().flush(); for c in spinny_wheel.chars().cycle() { - cli_print!("{}", c); + print!("{}", c); std::thread::sleep(std::time::Duration::from_secs(1)); - cli_print!("{}", (8u8 as char)); + print!("{}", (8u8 as char)); if task.is_finished() { break; } diff --git a/apps/src/lib/config/genesis.rs b/apps/src/lib/config/genesis.rs index 1c659a056c..860a48c2b3 100644 --- a/apps/src/lib/config/genesis.rs +++ b/apps/src/lib/config/genesis.rs @@ -1037,9 +1037,9 @@ pub fn genesis(num_validators: u64) -> Genesis { public_key: wallet::defaults::ester_keypair().ref_to(), }, ]; - let default_user_tokens = token::Amount::native_whole(1_000_000); - let default_key_tokens = token::Amount::native_whole(1_000); - let mut balances: HashMap = HashMap::from_iter([ + let default_user_tokens = Uint::from(1_000_000); + let default_key_tokens = Uint::from(1_000_000); + let mut balances: HashMap = HashMap::from_iter([ // established accounts' balances (wallet::defaults::albert_address(), default_user_tokens), (wallet::defaults::bertha_address(), default_user_tokens), @@ -1085,7 +1085,11 @@ pub fn genesis(num_validators: u64) -> Genesis { denom, vp_code_path: vp_token_path.into(), vp_sha256: Default::default(), - balances: balances.clone(), + balances: balances + .clone() + .into_iter() + .map(|(k, v)| (k, token::Amount::from_uint(v, denom).unwrap())) + .collect(), }) .collect(); Genesis { diff --git a/apps/src/lib/node/ledger/mod.rs b/apps/src/lib/node/ledger/mod.rs index ebc86468c4..37b447b4da 100644 --- a/apps/src/lib/node/ledger/mod.rs +++ b/apps/src/lib/node/ledger/mod.rs @@ -1,8 +1,8 @@ mod abortable; mod broadcaster; pub mod ethereum_oracle; -mod shell; -mod shims; +pub mod shell; +pub mod shims; pub mod storage; pub mod tendermint_node; diff --git a/apps/src/lib/node/ledger/shell/mod.rs b/apps/src/lib/node/ledger/shell/mod.rs index 23bc6fe64b..2b7a0b7ac7 100644 --- a/apps/src/lib/node/ledger/shell/mod.rs +++ b/apps/src/lib/node/ledger/shell/mod.rs @@ -13,6 +13,9 @@ mod prepare_proposal; mod process_proposal; pub(super) mod queries; mod stats; +#[cfg(any(test, feature = "testing"))] +#[allow(dead_code)] +pub mod testing; mod vote_extensions; use std::collections::{BTreeSet, HashSet}; @@ -138,7 +141,7 @@ impl From for TxResult { /// The different error codes that the ledger may /// send back to a client indicating the status /// of their submitted tx -#[derive(Debug, Copy, Clone, FromPrimitive, ToPrimitive, PartialEq)] +#[derive(Debug, Copy, Clone, FromPrimitive, ToPrimitive, PartialEq, Eq)] pub enum ErrorCodes { Ok = 0, InvalidDecryptedChainId = 1, diff --git a/apps/src/lib/node/ledger/shell/prepare_proposal.rs b/apps/src/lib/node/ledger/shell/prepare_proposal.rs index 3fc5cd8983..e1e94be61e 100644 --- a/apps/src/lib/node/ledger/shell/prepare_proposal.rs +++ b/apps/src/lib/node/ledger/shell/prepare_proposal.rs @@ -16,8 +16,6 @@ use namada::types::transaction::{ use namada::types::vote_extensions::VoteExtensionDigest; use super::super::*; -#[allow(unused_imports)] -use super::block_space_alloc; use super::block_space_alloc::states::{ BuildingDecryptedTxBatch, BuildingProtocolTxBatch, EncryptedTxBatchAllocator, NextState, TryAlloc, @@ -41,8 +39,8 @@ where { /// Begin a new block. /// - /// Block construction is documented in [`block_space_alloc`] - /// and [`block_space_alloc::states`]. + /// Block construction is documented in `block_space_alloc` + /// and `block_space_alloc::states` (private modules). /// /// INVARIANT: Any changes applied in this method must be reverted if /// the proposal is rejected (unless we can simply overwrite diff --git a/apps/src/lib/node/ledger/shell/process_proposal.rs b/apps/src/lib/node/ledger/shell/process_proposal.rs index ff3bd60236..ce4f71a6f5 100644 --- a/apps/src/lib/node/ledger/shell/process_proposal.rs +++ b/apps/src/lib/node/ledger/shell/process_proposal.rs @@ -934,7 +934,7 @@ where /// Checks if it is not possible to include encrypted txs at the current /// block height. - fn encrypted_txs_not_allowed(&self) -> bool { + pub(super) fn encrypted_txs_not_allowed(&self) -> bool { let pos_queries = self.wl_storage.pos_queries(); let is_2nd_height_off = pos_queries.is_deciding_offset_within_epoch(1); let is_3rd_height_off = pos_queries.is_deciding_offset_within_epoch(2); diff --git a/apps/src/lib/node/ledger/shell/testing/client.rs b/apps/src/lib/node/ledger/shell/testing/client.rs new file mode 100644 index 0000000000..164e4a03ea --- /dev/null +++ b/apps/src/lib/node/ledger/shell/testing/client.rs @@ -0,0 +1,82 @@ +use std::ops::ControlFlow; + +use clap::Command as App; +use eyre::Report; +use namada::types::control_flow::Halt; +use tendermint_config::net::Address as TendermintAddress; + +use super::node::MockNode; +use crate::cli::api::{CliApi, CliClient}; +use crate::cli::args::Global; +use crate::cli::{args, cmds, Cmd, Context, NamadaClient}; +use crate::node::ledger::shell::testing::utils::Bin; + +pub fn run( + node: &MockNode, + who: Bin, + mut args: Vec<&str>, +) -> Result<(), Report> { + let global = { + let locked = node.shell.lock().unwrap(); + Global { + chain_id: Some(locked.chain_id.clone()), + base_dir: locked.base_dir.clone(), + wasm_dir: Some(locked.wasm_dir.clone()), + } + }; + let ctx = Context::new(global.clone())?; + + let rt = tokio::runtime::Runtime::new().unwrap(); + match who { + Bin::Node => { + unreachable!("Node commands aren't supported by integration tests") + } + Bin::Client => { + args.insert(0, "client"); + let app = App::new("test"); + let app = cmds::NamadaClient::add_sub(args::Global::def(app)); + let matches = app.get_matches_from(args.clone()); + let cmd = match cmds::NamadaClient::parse(&matches) + .expect("Could not parse client command") + { + cmds::NamadaClient::WithContext(sub_cmd) => { + NamadaClient::WithContext(Box::new((sub_cmd, ctx))) + } + cmds::NamadaClient::WithoutContext(sub_cmd) => { + NamadaClient::WithoutContext(sub_cmd, global) + } + }; + rt.block_on(CliApi::<()>::handle_client_command(Some(node), cmd)) + } + Bin::Wallet => { + args.insert(0, "wallet"); + let app = App::new("test"); + let app = cmds::NamadaWallet::add_sub(args::Global::def(app)); + let matches = app.get_matches_from(args.clone()); + + let cmd = cmds::NamadaWallet::parse(&matches) + .expect("Could not parse wallet command"); + CliApi::<()>::handle_wallet_command(cmd, ctx) + } + Bin::Relayer => { + args.insert(0, "relayer"); + let app = App::new("test"); + let app = cmds::NamadaRelayer::add_sub(args::Global::def(app)); + let matches = app.get_matches_from(args.clone()); + let cmd = cmds::NamadaRelayer::parse(&matches) + .expect("Could not parse wallet command"); + rt.block_on(CliApi::<()>::handle_relayer_command(Some(node), cmd)) + } + } +} + +#[async_trait::async_trait(?Send)] +impl<'a> CliClient for &'a MockNode { + fn from_tendermint_address(_: &mut TendermintAddress) -> Self { + unreachable!("MockNode should always be instantiated at test start.") + } + + async fn wait_until_node_is_synced(&self) -> Halt<()> { + ControlFlow::Continue(()) + } +} diff --git a/apps/src/lib/node/ledger/shell/testing/mod.rs b/apps/src/lib/node/ledger/shell/testing/mod.rs new file mode 100644 index 0000000000..fff1df00ba --- /dev/null +++ b/apps/src/lib/node/ledger/shell/testing/mod.rs @@ -0,0 +1,3 @@ +pub mod client; +pub mod node; +pub mod utils; diff --git a/apps/src/lib/node/ledger/shell/testing/node.rs b/apps/src/lib/node/ledger/shell/testing/node.rs new file mode 100644 index 0000000000..a66d33cb78 --- /dev/null +++ b/apps/src/lib/node/ledger/shell/testing/node.rs @@ -0,0 +1,543 @@ +use std::mem::ManuallyDrop; +use std::path::PathBuf; +use std::str::FromStr; +use std::sync::{Arc, Mutex}; + +use color_eyre::eyre::{Report, Result}; +use lazy_static::lazy_static; +use namada::ledger::events::log::dumb_queries; +use namada::ledger::queries::{ + Client, EncodedResponseQuery, RequestCtx, RequestQuery, Router, RPC, +}; +use namada::ledger::storage::{ + LastBlock, Sha256Hasher, EPOCH_SWITCH_BLOCKS_DELAY, +}; +use namada::tendermint_rpc::endpoint::abci_info; +use namada::tendermint_rpc::SimpleRequest; +use namada::types::hash::Hash; +use namada::types::storage::{BlockHash, BlockHeight, Epoch, Header}; +use namada::types::time::DateTimeUtc; +use num_traits::cast::FromPrimitive; +use regex::Regex; +use tokio::sync::mpsc::UnboundedReceiver; + +use crate::facade::tendermint_proto::abci::response_process_proposal::ProposalStatus; +use crate::facade::tendermint_proto::abci::RequestProcessProposal; +use crate::facade::tendermint_rpc::endpoint::abci_info::AbciInfo; +use crate::facade::tendermint_rpc::error::Error as RpcError; +use crate::facade::{tendermint, tendermint_rpc}; +use crate::node::ledger::shell::testing::utils::TestDir; +use crate::node::ledger::shell::{ErrorCodes, Shell}; +use crate::node::ledger::shims::abcipp_shim_types::shim::request::{ + FinalizeBlock, ProcessedTx, +}; +use crate::node::ledger::shims::abcipp_shim_types::shim::response::TxResult; +use crate::node::ledger::storage; + +/// Status of tx +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum NodeResults { + /// Success + Ok, + /// Rejected by Process Proposal + Rejected(TxResult), + /// Failure in application in Finalize Block + Failed(ErrorCodes), +} + +pub struct MockNode { + pub shell: Arc>>, + pub test_dir: ManuallyDrop, + pub keep_temp: bool, + pub _broadcast_recv: UnboundedReceiver>, + pub results: Arc>>, +} + +impl Drop for MockNode { + fn drop(&mut self) { + unsafe { + if !self.keep_temp { + ManuallyDrop::take(&mut self.test_dir).clean_up() + } else { + println!( + "Keeping tempfile at {}", + self.test_dir.path().to_string_lossy() + ); + ManuallyDrop::drop(&mut self.test_dir) + } + } + } +} + +impl MockNode { + pub fn genesis_dir(&self) -> PathBuf { + self.test_dir + .path() + .join(self.shell.lock().unwrap().chain_id.to_string()) + } + + pub fn genesis_path(&self) -> PathBuf { + self.test_dir + .path() + .join(format!("{}.toml", self.shell.lock().unwrap().chain_id)) + } + + pub fn wasm_dir(&self) -> PathBuf { + self.genesis_path().join("wasm") + } + + pub fn wallet_path(&self) -> PathBuf { + self.genesis_dir().join("wallet.toml") + } + + pub fn current_epoch(&self) -> Epoch { + self.shell.lock().unwrap().wl_storage.storage.last_epoch + } + + pub fn next_epoch(&mut self) -> Epoch { + { + let mut locked = self.shell.lock().unwrap(); + + let next_epoch_height = + locked.wl_storage.storage.get_last_block_height() + 1; + locked.wl_storage.storage.next_epoch_min_start_height = + next_epoch_height; + locked.wl_storage.storage.next_epoch_min_start_time = + DateTimeUtc::now(); + let next_epoch_min_start_height = + locked.wl_storage.storage.next_epoch_min_start_height; + if let Some(LastBlock { height, .. }) = + locked.wl_storage.storage.last_block.as_mut() + { + *height = next_epoch_min_start_height; + } + } + self.finalize_and_commit(); + + for _ in 0..EPOCH_SWITCH_BLOCKS_DELAY { + self.finalize_and_commit(); + } + self.shell + .lock() + .unwrap() + .wl_storage + .storage + .get_current_epoch() + .0 + } + + /// Simultaneously call the `FinalizeBlock` and + /// `Commit` handlers. + pub fn finalize_and_commit(&self) { + let mut req = FinalizeBlock { + hash: BlockHash([0u8; 32]), + header: Header { + hash: Hash([0; 32]), + time: DateTimeUtc::now(), + next_validators_hash: Hash([0; 32]), + }, + byzantine_validators: vec![], + txs: vec![], + proposer_address: vec![], + votes: vec![], + }; + req.header.time = DateTimeUtc::now(); + let mut locked = self.shell.lock().unwrap(); + locked.finalize_block(req).expect("Test failed"); + locked.commit(); + } + + /// Advance to a block height that allows + /// txs + fn advance_to_allowed_block(&self) { + loop { + let not_allowed = + { self.shell.lock().unwrap().encrypted_txs_not_allowed() }; + if not_allowed { + self.finalize_and_commit(); + } else { + break; + } + } + } + + /// Send a tx through Process Proposal and Finalize Block + /// and register the results. + fn submit_tx(&self, tx_bytes: Vec) { + let req = RequestProcessProposal { + txs: vec![tx_bytes.clone()], + ..Default::default() + }; + // The block space allocator disallows txs in certain blocks. + // Advance to block height that allows txs. + self.advance_to_allowed_block(); + let mut locked = self.shell.lock().unwrap(); + let mut result = locked.process_proposal(req); + let mut errors: Vec<_> = result + .tx_results + .iter() + .map(|e| { + if e.code == 0 { + NodeResults::Ok + } else { + NodeResults::Rejected(e.clone()) + } + }) + .collect(); + if result.status != i32::from(ProposalStatus::Accept) { + self.results.lock().unwrap().append(&mut errors); + return; + } + + // process proposal succeeded, now run finalize block + let req = FinalizeBlock { + hash: BlockHash([0u8; 32]), + header: Header { + hash: Hash([0; 32]), + time: DateTimeUtc::now(), + next_validators_hash: Hash([0; 32]), + }, + byzantine_validators: vec![], + txs: vec![ProcessedTx { + tx: tx_bytes, + result: result.tx_results.remove(0), + }], + proposer_address: vec![], + votes: vec![], + }; + + // process the results + let resp = locked.finalize_block(req).unwrap(); + let mut error_codes = resp + .events + .into_iter() + .map(|e| { + let code = ErrorCodes::from_u32( + e.attributes + .get("code") + .map(|e| u32::from_str(e).unwrap()) + .unwrap_or_default(), + ) + .unwrap(); + if code == ErrorCodes::Ok { + NodeResults::Ok + } else { + NodeResults::Failed(code) + } + }) + .collect::>(); + self.results.lock().unwrap().append(&mut error_codes); + locked.commit(); + } + + /// Check that applying a tx succeeded. + pub fn success(&self) -> bool { + self.results + .lock() + .unwrap() + .iter() + .all(|r| *r == NodeResults::Ok) + } + + pub fn clear_results(&self) { + self.results.lock().unwrap().clear(); + } + + pub fn assert_success(&self) { + if !self.success() { + panic!( + "Assert failed: The node did not execute \ + successfully:\nErrors:\n {:?}", + self.results.lock().unwrap() + ); + } else { + self.clear_results(); + } + } +} + +#[async_trait::async_trait(?Send)] +impl<'a> Client for &'a MockNode { + type Error = Report; + + async fn request( + &self, + path: String, + data: Option>, + height: Option, + prove: bool, + ) -> std::result::Result { + let rpc = RPC; + let data = data.unwrap_or_default(); + let latest_height = { + self.shell + .lock() + .unwrap() + .wl_storage + .storage + .last_block + .as_ref() + .map(|b| b.height) + .unwrap_or_default() + }; + let height = height.unwrap_or(latest_height); + // Handle a path by invoking the `RPC.handle` directly with the + // borrowed storage + let request = RequestQuery { + data, + path, + height, + prove, + }; + let borrowed = self.shell.lock().unwrap(); + let ctx = RequestCtx { + wl_storage: &borrowed.wl_storage, + event_log: borrowed.event_log(), + vp_wasm_cache: borrowed.vp_wasm_cache.read_only(), + tx_wasm_cache: borrowed.tx_wasm_cache.read_only(), + storage_read_past_height_limit: None, + }; + rpc.handle(ctx, &request).map_err(Report::new) + } + + async fn perform( + &self, + _request: R, + ) -> std::result::Result + where + R: SimpleRequest, + { + unreachable!() + } + + /// `/abci_info`: get information about the ABCI application. + async fn abci_info(&self) -> Result { + let locked = self.shell.lock().unwrap(); + Ok(AbciInfo { + data: "Namada".to_string(), + version: "test".to_string(), + app_version: 0, + last_block_height: locked + .wl_storage + .storage + .last_block + .as_ref() + .map(|b| b.height.0 as u32) + .unwrap_or_default() + .into(), + last_block_app_hash: locked + .wl_storage + .storage + .last_block + .as_ref() + .map(|b| b.hash.0) + .unwrap_or_default() + .to_vec(), + }) + } + + /// `/broadcast_tx_sync`: broadcast a transaction, returning the response + /// from `CheckTx`. + async fn broadcast_tx_sync( + &self, + tx: namada::tendermint::abci::Transaction, + ) -> Result + { + let resp = tendermint_rpc::endpoint::broadcast::tx_sync::Response { + code: Default::default(), + data: Default::default(), + log: Default::default(), + hash: tendermint::abci::transaction::Hash::new([0; 32]), + }; + let tx_bytes: Vec = tx.into(); + self.submit_tx(tx_bytes); + if !self.success() { + return Ok(resp); + } else { + self.clear_results(); + } + let tx_bytes = { + let locked = self.shell.lock().unwrap(); + locked.prepare_proposal(Default::default()).txs.remove(0) + }; + self.submit_tx(tx_bytes); + Ok(resp) + } + + /// `/block_search`: search for blocks by BeginBlock and EndBlock events. + async fn block_search( + &self, + query: namada::tendermint_rpc::query::Query, + _page: u32, + _per_page: u8, + _order: namada::tendermint_rpc::Order, + ) -> Result + { + let matcher = parse_tm_query(query); + let borrowed = self.shell.lock().unwrap(); + // we store an index into the event log as a block + // height in the response of the query... VERY NAISSSE + let matching_events = borrowed.event_log().iter().enumerate().flat_map( + |(index, event)| { + if matcher.matches(event) { + Some(EncodedEvent(index as u64)) + } else { + None + } + }, + ); + let blocks = matching_events + .map(|encoded_event| namada::tendermint_rpc::endpoint::block::Response { + block_id: Default::default(), + block: namada::tendermint_proto::types::Block { + header: Some(namada::tendermint_proto::types::Header { + version: Some(namada::tendermint_proto::version::Consensus { + block: 0, + app: 0, + }), + chain_id: "Namada".try_into().unwrap(), + height: encoded_event.0 as i64, + time: None, + last_block_id: None, + last_commit_hash: vec![], + data_hash: vec![], + validators_hash: vec![], + next_validators_hash: vec![], + consensus_hash: vec![], + app_hash: vec![], + last_results_hash: vec![], + evidence_hash: vec![], + proposer_address: vec![] + + }), + data: Default::default(), + evidence: Default::default(), + last_commit: Some(namada::tendermint_proto::types::Commit { + height: encoded_event.0 as i64, + round: 0, + block_id: Some(namada::tendermint_proto::types::BlockId { + hash: vec![0u8; 32], + part_set_header: Some(namada::tendermint_proto::types::PartSetHeader { + total: 1, + hash: vec![1; 32], + }), + }), + signatures: vec![], + }), + }.try_into().unwrap(), + }) + .collect::>(); + + Ok(namada::tendermint_rpc::endpoint::block_search::Response { + total_count: blocks.len() as u32, + blocks, + }) + } + + /// `/block_results`: get ABCI results for a block at a particular height. + async fn block_results( + &self, + height: H, + ) -> Result + where + H: Into + Send, + { + let height = height.into(); + let encoded_event = EncodedEvent(height.value()); + let locked = self.shell.lock().unwrap(); + let events: Vec<_> = locked + .event_log() + .iter() + .enumerate() + .flat_map(|(index, event)| { + if index == encoded_event.log_index() { + Some(event) + } else { + None + } + }) + .map(|event| namada::tendermint::abci::responses::Event { + type_str: event.event_type.to_string(), + attributes: event + .attributes + .iter() + .map(|(k, v)| namada::tendermint::abci::tag::Tag { + key: k.parse().unwrap(), + value: v.parse().unwrap(), + }) + .collect(), + }) + .collect(); + let has_events = !events.is_empty(); + + Ok(tendermint_rpc::endpoint::block_results::Response { + height, + txs_results: None, + begin_block_events: None, + end_block_events: has_events.then_some(events), + validator_updates: vec![], + consensus_param_updates: None, + }) + } + + /// `/tx_search`: search for transactions with their results. + async fn tx_search( + &self, + _query: namada::tendermint_rpc::query::Query, + _prove: bool, + _page: u32, + _per_page: u8, + _order: namada::tendermint_rpc::Order, + ) -> Result { + // In the past, some cli commands for masp called this. However, these + // commands are not currently supported, so we do not need to fill + // in this function for now. + unreachable!() + } + + /// `/health`: get node health. + /// + /// Returns empty result (200 OK) on success, no response in case of an + /// error. + async fn health(&self) -> Result<(), RpcError> { + Ok(()) + } +} + +/// Parse a Tendermint query. +fn parse_tm_query( + query: namada::tendermint_rpc::query::Query, +) -> dumb_queries::QueryMatcher { + const QUERY_PARSING_REGEX_STR: &str = + r"^tm\.event='NewBlock' AND (accepted|applied)\.hash='([^']+)'$"; + + lazy_static! { + /// Compiled regular expression used to parse Tendermint queries. + static ref QUERY_PARSING_REGEX: Regex = Regex::new(QUERY_PARSING_REGEX_STR).unwrap(); + } + + let query = query.to_string(); + let captures = QUERY_PARSING_REGEX.captures(&query).unwrap(); + + match captures.get(0).unwrap().as_str() { + "accepted" => dumb_queries::QueryMatcher::accepted( + captures.get(1).unwrap().as_str().try_into().unwrap(), + ), + "applied" => dumb_queries::QueryMatcher::applied( + captures.get(1).unwrap().as_str().try_into().unwrap(), + ), + _ => unreachable!("We only query accepted or applied txs"), + } +} + +/// A Namada event log index and event type encoded as +/// a Tendermint block height. +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +struct EncodedEvent(u64); + +impl EncodedEvent { + /// Get the encoded event log index. + const fn log_index(self) -> usize { + self.0 as usize + } +} diff --git a/apps/src/lib/node/ledger/shell/testing/utils.rs b/apps/src/lib/node/ledger/shell/testing/utils.rs new file mode 100644 index 0000000000..e66ead21e7 --- /dev/null +++ b/apps/src/lib/node/ledger/shell/testing/utils.rs @@ -0,0 +1,48 @@ +use std::path::{Path, PathBuf}; + +use tempfile::tempdir; + +/// Namada binaries +#[derive(Debug)] +#[allow(dead_code)] +pub enum Bin { + Node, + Client, + Wallet, + Relayer, +} + +/// A temporary directory for testing +#[derive(Debug)] +pub struct TestDir(PathBuf); + +impl TestDir { + /// Creat a new temp directory. This will have to be manually + /// cleaned up. + pub fn new() -> Self { + let temp = tempdir().unwrap(); + Self(temp.into_path()) + } + + /// Get the path of the directory + pub fn path(&self) -> &Path { + &self.0 + } + + /// Manually remove the test directory from the + /// file system. + pub fn clean_up(self) { + if let Err(e) = std::fs::remove_dir_all(&self.0) { + println!( + "Failed to clean up test dir at {}: {e:?}", + self.0.to_string_lossy() + ); + } + } +} + +impl Default for TestDir { + fn default() -> Self { + Self::new() + } +} diff --git a/apps/src/lib/node/ledger/shell/vote_extensions/bridge_pool_vext.rs b/apps/src/lib/node/ledger/shell/vote_extensions/bridge_pool_vext.rs index 3de6e03c0c..edd83cdb3a 100644 --- a/apps/src/lib/node/ledger/shell/vote_extensions/bridge_pool_vext.rs +++ b/apps/src/lib/node/ledger/shell/vote_extensions/bridge_pool_vext.rs @@ -176,7 +176,7 @@ where /// Takes an iterator over Bridge pool root vote extension instances, /// and returns another iterator. The latter yields /// valid Brige pool root vote extensions, or the reason why these - /// are invalid, in the form of a [`VoteExtensionError`]. + /// are invalid, in the form of a `VoteExtensionError`. #[inline] pub fn validate_bp_roots_vext_list<'iter>( &'iter self, diff --git a/apps/src/lib/node/ledger/shell/vote_extensions/eth_events.rs b/apps/src/lib/node/ledger/shell/vote_extensions/eth_events.rs index c836ecbbc5..891a403f90 100644 --- a/apps/src/lib/node/ledger/shell/vote_extensions/eth_events.rs +++ b/apps/src/lib/node/ledger/shell/vote_extensions/eth_events.rs @@ -308,7 +308,7 @@ where /// Takes an iterator over Ethereum events vote extension instances, /// and returns another iterator. The latter yields /// valid Ethereum events vote extensions, or the reason why these - /// are invalid, in the form of a [`VoteExtensionError`]. + /// are invalid, in the form of a `VoteExtensionError`. #[inline] pub fn validate_eth_events_vext_list<'iter>( &'iter self, diff --git a/apps/src/lib/node/ledger/shell/vote_extensions/val_set_update.rs b/apps/src/lib/node/ledger/shell/vote_extensions/val_set_update.rs index c491c5d6d2..aa8183d9aa 100644 --- a/apps/src/lib/node/ledger/shell/vote_extensions/val_set_update.rs +++ b/apps/src/lib/node/ledger/shell/vote_extensions/val_set_update.rs @@ -161,7 +161,7 @@ where /// Takes an iterator over validator set update vote extension instances, /// and returns another iterator. The latter yields /// valid validator set update vote extensions, or the reason why these - /// are invalid, in the form of a [`VoteExtensionError`]. + /// are invalid, in the form of a `VoteExtensionError`. #[inline] pub fn validate_valset_upd_vext_list( &self, diff --git a/apps/src/lib/node/ledger/shims/abcipp_shim_types.rs b/apps/src/lib/node/ledger/shims/abcipp_shim_types.rs index 331aaeeeba..ca7be9a9e5 100644 --- a/apps/src/lib/node/ledger/shims/abcipp_shim_types.rs +++ b/apps/src/lib/node/ledger/shims/abcipp_shim_types.rs @@ -306,7 +306,7 @@ pub mod shim { #[derive(Debug, Default)] pub struct VerifyHeader; - #[derive(Debug, Default, Clone)] + #[derive(Debug, Default, Clone, PartialEq, Eq)] pub struct TxResult { pub code: u32, pub info: String, diff --git a/apps/src/lib/wallet/cli_utils.rs b/apps/src/lib/wallet/cli_utils.rs new file mode 100644 index 0000000000..ffaf080841 --- /dev/null +++ b/apps/src/lib/wallet/cli_utils.rs @@ -0,0 +1,515 @@ +use std::fs::File; +use std::io::{self, Write}; + +use borsh::BorshSerialize; +use itertools::sorted; +use masp_primitives::zip32::ExtendedFullViewingKey; +use namada::ledger::masp::find_valid_diversifier; +use namada::ledger::wallet::{DecryptionError, FindKeyError}; +use namada::types::key::{PublicKeyHash, RefTo}; +use namada::types::masp::{MaspValue, PaymentAddress}; +use rand_core::OsRng; + +use crate::cli; +use crate::cli::{args, Context}; +use crate::wallet::{read_and_confirm_encryption_password, CliWalletUtils}; + +/// Find shielded address or key +pub fn address_key_find( + ctx: Context, + args::AddrKeyFind { + alias, + unsafe_show_secret, + }: args::AddrKeyFind, +) { + let mut wallet = ctx.wallet; + let alias = alias.to_lowercase(); + if let Ok(viewing_key) = wallet.find_viewing_key(&alias) { + // Check if alias is a viewing key + println!("Viewing key: {}", viewing_key); + if unsafe_show_secret { + // Check if alias is also a spending key + match wallet.find_spending_key(&alias, None) { + Ok(spending_key) => println!("Spending key: {}", spending_key), + Err(FindKeyError::KeyNotFound) => {} + Err(err) => eprintln!("{}", err), + } + } + } else if let Some(payment_addr) = wallet.find_payment_addr(&alias) { + // Failing that, check if alias is a payment address + println!("Payment address: {}", payment_addr); + } else { + // Otherwise alias cannot be referring to any shielded value + println!( + "No shielded address or key with alias {} found. Use the commands \ + `masp list-addrs` and `masp list-keys` to see all the known \ + addresses and keys.", + alias.to_lowercase() + ); + } +} + +/// List spending keys. +pub fn spending_keys_list( + ctx: Context, + args::MaspKeysList { + decrypt, + unsafe_show_secret, + }: args::MaspKeysList, +) { + let wallet = ctx.wallet; + let known_view_keys = wallet.get_viewing_keys(); + let known_spend_keys = wallet.get_spending_keys(); + if known_view_keys.is_empty() { + println!( + "No known keys. Try `masp add --alias my-addr --value ...` to add \ + a new key to the wallet." + ); + } else { + let stdout = std::io::stdout(); + let mut w = stdout.lock(); + writeln!(w, "Known keys:").unwrap(); + for (alias, key) in known_view_keys { + write!(w, " Alias \"{}\"", alias).unwrap(); + let spending_key_opt = known_spend_keys.get(&alias); + // If this alias is associated with a spending key, indicate whether + // or not the spending key is encrypted + // TODO: consider turning if let into match + if let Some(spending_key) = spending_key_opt { + if spending_key.is_encrypted() { + writeln!(w, " (encrypted):") + } else { + writeln!(w, " (not encrypted):") + } + .unwrap(); + } else { + writeln!(w, ":").unwrap(); + } + // Always print the corresponding viewing key + writeln!(w, " Viewing Key: {}", key).unwrap(); + // A subset of viewing keys will have corresponding spending keys. + // Print those too if they are available and requested. + if unsafe_show_secret { + if let Some(spending_key) = spending_key_opt { + match spending_key.get::(decrypt, None) { + // Here the spending key is unencrypted or successfully + // decrypted + Ok(spending_key) => { + writeln!(w, " Spending key: {}", spending_key) + .unwrap(); + } + // Here the key is encrypted but decryption has not been + // requested + Err(DecryptionError::NotDecrypting) if !decrypt => { + continue; + } + // Here the key is encrypted but incorrect password has + // been provided + Err(err) => { + writeln!( + w, + " Couldn't decrypt the spending key: {}", + err + ) + .unwrap(); + } + } + } + } + } + } +} + +/// List payment addresses. +pub fn payment_addresses_list(ctx: Context) { + let wallet = ctx.wallet; + let known_addresses = wallet.get_payment_addrs(); + if known_addresses.is_empty() { + println!( + "No known payment addresses. Try `masp gen-addr --alias my-addr` \ + to generate a new payment address." + ); + } else { + let stdout = std::io::stdout(); + let mut w = stdout.lock(); + writeln!(w, "Known payment addresses:").unwrap(); + for (alias, address) in sorted(known_addresses) { + writeln!(w, " \"{}\": {}", alias, address).unwrap(); + } + } +} + +/// Generate a spending key. +pub fn spending_key_gen( + ctx: Context, + args::MaspSpendKeyGen { + alias, + alias_force, + unsafe_dont_encrypt, + }: args::MaspSpendKeyGen, +) { + let mut wallet = ctx.wallet; + let alias = alias.to_lowercase(); + let password = read_and_confirm_encryption_password(unsafe_dont_encrypt); + let (alias, _key) = wallet.gen_spending_key(alias, password, alias_force); + crate::wallet::save(&wallet).unwrap_or_else(|err| eprintln!("{}", err)); + println!( + "Successfully added a spending key with alias: \"{}\"", + alias + ); +} + +/// Generate a shielded payment address from the given key. +pub fn payment_address_gen( + ctx: Context, + args::MaspPayAddrGen { + alias, + alias_force, + viewing_key, + pin, + }: args::MaspPayAddrGen, +) { + let alias = alias.to_lowercase(); + let viewing_key = ExtendedFullViewingKey::from(viewing_key).fvk.vk; + let (div, _g_d) = find_valid_diversifier(&mut OsRng); + let payment_addr = viewing_key + .to_payment_address(div) + .expect("a PaymentAddress"); + let mut wallet = ctx.wallet; + let alias = wallet + .insert_payment_addr( + alias, + PaymentAddress::from(payment_addr).pinned(pin), + alias_force, + ) + .unwrap_or_else(|| { + eprintln!("Payment address not added"); + cli::safe_exit(1); + }); + crate::wallet::save(&wallet).unwrap_or_else(|err| eprintln!("{}", err)); + println!( + "Successfully generated a payment address with the following alias: {}", + alias, + ); +} + +/// Add a viewing key, spending key, or payment address to wallet. +pub fn address_key_add( + mut ctx: Context, + args::MaspAddrKeyAdd { + alias, + alias_force, + value, + unsafe_dont_encrypt, + }: args::MaspAddrKeyAdd, +) { + let alias = alias.to_lowercase(); + let (alias, typ) = match value { + MaspValue::FullViewingKey(viewing_key) => { + let alias = ctx + .wallet + .insert_viewing_key(alias, viewing_key, alias_force) + .unwrap_or_else(|| { + eprintln!("Viewing key not added"); + cli::safe_exit(1); + }); + (alias, "viewing key") + } + MaspValue::ExtendedSpendingKey(spending_key) => { + let password = + read_and_confirm_encryption_password(unsafe_dont_encrypt); + let alias = ctx + .wallet + .encrypt_insert_spending_key( + alias, + spending_key, + password, + alias_force, + ) + .unwrap_or_else(|| { + eprintln!("Spending key not added"); + cli::safe_exit(1); + }); + (alias, "spending key") + } + MaspValue::PaymentAddress(payment_addr) => { + let alias = ctx + .wallet + .insert_payment_addr(alias, payment_addr, alias_force) + .unwrap_or_else(|| { + eprintln!("Payment address not added"); + cli::safe_exit(1); + }); + (alias, "payment address") + } + }; + crate::wallet::save(&ctx.wallet).unwrap_or_else(|err| eprintln!("{}", err)); + println!( + "Successfully added a {} with the following alias to wallet: {}", + typ, alias, + ); +} + +/// Restore a keypair and an implicit address from the mnemonic code in the +/// wallet. +pub fn key_and_address_restore( + ctx: Context, + args::KeyAndAddressRestore { + scheme, + alias, + alias_force, + unsafe_dont_encrypt, + derivation_path, + }: args::KeyAndAddressRestore, +) { + let mut wallet = ctx.wallet; + let encryption_password = + read_and_confirm_encryption_password(unsafe_dont_encrypt); + let (alias, _key) = wallet + .derive_key_from_user_mnemonic_code( + scheme, + alias, + alias_force, + derivation_path, + encryption_password, + ) + .unwrap_or_else(|err| { + eprintln!("{}", err); + cli::safe_exit(1) + }) + .unwrap_or_else(|| { + println!("No changes are persisted. Exiting."); + cli::safe_exit(0); + }); + crate::wallet::save(&wallet).unwrap_or_else(|err| eprintln!("{}", err)); + println!( + "Successfully added a key and an address with alias: \"{}\"", + alias + ); +} + +/// Generate a new keypair and derive implicit address from it and store them in +/// the wallet. +pub fn key_and_address_gen( + ctx: Context, + args::KeyAndAddressGen { + scheme, + alias, + alias_force, + unsafe_dont_encrypt, + derivation_path, + }: args::KeyAndAddressGen, +) { + let mut wallet = ctx.wallet; + let encryption_password = + read_and_confirm_encryption_password(unsafe_dont_encrypt); + let mut rng = OsRng; + let derivation_path_and_mnemonic_rng = + derivation_path.map(|p| (p, &mut rng)); + let (alias, _key) = wallet + .gen_key( + scheme, + alias, + alias_force, + encryption_password, + derivation_path_and_mnemonic_rng, + ) + .unwrap_or_else(|err| { + eprintln!("{}", err); + cli::safe_exit(1); + }) + .unwrap_or_else(|| { + println!("No changes are persisted. Exiting."); + cli::safe_exit(0); + }); + crate::wallet::save(&wallet).unwrap_or_else(|err| eprintln!("{}", err)); + println!( + "Successfully added a key and an address with alias: \"{}\"", + alias + ); +} + +/// Find a keypair in the wallet store. +pub fn key_find( + ctx: Context, + args::KeyFind { + public_key, + alias, + value, + unsafe_show_secret, + }: args::KeyFind, +) { + let mut wallet = ctx.wallet; + let found_keypair = match public_key { + Some(pk) => wallet.find_key_by_pk(&pk, None), + None => { + let alias = alias.or(value); + match alias { + None => { + eprintln!( + "An alias, public key or public key hash needs to be \ + supplied" + ); + cli::safe_exit(1) + } + Some(alias) => wallet.find_key(alias.to_lowercase(), None), + } + } + }; + match found_keypair { + Ok(keypair) => { + let pkh: PublicKeyHash = (&keypair.ref_to()).into(); + println!("Public key hash: {}", pkh); + println!("Public key: {}", keypair.ref_to()); + if unsafe_show_secret { + println!("Secret key: {}", keypair); + } + } + Err(err) => { + eprintln!("{}", err); + } + } +} + +/// List all known keys. +pub fn key_list( + ctx: Context, + args::KeyList { + decrypt, + unsafe_show_secret, + }: args::KeyList, +) { + let wallet = ctx.wallet; + let known_keys = wallet.get_keys(); + if known_keys.is_empty() { + println!( + "No known keys. Try `key gen --alias my-key` to generate a new \ + key." + ); + } else { + let stdout = io::stdout(); + let mut w = stdout.lock(); + writeln!(w, "Known keys:").unwrap(); + for (alias, (stored_keypair, pkh)) in known_keys { + let encrypted = if stored_keypair.is_encrypted() { + "encrypted" + } else { + "not encrypted" + }; + writeln!(w, " Alias \"{}\" ({}):", alias, encrypted).unwrap(); + if let Some(pkh) = pkh { + writeln!(w, " Public key hash: {}", pkh).unwrap(); + } + match stored_keypair.get::(decrypt, None) { + Ok(keypair) => { + writeln!(w, " Public key: {}", keypair.ref_to()) + .unwrap(); + if unsafe_show_secret { + writeln!(w, " Secret key: {}", keypair).unwrap(); + } + } + Err(DecryptionError::NotDecrypting) if !decrypt => { + continue; + } + Err(err) => { + writeln!(w, " Couldn't decrypt the keypair: {}", err) + .unwrap(); + } + } + } + } +} + +/// Export a keypair to a file. +pub fn key_export(ctx: Context, args::KeyExport { alias }: args::KeyExport) { + let mut wallet = ctx.wallet; + wallet + .find_key(alias.to_lowercase(), None) + .map(|keypair| { + let file_data = keypair + .try_to_vec() + .expect("Encoding keypair shouldn't fail"); + let file_name = format!("key_{}", alias.to_lowercase()); + let mut file = File::create(&file_name).unwrap(); + + file.write_all(file_data.as_ref()).unwrap(); + println!("Exported to file {}", file_name); + }) + .unwrap_or_else(|err| { + eprintln!("{}", err); + cli::safe_exit(1) + }) +} + +/// List all known addresses. +pub fn address_list(ctx: Context) { + let wallet = ctx.wallet; + let known_addresses = wallet.get_addresses(); + if known_addresses.is_empty() { + println!( + "No known addresses. Try `address gen --alias my-addr` to \ + generate a new implicit address." + ); + } else { + let stdout = io::stdout(); + let mut w = stdout.lock(); + writeln!(w, "Known addresses:").unwrap(); + for (alias, address) in sorted(known_addresses) { + writeln!(w, " \"{}\": {}", alias, address.to_pretty_string()) + .unwrap(); + } + } +} + +/// Find address (alias) by its alias (address). +pub fn address_or_alias_find(ctx: Context, args: args::AddressOrAliasFind) { + let wallet = ctx.wallet; + if args.address.is_some() && args.alias.is_some() { + panic!( + "This should not be happening: clap should emit its own error \ + message." + ); + } else if args.alias.is_some() { + if let Some(address) = wallet.find_address(args.alias.as_ref().unwrap()) + { + println!("Found address {}", address.to_pretty_string()); + } else { + println!( + "No address with alias {} found. Use the command `address \ + list` to see all the known addresses.", + args.alias.unwrap().to_lowercase() + ); + } + } else if args.address.is_some() { + if let Some(alias) = wallet.find_alias(args.address.as_ref().unwrap()) { + println!("Found alias {}", alias); + } else { + println!( + "No alias with address {} found. Use the command `address \ + list` to see all the known addresses.", + args.address.unwrap() + ); + } + } +} + +/// Add an address to the wallet. +pub fn address_add(ctx: Context, args: args::AddressAdd) { + let mut wallet = ctx.wallet; + if wallet + .add_address( + args.alias.clone().to_lowercase(), + args.address, + args.alias_force, + ) + .is_none() + { + eprintln!("Address not added"); + cli::safe_exit(1); + } + crate::wallet::save(&wallet).unwrap_or_else(|err| eprintln!("{}", err)); + println!( + "Successfully added a key and an address with alias: \"{}\"", + args.alias.to_lowercase() + ); +} diff --git a/apps/src/lib/wallet/mod.rs b/apps/src/lib/wallet/mod.rs index 32d2ab6eac..464d276ecc 100644 --- a/apps/src/lib/wallet/mod.rs +++ b/apps/src/lib/wallet/mod.rs @@ -1,3 +1,4 @@ +pub mod cli_utils; pub mod defaults; pub mod pre_genesis; mod store; diff --git a/encoding_spec/Cargo.toml b/encoding_spec/Cargo.toml index 8ac5dc567d..61fe37995d 100644 --- a/encoding_spec/Cargo.toml +++ b/encoding_spec/Cargo.toml @@ -22,5 +22,5 @@ abciplus = [ namada = {path = "../shared"} borsh.workspace = true itertools.workspace = true -lazy_static = "1.4.0" +lazy_static.workspace = true madato = "0.5.3" diff --git a/shared/src/ledger/events/log.rs b/shared/src/ledger/events/log.rs index 931f0088c4..a2dc3978d0 100644 --- a/shared/src/ledger/events/log.rs +++ b/shared/src/ledger/events/log.rs @@ -67,6 +67,12 @@ impl EventLog { /// Returns a new iterator over this [`EventLog`]. #[inline] + pub fn iter(&self) -> impl Iterator { + self.queue.iter() + } + + /// Returns a filtering iterator over this [`EventLog`]. + #[inline] pub fn iter_with_matcher( &self, matcher: dumb_queries::QueryMatcher, diff --git a/shared/src/ledger/queries/types.rs b/shared/src/ledger/queries/types.rs index 720b1ce7d6..78f136cad2 100644 --- a/shared/src/ledger/queries/types.rs +++ b/shared/src/ledger/queries/types.rs @@ -108,7 +108,7 @@ pub trait Client { ) -> Result; /// `/abci_info`: get information about the ABCI application. - async fn abci_info(&self) -> Result { + async fn abci_info(&self) -> Result { Ok(self.perform(abci_info::Request).await?.response) } @@ -271,7 +271,7 @@ pub trait Client { /// /// Returns empty result (200 OK) on success, no response in case of an /// error. - async fn health(&self) -> Result<(), Error> { + async fn health(&self) -> Result<(), RpcError> { self.perform(health::Request).await?; Ok(()) } diff --git a/shared/src/ledger/tx.rs b/shared/src/ledger/tx.rs index 5beb8d5746..e041aea2c8 100644 --- a/shared/src/ledger/tx.rs +++ b/shared/src/ledger/tx.rs @@ -18,7 +18,7 @@ use masp_primitives::transaction::components::Amount; use namada_core::types::address::{masp, masp_tx_key, Address}; use namada_core::types::dec::Dec; use namada_core::types::storage::Key; -use namada_core::types::token::MaspDenom; +use namada_core::types::token::{MaspDenom, TokenAddress}; use namada_proof_of_stake::parameters::PosParams; use namada_proof_of_stake::types::{CommissionPair, ValidatorState}; use prost::EncodeError; @@ -35,7 +35,10 @@ use crate::ibc_proto::cosmos::base::v1beta1::Coin; use crate::ledger::args::{self, InputAmount}; use crate::ledger::governance::storage as gov_storage; use crate::ledger::masp::{ShieldedContext, ShieldedUtils}; -use crate::ledger::rpc::{self, validate_amount, TxBroadcastData, TxResponse}; +use crate::ledger::rpc::{ + self, format_denominated_amount, validate_amount, TxBroadcastData, + TxResponse, +}; use crate::ledger::signing::{tx_signer, wrap_tx, TxSigningKey}; use crate::ledger::wallet::{Wallet, WalletUtils}; use crate::proto::{Code, Data, MaspBuilder, Section, Tx}; @@ -1109,7 +1112,10 @@ pub async fn build_bond< // TODO Should we state the same error message for the native token? check_balance_too_low_err( - &args.native_token, + &TokenAddress { + address: args.native_token, + sub_prefix: None, + }, bond_source, args.amount, balance_key, @@ -1210,7 +1216,10 @@ pub async fn build_ibc_transfer< }; check_balance_too_low_err( - &token, + &TokenAddress { + address: token.clone(), + sub_prefix: sub_prefix.clone(), + }, &source, args.amount, balance_key, @@ -1421,9 +1430,15 @@ pub async fn build_transfer< args.amount = InputAmount::Validated(validated_amount); args.tx.fee_amount = InputAmount::Validated(validate_fee); - + let sub_prefix = args + .sub_prefix + .as_ref() + .map(|k| k.parse().expect("Could not parse multi-token sub-prefix")); check_balance_too_low_err::( - &token, + &TokenAddress { + address: token.clone(), + sub_prefix: sub_prefix.clone(), + }, &source, validated_amount.amount, balance_key, @@ -1852,7 +1867,7 @@ async fn target_exists_or_err( /// given amount, along with the balance even existing. force /// overrides this async fn check_balance_too_low_err( - token: &Address, + token: &TokenAddress, source: &Address, amount: token::Amount, balance_key: storage::Key, @@ -1871,14 +1886,14 @@ async fn check_balance_too_low_err( transfer is {} and the balance is {}.", source, token, - amount.to_string_native(), - balance.to_string_native() + format_denominated_amount(client, token, amount).await, + format_denominated_amount(client, token, balance).await, ); Ok(()) } else { Err(Error::BalanceTooLow( source.clone(), - token.clone(), + token.address.clone(), amount.to_string_native(), balance.to_string_native(), )) @@ -1895,7 +1910,10 @@ async fn check_balance_too_low_err( ); Ok(()) } else { - Err(Error::NoBalanceForToken(source.clone(), token.clone())) + Err(Error::NoBalanceForToken( + source.clone(), + token.address.clone(), + )) } } } diff --git a/tests/Cargo.toml b/tests/Cargo.toml index b36bfcabb6..65c0d306f3 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -25,6 +25,7 @@ abciplus = [ "namada_tx_prelude/abciplus", "namada_apps/abciplus" ] + wasm-runtime = ["namada/wasm-runtime"] [dependencies] @@ -33,12 +34,16 @@ namada_core = {path = "../core", features = ["testing"]} namada_test_utils = {path = "../test_utils"} namada_vp_prelude = {path = "../vp_prelude"} namada_tx_prelude = {path = "../tx_prelude"} +async-trait.workspace = true chrono.workspace = true +clap.workspace = true concat-idents.workspace = true derivative.workspace = true hyper = {version = "0.14.20", features = ["full"]} ibc-relayer-types.workspace = true ibc-relayer.workspace = true +lazy_static.workspace = true +num-traits.workspace = true prost.workspace = true regex.workspace = true serde_json.workspace = true diff --git a/tests/src/e2e/ledger_tests.rs b/tests/src/e2e/ledger_tests.rs index 9bcd3f098f..f726f6d70d 100644 --- a/tests/src/e2e/ledger_tests.rs +++ b/tests/src/e2e/ledger_tests.rs @@ -19,25 +19,23 @@ use std::time::{Duration, Instant}; use borsh::BorshSerialize; use color_eyre::eyre::Result; use data_encoding::HEXLOWER; -use namada::types::address::{btc, eth, masp_rewards, Address}; +use namada::types::address::Address; use namada::types::governance::ProposalType; use namada::types::storage::Epoch; use namada::types::token; -use namada_apps::client::tx::CLIShieldedUtils; use namada_apps::config::ethereum_bridge; use namada_apps::config::genesis::genesis_config::{ GenesisConfig, ParametersConfig, PosParamsConfig, }; use namada_apps::config::utils::convert_tm_addr_to_socket_addr; use namada_apps::facade::tendermint_config::net::Address as TendermintAddress; -use namada_core::types::token::{DenominatedAmount, NATIVE_MAX_DECIMAL_PLACES}; use namada_test_utils::TestWasms; use serde_json::json; use setup::constants::*; use setup::Test; use super::helpers::{ - get_height, is_debug_mode, wait_for_block_height, wait_for_wasm_pre_compile, + get_height, wait_for_block_height, wait_for_wasm_pre_compile, }; use super::setup::{get_all_wasms_hashes, set_ethereum_bridge_mode, NamadaCmd}; use crate::e2e::helpers::{ @@ -652,1215 +650,6 @@ fn ledger_txs_and_queries() -> Result<()> { Ok(()) } -/// In this test we: -/// 1. Run the ledger node -/// 2. Attempt to spend 10 BTC at SK(A) to PA(B) -/// 3. Attempt to spend 15 BTC at SK(A) to Bertha -/// 4. Send 20 BTC from Albert to PA(A) -/// 5. Attempt to spend 10 ETH at SK(A) to PA(B) -/// 6. Spend 7 BTC at SK(A) to PA(B) -/// 7. Spend 7 BTC at SK(A) to PA(B) -/// 8. Attempt to spend 7 BTC at SK(A) to PA(B) -/// 9. Spend 6 BTC at SK(A) to PA(B) -/// 10. Assert BTC balance at VK(A) is 0 -/// 11. Assert ETH balance at VK(A) is 0 -/// 12. Assert balance at VK(B) is 10 BTC -/// 13. Send 10 BTC from SK(B) to Bertha - -#[test] -fn masp_txs_and_queries() -> Result<()> { - // Download the shielded pool parameters before starting node - let _ = CLIShieldedUtils::new(PathBuf::new()); - // Lengthen epoch to ensure that a transaction can be constructed and - // submitted within the same block. Necessary to ensure that conversion is - // not invalidated. - let test = setup::network( - |genesis| { - let parameters = ParametersConfig { - epochs_per_year: epochs_per_year_from_min_duration( - if is_debug_mode() { 3600 } else { 360 }, - ), - min_num_of_blocks: 1, - ..genesis.parameters - }; - GenesisConfig { - parameters, - ..genesis - } - }, - None, - )?; - set_ethereum_bridge_mode( - &test, - &test.net.chain_id, - &Who::Validator(0), - ethereum_bridge::ledger::Mode::Off, - None, - ); - - // 1. Run the ledger node - let _bg_ledger = - start_namada_ledger_node_wait_wasm(&test, Some(0), Some(40))? - .background(); - - let validator_one_rpc = get_actor_rpc(&test, &Who::Validator(0)); - - let _ep1 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - let txs_args = vec![ - // 2. Attempt to spend 10 BTC at SK(A) to PA(B) - ( - vec![ - "transfer", - "--source", - A_SPENDING_KEY, - "--target", - AB_PAYMENT_ADDRESS, - "--token", - BTC, - "--amount", - "10", - "--node", - &validator_one_rpc, - ], - "No balance found", - ), - // 3. Attempt to spend 15 BTC at SK(A) to Bertha - ( - vec![ - "transfer", - "--source", - A_SPENDING_KEY, - "--target", - BERTHA, - "--token", - BTC, - "--amount", - "15", - "--node", - &validator_one_rpc, - ], - "No balance found", - ), - // 4. Send 20 BTC from Albert to PA(A) - ( - vec![ - "transfer", - "--source", - ALBERT, - "--target", - AA_PAYMENT_ADDRESS, - "--token", - BTC, - "--amount", - "20", - "--node", - &validator_one_rpc, - ], - "Transaction is valid", - ), - // 5. Attempt to spend 10 ETH at SK(A) to PA(B) - ( - vec![ - "transfer", - "--source", - A_SPENDING_KEY, - "--target", - AB_PAYMENT_ADDRESS, - "--token", - ETH, - "--amount", - "10", - "--node", - &validator_one_rpc, - ], - "No balance found", - ), - // 6. Spend 7 BTC at SK(A) to PA(B) - ( - vec![ - "transfer", - "--source", - A_SPENDING_KEY, - "--target", - AB_PAYMENT_ADDRESS, - "--token", - BTC, - "--amount", - "7", - "--node", - &validator_one_rpc, - ], - "Transaction is valid", - ), - // 7. Spend 7 BTC at SK(A) to PA(B) - ( - vec![ - "transfer", - "--source", - A_SPENDING_KEY, - "--target", - BB_PAYMENT_ADDRESS, - "--token", - BTC, - "--amount", - "7", - "--node", - &validator_one_rpc, - ], - "Transaction is valid", - ), - // 8. Attempt to spend 7 BTC at SK(A) to PA(B) - ( - vec![ - "transfer", - "--source", - A_SPENDING_KEY, - "--target", - BB_PAYMENT_ADDRESS, - "--token", - BTC, - "--amount", - "7", - "--node", - &validator_one_rpc, - ], - "is lower than the amount to be transferred and fees", - ), - // 9. Spend 6 BTC at SK(A) to PA(B) - ( - vec![ - "transfer", - "--source", - A_SPENDING_KEY, - "--target", - BB_PAYMENT_ADDRESS, - "--token", - BTC, - "--amount", - "6", - "--node", - &validator_one_rpc, - ], - "Transaction is valid", - ), - // 10. Assert BTC balance at VK(A) is 0 - ( - vec![ - "balance", - "--owner", - AA_VIEWING_KEY, - "--token", - BTC, - "--node", - &validator_one_rpc, - ], - "No shielded btc balance found", - ), - // 11. Assert ETH balance at VK(A) is 0 - ( - vec![ - "balance", - "--owner", - AA_VIEWING_KEY, - "--token", - ETH, - "--node", - &validator_one_rpc, - ], - "No shielded eth balance found", - ), - // 12. Assert balance at VK(B) is 10 BTC - ( - vec![ - "balance", - "--owner", - AB_VIEWING_KEY, - "--node", - &validator_one_rpc, - ], - "btc : 20", - ), - // 13. Send 10 BTC from SK(B) to Bertha - ( - vec![ - "transfer", - "--source", - B_SPENDING_KEY, - "--target", - BERTHA, - "--token", - BTC, - "--amount", - "20", - "--node", - &validator_one_rpc, - ], - "Transaction is valid", - ), - ]; - - for (tx_args, tx_result) in &txs_args { - for &dry_run in &[true, false] { - let tx_args = if dry_run && tx_args[0] == "transfer" { - vec![tx_args.clone(), vec!["--dry-run"]].concat() - } else { - tx_args.clone() - }; - let mut client = run!(test, Bin::Client, tx_args, Some(720))?; - - if *tx_result == "Transaction is valid" && !dry_run { - client.exp_string("Transaction accepted")?; - client.exp_string("Transaction applied")?; - } - client.exp_string(tx_result)?; - } - } - - Ok(()) -} - -/// In this test we: -/// 1. Run the ledger node -/// 2. Assert PPA(C) cannot be recognized by incorrect viewing key -/// 3. Assert PPA(C) has not transaction pinned to it -/// 4. Send 20 BTC from Albert to PPA(C) -/// 5. Assert PPA(C) has the 20 BTC transaction pinned to it - -#[test] -fn masp_pinned_txs() -> Result<()> { - // Download the shielded pool parameters before starting node - let _ = CLIShieldedUtils::new(PathBuf::new()); - // Lengthen epoch to ensure that a transaction can be constructed and - // submitted within the same block. Necessary to ensure that conversion is - // not invalidated. - let test = setup::network( - |genesis| { - let parameters = ParametersConfig { - epochs_per_year: epochs_per_year_from_min_duration(120), - ..genesis.parameters - }; - GenesisConfig { - parameters, - ..genesis - } - }, - None, - )?; - set_ethereum_bridge_mode( - &test, - &test.net.chain_id, - &Who::Validator(0), - ethereum_bridge::ledger::Mode::Off, - None, - ); - - // 1. Run the ledger node - let _bg_ledger = - start_namada_ledger_node_wait_wasm(&test, Some(0), Some(40))? - .background(); - - let validator_one_rpc = get_actor_rpc(&test, &Who::Validator(0)); - - // Wait till epoch boundary - let _ep0 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Assert PPA(C) cannot be recognized by incorrect viewing key - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AC_PAYMENT_ADDRESS, - "--token", - BTC, - "--node", - &validator_one_rpc - ], - Some(300) - )?; - client.send_line(AB_VIEWING_KEY)?; - client.exp_string("Supplied viewing key cannot decode transactions to")?; - client.assert_success(); - - // Assert PPA(C) has no transaction pinned to it - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AC_PAYMENT_ADDRESS, - "--token", - BTC, - "--node", - &validator_one_rpc - ], - Some(300) - )?; - client.send_line(AC_VIEWING_KEY)?; - client.exp_string("has not yet been consumed")?; - client.assert_success(); - - // Wait till epoch boundary - let _ep1 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Send 20 BTC from Albert to PPA(C) - let mut client = run!( - test, - Bin::Client, - vec![ - "transfer", - "--source", - ALBERT, - "--target", - AC_PAYMENT_ADDRESS, - "--token", - BTC, - "--amount", - "20", - "--node", - &validator_one_rpc - ], - Some(300) - )?; - client.exp_string("Transaction accepted")?; - client.exp_string("Transaction applied")?; - client.exp_string("Transaction is valid")?; - client.assert_success(); - - // Wait till epoch boundary - // This makes it more consistent for some reason? - let _ep2 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Assert PPA(C) has the 20 BTC transaction pinned to it - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AC_PAYMENT_ADDRESS, - "--token", - BTC, - "--node", - &validator_one_rpc - ], - Some(300) - )?; - client.send_line(AC_VIEWING_KEY)?; - client.exp_string("Received 20 btc")?; - client.assert_success(); - - // Assert PPA(C) has no NAM pinned to it - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AC_PAYMENT_ADDRESS, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(300) - )?; - client.send_line(AC_VIEWING_KEY)?; - client.exp_string("Received no shielded nam")?; - client.assert_success(); - - // Wait till epoch boundary - let _ep1 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Assert PPA(C) does not NAM pinned to it on epoch boundary - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AC_PAYMENT_ADDRESS, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(300) - )?; - client.send_line(AC_VIEWING_KEY)?; - client.exp_string("Received no shielded nam")?; - client.assert_success(); - - Ok(()) -} - -/// In this test we verify that users of the MASP receive the correct rewards -/// for leaving their assets in the pool for varying periods of time. - -#[test] -fn masp_incentives() -> Result<()> { - // The number of decimal places used by BTC amounts. - const BTC_DENOMINATION: u8 = 8; - // The number of decimal places used by ETH amounts. - const ETH_DENOMINATION: u8 = 18; - // Download the shielded pool parameters before starting node - let _ = CLIShieldedUtils::new(PathBuf::new()); - // Lengthen epoch to ensure that a transaction can be constructed and - // submitted within the same block. Necessary to ensure that conversion is - // not invalidated. - let test = setup::network( - |genesis| { - let parameters = ParametersConfig { - epochs_per_year: epochs_per_year_from_min_duration( - if is_debug_mode() { 340 } else { 85 }, - ), - min_num_of_blocks: 1, - ..genesis.parameters - }; - GenesisConfig { - parameters, - ..genesis - } - }, - None, - )?; - set_ethereum_bridge_mode( - &test, - &test.net.chain_id, - &Who::Validator(0), - ethereum_bridge::ledger::Mode::Off, - None, - ); - - // 1. Run the ledger node - let _bg_ledger = - start_namada_ledger_node_wait_wasm(&test, Some(0), Some(40))? - .background(); - - let validator_one_rpc = get_actor_rpc(&test, &Who::Validator(0)); - - // Wait till epoch boundary - let ep0 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Send 20 BTC from Albert to PA(A) - let mut client = run!( - test, - Bin::Client, - vec![ - "transfer", - "--source", - ALBERT, - "--target", - AA_PAYMENT_ADDRESS, - "--token", - BTC, - "--amount", - "20", - "--node", - &validator_one_rpc - ], - Some(300) - )?; - client.exp_string("Transaction accepted")?; - client.exp_string("Transaction applied")?; - client.exp_string("Transaction is valid")?; - client.assert_success(); - - // Assert BTC balance at VK(A) is 20 - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AA_VIEWING_KEY, - "--token", - BTC, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - client.exp_string("btc: 20")?; - client.assert_success(); - - // Assert NAM balance at VK(A) is 0 - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AA_VIEWING_KEY, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - client.exp_string("No shielded nam balance found")?; - client.assert_success(); - - let masp_rewards = masp_rewards(); - - // Wait till epoch boundary - let ep1 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Assert BTC balance at VK(A) is 20 - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AA_VIEWING_KEY, - "--token", - BTC, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - client.exp_string("btc: 20")?; - client.assert_success(); - - let amt20 = token::Amount::from_uint(20, BTC_DENOMINATION).unwrap(); - let amt10 = token::Amount::from_uint(10, ETH_DENOMINATION).unwrap(); - - // Assert NAM balance at VK(A) is 20*BTC_reward*(epoch_1-epoch_0) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AA_VIEWING_KEY, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = (amt20 * masp_rewards[&(btc(), None)]).0 * (ep1.0 - ep0.0); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated,))?; - client.assert_success(); - - // Assert NAM balance at MASP pool is 20*BTC_reward*(epoch_1-epoch_0) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - MASP, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = (amt20 * masp_rewards[&(btc(), None)]).0 * (ep1.0 - ep0.0); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated,))?; - client.assert_success(); - - // Wait till epoch boundary - let ep2 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Assert BTC balance at VK(A) is 20 - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AA_VIEWING_KEY, - "--token", - BTC, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - client.exp_string("btc: 20")?; - client.assert_success(); - - // Assert NAM balance at VK(A) is 20*BTC_reward*(epoch_2-epoch_0) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AA_VIEWING_KEY, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = (amt20 * masp_rewards[&(btc(), None)]).0 * (ep2.0 - ep0.0); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated,))?; - client.assert_success(); - - // Assert NAM balance at MASP pool is 20*BTC_reward*(epoch_2-epoch_0) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - MASP, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = (amt20 * masp_rewards[&(btc(), None)]).0 * (ep2.0 - ep0.0); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated,))?; - client.assert_success(); - - // Wait till epoch boundary - let ep3 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Send 10 ETH from Albert to PA(B) - let mut client = run!( - test, - Bin::Client, - vec![ - "transfer", - "--source", - ALBERT, - "--target", - AB_PAYMENT_ADDRESS, - "--token", - ETH, - "--amount", - "10", - "--node", - &validator_one_rpc - ], - Some(300) - )?; - client.exp_string("Transaction accepted")?; - client.exp_string("Transaction applied")?; - client.exp_string("Transaction is valid")?; - client.assert_success(); - - // Assert ETH balance at VK(B) is 10 - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AB_VIEWING_KEY, - "--token", - ETH, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - client.exp_string("eth: 10")?; - client.assert_success(); - - // Assert NAM balance at VK(B) is 0 - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AB_VIEWING_KEY, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - client.exp_string("No shielded nam balance found")?; - client.assert_success(); - - // Wait till epoch boundary - let ep4 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Assert ETH balance at VK(B) is 10 - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AB_VIEWING_KEY, - "--token", - ETH, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - client.exp_string("eth: 10")?; - client.assert_success(); - - // Assert NAM balance at VK(B) is 10*ETH_reward*(epoch_4-epoch_3) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AB_VIEWING_KEY, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = (amt10 * masp_rewards[&(eth(), None)]).0 * (ep4.0 - ep3.0); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated,))?; - client.assert_success(); - - // Assert NAM balance at MASP pool is - // 20*BTC_reward*(epoch_4-epoch_0)+10*ETH_reward*(epoch_4-epoch_3) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - MASP, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = ((amt20 * masp_rewards[&(btc(), None)]).0 * (ep4.0 - ep0.0)) - + ((amt10 * masp_rewards[&(eth(), None)]).0 * (ep4.0 - ep3.0)); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated))?; - client.assert_success(); - - // Wait till epoch boundary - let ep5 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Send 10 ETH from SK(B) to Christel - let mut client = run!( - test, - Bin::Client, - vec![ - "transfer", - "--source", - B_SPENDING_KEY, - "--target", - CHRISTEL, - "--token", - ETH, - "--amount", - "10", - "--signer", - BERTHA, - "--node", - &validator_one_rpc - ], - Some(300) - )?; - client.exp_string("Transaction accepted")?; - client.exp_string("Transaction applied")?; - client.exp_string("Transaction is valid")?; - client.assert_success(); - - // Assert ETH balance at VK(B) is 0 - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AB_VIEWING_KEY, - "--token", - ETH, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - client.exp_string("No shielded eth balance found")?; - client.assert_success(); - - // let mut ep = get_epoch(&test, &validator_one_rpc)?; - - // Assert NAM balance at VK(B) is 10*ETH_reward*(ep-epoch_3) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AB_VIEWING_KEY, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = (amt10 * masp_rewards[&(eth(), None)]).0 * (ep5.0 - ep3.0); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated,))?; - client.assert_success(); - - // ep = get_epoch(&test, &validator_one_rpc)?; - // Assert NAM balance at MASP pool is - // 20*BTC_reward*(epoch_5-epoch_0)+10*ETH_reward*(epoch_5-epoch_3) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - MASP, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = ((amt20 * masp_rewards[&(btc(), None)]).0 * (ep5.0 - ep0.0)) - + ((amt10 * masp_rewards[&(eth(), None)]).0 * (ep5.0 - ep3.0)); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated))?; - client.assert_success(); - - // Wait till epoch boundary - let ep6 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Send 20 BTC from SK(A) to Christel - let mut client = run!( - test, - Bin::Client, - vec![ - "transfer", - "--source", - A_SPENDING_KEY, - "--target", - CHRISTEL, - "--token", - BTC, - "--amount", - "20", - "--signer", - ALBERT, - "--node", - &validator_one_rpc - ], - Some(300) - )?; - client.exp_string("Transaction accepted")?; - client.exp_string("Transaction applied")?; - client.exp_string("Transaction is valid")?; - client.assert_success(); - - // Assert BTC balance at VK(A) is 0 - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AA_VIEWING_KEY, - "--token", - BTC, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - client.exp_string("No shielded btc balance found")?; - client.assert_success(); - - // Assert NAM balance at VK(A) is 20*BTC_reward*(epoch_6-epoch_0) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AA_VIEWING_KEY, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = (amt20 * masp_rewards[&(btc(), None)]).0 * (ep6.0 - ep0.0); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated,))?; - client.assert_success(); - - // Assert NAM balance at MASP pool is - // 20*BTC_reward*(epoch_6-epoch_0)+20*ETH_reward*(epoch_5-epoch_3) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - MASP, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = ((amt20 * masp_rewards[&(btc(), None)]).0 * (ep6.0 - ep0.0)) - + ((amt10 * masp_rewards[&(eth(), None)]).0 * (ep5.0 - ep3.0)); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated,))?; - client.assert_success(); - - // Wait till epoch boundary - let _ep7 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Assert NAM balance at VK(A) is 20*BTC_reward*(epoch_6-epoch_0) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AA_VIEWING_KEY, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = (amt20 * masp_rewards[&(btc(), None)]).0 * (ep6.0 - ep0.0); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated))?; - client.assert_success(); - - // Assert NAM balance at VK(B) is 10*ETH_reward*(epoch_5-epoch_3) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AB_VIEWING_KEY, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = (amt10 * masp_rewards[&(eth(), None)]).0 * (ep5.0 - ep3.0); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated,))?; - client.assert_success(); - - // Assert NAM balance at MASP pool is - // 20*BTC_reward*(epoch_6-epoch_0)+10*ETH_reward*(epoch_5-epoch_3) - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - MASP, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - let amt = ((amt20 * masp_rewards[&(btc(), None)]).0 * (ep6.0 - ep0.0)) - + ((amt10 * masp_rewards[&(eth(), None)]).0 * (ep5.0 - ep3.0)); - let denominated = DenominatedAmount { - amount: amt, - denom: NATIVE_MAX_DECIMAL_PLACES.into(), - }; - client.exp_string(&format!("nam: {}", denominated,))?; - client.assert_success(); - - // Wait till epoch boundary to prevent conversion expiry during transaction - // construction - let _ep8 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Send 10*ETH_reward*(epoch_5-epoch_3) NAM from SK(B) to Christel - let mut client = run!( - test, - Bin::Client, - vec![ - "transfer", - "--source", - B_SPENDING_KEY, - "--target", - CHRISTEL, - "--token", - NAM, - "--amount", - &((amt10 * masp_rewards[&(eth(), None)]).0 * (ep5.0 - ep3.0)) - .to_string_native(), - "--signer", - BERTHA, - "--node", - &validator_one_rpc - ], - Some(300) - )?; - client.exp_string("Transaction accepted")?; - client.exp_string("Transaction applied")?; - client.exp_string("Transaction is valid")?; - client.assert_success(); - - // Wait till epoch boundary - let _ep9 = epoch_sleep(&test, &validator_one_rpc, 720)?; - - // Send 20*BTC_reward*(epoch_6-epoch_0) NAM from SK(A) to Bertha - let mut client = run!( - test, - Bin::Client, - vec![ - "transfer", - "--source", - A_SPENDING_KEY, - "--target", - BERTHA, - "--token", - NAM, - "--amount", - &((amt20 * masp_rewards[&(btc(), None)]).0 * (ep6.0 - ep0.0)) - .to_string_native(), - "--signer", - ALBERT, - "--node", - &validator_one_rpc - ], - Some(300) - )?; - client.exp_string("Transaction accepted")?; - client.exp_string("Transaction applied")?; - client.exp_string("Transaction is valid")?; - client.assert_success(); - - // Assert NAM balance at VK(A) is 0 - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AA_VIEWING_KEY, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - client.exp_string("No shielded nam balance found")?; - client.assert_success(); - - // Assert NAM balance at VK(B) is 0 - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - AB_VIEWING_KEY, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - client.exp_string("No shielded nam balance found")?; - client.assert_success(); - - // Assert NAM balance at MASP pool is 0 - let mut client = run!( - test, - Bin::Client, - vec![ - "balance", - "--owner", - MASP, - "--token", - NAM, - "--node", - &validator_one_rpc - ], - Some(60) - )?; - client.exp_string("nam: 0")?; - client.assert_success(); - - Ok(()) -} - /// In this test we: /// 1. Run the ledger node /// 2. Submit an invalid transaction (disallowed by state machine) diff --git a/tests/src/e2e/setup.rs b/tests/src/e2e/setup.rs index 6d1a2496b0..5f148b4fc2 100644 --- a/tests/src/e2e/setup.rs +++ b/tests/src/e2e/setup.rs @@ -21,7 +21,6 @@ use eyre::{eyre, Context}; use itertools::{Either, Itertools}; use namada::types::chain::ChainId; use namada_apps::client::utils; -use namada_apps::client::utils::REDUCED_CLI_PRINTING; use namada_apps::config::genesis::genesis_config::{self, GenesisConfig}; use namada_apps::config::{ethereum_bridge, Config}; use namada_apps::{config, wallet}; @@ -42,7 +41,7 @@ pub const APPS_PACKAGE: &str = "namada_apps"; pub const ENV_VAR_DEBUG: &str = "NAMADA_E2E_DEBUG"; /// Env. var for keeping temporary files created by the E2E tests -const ENV_VAR_KEEP_TEMP: &str = "NAMADA_E2E_KEEP_TEMP"; +pub const ENV_VAR_KEEP_TEMP: &str = "NAMADA_E2E_KEEP_TEMP"; /// Env. var for temporary path const ENV_VAR_TEMP_PATH: &str = "NAMADA_E2E_TEMP_PATH"; @@ -155,7 +154,6 @@ pub fn network( eprintln!("Failed setting up colorful error reports {}", err); } }); - env::set_var(REDUCED_CLI_PRINTING, "true"); let working_dir = working_dir(); let test_dir = TestDir::new(); diff --git a/tests/src/integration.rs b/tests/src/integration.rs new file mode 100644 index 0000000000..8642e0e03c --- /dev/null +++ b/tests/src/integration.rs @@ -0,0 +1,3 @@ +mod masp; +mod setup; +mod utils; diff --git a/tests/src/integration/masp.rs b/tests/src/integration/masp.rs new file mode 100644 index 0000000000..c48377896e --- /dev/null +++ b/tests/src/integration/masp.rs @@ -0,0 +1,1206 @@ +use std::path::PathBuf; + +use color_eyre::eyre::Result; +use color_eyre::owo_colors::OwoColorize; +use namada_apps::client::tx::CLIShieldedUtils; +use namada_apps::node::ledger::shell::testing::client::run; +use namada_apps::node::ledger::shell::testing::utils::Bin; +use namada_core::types::address::{btc, eth, masp_rewards}; +use namada_core::types::token; +use namada_core::types::token::{DenominatedAmount, NATIVE_MAX_DECIMAL_PLACES}; +use test_log::test; + +use super::setup; +use crate::e2e::setup::constants::{ + AA_PAYMENT_ADDRESS, AA_VIEWING_KEY, AB_PAYMENT_ADDRESS, AB_VIEWING_KEY, + AC_PAYMENT_ADDRESS, AC_VIEWING_KEY, ALBERT, A_SPENDING_KEY, + BB_PAYMENT_ADDRESS, BERTHA, BTC, B_SPENDING_KEY, CHRISTEL, ETH, MASP, NAM, +}; +use crate::integration::utils::CapturedOutput; + +/// In this test we verify that users of the MASP receive the correct rewards +/// for leaving their assets in the pool for varying periods of time. +#[test] +fn masp_incentives() -> Result<()> { + // The number of decimal places used by BTC amounts. + const BTC_DENOMINATION: u8 = 8; + // The number of decimal places used by ETH amounts. + const ETH_DENOMINATION: u8 = 18; + // This address doesn't matter for tests. But an argument is required. + let validator_one_rpc = "127.0.0.1:26567"; + // Download the shielded pool parameters before starting node + let _ = CLIShieldedUtils::new(PathBuf::new()); + // Lengthen epoch to ensure that a transaction can be constructed and + // submitted within the same block. Necessary to ensure that conversion is + // not invalidated. + let mut node = setup::setup()?; + // Wait till epoch boundary + let ep0 = node.next_epoch(); + // Send 20 BTC from Albert to PA + run( + &node, + Bin::Client, + vec![ + "transfer", + "--source", + ALBERT, + "--target", + AA_PAYMENT_ADDRESS, + "--token", + BTC, + "--amount", + "20", + "--node", + validator_one_rpc, + ], + )?; + node.assert_success(); + + // Assert BTC balance at VK(A) is 20 + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AA_VIEWING_KEY, + "--token", + BTC, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("btc: 20")); + + // Assert NAM balance at VK(A) is 0 + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AA_VIEWING_KEY, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("No shielded nam balance found")); + + let masp_rewards = masp_rewards(); + + // Wait till epoch boundary + let ep1 = node.next_epoch(); + + // Assert BTC balance at VK(A) is 20 + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AA_VIEWING_KEY, + "--token", + BTC, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("btc: 20")); + + let amt20 = token::Amount::from_uint(20, BTC_DENOMINATION).unwrap(); + let amt10 = token::Amount::from_uint(10, ETH_DENOMINATION).unwrap(); + + // Assert NAM balance at VK(A) is 20*BTC_reward*(epoch_1-epoch_0) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AA_VIEWING_KEY, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + + let amt = (amt20 * masp_rewards[&(btc(), None)]).0 * (ep1.0 - ep0.0); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated))); + + // Assert NAM balance at MASP pool is 20*BTC_reward*(epoch_1-epoch_0) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + MASP, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + let amt = (amt20 * masp_rewards[&(btc(), None)]).0 * (ep1.0 - ep0.0); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated))); + + // Wait till epoch boundary + let ep2 = node.next_epoch(); + + // Assert BTC balance at VK(A) is 20 + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AA_VIEWING_KEY, + "--token", + BTC, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("btc: 20")); + + // Assert NAM balance at VK(A) is 20*BTC_reward*(epoch_2-epoch_0) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AA_VIEWING_KEY, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + let amt = (amt20 * masp_rewards[&(btc(), None)]).0 * (ep2.0 - ep0.0); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated))); + + // Assert NAM balance at MASP pool is 20*BTC_reward*(epoch_2-epoch_0) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + MASP, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + let amt = (amt20 * masp_rewards[&(btc(), None)]).0 * (ep2.0 - ep0.0); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated))); + + // Wait till epoch boundary + let ep3 = node.next_epoch(); + + // Send 10 ETH from Albert to PA(B) + run( + &node, + Bin::Client, + vec![ + "transfer", + "--source", + ALBERT, + "--target", + AB_PAYMENT_ADDRESS, + "--token", + ETH, + "--amount", + "10", + "--node", + validator_one_rpc, + ], + )?; + node.assert_success(); + + // Assert ETH balance at VK(B) is 10 + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AB_VIEWING_KEY, + "--token", + ETH, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("eth: 10")); + + // Assert NAM balance at VK(B) is 0 + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AB_VIEWING_KEY, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("No shielded nam balance found")); + + // Wait till epoch boundary + let ep4 = node.next_epoch(); + + // Assert ETH balance at VK(B) is 10 + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AB_VIEWING_KEY, + "--token", + ETH, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("eth: 10")); + + // Assert NAM balance at VK(B) is 10*ETH_reward*(epoch_4-epoch_3) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AB_VIEWING_KEY, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + let amt = (amt10 * masp_rewards[&(eth(), None)]).0 * (ep4.0 - ep3.0); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated))); + + // Assert NAM balance at MASP pool is + // 20*BTC_reward*(epoch_4-epoch_0)+10*ETH_reward*(epoch_4-epoch_3) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + MASP, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + let amt = ((amt20 * masp_rewards[&(btc(), None)]).0 * (ep4.0 - ep0.0)) + + ((amt10 * masp_rewards[&(eth(), None)]).0 * (ep4.0 - ep3.0)); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated))); + + // Wait till epoch boundary + let ep5 = node.next_epoch(); + + // Send 10 ETH from SK(B) to Christel + run( + &node, + Bin::Client, + vec![ + "transfer", + "--source", + B_SPENDING_KEY, + "--target", + CHRISTEL, + "--token", + ETH, + "--amount", + "10", + "--signer", + BERTHA, + "--node", + validator_one_rpc, + ], + )?; + node.assert_success(); + + // Assert ETH balance at VK(B) is 0 + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AB_VIEWING_KEY, + "--token", + ETH, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("No shielded eth balance found")); + + let _ep = node.next_epoch(); + + // Assert NAM balance at VK(B) is 10*ETH_reward*(ep-epoch_3) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AB_VIEWING_KEY, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + let amt = (amt10 * masp_rewards[&(eth(), None)]).0 * (ep5.0 - ep3.0); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated))); + + let ep = node.next_epoch(); + // Assert NAM balance at MASP pool is + // 20*BTC_reward*(epoch_5-epoch_0)+10*ETH_reward*(epoch_5-epoch_3) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + MASP, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + let amt = ((amt20 * masp_rewards[&(btc(), None)]).0 * (ep.0 - ep0.0)) + + ((amt10 * masp_rewards[&(eth(), None)]).0 * (ep5.0 - ep3.0)); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated))); + + // Wait till epoch boundary + let ep6 = node.next_epoch(); + + // Send 20 BTC from SK(A) to Christel + run( + &node, + Bin::Client, + vec![ + "transfer", + "--source", + A_SPENDING_KEY, + "--target", + CHRISTEL, + "--token", + BTC, + "--amount", + "20", + "--signer", + ALBERT, + "--node", + validator_one_rpc, + ], + )?; + node.assert_success(); + + // Assert BTC balance at VK(A) is 0 + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AA_VIEWING_KEY, + "--token", + BTC, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("No shielded btc balance found")); + + // Assert NAM balance at VK(A) is 20*BTC_reward*(epoch_6-epoch_0) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AA_VIEWING_KEY, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + let amt = (amt20 * masp_rewards[&(btc(), None)]).0 * (ep6.0 - ep0.0); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated,))); + + // Assert NAM balance at MASP pool is + // 20*BTC_reward*(epoch_6-epoch_0)+20*ETH_reward*(epoch_5-epoch_3) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + MASP, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + let amt = ((amt20 * masp_rewards[&(btc(), None)]).0 * (ep6.0 - ep0.0)) + + ((amt10 * masp_rewards[&(eth(), None)]).0 * (ep5.0 - ep3.0)); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated,))); + + // Wait till epoch boundary + let _ep7 = node.next_epoch(); + + // Assert NAM balance at VK(A) is 20*BTC_reward*(epoch_6-epoch_0) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AA_VIEWING_KEY, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + let amt = (amt20 * masp_rewards[&(btc(), None)]).0 * (ep6.0 - ep0.0); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated))); + + // Assert NAM balance at VK(B) is 10*ETH_reward*(epoch_5-epoch_3) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AB_VIEWING_KEY, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + let amt = (amt10 * masp_rewards[&(eth(), None)]).0 * (ep5.0 - ep3.0); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated,))); + + // Assert NAM balance at MASP pool is + // 20*BTC_reward*(epoch_6-epoch_0)+10*ETH_reward*(epoch_5-epoch_3) + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + MASP, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + let amt = ((amt20 * masp_rewards[&(btc(), None)]).0 * (ep6.0 - ep0.0)) + + ((amt10 * masp_rewards[&(eth(), None)]).0 * (ep5.0 - ep3.0)); + let denominated = DenominatedAmount { + amount: amt, + denom: NATIVE_MAX_DECIMAL_PLACES.into(), + }; + assert!(captured.result.is_ok()); + assert!(captured.contains(&format!("nam: {}", denominated,))); + + // Wait till epoch boundary to prevent conversion expiry during transaction + // construction + let _ep8 = node.next_epoch(); + + // Send 10*ETH_reward*(epoch_5-epoch_3) NAM from SK(B) to Christel + run( + &node, + Bin::Client, + vec![ + "transfer", + "--source", + B_SPENDING_KEY, + "--target", + CHRISTEL, + "--token", + NAM, + "--amount", + &((amt10 * masp_rewards[&(eth(), None)]).0 * (ep5.0 - ep3.0)) + .to_string_native(), + "--signer", + BERTHA, + "--node", + validator_one_rpc, + ], + )?; + node.assert_success(); + + // Wait till epoch boundary + let _ep9 = node.next_epoch(); + + // Send 20*BTC_reward*(epoch_6-epoch_0) NAM from SK(A) to Bertha + run( + &node, + Bin::Client, + vec![ + "transfer", + "--source", + A_SPENDING_KEY, + "--target", + BERTHA, + "--token", + NAM, + "--amount", + &((amt20 * masp_rewards[&(btc(), None)]).0 * (ep6.0 - ep0.0)) + .to_string_native(), + "--signer", + ALBERT, + "--node", + validator_one_rpc, + ], + )?; + node.assert_success(); + + // Assert NAM balance at VK(A) is 0 + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AA_VIEWING_KEY, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("No shielded nam balance found")); + + // Assert NAM balance at VK(B) is 0 + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AB_VIEWING_KEY, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("No shielded nam balance found")); + + // Assert NAM balance at MASP pool is 0 + let captured = CapturedOutput::of(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + MASP, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("nam: 0")); + + Ok(()) +} + +/// In this test we: +/// 1. Run the ledger node +/// 2. Assert PPA(C) cannot be recognized by incorrect viewing key +/// 3. Assert PPA(C) has not transaction pinned to it +/// 4. Send 20 BTC from Albert to PPA(C) +/// 5. Assert PPA(C) has the 20 BTC transaction pinned to it +#[test] +fn masp_pinned_txs() -> Result<()> { + // This address doesn't matter for tests. But an argument is required. + let validator_one_rpc = "127.0.0.1:26567"; + // Download the shielded pool parameters before starting node + let _ = CLIShieldedUtils::new(PathBuf::new()); + + let mut node = setup::setup()?; + // Wait till epoch boundary + let _ep0 = node.next_epoch(); + + // Assert PPA(C) cannot be recognized by incorrect viewing key + let captured = + CapturedOutput::with_input(AB_VIEWING_KEY.into()).run(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AC_PAYMENT_ADDRESS, + "--token", + BTC, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!( + captured.contains("Supplied viewing key cannot decode transactions to") + ); + + // Assert PPA(C) has no transaction pinned to it + let captured = + CapturedOutput::with_input(AC_VIEWING_KEY.into()).run(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AC_PAYMENT_ADDRESS, + "--token", + BTC, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("has not yet been consumed")); + + // Wait till epoch boundary + let _ep1 = node.next_epoch(); + + // Send 20 BTC from Albert to PPA(C) + run( + &node, + Bin::Client, + vec![ + "transfer", + "--source", + ALBERT, + "--target", + AC_PAYMENT_ADDRESS, + "--token", + BTC, + "--amount", + "20", + "--node", + validator_one_rpc, + ], + )?; + node.assert_success(); + + // Wait till epoch boundary + // This makes it more consistent for some reason? + let _ep2 = node.next_epoch(); + + // Assert PPA(C) has the 20 BTC transaction pinned to it + let captured = + CapturedOutput::with_input(AC_VIEWING_KEY.into()).run(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AC_PAYMENT_ADDRESS, + "--token", + BTC, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("Received 20 btc")); + + // Assert PPA(C) has no NAM pinned to it + let captured = + CapturedOutput::with_input(AC_VIEWING_KEY.into()).run(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AC_PAYMENT_ADDRESS, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("Received no shielded nam")); + + // Wait till epoch boundary + let _ep1 = node.next_epoch(); + + // Assert PPA(C) does not NAM pinned to it on epoch boundary + let captured = + CapturedOutput::with_input(AC_VIEWING_KEY.into()).run(|| { + run( + &node, + Bin::Client, + vec![ + "balance", + "--owner", + AC_PAYMENT_ADDRESS, + "--token", + NAM, + "--node", + validator_one_rpc, + ], + ) + }); + assert!(captured.result.is_ok()); + assert!(captured.contains("Received no shielded nam")); + Ok(()) +} + +/// In this test we: +/// 1. Run the ledger node +/// 2. Attempt to spend 10 BTC at SK(A) to PA(B) +/// 3. Attempt to spend 15 BTC at SK(A) to Bertha +/// 4. Send 20 BTC from Albert to PA(A) +/// 5. Attempt to spend 10 ETH at SK(A) to PA(B) +/// 6. Spend 7 BTC at SK(A) to PA(B) +/// 7. Spend 7 BTC at SK(A) to PA(B) +/// 8. Attempt to spend 7 BTC at SK(A) to PA(B) +/// 9. Spend 6 BTC at SK(A) to PA(B) +/// 10. Assert BTC balance at VK(A) is 0 +/// 11. Assert ETH balance at VK(A) is 0 +/// 12. Assert balance at VK(B) is 10 BTC +/// 13. Send 10 BTC from SK(B) to Bertha +#[test] +fn masp_txs_and_queries() -> Result<()> { + // Uncomment for better debugging + // let _log_guard = + // namada_apps::logging::init_from_env_or(tracing::level_filters::LevelFilter::INFO)? + // ; This address doesn't matter for tests. But an argument is required. + let validator_one_rpc = "127.0.0.1:26567"; + // Download the shielded pool parameters before starting node + let _ = CLIShieldedUtils::new(PathBuf::new()); + + enum Response { + Ok(&'static str), + Err(&'static str), + } + + let mut node = setup::setup()?; + _ = node.next_epoch(); + let txs_args = vec![ + // 0. Attempt to spend 10 BTC at SK(A) to PA(B) + ( + vec![ + "transfer", + "--source", + A_SPENDING_KEY, + "--target", + AB_PAYMENT_ADDRESS, + "--token", + BTC, + "--amount", + "10", + "--node", + validator_one_rpc, + ], + Response::Err(""), + ), + // 1. Attempt to spend 15 BTC at SK(A) to Bertha + ( + vec![ + "transfer", + "--source", + A_SPENDING_KEY, + "--target", + BERTHA, + "--token", + BTC, + "--amount", + "15", + "--node", + validator_one_rpc, + ], + Response::Err(""), + ), + // 2. Send 20 BTC from Albert to PA(A) + ( + vec![ + "transfer", + "--source", + ALBERT, + "--target", + AA_PAYMENT_ADDRESS, + "--token", + BTC, + "--amount", + "20", + "--node", + validator_one_rpc, + ], + Response::Ok("Transaction is valid"), + ), + // 3. Attempt to spend 10 ETH at SK(A) to PA(B) + ( + vec![ + "transfer", + "--source", + A_SPENDING_KEY, + "--target", + AB_PAYMENT_ADDRESS, + "--token", + ETH, + "--amount", + "10", + "--node", + validator_one_rpc, + ], + Response::Err(""), + ), + // 4. Spend 7 BTC at SK(A) to PA(B) + ( + vec![ + "transfer", + "--source", + A_SPENDING_KEY, + "--target", + AB_PAYMENT_ADDRESS, + "--token", + BTC, + "--amount", + "7", + "--node", + validator_one_rpc, + ], + Response::Ok("Transaction is valid"), + ), + // 5. Spend 7 BTC at SK(A) to PA(B) + ( + vec![ + "transfer", + "--source", + A_SPENDING_KEY, + "--target", + BB_PAYMENT_ADDRESS, + "--token", + BTC, + "--amount", + "7", + "--node", + validator_one_rpc, + ], + Response::Ok("Transaction is valid"), + ), + // 6. Attempt to spend 7 BTC at SK(A) to PA(B) + ( + vec![ + "transfer", + "--source", + A_SPENDING_KEY, + "--target", + BB_PAYMENT_ADDRESS, + "--token", + BTC, + "--amount", + "7", + "--node", + validator_one_rpc, + ], + Response::Err(""), + ), + // 7. Spend 6 BTC at SK(A) to PA(B) + ( + vec![ + "transfer", + "--source", + A_SPENDING_KEY, + "--target", + BB_PAYMENT_ADDRESS, + "--token", + BTC, + "--amount", + "6", + "--node", + validator_one_rpc, + ], + Response::Ok("Transaction is valid"), + ), + // 8. Assert BTC balance at VK(A) is 0 + ( + vec![ + "balance", + "--owner", + AA_VIEWING_KEY, + "--token", + BTC, + "--node", + validator_one_rpc, + ], + Response::Ok("No shielded btc balance found"), + ), + // 9. Assert ETH balance at VK(A) is 0 + ( + vec![ + "balance", + "--owner", + AA_VIEWING_KEY, + "--token", + ETH, + "--node", + validator_one_rpc, + ], + Response::Ok("No shielded eth balance found"), + ), + // 10. Assert balance at VK(B) is 20 BTC + ( + vec![ + "balance", + "--owner", + AB_VIEWING_KEY, + "--node", + validator_one_rpc, + ], + Response::Ok("btc : 20"), + ), + // 11. Send 20 BTC from SK(B) to Bertha + ( + vec![ + "transfer", + "--source", + B_SPENDING_KEY, + "--target", + BERTHA, + "--token", + BTC, + "--amount", + "20", + "--node", + validator_one_rpc, + ], + Response::Ok("Transaction is valid"), + ), + ]; + + for (tx_args, tx_result) in &txs_args { + // We ensure transfers don't cross epoch boundaries. + if tx_args[0] == "transfer" { + node.next_epoch(); + } + for &dry_run in &[true, false] { + let tx_args = if dry_run && tx_args[0] == "transfer" { + vec![tx_args.clone(), vec!["--dry-run"]].concat() + } else { + tx_args.clone() + }; + println!( + "{}: {:?}\n\n", + "Running".green().underline(), + tx_args.join(" ").yellow().underline() + ); + let captured = + CapturedOutput::of(|| run(&node, Bin::Client, tx_args.clone())); + match tx_result { + Response::Ok("Transaction is valid") => { + assert!( + captured.result.is_ok(), + "{:?} failed with result {:?}.\n Unread output: {}", + tx_args, + captured.result, + captured.output, + ); + if !dry_run { + node.assert_success(); + } else { + assert!( + captured.contains("Transaction is valid"), + "{:?} failed to contain needle 'Transaction is \ + valid',\nGot output '{}'", + tx_args, + captured.output + ); + } + } + Response::Ok(out) => { + assert!( + captured.result.is_ok(), + "{:?} failed with result {:?}.\n Unread output: {}", + tx_args, + captured.result, + captured.output, + ); + assert!( + captured.contains(out), + "{:?} failed to contain needle '{}',\nGot output '{}'", + tx_args, + out, + captured.output + ); + } + Response::Err(msg) => { + assert!( + captured.result.is_err(), + "{:?} unexpectedly succeeded", + tx_args + ); + assert!( + captured.contains(msg), + "{:?} failed to contain needle {},\nGot output {}", + tx_args, + msg, + captured.output + ); + } + } + } + } + + Ok(()) +} diff --git a/tests/src/integration/setup.rs b/tests/src/integration/setup.rs new file mode 100644 index 0000000000..df74c5f6f1 --- /dev/null +++ b/tests/src/integration/setup.rs @@ -0,0 +1,163 @@ +use std::mem::ManuallyDrop; +use std::path::Path; +use std::str::FromStr; +use std::sync::{Arc, Mutex}; + +use color_eyre::eyre::{eyre, Result}; +use namada_apps::cli::args; +use namada_apps::config; +use namada_apps::config::genesis::genesis_config; +use namada_apps::config::genesis::genesis_config::GenesisConfig; +use namada_apps::config::TendermintMode; +use namada_apps::facade::tendermint::Timeout; +use namada_apps::facade::tendermint_proto::google::protobuf::Timestamp; +use namada_apps::node::ledger::shell::testing::node::MockNode; +use namada_apps::node::ledger::shell::testing::utils::TestDir; +use namada_apps::node::ledger::shell::Shell; +use namada_core::types::address::Address; +use namada_core::types::chain::{ChainId, ChainIdPrefix}; +use toml::value::Table; + +use crate::e2e::setup::{ + copy_wasm_to_chain_dir, get_all_wasms_hashes, SINGLE_NODE_NET_GENESIS, +}; + +/// Env. var for keeping temporary files created by the integration tests +const ENV_VAR_KEEP_TEMP: &str = "NAMADA_INT_KEEP_TEMP"; + +/// Setup a network with a single genesis validator node. +pub fn setup() -> Result { + initialize_genesis(|genesis| genesis) +} + +/// Setup folders with genesis, configs, wasm, etc. +pub fn initialize_genesis( + mut update_genesis: impl FnMut(GenesisConfig) -> GenesisConfig, +) -> Result { + let working_dir = std::fs::canonicalize("..").unwrap(); + let keep_temp = match std::env::var(ENV_VAR_KEEP_TEMP) { + Ok(val) => val.to_ascii_lowercase() != "false", + _ => false, + }; + let test_dir = TestDir::new(); + + // Open the source genesis file + let mut genesis = genesis_config::open_genesis_config( + working_dir.join(SINGLE_NODE_NET_GENESIS), + )?; + + genesis.parameters.vp_whitelist = + Some(get_all_wasms_hashes(&working_dir, Some("vp_"))); + genesis.parameters.tx_whitelist = + Some(get_all_wasms_hashes(&working_dir, Some("tx_"))); + + // Run the provided function on it + let genesis = update_genesis(genesis); + + // Run `init-network` to generate the finalized genesis config, keys and + // addresses and update WASM checksums + let genesis_path = test_dir.path().join("e2e-test-genesis-src.toml"); + genesis_config::write_genesis_config(&genesis, &genesis_path); + let wasm_checksums_path = working_dir.join("wasm/checksums.json"); + + // setup genesis file + namada_apps::client::utils::init_network( + args::Global { + chain_id: None, + base_dir: test_dir.path().to_path_buf(), + wasm_dir: None, + }, + args::InitNetwork { + genesis_path, + wasm_checksums_path, + chain_id_prefix: ChainIdPrefix::from_str("integration-test") + .unwrap(), + unsafe_dont_encrypt: true, + consensus_timeout_commit: Timeout::from_str("1s").unwrap(), + localhost: true, + allow_duplicate_ip: true, + dont_archive: true, + archive_dir: None, + }, + ); + + create_node(test_dir, &genesis, keep_temp) +} + +/// Create a mock ledger node. +fn create_node( + base_dir: TestDir, + genesis: &GenesisConfig, + keep_temp: bool, +) -> Result { + // look up the chain id from the global file. + let chain_id = if let toml::Value::String(chain_id) = + toml::from_str::( + &std::fs::read_to_string( + base_dir.path().join("global-config.toml"), + ) + .unwrap(), + ) + .unwrap() + .get("default_chain_id") + .unwrap() + { + chain_id.to_string() + } else { + return Err(eyre!("Could not read chain id from global-config.toml")); + }; + + // the directory holding compiled wasm + let wasm_dir = base_dir.path().join(Path::new(&chain_id)).join("wasm"); + // copy compiled wasms into the wasm directory + let chain_id = ChainId::from_str(&chain_id).unwrap(); + copy_wasm_to_chain_dir( + &std::fs::canonicalize("..").unwrap(), + &base_dir.path().join(Path::new(&chain_id.to_string())), + &chain_id, + genesis.validator.keys(), + ); + + // instantiate and initialize the ledger node. + let (sender, recv) = tokio::sync::mpsc::unbounded_channel(); + let node = MockNode { + shell: Arc::new(Mutex::new(Shell::new( + config::Ledger::new( + base_dir.path(), + chain_id.clone(), + TendermintMode::Validator + ), + wasm_dir, + sender, + None, + None, + 50 * 1024 * 1024, // 50 kiB + 50 * 1024 * 1024, // 50 kiB + Address::from_str("atest1v4ehgw36x3prswzxggunzv6pxqmnvdj9xvcyzvpsggeyvs3cg9qnywf589qnwvfsg5erg3fkl09rg5").unwrap(), + ))), + test_dir: ManuallyDrop::new(base_dir), + keep_temp, + _broadcast_recv: recv, + results: Arc::new(Mutex::new(vec![])), + }; + let init_req = namada_apps::facade::tower_abci::request::InitChain { + time: Some(Timestamp { + seconds: 0, + nanos: 0, + }), + chain_id: chain_id.to_string(), + consensus_params: None, + validators: vec![], + app_state_bytes: vec![], + initial_height: 0, + }; + { + let mut locked = node.shell.lock().unwrap(); + locked + .init_chain(init_req, 1) + .map_err(|e| eyre!("Failed to initialize ledger: {:?}", e))?; + locked.commit(); + } + + Ok(node) +} diff --git a/tests/src/integration/utils.rs b/tests/src/integration/utils.rs new file mode 100644 index 0000000000..f626a001ee --- /dev/null +++ b/tests/src/integration/utils.rs @@ -0,0 +1,83 @@ +use std::fs::File; +use std::path::PathBuf; +use std::sync::Arc; + +struct TempFile(PathBuf); +impl TempFile { + fn new(path: PathBuf) -> (Self, File) { + let f = File::create(&path).unwrap(); + (Self(path), f) + } +} + +impl Drop for TempFile { + fn drop(&mut self) { + _ = std::fs::remove_file(&self.0); + } +} + +/// Test helper that captures stdout of +/// a process. +pub struct CapturedOutput { + pub output: String, + pub result: T, + input: String, +} + +impl CapturedOutput { + pub fn with_input(input: String) -> Self { + Self { + output: "".to_string(), + result: (), + input, + } + } +} + +impl CapturedOutput { + /// Run a client command and capture + /// the output to the mocked stdout. + pub(crate) fn of(func: F) -> Self + where + F: FnOnce() -> T, + { + std::io::set_output_capture(Some(Default::default())); + let mut capture = Self { + output: Default::default(), + result: func(), + input: Default::default(), + }; + let captured = std::io::set_output_capture(None); + let captured = captured.unwrap(); + let captured = Arc::try_unwrap(captured).unwrap(); + let captured = captured.into_inner().unwrap(); + capture.output = String::from_utf8(captured).unwrap(); + capture + } + + /// Run a client command with input to the mocked stdin and capture + /// the output to the mocked stdout + pub fn run(&self, func: F) -> CapturedOutput + where + F: FnOnce() -> U, + { + { + // write the input to the mocked stdin + let mut buf = namada_apps::cli::TESTIN.lock().unwrap(); + buf.clear(); + buf.extend_from_slice(self.input.as_bytes()); + } + CapturedOutput::of(func) + } + + /// Check if the captured output contains the regex. + pub fn matches(&self, needle: regex::Regex) -> bool { + needle.captures(&self.output).is_some() + } + + /// Check if the captured output contains the string. + pub fn contains(&self, needle: &str) -> bool { + let needle = regex::Regex::new(needle).unwrap(); + self.matches(needle) + } +} diff --git a/tests/src/lib.rs b/tests/src/lib.rs index db37039878..7e35947477 100644 --- a/tests/src/lib.rs +++ b/tests/src/lib.rs @@ -1,3 +1,4 @@ +#![cfg_attr(test, feature(internal_output_capture))] //! Namada integrations and WASM tests and testing helpers. #![doc(html_favicon_url = "https://dev.namada.net/master/favicon.png")] @@ -11,6 +12,9 @@ mod vm_host_env; pub use vm_host_env::{ibc, tx, vp}; #[cfg(test)] mod e2e; +#[cfg(test)] +#[allow(dead_code)] +mod integration; pub mod native_vp; pub mod storage; #[cfg(test)] diff --git a/wasm/Cargo.lock b/wasm/Cargo.lock index 05ea297b9d..d57798939e 100644 --- a/wasm/Cargo.lock +++ b/wasm/Cargo.lock @@ -89,6 +89,55 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + [[package]] name = "anyhow" version = "1.0.71" @@ -315,7 +364,7 @@ checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" dependencies = [ "async-trait", "axum-core", - "bitflags", + "bitflags 1.3.2", "bytes", "futures-util", "http", @@ -511,6 +560,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + [[package]] name = "bitvec" version = "0.17.4" @@ -896,6 +951,33 @@ dependencies = [ "version_check", ] +[[package]] +name = "clap" +version = "4.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_lex" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + [[package]] name = "clru" version = "0.5.0" @@ -957,6 +1039,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "concat-idents" version = "1.1.4" @@ -1467,7 +1555,7 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "byteorder", "lazy_static", "proc-macro-error", @@ -2567,7 +2655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64 0.13.1", - "bitflags", + "bitflags 1.3.2", "bytes", "headers-core", "http", @@ -3142,6 +3230,17 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi 0.3.1", + "rustix 0.38.4", + "windows-sys 0.48.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -3229,9 +3328,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libloading" @@ -3315,6 +3414,12 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f" +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + [[package]] name = "lock_api" version = "0.4.9" @@ -3768,17 +3873,21 @@ dependencies = [ name = "namada_tests" version = "0.19.0" dependencies = [ + "async-trait", "chrono", + "clap", "concat-idents", "derivative", "hyper", "ibc-relayer", "ibc-relayer-types", + "lazy_static", "namada", "namada_core", "namada_test_utils", "namada_tx_prelude", "namada_vp_prelude", + "num-traits", "prost", "regex", "serde_json", @@ -4467,7 +4576,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e35c06b98bf36aba164cc17cb25f7e232f5c4aeea73baa14b8a9f0d92dbfa65" dependencies = [ "bit-set", - "bitflags", + "bitflags 1.3.2", "byteorder", "lazy_static", "num-traits", @@ -4560,7 +4669,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63" dependencies = [ - "bitflags", + "bitflags 1.3.2", "memchr", "unicase", ] @@ -4694,7 +4803,7 @@ version = "10.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -4743,7 +4852,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -4752,7 +4861,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -4815,7 +4924,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "mach", "winapi", @@ -5015,11 +5124,24 @@ version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.7", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.3", "windows-sys 0.48.0", ] @@ -5310,7 +5432,7 @@ version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -5656,6 +5778,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "strum" version = "0.24.1" @@ -5773,7 +5901,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "redox_syscall 0.3.5", - "rustix", + "rustix 0.37.19", "windows-sys 0.45.0", ] @@ -6474,6 +6602,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "0.8.2" diff --git a/wasm/checksums.json b/wasm/checksums.json index d234911742..bea9d51134 100644 --- a/wasm/checksums.json +++ b/wasm/checksums.json @@ -1,22 +1,22 @@ { - "tx_bond.wasm": "tx_bond.31a145f2c40142d3c1eb7befb4d9e4962689fe920e32595199a206629f119180.wasm", - "tx_bridge_pool.wasm": "tx_bridge_pool.8c942b7e6a49562ff20770ac6e04df85188b49fabf4ca7f82fa3a5986a66a363.wasm", - "tx_change_validator_commission.wasm": "tx_change_validator_commission.0608a4e73e0323518e6b1e58c99d0eb6785420faa7cb51c674c264dd361b757d.wasm", - "tx_ibc.wasm": "tx_ibc.75a38e6a94a34046ef1ba2e224a3db2014bc0a3f0993bd0ec4674f287fb37b13.wasm", - "tx_init_account.wasm": "tx_init_account.f979613d2b8b540ad471c663ec1aa3d9fad085ba7b1b059e2564c7a1eb5fa139.wasm", - "tx_init_proposal.wasm": "tx_init_proposal.9a6c2aa5771fd08f26fb4d56ceb361c723d4b617da0ca2ab1a44c2b07f3b58b0.wasm", - "tx_init_validator.wasm": "tx_init_validator.40167452486f583c6869e5c6e3a67cf2900dd6e4a4c9d022d6bcc8b0d2187277.wasm", - "tx_reveal_pk.wasm": "tx_reveal_pk.01442c5045ff10d7da05b1843803db99d23a6992594b2c3eb83955f6af9a26fb.wasm", - "tx_transfer.wasm": "tx_transfer.f50a99b865d57c95ccfaec95963e87ba61f3a2d9f9fe7c0ab3cd9b09e0095d9c.wasm", - "tx_unbond.wasm": "tx_unbond.bcb85b7bc0cb9b0b562142073f24476358ada48044d6d812473ec68d9a19548b.wasm", - "tx_unjail_validator.wasm": "tx_unjail_validator.c935555c22240363f1ada75ba12ed878e2acad8df18f0a237d9c3a2c657591d1.wasm", - "tx_update_vp.wasm": "tx_update_vp.78e3064cd6f24b376ce7aa85611e9b9f77cee6d6629b4849d6a60cb12017e1f4.wasm", - "tx_vote_proposal.wasm": "tx_vote_proposal.36047c640ca8a10a62811cc15ba6e054e639313adf69c70e80e428e152c972cb.wasm", - "tx_withdraw.wasm": "tx_withdraw.bfc1b7c657a9b9c96c9bfcf38a07755ef0101816af2e5d6d7b0bc32a2d3559d2.wasm", - "vp_implicit.wasm": "vp_implicit.2c4d317f6aeb7f6d26d8b414b6b7d4c15bb656b342d7fdf224cbc28b47000395.wasm", - "vp_masp.wasm": "vp_masp.70bcfc40b3d9e9f792f298ba2e0c5e60fb44b4d1e4152635b2236b4a59faf235.wasm", - "vp_testnet_faucet.wasm": "vp_testnet_faucet.276f8f7c508ad8e8eb99f2dc307f22da2a238e2f238f55815cecfca3de383b69.wasm", - "vp_token.wasm": "vp_token.f6fd7224d538a2f5739512ddbf1e39e09fc1822bcba21e7983362157fae3568a.wasm", - "vp_user.wasm": "vp_user.4b6fcf1ec7ee50c48ea3c09b07223b0663e826a34bfe3daa2980427b598ab713.wasm", - "vp_validator.wasm": "vp_validator.f18538bd8992188cb61ef2f33303fb07ff24935b8fce39edd831d4f9ea58a85c.wasm" + "tx_bond.wasm": "tx_bond.bfa71beb062cf4d2001f85c9ba0b1ec4760bff328635f709354cc58f82f216e6.wasm", + "tx_bridge_pool.wasm": "tx_bridge_pool.b811efa509796a2d112fed951a5f039e0fd9bd52c06ee88d1574a9adf8df6469.wasm", + "tx_change_validator_commission.wasm": "tx_change_validator_commission.270e8d58cd0580d95430e7624ffa14317b8175a68b8f953e8879420c36987fc3.wasm", + "tx_ibc.wasm": "tx_ibc.d1d3bab1e86cdb2e0f633d791869855cde4a823b02b2f38891291bae2b3769a2.wasm", + "tx_init_account.wasm": "tx_init_account.23673ea813b86ee3d758b6669e2868b9296b5a309a1b0102245149ae24df08ba.wasm", + "tx_init_proposal.wasm": "tx_init_proposal.14f30bb8ee3f4981b9e42eb1d9c13bf6da0fc557d3db2cbd1d2f12645732d8b8.wasm", + "tx_init_validator.wasm": "tx_init_validator.aced63d3560a44bdd63c07d6fa0e2660152caa4bfba1750b02d7baf2c32bf89a.wasm", + "tx_reveal_pk.wasm": "tx_reveal_pk.7287e9097a794324f3482cf0321de55b71ed22ba327a9f8bb6f3add11cec699c.wasm", + "tx_transfer.wasm": "tx_transfer.17d483140b35eeecca1a065db9222e43ef32502a1aee887514b203d54f74684a.wasm", + "tx_unbond.wasm": "tx_unbond.5ae73f5db827da8b26397273fd5433b6c457539756f8ad418732872fb9daaf84.wasm", + "tx_unjail_validator.wasm": "tx_unjail_validator.69fd631289c05a62a767609ed1ac907b8d56e15382039d8431a12ee07b4f3f33.wasm", + "tx_update_vp.wasm": "tx_update_vp.21b1c8ab457b24802f3b6bee15160c3cfd907447de59b4a72c8e05c4d22ae2d3.wasm", + "tx_vote_proposal.wasm": "tx_vote_proposal.31cf2c3b75694351c78703b9aa7a319b9a8ac8fba6dbb202a3771613254e278f.wasm", + "tx_withdraw.wasm": "tx_withdraw.b0506759223037ed432cd2b85a9b96354af61fb2fc2b5f935d4495b5334a141f.wasm", + "vp_implicit.wasm": "vp_implicit.cb641772e24abdf20ea177919f79993515004b8ac76b315ed04e538077b0ab5a.wasm", + "vp_masp.wasm": "vp_masp.28bd6475ea00faf2cbd1b572f3016146eccf2789bdb7edba9014fd9913c834d3.wasm", + "vp_testnet_faucet.wasm": "vp_testnet_faucet.b8c6586d268a6bbc51b5563a24d75043b511795f3f91e6055e28e5acabf1bbbc.wasm", + "vp_token.wasm": "vp_token.3504470930cbd0a9612b46fc5e6101f4c7233e8ab075b52c437d7be3d34c3c9e.wasm", + "vp_user.wasm": "vp_user.ead2d0e1dd118fb76526626d75979e4301b34bd8e4a115e4194915357d155716.wasm", + "vp_validator.wasm": "vp_validator.60351c3da03e958b8b0364eab317ef048620ceed6622a11ad8c65d4a4088f193.wasm" } \ No newline at end of file diff --git a/wasm_for_tests/wasm_source/Cargo.lock b/wasm_for_tests/wasm_source/Cargo.lock index 19cdba1a22..713a8b77e5 100644 --- a/wasm_for_tests/wasm_source/Cargo.lock +++ b/wasm_for_tests/wasm_source/Cargo.lock @@ -89,6 +89,55 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + [[package]] name = "anyhow" version = "1.0.71" @@ -315,7 +364,7 @@ checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" dependencies = [ "async-trait", "axum-core", - "bitflags", + "bitflags 1.3.2", "bytes", "futures-util", "http", @@ -511,6 +560,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + [[package]] name = "bitvec" version = "0.17.4" @@ -896,6 +951,33 @@ dependencies = [ "version_check", ] +[[package]] +name = "clap" +version = "4.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_lex" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + [[package]] name = "clru" version = "0.5.0" @@ -957,6 +1039,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "concat-idents" version = "1.1.4" @@ -1467,7 +1555,7 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "byteorder", "lazy_static", "proc-macro-error", @@ -2567,7 +2655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64 0.13.1", - "bitflags", + "bitflags 1.3.2", "bytes", "headers-core", "http", @@ -3142,6 +3230,17 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi 0.3.1", + "rustix 0.38.3", + "windows-sys 0.48.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -3229,9 +3328,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libloading" @@ -3315,6 +3414,12 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f" +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + [[package]] name = "lock_api" version = "0.4.9" @@ -3768,17 +3873,21 @@ dependencies = [ name = "namada_tests" version = "0.19.0" dependencies = [ + "async-trait", "chrono", + "clap", "concat-idents", "derivative", "hyper", "ibc-relayer", "ibc-relayer-types", + "lazy_static", "namada", "namada_core", "namada_test_utils", "namada_tx_prelude", "namada_vp_prelude", + "num-traits", "prost", "regex", "serde_json", @@ -4460,7 +4569,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e35c06b98bf36aba164cc17cb25f7e232f5c4aeea73baa14b8a9f0d92dbfa65" dependencies = [ "bit-set", - "bitflags", + "bitflags 1.3.2", "byteorder", "lazy_static", "num-traits", @@ -4553,7 +4662,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63" dependencies = [ - "bitflags", + "bitflags 1.3.2", "memchr", "unicase", ] @@ -4687,7 +4796,7 @@ version = "10.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -4736,7 +4845,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -4745,7 +4854,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -4808,7 +4917,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "mach", "winapi", @@ -5008,11 +5117,24 @@ version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.7", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac5ffa1efe7548069688cd7028f32591853cd7b5b756d41bcffd2353e4fc75b4" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.3", "windows-sys 0.48.0", ] @@ -5303,7 +5425,7 @@ version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -5649,6 +5771,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "strum" version = "0.24.1" @@ -5766,7 +5894,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "redox_syscall 0.3.5", - "rustix", + "rustix 0.37.19", "windows-sys 0.45.0", ] @@ -6456,6 +6584,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "0.8.2"