diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 0000000000..404305d73c --- /dev/null +++ b/.cargo/config @@ -0,0 +1,3 @@ +[build] +# Enable Tokio's `tracing` support for `tokio-console` +rustflags = ["--cfg", "tokio_unstable"] \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 6d40be1bc6..d1faf3b448 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -24,7 +24,7 @@ dependencies = [ "toml 0.5.11", "tracing", "tracing-log 0.1.4", - "tracing-subscriber", + "tracing-subscriber 0.3.18", "wait-timeout", ] @@ -35,7 +35,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a3473aa652e90865a06b723102aaa4a54a7d9f2092dbf4582497a61d0537d3f" dependencies = [ "ident_case", - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 1.0.109", "synstructure", @@ -56,6 +56,38 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aead" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +dependencies = [ + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +dependencies = [ + "cfg-if 1.0.0", + "cipher 0.4.4", + "cpufeatures", +] + +[[package]] +name = "ahash" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +dependencies = [ + "cfg-if 1.0.0", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.2" @@ -65,6 +97,36 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + [[package]] name = "anstream" version = "0.6.11" @@ -81,9 +143,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "2faccea4cc4ab4a667ce676a30e8ec13922a692c99bb8f5b11f1502c72e04220" [[package]] name = "anstyle-parse" @@ -125,6 +187,234 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-crypto-primitives" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3a13b34da09176a8baba701233fdffbaa7c1b1192ce031a3da4e55ce1f1a56" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-relations", + "ark-serialize", + "ark-snark", + "ark-std", + "blake2", + "derivative", + "digest 0.10.7", + "rayon", + "sha2 0.10.8", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "rayon", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-r1cs-std", + "ark-std", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rayon", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2 1.0.78", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-groth16" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20ceafa83848c3e390f1cbf124bc3193b3e639b3f02009e0e290809a501b95fc" +dependencies = [ + "ark-crypto-primitives", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-relations", + "ark-serialize", + "ark-std", + "rayon", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "rayon", +] + +[[package]] +name = "ark-r1cs-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de1d1472e5cb020cb3405ce2567c91c8d43f21b674aef37b0202f5c3304761db" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-relations", + "ark-std", + "derivative", + "num-bigint", + "num-integer", + "num-traits", + "tracing", +] + +[[package]] +name = "ark-relations" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0" +dependencies = [ + "ark-ff", + "ark-std", + "tracing", + "tracing-subscriber 0.2.25", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2 1.0.78", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-snark" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84d3cc6833a335bb8a600241889ead68ee89a3cf8448081fb7694c0fe503da63" +dependencies = [ + "ark-ff", + "ark-relations", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", + "rayon", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + [[package]] name = "async-stream" version = "0.3.5" @@ -142,7 +432,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] @@ -153,7 +443,7 @@ version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] @@ -174,6 +464,15 @@ dependencies = [ "tungstenite", ] +[[package]] +name = "atomic-polyfill" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" +dependencies = [ + "critical-section", +] + [[package]] name = "atty" version = "0.2.14" @@ -261,12 +560,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.7" @@ -279,6 +572,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bech32" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9ff0bbfd639f15c74af777d81383cf53efb7c93613f6cab67c6c11e05bbf8b" + [[package]] name = "bech32" version = "0.9.1" @@ -291,6 +590,54 @@ version = "0.10.0-beta" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98f7eed2b2781a6f0b5c903471d48e15f56fb4e1165df8a9a2337fd1a59d45ea" +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bindgen" +version = "0.65.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" +dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "prettyplease", + "proc-macro2 1.0.78", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.48", +] + +[[package]] +name = "bip32" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164" +dependencies = [ + "bs58", + "hmac", + "k256", + "once_cell", + "pbkdf2 0.12.2", + "rand_core", + "ripemd", + "sha2 0.10.8", + "subtle", + "zeroize", +] + [[package]] name = "bitcoin" version = "0.31.1" @@ -339,69 +686,197 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] -name = "block-buffer" -version = "0.9.0" +name = "bitmaps" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" dependencies = [ - "generic-array", + "typenum", ] [[package]] -name = "block-buffer" -version = "0.10.4" +name = "bitvec" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "generic-array", + "funty", + "radium", + "tap", + "wyz", ] [[package]] -name = "bs58" -version = "0.5.0" +name = "blake2" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "tinyvec", + "digest 0.10.7", ] [[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "byte-unit" -version = "4.0.19" +name = "blake2b_simd" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da78b32057b8fdfc352504708feeba7216dcd65a2c9ab02978cbd288d1279b6c" +checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" dependencies = [ - "serde", - "utf8-width", + "arrayref", + "arrayvec 0.5.2", + "constant_time_eq 0.1.5", ] [[package]] -name = "bytecount" -version = "0.6.7" +name = "blake2b_simd" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "constant_time_eq 0.3.0", +] [[package]] -name = "byteorder" +name = "blake3" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "cc", + "cfg-if 1.0.0", + "constant_time_eq 0.3.0", +] [[package]] -name = "bytes" -version = "1.5.0" +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "borsh" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +dependencies = [ + "borsh-derive", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +dependencies = [ + "borsh-derive-internal", + "borsh-schema-derive-internal", + "proc-macro-crate 0.1.5", + "proc-macro2 1.0.78", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +dependencies = [ + "proc-macro2 1.0.78", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +dependencies = [ + "proc-macro2 1.0.78", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "sha2 0.10.8", + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byte-unit" +version = "4.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da78b32057b8fdfc352504708feeba7216dcd65a2c9ab02978cbd288d1279b6c" +dependencies = [ + "serde", + "utf8-width", +] + +[[package]] +name = "bytecount" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ "serde", ] +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "camino" version = "1.1.6" @@ -445,9 +920,19 @@ version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ + "jobserver", "libc", ] +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfg-if" version = "0.1.10" @@ -460,6 +945,74 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chacha20" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" +dependencies = [ + "cfg-if 1.0.0", + "cipher 0.3.0", + "cpufeatures", + "zeroize", +] + +[[package]] +name = "chacha20poly1305" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" +dependencies = [ + "aead", + "chacha20", + "cipher 0.3.0", + "poly1305", + "zeroize", +] + +[[package]] +name = "chrono" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-targets 0.52.0", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clang-sys" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "clap" version = "3.2.25" @@ -493,8 +1046,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" dependencies = [ "heck", - "proc-macro-error", - "proc-macro2", + "proc-macro-error 1.0.4", + "proc-macro2 1.0.78", "quote", "syn 1.0.109", ] @@ -508,6 +1061,52 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "cnidarium" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "async-trait", + "borsh", + "futures", + "hex", + "ibc-types", + "ics23", + "jmt", + "metrics", + "once_cell", + "parking_lot", + "pin-project", + "regex", + "rocksdb", + "sha2 0.10.8", + "smallvec", + "tempfile", + "tendermint", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "cnidarium-component" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "async-trait", + "cnidarium", + "hex", + "tendermint", +] + +[[package]] +name = "cobs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" + [[package]] name = "color-eyre" version = "0.6.2" @@ -554,19 +1153,37 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "const-crc32" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68d13f542d70e5b339bf46f6f74704ac052cfd526c58cd87996bd1ef4615b9a0" + [[package]] name = "const-oid" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + [[package]] name = "contracts" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1d1429e3bd78171c65aa010eabcdf8f863ba3254728dbfb0ad4b1545beac15c" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 1.0.109", ] @@ -596,6 +1213,12 @@ dependencies = [ "libc", ] +[[package]] +name = "critical-section" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" + [[package]] name = "crossbeam-channel" version = "0.4.4" @@ -615,6 +1238,16 @@ dependencies = [ "crossbeam-utils 0.8.19", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils 0.8.19", +] + [[package]] name = "crossbeam-epoch" version = "0.9.18" @@ -692,7 +1325,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] @@ -710,6 +1343,41 @@ dependencies = [ "zeroize", ] +[[package]] +name = "darling" +version = "0.20.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc5d6b04b3fd0ba9926f945895de7d806260a2d7431ba82e7edaecb043c4c6b8" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04e48a959bcd5c761246f5d090ebc2fbf7b9cd527a492b07a67510c108f1e7e3" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2 1.0.78", + "quote", + "strsim", + "syn 2.0.48", +] + +[[package]] +name = "darling_macro" +version = "0.20.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.48", +] + [[package]] name = "dashmap" version = "5.5.3" @@ -730,29 +1398,172 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] -name = "der" -version = "0.7.8" +name = "debugless-unwrap" +version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f400d0750c0c069e8493f2256cb4da6f604b6d2eeb69a0ca8863acde352f8400" + +[[package]] +name = "decaf377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75bb0f9fde498b60e4563c9346bbd4527d4ff4930a43c404ceb4cf63166c9ea4" dependencies = [ - "const-oid", + "anyhow", + "ark-bls12-377", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-groth16", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-snark", + "ark-std", + "hex", + "num-bigint", + "once_cell", + "thiserror", + "tracing", + "tracing-subscriber 0.2.25", "zeroize", ] [[package]] -name = "deranged" -version = "0.3.11" +name = "decaf377" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "1a80011d442d81fccfbefb5bd0d20bf70f111ca544ffed943d335dacf6a85713" dependencies = [ - "powerfmt", + "anyhow", + "ark-bls12-377", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-groth16", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-snark", + "ark-std", + "hex", + "num-bigint", + "once_cell", + "thiserror", + "tracing", + "tracing-subscriber 0.2.25", + "zeroize", ] [[package]] -name = "derivation-path" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" +name = "decaf377-fmd" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "ark-ff", + "ark-serialize", + "bitvec", + "blake2b_simd 1.0.2", + "decaf377 0.5.0", + "rand_core", + "thiserror", +] + +[[package]] +name = "decaf377-frost" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ff", + "blake2b_simd 1.0.2", + "decaf377 0.5.0", + "decaf377-rdsa", + "frost-core", + "frost-rerandomized", + "penumbra-proto", + "rand_core", +] + +[[package]] +name = "decaf377-ka" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "ark-ff", + "decaf377 0.5.0", + "hex", + "rand_core", + "thiserror", + "zeroize", + "zeroize_derive", +] + +[[package]] +name = "decaf377-rdsa" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc48f39a9939244f1d1e043b8065330022b8c4337cf359f32231fed8b2165973" +dependencies = [ + "ark-ff", + "ark-serialize", + "blake2b_simd 0.5.11", + "byteorder", + "decaf377 0.5.0", + "digest 0.9.0", + "hex", + "rand_core", + "serde", + "thiserror", +] + +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivation-path" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2 1.0.78", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive-getters" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2c35ab6e03642397cdda1dd58abbc05d418aef8e36297f336d5aba060fe8df" +dependencies = [ + "proc-macro2 1.0.78", + "quote", + "syn 1.0.109", +] [[package]] name = "derive_more" @@ -760,7 +1571,7 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 1.0.109", ] @@ -820,6 +1631,32 @@ dependencies = [ "winapi", ] +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2 1.0.78", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "document-features" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef5282ad69563b5fc40319526ba27e0e7363d552a896f0297d54f767717f9b95" +dependencies = [ + "litrs", +] + +[[package]] +name = "dyn-clone" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" + [[package]] name = "ecdsa" version = "0.16.9" @@ -854,7 +1691,9 @@ dependencies = [ "curve25519-dalek-ng", "hex", "rand_core", + "serde", "sha2 0.9.9", + "thiserror", "zeroize", ] @@ -910,6 +1749,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + [[package]] name = "encode_unicode" version = "0.3.6" @@ -963,6 +1808,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "erased-serde" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" +dependencies = [ + "serde", +] + [[package]] name = "errno" version = "0.3.8" @@ -982,6 +1836,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "ethnum" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" + [[package]] name = "eyre" version = "0.6.11" @@ -992,6 +1852,26 @@ dependencies = [ "once_cell", ] +[[package]] +name = "f4jumble" +version = "0.0.0" +source = "git+https://github.com/zcash/librustzcash?rev=2425a0869098e3b0588ccd73c42716bcf418612c#2425a0869098e3b0588ccd73c42716bcf418612c" +dependencies = [ + "blake2b_simd 1.0.2", +] + +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + [[package]] name = "fastrand" version = "2.0.1" @@ -1020,9 +1900,18 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ + "byteorder", + "rand", + "rustc-hex", "static_assertions", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flex-error" version = "0.4.4" @@ -1049,6 +1938,40 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "frost-core" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b61d737e19bea0cedda9a11dab96ab1fd1e4016f707e8ee9018d8f17d2cd18" +dependencies = [ + "byteorder", + "const-crc32", + "debugless-unwrap", + "derive-getters", + "document-features", + "hex", + "itertools 0.11.0", + "postcard", + "rand_core", + "serde", + "serdect", + "thiserror", + "visibility", + "zeroize", +] + +[[package]] +name = "frost-rerandomized" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b45409d93cf5000f52ae64847a8a270a4562f1a035e74c3fae0e2462adb97ae" +dependencies = [ + "derive-getters", + "document-features", + "frost-core", + "rand_core", +] + [[package]] name = "fs-err" version = "2.11.0" @@ -1058,6 +1981,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures" version = "0.3.30" @@ -1112,7 +2041,7 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] @@ -1147,6 +2076,36 @@ dependencies = [ "slab", ] +[[package]] +name = "genawaiter" +version = "0.99.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c86bd0361bcbde39b13475e6e36cb24c329964aa2611be285289d1e4b751c1a0" +dependencies = [ + "genawaiter-macro", + "genawaiter-proc-macro", + "proc-macro-hack", +] + +[[package]] +name = "genawaiter-macro" +version = "0.99.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b32dfe1fdfc0bbde1f22a5da25355514b5e450c33a6af6770884c8750aedfbc" + +[[package]] +name = "genawaiter-proc-macro" +version = "0.99.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784f84eebc366e15251c4a8c3acee82a6a6f427949776ecb88377362a9621738" +dependencies = [ + "proc-macro-error 0.4.12", + "proc-macro-hack", + "proc-macro2 1.0.78", + "quote", + "syn 1.0.109", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -1209,7 +2168,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "729f9bd3449d77e7831a18abfb7ba2f99ee813dfd15b8c2167c9a54ba20aa99d" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 1.0.109", ] @@ -1239,17 +2198,54 @@ version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hash_hasher" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74721d007512d0cb3338cd20f0654ac913920061a4c4d0d8708edb3f2a698c0c" + [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + [[package]] name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.3", +] [[package]] name = "hdpath" @@ -1260,6 +2256,30 @@ dependencies = [ "byteorder", ] +[[package]] +name = "hdrhistogram" +version = "7.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" +dependencies = [ + "byteorder", + "num-traits", +] + +[[package]] +name = "heapless" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version", + "serde", + "spin", + "stable_deref_trait", +] + [[package]] name = "heck" version = "0.4.1" @@ -1308,6 +2328,15 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "http" version = "0.2.11" @@ -1408,6 +2437,29 @@ dependencies = [ "tokio-io-timeout", ] +[[package]] +name = "iana-time-zone" +version = "0.1.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "ibc-chain-registry" version = "0.27.0" @@ -1416,7 +2468,7 @@ dependencies = [ "flex-error", "futures", "http", - "ibc-proto", + "ibc-proto 0.41.0", "ibc-relayer-types", "itertools 0.10.5", "reqwest", @@ -1447,17 +2499,35 @@ dependencies = [ "tonic", ] +[[package]] +name = "ibc-proto" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4222cfac37f21da28292db0f2673fdb8455284895891ff09979680243efb9a20" +dependencies = [ + "base64", + "bytes", + "flex-error", + "ics23", + "informalsystems-pbjson", + "prost", + "serde", + "subtle-encoding", + "tendermint-proto", + "tonic", +] + [[package]] name = "ibc-proto" version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd4ee32b22d3b06f31529b956f4928e5c9a068d71e46cf6abfa19c31ca550553" dependencies = [ - "base64 0.21.7", + "base64", "bytes", "flex-error", "ics23", - "informalsystems-pbjson 0.7.0", + "informalsystems-pbjson", "prost", "serde", "subtle-encoding", @@ -1491,7 +2561,7 @@ dependencies = [ "http", "humantime", "humantime-serde", - "ibc-proto", + "ibc-proto 0.41.0", "ibc-relayer-types", "ibc-telemetry", "itertools 0.10.5", @@ -1499,6 +2569,16 @@ dependencies = [ "num-bigint", "num-rational", "once_cell", + "pbjson-types", + "penumbra-asset", + "penumbra-custody", + "penumbra-fee", + "penumbra-ibc", + "penumbra-keys", + "penumbra-proto", + "penumbra-transaction", + "penumbra-view", + "penumbra-wallet", "prost", "regex", "reqwest", @@ -1530,7 +2610,7 @@ dependencies = [ "toml 0.8.8", "tonic", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.18", "uuid 1.7.0", ] @@ -1572,7 +2652,7 @@ dependencies = [ "time", "tokio", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.18", ] [[package]] @@ -1598,7 +2678,7 @@ dependencies = [ "derive_more", "env_logger 0.11.1", "flex-error", - "ibc-proto", + "ibc-proto 0.41.0", "ics23", "itertools 0.10.5", "num-rational", @@ -1617,7 +2697,7 @@ dependencies = [ "test-log", "time", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.18", "uint", ] @@ -1651,7 +2731,7 @@ dependencies = [ "hdpath", "hex", "http", - "ibc-proto", + "ibc-proto 0.41.0", "ibc-relayer", "ibc-relayer-cli", "ibc-relayer-types", @@ -1670,29 +2750,289 @@ dependencies = [ "toml 0.8.8", "tonic", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.18", ] [[package]] -name = "ics23" -version = "0.11.0" +name = "ibc-types" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3178d46ae589af5cab981989a8c631a76d12411edc54d23fd35a52e2fffee07f" +dependencies = [ + "ibc-types-core-channel", + "ibc-types-core-client", + "ibc-types-core-commitment", + "ibc-types-core-connection", + "ibc-types-domain-type", + "ibc-types-identifier", + "ibc-types-lightclients-tendermint", + "ibc-types-path", + "ibc-types-timestamp", + "ibc-types-transfer", +] + +[[package]] +name = "ibc-types-core-channel" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "661e2d6f79952a65bc92b1c81f639ebd37228dae6ff412a5aba7d474bdc4b957" +checksum = "743cdc9ec7f4b2c0985136ee0af8f24536b5e1624fb5d88fde7c300881322a82" dependencies = [ "anyhow", "bytes", - "hex", - "informalsystems-pbjson 0.6.0", + "derive_more", + "displaydoc", + "ibc-proto 0.40.0", + "ibc-types-core-client", + "ibc-types-core-commitment", + "ibc-types-core-connection", + "ibc-types-domain-type", + "ibc-types-identifier", + "ibc-types-timestamp", + "ics23", + "num-traits", + "proc-macro2 0.1.10", "prost", - "ripemd", + "safe-regex", "serde", + "serde_json", "sha2 0.10.8", - "sha3", + "subtle-encoding", + "tendermint", + "tendermint-proto", + "time", + "tracing", ] [[package]] -name = "ident_case" -version = "1.0.1" +name = "ibc-types-core-client" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab7ff8d18f423c0ec0614104f3c07e320cdce2ae5d395606c7d83e4e25a34afc" +dependencies = [ + "anyhow", + "bytes", + "derive_more", + "displaydoc", + "ibc-proto 0.40.0", + "ibc-types-domain-type", + "ibc-types-identifier", + "ibc-types-timestamp", + "ics23", + "num-traits", + "prost", + "serde", + "serde_json", + "sha2 0.10.8", + "subtle-encoding", + "tendermint", + "tendermint-proto", + "time", +] + +[[package]] +name = "ibc-types-core-commitment" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "421f7cdfc48065437b276a2abe597ef47d6ffaff4815ba4efd111d5a3af43998" +dependencies = [ + "anyhow", + "bytes", + "derive_more", + "displaydoc", + "dyn-clone", + "erased-serde", + "hex", + "ibc-proto 0.40.0", + "ibc-types-domain-type", + "ibc-types-identifier", + "ibc-types-timestamp", + "ics23", + "num-traits", + "primitive-types", + "prost", + "safe-regex", + "serde", + "serde_json", + "sha2 0.10.8", + "subtle-encoding", + "tendermint", + "tendermint-light-client-verifier", + "tendermint-proto", + "time", + "tracing", + "uint", +] + +[[package]] +name = "ibc-types-core-connection" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f79832a232d5a69325f87aff6a4703c5490f39107a223998b30e83bc3a69510" +dependencies = [ + "anyhow", + "bytes", + "derive_more", + "displaydoc", + "ibc-proto 0.40.0", + "ibc-types-core-client", + "ibc-types-core-commitment", + "ibc-types-domain-type", + "ibc-types-identifier", + "ibc-types-timestamp", + "ics23", + "num-traits", + "prost", + "safe-regex", + "serde", + "serde_json", + "sha2 0.10.8", + "subtle-encoding", + "tendermint", + "tendermint-proto", + "time", +] + +[[package]] +name = "ibc-types-domain-type" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73649683daa4fa967f54ef7cf3f98429522895c37fc2dee2a94d490969444779" +dependencies = [ + "anyhow", + "bytes", + "prost", +] + +[[package]] +name = "ibc-types-identifier" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e007333cded43d125cacb26aeb1a3630a8ffe03144d798ad9a8f2c99e4529a3a" +dependencies = [ + "displaydoc", + "serde", +] + +[[package]] +name = "ibc-types-lightclients-tendermint" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7f9305a26e8d78faca85ac5414d5432549bb6c196a49032c00e723c9054d7b5" +dependencies = [ + "anyhow", + "bytes", + "derive_more", + "displaydoc", + "dyn-clone", + "erased-serde", + "ibc-proto 0.40.0", + "ibc-types-core-client", + "ibc-types-core-commitment", + "ibc-types-core-connection", + "ibc-types-domain-type", + "ibc-types-identifier", + "ibc-types-timestamp", + "ics23", + "num-traits", + "primitive-types", + "prost", + "safe-regex", + "serde", + "serde_json", + "sha2 0.10.8", + "subtle-encoding", + "tendermint", + "tendermint-light-client-verifier", + "tendermint-proto", + "time", + "tracing", + "uint", +] + +[[package]] +name = "ibc-types-path" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22688a533f90b48e6fde7a1271028f01b66f7a44d298747403bc346fdf08529" +dependencies = [ + "bytes", + "derive_more", + "displaydoc", + "ibc-types-core-channel", + "ibc-types-core-client", + "ibc-types-core-connection", + "num-traits", + "prost", + "serde", + "serde_json", + "subtle-encoding", + "tendermint", + "tendermint-proto", + "time", +] + +[[package]] +name = "ibc-types-timestamp" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25e93de4be3480445111959b61b10b4f1865e6cad206961a46cb5170b88fdfc0" +dependencies = [ + "bytes", + "displaydoc", + "num-traits", + "prost", + "serde", + "serde_json", + "subtle-encoding", + "tendermint", + "tendermint-proto", + "time", +] + +[[package]] +name = "ibc-types-transfer" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45f7420000987bca27f718a44a220efbf4114dcf8dffbfea1aaed6e9b1e9551a" +dependencies = [ + "displaydoc", + "serde", +] + +[[package]] +name = "ibig" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1fcc7f316b2c079dde77564a1360639c1a956a23fa96122732e416cb10717bb" +dependencies = [ + "cfg-if 1.0.0", + "num-traits", + "rand", + "static_assertions", +] + +[[package]] +name = "ics23" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc3b8be84e7285c73b88effdc3294b552277d6b0ec728ee016c861b7b9a2c19c" +dependencies = [ + "anyhow", + "blake2", + "blake3", + "bytes", + "hex", + "informalsystems-pbjson", + "prost", + "ripemd", + "serde", + "sha2 0.10.8", + "sha3", +] + +[[package]] +name = "ident_case" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" @@ -1706,6 +3046,30 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core", + "rand_xoshiro", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + [[package]] name = "impl-serde" version = "0.4.0" @@ -1715,6 +3079,17 @@ dependencies = [ "serde", ] +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2 1.0.78", + "quote", + "syn 1.0.109", +] + [[package]] name = "indenter" version = "0.3.3" @@ -1729,6 +3104,7 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", + "serde", ] [[package]] @@ -1739,26 +3115,26 @@ checksum = "433de089bd45971eecf4668ee0ee8f4cec17db4f8bd8f7bc3197a6ce37aa7d9b" dependencies = [ "equivalent", "hashbrown 0.14.3", + "serde", ] [[package]] name = "informalsystems-pbjson" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eecd90f87bea412eac91c6ef94f6b1e390128290898cbe14f2b926787ae1fb" +checksum = "9aa4a0980c8379295100d70854354e78df2ee1c6ca0f96ffe89afeb3140e3a3d" dependencies = [ - "base64 0.13.1", + "base64", "serde", ] [[package]] -name = "informalsystems-pbjson" -version = "0.7.0" +name = "inout" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aa4a0980c8379295100d70854354e78df2ee1c6ca0f96ffe89afeb3140e3a3d" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "base64 0.21.7", - "serde", + "generic-array", ] [[package]] @@ -1791,6 +3167,37 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +[[package]] +name = "jmt" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2950721a65dff82492e30fe67076127135d0d710aa0140f21efafda2aee7849" +dependencies = [ + "anyhow", + "borsh", + "digest 0.10.7", + "hashbrown 0.13.2", + "hex", + "ics23", + "itertools 0.10.5", + "mirai-annotations", + "num-derive", + "num-traits", + "serde", + "sha2 0.10.8", + "thiserror", + "tracing", +] + +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.67" @@ -1827,12 +3234,28 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libc" version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +[[package]] +name = "libloading" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +dependencies = [ + "cfg-if 1.0.0", + "windows-sys 0.48.0", +] + [[package]] name = "libredox" version = "0.0.1" @@ -1845,30 +3268,93 @@ dependencies = [ ] [[package]] -name = "linux-raw-sys" -version = "0.4.13" +name = "librocksdb-sys" +version = "0.11.0+8.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" +dependencies = [ + "bindgen", + "bzip2-sys", + "cc", + "glob", + "libc", + "libz-sys", + "lz4-sys", + "zstd-sys", +] [[package]] -name = "lock_api" -version = "0.4.11" +name = "libsqlite3-sys" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" dependencies = [ - "autocfg", - "scopeguard", + "cc", + "pkg-config", + "vcpkg", ] [[package]] -name = "log" -version = "0.4.20" +name = "libz-sys" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] [[package]] -name = "matchers" -version = "0.1.0" +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "lz4-sys" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "matchers" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchers" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ @@ -1893,12 +3379,40 @@ version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core", + "zeroize", +] + +[[package]] +name = "metrics" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77b9e10a211c839210fd7f99954bda26e5f8e26ec686ad68da6a32df7c80e782" +dependencies = [ + "ahash", + "portable-atomic", +] + [[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.7.1" @@ -1919,11 +3433,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mirai-annotations" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" + [[package]] name = "moka" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9dc9808102655926a6086abd0b9965ebefd4a39ef0d184f074c34ba5049ec6" +checksum = "b1911e88d5831f748a4097a43862d129e3c6fca831eecac9b8db6d01d93c9de2" dependencies = [ "crossbeam-channel 0.5.11", "crossbeam-epoch", @@ -1940,6 +3460,22 @@ dependencies = [ "uuid 1.7.0", ] +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -1950,6 +3486,20 @@ dependencies = [ "winapi", ] +[[package]] +name = "num" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + [[package]] name = "num-bigint" version = "0.4.4" @@ -1962,13 +3512,22 @@ dependencies = [ "serde", ] +[[package]] +name = "num-complex" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +dependencies = [ + "num-traits", +] + [[package]] name = "num-derive" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 1.0.109", ] @@ -1983,6 +3542,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-rational" version = "0.4.1" @@ -2126,6 +3696,32 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +[[package]] +name = "parity-scale-codec" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +dependencies = [ + "arrayvec 0.7.4", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +dependencies = [ + "proc-macro-crate 2.0.0", + "proc-macro2 1.0.78", + "quote", + "syn 1.0.109", +] + [[package]] name = "parking_lot" version = "0.12.1" @@ -2155,6 +3751,43 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "pbjson" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90" +dependencies = [ + "base64", + "serde", +] + +[[package]] +name = "pbjson-build" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2580e33f2292d34be285c5bc3dba5259542b083cfad6037b6d70345f24dcb735" +dependencies = [ + "heck", + "itertools 0.11.0", + "prost", + "prost-types", +] + +[[package]] +name = "pbjson-types" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18f596653ba4ac51bdecbb4ef6773bc7f56042dc13927910de1684ad3d32aa12" +dependencies = [ + "bytes", + "chrono", + "pbjson", + "pbjson-build", + "prost", + "prost-build", + "serde", +] + [[package]] name = "pbkdf2" version = "0.11.0" @@ -2164,6 +3797,22 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + [[package]] name = "peg" version = "0.7.0" @@ -2181,7 +3830,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c" dependencies = [ "peg-runtime", - "proc-macro2", + "proc-macro2 1.0.78", "quote", ] @@ -2192,61 +3841,1053 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088" [[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +name = "penumbra-app" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" dependencies = [ - "pin-project-internal", + "anyhow", + "ark-ff", + "async-trait", + "base64", + "bech32 0.8.1", + "bincode", + "bitvec", + "blake2b_simd 1.0.2", + "cnidarium", + "cnidarium-component", + "decaf377 0.5.0", + "decaf377-rdsa", + "futures", + "hex", + "ibc-proto 0.40.0", + "ibc-types", + "im", + "jmt", + "metrics", + "once_cell", + "parking_lot", + "penumbra-asset", + "penumbra-community-pool", + "penumbra-compact-block", + "penumbra-dex", + "penumbra-distributions", + "penumbra-fee", + "penumbra-funding", + "penumbra-genesis", + "penumbra-governance", + "penumbra-ibc", + "penumbra-keys", + "penumbra-num", + "penumbra-proof-params", + "penumbra-proto", + "penumbra-sct", + "penumbra-shielded-pool", + "penumbra-stake", + "penumbra-tct", + "penumbra-transaction", + "penumbra-txhash", + "prost", + "rand_chacha", + "regex", + "serde", + "serde_json", + "serde_unit_struct", + "serde_with", + "sha2 0.10.8", + "tempfile", + "tendermint", + "tendermint-light-client-verifier", + "tendermint-proto", + "tokio", + "tonic", + "tracing", ] [[package]] -name = "pin-project-internal" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +name = "penumbra-asset" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", + "anyhow", + "ark-ff", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-std", + "base64", + "bech32 0.8.1", + "blake2b_simd 1.0.2", + "bytes", + "decaf377 0.5.0", + "decaf377-fmd", + "decaf377-rdsa", + "derivative", + "ethnum", + "hex", + "ibig", + "num-bigint", + "once_cell", + "penumbra-num", + "penumbra-proto", + "poseidon377", + "rand", + "rand_core", + "regex", + "serde", + "serde_with", + "sha2 0.10.8", + "thiserror", + "tracing", ] [[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +name = "penumbra-community-pool" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ff", + "async-trait", + "base64", + "blake2b_simd 1.0.2", + "cnidarium", + "cnidarium-component", + "futures", + "hex", + "metrics", + "once_cell", + "pbjson-types", + "penumbra-asset", + "penumbra-keys", + "penumbra-num", + "penumbra-proto", + "penumbra-sct", + "penumbra-shielded-pool", + "penumbra-txhash", + "prost", + "serde", + "sha2 0.10.8", + "tendermint", + "tendermint-light-client-verifier", + "tracing", +] [[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +name = "penumbra-compact-block" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" dependencies = [ - "der", - "spki", + "anyhow", + "ark-ff", + "async-trait", + "blake2b_simd 1.0.2", + "bytes", + "cnidarium", + "cnidarium-component", + "decaf377-rdsa", + "futures", + "im", + "metrics", + "penumbra-community-pool", + "penumbra-dex", + "penumbra-fee", + "penumbra-governance", + "penumbra-ibc", + "penumbra-proof-params", + "penumbra-proto", + "penumbra-sct", + "penumbra-shielded-pool", + "penumbra-stake", + "penumbra-tct", + "rand", + "rand_core", + "serde", + "tendermint", + "tokio", + "tokio-stream", + "tonic", + "tracing", ] [[package]] -name = "platforms" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" +name = "penumbra-custody" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ff", + "ark-serialize", + "base64", + "blake2b_simd 1.0.2", + "bytes", + "chacha20poly1305", + "decaf377 0.5.0", + "decaf377-frost", + "decaf377-ka", + "decaf377-rdsa", + "ed25519-consensus", + "futures", + "hex", + "penumbra-keys", + "penumbra-proto", + "penumbra-transaction", + "penumbra-txhash", + "prost", + "rand_core", + "serde", + "serde_json", + "serde_with", + "tokio", + "tonic", + "tracing", +] [[package]] -name = "powerfmt" +name = "penumbra-dex" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ff", + "ark-groth16", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-snark", + "async-stream", + "async-trait", + "base64", + "bincode", + "blake2b_simd 1.0.2", + "cnidarium", + "cnidarium-component", + "decaf377 0.5.0", + "decaf377-fmd", + "decaf377-ka", + "decaf377-rdsa", + "futures", + "hex", + "im", + "metrics", + "once_cell", + "parking_lot", + "pbjson-types", + "penumbra-asset", + "penumbra-fee", + "penumbra-keys", + "penumbra-num", + "penumbra-proof-params", + "penumbra-proto", + "penumbra-sct", + "penumbra-shielded-pool", + "penumbra-tct", + "penumbra-txhash", + "poseidon377", + "prost", + "rand_core", + "regex", + "serde", + "serde_json", + "sha2 0.10.8", + "tendermint", + "tendermint-light-client-verifier", + "thiserror", + "tokio", + "tonic", + "tracing", +] + +[[package]] +name = "penumbra-distributions" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "async-trait", + "cnidarium", + "cnidarium-component", + "penumbra-asset", + "penumbra-num", + "penumbra-proto", + "penumbra-sct", + "serde", + "tendermint", + "tracing", +] + +[[package]] +name = "penumbra-fee" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ff", + "async-trait", + "blake2b_simd 1.0.2", + "bytes", + "cnidarium", + "cnidarium-component", + "decaf377 0.5.0", + "decaf377-rdsa", + "metrics", + "penumbra-asset", + "penumbra-num", + "penumbra-proto", + "rand", + "rand_core", + "serde", + "tendermint", + "tonic", + "tracing", +] + +[[package]] +name = "penumbra-funding" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "async-trait", + "cnidarium", + "cnidarium-component", + "futures", + "penumbra-asset", + "penumbra-community-pool", + "penumbra-distributions", + "penumbra-proto", + "penumbra-sct", + "penumbra-shielded-pool", + "penumbra-stake", + "serde", + "tendermint", + "tracing", +] + +[[package]] +name = "penumbra-genesis" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "penumbra-community-pool", + "penumbra-distributions", + "penumbra-fee", + "penumbra-funding", + "penumbra-governance", + "penumbra-ibc", + "penumbra-proto", + "penumbra-sct", + "penumbra-shielded-pool", + "penumbra-stake", + "serde", +] + +[[package]] +name = "penumbra-governance" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ff", + "ark-groth16", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-snark", + "async-stream", + "async-trait", + "base64", + "blake2b_simd 1.0.2", + "bytes", + "cnidarium", + "cnidarium-component", + "decaf377 0.5.0", + "decaf377-rdsa", + "futures", + "ibc-types", + "im", + "metrics", + "once_cell", + "pbjson-types", + "penumbra-asset", + "penumbra-community-pool", + "penumbra-distributions", + "penumbra-fee", + "penumbra-funding", + "penumbra-ibc", + "penumbra-keys", + "penumbra-num", + "penumbra-proof-params", + "penumbra-proto", + "penumbra-sct", + "penumbra-shielded-pool", + "penumbra-stake", + "penumbra-tct", + "penumbra-txhash", + "rand", + "rand_chacha", + "rand_core", + "regex", + "serde", + "tendermint", + "tokio", + "tonic", + "tracing", +] + +[[package]] +name = "penumbra-ibc" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ff", + "async-trait", + "base64", + "blake2b_simd 1.0.2", + "cnidarium", + "hex", + "ibc-proto 0.40.0", + "ibc-types", + "ics23", + "metrics", + "num-traits", + "once_cell", + "pbjson-types", + "penumbra-asset", + "penumbra-num", + "penumbra-proto", + "penumbra-sct", + "penumbra-txhash", + "prost", + "serde", + "serde_json", + "sha2 0.10.8", + "tendermint", + "tendermint-light-client-verifier", + "tower", + "tracing", +] + +[[package]] +name = "penumbra-keys" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "aes", + "anyhow", + "ark-ff", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-std", + "base64", + "bech32 0.8.1", + "bip32", + "blake2b_simd 1.0.2", + "bytes", + "chacha20poly1305", + "decaf377 0.5.0", + "decaf377-fmd", + "decaf377-ka", + "decaf377-rdsa", + "derivative", + "ethnum", + "f4jumble", + "hex", + "hmac", + "ibig", + "num-bigint", + "once_cell", + "pbkdf2 0.12.2", + "penumbra-asset", + "penumbra-proto", + "penumbra-tct", + "poseidon377", + "rand", + "rand_core", + "regex", + "serde", + "sha2 0.10.8", + "thiserror", + "tracing", +] + +[[package]] +name = "penumbra-num" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ff", + "ark-groth16", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-snark", + "ark-std", + "base64", + "bech32 0.8.1", + "blake2b_simd 1.0.2", + "bytes", + "decaf377 0.5.0", + "decaf377-fmd", + "decaf377-rdsa", + "derivative", + "ethnum", + "hex", + "ibig", + "num-bigint", + "once_cell", + "penumbra-proto", + "rand", + "rand_core", + "regex", + "serde", + "sha2 0.10.8", + "thiserror", + "tracing", +] + +[[package]] +name = "penumbra-proof-params" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ec", + "ark-ff", + "ark-groth16", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-snark", + "ark-std", + "bech32 0.8.1", + "decaf377 0.5.0", + "lazy_static", + "num-bigint", + "once_cell", + "rand", + "rand_core", + "serde", + "sha2 0.10.8", + "tracing", +] + +[[package]] +name = "penumbra-proto" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "async-trait", + "bech32 0.8.1", + "bytes", + "cnidarium", + "decaf377-fmd", + "decaf377-rdsa", + "futures", + "hex", + "http-body", + "ibc-proto 0.40.0", + "ibc-types", + "ics23", + "pbjson", + "pbjson-types", + "pin-project", + "prost", + "serde", + "serde_json", + "subtle-encoding", + "tendermint", + "tonic", + "tower", + "tracing", +] + +[[package]] +name = "penumbra-sct" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ff", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "async-trait", + "bincode", + "blake2b_simd 1.0.2", + "bytes", + "cnidarium", + "cnidarium-component", + "decaf377 0.5.0", + "decaf377-rdsa", + "hex", + "im", + "metrics", + "once_cell", + "penumbra-keys", + "penumbra-proto", + "penumbra-tct", + "poseidon377", + "rand", + "rand_core", + "serde", + "tendermint", + "tonic", + "tracing", +] + +[[package]] +name = "penumbra-shielded-pool" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ff", + "ark-groth16", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-snark", + "async-trait", + "base64", + "blake2b_simd 1.0.2", + "bytes", + "chacha20poly1305", + "cnidarium", + "cnidarium-component", + "decaf377 0.5.0", + "decaf377-fmd", + "decaf377-ka", + "decaf377-rdsa", + "hex", + "ibc-types", + "im", + "metrics", + "once_cell", + "penumbra-asset", + "penumbra-ibc", + "penumbra-keys", + "penumbra-num", + "penumbra-proof-params", + "penumbra-proto", + "penumbra-sct", + "penumbra-tct", + "penumbra-txhash", + "poseidon377", + "prost", + "rand", + "rand_core", + "serde", + "serde_json", + "tendermint", + "thiserror", + "tonic", + "tracing", +] + +[[package]] +name = "penumbra-stake" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ff", + "ark-groth16", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-snark", + "async-stream", + "async-trait", + "base64", + "bech32 0.8.1", + "bitvec", + "cnidarium", + "cnidarium-component", + "decaf377 0.5.0", + "decaf377-rdsa", + "futures", + "hex", + "im", + "metrics", + "once_cell", + "penumbra-asset", + "penumbra-community-pool", + "penumbra-distributions", + "penumbra-keys", + "penumbra-num", + "penumbra-proof-params", + "penumbra-proto", + "penumbra-sct", + "penumbra-shielded-pool", + "penumbra-tct", + "penumbra-txhash", + "rand_chacha", + "rand_core", + "regex", + "serde", + "serde_unit_struct", + "serde_with", + "sha2 0.10.8", + "tendermint", + "tokio", + "tonic", + "tracing", +] + +[[package]] +name = "penumbra-tct" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "ark-ed-on-bls12-377", + "ark-ff", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "async-trait", + "blake2b_simd 1.0.2", + "decaf377 0.5.0", + "derivative", + "futures", + "hash_hasher", + "hex", + "im", + "once_cell", + "parking_lot", + "penumbra-proto", + "poseidon377", + "rand", + "serde", + "thiserror", + "tracing", +] + +[[package]] +name = "penumbra-transaction" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-ff", + "ark-serialize", + "base64", + "bech32 0.8.1", + "blake2b_simd 1.0.2", + "bytes", + "chacha20poly1305", + "decaf377 0.5.0", + "decaf377-fmd", + "decaf377-ka", + "decaf377-rdsa", + "derivative", + "hex", + "ibc-proto 0.40.0", + "ibc-types", + "num-bigint", + "once_cell", + "pbjson-types", + "penumbra-asset", + "penumbra-community-pool", + "penumbra-dex", + "penumbra-fee", + "penumbra-governance", + "penumbra-ibc", + "penumbra-keys", + "penumbra-num", + "penumbra-proof-params", + "penumbra-proto", + "penumbra-sct", + "penumbra-shielded-pool", + "penumbra-stake", + "penumbra-tct", + "penumbra-txhash", + "poseidon377", + "rand", + "rand_core", + "regex", + "serde", + "serde_json", + "sha2 0.10.8", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "penumbra-txhash" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "blake2b_simd 1.0.2", + "hex", + "penumbra-proto", + "penumbra-tct", + "serde", +] + +[[package]] +name = "penumbra-view" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-std", + "async-stream", + "async-trait", + "bytes", + "camino", + "decaf377 0.5.0", + "digest 0.9.0", + "ed25519-consensus", + "futures", + "genawaiter", + "hex", + "ibc-types", + "metrics", + "once_cell", + "parking_lot", + "penumbra-app", + "penumbra-asset", + "penumbra-community-pool", + "penumbra-compact-block", + "penumbra-dex", + "penumbra-distributions", + "penumbra-fee", + "penumbra-funding", + "penumbra-governance", + "penumbra-ibc", + "penumbra-keys", + "penumbra-num", + "penumbra-proto", + "penumbra-sct", + "penumbra-shielded-pool", + "penumbra-stake", + "penumbra-tct", + "penumbra-transaction", + "prost", + "r2d2", + "r2d2_sqlite", + "rand", + "rand_core", + "serde", + "serde_json", + "sha2 0.10.8", + "tendermint", + "tokio", + "tokio-stream", + "tonic", + "tracing", + "tracing-subscriber 0.3.18", + "url", +] + +[[package]] +name = "penumbra-wallet" +version = "0.66.0" +source = "git+https://github.com/penumbra-zone/penumbra?branch=main#3933ffe24522134d7552eb16074bb8d59a4f0d9f" +dependencies = [ + "anyhow", + "ark-std", + "bincode", + "bytes", + "decaf377 0.5.0", + "hex", + "penumbra-app", + "penumbra-asset", + "penumbra-custody", + "penumbra-dex", + "penumbra-fee", + "penumbra-governance", + "penumbra-keys", + "penumbra-num", + "penumbra-proto", + "penumbra-stake", + "penumbra-tct", + "penumbra-transaction", + "penumbra-view", + "pin-project", + "rand", + "rand_core", + "serde", + "serde_json", + "tokio", + "tonic", + "tower", + "tracing", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap 2.2.1", +] + +[[package]] +name = "pin-project" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +dependencies = [ + "proc-macro2 1.0.78", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" + +[[package]] +name = "platforms" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" + +[[package]] +name = "poly1305" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "poseidon-parameters" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58236ff8bf455c13046c92f041e887c4fd0e64819387a81177d6c70ebeb41711" +dependencies = [ + "anyhow", + "ark-ff", + "num-integer", +] + +[[package]] +name = "poseidon-paramgen" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69506f91189a68bff6c0e4f8c2beaf6b053430be7743059a0110477e9c28fda" +dependencies = [ + "anyhow", + "ark-ff", + "ark-std", + "getrandom", + "merlin", + "num", + "num-bigint", + "poseidon-parameters", + "rand_core", +] + +[[package]] +name = "poseidon-permutation" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a022268b53cec1e99c4bd8c81be249709e971b78a433d9f5556e31f3cd7730b0" +dependencies = [ + "ark-ff", + "ark-r1cs-std", + "ark-relations", + "ark-std", + "poseidon-parameters", +] + +[[package]] +name = "poseidon377" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11dbcae1c9e4624576dd7631a1f2419a18afeaeef104263d70b6f20256ea5b72" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-groth16", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-snark", + "ark-std", + "decaf377 0.4.0", + "num-bigint", + "once_cell", + "poseidon-parameters", + "poseidon-paramgen", + "poseidon-permutation", + "tracing", +] + +[[package]] +name = "postcard" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8" +dependencies = [ + "cobs", + "embedded-io", + "heapless", + "serde", +] + +[[package]] +name = "powerfmt" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" @@ -2257,6 +4898,16 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "prettyplease" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +dependencies = [ + "proc-macro2 1.0.78", + "syn 2.0.48", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -2264,20 +4915,65 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", + "impl-codec", "impl-serde", "uint", ] +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml 0.5.11", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + +[[package]] +name = "proc-macro-error" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7" +dependencies = [ + "proc-macro-error-attr 0.4.12", + "proc-macro2 1.0.78", + "quote", + "syn 1.0.109", + "version_check", +] + [[package]] name = "proc-macro-error" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ - "proc-macro-error-attr", - "proc-macro2", + "proc-macro-error-attr 1.0.4", + "proc-macro2 1.0.78", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de" +dependencies = [ + "proc-macro2 1.0.78", "quote", "syn 1.0.109", + "syn-mid", "version_check", ] @@ -2287,11 +4983,26 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "version_check", ] +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + +[[package]] +name = "proc-macro2" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "557facecbf90ff79faea80a08230d10c812016aa19198ed07d06de61f965b5cc" +dependencies = [ + "unicode-xid 0.1.0", +] + [[package]] name = "proc-macro2" version = "1.0.78" @@ -2326,6 +5037,28 @@ dependencies = [ "prost-derive", ] +[[package]] +name = "prost-build" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" +dependencies = [ + "bytes", + "heck", + "itertools 0.11.0", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 2.0.48", + "tempfile", + "which", +] + [[package]] name = "prost-derive" version = "0.12.3" @@ -2334,7 +5067,7 @@ checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", "itertools 0.11.0", - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] @@ -2356,11 +5089,11 @@ checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" [[package]] name = "pulldown-cmark" -version = "0.9.3" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" +checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "memchr", "unicase", ] @@ -2386,9 +5119,37 @@ version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", +] + +[[package]] +name = "r2d2" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" +dependencies = [ + "log", + "parking_lot", + "scheduled-thread-pool", +] + +[[package]] +name = "r2d2_sqlite" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99f31323d6161385f385046738df520e0e8694fa74852d35891fc0be08348ddc" +dependencies = [ + "r2d2", + "rusqlite", + "uuid 1.7.0", ] +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand" version = "0.8.5" @@ -2419,6 +5180,15 @@ dependencies = [ "getrandom", ] +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core", +] + [[package]] name = "raw-cpuid" version = "11.0.1" @@ -2428,6 +5198,26 @@ dependencies = [ "bitflags 2.4.2", ] +[[package]] +name = "rayon" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils 0.8.19", +] + [[package]] name = "redox_syscall" version = "0.4.1" @@ -2456,7 +5246,7 @@ checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.4", + "regex-automata 0.4.5", "regex-syntax 0.8.2", ] @@ -2471,9 +5261,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -2498,7 +5288,7 @@ version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ - "base64 0.21.7", + "base64", "bytes", "encoding_rs", "futures-core", @@ -2571,6 +5361,30 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "rocksdb" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" +dependencies = [ + "libc", + "librocksdb-sys", +] + +[[package]] +name = "rusqlite" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" +dependencies = [ + "bitflags 2.4.2", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -2583,6 +5397,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + [[package]] name = "rustc_version" version = "0.4.0" @@ -2635,7 +5455,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.7", + "base64", ] [[package]] @@ -2660,6 +5480,53 @@ version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +[[package]] +name = "safe-proc-macro2" +version = "1.0.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd85be67db87168aa3c13fd0da99f48f2ab005dccad5af5626138dc1df20eb6" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "safe-quote" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e530f7831f3feafcd5f1aae406ac205dd998436b4007c8e80f03eca78a88f7" +dependencies = [ + "safe-proc-macro2", +] + +[[package]] +name = "safe-regex" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15289bf322e0673d52756a18194167f2378ec1a15fe884af6e2d2cb934822b0" +dependencies = [ + "safe-regex-macro", +] + +[[package]] +name = "safe-regex-compiler" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fba76fae590a2aa665279deb1f57b5098cbace01a0c5e60e262fcf55f7c51542" +dependencies = [ + "safe-proc-macro2", + "safe-quote", +] + +[[package]] +name = "safe-regex-macro" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c2e96b5c03f158d1b16ba79af515137795f4ad4e8de3f790518aae91f1d127" +dependencies = [ + "safe-proc-macro2", + "safe-regex-compiler", +] + [[package]] name = "same-file" version = "1.0.6" @@ -2678,6 +5545,15 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "scheduled-thread-pool" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" +dependencies = [ + "parking_lot", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -2773,9 +5649,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] @@ -2801,20 +5677,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -2837,7 +5713,7 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] @@ -2851,6 +5727,25 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_unit_struct" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee87479059950a55ed6089d755a105b8cdf16fbc51ea45a524ecff8da259987" +dependencies = [ + "serde_unit_struct_derive", +] + +[[package]] +name = "serde_unit_struct_derive" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f1b15838534b38fb67ffe60033fe3ffad48f916c175e8baa0400e0cdb958dec" +dependencies = [ + "quote", + "syn 2.0.48", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2863,6 +5758,35 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b0ed1662c5a68664f45b76d18deb0e234aff37207086803165c961eb695e981" +dependencies = [ + "base64", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.2.1", + "serde", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "568577ff0ef47b879f736cd66740e022f3672788cdf002a05a4e609ea5a6fb15" +dependencies = [ + "darling", + "proc-macro2 1.0.78", + "quote", + "syn 2.0.48", +] + [[package]] name = "serde_yaml" version = "0.9.31" @@ -2876,6 +5800,16 @@ dependencies = [ "unsafe-libyaml", ] +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + [[package]] name = "serial_test" version = "3.0.0" @@ -2896,7 +5830,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b93fb4adc70021ac1b47f7d45e8cc4169baaa7ea58483bc5b721d19a26202212" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] @@ -2961,6 +5895,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook" version = "0.3.17" @@ -2996,6 +5936,16 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc47a29ce97772ca5c927f75bac34866b16d64e07f330c3248e2d7226623901b" +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + [[package]] name = "skeptic" version = "0.13.7" @@ -3041,6 +5991,9 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] [[package]] name = "spki" @@ -3052,6 +6005,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -3080,7 +6039,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck", - "proc-macro2", + "proc-macro2 1.0.78", "quote", "rustversion", "syn 2.0.48", @@ -3088,9 +6047,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.5.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subtle-encoding" @@ -3113,7 +6072,7 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "unicode-ident", ] @@ -3124,11 +6083,22 @@ version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "unicode-ident", ] +[[package]] +name = "syn-mid" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea305d57546cc8cd04feb14b62ec84bf17f50e3f7b12560d7bfa9265f39d9ed" +dependencies = [ + "proc-macro2 1.0.78", + "quote", + "syn 1.0.109", +] + [[package]] name = "sync_wrapper" version = "0.1.2" @@ -3141,10 +6111,10 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 1.0.109", - "unicode-xid", + "unicode-xid 0.2.4", ] [[package]] @@ -3174,6 +6144,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "tempfile" version = "3.9.0" @@ -3378,7 +6354,7 @@ checksum = "6159ab4116165c99fc88cce31f99fa2c9dbe08d3691cb38da02fc3b45f357d2b" dependencies = [ "env_logger 0.10.2", "test-log-macros", - "tracing-subscriber", + "tracing-subscriber 0.3.18", ] [[package]] @@ -3387,7 +6363,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ba277e77219e9eea169e8508942db1bf5d8a41ff2db9b20aab5a5aadc9fa25d" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] @@ -3413,7 +6389,7 @@ version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] @@ -3435,6 +6411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ "deranged", + "itoa", "powerfmt", "serde", "time-core", @@ -3465,7 +6442,7 @@ dependencies = [ "anyhow", "hmac", "once_cell", - "pbkdf2", + "pbkdf2 0.11.0", "rand", "rustc-hash", "sha2 0.10.8", @@ -3515,6 +6492,7 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", + "tracing", "windows-sys 0.48.0", ] @@ -3534,7 +6512,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] @@ -3558,6 +6536,7 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tokio-util", ] [[package]] @@ -3592,7 +6571,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.21.0", ] [[package]] @@ -3604,6 +6583,17 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.2.1", + "toml_datetime", + "winnow", +] + [[package]] name = "toml_edit" version = "0.21.0" @@ -3626,7 +6616,7 @@ dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64", "bytes", "h2", "http", @@ -3656,6 +6646,7 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", + "hdrhistogram", "indexmap 1.9.3", "pin-project", "pin-project-lite", @@ -3698,7 +6689,7 @@ version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] @@ -3720,7 +6711,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" dependencies = [ "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.18", ] [[package]] @@ -3755,13 +6746,35 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-subscriber" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" +dependencies = [ + "ansi_term", + "chrono", + "lazy_static", + "matchers 0.0.1", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log 0.1.4", + "tracing-serde", +] + [[package]] name = "tracing-subscriber" version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ - "matchers", + "matchers 0.1.0", "nu-ansi-term", "once_cell", "regex", @@ -3862,12 +6875,28 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + [[package]] name = "unicode-xid" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "universal-hash" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +dependencies = [ + "generic-array", + "subtle", +] + [[package]] name = "unsafe-libyaml" version = "0.2.10" @@ -3928,6 +6957,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ "getrandom", + "rand", ] [[package]] @@ -3936,12 +6966,29 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "visibility" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3fd98999db9227cf28e59d83e1f120f42bc233d4b152e8fab9bc87d5bb1e0f8" +dependencies = [ + "proc-macro2 1.0.78", + "quote", + "syn 2.0.48", +] + [[package]] name = "wait-timeout" version = "0.2.0" @@ -3995,7 +7042,7 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", "wasm-bindgen-shared", @@ -4029,7 +7076,7 @@ version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", "wasm-bindgen-backend", @@ -4052,6 +7099,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + [[package]] name = "winapi" version = "0.3.9" @@ -4083,6 +7142,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -4217,9 +7285,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.34" +version = "0.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +checksum = "1931d78a9c73861da0134f453bb1f790ce49b2e30eba8410b4b79bac72b46a2d" dependencies = [ "memchr", ] @@ -4234,6 +7302,35 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2 1.0.78", + "quote", + "syn 2.0.48", +] + [[package]] name = "zeroize" version = "1.7.0" @@ -4249,7 +7346,17 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.78", "quote", "syn 2.0.48", ] + +[[package]] +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/config-penumbra-celestia.toml b/config-penumbra-celestia.toml new file mode 100644 index 0000000000..fff679c2fb --- /dev/null +++ b/config-penumbra-celestia.toml @@ -0,0 +1,59 @@ +[global] +log_level = 'debug' + +[mode] + +[mode.clients] +enabled = true +refresh = true +misbehaviour = false + +[mode.connections] +enabled = true + +[mode.channels] +enabled = true + +[mode.packets] +enabled = true +clear_interval = 100 +clear_on_start = true +tx_confirmation = true + +[telemetry] +enabled = true +host = '127.0.0.1' +port = 3001 + +[[chains]] +id = 'penumbra-testnet-deimos-2' +type = 'Penumbra' +stub_key_name = 'fake' +rpc_addr = 'https://rpc.testnet.penumbra.zone' +grpc_addr = 'https://grpc.testnet.penumbra.zone' +event_source = { mode = 'pull', interval = '1s' } +rpc_timeout = '15s' +clock_drift = '5s' +client_refresh_rate = '1/3' +trust_threshold = { numerator = '1', denominator = '3' } +kms_config = { spend_key = "XXXXXXXX" } + + +[[chains]] +id = 'mocha-4' +type = 'CosmosSdk' +compat_mode = '0.34' +rpc_addr = 'https://rpc.celestia-mocha.com' +grpc_addr = 'https://grpc.celestia-mocha.com' +event_source = { mode = 'pull', interval = '1s' } +rpc_timeout = '15s' +account_prefix = 'celestia' # not used +key_name = 'celestia' +store_prefix = 'ibc' +gas_price = { price = 0.12, denom = 'utia' } +gas_multiplier = 1.1 +clock_drift = '20s' +max_block_time = '10s' +client_refresh_rate = '1/3' +memo_prefix = 'Hello from Penumbra 😎🌘' +trust_threshold = { numerator = '1', denominator = '3' } diff --git a/config-preview-testnet.toml b/config-preview-testnet.toml new file mode 100644 index 0000000000..9fd951b375 --- /dev/null +++ b/config-preview-testnet.toml @@ -0,0 +1,54 @@ +[global] +log_level = 'debug' + +[mode] + +[mode.clients] +enabled = true +refresh = true +misbehaviour = false + +[mode.connections] +enabled = true + +[mode.channels] +enabled = true + +[mode.packets] +enabled = true +clear_interval = 100 +clear_on_start = true +tx_confirmation = true + +[telemetry] +enabled = true +host = '127.0.0.1' +port = 3001 + +[[chains]] +id = 'penumbra-testnet-deimos-2-38b9a683' +type = 'Penumbra' +stub_key_name = 'fake' +rpc_addr = 'https://rpc.testnet-preview.penumbra.zone' +grpc_addr = 'https://grpc.testnet-preview.penumbra.zone' +event_source = { mode = 'pull', interval = '1s' } +rpc_timeout = '15s' +clock_drift = '5s' +client_refresh_rate = '1/3' +trust_threshold = { numerator = '1', denominator = '3' } +kms_config = { spend_key = "XXXXXXX" } + + + +[[chains]] +id = 'penumbra-testnet-deimos-2' +type = 'Penumbra' +stub_key_name = 'fake' +rpc_addr = 'https://rpc.testnet.penumbra.zone' +grpc_addr = 'https://grpc.testnet.penumbra.zone' +event_source = { mode = 'pull', interval = '1s' } +rpc_timeout = '15s' +clock_drift = '5s' +client_refresh_rate = '1/3' +trust_threshold = { numerator = '1', denominator = '3' } +kms_config = { spend_key = "XXXXXXX" } \ No newline at end of file diff --git a/crates/relayer-cli/src/commands/keys/add.rs b/crates/relayer-cli/src/commands/keys/add.rs index b24514d00a..470667cfe4 100644 --- a/crates/relayer-cli/src/commands/keys/add.rs +++ b/crates/relayer-cli/src/commands/keys/add.rs @@ -220,6 +220,7 @@ pub fn add_key( keyring.add_key(key_name, key_pair.clone())?; key_pair.into() } + ChainConfig::Penumbra(_) => todo!(), }; Ok(key_pair) @@ -256,6 +257,7 @@ pub fn restore_key( keyring.add_key(key_name, key_pair.clone())?; key_pair.into() } + ChainConfig::Penumbra(_) => todo!(), }; Ok(key_pair) diff --git a/crates/relayer-cli/src/commands/keys/balance.rs b/crates/relayer-cli/src/commands/keys/balance.rs index b3c1edd90d..d0e8611c67 100644 --- a/crates/relayer-cli/src/commands/keys/balance.rs +++ b/crates/relayer-cli/src/commands/keys/balance.rs @@ -78,6 +78,7 @@ fn get_balance(chain: impl ChainHandle, key_name: Option, denom: Option< let chain_config = chain.config().unwrap_or_else(exit_with_unrecoverable_error); match chain_config { ChainConfig::CosmosSdk(chain_config) => chain_config.key_name, + ChainConfig::Penumbra(_) => todo!(), } }); @@ -100,6 +101,7 @@ fn get_balances(chain: impl ChainHandle, key_name: Option) { let chain_config = chain.config().unwrap_or_else(exit_with_unrecoverable_error); match chain_config { ChainConfig::CosmosSdk(chain_config) => chain_config.key_name, + ChainConfig::Penumbra(_) => todo!(), } }); diff --git a/crates/relayer-cli/src/commands/keys/delete.rs b/crates/relayer-cli/src/commands/keys/delete.rs index fe25e8a056..5104e8d639 100644 --- a/crates/relayer-cli/src/commands/keys/delete.rs +++ b/crates/relayer-cli/src/commands/keys/delete.rs @@ -123,6 +123,7 @@ pub fn delete_key(config: &ChainConfig, key_name: &str) -> eyre::Result<()> { )?; keyring.remove_key(key_name)?; } + ChainConfig::Penumbra(_) => todo!(), } Ok(()) } @@ -141,6 +142,7 @@ pub fn delete_all_keys(config: &ChainConfig) -> eyre::Result<()> { keyring.remove_key(&key_name)?; } } + ChainConfig::Penumbra(_) => todo!(), } Ok(()) } diff --git a/crates/relayer-cli/src/commands/listen.rs b/crates/relayer-cli/src/commands/listen.rs index 68bd5c22ad..c428ec45a5 100644 --- a/crates/relayer-cli/src/commands/listen.rs +++ b/crates/relayer-cli/src/commands/listen.rs @@ -166,6 +166,28 @@ fn subscribe( thread::spawn(move || event_source.run()); + let subscription = monitor_tx.subscribe()?; + Ok(subscription) + } + ChainConfig::Penumbra(config) => { + let (event_source, monitor_tx) = match &config.event_source { + EventSourceMode::Push { url, batch_delay } => EventSource::websocket( + chain_config.id().clone(), + url.clone(), + compat_mode, + *batch_delay, + rt, + ), + EventSourceMode::Pull { interval } => EventSource::rpc( + chain_config.id().clone(), + HttpClient::new(config.rpc_addr.clone())?, + *interval, + rt, + ), + }?; + + thread::spawn(move || event_source.run()); + let subscription = monitor_tx.subscribe()?; Ok(subscription) } @@ -179,6 +201,7 @@ fn detect_compatibility_mode( // TODO(erwan): move this to the cosmos sdk endpoint implementation let rpc_addr = match config { ChainConfig::CosmosSdk(config) => config.rpc_addr.clone(), + ChainConfig::Penumbra(config) => config.rpc_addr.clone(), }; let client = HttpClient::new(rpc_addr)?; let status = rt.block_on(client.status())?; @@ -186,6 +209,9 @@ fn detect_compatibility_mode( ChainConfig::CosmosSdk(config) => { compat_mode_from_version(&config.compat_mode, status.node_info.version)?.into() } + ChainConfig::Penumbra(config) => { + compat_mode_from_version(&config.compat_mode, status.node_info.version)?.into() + } }; Ok(compat_mode) } diff --git a/crates/relayer-cli/src/commands/tx/client.rs b/crates/relayer-cli/src/commands/tx/client.rs index 827d1c5cc1..96d4496e96 100644 --- a/crates/relayer-cli/src/commands/tx/client.rs +++ b/crates/relayer-cli/src/commands/tx/client.rs @@ -209,6 +209,7 @@ impl Runnable for TxUpdateClientCmd { ChainConfig::CosmosSdk(chain_config) => { chain_config.genesis_restart = Some(restart_params) } + ChainConfig::Penumbra(_) => todo!(), }, None => { Output::error(format!( diff --git a/crates/relayer/Cargo.toml b/crates/relayer/Cargo.toml index 5ed88c5893..f61135dbb7 100644 --- a/crates/relayer/Cargo.toml +++ b/crates/relayer/Cargo.toml @@ -71,6 +71,18 @@ strum = { version = "0.25", features = ["derive"] } tokio-stream = "0.1.14" once_cell = "1.19.0" tracing-subscriber = { version = "0.3.14", features = ["fmt", "env-filter", "json"] } +pbjson-types = "0.6.0" + +# Penumbra dependencies +penumbra-custody = { git = "https://github.com/penumbra-zone/penumbra", branch = "main" } +penumbra-view = { git = "https://github.com/penumbra-zone/penumbra", branch = "main" } +penumbra-proto = { git = "https://github.com/penumbra-zone/penumbra", branch = "main", features = ["box-grpc", "rpc"] } +penumbra-wallet = { git = "https://github.com/penumbra-zone/penumbra", branch = "main" } +penumbra-fee = { git = "https://github.com/penumbra-zone/penumbra", branch = "main" } +penumbra-transaction = { git = "https://github.com/penumbra-zone/penumbra", branch = "main" } +penumbra-keys = { git = "https://github.com/penumbra-zone/penumbra", branch = "main" } +penumbra-ibc = { git = "https://github.com/penumbra-zone/penumbra", branch = "main" } +penumbra-asset = { git = "https://github.com/penumbra-zone/penumbra", branch = "main" } [dependencies.byte-unit] version = "4.0.19" diff --git a/crates/relayer/src/chain.rs b/crates/relayer/src/chain.rs index bcca34e85f..93f4c9260d 100644 --- a/crates/relayer/src/chain.rs +++ b/crates/relayer/src/chain.rs @@ -1,8 +1,10 @@ pub mod client; +pub mod client_settings; pub mod cosmos; pub mod counterparty; pub mod endpoint; pub mod handle; +pub mod penumbra; pub mod requests; pub mod runtime; pub mod tracking; diff --git a/crates/relayer/src/chain/client.rs b/crates/relayer/src/chain/client.rs index 6f00ec8df9..3c87e293d8 100644 --- a/crates/relayer/src/chain/client.rs +++ b/crates/relayer/src/chain/client.rs @@ -1,6 +1,5 @@ //! Data structures and logic to set up IBC client's parameters. -use crate::chain::cosmos; use crate::config::ChainConfig; use crate::foreign_client::CreateOptions; @@ -9,7 +8,7 @@ use crate::foreign_client::CreateOptions; /// The parameters are specialized for each supported chain type. #[derive(Clone, Debug)] pub enum ClientSettings { - Tendermint(cosmos::client::Settings), + Tendermint(crate::chain::client_settings::Settings), } impl ClientSettings { @@ -24,18 +23,10 @@ impl ClientSettings { // Currently, only Tendermint chain pairs are supported by // ForeignClient::build_create_client_and_send. Support for // heterogeneous chains is left for future revisions. - // - // TODO: extract Tendermint-related configs into a separate substructure - // that can be used both by CosmosSdkConfig and configs for nonSDK chains. - use ChainConfig::CosmosSdk as Csdk; - match (src_chain_config, dst_chain_config) { - (Csdk(src_chain_config), Csdk(dst_chain_config)) => { - ClientSettings::Tendermint(cosmos::client::Settings::for_create_command( - options, - src_chain_config, - dst_chain_config, - )) - } - } + ClientSettings::Tendermint(crate::chain::client_settings::Settings::for_create_command( + options, + src_chain_config, + dst_chain_config, + )) } } diff --git a/crates/relayer/src/chain/cosmos/client.rs b/crates/relayer/src/chain/client_settings.rs similarity index 68% rename from crates/relayer/src/chain/cosmos/client.rs rename to crates/relayer/src/chain/client_settings.rs index cc8235c2e3..a70682dfae 100644 --- a/crates/relayer/src/chain/cosmos/client.rs +++ b/crates/relayer/src/chain/client_settings.rs @@ -1,17 +1,16 @@ -//! Cosmos-specific client settings. - +/// Tendermint client settings, which can apply to any chain that uses the Tendermint consensus use core::time::Duration; use tracing::warn; use ibc_relayer_types::core::ics02_client::trust_threshold::TrustThreshold; -use crate::chain::cosmos::config::CosmosSdkConfig; +use crate::config::ChainConfig; use crate::foreign_client::CreateOptions; use crate::util::pretty::PrettyDuration; -/// Cosmos-specific client parameters for the `build_client_state` operation. +/// Tendermint-specific client parameters for the `build_client_state` operation. #[derive(Clone, Debug, Default)] pub struct Settings { pub max_clock_drift: Duration, @@ -22,18 +21,18 @@ pub struct Settings { impl Settings { pub fn for_create_command( options: CreateOptions, - src_chain_config: &CosmosSdkConfig, - dst_chain_config: &CosmosSdkConfig, + src_chain_config: &ChainConfig, + dst_chain_config: &ChainConfig, ) -> Self { let max_clock_drift = match options.max_clock_drift { None => calculate_client_state_drift(src_chain_config, dst_chain_config), Some(user_value) => { - if user_value > dst_chain_config.max_block_time { + if user_value > dst_chain_config.max_block_time() { warn!( "user specified max_clock_drift ({}) exceeds max_block_time \ of the destination chain {}", PrettyDuration(&user_value), - dst_chain_config.id, + dst_chain_config.id(), ); } user_value @@ -42,7 +41,7 @@ impl Settings { let trust_threshold = options .trust_threshold - .unwrap_or(src_chain_config.trust_threshold); + .unwrap_or(src_chain_config.trust_threshold()); Settings { max_clock_drift, @@ -56,8 +55,10 @@ impl Settings { /// chain block frequency and clock drift on source and dest. /// https://github.com/informalsystems/hermes/issues/1445 fn calculate_client_state_drift( - src_chain_config: &CosmosSdkConfig, - dst_chain_config: &CosmosSdkConfig, + src_chain_config: &ChainConfig, + dst_chain_config: &ChainConfig, ) -> Duration { - src_chain_config.clock_drift + dst_chain_config.clock_drift + dst_chain_config.max_block_time + src_chain_config.clock_drift() + + dst_chain_config.clock_drift() + + dst_chain_config.max_block_time() } diff --git a/crates/relayer/src/chain/cosmos.rs b/crates/relayer/src/chain/cosmos.rs index d5ccc13242..768588597c 100644 --- a/crates/relayer/src/chain/cosmos.rs +++ b/crates/relayer/src/chain/cosmos.rs @@ -111,7 +111,6 @@ use self::types::gas::GasConfig; use self::version::Specs; pub mod batch; -pub mod client; pub mod compatibility; pub mod config; pub mod eip_base_fee; @@ -2303,7 +2302,7 @@ impl ChainEndpoint for CosmosSdkChain { } } -fn sort_events_by_sequence(events: &mut [IbcEventWithHeight]) { +pub fn sort_events_by_sequence(events: &mut [IbcEventWithHeight]) { events.sort_by(|a, b| { a.event .packet() @@ -2313,7 +2312,7 @@ fn sort_events_by_sequence(events: &mut [IbcEventWithHeight]) { }); } -async fn fetch_node_info( +pub async fn fetch_node_info( rpc_client: &HttpClient, config: &config::CosmosSdkConfig, ) -> Result { diff --git a/crates/relayer/src/chain/penumbra.rs b/crates/relayer/src/chain/penumbra.rs new file mode 100644 index 0000000000..90a002bd39 --- /dev/null +++ b/crates/relayer/src/chain/penumbra.rs @@ -0,0 +1,2 @@ +pub mod chain; +pub mod config; diff --git a/crates/relayer/src/chain/penumbra/chain.rs b/crates/relayer/src/chain/penumbra/chain.rs new file mode 100644 index 0000000000..b85990cb5d --- /dev/null +++ b/crates/relayer/src/chain/penumbra/chain.rs @@ -0,0 +1,1616 @@ +use anyhow::Context; +use bytes::{Buf, Bytes}; +use futures::{FutureExt, StreamExt, TryStreamExt}; +use http::Uri; +use ibc_proto::ics23; +use ibc_relayer_types::core::ics23_commitment::commitment::CommitmentProofBytes; +use ibc_relayer_types::core::ics24_host::path::{ + AcksPath, ChannelEndsPath, ClientConsensusStatePath, ClientStatePath, CommitmentsPath, + ReceiptsPath, SeqRecvsPath, +}; +use ibc_relayer_types::core::ics24_host::Path; +use once_cell::sync::Lazy; +use penumbra_proto::core::app::v1::AppParametersRequest; +use penumbra_proto::core::component::ibc::v1::IbcRelay as ProtoIbcRelay; +use penumbra_proto::DomainType as _; +use std::str::FromStr; +use std::sync::Arc; +use std::thread; +use std::time::Duration; +use tendermint_proto::Protobuf; +use tracing::info; + +use crate::chain::client::ClientSettings; +use crate::chain::cosmos::query::{abci_query, QueryResponse}; +use crate::chain::endpoint::ChainStatus; +use crate::chain::requests::IncludeProof; +use crate::chain::requests::*; +use crate::chain::tracking::TrackedMsgs; +use crate::client_state::{AnyClientState, IdentifiedAnyClientState}; +use crate::consensus_state::AnyConsensusState; +use crate::event::source::{EventSource, TxEventSourceCmd}; +use crate::event::{ibc_event_try_from_abci_event, IbcEventWithHeight}; +use crate::keyring::KeyRing; +use crate::light_client::tendermint::LightClient as TmLightClient; +use crate::light_client::LightClient; +use crate::util::pretty::{ + PrettyIdentifiedChannel, PrettyIdentifiedClientState, PrettyIdentifiedConnection, +}; +use ibc_proto::ibc::core::commitment::v1::MerkleProof as RawMerkleProof; +use ibc_proto::ibc::core::{ + channel::v1::query_client::QueryClient as IbcChannelQueryClient, + client::v1::query_client::QueryClient as IbcClientQueryClient, + connection::v1::query_client::QueryClient as IbcConnectionQueryClient, +}; +use ibc_relayer_types::clients::ics07_tendermint::client_state::ClientState as TmClientState; +use ibc_relayer_types::clients::ics07_tendermint::consensus_state::ConsensusState as TmConsensusState; +use ibc_relayer_types::clients::ics07_tendermint::header::Header as TmHeader; +use ibc_relayer_types::core::ics02_client::client_type::ClientType; +use ibc_relayer_types::core::ics03_connection::connection::{ + ConnectionEnd, IdentifiedConnectionEnd, +}; +use ibc_relayer_types::core::ics04_channel::channel::{ChannelEnd, IdentifiedChannelEnd}; +use ibc_relayer_types::core::ics04_channel::packet::Sequence; +use ibc_relayer_types::core::ics23_commitment::merkle::MerkleProof; +use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ClientId}; +use ibc_relayer_types::Height as ICSHeight; +use penumbra_fee::FeeTier; +use penumbra_ibc::IbcRelay; +use penumbra_keys::keys::AddressIndex; +use penumbra_proto::box_grpc_svc::{self, BoxGrpcService}; +use penumbra_proto::{ + core::app::v1::query_service_client::QueryServiceClient as AppQueryClient, + custody::v1::{ + custody_service_client::CustodyServiceClient, custody_service_server::CustodyServiceServer, + }, + view::v1::{ + broadcast_transaction_response::Status as BroadcastStatus, + view_service_client::ViewServiceClient, view_service_server::ViewServiceServer, + GasPricesRequest, + }, +}; +use penumbra_view::{ViewClient, ViewServer}; +use penumbra_wallet::plan::Planner; +use signature::rand_core::OsRng; + +use tendermint::time::Time as TmTime; +use tendermint_light_client::verifier::types::LightBlock as TmLightBlock; +use tendermint_rpc::{Client as _, HttpClient}; +use tokio::runtime::Runtime as TokioRuntime; +use tokio::sync::Mutex; +use tonic::IntoRequest; + +use crate::{ + chain::{ + endpoint::{ChainEndpoint, HealthCheck}, + handle::Subscription, + }, + config::{ChainConfig, Error as ConfigError}, + error::Error, + keyring::Secp256k1KeyPair, +}; + +use super::config::PenumbraConfig; + +pub struct PenumbraChain { + config: PenumbraConfig, + rt: Arc, + + view_client: Mutex>, + custody_client: CustodyServiceClient, + + ibc_client_grpc_client: IbcClientQueryClient, + ibc_connection_grpc_client: IbcConnectionQueryClient, + ibc_channel_grpc_client: IbcChannelQueryClient, + + tendermint_rpc_client: HttpClient, + tendermint_light_client: TmLightClient, + + tx_monitor_cmd: Option, + + unbonding_period: Duration, +} + +impl PenumbraChain { + // unfortunately, for some queries, we need to use ABCI queries, since the gRPC query interface + // does not support specifying the height. + fn rpc_query( + &self, + data: impl Into, + height_query: QueryHeight, + prove: bool, + ) -> Result { + let data_prefixed = format!("ibc-data/{}", data.into()); + + let response = self.rt.block_on(abci_query( + &self.tendermint_rpc_client, + &self.config.rpc_addr, + "state/key".to_string(), + data_prefixed, + height_query.into(), + prove, + ))?; + + Ok(response) + } + fn init_event_source(&mut self) -> Result { + crate::time!( + "init_event_source", + { + "src_chain": self.config().id().to_string(), + } + ); + + use crate::config::EventSourceMode as Mode; + + let (event_source, monitor_tx) = match &self.config.event_source { + Mode::Pull { interval } => EventSource::rpc( + self.config.id.clone(), + self.tendermint_rpc_client.clone(), + *interval, + self.rt.clone(), + ), + _ => unimplemented!(), + } + .map_err(Error::event_source)?; + + thread::spawn(move || event_source.run()); + + Ok(monitor_tx) + } + + fn chain_status(&self) -> Result { + let status = self + .rt + .block_on(self.tendermint_rpc_client.status()) + .map_err(|e| Error::rpc(self.config.rpc_addr.clone(), e))?; + + Ok(status) + } + + async fn ibc_events_for_penumbratx( + &self, + penumbra_tx_id: penumbra_transaction::txhash::TransactionId, + ) -> Result, Error> { + let txid = penumbra_tx_id.0.to_vec().try_into().unwrap(); + let tm_tx = self + .tendermint_rpc_client + .tx(txid, false) + .await + .map_err(|e| { + tracing::error!("error querying transaction: {}", e); + Error::temp_penumbra_error(e.to_string()) + })?; + + let height = ICSHeight::new(self.config.id.version(), u64::from(tm_tx.height)).unwrap(); + let events = tm_tx + .tx_result + .events + .iter() + .map(|ev| IbcEventWithHeight::new(ibc_event_try_from_abci_event(ev).unwrap(), height)) + .collect(); + + Ok(events) + } + + async fn query_packets_from_blocks( + &self, + request: &QueryPacketEventDataRequest, + ) -> Result<(Vec, Vec), Error> { + use crate::chain::cosmos::query::packet_query; + + let mut begin_block_events = vec![]; + let mut end_block_events = vec![]; + + for seq in request.sequences.iter().copied() { + let response = self + .tendermint_rpc_client + .block_search( + packet_query(request, seq), + // We only need the first page + 1, + // There should only be a single match for this query, but due to + // the fact that the indexer treat the query as a disjunction over + // all events in a block rather than a conjunction over a single event, + // we may end up with partial matches and therefore have to account for + // that by fetching multiple results and filter it down after the fact. + // In the worst case we get N blocks where N is the number of channels, + // but 10 seems to work well enough in practice while keeping the response + // size, and therefore pressure on the node, fairly low. + 10, + // We could pick either ordering here, since matching blocks may be at pretty + // much any height relative to the target blocks, so we went with most recent + // blocks first. + tendermint_rpc::Order::Descending, + ) + .await + .map_err(|e| Error::rpc(self.config.rpc_addr.clone(), e))?; + + for block in response.blocks.into_iter().map(|response| response.block) { + let response_height = + ICSHeight::new(self.id().version(), u64::from(block.header.height)) + .map_err(|_| Error::invalid_height_no_source())?; + + if let QueryHeight::Specific(query_height) = request.height.get() { + if response_height > query_height { + continue; + } + } + + // `query_packet_from_block` retrieves the begin and end block events + // and filter them to retain only those matching the query + let (new_begin_block_events, new_end_block_events) = + self.query_packet_from_block(request, &[seq], &response_height)?; + + begin_block_events.extend(new_begin_block_events); + end_block_events.extend(new_end_block_events); + } + } + + Ok((begin_block_events, end_block_events)) + } + + pub(super) fn query_packet_from_block( + &self, + request: &QueryPacketEventDataRequest, + seqs: &[Sequence], + block_height: &ICSHeight, + ) -> Result<(Vec, Vec), Error> { + use crate::chain::cosmos::query::tx::filter_matching_event; + + let mut begin_block_events = vec![]; + let mut end_block_events = vec![]; + + let tm_height = + tendermint::block::Height::try_from(block_height.revision_height()).unwrap(); + + let response = self + .rt + .block_on(self.tendermint_rpc_client.block_results(tm_height)) + .map_err(|e| Error::rpc(self.config.rpc_addr.clone(), e))?; + + let response_height = ICSHeight::new(self.id().version(), u64::from(response.height)) + .map_err(|_| Error::invalid_height_no_source())?; + + begin_block_events.append( + &mut response + .begin_block_events + .unwrap_or_default() + .iter() + .filter_map(|ev| filter_matching_event(ev, request, seqs)) + .map(|ev| IbcEventWithHeight::new(ev, response_height)) + .collect(), + ); + + end_block_events.append( + &mut response + .end_block_events + .unwrap_or_default() + .iter() + .filter_map(|ev| filter_matching_event(ev, request, seqs)) + .map(|ev| IbcEventWithHeight::new(ev, response_height)) + .collect(), + ); + + Ok((begin_block_events, end_block_events)) + } + + async fn build_penumbra_tx( + &mut self, + tracked_msgs: TrackedMsgs, + ) -> Result { + let mut view_client = self.view_client.lock().await.clone(); + let gas_prices = view_client + .gas_prices(GasPricesRequest {}) + .await + .unwrap() + .into_inner() + .gas_prices + .expect("gas prices must be available") + .try_into() + .unwrap(); + // TODO: should this be a config option? + let fee_tier = FeeTier::default(); + + // use the transaction builder in the custody service to construct a transaction, including + // each tracked message as an IbcRelay message + let mut planner = Planner::new(OsRng); + + planner.set_gas_prices(gas_prices).set_fee_tier(fee_tier); + + for msg in tracked_msgs.msgs { + let raw_ibcrelay_msg = ProtoIbcRelay { + raw_action: Some(pbjson_types::Any { + type_url: msg.type_url.clone(), + value: msg.value.clone().into(), + }), + }; + let ibc_action = + IbcRelay::try_from(raw_ibcrelay_msg).expect("failed to convert to IbcRelay"); + planner.ibc_action(ibc_action); + } + + let plan = planner.plan(&mut view_client, AddressIndex::new(0)).await?; + + penumbra_wallet::build_transaction( + &self.config.kms_config.spend_key.full_viewing_key(), + &mut view_client, + &mut self.custody_client, + plan, + ) + .await + } + + async fn send_messages_in_penumbratx( + &mut self, + tracked_msgs: TrackedMsgs, + wait_for_commit: bool, + ) -> Result { + let view_client = self.view_client.lock().await.clone(); + let tx = self.build_penumbra_tx(tracked_msgs).await.map_err(|e| { + tracing::error!("error building penumbra transaction: {}", e); + Error::temp_penumbra_error(e.to_string()) + })?; + + let penumbra_txid = self + .submit_transaction(tx, wait_for_commit, &mut view_client.clone()) + .await + .map_err(|e| { + tracing::error!("error submitting transaction: {}", e); + Error::temp_penumbra_error(e.to_string()) + })?; + + // wait for two blocks of confirmation to be sure that the potentially load-balanced endpoints are synced + if wait_for_commit { + let current_height = self + .tendermint_rpc_client + .status() + .await + .map_err(|e| Error::rpc(self.config.rpc_addr.clone(), e))? + .sync_info + .latest_block_height + .value(); + let mut last_height = current_height; + + while last_height - current_height < 2 { + thread::sleep(Duration::from_secs(1)); + last_height = self + .tendermint_rpc_client + .status() + .await + .map_err(|e| Error::rpc(self.config.rpc_addr.clone(), e))? + .sync_info + .latest_block_height + .value(); + } + } + + Ok(penumbra_txid) + } + + async fn submit_transaction( + &mut self, + transaction: penumbra_transaction::Transaction, + wait_for_commit: bool, + view_client: &mut ViewServiceClient, + ) -> anyhow::Result { + info!("broadcasting penumbra transaction and awaiting confirmation..."); + let mut rsp = + ViewClient::broadcast_transaction(view_client, transaction, wait_for_commit).await?; + + let id = (async move { + while let Some(rsp) = rsp.try_next().await? { + match rsp.status { + Some(status) => match status { + BroadcastStatus::BroadcastSuccess(bs) => { + if !wait_for_commit { + return Ok(bs + .id + .expect("detected transaction missing id") + .try_into()?); + } + } + BroadcastStatus::Confirmed(c) => { + let id = c.id.expect("detected transaction missing id").try_into()?; + info!(id = %id, "penumbra transaction confirmed"); + return Ok(id); + } + }, + None => { + // No status is unexpected behavior + return Err(anyhow::anyhow!( + "empty BroadcastTransactionResponse message" + )); + } + } + } + + Err(anyhow::anyhow!( + "should have received BroadcastTransaction status or error" + )) + } + .boxed()) + .await + .context("error broadcasting transaction")?; + + Ok(id) + } + + async fn query_balance( + &self, + address_index: AddressIndex, + denom: &str, + ) -> Result { + let mut view_client = self.view_client.lock().await.clone(); + let assets = ViewClient::assets(&mut view_client).await?; + let asset_id = assets + .get_unit(denom) + .ok_or_else(|| anyhow::anyhow!("denom not found"))? + .id(); + + let balances = + ViewClient::balances(&mut view_client, address_index, Some(asset_id)).await?; + + for (id, amount) in balances { + if id != asset_id { + continue; // should never happen + } + + return Ok(crate::account::Balance { + amount: amount.to_string(), + denom: denom.to_string(), + }); + } + + Err(anyhow::anyhow!("denom not found")) + } +} + +impl ChainEndpoint for PenumbraChain { + type LightBlock = TmLightBlock; + type Header = TmHeader; + type ConsensusState = TmConsensusState; + type ClientState = TmClientState; + type Time = TmTime; + // Note: this is a placeholder, we won't actually use it. + type SigningKeyPair = Secp256k1KeyPair; + + fn id(&self) -> &ChainId { + &self.config.id + } + + fn config(&self) -> ChainConfig { + ChainConfig::Penumbra(self.config.clone()) + } + + fn bootstrap(config: ChainConfig, rt: Arc) -> Result { + let ChainConfig::Penumbra(config) = config else { + return Err(Error::config(ConfigError::wrong_type())); + }; + + let rpc_client = HttpClient::new(config.rpc_addr.clone()) + .map_err(|e| Error::rpc(config.rpc_addr.clone(), e))?; + + let node_info = rt.block_on(fetch_node_info(&rpc_client, &config))?; + + let fvk = config.kms_config.spend_key.full_viewing_key(); + + let svc = rt + .block_on(ViewServer::load_or_initialize( + config.view_service_storage_dir.clone(), + fvk, + config.grpc_addr.clone().into(), + )) + .map_err(|e| Error::temp_penumbra_error(e.to_string()))?; + + let svc = ViewServiceServer::new(svc); + let mut view_client = ViewServiceClient::new(box_grpc_svc::local(svc)); + + let soft_kms = penumbra_custody::soft_kms::SoftKms::new(config.kms_config.clone()); + let custody_svc = CustodyServiceServer::new(soft_kms); + let custody_client = CustodyServiceClient::new(box_grpc_svc::local(custody_svc)); + + let grpc_addr = Uri::from_str(&config.grpc_addr.to_string()) + .map_err(|e| Error::invalid_uri(config.grpc_addr.to_string(), e))?; + + let mut app_query = rt + .block_on(AppQueryClient::connect(grpc_addr.clone())) + .map_err(Error::grpc_transport)?; + + let app_parameters = rt + .block_on(app_query.app_parameters(tonic::Request::new(AppParametersRequest {}))) + .map_err(|e| Error::grpc_status(e, "app_parameters query".to_owned()))? + .into_inner(); + + let epoch_duration = app_parameters + .clone() + .app_parameters + .expect("should have app parameters") + .sct_params + .expect("should have sct parameters") + .epoch_duration; + + let unbonding_epochs = app_parameters + .app_parameters + .expect("should have app parameters") + .stake_params + .expect("should have stake parameters") + .unbonding_epochs; + + // here we assume roughly 5s block time, which is not part of consensus but should be + // roughly correct. it would really be better if the ibc protocol gave the client's + // trusting period in terms of blocks instead of duration. + let unbonding_period = Duration::from_secs(epoch_duration * unbonding_epochs * 5); + + tracing::info!("starting view service sync"); + + let sync_height = rt + .block_on(async { + let mut stream = ViewClient::status_stream(&mut view_client).await?; + let mut sync_height = 0u64; + while let Some(status) = stream.next().await.transpose()? { + sync_height = status.full_sync_height; + } + Ok(sync_height) + }) + .map_err(|e: anyhow::Error| Error::temp_penumbra_error(e.to_string()))?; + + tracing::info!(?sync_height, "view service sync complete"); + + let ibc_client_grpc_client = rt + .block_on(IbcClientQueryClient::connect(grpc_addr.clone())) + .map_err(Error::grpc_transport)?; + let ibc_connection_grpc_client = rt + .block_on(IbcConnectionQueryClient::connect(grpc_addr.clone())) + .map_err(Error::grpc_transport)?; + let ibc_channel_grpc_client = rt + .block_on(IbcChannelQueryClient::connect(grpc_addr.clone())) + .map_err(Error::grpc_transport)?; + + let tendermint_light_client = TmLightClient::from_rpc_parameters( + config.id.clone(), + config.rpc_addr.clone(), + config.rpc_timeout.clone(), + node_info.id, + true, + )?; + + tracing::info!("ibc grpc query clients connected"); + + Ok(Self { + config, + rt, + view_client: Mutex::new(view_client.clone()), + custody_client, + tendermint_rpc_client: rpc_client, + tendermint_light_client, + tx_monitor_cmd: None, + + ibc_client_grpc_client, + ibc_connection_grpc_client, + ibc_channel_grpc_client, + + unbonding_period, + }) + } + + fn shutdown(self) -> Result<(), Error> { + todo!() + } + + fn health_check(&mut self) -> Result { + let mut view_client = self.rt.block_on(self.view_client.lock()).clone(); + let catching_up = self + .rt + .block_on(async { + let status = ViewClient::status(&mut view_client).await?; + Ok(status.catching_up) + }) + .map_err(|e: anyhow::Error| Error::temp_penumbra_error(e.to_string()))?; + + if catching_up { + Ok(HealthCheck::Unhealthy(Box::new( + Error::temp_penumbra_error( + anyhow::anyhow!("view service is not synced").to_string(), + ), + ))) + } else { + Ok(HealthCheck::Healthy) + } + } + + fn subscribe(&mut self) -> Result { + let tx_monitor_cmd = match &self.tx_monitor_cmd { + Some(tx_monitor_cmd) => tx_monitor_cmd, + None => { + let tx_monitor_cmd = self.init_event_source()?; + self.tx_monitor_cmd = Some(tx_monitor_cmd); + self.tx_monitor_cmd.as_ref().unwrap() + } + }; + + let subscription = tx_monitor_cmd.subscribe().map_err(Error::event_source)?; + Ok(subscription) + } + + fn keybase(&self) -> &KeyRing { + todo!() + } + + fn keybase_mut(&mut self) -> &mut KeyRing { + todo!() + } + + fn get_signer(&self) -> Result { + Ok(ibc_relayer_types::signer::Signer::dummy()) + } + + fn get_key(&self) -> Result { + Ok(Secp256k1KeyPair::generate()) + } + + fn version_specs(&self) -> Result { + todo!() + } + + fn send_messages_and_wait_commit( + &mut self, + tracked_msgs: TrackedMsgs, + ) -> Result, Error> { + let runtime = self.rt.clone(); + let txid = runtime.block_on(self.send_messages_in_penumbratx(tracked_msgs, true))?; + let events = runtime.block_on(self.ibc_events_for_penumbratx(txid))?; + + Ok(events) + } + + fn send_messages_and_wait_check_tx( + &mut self, + tracked_msgs: TrackedMsgs, + ) -> Result, Error> { + let runtime = self.rt.clone(); + let penumbra_tx = runtime + .block_on(self.build_penumbra_tx(tracked_msgs.clone())) + .map_err(|e| { + tracing::error!("error building penumbra transaction: {}", e); + Error::temp_penumbra_error(e.to_string()) + })?; + + let tx_bytes = penumbra_tx.encode_to_vec(); + + let res = runtime + .block_on(self.tendermint_rpc_client.broadcast_tx_sync(tx_bytes)) + .map_err(|e| Error::rpc(self.config.rpc_addr.clone(), e))?; + + Ok(vec![res]) + } + + fn verify_header( + &mut self, + trusted: ibc_relayer_types::Height, + target: ibc_relayer_types::Height, + client_state: &AnyClientState, + ) -> Result { + crate::time!( + "verify_header", + { + "src_chain": self.config().id().to_string(), + } + ); + + let now = self.chain_status()?.sync_info.latest_block_time; + + self.tendermint_light_client + .verify(trusted, target, client_state, now) + .map(|v| v.target) + } + + fn check_misbehaviour( + &mut self, + update: &ibc_relayer_types::core::ics02_client::events::UpdateClient, + client_state: &AnyClientState, + ) -> Result, Error> { + crate::time!( + "check_misbehaviour", + { + "src_chain": self.config().id().to_string(), + } + ); + + let now = self.chain_status()?.sync_info.latest_block_time; + + self.tendermint_light_client + .detect_misbehaviour(update, client_state, now) + } + + fn query_balance( + &self, + _key_name: Option<&str>, + denom: Option<&str>, + ) -> Result { + let denom = denom.unwrap_or("upenumbra"); + + self.rt + .block_on(self.query_balance(AddressIndex::new(0), denom)) + .map_err(|e| Error::temp_penumbra_error(e.to_string())) + } + + fn query_all_balances( + &self, + _key_name: Option<&str>, + ) -> Result, Error> { + todo!() + } + + fn query_denom_trace(&self, _hash: String) -> Result { + todo!() + } + + fn query_commitment_prefix( + &self, + ) -> Result + { + // This is hardcoded for now. + Ok(b"ibc-data".to_vec().try_into().unwrap()) + } + + fn query_application_status(&self) -> Result { + crate::time!( + "query_application_status", + { + "src_chain": self.config().id().to_string(), + } + ); + crate::telemetry!(query, self.id(), "query_application_status"); + + // We cannot rely on `/status` endpoint to provide details about the latest block. + // Instead, we need to pull block height via `/abci_info` and then fetch block + // metadata at the given height via `/blockchain` endpoint. + let abci_info = self + .rt + .block_on(self.tendermint_rpc_client.abci_info()) + .map_err(|e| Error::rpc(self.config.rpc_addr.clone(), e))?; + + // Query `/header` endpoint to pull the latest block that the application committed. + let response = self + .rt + .block_on( + self.tendermint_rpc_client + .header(abci_info.last_block_height), + ) + .map_err(|e| Error::rpc(self.config.rpc_addr.clone(), e))?; + + let height = ICSHeight::new( + ChainId::chain_version(response.header.chain_id.as_str()), + u64::from(abci_info.last_block_height), + ) + .map_err(|_| Error::invalid_height_no_source())?; + + let timestamp = response.header.time.into(); + Ok(ChainStatus { height, timestamp }) + } + + fn query_clients( + &self, + request: QueryClientStatesRequest, + ) -> Result, Error> { + crate::time!( + "query_clients", + { + "src_chain": self.config().id().to_string(), + } + ); + crate::telemetry!(query, self.id(), "query_clients"); + + let mut client = self.ibc_client_grpc_client.clone(); + + let request = tonic::Request::new(request.into()); + let response = self + .rt + .block_on(client.client_states(request)) + .map_err(|e| Error::grpc_status(e, "query_clients".to_owned()))? + .into_inner(); + + // Deserialize into domain type + let mut clients: Vec = response + .client_states + .into_iter() + .filter_map(|cs| { + IdentifiedAnyClientState::try_from(cs.clone()) + .map_err(|e| { + tracing::warn!( + "failed to parse client state {}. Error: {}", + PrettyIdentifiedClientState(&cs), + e + ) + }) + .ok() + }) + .collect(); + + // Sort by client identifier counter + clients.sort_by_cached_key(|c| client_id_suffix(&c.client_id).unwrap_or(0)); + + Ok(clients) + } + + fn query_client_state( + &self, + request: QueryClientStateRequest, + include_proof: IncludeProof, + ) -> Result<(AnyClientState, Option), Error> { + crate::telemetry!(query, self.id(), "query_client_state"); + + let res = self.rpc_query( + ClientStatePath(request.client_id.clone()), + request.height, + matches!(include_proof, IncludeProof::Yes), + )?; + let client_state = AnyClientState::decode_vec(&res.value).map_err(Error::decode)?; + + match include_proof { + IncludeProof::Yes => { + let proof = res.proof.ok_or_else(Error::empty_response_proof)?; + Ok((client_state, Some(proof))) + } + IncludeProof::No => Ok((client_state, None)), + } + } + + fn query_consensus_state( + &self, + request: QueryConsensusStateRequest, + include_proof: IncludeProof, + ) -> Result<(AnyConsensusState, Option), Error> { + crate::telemetry!(query, self.id(), "query_consensus_state"); + + let res = self.rpc_query( + ClientConsensusStatePath { + client_id: request.client_id.clone(), + epoch: request.consensus_height.revision_number(), + height: request.consensus_height.revision_height(), + }, + request.query_height, + matches!(include_proof, IncludeProof::Yes), + )?; + + let consensus_state = AnyConsensusState::decode_vec(&res.value).map_err(Error::decode)?; + + if !matches!(consensus_state, AnyConsensusState::Tendermint(_)) { + return Err(Error::consensus_state_type_mismatch( + ClientType::Tendermint, + consensus_state.client_type(), + )); + } + + match include_proof { + IncludeProof::Yes => { + let proof = res.proof.ok_or_else(Error::empty_response_proof)?; + Ok((consensus_state, Some(proof))) + } + IncludeProof::No => Ok((consensus_state, None)), + } + } + + fn query_consensus_state_heights( + &self, + request: QueryConsensusStateHeightsRequest, + ) -> Result, Error> { + let mut client = self.ibc_client_grpc_client.clone(); + + let req = ibc_proto::ibc::core::client::v1::QueryConsensusStateHeightsRequest { + client_id: request.client_id.to_string(), + pagination: Default::default(), + }; + + let response = self + .rt + .block_on(client.consensus_state_heights(req)) + .map_err(|e| Error::grpc_status(e, "query_consensus_state_heights".to_owned()))? + .into_inner(); + + let heights = response + .consensus_state_heights + .into_iter() + .filter_map(|h| ICSHeight::new(h.revision_number, h.revision_height).ok()) + .collect(); + Ok(heights) + } + + fn query_upgraded_client_state( + &self, + _request: QueryUpgradedClientStateRequest, + ) -> Result<(AnyClientState, MerkleProof), Error> { + todo!() + } + + fn query_upgraded_consensus_state( + &self, + _request: QueryUpgradedConsensusStateRequest, + ) -> Result<(AnyConsensusState, MerkleProof), Error> { + todo!() + } + + fn query_connections( + &self, + request: QueryConnectionsRequest, + ) -> Result, Error> { + crate::time!( + "query_connections", + { + "src_chain": self.config().id().to_string(), + } + ); + crate::telemetry!(query, self.id(), "query_connections"); + + let mut client = self.ibc_connection_grpc_client.clone(); + + let request = tonic::Request::new(request.into()); + + let response = self + .rt + .block_on(client.connections(request)) + .map_err(|e| Error::grpc_status(e, "query_connections".to_owned()))? + .into_inner(); + + let connections = response + .connections + .into_iter() + .filter_map(|co| { + IdentifiedConnectionEnd::try_from(co.clone()) + .map_err(|e| { + tracing::warn!( + "connection with ID {} failed parsing. Error: {}", + PrettyIdentifiedConnection(&co), + e + ) + }) + .ok() + }) + .collect(); + + Ok(connections) + } + + fn query_client_connections( + &self, + request: QueryClientConnectionsRequest, + ) -> Result, Error> { + crate::time!( + "query_client_connections", + { + "src_chain": self.config().id().to_string(), + } + ); + crate::telemetry!(query, self.id(), "query_client_connections"); + + let connections = self.query_connections(QueryConnectionsRequest { + pagination: Default::default(), + })?; + + let mut client_conns = vec![]; + for connection in connections { + if connection + .connection_end + .client_id_matches(&request.client_id) + { + client_conns.push(connection.connection_id); + } + } + + Ok(client_conns) + } + + fn query_connection( + &self, + request: QueryConnectionRequest, + include_proof: IncludeProof, + ) -> Result<(ConnectionEnd, Option), Error> { + let mut client = self.ibc_connection_grpc_client.clone(); + let mut req = ibc_proto::ibc::core::connection::v1::QueryConnectionRequest { + connection_id: request.connection_id.to_string(), + // TODO height is ignored + } + .into_request(); + + let map = req.metadata_mut(); + let height_str: String = match request.height { + QueryHeight::Latest => 0.to_string(), + QueryHeight::Specific(h) => h.to_string(), + }; + map.insert("height", height_str.parse().expect("valid ascii string")); + + let response = self.rt.block_on(client.connection(req)).map_err(|e| { + if e.code() == tonic::Code::NotFound { + Error::connection_not_found(request.connection_id.clone()) + } else { + Error::grpc_status(e, "query_connection".to_owned()) + } + })?; + + let resp = response.into_inner(); + let connection_end: ConnectionEnd = match resp.connection { + Some(raw_connection) => raw_connection.try_into().map_err(Error::ics03)?, + None => { + // When no connection is found, the GRPC call itself should return + // the NotFound error code. Nevertheless even if the call is successful, + // the connection field may not be present, because in protobuf3 + // everything is optional. + return Err(Error::connection_not_found(request.connection_id.clone())); + } + }; + + match include_proof { + IncludeProof::Yes => Ok((connection_end, Some(decode_merkle_proof(resp.proof)?))), + IncludeProof::No => Ok((connection_end, None)), + } + } + + fn query_connection_channels( + &self, + request: QueryConnectionChannelsRequest, + ) -> Result, Error> { + let mut client = self.ibc_channel_grpc_client.clone(); + let request = tonic::Request::new(request.into()); + + let response = self + .rt + .block_on(client.connection_channels(request)) + .map_err(|e| Error::grpc_status(e, "query_connection_channels".to_owned()))? + .into_inner(); + + let channels = response + .channels + .into_iter() + .filter_map(|ch| { + IdentifiedChannelEnd::try_from(ch.clone()) + .map_err(|e| { + tracing::warn!( + "channel with ID {} failed parsing. Error: {}", + PrettyIdentifiedChannel(&ch), + e + ) + }) + .ok() + }) + .collect(); + Ok(channels) + } + + fn query_channels( + &self, + request: QueryChannelsRequest, + ) -> Result, Error> { + let mut client = self.ibc_channel_grpc_client.clone(); + let request = tonic::Request::new(request.into()); + + let response = self + .rt + .block_on(client.channels(request)) + .map_err(|e| Error::grpc_status(e, "query_channels".to_owned()))? + .into_inner(); + + let channels = response + .channels + .into_iter() + .filter_map(|ch| { + IdentifiedChannelEnd::try_from(ch.clone()) + .map_err(|e| { + tracing::warn!( + "channel with ID {} failed parsing. Error: {}", + PrettyIdentifiedChannel(&ch), + e + ); + }) + .ok() + }) + .collect(); + + Ok(channels) + } + + fn query_channel( + &self, + request: QueryChannelRequest, + include_proof: IncludeProof, + ) -> Result<(ChannelEnd, Option), Error> { + crate::telemetry!(query, self.id(), "query_channel"); + + let res = self.rpc_query( + ChannelEndsPath(request.port_id, request.channel_id), + request.height, + matches!(include_proof, IncludeProof::Yes), + )?; + + let channel_end = ChannelEnd::decode_vec(&res.value).map_err(Error::decode)?; + + match include_proof { + IncludeProof::Yes => { + let proof = res.proof.ok_or_else(Error::empty_response_proof)?; + Ok((channel_end, Some(proof))) + } + IncludeProof::No => Ok((channel_end, None)), + } + } + + fn query_channel_client_state( + &self, + request: QueryChannelClientStateRequest, + ) -> Result, Error> { + let mut client = self.ibc_channel_grpc_client.clone(); + let request = tonic::Request::new(request.into()); + + let response = self + .rt + .block_on(client.channel_client_state(request)) + .map_err(|e| Error::grpc_status(e, "query_channel_client_state".to_owned()))? + .into_inner(); + + let client_state: Option = response + .identified_client_state + .map_or_else(|| None, |proto_cs| proto_cs.try_into().ok()); + + Ok(client_state) + } + + fn query_packet_commitment( + &self, + request: QueryPacketCommitmentRequest, + include_proof: IncludeProof, + ) -> Result<(Vec, Option), Error> { + let res = self.rpc_query( + CommitmentsPath { + port_id: request.port_id, + channel_id: request.channel_id, + sequence: request.sequence, + }, + request.height, + matches!(include_proof, IncludeProof::Yes), + )?; + + match include_proof { + IncludeProof::Yes => { + let proof = res.proof.ok_or_else(Error::empty_response_proof)?; + + Ok((res.value, Some(proof))) + } + IncludeProof::No => Ok((res.value, None)), + } + } + + fn query_packet_commitments( + &self, + request: QueryPacketCommitmentsRequest, + ) -> Result<(Vec, ibc_relayer_types::Height), Error> { + let mut client = self.ibc_channel_grpc_client.clone(); + let request = tonic::Request::new(request.into()); + + let response = self + .rt + .block_on(client.packet_commitments(request)) + .map_err(|e| Error::grpc_status(e, "query_packet_commitments".to_owned()))? + .into_inner(); + + let mut commitment_sequences: Vec = response + .commitments + .into_iter() + .map(|v| v.sequence.into()) + .collect(); + commitment_sequences.sort_unstable(); + + let height = response + .height + .and_then(|raw_height| raw_height.try_into().ok()) + .ok_or_else(|| Error::grpc_response_param("height".to_string()))?; + + Ok((commitment_sequences, height)) + } + + fn query_packet_receipt( + &self, + request: QueryPacketReceiptRequest, + include_proof: IncludeProof, + ) -> Result<(Vec, Option), Error> { + let res = self.rpc_query( + ReceiptsPath { + port_id: request.port_id, + channel_id: request.channel_id, + sequence: request.sequence, + }, + request.height, + matches!(include_proof, IncludeProof::Yes), + )?; + + match include_proof { + IncludeProof::Yes => { + let proof = res.proof.ok_or_else(Error::empty_response_proof)?; + + Ok((res.value, Some(proof))) + } + IncludeProof::No => Ok((res.value, None)), + } + } + + fn query_unreceived_packets( + &self, + request: QueryUnreceivedPacketsRequest, + ) -> Result, Error> { + let mut client = self.ibc_channel_grpc_client.clone(); + + let request = tonic::Request::new(request.into()); + + let mut response = self + .rt + .block_on(client.unreceived_packets(request)) + .map_err(|e| Error::grpc_status(e, "query_unreceived_packets".to_owned()))? + .into_inner(); + + response.sequences.sort_unstable(); + Ok(response + .sequences + .into_iter() + .map(|seq| seq.into()) + .collect()) + } + + fn query_packet_acknowledgement( + &self, + request: QueryPacketAcknowledgementRequest, + include_proof: IncludeProof, + ) -> Result<(Vec, Option), Error> { + let res = self.rpc_query( + AcksPath { + port_id: request.port_id, + channel_id: request.channel_id, + sequence: request.sequence, + }, + request.height, + matches!(include_proof, IncludeProof::Yes), + )?; + + match include_proof { + IncludeProof::Yes => { + let proof = res.proof.ok_or_else(Error::empty_response_proof)?; + + Ok((res.value, Some(proof))) + } + IncludeProof::No => Ok((res.value, None)), + } + } + + fn query_packet_acknowledgements( + &self, + request: QueryPacketAcknowledgementsRequest, + ) -> Result<(Vec, ibc_relayer_types::Height), Error> { + let mut client = self.ibc_channel_grpc_client.clone(); + let request = tonic::Request::new(request.into()); + + let response = self + .rt + .block_on(client.packet_acknowledgements(request)) + .map_err(|e| Error::grpc_status(e, "query_packet_acknowledgements".to_owned()))? + .into_inner(); + + let acks_sequences = response + .acknowledgements + .into_iter() + .map(|v| v.sequence.into()) + .collect(); + + let height = response + .height + .and_then(|raw_height| raw_height.try_into().ok()) + .ok_or_else(|| Error::grpc_response_param("height".to_string()))?; + + Ok((acks_sequences, height)) + } + + fn query_unreceived_acknowledgements( + &self, + request: QueryUnreceivedAcksRequest, + ) -> Result, Error> { + let mut client = self.ibc_channel_grpc_client.clone(); + let request = tonic::Request::new(request.into()); + + let mut response = self + .rt + .block_on(client.unreceived_acks(request)) + .map_err(|e| Error::grpc_status(e, "query_unreceived_acknowledgements".to_owned()))? + .into_inner(); + + response.sequences.sort_unstable(); + Ok(response + .sequences + .into_iter() + .map(|seq| seq.into()) + .collect()) + } + + fn query_next_sequence_receive( + &self, + request: QueryNextSequenceReceiveRequest, + include_proof: IncludeProof, + ) -> Result<(Sequence, Option), Error> { + crate::time!( + "query_next_sequence_receive", + { + "src_chain": self.config().id().to_string(), + } + ); + crate::telemetry!(query, self.id(), "query_next_sequence_receive"); + + match include_proof { + IncludeProof::Yes => { + let res = self.rpc_query( + SeqRecvsPath(request.port_id, request.channel_id), + request.height, + true, + )?; + + // Note: We expect the return to be a u64 encoded in big-endian. Refer to ibc-go: + // https://github.com/cosmos/ibc-go/blob/25767f6bdb5bab2c2a116b41d92d753c93e18121/modules/core/04-channel/client/utils/utils.go#L191 + if res.value.len() != 8 { + return Err(Error::query("next_sequence_receive".into())); + } + let seq: Sequence = Bytes::from(res.value).get_u64().into(); + + let proof = res.proof.ok_or_else(Error::empty_response_proof)?; + + Ok((seq, Some(proof))) + } + IncludeProof::No => { + let mut client = self.ibc_channel_grpc_client.clone(); + let request = tonic::Request::new(request.into()); + + let response = self + .rt + .block_on(client.next_sequence_receive(request)) + .map_err(|e| Error::grpc_status(e, "query_next_sequence_receive".to_owned()))? + .into_inner(); + + Ok((response.next_sequence_receive.into(), None)) + } + } + } + + fn query_txs(&self, request: QueryTxRequest) -> Result, Error> { + use crate::chain::cosmos::query::tx::query_txs; + + self.rt.block_on(query_txs( + self.id(), + &self.tendermint_rpc_client, + &self.config.rpc_addr, + request, + )) + } + + fn query_packet_events( + &self, + mut request: QueryPacketEventDataRequest, + ) -> Result, Error> { + use crate::chain::cosmos::{ + query::tx::{query_packets_from_block, query_packets_from_txs}, + sort_events_by_sequence, + }; + + match request.height { + // Usage note: `Qualified::Equal` is currently only used in the call hierarchy involving + // the CLI methods, namely the CLI for `tx packet-recv` and `tx packet-ack` when the + // user passes the flag `packet-data-query-height`. + Qualified::Equal(_) => self.rt.block_on(query_packets_from_block( + self.id(), + &self.tendermint_rpc_client, + &self.config.rpc_addr, + &request, + )), + Qualified::SmallerEqual(_) => { + let tx_events = self.rt.block_on(query_packets_from_txs( + self.id(), + &self.tendermint_rpc_client, + &self.config.rpc_addr, + &request, + ))?; + + let recvd_sequences: Vec<_> = tx_events + .iter() + .filter_map(|eh| eh.event.packet().map(|p| p.sequence)) + .collect(); + + request + .sequences + .retain(|seq| !recvd_sequences.contains(seq)); + + let (start_block_events, end_block_events) = if !request.sequences.is_empty() { + self.rt.block_on(self.query_packets_from_blocks(&request))? + } else { + Default::default() + }; + + // Events should be ordered in the following fashion, + // for any two blocks b1, b2 at height h1, h2 with h1 < h2: + // b1.start_block_events + // b1.tx_events + // b1.end_block_events + // b2.start_block_events + // b2.tx_events + // b2.end_block_events + // + // As of now, we just sort them by sequence number which should + // yield a similar result and will revisit this approach in the future. + let mut events = vec![]; + events.extend(start_block_events); + events.extend(tx_events); + events.extend(end_block_events); + + sort_events_by_sequence(&mut events); + + Ok(events) + } + } + } + + fn query_host_consensus_state( + &self, + _request: QueryHostConsensusStateRequest, + ) -> Result { + todo!() + } + + fn build_client_state( + &self, + height: ibc_relayer_types::Height, + settings: ClientSettings, + ) -> Result { + use ibc_relayer_types::clients::ics07_tendermint::client_state::AllowUpdate; + let ClientSettings::Tendermint(settings) = settings; + let trusting_period_default = 2 * self.unbonding_period / 3; + let trusting_period = settings.trusting_period.unwrap_or(trusting_period_default); + + let proof_specs = IBC_PROOF_SPECS.clone(); + + Self::ClientState::new( + self.id().clone(), + settings.trust_threshold, + trusting_period, + self.unbonding_period, + settings.max_clock_drift, + height, + proof_specs.into(), + vec!["upgrade".to_string(), "upgradedIBCState".to_string()], + AllowUpdate { + after_expiry: true, + after_misbehaviour: true, + }, + ) + .map_err(Error::ics07) + } + + fn build_consensus_state( + &self, + light_block: Self::LightBlock, + ) -> Result { + Ok(Self::ConsensusState::from(light_block.signed_header.header)) + } + + fn build_header( + &mut self, + trusted_height: ibc_relayer_types::Height, + target_height: ibc_relayer_types::Height, + client_state: &AnyClientState, + ) -> Result<(Self::Header, Vec), Error> { + use crate::light_client::Verified; + + let now = self.chain_status()?.sync_info.latest_block_time; + + let Verified { target, supporting } = self.tendermint_light_client.header_and_minimal_set( + trusted_height, + target_height, + client_state, + now, + )?; + + Ok((target, supporting)) + } + + fn maybe_register_counterparty_payee( + &mut self, + _channel_id: &ibc_relayer_types::core::ics24_host::identifier::ChannelId, + _port_id: &ibc_relayer_types::core::ics24_host::identifier::PortId, + _counterparty_payee: &ibc_relayer_types::signer::Signer, + ) -> Result<(), Error> { + todo!() + } + + fn cross_chain_query( + &self, + _requests: Vec, + ) -> Result< + Vec, + Error, + > { + todo!() + } + + fn query_incentivized_packet( + &self, + _request: ibc_proto::ibc::apps::fee::v1::QueryIncentivizedPacketRequest, + ) -> Result { + todo!() + } + + fn query_consumer_chains(&self) -> Result, Error> { + todo!() + } +} + +/// Returns the suffix counter for a CosmosSDK client id. +/// Returns `None` if the client identifier is malformed +/// and the suffix could not be parsed. +fn client_id_suffix(client_id: &ClientId) -> Option { + client_id + .as_str() + .split('-') + .last() + .and_then(|e| e.parse::().ok()) +} + +fn decode_merkle_proof(proof_bytes: Vec) -> Result { + let proof_bytes = CommitmentProofBytes::try_from(proof_bytes).map_err(|e| { + Error::temp_penumbra_error(format!("couldnt decode CommitmentProofBytes: {}", e)) + })?; + let raw_proof: RawMerkleProof = RawMerkleProof::try_from(proof_bytes) + .map_err(|e| Error::temp_penumbra_error(format!("couldnt decode RawMerkleProof: {}", e)))?; + + let proof = MerkleProof::from(raw_proof); + + Ok(proof) +} + +const LEAF_DOMAIN_SEPARATOR: &[u8] = b"JMT::LeafNode"; +const INTERNAL_DOMAIN_SEPARATOR: &[u8] = b"JMT::IntrnalNode"; + +const SPARSE_MERKLE_PLACEHOLDER_HASH: [u8; 32] = *b"SPARSE_MERKLE_PLACEHOLDER_HASH__"; + +fn ics23_spec() -> ics23::ProofSpec { + ics23::ProofSpec { + leaf_spec: Some(ics23::LeafOp { + hash: ics23::HashOp::Sha256.into(), + prehash_key: ics23::HashOp::Sha256.into(), + prehash_value: ics23::HashOp::Sha256.into(), + length: ics23::LengthOp::NoPrefix.into(), + prefix: LEAF_DOMAIN_SEPARATOR.to_vec(), + }), + inner_spec: Some(ics23::InnerSpec { + hash: ics23::HashOp::Sha256.into(), + child_order: vec![0, 1], + min_prefix_length: INTERNAL_DOMAIN_SEPARATOR.len() as i32, + max_prefix_length: INTERNAL_DOMAIN_SEPARATOR.len() as i32, + child_size: 32, + empty_child: SPARSE_MERKLE_PLACEHOLDER_HASH.to_vec(), + }), + min_depth: 0, + max_depth: 64, + prehash_key_before_comparison: true, + } +} +/// The ICS23 proof spec for penumbra's IBC state; this can be used to verify proofs +/// for other substores in the penumbra state, provided that the data is indeed inside a substore +/// (as opposed to directly in the root store.) +pub static IBC_PROOF_SPECS: Lazy> = + Lazy::new(|| vec![ics23_spec(), ics23_spec()]); + +async fn fetch_node_info( + rpc_client: &HttpClient, + config: &PenumbraConfig, +) -> Result { + crate::time!("fetch_node_info", + { + "src_chain": config.id.to_string(), + }); + + rpc_client + .status() + .await + .map(|s| s.node_info) + .map_err(|e| Error::rpc(config.rpc_addr.clone(), e)) +} diff --git a/crates/relayer/src/chain/penumbra/config.rs b/crates/relayer/src/chain/penumbra/config.rs new file mode 100644 index 0000000000..cbcda4acf5 --- /dev/null +++ b/crates/relayer/src/chain/penumbra/config.rs @@ -0,0 +1,83 @@ +use core::time::Duration; + +use ibc_relayer_types::core::ics24_host::identifier::ChainId; +use penumbra_custody::soft_kms; +use serde_derive::{Deserialize, Serialize}; +use tendermint_rpc::Url; + +use crate::config::{ + compat_mode::CompatMode, default, types::TrustThreshold, EventSourceMode, PacketFilter, + RefreshRate, +}; + +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub struct PenumbraConfig { + /// A fake key name, not used except to satisfy external interfaces. + /// + /// The Config::key_name() method returns &String, forcing configs to own a String. + /// We don't want to just change the method, because we want our fork to apply cleanly + /// onto upstream, so we need to + /// 1. use a stub field (here) + /// 2. create a separate PR to change the method signature + /// 3. rebase our change stack once it's merged and remove the stub field. + #[serde(default)] + pub stub_key_name: String, + + pub id: ChainId, + /// The URL of the app's gRPC endpoint. + pub grpc_addr: Url, + /// The URL of the cometbft RPC endpoint. + /// + /// TODO: in the long term, it would be desirable to eliminate this entirely. + pub rpc_addr: Url, + + /// The type of event source and associated settings + pub event_source: EventSourceMode, + + /// Timeout used when issuing RPC queries + #[serde(default = "default::rpc_timeout", with = "humantime_serde")] + pub rpc_timeout: Duration, + + /// Controls which packets will be relayed. + #[serde(default)] + pub packet_filter: PacketFilter, + pub clear_interval: Option, + /// How many packets to fetch at once from the chain when clearing packets + #[serde(default = "default::query_packets_chunk_size")] + pub query_packets_chunk_size: usize, + #[serde(default = "default::max_block_time", with = "humantime_serde")] + pub max_block_time: Duration, + + /// A correction parameter that helps deal with clocks that are only approximately synchronized + /// between the source and destination chains for a client. + /// This parameter is used when deciding to accept or reject a new header + /// (originating from the source chain) for any client with the destination chain + /// that uses this configuration, unless it is overridden by the client-specific + /// clock drift option. + #[serde(default = "default::clock_drift", with = "humantime_serde")] + pub clock_drift: Duration, + + /// The rate at which to refresh the client referencing this chain, + /// expressed as a fraction of the trusting period. + #[serde(default = "default::client_refresh_rate")] + pub client_refresh_rate: RefreshRate, + + /// The trust threshold defines what fraction of the total voting power of a known + /// and trusted validator set is sufficient for a commit to be accepted going forward. + #[serde(default)] + pub trust_threshold: TrustThreshold, + pub compat_mode: Option, + + /// The storage location for the penumbra view service, which tracks private state of the + /// relayer's penumbra account. + pub view_service_storage_dir: Option, + + // These last few need to be last otherwise we run into `ValueAfterTable` error when serializing to TOML + /// Key configuration + /// + /// This is used instead of the Hermes keyring, which doesn't yet handle + /// Penumbra-specific key concerns. In the future, we may want to merge + /// this with the Hermes keyring, but it's a low-priority item. + pub kms_config: soft_kms::Config, +} diff --git a/crates/relayer/src/config.rs b/crates/relayer/src/config.rs index 2f335e13d0..47adadc264 100644 --- a/crates/relayer/src/config.rs +++ b/crates/relayer/src/config.rs @@ -27,6 +27,7 @@ use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ChannelId, PortId use ibc_relayer_types::timestamp::ZERO_DURATION; use crate::chain::cosmos::config::CosmosSdkConfig; +use crate::chain::penumbra::config::PenumbraConfig; use crate::config::types::ics20_field_size_limit::Ics20FieldSizeLimit; use crate::config::types::TrustThreshold; use crate::error::Error as RelayerError; @@ -313,6 +314,8 @@ impl Config { .validate() .map_err(Into::>::into)?; } + // TODO: define a PenumbraConfig::validate + ChainConfig::Penumbra(_) => { /* no-op, for now */ } } } @@ -629,36 +632,42 @@ pub enum EventSourceMode { #[serde(tag = "type")] pub enum ChainConfig { CosmosSdk(CosmosSdkConfig), + Penumbra(PenumbraConfig), } impl ChainConfig { pub fn id(&self) -> &ChainId { match self { Self::CosmosSdk(config) => &config.id, + Self::Penumbra(config) => &config.id, } } pub fn packet_filter(&self) -> &PacketFilter { match self { Self::CosmosSdk(config) => &config.packet_filter, + Self::Penumbra(config) => &config.packet_filter, } } pub fn max_block_time(&self) -> Duration { match self { Self::CosmosSdk(config) => config.max_block_time, + Self::Penumbra(config) => config.max_block_time, } } - pub fn key_name(&self) -> &String { + pub fn key_name(&self) -> &str { match self { Self::CosmosSdk(config) => &config.key_name, + Self::Penumbra(_) => "", } } pub fn set_key_name(&mut self, key_name: String) { match self { Self::CosmosSdk(config) => config.key_name = key_name, + Self::Penumbra(_) => { /* no-op */ } } } @@ -677,6 +686,7 @@ impl ChainConfig { .map(|(key_name, keys)| (key_name, keys.into())) .collect() } + ChainConfig::Penumbra(_) => vec![], }; Ok(keys) @@ -685,18 +695,35 @@ impl ChainConfig { pub fn clear_interval(&self) -> Option { match self { Self::CosmosSdk(config) => config.clear_interval, + Self::Penumbra(config) => config.clear_interval, } } pub fn query_packets_chunk_size(&self) -> usize { match self { Self::CosmosSdk(config) => config.query_packets_chunk_size, + Self::Penumbra(config) => config.query_packets_chunk_size, } } pub fn set_query_packets_chunk_size(&mut self, query_packets_chunk_size: usize) { match self { Self::CosmosSdk(config) => config.query_packets_chunk_size = query_packets_chunk_size, + Self::Penumbra(config) => config.query_packets_chunk_size = query_packets_chunk_size, + } + } + + pub fn clock_drift(&self) -> Duration { + match self { + Self::CosmosSdk(config) => config.clock_drift, + Self::Penumbra(config) => config.clock_drift, + } + } + + pub fn trust_threshold(&self) -> TrustThreshold { + match self { + Self::CosmosSdk(config) => config.trust_threshold, + Self::Penumbra(config) => config.trust_threshold, } } } @@ -725,6 +752,9 @@ impl<'de> Deserialize<'de> for ChainConfig { "CosmosSdk" => CosmosSdkConfig::deserialize(value) .map(Self::CosmosSdk) .map_err(|e| serde::de::Error::custom(format!("invalid CosmosSdk config: {e}"))), + "Penumbra" => PenumbraConfig::deserialize(value) + .map(Self::Penumbra) + .map_err(|e| serde::de::Error::custom(format!("invalid Penumbra config: {e}"))), // // <-- Add new chain types here --> @@ -884,6 +914,9 @@ mod tests { super::ChainConfig::CosmosSdk(_) => { // all good } + _ => { + panic!("expected CosmosSdk chain type as default"); + } } } diff --git a/crates/relayer/src/error.rs b/crates/relayer/src/error.rs index 2f3a964547..7fcf3fef7d 100644 --- a/crates/relayer/src/error.rs +++ b/crates/relayer/src/error.rs @@ -618,6 +618,11 @@ define_error! { Base64Decode [ TraceError ] |_| { "Error decoding base64-encoded data" }, + + // TODO: replace with finer error variants later + TempPenumbraError + { detail: String } + |e| { format!("penumbra error: {}", e.detail) }, } } diff --git a/crates/relayer/src/event/source/rpc.rs b/crates/relayer/src/event/source/rpc.rs index b684cc6590..978378f280 100644 --- a/crates/relayer/src/event/source/rpc.rs +++ b/crates/relayer/src/event/source/rpc.rs @@ -141,6 +141,7 @@ impl EventSource { } let latest_height = latest_height(&self.rpc_client).await?; + let latest_height = (latest_height.value() - 1).try_into().unwrap(); let batches = if latest_height > self.last_fetched_height { trace!( diff --git a/crates/relayer/src/foreign_client.rs b/crates/relayer/src/foreign_client.rs index 46268b94d4..16af0b0a62 100644 --- a/crates/relayer/src/foreign_client.rs +++ b/crates/relayer/src/foreign_client.rs @@ -904,8 +904,11 @@ impl ForeignClient config.client_refresh_rate, + ChainConfig::Penumbra(config) => config.client_refresh_rate, }; let refresh_period = client_state @@ -1751,6 +1754,7 @@ impl ForeignClient config.ccv_consumer_chain, + ChainConfig::Penumbra(_) => false, }; let mut msgs = vec![]; diff --git a/crates/relayer/src/keyring/secp256k1_key_pair.rs b/crates/relayer/src/keyring/secp256k1_key_pair.rs index 7fe4ca0f05..23e3afdfe4 100644 --- a/crates/relayer/src/keyring/secp256k1_key_pair.rs +++ b/crates/relayer/src/keyring/secp256k1_key_pair.rs @@ -12,6 +12,7 @@ use ripemd::Ripemd160; use secp256k1::{Message, PublicKey, Secp256k1, SecretKey}; use serde::{Deserialize, Serialize}; use sha2::Sha256; +use signature::rand_core::OsRng; use strum::{EnumIter, IntoEnumIterator}; use super::{ @@ -228,6 +229,19 @@ impl Secp256k1KeyPair { account, }) } + + pub fn generate() -> Self { + let s = Secp256k1::new(); + let (sk1, pk1) = s.generate_keypair(&mut OsRng); + + Secp256k1KeyPair { + private_key: sk1, + public_key: pk1, + address: [0; 20], + address_type: Secp256k1AddressType::Cosmos, + account: "".to_string(), + } + } } impl SigningKeyPair for Secp256k1KeyPair { diff --git a/crates/relayer/src/light_client/tendermint.rs b/crates/relayer/src/light_client/tendermint.rs index 1927b0558e..90641194a2 100644 --- a/crates/relayer/src/light_client/tendermint.rs +++ b/crates/relayer/src/light_client/tendermint.rs @@ -269,6 +269,24 @@ fn io_for_addr( } impl LightClient { + pub fn from_rpc_parameters( + chain_id: ChainId, + rpc_addr: rpc::Url, + rpc_timeout: Duration, + peer_id: PeerId, + enable_verification: bool, + ) -> Result { + let live_io = io_for_addr(&rpc_addr, peer_id, Some(rpc_timeout))?; + + let io = AnyIo::Prod(live_io); + + Ok(Self { + chain_id: chain_id.clone(), + peer_id, + io, + enable_verification, + }) + } pub fn from_cosmos_sdk_config( config: &CosmosSdkConfig, peer_id: PeerId, diff --git a/crates/relayer/src/spawn.rs b/crates/relayer/src/spawn.rs index 113ac1f6a7..2651a1134e 100644 --- a/crates/relayer/src/spawn.rs +++ b/crates/relayer/src/spawn.rs @@ -6,7 +6,10 @@ use tokio::runtime::Runtime as TokioRuntime; use ibc_relayer_types::core::ics24_host::identifier::ChainId; use crate::{ - chain::{cosmos::CosmosSdkChain, handle::ChainHandle, runtime::ChainRuntime}, + chain::{ + cosmos::CosmosSdkChain, handle::ChainHandle, penumbra::chain::PenumbraChain, + runtime::ChainRuntime, + }, config::{ChainConfig, Config}, error::Error as RelayerError, }; @@ -82,6 +85,7 @@ pub fn spawn_chain_runtime_with_config( ) -> Result { let handle = match config { ChainConfig::CosmosSdk(_) => ChainRuntime::::spawn(config, rt), + ChainConfig::Penumbra(_) => ChainRuntime::::spawn(config, rt), } .map_err(SpawnError::relayer)?; diff --git a/tools/integration-test/src/bin/test_setup_with_binary_channel.rs b/tools/integration-test/src/bin/test_setup_with_binary_channel.rs index 336b0c1b23..9a9b0a756e 100644 --- a/tools/integration-test/src/bin/test_setup_with_binary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_binary_channel.rs @@ -49,6 +49,7 @@ impl TestOverrides for Test { // with external relayer commands. chain_config.key_store_type = Store::Test; } + ChainConfig::Penumbra(_) => todo!(), } } } diff --git a/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs b/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs index d7e7c5456f..168f35c887 100644 --- a/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs @@ -50,6 +50,7 @@ impl TestOverrides for Test { // with external relayer commands. chain_config.key_store_type = Store::Test; } + ChainConfig::Penumbra(_) => todo!(), } } } diff --git a/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs b/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs index 050c81cdcd..d6f9956113 100644 --- a/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs @@ -49,6 +49,7 @@ impl TestOverrides for Test { // with external relayer commands. chain_config.key_store_type = Store::Test; } + ChainConfig::Penumbra(_) => todo!(), } } } diff --git a/tools/integration-test/src/tests/clear_packet.rs b/tools/integration-test/src/tests/clear_packet.rs index 6da6147806..5d27f53a39 100644 --- a/tools/integration-test/src/tests/clear_packet.rs +++ b/tools/integration-test/src/tests/clear_packet.rs @@ -326,6 +326,7 @@ impl TestOverrides for ClearPacketOverrideTest { match chain_config { // Use a small clear interval in the chain configurations to override the global high interval ChainConfig::CosmosSdk(chain_config) => chain_config.clear_interval = Some(10), + ChainConfig::Penumbra(_) => todo!(), } } } diff --git a/tools/integration-test/src/tests/client_expiration.rs b/tools/integration-test/src/tests/client_expiration.rs index 007ac0b459..7eb710a2bf 100644 --- a/tools/integration-test/src/tests/client_expiration.rs +++ b/tools/integration-test/src/tests/client_expiration.rs @@ -120,6 +120,7 @@ impl TestOverrides for ExpirationTestOverrides { ChainConfig::CosmosSdk(chain_config) => { chain_config.trusting_period = Some(CLIENT_EXPIRY); } + ChainConfig::Penumbra(_) => todo!(), } } } diff --git a/tools/integration-test/src/tests/client_refresh.rs b/tools/integration-test/src/tests/client_refresh.rs index 8871cab801..07859f776f 100644 --- a/tools/integration-test/src/tests/client_refresh.rs +++ b/tools/integration-test/src/tests/client_refresh.rs @@ -128,12 +128,14 @@ impl BinaryChainTest for ClientFailsTest { chains, |config| { { - let ChainConfig::CosmosSdk(config_chain_a) = &mut config.chains[0]; - config_chain_a.gas_multiplier = Some(GasMultiplier::unsafe_new(0.8)); + if let ChainConfig::CosmosSdk(config_chain_a) = &mut config.chains[0] { + config_chain_a.gas_multiplier = Some(GasMultiplier::unsafe_new(0.8)); + } } - let ChainConfig::CosmosSdk(config_chain_b) = &mut config.chains[1]; - config_chain_b.gas_multiplier = Some(GasMultiplier::unsafe_new(0.8)); + if let ChainConfig::CosmosSdk(config_chain_b) = &mut config.chains[1] { + config_chain_b.gas_multiplier = Some(GasMultiplier::unsafe_new(0.8)); + } }, config, )?; diff --git a/tools/integration-test/src/tests/client_settings.rs b/tools/integration-test/src/tests/client_settings.rs index cdb7465433..c73d588144 100644 --- a/tools/integration-test/src/tests/client_settings.rs +++ b/tools/integration-test/src/tests/client_settings.rs @@ -34,6 +34,7 @@ impl TestOverrides for ClientDefaultsTest { chain_config_a.trusting_period = Some(Duration::from_secs(120_000)); chain_config_a.trust_threshold = TrustThreshold::new(13, 23).unwrap(); } + ChainConfig::Penumbra(_) => todo!(), } match &mut config.chains[1] { @@ -43,6 +44,7 @@ impl TestOverrides for ClientDefaultsTest { chain_config_b.trusting_period = Some(Duration::from_secs(340_000)); chain_config_b.trust_threshold = TrustThreshold::TWO_THIRDS; } + ChainConfig::Penumbra(_) => todo!(), } } } diff --git a/tools/integration-test/src/tests/fee/filter_fees.rs b/tools/integration-test/src/tests/fee/filter_fees.rs index a6cd76b37d..a83c14332e 100644 --- a/tools/integration-test/src/tests/fee/filter_fees.rs +++ b/tools/integration-test/src/tests/fee/filter_fees.rs @@ -31,6 +31,7 @@ impl TestOverrides for FilterIncentivizedFeesRelayerTest { ChainConfig::CosmosSdk(chain_config) => { chain_config.packet_filter = packet_filter.clone(); } + ChainConfig::Penumbra(_) => todo!(), } } } @@ -183,6 +184,7 @@ impl TestOverrides for FilterByChannelIncentivizedFeesRelayerTest { ChainConfig::CosmosSdk(chain_config) => { chain_config.packet_filter = packet_filter.clone(); } + ChainConfig::Penumbra(_) => todo!(), } } } diff --git a/tools/integration-test/src/tests/ica.rs b/tools/integration-test/src/tests/ica.rs index 03d367b675..e00f790c66 100644 --- a/tools/integration-test/src/tests/ica.rs +++ b/tools/integration-test/src/tests/ica.rs @@ -73,6 +73,7 @@ impl TestOverrides for IcaFilterTestAllow { ChainConfig::CosmosSdk(chain_config) => { chain_config.packet_filter = self.packet_filter.clone(); } + ChainConfig::Penumbra(_) => todo!(), } } } @@ -203,6 +204,7 @@ impl TestOverrides for IcaFilterTestDeny { FilterPattern::Wildcard("*".parse().unwrap()), )])); } + ChainConfig::Penumbra(_) => todo!(), } } } diff --git a/tools/integration-test/src/tests/memo.rs b/tools/integration-test/src/tests/memo.rs index 2b44b90d48..2448671062 100644 --- a/tools/integration-test/src/tests/memo.rs +++ b/tools/integration-test/src/tests/memo.rs @@ -30,6 +30,7 @@ impl TestOverrides for MemoTest { ChainConfig::CosmosSdk(chain_config) => { chain_config.memo_prefix = self.memo.clone(); } + ChainConfig::Penumbra(_) => todo!(), } } } diff --git a/tools/integration-test/src/tests/python.rs b/tools/integration-test/src/tests/python.rs index 29d6457885..4753f9f501 100644 --- a/tools/integration-test/src/tests/python.rs +++ b/tools/integration-test/src/tests/python.rs @@ -16,6 +16,7 @@ impl TestOverrides for PythonTest { // with external relayer commands. chain_config.key_store_type = Store::Test; } + ChainConfig::Penumbra(_) => todo!(), } } } diff --git a/tools/integration-test/src/tests/tendermint/sequential.rs b/tools/integration-test/src/tests/tendermint/sequential.rs index be9d254873..c7b450734e 100644 --- a/tools/integration-test/src/tests/tendermint/sequential.rs +++ b/tools/integration-test/src/tests/tendermint/sequential.rs @@ -38,6 +38,7 @@ impl TestOverrides for SequentialCommitTest { chain_config_a.max_msg_num = MaxMsgNum::new(MESSAGES_PER_BATCH).unwrap(); chain_config_a.sequential_batch_tx = true; } + ChainConfig::Penumbra(_) => todo!(), }; match &mut config.chains[1] { @@ -45,6 +46,7 @@ impl TestOverrides for SequentialCommitTest { chain_config_b.max_msg_num = MaxMsgNum::new(MESSAGES_PER_BATCH).unwrap(); chain_config_b.sequential_batch_tx = false; } + ChainConfig::Penumbra(_) => todo!(), }; } diff --git a/tools/test-framework/src/util/interchain_security.rs b/tools/test-framework/src/util/interchain_security.rs index 035efb3c84..100a2563c1 100644 --- a/tools/test-framework/src/util/interchain_security.rs +++ b/tools/test-framework/src/util/interchain_security.rs @@ -29,6 +29,7 @@ pub fn update_relayer_config_for_consumer_chain(config: &mut Config) { chain_config.trusting_period = Some(Duration::from_secs(99)); } ChainConfig::CosmosSdk(_) => {} + ChainConfig::Penumbra(_) => todo!(), } } }