From 7096c924750a2a532e4b10163cfab645a1cfb0d2 Mon Sep 17 00:00:00 2001 From: Devashish Dixit Date: Fri, 9 Feb 2024 10:15:32 +0800 Subject: [PATCH 1/4] Upgrade ibc-go and cosmos-sdk to latest version --- Cargo.lock | 2552 +++++++++++------ Cargo.toml | 1 + event-hooks/stdout-logger/Cargo.toml | 4 +- signers/mnemonic-signer/Cargo.toml | 16 +- signers/mnemonic-signer/src/lib.rs | 29 +- solo-machine-core/Cargo.toml | 54 +- solo-machine-core/build.rs | 9 +- solo-machine-core/src/cosmos/account.rs | 3 +- .../src/cosmos/account/base_account.rs | 2 +- .../src/cosmos/account/eth_account.rs | 2 +- solo-machine-core/src/cosmos/bit_array.rs | 2 +- solo-machine-core/src/cosmos/crypto.rs | 42 +- .../src/cosmos/crypto/ed25519.rs | 29 +- .../src/cosmos/crypto/eth_secp256k1.rs | 2 +- .../src/cosmos/crypto/multisig.rs | 10 +- .../src/cosmos/crypto/secp256k1.rs | 20 +- .../src/ibc/apps/transfer/msg_transfer.rs | 2 +- .../src/ibc/client/ics06_solo_machine.rs | 6 +- .../client/ics06_solo_machine/client_state.rs | 5 + .../ics06_solo_machine/consensus_state.rs | 5 + .../ibc/client/ics06_solo_machine/header.rs | 5 + .../src/ibc/client/ics06_solo_machine/v1.rs | 3 - .../ics06_solo_machine/v1/client_state.rs | 5 - .../ics06_solo_machine/v1/consensus_state.rs | 5 - .../client/ics06_solo_machine/v1/header.rs | 5 - .../src/ibc/client/ics06_solo_machine/v2.rs | 3 - .../ics06_solo_machine/v2/client_state.rs | 5 - .../ics06_solo_machine/v2/consensus_state.rs | 5 - .../client/ics06_solo_machine/v2/header.rs | 5 - .../client/ics07_tendermint/client_state.rs | 2 +- .../ics07_tendermint/consensus_state.rs | 15 +- .../src/ibc/core/ics02_client/height.rs | 2 +- .../core/ics02_client/msg_create_client.rs | 2 +- .../core/ics02_client/msg_update_client.rs | 2 +- .../msg_connection_open_ack.rs | 2 +- .../msg_connection_open_init.rs | 2 +- .../core/ics04_channel/msg_acknowledgement.rs | 2 +- .../ics04_channel/msg_channel_close_init.rs | 2 +- .../ics04_channel/msg_channel_open_ack.rs | 2 +- .../ics04_channel/msg_channel_open_init.rs | 2 +- .../ibc/core/ics04_channel/msg_recv_packet.rs | 2 +- .../src/ibc/core/ics04_channel/packet.rs | 2 +- .../src/ibc/core/ics23_vector_commitments.rs | 4 +- .../src/ibc/core/ics24_host/identifier.rs | 2 +- .../src/ibc/core/ics24_host/path.rs | 139 +- solo-machine-core/src/model/chain/chain.rs | 2 +- solo-machine-core/src/model/ibc.rs | 22 +- solo-machine-core/src/proto.rs | 66 +- .../src/service/chain_service.rs | 4 +- solo-machine-core/src/service/ibc_service.rs | 113 +- solo-machine-core/src/transaction_builder.rs | 198 +- solo-machine/Cargo.toml | 38 +- solo-machine/src/server/chain.rs | 15 +- 53 files changed, 2117 insertions(+), 1361 deletions(-) create mode 100644 solo-machine-core/src/ibc/client/ics06_solo_machine/client_state.rs create mode 100644 solo-machine-core/src/ibc/client/ics06_solo_machine/consensus_state.rs create mode 100644 solo-machine-core/src/ibc/client/ics06_solo_machine/header.rs delete mode 100644 solo-machine-core/src/ibc/client/ics06_solo_machine/v1.rs delete mode 100644 solo-machine-core/src/ibc/client/ics06_solo_machine/v1/client_state.rs delete mode 100644 solo-machine-core/src/ibc/client/ics06_solo_machine/v1/consensus_state.rs delete mode 100644 solo-machine-core/src/ibc/client/ics06_solo_machine/v1/header.rs delete mode 100644 solo-machine-core/src/ibc/client/ics06_solo_machine/v2.rs delete mode 100644 solo-machine-core/src/ibc/client/ics06_solo_machine/v2/client_state.rs delete mode 100644 solo-machine-core/src/ibc/client/ics06_solo_machine/v2/consensus_state.rs delete mode 100644 solo-machine-core/src/ibc/client/ics06_solo_machine/v2/header.rs diff --git a/Cargo.lock b/Cargo.lock index c7134d5..cd6bc1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,26 +2,75 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "ahash" -version = "0.7.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ - "getrandom 0.2.6", + "cfg-if 1.0.0", + "getrandom", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "0.7.18" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" 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" @@ -33,64 +82,75 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.57" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-stream" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", + "pin-project-lite", ] [[package]] name = "async-stream-impl" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "atoi" -version = "0.4.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616896e05fc0e2649463a93a15183c6a16bf03413a7af88ef1285ddedfa9cda5" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" dependencies = [ "num-traits", ] +[[package]] +name = "atomic-write-file" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" +dependencies = [ + "nix", + "rand", +] + [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -101,44 +161,110 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base16ct" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea908e7347a8c64e378c17e30ef880ad73e3b4498346b055c2c00ea342f3179" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bech32" -version = "0.8.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9ff0bbfd639f15c74af777d81383cf53efb7c93613f6cab67c6c11e05bbf8b" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" [[package]] name = "bip32" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30ed1d6f8437a487a266c8293aeb95b61a23261273e3e02912cdb8b68bf798b" +checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164" dependencies = [ "bs58", "hmac", "k256", "once_cell", "pbkdf2", - "rand_core 0.6.3", + "rand_core", "ripemd", - "sha2 0.10.2", + "sha2 0.10.8", "subtle", "zeroize", ] @@ -149,11 +275,20 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +dependencies = [ + "serde", +] + [[package]] name = "bitvec" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1489fcb93a5bb47da0462ca93ad252ad6af2145cce58d10d46a83931ba9f016b" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", "radium", @@ -172,51 +307,103 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] +[[package]] +name = "borsh" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d4d6dafc1a3bb54687538972158f07b2c948bc57d5890df22c0739098b3028" +dependencies = [ + "borsh-derive", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" +dependencies = [ + "once_cell", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.48", + "syn_derive", +] + [[package]] name = "bs58" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "sha2 0.9.9", + "sha2 0.10.8", ] [[package]] name = "bumpalo" -version = "3.9.1" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" -version = "1.2.1" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "bytecheck" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" +dependencies = [ + "bytecheck_derive", + "ptr_meta", + "simdutf8", +] + +[[package]] +name = "bytecheck_derive" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e" +checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +dependencies = [ + "serde", +] [[package]] name = "cc" -version = "1.0.73" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -230,17 +417,23 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "chrono" -version = "0.4.19" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ - "libc", - "num-integer", + "android-tzdata", + "iana-time-zone", "num-traits", "serde", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -251,7 +444,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags", + "bitflags 1.3.2", "strsim", "textwrap", "unicode-width", @@ -277,14 +470,14 @@ checksum = "2af3bfb9da627b0a6c467624fb7963921433774ed435493b5c08a3053e829ad4" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "contracts" @@ -294,14 +487,14 @@ checksum = "f1d1429e3bd78171c65aa010eabcdf8f863ba3254728dbfb0ad4b1545beac15c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -309,45 +502,33 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - -[[package]] -name = "cosmos-sdk-proto" -version = "0.11.0" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339c77a6fbcca87ffeef15d8eb02a00889fbc63ef4fe708ea9493e94566c27f4" -dependencies = [ - "prost", - "prost-types", - "tendermint-proto", - "tonic", -] +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.2" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "crc" -version = "2.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" dependencies = [ "crc-catalog", ] [[package]] name = "crc-catalog" -version = "1.1.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crossbeam-channel" @@ -361,12 +542,12 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.5" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" +checksum = "adc6598521bb5a83d491e8c1fe51db7296019d2ca3cb93cc6c2a20369a4d78a2" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.8", + "crossbeam-utils 0.8.18", ] [[package]] @@ -382,12 +563,11 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.8" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" dependencies = [ "cfg-if 1.0.0", - "lazy_static", ] [[package]] @@ -398,58 +578,87 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.1" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65a74f1a0c03043720dd2b2746b9466727d5af63da6379af98ac9012384ee2" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core 0.6.3", + "rand_core", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", ] [[package]] -name = "ct-logs" -version = "0.8.0" +name = "curve25519-dalek" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ - "sct", + "cfg-if 1.0.0", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", + "zeroize", ] [[package]] -name = "curve25519-dalek" -version = "3.2.0" +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.5.1", - "subtle", + "rand_core", + "subtle-ng", "zeroize", ] [[package]] name = "der" -version = "0.6.0" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", + "pem-rfc7468", "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -458,7 +667,7 @@ checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -472,169 +681,218 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.2", + "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "dotenv" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + [[package]] name = "ecdsa" -version = "0.14.1" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e737f9eebb44576f3ee654141a789464071eb369d02c4397b32b6a79790112" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", + "digest 0.10.7", "elliptic-curve", "rfc6979", "signature", + "spki", ] [[package]] name = "ed25519" -version = "1.5.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d916019f70ae3a1faa1195685e290287f39207d38e6dfee727197cffcc002214" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ + "pkcs8", "serde", "signature", ] +[[package]] +name = "ed25519-consensus" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" +dependencies = [ + "curve25519-dalek-ng", + "hex", + "rand_core", + "sha2 0.9.9", + "zeroize", +] + [[package]] name = "ed25519-dalek" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek", "ed25519", - "rand 0.7.3", "serde", - "serde_bytes", - "sha2 0.9.9", + "sha2 0.10.8", + "subtle", "zeroize", ] [[package]] name = "either" -version = "1.6.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +dependencies = [ + "serde", +] [[package]] name = "elliptic-curve" -version = "0.12.0" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8c93ccd534d6a9790f4455cd71e7adb53a12e9af7dd54d1e258473f100cea" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "der", - "digest 0.10.3", + "digest 0.10.7", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.3", + "rand_core", "sec1", "subtle", "zeroize", ] +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if 1.0.0", +] + [[package]] name = "env_logger" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" dependencies = [ - "atty", "humantime", + "is-terminal", "log", "regex", "termcolor", ] [[package]] -name = "event-listener" -version = "2.5.2" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "eyre" -version = "0.6.8" +name = "errno" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "indenter", - "once_cell", + "libc", + "windows-sys 0.52.0", ] [[package]] -name = "fastrand" -version = "1.7.0" +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if 1.0.0", + "home", + "windows-sys 0.48.0", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "eyre" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +checksum = "b6267a1fa6f59179ea4afc8e50fd8612a3cc60bc858f786ff877a4a8cb042799" dependencies = [ - "instant", + "indenter", + "once_cell", ] +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + [[package]] name = "ff" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core 0.6.3", + "rand_core", "subtle", ] +[[package]] +name = "fiat-crypto" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" + +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" + [[package]] name = "fixed-hash" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] [[package]] name = "fixedbitset" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279fb028e20b3c4c320317955b77c5e0c9701f05a1d309905d6fc702cdc5053e" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flex-error" @@ -648,14 +906,13 @@ dependencies = [ [[package]] name = "flume" -version = "0.10.12" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843c03199d0c0ca54bc1ea90ac0d507274c28abcc4f691ae8b4eaa375087c76a" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ "futures-core", "futures-sink", - "pin-project", - "spin 0.9.3", + "spin 0.9.8", ] [[package]] @@ -666,11 +923,10 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "matches", "percent-encoding", ] @@ -682,13 +938,12 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", - "futures-executor", "futures-io", "futures-sink", "futures-task", @@ -697,9 +952,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -707,15 +962,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -724,9 +979,9 @@ dependencies = [ [[package]] name = "futures-intrusive" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", @@ -735,43 +990,30 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" - -[[package]] -name = "futures-macro" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-sink" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ - "futures-channel", "futures-core", "futures-io", - "futures-macro", "futures-sink", "futures-task", "memchr", @@ -782,54 +1024,50 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.5" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] name = "getrandom" -version = "0.1.16" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if 1.0.0", + "js-sys", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "wasi", + "wasm-bindgen", ] [[package]] -name = "getrandom" -version = "0.2.6" +name = "gimli" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "libc", - "wasi 0.10.2+wasi-snapshot-preview1", - "wasm-bindgen", -] +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "group" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core 0.6.3", + "rand_core", "subtle", ] [[package]] name = "h2" -version = "0.3.13" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -837,10 +1075,10 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 2.1.0", "slab", "tokio", - "tokio-util 0.7.1", + "tokio-util", "tracing", ] @@ -852,45 +1090,30 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashlink" -version = "0.7.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "hashbrown", + "ahash 0.7.7", ] [[package]] -name = "headers" -version = "0.3.7" +name = "hashbrown" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cff78e5788be1e0ab65b04d306b2ed5092c815ec97ec70f4ebd5aee158aa55d" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "base64", - "bitflags", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha-1", + "ahash 0.8.7", + "allocator-api2", ] [[package]] -name = "headers-core" -version = "0.2.0" +name = "hashlink" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "http", + "hashbrown 0.14.3", ] [[package]] @@ -904,9 +1127,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" dependencies = [ "unicode-segmentation", ] @@ -920,6 +1143,12 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + [[package]] name = "hex" version = "0.4.3" @@ -931,9 +1160,9 @@ dependencies = [ [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac", ] @@ -944,14 +1173,23 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "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.7" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -960,9 +1198,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -971,15 +1209,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -989,9 +1227,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -1011,41 +1249,18 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-proxy" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" -dependencies = [ - "bytes", - "futures", - "headers", - "http", - "hyper", - "hyper-rustls", - "rustls-native-certs", - "tokio", - "tokio-rustls", - "tower-service", - "webpki", -] - [[package]] name = "hyper-rustls" -version = "0.22.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "ct-logs", "futures-util", + "http", "hyper", - "log", "rustls", - "rustls-native-certs", "tokio", "tokio-rustls", - "webpki", - "webpki-roots", ] [[package]] @@ -1060,13 +1275,66 @@ 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-proto" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd4ee32b22d3b06f31529b956f4928e5c9a068d71e46cf6abfa19c31ca550553" +dependencies = [ + "base64 0.21.5", + "bytes", + "flex-error", + "ics23", + "informalsystems-pbjson 0.7.0", + "prost", + "subtle-encoding", + "tendermint-proto", + "tonic", +] + +[[package]] +name = "ics23" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "661e2d6f79952a65bc92b1c81f639ebd37228dae6ff412a5aba7d474bdc4b957" +dependencies = [ + "anyhow", + "bytes", + "hex", + "informalsystems-pbjson 0.6.0", + "prost", + "serde", +] + [[package]] name = "idna" -version = "0.2.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] @@ -1082,9 +1350,9 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" dependencies = [ "serde", ] @@ -1097,7 +1365,7 @@ checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1108,104 +1376,170 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "1.8.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", ] [[package]] -name = "instant" -version = "0.1.12" +name = "indexmap" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ - "cfg-if 1.0.0", + "equivalent", + "hashbrown 0.14.3", +] + +[[package]] +name = "informalsystems-pbjson" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4eecd90f87bea412eac91c6ef94f6b1e390128290898cbe14f2b926787ae1fb" +dependencies = [ + "base64 0.13.1", + "serde", +] + +[[package]] +name = "informalsystems-pbjson" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa4a0980c8379295100d70854354e78df2ee1c6ca0f96ffe89afeb3140e3a3d" +dependencies = [ + "base64 0.21.5", + "serde", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is-terminal" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +dependencies = [ + "hermit-abi 0.3.3", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", ] [[package]] name = "itertools" -version = "0.10.3" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.57" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22588c7ced2b1dbf490ce24ea423c7fe981a78eed56ba944426fde3eb854de93" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" dependencies = [ "cfg-if 1.0.0", "ecdsa", "elliptic-curve", - "sha2 0.10.2", - "sha3", + "once_cell", + "sha2 0.10.8", + "signature", ] [[package]] name = "keccak" -version = "0.1.0" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] [[package]] name = "libc" -version = "0.2.125" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libloading" -version = "0.7.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ "cfg-if 1.0.0", - "winapi", + "windows-sys 0.48.0", ] +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "libsqlite3-sys" -version = "0.24.2" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "898745e570c7d0453cc1fbc4a701eb6c662ed54e8fec8b7d14be137ebeeb9d14" +checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" dependencies = [ "cc", "pkg-config", "vcpkg", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" + [[package]] name = "lock_api" -version = "0.4.7" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1213,18 +1547,15 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] -name = "matches" -version = "0.1.9" +name = "matchit" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "maybe-uninit" @@ -1234,24 +1565,25 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "md-5" -version = "0.10.1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658646b21e0b72f7866c7038ab086d3d5e1cd6271f060fd37defb241949d0582" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "digest 0.10.3", + "cfg-if 1.0.0", + "digest 0.10.7", ] [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minimal-lexical" @@ -1259,16 +1591,24 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + [[package]] name = "mio" -version = "0.8.3" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "wasi", + "windows-sys 0.48.0", ] [[package]] @@ -1280,7 +1620,7 @@ dependencies = [ "bip32", "k256", "ripemd", - "sha2 0.10.2", + "sha2 0.10.8", "sha3", "solo-machine-core", ] @@ -1291,11 +1631,22 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.4.1", + "cfg-if 1.0.0", + "libc", +] + [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", @@ -1303,15 +1654,32 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", "num-traits", ] +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", +] + [[package]] name = "num-derive" version = "0.3.3" @@ -1320,7 +1688,7 @@ checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1334,51 +1702,63 @@ dependencies = [ ] [[package]] -name = "num-rational" -version = "0.4.0" +name = "num-iter" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ "autocfg", - "num-bigint", "num-integer", "num-traits", - "serde", ] [[package]] -name = "num-traits" -version = "0.2.15" +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "num-traits" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", + "libm", ] [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.3", "libc", ] [[package]] -name = "num_threads" -version = "0.1.6" +name = "object" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ - "libc", + "memchr", ] [[package]] name = "once_cell" -version = "1.10.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -1394,9 +1774,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "parity-scale-codec" -version = "3.1.2" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8b44461635bbb1a0300f100a841e571e7d919c81c73075ef5d152ffdb521066" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec", "bitvec", @@ -1408,54 +1788,53 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.1.2" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c45ed1f39709f5a89338fab50e59816b2e8815f5bb58276e7ddf9afd495f73f8" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "parking_lot" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if 1.0.0", - "instant", "libc", "redox_syscall", "smallvec", - "winapi", + "windows-targets 0.48.5", ] [[package]] name = "paste" -version = "1.0.7" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "digest 0.10.3", + "digest 0.10.7", + "hmac", ] [[package]] @@ -1485,47 +1864,56 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088" +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "petgraph" -version = "0.6.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a13a2fa9d0b63e5f22328828741e523766fff0ee9e779316902290dff3f824f" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 2.1.0", ] [[package]] name = "pin-project" -version = "1.0.10" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.10" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1533,11 +1921,22 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + [[package]] name = "pkcs8" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der", "spki", @@ -1545,21 +1944,43 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" + +[[package]] +name = "platforms" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" +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 = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +dependencies = [ + "proc-macro2", + "syn 2.0.48", +] [[package]] name = "primitive-types" -version = "0.11.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -1569,12 +1990,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.3" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" dependencies = [ - "thiserror", - "toml", + "toml_datetime", + "toml_edit", ] [[package]] @@ -1586,7 +2007,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -1603,18 +2024,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.38" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9027b48e9d4c9175fa2218adf3557f91c1137021739951d4932f5f8268ac48aa" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "prost" -version = "0.9.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ "bytes", "prost-derive", @@ -1622,75 +2043,83 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.9.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" +checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" dependencies = [ "bytes", - "heck 0.3.3", - "itertools", - "lazy_static", + "heck 0.4.1", + "itertools 0.10.5", "log", "multimap", + "once_cell", "petgraph", + "prettyplease", "prost", "prost-types", "regex", + "syn 2.0.48", "tempfile", "which", ] [[package]] name = "prost-derive" -version = "0.9.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "prost-types" -version = "0.9.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" +checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" dependencies = [ - "bytes", "prost", ] [[package]] -name = "quote" -version = "1.0.18" +name = "ptr_meta" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ - "proc-macro2", + "ptr_meta_derive", ] [[package]] -name = "radium" -version = "0.7.0" +name = "ptr_meta_derive" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] -name = "rand" -version = "0.7.3" +name = "quote" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", + "proc-macro2", ] +[[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" @@ -1698,18 +2127,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -1719,61 +2138,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core", ] [[package]] name = "rand_core" -version = "0.5.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom 0.2.6", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] name = "redox_syscall" -version = "0.2.13" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] -name = "redox_users" -version = "0.4.3" +name = "regex" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ - "getrandom 0.2.6", - "redox_syscall", - "thiserror", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] -name = "regex" -version = "1.5.5" +name = "regex-automata" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -1782,101 +2184,245 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "rend" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" dependencies = [ - "winapi", + "bytecheck", +] + +[[package]] +name = "reqwest" +version = "0.11.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +dependencies = [ + "base64 0.21.5", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-native-certs", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "system-configuration", + "tokio", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", ] [[package]] name = "rfc6979" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c0788437d5ee113c49af91d3594ebc4fcdcc962f8b6df5aa1c3eeafd8ad95de" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "crypto-bigint", "hmac", - "zeroize", + "subtle", ] [[package]] name = "ring" -version = "0.16.20" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", + "getrandom", "libc", - "once_cell", - "spin 0.5.2", + "spin 0.9.8", "untrusted", - "web-sys", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "ripemd" -version = "0.1.1" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rkyv" +version = "0.7.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527a97cdfef66f65998b5f3b637c26f5a5ec09cc52a3f9932313ac645f4190f5" +dependencies = [ + "bitvec", + "bytecheck", + "bytes", + "hashbrown 0.12.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", + "tinyvec", + "uuid 1.6.1", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1facec54cb5e0dc08553501fa740091086d0259ad0067e0d4103448e4cb22ed3" +checksum = "b5c462a1328c8e67e4d6dbad1eb0355dd43e8ab432c6e227a43657f16ade5033" dependencies = [ - "digest 0.10.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rsa" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +dependencies = [ + "const-oid", + "digest 0.10.7", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core", + "signature", + "spki", + "subtle", + "zeroize", ] [[package]] name = "rust_decimal" -version = "1.23.1" +version = "1.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22dc69eadbf0ee2110b8d20418c0c6edbaefec2811c4963dc17b6344e11fe0f8" +checksum = "06676aec5ccb8fc1da723cc8c0f9a46549f21ebb8753d3915c6c41db1e7f1dc4" dependencies = [ "arrayvec", + "borsh", + "bytes", "num-traits", + "rand", + "rkyv", "serde", + "serde_json", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustls" -version = "0.19.1" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ - "base64", "log", "ring", + "rustls-webpki", "sct", - "webpki", ] [[package]] name = "rustls-native-certs" -version = "0.5.0" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls", + "rustls-pemfile", "schannel", "security-framework", ] +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.5", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "same-file" @@ -1889,35 +2435,40 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "lazy_static", - "winapi", + "windows-sys 0.52.0", ] [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ "ring", "untrusted", ] +[[package]] +name = "seahash" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + [[package]] name = "sec1" -version = "0.3.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", @@ -1929,11 +2480,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.6.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -1942,28 +2493,34 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", ] +[[package]] +name = "semver" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" + [[package]] name = "serde" -version = "1.0.137" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.6" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212e73464ebcde48d723aa02eb270ba62eff38a9b732df31f33f1b4e145f3a54" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" dependencies = [ "serde", ] @@ -1980,20 +2537,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.81" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa", "ryu", @@ -2002,24 +2559,36 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.8" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ad84e47328a31223de7fed7a4f5087f2d6ddfe586cf3ca25b7a165bc0a5aed" +checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", ] [[package]] -name = "sha-1" -version = "0.10.0" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.3", + "digest 0.10.7", ] [[package]] @@ -2037,55 +2606,64 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.3", + "digest 0.10.7", ] [[package]] name = "sha3" -version = "0.10.1" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881bf8156c87b6301fc5ca6b27f11eeb2761224c7081e69b409d5a1951a70c86" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.3", + "digest 0.10.7", "keccak", ] [[package]] name = "signature" -version = "1.5.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.3", + "digest 0.10.7", + "rand_core", ] +[[package]] +name = "simdutf8" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" + [[package]] name = "slab" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] [[package]] name = "smallvec" -version = "1.8.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "socket2" -version = "0.4.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2126,21 +2704,21 @@ dependencies = [ "async-trait", "bech32", "chrono", - "cosmos-sdk-proto", "ed25519-dalek", "hex", + "ibc-proto", "k256", "num-rational", "primitive-types", "prost", "prost-types", - "rand 0.8.5", + "rand", "regex", "ripemd", "rust_decimal", "serde", "serde_json", - "sha2 0.10.2", + "sha2 0.10.8", "sha3", "sqlx", "tendermint", @@ -2160,18 +2738,18 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.3" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c530c2b0d0bf8b69304b39fe2001993e267461948b890cd037d8ad4293fa1a0d" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" dependencies = [ "lock_api", ] [[package]] name = "spki" -version = "0.6.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der", @@ -2179,110 +2757,217 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.1.8" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b7922be017ee70900be125523f38bdd644f4f06a1b16e8fa5a8ee8c34bffd4" +checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" dependencies = [ - "itertools", + "itertools 0.12.0", "nom", "unicode_categories", ] [[package]] name = "sqlx" -version = "0.5.13" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551873805652ba0d912fec5bbb0f8b4cdd96baf8e2ebf5970e5671092966019b" +checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" dependencies = [ "sqlx-core", "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", ] [[package]] name = "sqlx-core" -version = "0.5.13" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5" +checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" dependencies = [ - "ahash", + "ahash 0.8.7", "atoi", - "base64", - "bitflags", "byteorder", "bytes", "chrono", "crc", "crossbeam-queue", - "dirs", + "dotenvy", "either", "event-listener", - "flume", "futures-channel", "futures-core", - "futures-executor", "futures-intrusive", + "futures-io", "futures-util", "hashlink", "hex", - "hkdf", - "hmac", - "indexmap", - "itoa", - "libc", - "libsqlite3-sys", + "indexmap 2.1.0", "log", - "md-5", "memchr", "once_cell", "paste", "percent-encoding", - "rand 0.8.5", "rustls", + "rustls-pemfile", "serde", "serde_json", - "sha-1", - "sha2 0.10.2", + "sha2 0.10.8", "smallvec", "sqlformat", - "sqlx-rt", - "stringprep", "thiserror", + "tokio", "tokio-stream", + "tracing", "url", - "webpki", "webpki-roots", - "whoami", ] [[package]] name = "sqlx-macros" -version = "0.5.13" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0fba2b0cae21fc00fe6046f8baa4c7fcb49e379f0f592b04696607f69ed2e1" +checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" dependencies = [ - "dotenv", + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 1.0.109", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" +dependencies = [ + "atomic-write-file", + "dotenvy", "either", - "heck 0.4.0", + "heck 0.4.1", + "hex", "once_cell", "proc-macro2", "quote", + "serde", "serde_json", - "sha2 0.10.2", + "sha2 0.10.8", "sqlx-core", - "sqlx-rt", - "syn", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn 1.0.109", + "tempfile", + "tokio", "url", ] [[package]] -name = "sqlx-rt" -version = "0.5.13" +name = "sqlx-mysql" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4db708cd3e459078f85f39f96a00960bd841f66ee2a669e90bf36907f5a79aae" +checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" dependencies = [ + "atoi", + "base64 0.21.5", + "bitflags 2.4.1", + "byteorder", + "bytes", + "chrono", + "crc", + "digest 0.10.7", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", "once_cell", - "tokio", - "tokio-rustls", + "percent-encoding", + "rand", + "rsa", + "serde", + "sha1", + "sha2 0.10.8", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-postgres" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" +dependencies = [ + "atoi", + "base64 0.21.5", + "bitflags 2.4.1", + "byteorder", + "chrono", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand", + "serde", + "serde_json", + "sha1", + "sha2 0.10.8", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" +dependencies = [ + "atoi", + "chrono", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "sqlx-core", + "tracing", + "url", + "urlencoding", ] [[package]] @@ -2302,10 +2987,11 @@ dependencies = [ [[package]] name = "stringprep" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" dependencies = [ + "finl_unicode", "unicode-bidi", "unicode-normalization", ] @@ -2337,14 +3023,14 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "subtle-encoding" @@ -2355,27 +3041,71 @@ dependencies = [ "zeroize", ] +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "syn" -version = "1.0.93" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04066589568b72ec65f42d65a1a52436e954b168773148893c020269563decf2" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] -name = "synstructure" -version = "0.12.6" +name = "syn_derive" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" dependencies = [ + "proc-macro-error", "proc-macro2", "quote", - "syn", - "unicode-xid", + "syn 2.0.48", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", ] [[package]] @@ -2386,28 +3116,27 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.3.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if 1.0.0", "fastrand", - "libc", "redox_syscall", - "remove_dir_all", - "winapi", + "rustix", + "windows-sys 0.52.0", ] [[package]] name = "tendermint" -version = "0.23.6" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a3d617db287955b07e4bf1523b831bf5055e7d3ceab8504174181df40cb143" +checksum = "bc2294fa667c8b548ee27a9ba59115472d0a09c2ba255771092a7f1dcf03a789" dependencies = [ - "async-trait", "bytes", + "digest 0.10.7", "ed25519", - "ed25519-dalek", + "ed25519-consensus", "flex-error", "futures", "num-traits", @@ -2418,7 +3147,7 @@ dependencies = [ "serde_bytes", "serde_json", "serde_repr", - "sha2 0.9.9", + "sha2 0.10.8", "signature", "subtle", "subtle-encoding", @@ -2429,9 +3158,9 @@ dependencies = [ [[package]] name = "tendermint-config" -version = "0.23.6" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef5088b4f2df8e4dc221da2c37b1018c4d104a40da3027bda70c9f01099783" +checksum = "5a25dbe8b953e80f3d61789fbdb83bf9ad6c0ef16df5ca6546f49912542cc137" dependencies = [ "flex-error", "serde", @@ -2443,31 +3172,34 @@ dependencies = [ [[package]] name = "tendermint-light-client" -version = "0.23.6" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571098c7da376550f19554227e16e00e91b8f5b99438615340e4679343ff18d1" +checksum = "94aecbdccbc4b557649b2d1b1a4bfc27ec85205e00fb8020fce044245a4c9e3f" dependencies = [ "contracts", "crossbeam-channel", "derive_more", "flex-error", "futures", + "regex", "serde", "serde_cbor", "serde_derive", + "serde_json", "static_assertions", "tendermint", "tendermint-light-client-verifier", "tendermint-rpc", "time", "tokio", + "tracing", ] [[package]] name = "tendermint-light-client-verifier" -version = "0.23.6" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26787f3d9a6dc1c5e1e5661d7d70bb53613852b01545730df082128fd98e6529" +checksum = "74994da9de4b1144837a367ca2c60c650f5526a7c1a54760a3020959b522e474" dependencies = [ "derive_more", "flex-error", @@ -2478,9 +3210,9 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.23.6" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a65da26cc1f24cd53f40d1267372c22d6ce727d9fd40c6c61b879b26154994" +checksum = "2cc728a4f9e891d71adf66af6ecaece146f9c7a11312288a3107b3e1d6979aaf" dependencies = [ "bytes", "flex-error", @@ -2496,24 +3228,23 @@ dependencies = [ [[package]] name = "tendermint-rpc" -version = "0.23.6" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d62bc0bb8f4dfb0c9919f70d1aaa2e40750a5a82bf810aaf6590b40af70f27" +checksum = "dfbf0a4753b46a190f367337e0163d0b552a2674a6bac54e74f9f2cdcde2969b" dependencies = [ "async-trait", "bytes", "flex-error", "futures", - "getrandom 0.2.6", - "http", - "hyper", - "hyper-proxy", - "hyper-rustls", + "getrandom", "peg", "pin-project", + "reqwest", + "semver", "serde", "serde_bytes", "serde_json", + "subtle", "subtle-encoding", "tendermint", "tendermint-config", @@ -2523,15 +3254,15 @@ dependencies = [ "tokio", "tracing", "url", - "uuid", + "uuid 0.8.2", "walkdir", ] [[package]] name = "termcolor" -version = "1.1.3" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -2547,40 +3278,51 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.31" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.31" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "time" -version = "0.3.9" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ - "libc", - "num_threads", + "deranged", + "powerfmt", + "serde", + "time-core", "time-macros", ] +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + [[package]] name = "time-macros" -version = "0.2.4" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +dependencies = [ + "time-core", +] [[package]] name = "tinyvec" @@ -2593,26 +3335,25 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.18.2" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", - "once_cell", "pin-project-lite", "socket2", "tokio-macros", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2627,31 +3368,30 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.7.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "tokio-rustls" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ "rustls", "tokio", - "webpki", ] [[package]] name = "tokio-stream" -version = "0.1.8" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -2660,53 +3400,55 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", "futures-sink", - "log", "pin-project-lite", "tokio", + "tracing", ] [[package]] -name = "tokio-util" -version = "0.7.1" +name = "toml" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", + "serde", ] [[package]] -name = "toml" -version = "0.5.9" +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "serde", + "indexmap 2.1.0", + "toml_datetime", + "winnow", ] [[package]] name = "tonic" -version = "0.6.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08f4649d10a70ffa3522ca559031285d8e421d727ac85c60825761818f5d0a" +checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" dependencies = [ "async-stream", "async-trait", - "base64", + "axum", + "base64 0.21.5", "bytes", - "futures-core", - "futures-util", "h2", "http", "http-body", @@ -2715,46 +3457,46 @@ dependencies = [ "percent-encoding", "pin-project", "prost", - "prost-derive", + "rustls", "rustls-native-certs", + "rustls-pemfile", "tokio", "tokio-rustls", "tokio-stream", - "tokio-util 0.6.9", "tower", "tower-layer", "tower-service", "tracing", - "tracing-futures", ] [[package]] name = "tonic-build" -version = "0.6.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757" +checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" dependencies = [ + "prettyplease", "proc-macro2", "prost-build", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "tower" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a89fd63ad6adf737582df5db40d286574513c69a11dac5214dc3b5603d6713e" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "indexmap", + "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand 0.8.5", + "rand", "slab", "tokio", - "tokio-util 0.7.1", + "tokio-util", "tower-layer", "tower-service", "tracing", @@ -2762,23 +3504,22 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if 1.0.0", "log", "pin-project-lite", "tracing-attributes", @@ -2787,51 +3528,41 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.21" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "tracing-core" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "tracing-futures" -version = "0.2.5" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ - "pin-project", - "tracing", + "once_cell", ] [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.15.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -2841,36 +3572,36 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" + +[[package]] +name = "unicode-ident" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - -[[package]] -name = "unicode-xid" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode_categories" @@ -2880,27 +3611,26 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.2.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", ] [[package]] name = "urlencoding" -version = "2.1.0" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b90931029ab9b034b300b797048cf23723400aa757e8a2bfb9d748102f9821" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "uuid" @@ -2908,6 +3638,12 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +[[package]] +name = "uuid" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" + [[package]] name = "vcpkg" version = "0.2.15" @@ -2928,37 +3664,23 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", - "winapi", "winapi-util", ] [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2967,9 +3689,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.80" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -2977,24 +3699,36 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.80" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.48", "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" -version = "0.2.80" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3002,72 +3736,56 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.80" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.80" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "web-sys" -version = "0.3.57" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki-roots" -version = "0.21.1" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" -dependencies = [ - "webpki", -] +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "which" -version = "4.2.5" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "lazy_static", - "libc", + "home", + "once_cell", + "rustix", ] [[package]] name = "whoami" -version = "1.2.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524b58fa5a20a2fb3014dd6358b70e6579692a56ef6fce928834e488f42f65e8" -dependencies = [ - "wasm-bindgen", - "web-sys", -] +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" [[package]] name = "winapi" @@ -3087,9 +3805,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -3100,75 +3818,211 @@ 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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7520bbdec7211caa7c4e682eb1fbe07abe20cee6756b6e00f537c82c11816aa" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if 1.0.0", + "windows-sys 0.48.0", +] [[package]] name = "wyz" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e" +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", + "quote", + "syn 2.0.48", +] + [[package]] name = "zeroize" -version = "1.5.5" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94693807d016b2f2d2e14420eb3bfcca689311ff775dcf113d74ea624b7cdf07" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn", - "synstructure", + "syn 2.0.48", ] diff --git a/Cargo.toml b/Cargo.toml index 90ba410..541c76e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ members = [ "event-hooks/stdout-logger", "signers/mnemonic-signer", ] +resolver = "2" [profile.release] lto = true diff --git a/event-hooks/stdout-logger/Cargo.toml b/event-hooks/stdout-logger/Cargo.toml index 4c2af83..8b8b23c 100644 --- a/event-hooks/stdout-logger/Cargo.toml +++ b/event-hooks/stdout-logger/Cargo.toml @@ -9,6 +9,6 @@ edition = "2021" crate-type = ["dylib"] [dependencies] -anyhow = "1.0.57" -async-trait = "0.1.53" +anyhow = "1.0.79" +async-trait = "0.1.77" solo-machine-core = { path = "../../solo-machine-core" } diff --git a/signers/mnemonic-signer/Cargo.toml b/signers/mnemonic-signer/Cargo.toml index b8dac17..9f546c7 100644 --- a/signers/mnemonic-signer/Cargo.toml +++ b/signers/mnemonic-signer/Cargo.toml @@ -9,15 +9,15 @@ edition = "2021" crate-type = ["dylib"] [dependencies] -anyhow = "1.0.57" -async-trait = "0.1.53" -bip32 = { version = "0.4.0", features = ["bip39"] } -k256 = { version = "0.11.0", features = ["ecdsa"] } -ripemd = "0.1.1" -sha2 = "0.10.2" -sha3 = { version = "0.10.1", optional = true } +anyhow = "1.0.79" +async-trait = "0.1.77" +bip32 = { version = "0.5.1", features = ["bip39"] } +k256 = { version = "0.13.2", features = ["ecdsa"] } +ripemd = "0.1.3" +sha2 = "0.10.8" +sha3 = { version = "0.10.8", optional = true } solo-machine-core = { path = "../../solo-machine-core" } [features] -default = [] +default = ["ethermint"] ethermint = ["sha3", "solo-machine-core/ethermint"] diff --git a/signers/mnemonic-signer/src/lib.rs b/signers/mnemonic-signer/src/lib.rs index 956a8cd..c728624 100644 --- a/signers/mnemonic-signer/src/lib.rs +++ b/signers/mnemonic-signer/src/lib.rs @@ -15,7 +15,7 @@ use std::{env, str::FromStr, sync::Arc}; use anyhow::{anyhow, Context, Result}; use async_trait::async_trait; use bip32::{DerivationPath, ExtendedPrivateKey, Language, Mnemonic}; -use k256::ecdsa::{Signature, SigningKey}; +use k256::{ecdsa::SigningKey, schnorr::signature::SignatureEncoding}; use solo_machine_core::{ cosmos::crypto::PublicKey, signer::{AddressAlgo, Message, SignerRegistrar}, @@ -84,9 +84,9 @@ impl ToPublicKey for MnemonicSigner { let verifying_key = signing_key.verifying_key(); match self.algo { - AddressAlgo::Secp256k1 => Ok(PublicKey::Secp256k1(verifying_key)), + AddressAlgo::Secp256k1 => Ok(PublicKey::Secp256k1(*verifying_key)), #[cfg(feature = "ethermint")] - AddressAlgo::EthSecp256k1 => Ok(PublicKey::EthSecp256k1(verifying_key)), + AddressAlgo::EthSecp256k1 => Ok(PublicKey::EthSecp256k1(*verifying_key)), } } @@ -105,18 +105,23 @@ impl Signer for MnemonicSigner { async fn sign(&self, _request_id: Option<&str>, message: Message<'_>) -> Result> { let signing_key = self.get_signing_key()?; - let signature: Signature = match self.algo { - AddressAlgo::Secp256k1 => Ok(>::sign(&signing_key, message.as_ref()), - #[cfg(feature = "ethermint")] - AddressAlgo::EthSecp256k1 => >::sign(&signing_key, message.as_ref()) - .into(), - }; + .to_bytes() + .to_vec()), + #[cfg(feature = "ethermint")] + AddressAlgo::EthSecp256k1 => { + let (signature, recovery_id) = signing_key.sign_recoverable(message.as_ref())?; - Ok(signature.as_ref().to_vec()) + let mut buf = Vec::with_capacity(signature.encoded_len() + 1); + buf.extend(signature.to_bytes()); + buf.push(recovery_id.to_byte()); + + Ok(buf) + } + } } } diff --git a/solo-machine-core/Cargo.toml b/solo-machine-core/Cargo.toml index 4bcb417..7be6084 100644 --- a/solo-machine-core/Cargo.toml +++ b/solo-machine-core/Cargo.toml @@ -7,45 +7,45 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.57" -async-trait = "0.1.53" -bech32 = "0.8.1" -chrono = { version = "0.4.19", default-features = false, features = ["serde"] } -cosmos-sdk-proto = "0.11.0" -ed25519-dalek = { version = "1.0.1", features = ["serde"] } +anyhow = "1.0.79" +async-trait = "0.1.77" +bech32 = "0.9.1" +chrono = { version = "0.4.31", default-features = false, features = ["serde"] } +ed25519-dalek = { version = "2.1.0", features = ["serde"] } hex = { version = "0.4.3", features = ["serde"] } -k256 = { version = "0.11.0", features = ["ecdsa"] } -num-rational = { version = "0.4.0", features = ["serde"] } -primitive-types = { version = "0.11.1", features = ["serde"] } -prost = "0.9.0" -prost-types = "0.9.0" +ibc-proto = "0.41.0" +k256 = { version = "0.13.2", features = ["ecdsa"] } +num-rational = { version = "0.4.1", features = ["serde"] } +primitive-types = { version = "0.12.2", features = ["serde"] } +prost = "0.12.3" +prost-types = "0.12.3" rand = "0.8.5" -regex = "1.5.5" -ripemd = "0.1.1" -rust_decimal = "1.23.1" -serde = { version = "1.0.137", features = ["derive"] } -serde_json = "1.0.81" -sha2 = "0.10.2" -sha3 = { version = "0.10.1", optional = true } -sqlx = { version = "0.5.13", features = [ +regex = "1.10.2" +ripemd = "0.1.3" +rust_decimal = "1.33.1" +serde = { version = "1.0.195", features = ["derive"] } +serde_json = "1.0.111" +sha2 = "0.10.8" +sha3 = { version = "0.10.8", optional = true } +sqlx = { version = "0.7.3", features = [ "json", "macros", "runtime-tokio-rustls", "sqlite", "chrono", ] } -tendermint = "0.23.6" -tendermint-light-client = "0.23.6" -tendermint-rpc = { version = "0.23.6", features = ["http-client"] } -tokio = { version = "1.18.2", features = ["sync"] } -tonic = { version = "0.6.2", features = ["tls", "tls-roots"] } -urlencoding = "2.1.0" +tendermint = "0.34.0" +tendermint-light-client = { version = "0.34.0", features = ["rust-crypto"] } +tendermint-rpc = { version = "0.34.0", features = ["http-client"] } +tokio = { version = "1.35.1", features = ["sync"] } +tonic = { version = "0.10.2", features = ["tls", "tls-roots"] } +urlencoding = "2.1.3" [build-dependencies] -tonic-build = "0.6.2" +tonic-build = "0.10.2" [features] -default = ["solomachine-v2"] +default = ["solomachine-v2", "ethermint"] ethermint = ["sha3", "solomachine-v2"] postgres = ["sqlx/postgres"] solomachine-v2 = [] diff --git a/solo-machine-core/build.rs b/solo-machine-core/build.rs index 25252cd..c6583d7 100644 --- a/solo-machine-core/build.rs +++ b/solo-machine-core/build.rs @@ -14,17 +14,14 @@ fn main() -> Result<(), Box> { } tonic_build::configure() - .extern_path( - ".cosmos.auth.v1beta1", - "::cosmos_sdk_proto::cosmos::auth::v1beta1", - ) + .extern_path(".cosmos.auth.v1beta1", "::ibc_proto::cosmos::auth::v1beta1") .extern_path( ".ibc.core.connection.v1", - "::cosmos_sdk_proto::ibc::core::connection::v1", + "::ibc_proto::ibc::core::connection::v1", ) .extern_path( ".ibc.core.channel.v1", - "::cosmos_sdk_proto::ibc::core::channel::v1", + "::ibc_proto::ibc::core::channel::v1", ) .build_server(false) .compile(&files, &["proto"])?; diff --git a/solo-machine-core/src/cosmos/account.rs b/solo-machine-core/src/cosmos/account.rs index 2cb02e9..eedef85 100644 --- a/solo-machine-core/src/cosmos/account.rs +++ b/solo-machine-core/src/cosmos/account.rs @@ -6,9 +6,8 @@ pub mod base_account; pub mod eth_account; use anyhow::{anyhow, Result}; -use cosmos_sdk_proto::cosmos::auth::v1beta1::BaseAccount; +use ibc_proto::{cosmos::auth::v1beta1::BaseAccount, google::protobuf::Any}; use prost::Message; -use prost_types::Any; #[cfg(feature = "ethermint")] use crate::proto::ethermint::types::v1::EthAccount; diff --git a/solo-machine-core/src/cosmos/account/base_account.rs b/solo-machine-core/src/cosmos/account/base_account.rs index ea5f171..7ee97ab 100644 --- a/solo-machine-core/src/cosmos/account/base_account.rs +++ b/solo-machine-core/src/cosmos/account/base_account.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::cosmos::auth::v1beta1::BaseAccount; +use ibc_proto::cosmos::auth::v1beta1::BaseAccount; pub const TYPE_URL: &str = "/cosmos.auth.v1beta1.BaseAccount"; diff --git a/solo-machine-core/src/cosmos/account/eth_account.rs b/solo-machine-core/src/cosmos/account/eth_account.rs index d628867..4bfab81 100644 --- a/solo-machine-core/src/cosmos/account/eth_account.rs +++ b/solo-machine-core/src/cosmos/account/eth_account.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::cosmos::auth::v1beta1::BaseAccount; +use ibc_proto::cosmos::auth::v1beta1::BaseAccount; pub use crate::proto::ethermint::types::v1::EthAccount; diff --git a/solo-machine-core/src/cosmos/bit_array.rs b/solo-machine-core/src/cosmos/bit_array.rs index deabf01..6968905 100644 --- a/solo-machine-core/src/cosmos/bit_array.rs +++ b/solo-machine-core/src/cosmos/bit_array.rs @@ -2,7 +2,7 @@ #![allow(missing_docs)] use std::convert::TryFrom; -use cosmos_sdk_proto::cosmos::crypto::multisig::v1beta1::CompactBitArray; +use ibc_proto::cosmos::crypto::multisig::v1beta1::CompactBitArray; const MASK: u8 = 0b1000_0000; diff --git a/solo-machine-core/src/cosmos/crypto.rs b/solo-machine-core/src/cosmos/crypto.rs index d630947..33d1cd4 100644 --- a/solo-machine-core/src/cosmos/crypto.rs +++ b/solo-machine-core/src/cosmos/crypto.rs @@ -15,12 +15,18 @@ use std::{ use anyhow::{anyhow, ensure, Error, Result}; use bech32::{ToBase32, Variant}; -use cosmos_sdk_proto::cosmos::tx::signing::v1beta1::signature_descriptor::data::Sum as SignatureData; +use ibc_proto::{ + cosmos::{ + crypto::{ + ed25519::PubKey as Ed25519PubKey, multisig::LegacyAminoPubKey, + secp256k1::PubKey as Secp256k1PubKey, + }, + tx::signing::v1beta1::signature_descriptor::data::Sum as SignatureData, + }, + google::protobuf::Any, +}; use k256::ecdsa::VerifyingKey; -#[cfg(feature = "ethermint")] -use k256::elliptic_curve::sec1::ToEncodedPoint; use prost::Message; -use prost_types::Any; use ripemd::Ripemd160; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use sha2::{Digest, Sha256}; @@ -29,13 +35,7 @@ use sha3::Keccak256; #[cfg(feature = "ethermint")] use crate::proto::ethermint::crypto::v1::ethsecp256k1::PubKey as EthSecp256k1PubKey; -use crate::proto::{ - cosmos::crypto::{ - ed25519::PubKey as Ed25519PubKey, multisig::LegacyAminoPubKey, - secp256k1::PubKey as Secp256k1PubKey, - }, - proto_encode, AnyConvert, -}; +use crate::proto::{proto_encode, AnyConvert}; #[cfg(feature = "ethermint")] use self::eth_secp256k1::ETH_SECP256K1_PUB_KEY_TYPE_URL; @@ -85,7 +85,7 @@ pub enum PublicKey { )] k256::ecdsa::VerifyingKey, ), - Ed25519(ed25519_dalek::PublicKey), + Ed25519(ed25519_dalek::VerifyingKey), Multisig(MultisigPublicKey), } @@ -93,8 +93,8 @@ impl PublicKey { pub fn encode(&self) -> String { match self { #[cfg(feature = "ethermint")] - Self::EthSecp256k1(key) => hex::encode_upper(key.to_bytes()), - Self::Secp256k1(key) => hex::encode_upper(key.to_bytes()), + Self::EthSecp256k1(key) => hex::encode_upper(key.to_sec1_bytes()), + Self::Secp256k1(key) => hex::encode_upper(key.to_sec1_bytes()), Self::Ed25519(key) => hex::encode_upper(key.as_bytes()), Self::Multisig(_) => "unsupported key type".to_string(), } @@ -159,7 +159,7 @@ impl PublicKey { Ok(hash) } Self::Secp256k1(ref key) => { - Ok(Ripemd160::digest(&Sha256::digest(&key.to_bytes())).to_vec()) + Ok(Ripemd160::digest(&Sha256::digest(&key.to_sec1_bytes())).to_vec()) } Self::Ed25519(ref key) => Ok(Sha256::digest(key.as_bytes()).to_vec()), Self::Multisig(ref key) => { @@ -188,11 +188,13 @@ impl AnyConvert for PublicKey { } SECP256K1_PUB_KEY_TYPE_URL => { let public_key: Secp256k1PubKey = Secp256k1PubKey::decode(value.value.as_slice())?; - Ok(Self::Secp256k1(TryFrom::try_from(&public_key)?)) + Ok(Self::Secp256k1(self::secp256k1::try_from_pub_key( + &public_key, + )?)) } ED25519_PUB_KEY_TYPE_URL => { let public_key: Ed25519PubKey = Ed25519PubKey::decode(value.value.as_slice())?; - Ok(Self::Ed25519(TryFrom::try_from(&public_key)?)) + Ok(Self::Ed25519(self::ed25519::try_from_pub_key(&public_key)?)) } MULTISIG_PUB_KEY_TYPE_URL => { let multisig_key: LegacyAminoPubKey = @@ -211,11 +213,11 @@ impl AnyConvert for PublicKey { public_key.to_any() } Self::Secp256k1(ref key) => { - let public_key: Secp256k1PubKey = key.into(); + let public_key: Secp256k1PubKey = self::secp256k1::from_verifying_key(key); public_key.to_any() } Self::Ed25519(ref key) => { - let public_key: Ed25519PubKey = key.into(); + let public_key: Ed25519PubKey = self::ed25519::from_verifying_key(key); public_key.to_any() } Self::Multisig(ref key) => { @@ -230,7 +232,7 @@ fn serialize_verifying_key(key: &VerifyingKey, serializer: S) -> Result(deserializer: D) -> Result diff --git a/solo-machine-core/src/cosmos/crypto/ed25519.rs b/solo-machine-core/src/cosmos/crypto/ed25519.rs index 45a34bd..7c0f3cb 100644 --- a/solo-machine-core/src/cosmos/crypto/ed25519.rs +++ b/solo-machine-core/src/cosmos/crypto/ed25519.rs @@ -1,26 +1,29 @@ -use std::convert::TryFrom; - use anyhow::{Context, Error}; -use ed25519_dalek::PublicKey; +use ed25519_dalek::VerifyingKey; -use crate::proto::cosmos::crypto::ed25519::PubKey as Ed25519PubKey; +use ibc_proto::cosmos::crypto::ed25519::PubKey as Ed25519PubKey; pub const ED25519_PUB_KEY_TYPE_URL: &str = "/cosmos.crypto.ed25519.PubKey"; -impl From<&PublicKey> for Ed25519PubKey { - fn from(key: &PublicKey) -> Self { - Self { - key: key.to_bytes().to_vec(), - } +pub fn from_verifying_key(key: &VerifyingKey) -> Ed25519PubKey { + Ed25519PubKey { + key: key.to_bytes().to_vec(), } } -impl TryFrom<&Ed25519PubKey> for PublicKey { - type Error = Error; +pub fn try_from_pub_key(key: &Ed25519PubKey) -> Result { + let mut bytes = [0; 32]; - fn try_from(key: &Ed25519PubKey) -> Result { - Self::from_bytes(&key.key).context("unable to parse ed25519 public key from bytes") + if key.key.len() != bytes.len() { + return Err(anyhow::anyhow!( + "invalid ed25519 public key length: {}", + key.key.len() + )); } + + bytes.copy_from_slice(&key.key); + + VerifyingKey::from_bytes(&bytes).context("unable to parse ed25519 public key from bytes") } impl_any_conversion!(Ed25519PubKey, ED25519_PUB_KEY_TYPE_URL); diff --git a/solo-machine-core/src/cosmos/crypto/eth_secp256k1.rs b/solo-machine-core/src/cosmos/crypto/eth_secp256k1.rs index 94b62e7..14b971e 100644 --- a/solo-machine-core/src/cosmos/crypto/eth_secp256k1.rs +++ b/solo-machine-core/src/cosmos/crypto/eth_secp256k1.rs @@ -12,7 +12,7 @@ impl_any_conversion!(EthSecp256k1PubKey, ETH_SECP256K1_PUB_KEY_TYPE_URL); impl From<&VerifyingKey> for EthSecp256k1PubKey { fn from(key: &VerifyingKey) -> Self { Self { - key: key.to_bytes().to_vec(), + key: key.to_sec1_bytes().to_vec(), } } } diff --git a/solo-machine-core/src/cosmos/crypto/multisig.rs b/solo-machine-core/src/cosmos/crypto/multisig.rs index ebec8d2..2b8be7f 100644 --- a/solo-machine-core/src/cosmos/crypto/multisig.rs +++ b/solo-machine-core/src/cosmos/crypto/multisig.rs @@ -1,13 +1,13 @@ use std::convert::TryFrom; use anyhow::{anyhow, ensure, Error, Result}; -use cosmos_sdk_proto::cosmos::tx::signing::v1beta1::signature_descriptor::data::Multi as MultiSignatureData; +use ibc_proto::cosmos::{ + crypto::multisig::LegacyAminoPubKey, + tx::signing::v1beta1::signature_descriptor::data::Multi as MultiSignatureData, +}; use serde::{Deserialize, Serialize}; -use crate::{ - cosmos::bit_array::BitArray, - proto::{cosmos::crypto::multisig::LegacyAminoPubKey, AnyConvert}, -}; +use crate::{cosmos::bit_array::BitArray, proto::AnyConvert}; use super::PublicKey; diff --git a/solo-machine-core/src/cosmos/crypto/secp256k1.rs b/solo-machine-core/src/cosmos/crypto/secp256k1.rs index 1c42ad9..87295ac 100644 --- a/solo-machine-core/src/cosmos/crypto/secp256k1.rs +++ b/solo-machine-core/src/cosmos/crypto/secp256k1.rs @@ -1,26 +1,18 @@ -use std::convert::TryFrom; - use anyhow::{Context, Error}; use k256::ecdsa::VerifyingKey; -use crate::proto::cosmos::crypto::secp256k1::PubKey as Secp256k1PubKey; +use ibc_proto::cosmos::crypto::secp256k1::PubKey as Secp256k1PubKey; pub const SECP256K1_PUB_KEY_TYPE_URL: &str = "/cosmos.crypto.secp256k1.PubKey"; -impl From<&VerifyingKey> for Secp256k1PubKey { - fn from(key: &VerifyingKey) -> Self { - Self { - key: key.to_bytes().to_vec(), - } +pub fn from_verifying_key(key: &VerifyingKey) -> Secp256k1PubKey { + Secp256k1PubKey { + key: key.to_sec1_bytes().to_vec(), } } -impl TryFrom<&Secp256k1PubKey> for VerifyingKey { - type Error = Error; - - fn try_from(value: &Secp256k1PubKey) -> Result { - Self::from_sec1_bytes(&value.key).context("unable to parse verifying key from sec1 bytes") - } +pub fn try_from_pub_key(key: &Secp256k1PubKey) -> Result { + VerifyingKey::from_sec1_bytes(&key.key).context("unable to parse verifying key from sec1 bytes") } impl_any_conversion!(Secp256k1PubKey, SECP256K1_PUB_KEY_TYPE_URL); diff --git a/solo-machine-core/src/ibc/apps/transfer/msg_transfer.rs b/solo-machine-core/src/ibc/apps/transfer/msg_transfer.rs index 7b421ef..b9f0094 100644 --- a/solo-machine-core/src/ibc/apps/transfer/msg_transfer.rs +++ b/solo-machine-core/src/ibc/apps/transfer/msg_transfer.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::ibc::applications::transfer::v1::MsgTransfer; +use ibc_proto::ibc::applications::transfer::v1::MsgTransfer; const TYPE_URL: &str = "/ibc.applications.transfer.v1.MsgTransfer"; diff --git a/solo-machine-core/src/ibc/client/ics06_solo_machine.rs b/solo-machine-core/src/ibc/client/ics06_solo_machine.rs index 041d55c..1e80278 100644 --- a/solo-machine-core/src/ibc/client/ics06_solo_machine.rs +++ b/solo-machine-core/src/ibc/client/ics06_solo_machine.rs @@ -1,3 +1,3 @@ -pub mod v1; -#[cfg(feature = "solomachine-v2")] -pub mod v2; +pub mod client_state; +pub mod consensus_state; +pub mod header; diff --git a/solo-machine-core/src/ibc/client/ics06_solo_machine/client_state.rs b/solo-machine-core/src/ibc/client/ics06_solo_machine/client_state.rs new file mode 100644 index 0000000..02ee6cf --- /dev/null +++ b/solo-machine-core/src/ibc/client/ics06_solo_machine/client_state.rs @@ -0,0 +1,5 @@ +use ibc_proto::ibc::lightclients::solomachine::v3::ClientState; + +const TYPE_URL: &str = "/ibc.lightclients.solomachine.v3.ClientState"; + +impl_any_conversion!(ClientState, TYPE_URL); diff --git a/solo-machine-core/src/ibc/client/ics06_solo_machine/consensus_state.rs b/solo-machine-core/src/ibc/client/ics06_solo_machine/consensus_state.rs new file mode 100644 index 0000000..0c27d31 --- /dev/null +++ b/solo-machine-core/src/ibc/client/ics06_solo_machine/consensus_state.rs @@ -0,0 +1,5 @@ +use ibc_proto::ibc::lightclients::solomachine::v3::ConsensusState; + +const TYPE_URL: &str = "/ibc.lightclients.solomachine.v3.ConsensusState"; + +impl_any_conversion!(ConsensusState, TYPE_URL); diff --git a/solo-machine-core/src/ibc/client/ics06_solo_machine/header.rs b/solo-machine-core/src/ibc/client/ics06_solo_machine/header.rs new file mode 100644 index 0000000..c1be230 --- /dev/null +++ b/solo-machine-core/src/ibc/client/ics06_solo_machine/header.rs @@ -0,0 +1,5 @@ +use ibc_proto::ibc::lightclients::solomachine::v3::Header; + +const TYPE_URL: &str = "/ibc.lightclients.solomachine.v3.Header"; + +impl_any_conversion!(Header, TYPE_URL); diff --git a/solo-machine-core/src/ibc/client/ics06_solo_machine/v1.rs b/solo-machine-core/src/ibc/client/ics06_solo_machine/v1.rs deleted file mode 100644 index 1e80278..0000000 --- a/solo-machine-core/src/ibc/client/ics06_solo_machine/v1.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod client_state; -pub mod consensus_state; -pub mod header; diff --git a/solo-machine-core/src/ibc/client/ics06_solo_machine/v1/client_state.rs b/solo-machine-core/src/ibc/client/ics06_solo_machine/v1/client_state.rs deleted file mode 100644 index b1b8a1c..0000000 --- a/solo-machine-core/src/ibc/client/ics06_solo_machine/v1/client_state.rs +++ /dev/null @@ -1,5 +0,0 @@ -use cosmos_sdk_proto::ibc::lightclients::solomachine::v1::ClientState; - -const TYPE_URL: &str = "/ibc.lightclients.solomachine.v1.ClientState"; - -impl_any_conversion!(ClientState, TYPE_URL); diff --git a/solo-machine-core/src/ibc/client/ics06_solo_machine/v1/consensus_state.rs b/solo-machine-core/src/ibc/client/ics06_solo_machine/v1/consensus_state.rs deleted file mode 100644 index eddf62e..0000000 --- a/solo-machine-core/src/ibc/client/ics06_solo_machine/v1/consensus_state.rs +++ /dev/null @@ -1,5 +0,0 @@ -use cosmos_sdk_proto::ibc::lightclients::solomachine::v1::ConsensusState; - -const TYPE_URL: &str = "/ibc.lightclients.solomachine.v1.ConsensusState"; - -impl_any_conversion!(ConsensusState, TYPE_URL); diff --git a/solo-machine-core/src/ibc/client/ics06_solo_machine/v1/header.rs b/solo-machine-core/src/ibc/client/ics06_solo_machine/v1/header.rs deleted file mode 100644 index ec0dc26..0000000 --- a/solo-machine-core/src/ibc/client/ics06_solo_machine/v1/header.rs +++ /dev/null @@ -1,5 +0,0 @@ -use cosmos_sdk_proto::ibc::lightclients::solomachine::v1::Header; - -const TYPE_URL: &str = "/ibc.lightclients.solomachine.v1.Header"; - -impl_any_conversion!(Header, TYPE_URL); diff --git a/solo-machine-core/src/ibc/client/ics06_solo_machine/v2.rs b/solo-machine-core/src/ibc/client/ics06_solo_machine/v2.rs deleted file mode 100644 index 1e80278..0000000 --- a/solo-machine-core/src/ibc/client/ics06_solo_machine/v2.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod client_state; -pub mod consensus_state; -pub mod header; diff --git a/solo-machine-core/src/ibc/client/ics06_solo_machine/v2/client_state.rs b/solo-machine-core/src/ibc/client/ics06_solo_machine/v2/client_state.rs deleted file mode 100644 index 61b92ec..0000000 --- a/solo-machine-core/src/ibc/client/ics06_solo_machine/v2/client_state.rs +++ /dev/null @@ -1,5 +0,0 @@ -use crate::proto::ibc::lightclients::solomachine::v2::ClientState; - -const TYPE_URL: &str = "/ibc.lightclients.solomachine.v2.ClientState"; - -impl_any_conversion!(ClientState, TYPE_URL); diff --git a/solo-machine-core/src/ibc/client/ics06_solo_machine/v2/consensus_state.rs b/solo-machine-core/src/ibc/client/ics06_solo_machine/v2/consensus_state.rs deleted file mode 100644 index b168bd9..0000000 --- a/solo-machine-core/src/ibc/client/ics06_solo_machine/v2/consensus_state.rs +++ /dev/null @@ -1,5 +0,0 @@ -use crate::proto::ibc::lightclients::solomachine::v2::ConsensusState; - -const TYPE_URL: &str = "/ibc.lightclients.solomachine.v2.ConsensusState"; - -impl_any_conversion!(ConsensusState, TYPE_URL); diff --git a/solo-machine-core/src/ibc/client/ics06_solo_machine/v2/header.rs b/solo-machine-core/src/ibc/client/ics06_solo_machine/v2/header.rs deleted file mode 100644 index 2288668..0000000 --- a/solo-machine-core/src/ibc/client/ics06_solo_machine/v2/header.rs +++ /dev/null @@ -1,5 +0,0 @@ -use crate::proto::ibc::lightclients::solomachine::v2::Header; - -const TYPE_URL: &str = "/ibc.lightclients.solomachine.v2.Header"; - -impl_any_conversion!(Header, TYPE_URL); diff --git a/solo-machine-core/src/ibc/client/ics07_tendermint/client_state.rs b/solo-machine-core/src/ibc/client/ics07_tendermint/client_state.rs index eb66089..bfd2d07 100644 --- a/solo-machine-core/src/ibc/client/ics07_tendermint/client_state.rs +++ b/solo-machine-core/src/ibc/client/ics07_tendermint/client_state.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::ibc::lightclients::tendermint::v1::ClientState; +use ibc_proto::ibc::lightclients::tendermint::v1::ClientState; const TYPE_URL: &str = "/ibc.lightclients.tendermint.v1.ClientState"; diff --git a/solo-machine-core/src/ibc/client/ics07_tendermint/consensus_state.rs b/solo-machine-core/src/ibc/client/ics07_tendermint/consensus_state.rs index 6d4296d..f0eeb58 100644 --- a/solo-machine-core/src/ibc/client/ics07_tendermint/consensus_state.rs +++ b/solo-machine-core/src/ibc/client/ics07_tendermint/consensus_state.rs @@ -1,7 +1,7 @@ -use cosmos_sdk_proto::ibc::{ - core::commitment::v1::MerkleRoot, lightclients::tendermint::v1::ConsensusState, +use ibc_proto::{ + google::protobuf::Timestamp, + ibc::{core::commitment::v1::MerkleRoot, lightclients::tendermint::v1::ConsensusState}, }; -use prost_types::Timestamp; use tendermint::block::Header as BlockHeader; pub trait IConsensusState: Sized { @@ -10,16 +10,13 @@ pub trait IConsensusState: Sized { impl IConsensusState for ConsensusState { fn from_block_header(header: BlockHeader) -> Self { - let timestamp = - cosmos_sdk_proto::tendermint::google::protobuf::Timestamp::from(header.time); - Self { root: Some(MerkleRoot { - hash: header.app_hash.value(), + hash: header.app_hash.into(), }), timestamp: Some(Timestamp { - seconds: timestamp.seconds, - nanos: timestamp.nanos, + seconds: header.time.unix_timestamp(), + nanos: header.time.unix_timestamp_nanos() as i32, }), next_validators_hash: header.next_validators_hash.as_bytes().to_vec(), } diff --git a/solo-machine-core/src/ibc/core/ics02_client/height.rs b/solo-machine-core/src/ibc/core/ics02_client/height.rs index 3e1b46e..7b04f21 100644 --- a/solo-machine-core/src/ibc/core/ics02_client/height.rs +++ b/solo-machine-core/src/ibc/core/ics02_client/height.rs @@ -1,7 +1,7 @@ use std::{cmp::Ordering, convert::TryFrom}; use anyhow::{anyhow, ensure, Context, Error}; -use cosmos_sdk_proto::ibc::core::client::v1::Height; +use ibc_proto::ibc::core::client::v1::Height; use tendermint::block::Height as BlockHeight; pub trait IHeight: Sized { diff --git a/solo-machine-core/src/ibc/core/ics02_client/msg_create_client.rs b/solo-machine-core/src/ibc/core/ics02_client/msg_create_client.rs index 7da0512..eb36c38 100644 --- a/solo-machine-core/src/ibc/core/ics02_client/msg_create_client.rs +++ b/solo-machine-core/src/ibc/core/ics02_client/msg_create_client.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::ibc::core::client::v1::MsgCreateClient; +use ibc_proto::ibc::core::client::v1::MsgCreateClient; const TYPE_URL: &str = "/ibc.core.client.v1.MsgCreateClient"; diff --git a/solo-machine-core/src/ibc/core/ics02_client/msg_update_client.rs b/solo-machine-core/src/ibc/core/ics02_client/msg_update_client.rs index b8ef96a..b7436bb 100644 --- a/solo-machine-core/src/ibc/core/ics02_client/msg_update_client.rs +++ b/solo-machine-core/src/ibc/core/ics02_client/msg_update_client.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::ibc::core::client::v1::MsgUpdateClient; +use ibc_proto::ibc::core::client::v1::MsgUpdateClient; const TYPE_URL: &str = "/ibc.core.client.v1.MsgUpdateClient"; diff --git a/solo-machine-core/src/ibc/core/ics03_connection/msg_connection_open_ack.rs b/solo-machine-core/src/ibc/core/ics03_connection/msg_connection_open_ack.rs index 9f0afb3..dc3c74f 100644 --- a/solo-machine-core/src/ibc/core/ics03_connection/msg_connection_open_ack.rs +++ b/solo-machine-core/src/ibc/core/ics03_connection/msg_connection_open_ack.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::ibc::core::connection::v1::MsgConnectionOpenAck; +use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenAck; const TYPE_URL: &str = "/ibc.core.connection.v1.MsgConnectionOpenAck"; diff --git a/solo-machine-core/src/ibc/core/ics03_connection/msg_connection_open_init.rs b/solo-machine-core/src/ibc/core/ics03_connection/msg_connection_open_init.rs index 3fa8012..1d28ea0 100644 --- a/solo-machine-core/src/ibc/core/ics03_connection/msg_connection_open_init.rs +++ b/solo-machine-core/src/ibc/core/ics03_connection/msg_connection_open_init.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::ibc::core::connection::v1::MsgConnectionOpenInit; +use ibc_proto::ibc::core::connection::v1::MsgConnectionOpenInit; const TYPE_URL: &str = "/ibc.core.connection.v1.MsgConnectionOpenInit"; diff --git a/solo-machine-core/src/ibc/core/ics04_channel/msg_acknowledgement.rs b/solo-machine-core/src/ibc/core/ics04_channel/msg_acknowledgement.rs index b3617fa..d3d37b7 100644 --- a/solo-machine-core/src/ibc/core/ics04_channel/msg_acknowledgement.rs +++ b/solo-machine-core/src/ibc/core/ics04_channel/msg_acknowledgement.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::ibc::core::channel::v1::MsgAcknowledgement; +use ibc_proto::ibc::core::channel::v1::MsgAcknowledgement; const TYPE_URL: &str = "/ibc.core.channel.v1.MsgAcknowledgement"; diff --git a/solo-machine-core/src/ibc/core/ics04_channel/msg_channel_close_init.rs b/solo-machine-core/src/ibc/core/ics04_channel/msg_channel_close_init.rs index cec2c36..a994650 100644 --- a/solo-machine-core/src/ibc/core/ics04_channel/msg_channel_close_init.rs +++ b/solo-machine-core/src/ibc/core/ics04_channel/msg_channel_close_init.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::ibc::core::channel::v1::MsgChannelCloseInit; +use ibc_proto::ibc::core::channel::v1::MsgChannelCloseInit; const TYPE_URL: &str = "/ibc.core.channel.v1.MsgChannelCloseInit"; diff --git a/solo-machine-core/src/ibc/core/ics04_channel/msg_channel_open_ack.rs b/solo-machine-core/src/ibc/core/ics04_channel/msg_channel_open_ack.rs index 92a7be9..8666657 100644 --- a/solo-machine-core/src/ibc/core/ics04_channel/msg_channel_open_ack.rs +++ b/solo-machine-core/src/ibc/core/ics04_channel/msg_channel_open_ack.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::ibc::core::channel::v1::MsgChannelOpenAck; +use ibc_proto::ibc::core::channel::v1::MsgChannelOpenAck; const TYPE_URL: &str = "/ibc.core.channel.v1.MsgChannelOpenAck"; diff --git a/solo-machine-core/src/ibc/core/ics04_channel/msg_channel_open_init.rs b/solo-machine-core/src/ibc/core/ics04_channel/msg_channel_open_init.rs index 1163e60..7bfec79 100644 --- a/solo-machine-core/src/ibc/core/ics04_channel/msg_channel_open_init.rs +++ b/solo-machine-core/src/ibc/core/ics04_channel/msg_channel_open_init.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::ibc::core::channel::v1::MsgChannelOpenInit; +use ibc_proto::ibc::core::channel::v1::MsgChannelOpenInit; const TYPE_URL: &str = "/ibc.core.channel.v1.MsgChannelOpenInit"; diff --git a/solo-machine-core/src/ibc/core/ics04_channel/msg_recv_packet.rs b/solo-machine-core/src/ibc/core/ics04_channel/msg_recv_packet.rs index c2b46d0..81415b7 100644 --- a/solo-machine-core/src/ibc/core/ics04_channel/msg_recv_packet.rs +++ b/solo-machine-core/src/ibc/core/ics04_channel/msg_recv_packet.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::ibc::core::channel::v1::MsgRecvPacket; +use ibc_proto::ibc::core::channel::v1::MsgRecvPacket; const TYPE_URL: &str = "/ibc.core.channel.v1.MsgRecvPacket"; diff --git a/solo-machine-core/src/ibc/core/ics04_channel/packet.rs b/solo-machine-core/src/ibc/core/ics04_channel/packet.rs index 0ef0f67..88793ab 100644 --- a/solo-machine-core/src/ibc/core/ics04_channel/packet.rs +++ b/solo-machine-core/src/ibc/core/ics04_channel/packet.rs @@ -1,5 +1,5 @@ use anyhow::{anyhow, Result}; -use cosmos_sdk_proto::ibc::core::channel::v1::Packet; +use ibc_proto::ibc::core::channel::v1::Packet; use sha2::{Digest, Sha256}; pub trait IPacket { diff --git a/solo-machine-core/src/ibc/core/ics23_vector_commitments.rs b/solo-machine-core/src/ibc/core/ics23_vector_commitments.rs index b031efe..b651ec1 100644 --- a/solo-machine-core/src/ibc/core/ics23_vector_commitments.rs +++ b/solo-machine-core/src/ibc/core/ics23_vector_commitments.rs @@ -1,4 +1,4 @@ -use cosmos_sdk_proto::ics23::{HashOp, InnerSpec, LeafOp, LengthOp, ProofSpec}; +use ibc_proto::ics23::{HashOp, InnerSpec, LeafOp, LengthOp, ProofSpec}; fn tendermint_spec() -> ProofSpec { ProofSpec { @@ -19,6 +19,7 @@ fn tendermint_spec() -> ProofSpec { }), max_depth: 0, min_depth: 0, + prehash_key_before_comparison: false, } } @@ -41,6 +42,7 @@ fn iavl_spec() -> ProofSpec { }), max_depth: 0, min_depth: 0, + prehash_key_before_comparison: false, } } diff --git a/solo-machine-core/src/ibc/core/ics24_host/identifier.rs b/solo-machine-core/src/ibc/core/ics24_host/identifier.rs index e2b0ad6..13a580f 100644 --- a/solo-machine-core/src/ibc/core/ics24_host/identifier.rs +++ b/solo-machine-core/src/ibc/core/ics24_host/identifier.rs @@ -2,7 +2,7 @@ use core::fmt; use std::{convert::TryFrom, ops::Deref, str::FromStr}; use anyhow::{ensure, Error}; -use cosmos_sdk_proto::ibc::core::commitment::v1::MerklePrefix; +use ibc_proto::ibc::core::commitment::v1::MerklePrefix; use rand::{distributions::Alphanumeric, Rng}; use regex::Regex; use serde::{Deserialize, Serialize}; diff --git a/solo-machine-core/src/ibc/core/ics24_host/path.rs b/solo-machine-core/src/ibc/core/ics24_host/path.rs index c9bb086..e9a0965 100644 --- a/solo-machine-core/src/ibc/core/ics24_host/path.rs +++ b/solo-machine-core/src/ibc/core/ics24_host/path.rs @@ -1,12 +1,11 @@ use std::{ - convert::{TryFrom, TryInto}, fmt, ops::{Deref, DerefMut}, str::FromStr, }; use anyhow::{ensure, Error}; -use cosmos_sdk_proto::ibc::core::{client::v1::Height, commitment::v1::MerklePath}; +use ibc_proto::ibc::core::{client::v1::Height, commitment::v1::MerklePath}; use crate::ibc::core::ics02_client::height::IHeight; @@ -17,109 +16,66 @@ use super::identifier::{ChannelId, ClientId, ConnectionId, Identifier, PortId}; /// # Specs /// /// -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Path(String); +#[derive(Debug, Clone)] +pub struct Path(MerklePath); impl Path { /// Applies the given prefix to path - pub fn apply_prefix(&mut self, prefix: &Identifier) { - let path = format!( - "/{}/{}", - urlencoding::encode(prefix), - urlencoding::encode(&self.0) - ); - - self.0 = path; + pub fn apply_prefix(&mut self, prefix: &str) -> Result<(), Error> { + ensure!(!prefix.trim().is_empty(), "prefix cannot be empty"); + self.0.key_path.insert(0, prefix.trim().to_string()); + Ok(()) } - /// Returns bytes of current path - pub fn into_bytes(self) -> Vec { - self.0.into_bytes() + /// Returns the key at given index + pub fn get_key(&self, index: usize) -> Option<&str> { + self.0.key_path.get(index).map(AsRef::as_ref) } -} - -impl FromStr for Path { - type Err = Error; - - fn from_str(s: &str) -> Result { - ensure!(!s.trim().is_empty(), "path cannot be empty"); - - let identifiers = s - .split('/') - .map(FromStr::from_str) - .collect::, _>>()?; - ensure!( - identifiers.len() > 1, - "path {} doesn't contain any separator '/'", - s, - ); - - Ok(Self(s.to_owned())) + /// Returns the length of the path + pub fn len(&self) -> usize { + self.0.key_path.len() } -} -fn compute_path(identifiers: &[Identifier]) -> Result { - ensure!( - identifiers.len() > 1, - "path contains less than or equal to one identifier" - ); - - let mut path = String::new(); - - for id in identifiers.iter() { - path.push_str(&format!("/{}", id)); + /// Checks if the path is empty + pub fn is_empty(&self) -> bool { + self.0.key_path.is_empty() } - - Ok(path) } -impl AsRef<[u8]> for Path { - fn as_ref(&self) -> &[u8] { - self.0.as_bytes() - } -} +impl Deref for Path { + type Target = MerklePath; -impl fmt::Display for Path { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.0) + fn deref(&self) -> &Self::Target { + &self.0 } } -impl From for MerklePath { - fn from(value: Path) -> Self { - MerklePath { - key_path: vec![value.0], - } +impl DerefMut for Path { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 } } -impl TryFrom<&[Identifier]> for Path { - type Error = Error; - - fn try_from(identifiers: &[Identifier]) -> Result { - let path = compute_path(identifiers)?; - Ok(Self(path)) - } -} - -impl TryFrom<&MerklePath> for Path { - type Error = Error; +impl FromStr for Path { + type Err = Error; - fn try_from(value: &MerklePath) -> Result { - let identifiers = value - .key_path - .iter() - .map(|id| id.parse()) - .collect::, _>>()?; + fn from_str(s: &str) -> Result { + ensure!(!s.trim().is_empty(), "path cannot be empty"); - identifiers.as_slice().try_into() + Ok(Path(MerklePath { + key_path: vec![s.trim().to_string()], + })) } } -impl From for String { - fn from(path: Path) -> Self { - path.0 +impl fmt::Display for Path { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + for key in &self.0.key_path { + write!(f, "/{}", urlencoding::encode(key))?; + } + + Ok(()) } } @@ -129,8 +85,13 @@ macro_rules! impl_path { pub struct $name(Path); impl $name { - pub fn into_bytes(self) -> Vec { - self.0.into_bytes() + /// Applies the given prefix to path + #[allow(dead_code)] + pub fn with_prefix(self, prefix: &str) -> Result { + let mut path = self.0; + path.apply_prefix(prefix)?; + + Ok(Self(path)) } } @@ -140,12 +101,6 @@ macro_rules! impl_path { } } - impl AsRef<[u8]> for $name { - fn as_ref(&self) -> &[u8] { - self.0.as_ref() - } - } - impl Deref for $name { type Target = Path; @@ -159,12 +114,6 @@ macro_rules! impl_path { &mut self.0 } } - - impl From<$name> for String { - fn from(value: $name) -> Self { - value.0.into() - } - } }; } diff --git a/solo-machine-core/src/model/chain/chain.rs b/solo-machine-core/src/model/chain/chain.rs index 8bac168..1a54c23 100644 --- a/solo-machine-core/src/model/chain/chain.rs +++ b/solo-machine-core/src/model/chain/chain.rs @@ -5,7 +5,7 @@ use std::{ use anyhow::{anyhow, ensure, Context, Error, Result}; use chrono::{DateTime, Utc}; -use cosmos_sdk_proto::cosmos::bank::v1beta1::{ +use ibc_proto::cosmos::bank::v1beta1::{ query_client::QueryClient as BankQueryClient, QueryBalanceRequest, }; use num_rational::Ratio; diff --git a/solo-machine-core/src/model/ibc.rs b/solo-machine-core/src/model/ibc.rs index a3f65e9..916e40f 100644 --- a/solo-machine-core/src/model/ibc.rs +++ b/solo-machine-core/src/model/ibc.rs @@ -1,5 +1,5 @@ use anyhow::{ensure, Context, Result}; -use cosmos_sdk_proto::ibc::{ +use ibc_proto::ibc::{ core::{channel::v1::Channel, client::v1::Height, connection::v1::ConnectionEnd}, lightclients::tendermint::v1::{ ClientState as TendermintClientState, ConsensusState as TendermintConsensusState, @@ -30,7 +30,7 @@ pub async fn add_tendermint_client_state<'e>( client_id: &ClientId, client_state: &TendermintClientState, ) -> Result<()> { - let path: String = ClientStatePath::new(client_id).into(); + let path: String = ClientStatePath::new(client_id).to_string(); let data = proto_encode(client_state)?; add(executor, &path, &data).await @@ -41,7 +41,7 @@ pub async fn get_tendermint_client_state<'e>( executor: impl Executor<'e, Database = Db>, client_id: &ClientId, ) -> Result> { - let path: String = ClientStatePath::new(client_id).into(); + let path: String = ClientStatePath::new(client_id).to_string(); get(executor, &path).await } @@ -52,7 +52,7 @@ pub async fn add_tendermint_consensus_state<'e>( height: &Height, consensus_state: &TendermintConsensusState, ) -> Result<()> { - let path: String = ConsensusStatePath::new(client_id, height).into(); + let path: String = ConsensusStatePath::new(client_id, height).to_string(); let data = proto_encode(consensus_state)?; add(executor, &path, &data).await @@ -64,7 +64,7 @@ pub async fn get_tendermint_consensus_state<'e>( client_id: &ClientId, height: &Height, ) -> Result> { - let path: String = ConsensusStatePath::new(client_id, height).into(); + let path: String = ConsensusStatePath::new(client_id, height).to_string(); get(executor, &path).await } @@ -74,7 +74,7 @@ pub async fn add_connection<'e>( connection_id: &ConnectionId, connection: &ConnectionEnd, ) -> Result<()> { - let path: String = ConnectionPath::new(connection_id).into(); + let path: String = ConnectionPath::new(connection_id).to_string(); let data = proto_encode(connection)?; add(executor, &path, &data).await @@ -85,7 +85,7 @@ pub async fn get_connection<'e>( executor: impl Executor<'e, Database = Db>, connection_id: &ConnectionId, ) -> Result> { - let path: String = ConnectionPath::new(connection_id).into(); + let path: String = ConnectionPath::new(connection_id).to_string(); get(executor, &path).await } @@ -95,7 +95,7 @@ pub async fn update_connection<'e>( connection_id: &ConnectionId, connection: &ConnectionEnd, ) -> Result<()> { - let path: String = ConnectionPath::new(connection_id).into(); + let path: String = ConnectionPath::new(connection_id).to_string(); let data = proto_encode(connection)?; update(executor, &path, &data).await @@ -108,7 +108,7 @@ pub async fn add_channel<'e>( channel_id: &ChannelId, channel: &Channel, ) -> Result<()> { - let path: String = ChannelPath::new(port_id, channel_id).into(); + let path: String = ChannelPath::new(port_id, channel_id).to_string(); let data = proto_encode(channel)?; add(executor, &path, &data).await @@ -120,7 +120,7 @@ pub async fn get_channel<'e>( port_id: &PortId, channel_id: &ChannelId, ) -> Result> { - let path: String = ChannelPath::new(port_id, channel_id).into(); + let path: String = ChannelPath::new(port_id, channel_id).to_string(); get(executor, &path).await } @@ -131,7 +131,7 @@ pub async fn update_channel<'e>( channel_id: &ChannelId, channel: &Channel, ) -> Result<()> { - let path: String = ChannelPath::new(port_id, channel_id).into(); + let path: String = ChannelPath::new(port_id, channel_id).to_string(); let data = proto_encode(channel)?; update(executor, &path, &data).await diff --git a/solo-machine-core/src/proto.rs b/solo-machine-core/src/proto.rs index 2c0710d..97a9d62 100644 --- a/solo-machine-core/src/proto.rs +++ b/solo-machine-core/src/proto.rs @@ -1,27 +1,27 @@ #![allow(missing_docs)] -pub mod cosmos { - pub mod crypto { - pub mod ed25519 { - tonic::include_proto!("cosmos.crypto.ed25519"); - } +// pub mod cosmos { +// pub mod crypto { +// pub mod ed25519 { +// tonic::include_proto!("cosmos.crypto.ed25519"); +// } - pub mod multisig { - tonic::include_proto!("cosmos.crypto.multisig"); +// pub mod multisig { +// tonic::include_proto!("cosmos.crypto.multisig"); - pub mod v1beta1 { - tonic::include_proto!("cosmos.crypto.multisig.v1beta1"); - } - } +// pub mod v1beta1 { +// tonic::include_proto!("cosmos.crypto.multisig.v1beta1"); +// } +// } - pub mod secp256k1 { - tonic::include_proto!("cosmos.crypto.secp256k1"); - } +// pub mod secp256k1 { +// tonic::include_proto!("cosmos.crypto.secp256k1"); +// } - pub mod secp256r1 { - tonic::include_proto!("cosmos.crypto.secp256r1"); - } - } -} +// pub mod secp256r1 { +// tonic::include_proto!("cosmos.crypto.secp256r1"); +// } +// } +// } #[cfg(feature = "ethermint")] pub mod ethermint { @@ -40,20 +40,20 @@ pub mod ethermint { } } -#[cfg(feature = "solomachine-v2")] -pub mod ibc { - pub mod lightclients { - pub mod solomachine { - pub mod v2 { - tonic::include_proto!("ibc.lightclients.solomachine.v2"); - } - } - } -} +// #[cfg(feature = "solomachine-v2")] +// pub mod ibc { +// pub mod lightclients { +// pub mod solomachine { +// pub mod v2 { +// tonic::include_proto!("ibc.lightclients.solomachine.v2"); +// } +// } +// } +// } use anyhow::{Context, Result}; +use ibc_proto::google::protobuf::Any; use prost::Message; -use prost_types::Any; pub fn proto_encode(message: &M) -> Result> { let mut buf = Vec::with_capacity(message.encoded_len()); @@ -72,7 +72,7 @@ pub trait AnyConvert: Sized { macro_rules! impl_any_conversion { ($type: ty, $type_url: ident) => { impl $crate::proto::AnyConvert for $type { - fn from_any(value: &::prost_types::Any) -> ::anyhow::Result { + fn from_any(value: &::ibc_proto::google::protobuf::Any) -> ::anyhow::Result { ::anyhow::ensure!( value.type_url == $type_url, "invalid type url for `Any` type: expected `{}` and found `{}`", @@ -83,8 +83,8 @@ macro_rules! impl_any_conversion { ::decode(value.value.as_slice()).map_err(Into::into) } - fn to_any(&self) -> ::anyhow::Result<::prost_types::Any> { - Ok(::prost_types::Any { + fn to_any(&self) -> ::anyhow::Result<::ibc_proto::google::protobuf::Any> { + Ok(::ibc_proto::google::protobuf::Any { type_url: $type_url.to_owned(), value: $crate::proto::proto_encode(self)?, }) diff --git a/solo-machine-core/src/service/chain_service.rs b/solo-machine-core/src/service/chain_service.rs index cda068c..f8bfef6 100644 --- a/solo-machine-core/src/service/chain_service.rs +++ b/solo-machine-core/src/service/chain_service.rs @@ -52,8 +52,8 @@ impl ChainService { .await .context("unable to begin database transaction")?; - chain::add_chain(&mut transaction, &chain_id, &node_id, config).await?; - chain_keys::add_chain_key(&mut transaction, &chain_id, public_key).await?; + chain::add_chain(&mut *transaction, &chain_id, &node_id, config).await?; + chain_keys::add_chain_key(&mut *transaction, &chain_id, public_key).await?; transaction .commit() diff --git a/solo-machine-core/src/service/ibc_service.rs b/solo-machine-core/src/service/ibc_service.rs index f2cbc2a..9d55117 100644 --- a/solo-machine-core/src/service/ibc_service.rs +++ b/solo-machine-core/src/service/ibc_service.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use anyhow::{anyhow, ensure, Context, Result}; -use cosmos_sdk_proto::ibc::core::{ +use ibc_proto::ibc::core::{ channel::v1::{ Channel, Counterparty as ChannelCounterparty, Order as ChannelOrder, Packet, State as ChannelState, @@ -16,16 +16,13 @@ use cosmos_sdk_proto::ibc::core::{ use primitive_types::U256; use sqlx::{Executor, Transaction}; use tendermint::{ - abci::{ - tag::{Key, Tag}, - Event as AbciEvent, - }, + abci::{Event as AbciEvent, EventAttribute}, trust_threshold::TrustThresholdFraction, Hash as TendermintHash, }; use tendermint_light_client::{ - builder::LightClientBuilder, light_client::Options, store::memory::MemoryStore, - store::LightStore, supervisor::Instance, + builder::LightClientBuilder, instance::Instance, light_client::Options, + store::memory::MemoryStore, store::LightStore, }; use tendermint_rpc::{ endpoint::broadcast::tx_commit::Response as TxCommitResponse, Client, HttpClient, @@ -89,7 +86,7 @@ impl IbcService { .await .context("unable to begin database transaction")?; - let mut chain = chain::get_chain(&mut transaction, &chain_id) + let mut chain = chain::get_chain(&mut *transaction, &chain_id) .await? .ok_or_else(|| anyhow!("chain details for {} not found", chain_id))?; @@ -257,7 +254,7 @@ impl IbcService { )?; let tendermint_connection_id = connection_open_try( - &mut *transaction, + &mut **transaction, tendermint_client_id, solo_machine_client_id, &solo_machine_connection_id, @@ -332,7 +329,7 @@ impl IbcService { )?; let tendermint_channel_id = channel_open_try( - &mut *transaction, + &mut **transaction, &chain.config.port_id, &solo_machine_channel_id, tendermint_connection_id, @@ -389,7 +386,7 @@ impl IbcService { .begin() .await .context("unable to begin database transaction")?; - let chain = chain::get_chain(&mut transaction, chain_id) + let chain = chain::get_chain(&mut *transaction, chain_id) .await? .ok_or_else(|| anyhow!("chain details for {} not found", chain_id))?; ensure!( @@ -491,9 +488,7 @@ impl IbcService { ) .await?; - let response = rpc_client - .broadcast_tx_commit(proto_encode(&msg)?.into()) - .await?; + let response = rpc_client.broadcast_tx_commit(proto_encode(&msg)?).await?; let transaction_hash = ensure_response_success(&response)?; @@ -503,7 +498,7 @@ impl IbcService { .context("unable to commit transaction for sending tokens over IBC")?; let success: bool = extract_attribute( - &response.deliver_tx.events, + &response.tx_result.events, "fungible_token_packet", "success", )? @@ -538,7 +533,7 @@ impl IbcService { Ok(transaction_hash) } else { let error = extract_attribute( - &response.deliver_tx.events, + &response.tx_result.events, "write_acknowledgement", "packet_ack", )?; @@ -609,9 +604,7 @@ impl IbcService { ) .await?; - let response = rpc_client - .broadcast_tx_commit(proto_encode(&msg)?.into()) - .await?; + let response = rpc_client.broadcast_tx_commit(proto_encode(&msg)?).await?; let transaction_hash = ensure_response_success(&response)?; @@ -679,17 +672,17 @@ impl IbcService { .await .context("unable to begin database transaction")?; - let mut chain = chain::get_chain(&mut transaction, &chain_id) + let mut chain = chain::get_chain(&mut *transaction, &chain_id) .await? .ok_or_else(|| anyhow!("chain details for {} not found", chain_id))?; - chain_keys::add_chain_key(&mut transaction, &chain_id, &new_public_key.encode()).await?; + chain_keys::add_chain_key(&mut *transaction, &chain_id, &new_public_key.encode()).await?; let rpc_client = HttpClient::new(chain.config.rpc_addr.as_str()) .context("unable to connect to rpc client")?; let msg = transaction_builder::msg_update_solo_machine_client( - &mut transaction, + &mut *transaction, &signer, &mut chain, Some(&new_public_key), @@ -698,9 +691,7 @@ impl IbcService { ) .await?; - let response = rpc_client - .broadcast_tx_commit(proto_encode(&msg)?.into()) - .await?; + let response = rpc_client.broadcast_tx_commit(proto_encode(&msg)?).await?; ensure_response_success(&response)?; @@ -793,9 +784,7 @@ impl IbcService { ) .await?; - let response = rpc_client - .broadcast_tx_commit(proto_encode(&msg)?.into()) - .await?; + let response = rpc_client.broadcast_tx_commit(proto_encode(&msg)?).await?; transaction .commit() @@ -822,13 +811,11 @@ where let msg = transaction_builder::msg_create_solo_machine_client(signer, chain, memo, request_id) .await?; - let response = rpc_client - .broadcast_tx_commit(proto_encode(&msg)?.into()) - .await?; + let response = rpc_client.broadcast_tx_commit(proto_encode(&msg)?).await?; ensure_response_success(&response)?; - extract_attribute(&response.deliver_tx.events, "create_client", "client_id")?.parse() + extract_attribute(&response.tx_result.events, "create_client", "client_id")?.parse() } async fn create_tendermint_client<'e>( @@ -845,9 +832,9 @@ async fn create_tendermint_client<'e>( .as_ref() .ok_or_else(|| anyhow!("latest height cannot be absent in client state"))?; - ibc_handler::add_tendermint_client_state(&mut *transaction, &client_id, &client_state).await?; + ibc_handler::add_tendermint_client_state(&mut **transaction, &client_id, &client_state).await?; ibc_handler::add_tendermint_consensus_state( - &mut *transaction, + &mut **transaction, &client_id, latest_height, &consensus_state, @@ -879,14 +866,12 @@ where ) .await?; - let response = rpc_client - .broadcast_tx_commit(proto_encode(&msg)?.into()) - .await?; + let response = rpc_client.broadcast_tx_commit(proto_encode(&msg)?).await?; ensure_response_success(&response)?; extract_attribute( - &response.deliver_tx.events, + &response.tx_result.events, "connection_open_init", "connection_id", )? @@ -947,9 +932,7 @@ async fn connection_open_ack( ) .await?; - let response = rpc_client - .broadcast_tx_commit(proto_encode(&msg)?.into()) - .await?; + let response = rpc_client.broadcast_tx_commit(proto_encode(&msg)?).await?; ensure_response_success(&response)?; @@ -960,12 +943,12 @@ async fn connection_open_confirm( transaction: &mut Transaction<'_, Db>, connection_id: &ConnectionId, ) -> Result<()> { - let mut connection = ibc_handler::get_connection(&mut *transaction, connection_id) + let mut connection = ibc_handler::get_connection(&mut **transaction, connection_id) .await? .ok_or_else(|| anyhow!("connection for connection id ({}) not found", connection_id))?; connection.set_state(ConnectionState::Open); - ibc_handler::update_connection(&mut *transaction, connection_id, &connection).await + ibc_handler::update_connection(&mut **transaction, connection_id, &connection).await } async fn channel_open_init( @@ -988,14 +971,12 @@ where ) .await?; - let response = rpc_client - .broadcast_tx_commit(proto_encode(&msg)?.into()) - .await?; + let response = rpc_client.broadcast_tx_commit(proto_encode(&msg)?).await?; ensure_response_success(&response)?; extract_attribute( - &response.deliver_tx.events, + &response.tx_result.events, "channel_open_init", "channel_id", )? @@ -1051,9 +1032,7 @@ where ) .await?; - let response = rpc_client - .broadcast_tx_commit(proto_encode(&msg)?.into()) - .await?; + let response = rpc_client.broadcast_tx_commit(proto_encode(&msg)?).await?; ensure_response_success(&response)?; @@ -1065,7 +1044,7 @@ async fn channel_open_confirm( port_id: &PortId, channel_id: &ChannelId, ) -> Result<()> { - let mut channel = ibc_handler::get_channel(&mut *transaction, port_id, channel_id) + let mut channel = ibc_handler::get_channel(&mut **transaction, port_id, channel_id) .await? .ok_or_else(|| { anyhow!( @@ -1076,7 +1055,7 @@ async fn channel_open_confirm( })?; channel.set_state(ChannelState::Open); - ibc_handler::update_channel(transaction, port_id, channel_id, &channel).await + ibc_handler::update_channel(&mut **transaction, port_id, channel_id, &channel).await } /// Close solomachine channel, return the solo-machine channel id @@ -1091,7 +1070,7 @@ pub async fn channel_close_init( where C: Client + Send + Sync, { - let chain = chain::get_chain(transaction, &chain_id) + let chain = chain::get_chain(&mut **transaction, &chain_id) .await? .ok_or_else(|| anyhow!("chain details for {} not found", chain_id))?; ensure!( @@ -1101,14 +1080,12 @@ where let msg = msg_channel_close_init(signer, &chain, memo, request_id).await?; - let response = rpc_client - .broadcast_tx_commit(proto_encode(&msg)?.into()) - .await?; + let response = rpc_client.broadcast_tx_commit(proto_encode(&msg)?).await?; ensure_response_success(&response)?; let channel_id: String = extract_attribute( - &response.deliver_tx.events, + &response.tx_result.events, "channel_close_init", "channel_id", )? @@ -1124,7 +1101,7 @@ async fn close_channel_confirm( new_connection_details: &ConnectionDetails, ) -> Result<()> { // set the channel status to close - let mut channel = ibc_handler::get_channel(&mut *transaction, port_id, channel_id) + let mut channel = ibc_handler::get_channel(&mut **transaction, port_id, channel_id) .await? .ok_or_else(|| { anyhow!( @@ -1134,9 +1111,9 @@ async fn close_channel_confirm( ) })?; channel.set_state(ChannelState::Closed); - ibc_handler::update_channel(&mut *transaction, port_id, channel_id, &channel).await?; + ibc_handler::update_channel(&mut **transaction, port_id, channel_id, &channel).await?; - chain::add_connection_details(&mut *transaction, chain_id, new_connection_details).await?; + chain::add_connection_details(&mut **transaction, chain_id, new_connection_details).await?; Ok(()) } @@ -1172,8 +1149,8 @@ fn prepare_light_client( fn extract_packets(response: &TxCommitResponse) -> Result> { let mut packets = vec![]; - for event in response.deliver_tx.events.iter() { - if event.type_str == "send_packet" { + for event in response.tx_result.events.iter() { + if event.kind == "send_packet" { let mut attributes = HashMap::new(); for tag in event.attributes.iter() { @@ -1232,9 +1209,9 @@ fn ensure_response_success(response: &TxCommitResponse) -> Result { ); ensure!( - response.deliver_tx.code.is_ok(), + response.tx_result.code.is_ok(), "deliver_tx response contains error code: {}", - response.deliver_tx.log + response.tx_result.log ); Ok(response.hash.to_string()) @@ -1244,7 +1221,7 @@ fn extract_attribute(events: &[AbciEvent], event_type: &str, key: &str) -> Resul let mut attribute = None; for event in events { - if event.type_str == event_type { + if event.kind == event_type { attribute = Some(get_attribute(&event.attributes, key)?); } } @@ -1259,11 +1236,7 @@ fn extract_attribute(events: &[AbciEvent], event_type: &str, key: &str) -> Resul }) } -fn get_attribute(tags: &[Tag], key: &str) -> Result { - let key: Key = key - .parse() - .map_err(|e| anyhow!("unable to parse attribute key `{}`: {}", key, e))?; - +fn get_attribute(tags: &[EventAttribute], key: &str) -> Result { for tag in tags { if tag.key == key { return Ok(tag.value.to_string()); diff --git a/solo-machine-core/src/transaction_builder.rs b/solo-machine-core/src/transaction_builder.rs index edcd879..142f700 100644 --- a/solo-machine-core/src/transaction_builder.rs +++ b/solo-machine-core/src/transaction_builder.rs @@ -1,22 +1,8 @@ use std::convert::TryInto; -#[cfg(feature = "solomachine-v2")] -use crate::proto::ibc::lightclients::solomachine::v2::{ - ChannelStateData, ClientState as SoloMachineClientState, ClientStateData, ConnectionStateData, - ConsensusState as SoloMachineConsensusState, ConsensusStateData, DataType, - Header as SoloMachineHeader, HeaderData, PacketAcknowledgementData, PacketCommitmentData, - SignBytes, TimestampedSignatureData, -}; use anyhow::{anyhow, bail, ensure, Context, Result}; use chrono::{DateTime, Utc}; -#[cfg(not(feature = "solomachine-v2"))] -use cosmos_sdk_proto::ibc::lightclients::solomachine::v1::{ - ChannelStateData, ClientState as SoloMachineClientState, ClientStateData, ConnectionStateData, - ConsensusState as SoloMachineConsensusState, ConsensusStateData, DataType, - Header as SoloMachineHeader, HeaderData, PacketAcknowledgementData, PacketCommitmentData, - SignBytes, TimestampedSignatureData, -}; -use cosmos_sdk_proto::{ +use ibc_proto::{ cosmos::{ auth::v1beta1::{query_client::QueryClient as AuthQueryClient, QueryAccountRequest}, base::v1beta1::Coin, @@ -35,6 +21,7 @@ use cosmos_sdk_proto::{ }, }, }, + google::protobuf::{Any, Duration}, ibc::{ applications::transfer::v1::MsgTransfer, core::{ @@ -50,19 +37,25 @@ use cosmos_sdk_proto::{ MsgConnectionOpenInit, Version as ConnectionVersion, }, }, - lightclients::tendermint::v1::{ - ClientState as TendermintClientState, ConsensusState as TendermintConsensusState, - Fraction, + lightclients::{ + solomachine::v3::{ + ClientState as SoloMachineClientState, ConsensusState as SoloMachineConsensusState, + Header as SoloMachineHeader, HeaderData, SignBytes, TimestampedSignatureData, + }, + tendermint::v1::{ + ClientState as TendermintClientState, ConsensusState as TendermintConsensusState, + Fraction, + }, }, }, }; use primitive_types::U256; -use prost_types::{Any, Duration}; use serde::Serialize; use serde_json::json; +use sha2::{Digest, Sha256}; use sqlx::{Executor, Transaction}; use tendermint::block::Header; -use tendermint_light_client::supervisor::Instance; +use tendermint_light_client::instance::Instance; use tendermint_rpc::Client; use crate::{ @@ -108,12 +101,8 @@ pub async fn msg_create_solo_machine_client( let client_state = SoloMachineClientState { sequence: chain.sequence.into(), - #[cfg(not(feature = "solomachine-v2"))] - frozen_sequence: 0, - #[cfg(feature = "solomachine-v2")] is_frozen: false, consensus_state: Some(consensus_state), - allow_update_after_proposal: true, }; let any_client_state = client_state.to_any()?; @@ -142,8 +131,6 @@ pub async fn msg_update_solo_machine_client<'e>( ); } - let sequence = chain.sequence.into(); - let any_public_key = match new_public_key { Some(new_public_key) => new_public_key.to_any()?, None => signer.to_public_key()?.to_any()?, @@ -161,7 +148,6 @@ pub async fn msg_update_solo_machine_client<'e>( *chain = chain::increment_sequence(executor, &chain.id).await?; let header = SoloMachineHeader { - sequence, timestamp: to_u64_timestamp(chain.consensus_timestamp)?, signature, new_public_key: Some(any_public_key), @@ -179,7 +165,7 @@ pub async fn msg_update_solo_machine_client<'e>( let message = MsgUpdateClient { client_id: connection_details.solo_machine_client_id.to_string(), - header: Some(any_header), + client_message: Some(any_header), signer: signer.to_account_address()?, }; @@ -200,12 +186,25 @@ pub async fn msg_create_tendermint_client( let latest_header = get_latest_header(instance)?; let latest_height = get_block_height(chain, &latest_header); + #[allow(deprecated)] let client_state = TendermintClientState { chain_id: chain.id.to_string(), trust_level, - trusting_period: Some(chain.config.trusting_period.into()), + trusting_period: Some( + chain + .config + .trusting_period + .try_into() + .context("invalid trusting period")?, + ), unbonding_period, - max_clock_drift: Some(chain.config.max_clock_drift.into()), + max_clock_drift: Some( + chain + .config + .max_clock_drift + .try_into() + .context("invalid max clock drift")?, + ), frozen_height: Some(Height::zero()), latest_height: Some(latest_height), proof_specs: proof_specs(), @@ -259,31 +258,31 @@ pub async fn msg_connection_open_ack( request_id: Option<&str>, ) -> Result { let tendermint_client_state = - ibc_handler::get_tendermint_client_state(&mut *transaction, tendermint_client_id) + ibc_handler::get_tendermint_client_state(&mut **transaction, tendermint_client_id) .await? .ok_or_else(|| anyhow!("client for client id {} not found", tendermint_client_id))?; let proof_height = Height::new(0, chain.sequence.into()); let proof_try = get_connection_proof( - &mut *transaction, + &mut **transaction, &signer, chain, tendermint_connection_id, request_id, ) .await?; - *chain = chain::increment_sequence(&mut *transaction, &chain.id).await?; + *chain = chain::increment_sequence(&mut **transaction, &chain.id).await?; let proof_client = get_client_proof( - &mut *transaction, + &mut **transaction, &signer, chain, tendermint_client_id, request_id, ) .await?; - *chain = chain::increment_sequence(&mut *transaction, &chain.id).await?; + *chain = chain::increment_sequence(&mut **transaction, &chain.id).await?; let proof_consensus = get_consensus_proof( &mut *transaction, @@ -293,7 +292,7 @@ pub async fn msg_connection_open_ack( request_id, ) .await?; - *chain = chain::increment_sequence(&mut *transaction, &chain.id).await?; + *chain = chain::increment_sequence(&mut **transaction, &chain.id).await?; let message = MsgConnectionOpenAck { connection_id: solo_machine_connection_id.to_string(), @@ -309,6 +308,7 @@ pub async fn msg_connection_open_ack( proof_consensus, consensus_height: tendermint_client_state.latest_height, signer: signer.to_account_address()?, + host_consensus_state_proof: Vec::new(), }; build(signer, chain, &[message], memo, request_id).await @@ -376,14 +376,14 @@ pub async fn msg_channel_open_ack( let proof_height = Height::new(0, chain.sequence.into()); let proof_try = get_channel_proof( - &mut *transaction, + &mut **transaction, &signer, chain, tendermint_channel_id, request_id, ) .await?; - *chain = chain::increment_sequence(&mut *transaction, &chain.id).await?; + *chain = chain::increment_sequence(&mut **transaction, &chain.id).await?; let message = MsgChannelOpenAck { port_id: chain.config.port_id.to_string(), @@ -435,6 +435,7 @@ where amount: amount.to_string(), sender: sender.clone(), receiver, + memo: memo.clone(), }; let packet = Packet { @@ -465,8 +466,8 @@ where let proof_height = Height::new(0, chain.sequence.into()); - *chain = chain::increment_sequence(&mut *transaction, &chain.id).await?; - *chain = chain::increment_packet_sequence(&mut *transaction, &chain.id).await?; + *chain = chain::increment_sequence(&mut **transaction, &chain.id).await?; + *chain = chain::increment_packet_sequence(&mut **transaction, &chain.id).await?; let message = MsgRecvPacket { packet: Some(packet), @@ -517,6 +518,7 @@ pub async fn msg_token_receive( receiver, timeout_height: Some(Height::new(0, u64::from(chain.sequence) + 1)), timeout_timestamp: 0, + memo: memo.clone(), }; build(signer, chain, &[message], memo, request_id).await @@ -636,6 +638,7 @@ fn build_auth_info( Ok(AuthInfo { signer_infos: vec![signer_info], fee: Some(fee), + tip: None, }) } @@ -774,21 +777,20 @@ async fn get_packet_acknowledgement_proof( connection_details.tendermint_channel_id.as_ref().unwrap(), packet_sequence, ); - acknowledgement_path.apply_prefix(&"ibc".parse().unwrap()); - - let acknowledgement_data = PacketAcknowledgementData { - path: acknowledgement_path.into_bytes(), - acknowledgement, - }; + acknowledgement_path.apply_prefix(&"ibc")?; - let acknowledgement_data_bytes = proto_encode(&acknowledgement_data)?; + let acknowledgement_bytes = Sha256::digest(&acknowledgement).to_vec(); let sign_bytes = SignBytes { sequence: chain.sequence.into(), timestamp: to_u64_timestamp(chain.consensus_timestamp)?, diversifier: chain.config.diversifier.to_owned(), - data_type: DataType::PacketAcknowledgement.into(), - data: acknowledgement_data_bytes, + path: acknowledgement_path + .get_key(1) + .ok_or_else(|| anyhow!("invalid path {}", acknowledgement_path))? + .as_bytes() + .to_vec(), + data: acknowledgement_bytes, }; timestamped_sign(signer, chain, sign_bytes, request_id).await @@ -817,21 +819,18 @@ async fn get_packet_commitment_proof( connection_details.tendermint_channel_id.as_ref().unwrap(), chain.packet_sequence.into(), ); - commitment_path.apply_prefix(&"ibc".parse().unwrap()); - - let packet_commitment_data = PacketCommitmentData { - path: commitment_path.into_bytes(), - commitment: commitment_bytes, - }; - - let packet_commitment_data_bytes = proto_encode(&packet_commitment_data)?; + commitment_path.apply_prefix("ibc")?; let sign_bytes = SignBytes { sequence: chain.sequence.into(), timestamp: to_u64_timestamp(chain.consensus_timestamp)?, diversifier: chain.config.diversifier.to_owned(), - data_type: DataType::PacketCommitment.into(), - data: packet_commitment_data_bytes, + path: commitment_path + .get_key(1) + .ok_or_else(|| anyhow!("invalid path {}", commitment_path))? + .as_bytes() + .to_vec(), + data: commitment_bytes, }; timestamped_sign(signer, chain, sign_bytes, request_id).await @@ -855,21 +854,20 @@ async fn get_channel_proof<'e>( })?; let mut channel_path = ChannelPath::new(&chain.config.port_id, channel_id); - channel_path.apply_prefix(&"ibc".parse().unwrap()); + channel_path.apply_prefix("ibc")?; - let channel_state_data = ChannelStateData { - path: channel_path.into_bytes(), - channel: Some(channel), - }; - - let channel_state_data_bytes = proto_encode(&channel_state_data)?; + let channel_bytes = proto_encode(&channel)?; let sign_bytes = SignBytes { sequence: chain.sequence.into(), timestamp: to_u64_timestamp(chain.consensus_timestamp)?, diversifier: chain.config.diversifier.to_owned(), - data_type: DataType::ChannelState.into(), - data: channel_state_data_bytes, + path: channel_path + .get_key(1) + .ok_or_else(|| anyhow!("invalid path {}", channel_path))? + .as_bytes() + .to_vec(), + data: channel_bytes, }; timestamped_sign(signer, chain, sign_bytes, request_id).await @@ -887,21 +885,20 @@ async fn get_connection_proof<'e>( .ok_or_else(|| anyhow!("connection with id {} not found", connection_id))?; let mut connection_path = ConnectionPath::new(connection_id); - connection_path.apply_prefix(&"ibc".parse().unwrap()); - - let connection_state_data = ConnectionStateData { - path: connection_path.into_bytes(), - connection: Some(connection), - }; + connection_path.apply_prefix("ibc")?; - let connection_state_data_bytes = proto_encode(&connection_state_data)?; + let connection_bytes = proto_encode(&connection)?; let sign_bytes = SignBytes { sequence: chain.sequence.into(), timestamp: to_u64_timestamp(chain.consensus_timestamp)?, diversifier: chain.config.diversifier.to_owned(), - data_type: DataType::ConnectionState.into(), - data: connection_state_data_bytes, + path: connection_path + .get_key(1) + .ok_or_else(|| anyhow!("invalid path {}", connection_path))? + .as_bytes() + .to_vec(), + data: connection_bytes, }; timestamped_sign(signer, chain, sign_bytes, request_id).await @@ -916,25 +913,23 @@ async fn get_client_proof<'e>( ) -> Result> { let client_state = ibc_handler::get_tendermint_client_state(executor, client_id) .await? - .ok_or_else(|| anyhow!("client with id {} not found", client_id))? - .to_any()?; + .ok_or_else(|| anyhow!("client with id {} not found", client_id))?; let mut client_state_path = ClientStatePath::new(client_id); - client_state_path.apply_prefix(&"ibc".parse().unwrap()); - - let client_state_data = ClientStateData { - path: client_state_path.into_bytes(), - client_state: Some(client_state), - }; + client_state_path.apply_prefix("ibc")?; - let client_state_data_bytes = proto_encode(&client_state_data)?; + let client_state_bytes = proto_encode(&client_state)?; let sign_bytes = SignBytes { sequence: chain.sequence.into(), timestamp: to_u64_timestamp(chain.consensus_timestamp)?, diversifier: chain.config.diversifier.to_owned(), - data_type: DataType::ClientState.into(), - data: client_state_data_bytes, + path: client_state_path + .get_key(1) + .ok_or_else(|| anyhow!("invalid path {}", client_state_path))? + .as_bytes() + .to_vec(), + data: client_state_bytes, }; timestamped_sign(signer, chain, sign_bytes, request_id).await @@ -947,7 +942,7 @@ async fn get_consensus_proof( client_id: &ClientId, request_id: Option<&str>, ) -> Result> { - let client_state = ibc_handler::get_tendermint_client_state(&mut *transaction, client_id) + let client_state = ibc_handler::get_tendermint_client_state(&mut **transaction, client_id) .await? .ok_or_else(|| anyhow!("client with id {} not found", client_id))?; @@ -956,7 +951,7 @@ async fn get_consensus_proof( .ok_or_else(|| anyhow!("client state does not contain latest height"))?; let consensus_state = - ibc_handler::get_tendermint_consensus_state(&mut *transaction, client_id, &height) + ibc_handler::get_tendermint_consensus_state(&mut **transaction, client_id, &height) .await? .ok_or_else(|| { anyhow!( @@ -964,25 +959,23 @@ async fn get_consensus_proof( client_id, height.to_string(), ) - })? - .to_any()?; + })?; let mut consensus_state_path = ConsensusStatePath::new(client_id, &height); - consensus_state_path.apply_prefix(&"ibc".parse().unwrap()); - - let consensus_state_data = ConsensusStateData { - path: consensus_state_path.into_bytes(), - consensus_state: Some(consensus_state), - }; + consensus_state_path.apply_prefix("ibc")?; - let consensus_state_data_bytes = proto_encode(&consensus_state_data)?; + let consensus_state_bytes = proto_encode(&consensus_state)?; let sign_bytes = SignBytes { sequence: chain.sequence.into(), timestamp: to_u64_timestamp(chain.consensus_timestamp)?, diversifier: chain.config.diversifier.to_owned(), - data_type: DataType::ConsensusState.into(), - data: consensus_state_data_bytes, + path: consensus_state_path + .get_key(1) + .ok_or_else(|| anyhow!("invalid path {}", consensus_state_path))? + .as_bytes() + .to_vec(), + data: consensus_state_bytes, }; timestamped_sign(signer, chain, sign_bytes, request_id).await @@ -1006,7 +999,7 @@ async fn get_header_proof( sequence: chain.sequence.into(), timestamp: to_u64_timestamp(chain.consensus_timestamp)?, diversifier: chain.config.diversifier.to_owned(), - data_type: DataType::Header.into(), + path: Vec::from("solomachine:header"), data: header_data_bytes, }; @@ -1064,4 +1057,5 @@ pub struct TokenTransferPacketData { pub amount: String, pub sender: String, pub receiver: String, + pub memo: String, } diff --git a/solo-machine/Cargo.toml b/solo-machine/Cargo.toml index 05cf34f..d9ef1fb 100644 --- a/solo-machine/Cargo.toml +++ b/solo-machine/Cargo.toml @@ -7,38 +7,38 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.57" -async-trait = "0.1.53" +anyhow = "1.0.79" +async-trait = "0.1.77" cli-table = { version = "0.4.7", default-features = false, features = [ "derive", ] } dotenv = "0.15.0" -env_logger = "0.9.0" +env_logger = "0.10.1" hex = "0.4.3" humantime = "2.1.0" -k256 = { version = "0.11.0", features = ["ecdsa"] } -libloading = "0.7.3" -log = "0.4.17" -num-rational = "0.4.0" -primitive-types = "0.11.1" -prost = "0.9.0" -prost-types = "0.9.0" -rust_decimal = "1.23.1" -serde_json = "1.0.81" +k256 = { version = "0.13.2", features = ["ecdsa"] } +libloading = "0.8.1" +log = "0.4.20" +num-rational = "0.4.1" +primitive-types = "0.12.2" +prost = "0.12.3" +prost-types = "0.12.3" +rust_decimal = "1.33.1" +serde_json = "1.0.111" solo-machine-core = { path = "../solo-machine-core", features = [ "solomachine-v2", ] } structopt = "0.3.26" -tendermint = "0.23.6" -termcolor = "1.1.3" -tokio = { version = "1.18.2", features = ["fs", "macros", "rt-multi-thread"] } -tonic = { version = "0.6.2", features = ["tls", "tls-roots"] } +tendermint = "0.34.0" +termcolor = "1.4.0" +tokio = { version = "1.35.1", features = ["fs", "macros", "rt-multi-thread"] } +tonic = { version = "0.10.2", features = ["tls", "tls-roots"] } [features] -default = [] +default = ["ethermint"] ethermint = ["solo-machine-core/ethermint"] postgres = ["solo-machine-core/postgres"] [build-dependencies] -prost-build = "0.9.0" -tonic-build = "0.6.2" +prost-build = "0.12.3" +tonic-build = "0.10.2" diff --git a/solo-machine/src/server/chain.rs b/solo-machine/src/server/chain.rs index 4917de5..ad7ea1c 100644 --- a/solo-machine/src/server/chain.rs +++ b/solo-machine/src/server/chain.rs @@ -214,9 +214,18 @@ where gas_limit: Some(chain.config.fee.gas_limit), }), trust_level: Some(chain.config.trust_level.to_string()), - trusting_period: Some(chain.config.trusting_period.into()), - max_clock_drift: Some(chain.config.max_clock_drift.into()), - rpc_timeout: Some(chain.config.rpc_timeout.into()), + trusting_period: Some( + prost_types::Duration::try_from(chain.config.trusting_period) + .map_err(|err| Status::internal(err.to_string()))?, + ), + max_clock_drift: Some( + prost_types::Duration::try_from(chain.config.max_clock_drift) + .map_err(|err| Status::internal(err.to_string()))?, + ), + rpc_timeout: Some( + prost_types::Duration::try_from(chain.config.rpc_timeout) + .map_err(|err| Status::internal(err.to_string()))?, + ), diversifier: Some(chain.config.diversifier), port_id: Some(chain.config.port_id.to_string()), trusted_height: Some( From 5ef4efb5ca13d50ba33e1a3666c600fb52fcabd8 Mon Sep 17 00:00:00 2001 From: Devashish Dixit Date: Mon, 12 Feb 2024 12:47:31 +0800 Subject: [PATCH 2/4] Update github workflows and fix clippy errors --- .github/workflows/ci.yml | 61 +++++++------------- solo-machine-core/src/cosmos/crypto.rs | 6 +- solo-machine-core/src/transaction_builder.rs | 18 +----- solo-machine/src/command/chain.rs | 26 ++++----- 4 files changed, 39 insertions(+), 72 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2581e48..41bcaf5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: Continuous Integration on: pull_request: - branches: + branches: - main push: branches: @@ -13,70 +13,53 @@ jobs: name: cargo check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: arduino/setup-protoc@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - profile: minimal toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: check - args: --all + - run: cargo check --all test: name: cargo test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: arduino/setup-protoc@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - profile: minimal toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test - args: --all + - run: cargo test --all fmt: name: cargo fmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: arduino/setup-protoc@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - profile: minimal toolchain: stable components: rustfmt - override: true - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - run: cargo fmt --all -- --check clippy: name: cargo clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: arduino/setup-protoc@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - profile: minimal toolchain: stable components: clippy - override: true - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all --all-features -- -D warnings + - run: cargo clippy --all -- -D warnings audit: name: cargo audit runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: arduino/setup-protoc@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - profile: minimal toolchain: stable - override: true - - uses: actions-rs/audit-check@v1 + - uses: actions-rs/audit-check@v1.4.1 with: - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/solo-machine-core/src/cosmos/crypto.rs b/solo-machine-core/src/cosmos/crypto.rs index 33d1cd4..0a03ff7 100644 --- a/solo-machine-core/src/cosmos/crypto.rs +++ b/solo-machine-core/src/cosmos/crypto.rs @@ -101,7 +101,7 @@ impl PublicKey { } pub fn address(&self) -> Result { - Ok(hex::encode(&self.address_bytes()?)) + Ok(hex::encode(self.address_bytes()?)) } pub fn account_address(&self, prefix: &str) -> Result { @@ -159,12 +159,12 @@ impl PublicKey { Ok(hash) } Self::Secp256k1(ref key) => { - Ok(Ripemd160::digest(&Sha256::digest(&key.to_sec1_bytes())).to_vec()) + Ok(Ripemd160::digest(Sha256::digest(&key.to_sec1_bytes())).to_vec()) } Self::Ed25519(ref key) => Ok(Sha256::digest(key.as_bytes()).to_vec()), Self::Multisig(ref key) => { let multisig_key: LegacyAminoPubKey = key.try_into()?; - let bytes = Sha256::digest(&proto_encode(&multisig_key)?); + let bytes = Sha256::digest(proto_encode(&multisig_key)?); Ok(bytes[..20].to_vec()) } } diff --git a/solo-machine-core/src/transaction_builder.rs b/solo-machine-core/src/transaction_builder.rs index 142f700..0713ade 100644 --- a/solo-machine-core/src/transaction_builder.rs +++ b/solo-machine-core/src/transaction_builder.rs @@ -190,21 +190,9 @@ pub async fn msg_create_tendermint_client( let client_state = TendermintClientState { chain_id: chain.id.to_string(), trust_level, - trusting_period: Some( - chain - .config - .trusting_period - .try_into() - .context("invalid trusting period")?, - ), + trusting_period: Some(chain.config.trusting_period.into()), unbonding_period, - max_clock_drift: Some( - chain - .config - .max_clock_drift - .try_into() - .context("invalid max clock drift")?, - ), + max_clock_drift: Some(chain.config.max_clock_drift.into()), frozen_height: Some(Height::zero()), latest_height: Some(latest_height), proof_specs: proof_specs(), @@ -777,7 +765,7 @@ async fn get_packet_acknowledgement_proof( connection_details.tendermint_channel_id.as_ref().unwrap(), packet_sequence, ); - acknowledgement_path.apply_prefix(&"ibc")?; + acknowledgement_path.apply_prefix("ibc")?; let acknowledgement_bytes = Sha256::digest(&acknowledgement).to_vec(); diff --git a/solo-machine/src/command/chain.rs b/solo-machine/src/command/chain.rs index 190d1c7..901cdf2 100644 --- a/solo-machine/src/command/chain.rs +++ b/solo-machine/src/command/chain.rs @@ -222,13 +222,13 @@ impl ChainCommand { let mut table = Vec::new(); add_row(&mut table, "ID", &chain.id); - add_row(&mut table, "Node ID", &chain.node_id); + add_row(&mut table, "Node ID", chain.node_id); add_row(&mut table, "gRPC address", &chain.config.grpc_addr); add_row(&mut table, "RPC address", &chain.config.rpc_addr); - add_row(&mut table, "Fee amount", &chain.config.fee.amount); + add_row(&mut table, "Fee amount", chain.config.fee.amount); add_row(&mut table, "Fee denom", &chain.config.fee.denom); - add_row(&mut table, "Gas limit", &chain.config.fee.gas_limit); - add_row(&mut table, "Trust level", &chain.config.trust_level); + add_row(&mut table, "Gas limit", chain.config.fee.gas_limit); + add_row(&mut table, "Trust level", chain.config.trust_level); add_row( &mut table, "Trusting period", @@ -246,19 +246,15 @@ impl ChainCommand { ); add_row(&mut table, "Diversifier", &chain.config.diversifier); add_row(&mut table, "Port ID", &chain.config.port_id); - add_row(&mut table, "Trusted height", &chain.config.trusted_height); + add_row(&mut table, "Trusted height", chain.config.trusted_height); add_row( &mut table, "Trusted hash", - hex::encode_upper(&chain.config.trusted_hash), + hex::encode_upper(chain.config.trusted_hash), ); - add_row( - &mut table, - "Consensus timestamp", - &chain.consensus_timestamp, - ); - add_row(&mut table, "Sequence", &chain.sequence); - add_row(&mut table, "Packet sequence", &chain.packet_sequence); + add_row(&mut table, "Consensus timestamp", chain.consensus_timestamp); + add_row(&mut table, "Sequence", chain.sequence); + add_row(&mut table, "Packet sequence", chain.packet_sequence); match chain.connection_details { None => table.push( @@ -316,8 +312,8 @@ impl ChainCommand { } } - add_row(&mut table, "Created at", &chain.created_at); - add_row(&mut table, "Updated at", &chain.updated_at); + add_row(&mut table, "Created at", chain.created_at); + add_row(&mut table, "Updated at", chain.updated_at); print_stdout(table.table().color_choice(color_choice)) .context("unable to print table to stdout") From 0e24ebffde8aa425f5722fad48d35d6452fcb58c Mon Sep 17 00:00:00 2001 From: Devashish Dixit Date: Mon, 12 Feb 2024 12:48:41 +0800 Subject: [PATCH 3/4] update audit check github action --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41bcaf5..a8a221e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,6 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - - uses: actions-rs/audit-check@v1.4.1 + - uses: rustsec/audit-check@v1.4.1 with: token: ${{ secrets.GITHUB_TOKEN }} From efd52721cf5e29fa3edb95614b7c5eda2522481a Mon Sep 17 00:00:00 2001 From: Devashish Dixit Date: Tue, 13 Feb 2024 17:50:16 +0800 Subject: [PATCH 4/4] Fix path string encoding --- .gitignore | 1 + Cargo.lock | 17 ++- signers/mnemonic-signer/Cargo.toml | 2 +- signers/mnemonic-signer/src/lib.rs | 2 +- solo-machine-core/Cargo.toml | 6 +- .../ics07_tendermint/consensus_state.rs | 7 +- .../src/ibc/core/ics24_host/path.rs | 129 ++++++++---------- solo-machine-core/src/model/chain/chain.rs | 2 +- solo-machine-core/src/model/ibc.rs | 40 +++--- solo-machine-core/src/transaction_builder.rs | 20 +-- solo-machine/Cargo.toml | 6 +- solo-machine/src/command/chain.rs | 5 +- 12 files changed, 118 insertions(+), 119 deletions(-) diff --git a/.gitignore b/.gitignore index 693fe02..f82c9e9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ demo solo-machine.db* .env .idea/ +mars/ diff --git a/Cargo.lock b/Cargo.lock index cd6bc1a..2760858 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1680,6 +1680,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-derive" version = "0.3.3" @@ -2724,6 +2730,7 @@ dependencies = [ "tendermint", "tendermint-light-client", "tendermint-rpc", + "time", "tokio", "tonic", "tonic-build", @@ -3298,11 +3305,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", + "num-conv", "powerfmt", "serde", "time-core", @@ -3317,10 +3325,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] diff --git a/signers/mnemonic-signer/Cargo.toml b/signers/mnemonic-signer/Cargo.toml index 9f546c7..5d21598 100644 --- a/signers/mnemonic-signer/Cargo.toml +++ b/signers/mnemonic-signer/Cargo.toml @@ -19,5 +19,5 @@ sha3 = { version = "0.10.8", optional = true } solo-machine-core = { path = "../../solo-machine-core" } [features] -default = ["ethermint"] +default = [] ethermint = ["sha3", "solo-machine-core/ethermint"] diff --git a/signers/mnemonic-signer/src/lib.rs b/signers/mnemonic-signer/src/lib.rs index c728624..e0c2996 100644 --- a/signers/mnemonic-signer/src/lib.rs +++ b/signers/mnemonic-signer/src/lib.rs @@ -15,7 +15,7 @@ use std::{env, str::FromStr, sync::Arc}; use anyhow::{anyhow, Context, Result}; use async_trait::async_trait; use bip32::{DerivationPath, ExtendedPrivateKey, Language, Mnemonic}; -use k256::{ecdsa::SigningKey, schnorr::signature::SignatureEncoding}; +use k256::ecdsa::SigningKey; use solo_machine_core::{ cosmos::crypto::PublicKey, signer::{AddressAlgo, Message, SignerRegistrar}, diff --git a/solo-machine-core/Cargo.toml b/solo-machine-core/Cargo.toml index 7be6084..1b66ad8 100644 --- a/solo-machine-core/Cargo.toml +++ b/solo-machine-core/Cargo.toml @@ -37,6 +37,7 @@ sqlx = { version = "0.7.3", features = [ tendermint = "0.34.0" tendermint-light-client = { version = "0.34.0", features = ["rust-crypto"] } tendermint-rpc = { version = "0.34.0", features = ["http-client"] } +time = "0.3.34" tokio = { version = "1.35.1", features = ["sync"] } tonic = { version = "0.10.2", features = ["tls", "tls-roots"] } urlencoding = "2.1.3" @@ -45,7 +46,6 @@ urlencoding = "2.1.3" tonic-build = "0.10.2" [features] -default = ["solomachine-v2", "ethermint"] -ethermint = ["sha3", "solomachine-v2"] +default = [] +ethermint = ["sha3"] postgres = ["sqlx/postgres"] -solomachine-v2 = [] diff --git a/solo-machine-core/src/ibc/client/ics07_tendermint/consensus_state.rs b/solo-machine-core/src/ibc/client/ics07_tendermint/consensus_state.rs index f0eeb58..de950b9 100644 --- a/solo-machine-core/src/ibc/client/ics07_tendermint/consensus_state.rs +++ b/solo-machine-core/src/ibc/client/ics07_tendermint/consensus_state.rs @@ -3,6 +3,7 @@ use ibc_proto::{ ibc::{core::commitment::v1::MerkleRoot, lightclients::tendermint::v1::ConsensusState}, }; use tendermint::block::Header as BlockHeader; +use time::OffsetDateTime; pub trait IConsensusState: Sized { fn from_block_header(header: BlockHeader) -> Self; @@ -10,13 +11,15 @@ pub trait IConsensusState: Sized { impl IConsensusState for ConsensusState { fn from_block_header(header: BlockHeader) -> Self { + let time: OffsetDateTime = header.time.into(); + Self { root: Some(MerkleRoot { hash: header.app_hash.into(), }), timestamp: Some(Timestamp { - seconds: header.time.unix_timestamp(), - nanos: header.time.unix_timestamp_nanos() as i32, + seconds: time.unix_timestamp(), + nanos: time.nanosecond() as i32, }), next_validators_hash: header.next_validators_hash.as_bytes().to_vec(), } diff --git a/solo-machine-core/src/ibc/core/ics24_host/path.rs b/solo-machine-core/src/ibc/core/ics24_host/path.rs index e9a0965..74c83f9 100644 --- a/solo-machine-core/src/ibc/core/ics24_host/path.rs +++ b/solo-machine-core/src/ibc/core/ics24_host/path.rs @@ -1,8 +1,4 @@ -use std::{ - fmt, - ops::{Deref, DerefMut}, - str::FromStr, -}; +use std::ops::{Deref, DerefMut}; use anyhow::{ensure, Error}; use ibc_proto::ibc::core::{client::v1::Height, commitment::v1::MerklePath}; @@ -20,6 +16,12 @@ use super::identifier::{ChannelId, ClientId, ConnectionId, Identifier, PortId}; pub struct Path(MerklePath); impl Path { + /// Returns a new path from the given key path + pub fn new_from_str(key_path: String) -> Self { + Path(MerklePath { + key_path: vec![key_path], + }) + } /// Applies the given prefix to path pub fn apply_prefix(&mut self, prefix: &str) -> Result<(), Error> { ensure!(!prefix.trim().is_empty(), "prefix cannot be empty"); @@ -57,31 +59,32 @@ impl DerefMut for Path { } } -impl FromStr for Path { - type Err = Error; +// impl FromStr for Path { +// type Err = Error; - fn from_str(s: &str) -> Result { - ensure!(!s.trim().is_empty(), "path cannot be empty"); +// fn from_str(s: &str) -> Result { +// ensure!(!s.trim().is_empty(), "path cannot be empty"); - Ok(Path(MerklePath { - key_path: vec![s.trim().to_string()], - })) - } -} +// Ok(Path(MerklePath { +// key_path: vec![s.trim().to_string()], +// })) +// } +// } -impl fmt::Display for Path { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - for key in &self.0.key_path { - write!(f, "/{}", urlencoding::encode(key))?; - } +// impl fmt::Display for Path { +// fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +// for key in &self.0.key_path { +// write!(f, "/{}", urlencoding::encode(key))?; +// } - Ok(()) - } -} +// Ok(()) +// } +// } macro_rules! impl_path { ($doc: expr, $name: ident) => { #[doc = $doc] + #[derive(Debug, Clone)] pub struct $name(Path); impl $name { @@ -95,11 +98,11 @@ macro_rules! impl_path { } } - impl fmt::Display for $name { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.0) - } - } + // impl fmt::Display for $name { + // fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + // write!(f, "{}", self.0) + // } + // } impl Deref for $name { type Target = Path; @@ -122,7 +125,10 @@ impl_path!("Path for storing client type", ClientTypePath); impl ClientTypePath { /// Creates a new client type path from client id pub fn new(client_id: ClientId) -> Self { - Self(format!("clients/{}/clientType", client_id).parse().unwrap()) + Self(Path::new_from_str(format!( + "clients/{}/clientType", + client_id + ))) } } @@ -131,11 +137,10 @@ impl_path!("Path for storing client state", ClientStatePath); impl ClientStatePath { /// Creates a new client state path from client id pub fn new(client_id: &ClientId) -> Self { - Self( - format!("clients/{}/clientState", client_id) - .parse() - .unwrap(), - ) + Self(Path::new_from_str(format!( + "clients/{}/clientState", + client_id + ))) } } @@ -144,15 +149,11 @@ impl_path!("Path for storing consensus state", ConsensusStatePath); impl ConsensusStatePath { /// Creates a new consensus state path from client id and height pub fn new(client_id: &ClientId, height: &Height) -> Self { - Self( - format!( - "clients/{}/consensusStates/{}", - client_id, - height.to_string() - ) - .parse() - .unwrap(), - ) + Self(Path::new_from_str(format!( + "clients/{}/consensusStates/{}", + client_id, + height.to_string() + ))) } } @@ -160,7 +161,7 @@ impl_path!("Path for storing connection", ConnectionPath); impl ConnectionPath { pub fn new(connection_id: &ConnectionId) -> Self { - Self(format!("connections/{}", connection_id).parse().unwrap()) + Self(Path::new_from_str(format!("connections/{}", connection_id))) } } @@ -168,11 +169,10 @@ impl_path!("Path for storing channel", ChannelPath); impl ChannelPath { pub fn new(port_id: &PortId, channel_id: &ChannelId) -> Self { - Self( - format!("channelEnds/ports/{}/channels/{}", port_id, channel_id) - .parse() - .unwrap(), - ) + Self(Path::new_from_str(format!( + "channelEnds/ports/{}/channels/{}", + port_id, channel_id + ))) } } @@ -180,14 +180,10 @@ impl_path!("Path for storing packet commitments", PacketCommitmentPath); impl PacketCommitmentPath { pub fn new(port_id: &PortId, channel_id: &ChannelId, packet_sequence: u64) -> Self { - Self( - format!( - "commitments/ports/{}/channels/{}/sequences/{}", - port_id, channel_id, packet_sequence - ) - .parse() - .unwrap(), - ) + Self(Path::new_from_str(format!( + "commitments/ports/{}/channels/{}/sequences/{}", + port_id, channel_id, packet_sequence + ))) } } @@ -195,11 +191,10 @@ impl_path!("Denom trace of tokens transferred to IBC chain", DenomTrace); impl DenomTrace { pub fn new(port_id: &PortId, channel_id: &ChannelId, denom: &Identifier) -> Self { - Self( - format!("{}/{}/{}", port_id, channel_id, denom) - .parse() - .unwrap(), - ) + Self(Path::new_from_str(format!( + "{}/{}/{}", + port_id, channel_id, denom + ))) } } @@ -210,13 +205,9 @@ impl_path!( impl PacketAcknowledgementPath { pub fn new(port_id: &PortId, channel_id: &ChannelId, packet_sequence: u64) -> Self { - Self( - format!( - "acks/ports/{}/channels/{}/sequences/{}", - port_id, channel_id, packet_sequence - ) - .parse() - .unwrap(), - ) + Self(Path::new_from_str(format!( + "acks/ports/{}/channels/{}/sequences/{}", + port_id, channel_id, packet_sequence + ))) } } diff --git a/solo-machine-core/src/model/chain/chain.rs b/solo-machine-core/src/model/chain/chain.rs index 1a54c23..1a477f0 100644 --- a/solo-machine-core/src/model/chain/chain.rs +++ b/solo-machine-core/src/model/chain/chain.rs @@ -67,7 +67,7 @@ impl Chain { denom, ); - let hash = Sha256::digest(denom_trace.to_string().as_bytes()); + let hash = Sha256::digest(denom_trace.get_key(0).unwrap().as_bytes()); Ok(format!("ibc/{}", hex::encode_upper(hash))) } diff --git a/solo-machine-core/src/model/ibc.rs b/solo-machine-core/src/model/ibc.rs index 916e40f..0f49813 100644 --- a/solo-machine-core/src/model/ibc.rs +++ b/solo-machine-core/src/model/ibc.rs @@ -30,10 +30,10 @@ pub async fn add_tendermint_client_state<'e>( client_id: &ClientId, client_state: &TendermintClientState, ) -> Result<()> { - let path: String = ClientStatePath::new(client_id).to_string(); + let path = ClientStatePath::new(client_id); let data = proto_encode(client_state)?; - add(executor, &path, &data).await + add(executor, path.get_key(0).unwrap(), &data).await } /// Fetches tendermint client state from database @@ -41,8 +41,8 @@ pub async fn get_tendermint_client_state<'e>( executor: impl Executor<'e, Database = Db>, client_id: &ClientId, ) -> Result> { - let path: String = ClientStatePath::new(client_id).to_string(); - get(executor, &path).await + let path = ClientStatePath::new(client_id); + get(executor, path.get_key(0).unwrap()).await } /// Adds tendermint consensus state to database @@ -52,10 +52,10 @@ pub async fn add_tendermint_consensus_state<'e>( height: &Height, consensus_state: &TendermintConsensusState, ) -> Result<()> { - let path: String = ConsensusStatePath::new(client_id, height).to_string(); + let path = ConsensusStatePath::new(client_id, height); let data = proto_encode(consensus_state)?; - add(executor, &path, &data).await + add(executor, path.get_key(0).unwrap(), &data).await } /// Fetches tendermint consensus state from database @@ -64,8 +64,8 @@ pub async fn get_tendermint_consensus_state<'e>( client_id: &ClientId, height: &Height, ) -> Result> { - let path: String = ConsensusStatePath::new(client_id, height).to_string(); - get(executor, &path).await + let path = ConsensusStatePath::new(client_id, height); + get(executor, path.get_key(0).unwrap()).await } /// Adds connection to database @@ -74,10 +74,10 @@ pub async fn add_connection<'e>( connection_id: &ConnectionId, connection: &ConnectionEnd, ) -> Result<()> { - let path: String = ConnectionPath::new(connection_id).to_string(); + let path = ConnectionPath::new(connection_id); let data = proto_encode(connection)?; - add(executor, &path, &data).await + add(executor, path.get_key(0).unwrap(), &data).await } /// Fetches connection from database @@ -85,8 +85,8 @@ pub async fn get_connection<'e>( executor: impl Executor<'e, Database = Db>, connection_id: &ConnectionId, ) -> Result> { - let path: String = ConnectionPath::new(connection_id).to_string(); - get(executor, &path).await + let path = ConnectionPath::new(connection_id); + get(executor, path.get_key(0).unwrap()).await } /// Updates connection in database @@ -95,10 +95,10 @@ pub async fn update_connection<'e>( connection_id: &ConnectionId, connection: &ConnectionEnd, ) -> Result<()> { - let path: String = ConnectionPath::new(connection_id).to_string(); + let path = ConnectionPath::new(connection_id); let data = proto_encode(connection)?; - update(executor, &path, &data).await + update(executor, path.get_key(0).unwrap(), &data).await } /// Adds channel to database @@ -108,10 +108,10 @@ pub async fn add_channel<'e>( channel_id: &ChannelId, channel: &Channel, ) -> Result<()> { - let path: String = ChannelPath::new(port_id, channel_id).to_string(); + let path = ChannelPath::new(port_id, channel_id); let data = proto_encode(channel)?; - add(executor, &path, &data).await + add(executor, path.get_key(0).unwrap(), &data).await } /// Fetches channel from database @@ -120,8 +120,8 @@ pub async fn get_channel<'e>( port_id: &PortId, channel_id: &ChannelId, ) -> Result> { - let path: String = ChannelPath::new(port_id, channel_id).to_string(); - get(executor, &path).await + let path = ChannelPath::new(port_id, channel_id); + get(executor, path.get_key(0).unwrap()).await } /// Updates channel in database @@ -131,10 +131,10 @@ pub async fn update_channel<'e>( channel_id: &ChannelId, channel: &Channel, ) -> Result<()> { - let path: String = ChannelPath::new(port_id, channel_id).to_string(); + let path = ChannelPath::new(port_id, channel_id); let data = proto_encode(channel)?; - update(executor, &path, &data).await + update(executor, path.get_key(0).unwrap(), &data).await } async fn add<'e>( diff --git a/solo-machine-core/src/transaction_builder.rs b/solo-machine-core/src/transaction_builder.rs index 0713ade..c3fe2a3 100644 --- a/solo-machine-core/src/transaction_builder.rs +++ b/solo-machine-core/src/transaction_builder.rs @@ -197,8 +197,8 @@ pub async fn msg_create_tendermint_client( latest_height: Some(latest_height), proof_specs: proof_specs(), upgrade_path: vec!["upgrade".to_string(), "upgradedIBCState".to_string()], - allow_update_after_expiry: false, - allow_update_after_misbehaviour: false, + allow_update_after_expiry: true, + allow_update_after_misbehaviour: true, }; let consensus_state = TendermintConsensusState::from_block_header(latest_header); @@ -775,7 +775,7 @@ async fn get_packet_acknowledgement_proof( diversifier: chain.config.diversifier.to_owned(), path: acknowledgement_path .get_key(1) - .ok_or_else(|| anyhow!("invalid path {}", acknowledgement_path))? + .ok_or_else(|| anyhow!("invalid path {:?}", acknowledgement_path))? .as_bytes() .to_vec(), data: acknowledgement_bytes, @@ -815,7 +815,7 @@ async fn get_packet_commitment_proof( diversifier: chain.config.diversifier.to_owned(), path: commitment_path .get_key(1) - .ok_or_else(|| anyhow!("invalid path {}", commitment_path))? + .ok_or_else(|| anyhow!("invalid path {:?}", commitment_path))? .as_bytes() .to_vec(), data: commitment_bytes, @@ -852,7 +852,7 @@ async fn get_channel_proof<'e>( diversifier: chain.config.diversifier.to_owned(), path: channel_path .get_key(1) - .ok_or_else(|| anyhow!("invalid path {}", channel_path))? + .ok_or_else(|| anyhow!("invalid path {:?}", channel_path))? .as_bytes() .to_vec(), data: channel_bytes, @@ -883,7 +883,7 @@ async fn get_connection_proof<'e>( diversifier: chain.config.diversifier.to_owned(), path: connection_path .get_key(1) - .ok_or_else(|| anyhow!("invalid path {}", connection_path))? + .ok_or_else(|| anyhow!("invalid path {:?}", connection_path))? .as_bytes() .to_vec(), data: connection_bytes, @@ -906,7 +906,7 @@ async fn get_client_proof<'e>( let mut client_state_path = ClientStatePath::new(client_id); client_state_path.apply_prefix("ibc")?; - let client_state_bytes = proto_encode(&client_state)?; + let client_state_bytes = proto_encode(&client_state.to_any()?)?; let sign_bytes = SignBytes { sequence: chain.sequence.into(), @@ -914,7 +914,7 @@ async fn get_client_proof<'e>( diversifier: chain.config.diversifier.to_owned(), path: client_state_path .get_key(1) - .ok_or_else(|| anyhow!("invalid path {}", client_state_path))? + .ok_or_else(|| anyhow!("invalid path {:?}", client_state_path))? .as_bytes() .to_vec(), data: client_state_bytes, @@ -952,7 +952,7 @@ async fn get_consensus_proof( let mut consensus_state_path = ConsensusStatePath::new(client_id, &height); consensus_state_path.apply_prefix("ibc")?; - let consensus_state_bytes = proto_encode(&consensus_state)?; + let consensus_state_bytes = proto_encode(&consensus_state.to_any()?)?; let sign_bytes = SignBytes { sequence: chain.sequence.into(), @@ -960,7 +960,7 @@ async fn get_consensus_proof( diversifier: chain.config.diversifier.to_owned(), path: consensus_state_path .get_key(1) - .ok_or_else(|| anyhow!("invalid path {}", consensus_state_path))? + .ok_or_else(|| anyhow!("invalid path {:?}", consensus_state_path))? .as_bytes() .to_vec(), data: consensus_state_bytes, diff --git a/solo-machine/Cargo.toml b/solo-machine/Cargo.toml index d9ef1fb..fadc005 100644 --- a/solo-machine/Cargo.toml +++ b/solo-machine/Cargo.toml @@ -25,9 +25,7 @@ prost = "0.12.3" prost-types = "0.12.3" rust_decimal = "1.33.1" serde_json = "1.0.111" -solo-machine-core = { path = "../solo-machine-core", features = [ - "solomachine-v2", -] } +solo-machine-core = { path = "../solo-machine-core" } structopt = "0.3.26" tendermint = "0.34.0" termcolor = "1.4.0" @@ -35,7 +33,7 @@ tokio = { version = "1.35.1", features = ["fs", "macros", "rt-multi-thread"] } tonic = { version = "0.10.2", features = ["tls", "tls-roots"] } [features] -default = ["ethermint"] +default = [] ethermint = ["solo-machine-core/ethermint"] postgres = ["solo-machine-core/postgres"] diff --git a/solo-machine/src/command/chain.rs b/solo-machine/src/command/chain.rs index 901cdf2..68c1698 100644 --- a/solo-machine/src/command/chain.rs +++ b/solo-machine/src/command/chain.rs @@ -276,10 +276,7 @@ impl ChainCommand { add_row( &mut table, "Solo machine client ID", - connection_details - .solo_machine_channel_id - .as_ref() - .unwrap(), + &connection_details.solo_machine_client_id, ); add_row( &mut table,