diff --git a/Cargo.lock b/Cargo.lock index 99d5ffc..0ffa3f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -414,34 +414,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -[[package]] -name = "axum" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" -dependencies = [ - "async-trait", - "axum-core 0.3.4", - "bitflags 1.3.2", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 0.1.2", - "tower", - "tower-layer", - "tower-service", -] - [[package]] name = "axum" version = "0.7.5" @@ -449,7 +421,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" dependencies = [ "async-trait", - "axum-core 0.4.3", + "axum-core", "bytes", "futures-util", "http 1.1.0", @@ -469,23 +441,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "axum-core" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "mime", - "rustversion", - "tower-layer", - "tower-service", -] - [[package]] name = "axum-core" version = "0.4.3" @@ -905,7 +860,6 @@ dependencies = [ "prost 0.12.6", "prost-types 0.12.6", "tendermint-proto 0.37.0", - "tonic 0.11.0", ] [[package]] @@ -2431,18 +2385,6 @@ dependencies = [ "webpki-roots", ] -[[package]] -name = "hyper-timeout" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" -dependencies = [ - "hyper 0.14.30", - "pin-project-lite", - "tokio", - "tokio-io-timeout", -] - [[package]] name = "hyper-timeout" version = "0.5.1" @@ -3054,27 +2996,10 @@ dependencies = [ "tendermint-light-client", "thiserror", "tokio", - "tonic 0.12.1", + "tonic", "tonic-build", ] -[[package]] -name = "mtcs-intent" -version = "0.1.0" -dependencies = [ - "bip32", - "clap", - "cosmrs", - "cosmwasm-std", - "ecies", - "hex", - "k256", - "rand", - "serde", - "serde_json", - "sha2 0.10.8", -] - [[package]] name = "multimap" version = "0.10.0" @@ -3724,7 +3649,7 @@ dependencies = [ "tm-prover", "tokio", "toml", - "tonic 0.12.1", + "tonic", "tracing", "tracing-subscriber", ] @@ -3752,7 +3677,7 @@ dependencies = [ "tendermint-light-client", "thiserror", "tokio", - "tonic 0.12.1", + "tonic", "tonic-build", "transfers-contract", ] @@ -3797,7 +3722,6 @@ dependencies = [ "mtcs", "quartz-cw", "quartz-proto", - "quartz-relayer", "quartz-tee-ra", "rand", "serde", @@ -3807,7 +3731,7 @@ dependencies = [ "tendermint-light-client", "tm-stateless-verifier", "tokio", - "tonic 0.12.1", + "tonic", ] [[package]] @@ -3815,34 +3739,10 @@ name = "quartz-proto" version = "0.1.0" dependencies = [ "prost 0.13.1", - "tonic 0.12.1", + "tonic", "tonic-build", ] -[[package]] -name = "quartz-relayer" -version = "0.1.0" -dependencies = [ - "clap", - "cosmos-sdk-proto", - "cosmrs", - "cosmwasm-std", - "displaydoc", - "ecies", - "k256", - "quartz-cw", - "quartz-proto", - "quartz-tee-ra", - "serde", - "serde_json", - "subtle-encoding", - "tempfile", - "tendermint 0.38.1", - "thiserror", - "tokio", - "tonic 0.12.1", -] - [[package]] name = "quartz-tee-ra" version = "0.1.0" @@ -4935,12 +4835,10 @@ dependencies = [ "ed25519-consensus", "flex-error", "futures", - "k256", "num-traits", "once_cell", "prost 0.13.1", "prost-types 0.13.1", - "ripemd", "serde", "serde_bytes", "serde_json", @@ -5254,16 +5152,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.4.0" @@ -5366,33 +5254,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "tonic" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" -dependencies = [ - "async-stream", - "async-trait", - "axum 0.6.20", - "base64 0.21.7", - "bytes", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "hyper-timeout 0.4.1", - "percent-encoding", - "pin-project", - "prost 0.12.6", - "tokio", - "tokio-stream", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - [[package]] name = "tonic" version = "0.12.1" @@ -5401,7 +5262,7 @@ checksum = "38659f4a91aba8598d27821589f5db7dddd94601e7a01b1e485a50e5484c7401" dependencies = [ "async-stream", "async-trait", - "axum 0.7.5", + "axum", "base64 0.22.1", "bytes", "h2 0.4.5", @@ -5409,7 +5270,7 @@ dependencies = [ "http-body 1.0.1", "http-body-util", "hyper 1.4.1", - "hyper-timeout 0.5.1", + "hyper-timeout", "hyper-util", "percent-encoding", "pin-project", diff --git a/Cargo.toml b/Cargo.toml index 8c85f42..b37a09a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -83,7 +83,6 @@ quartz-common = { path = "core/quartz-common"} quartz-cw = { path = "cosmwasm/packages/quartz-cw", default-features = false } quartz-enclave = { path = "core/quartz", default-features = false } quartz-proto = { path = "core/quartz-proto", default-features = false } -quartz-relayer = { path = "relayer", default-features = false , features = ["mock-sgx"]} quartz-tee-ra = { path = "cosmwasm/packages/quartz-tee-ra", default-features = false } tm-prover = { path = "utils/tm-prover", default-features = false } tm-stateless-verifier = { path = "core/light-client-proofs/tm-stateless-verifier", default-features = false } diff --git a/README.md b/README.md index 09e54c7..3b2ace0 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,6 @@ Utilities for supporting Quartz development and - * [cw-prover](utils/cw-prover) - Retrieve a merkle-proof for CosmWasm state * [cycles-sync](utils/cycles-sync) - Sync obligations and setoffs with [Obligato](https://github.com/informalsystems/obligato) -* [mtcs-intent](utils/mtcs-intent) - CLI for keygen, encrypting/decrypting obligations/setoffs, etc. * [tm-prover](utils/tm-prover) - Generate light client and merkle proofs for CosmWasm storage in a format that Quartz understands diff --git a/apps/mtcs/scripts/Cargo.lock b/apps/mtcs/scripts/Cargo.lock deleted file mode 100644 index 605c122..0000000 --- a/apps/mtcs/scripts/Cargo.lock +++ /dev/null @@ -1,4723 +0,0 @@ -# This file is automatically @generated by Cargo. -# 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 = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" -dependencies = [ - "crypto-common", - "generic-array", -] - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aes-gcm" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "anstream" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" - -[[package]] -name = "anstyle-parse" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "asn1-rs" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d" -dependencies = [ - "asn1-rs-derive", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time", -] - -[[package]] -name = "asn1-rs-derive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", - "synstructure", -] - -[[package]] -name = "asn1-rs-impl" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "async-trait" -version = "0.1.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "async-tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3609af4bbf701ddaf1f6bb4e6257dff4ff8932327d0e685d3f653724c258b1ac" -dependencies = [ - "futures-io", - "futures-util", - "log", - "pin-project-lite", - "rustls-native-certs 0.7.1", - "rustls-pki-types", - "tokio", - "tokio-rustls 0.25.0", - "tungstenite 0.21.0", -] - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - -[[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 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 0.1.2", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "mime", - "rustversion", - "tower-layer", - "tower-service", -] - -[[package]] -name = "backtrace" -version = "0.3.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - -[[package]] -name = "bip32" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164" -dependencies = [ - "bs58", - "hmac", - "k256", - "once_cell", - "pbkdf2", - "rand_core 0.6.4", - "ripemd", - "sha2 0.10.8", - "subtle", - "zeroize", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" - -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "blake3" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9ec96fe9a81b5e365f9db71fe00edc4fe4ca2cc7dcb7861f0603012a7caa210" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bnum" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab9008b6bb9fc80b5277f2fe481c09e828743d9151203e804583eb4c9e15b31d" - -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "sha2 0.10.8", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" -dependencies = [ - "serde", -] - -[[package]] -name = "cc" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "num-traits", - "serde", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "clap" -version = "4.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6b81fb3c84f5563d509c59b5a48d935f689e993afa90fe39047f05adef9142" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca6706fd5224857d9ac5eb9355f6683563cc0541c7cd9d014043b57cbec78ac" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "clap_lex" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" - -[[package]] -name = "color-eyre" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" -dependencies = [ - "backtrace", - "eyre", - "indenter", - "once_cell", - "owo-colors", -] - -[[package]] -name = "colorchoice" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - -[[package]] -name = "contracts" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d1429e3bd78171c65aa010eabcdf8f863ba3254728dbfb0ad4b1545beac15c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cosmos-sdk-proto" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e23f6ab56d5f031cde05b8b82a5fefd3a1a223595c79e32317a97189e612bc" -dependencies = [ - "prost 0.12.6", - "prost-types 0.12.6", - "tendermint-proto 0.35.0", - "tonic", -] - -[[package]] -name = "cosmrs" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d184abb7b0039cc64f282dfa5b34165e4c5a7410ab46804636d53f4d09aee44" -dependencies = [ - "bip32", - "cosmos-sdk-proto", - "ecdsa", - "eyre", - "k256", - "rand_core 0.6.4", - "serde", - "serde_json", - "signature", - "subtle-encoding", - "tendermint 0.35.0", - "thiserror", -] - -[[package]] -name = "cosmwasm-crypto" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed6aa9f904de106fa16443ad14ec2abe75e94ba003bb61c681c0e43d4c58d2a" -dependencies = [ - "digest 0.10.7", - "ecdsa", - "ed25519-zebra", - "k256", - "rand_core 0.6.4", - "thiserror", -] - -[[package]] -name = "cosmwasm-derive" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "242e98e7a231c122e08f300d9db3262d1007b51758a8732cd6210b3e9faa4f3a" -dependencies = [ - "syn 1.0.109", -] - -[[package]] -name = "cosmwasm-schema" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7879036156092ad1c22fe0d7316efc5a5eceec2bc3906462a2560215f2a2f929" -dependencies = [ - "cosmwasm-schema-derive", - "schemars", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "cosmwasm-schema-derive" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb57855fbfc83327f8445ae0d413b1a05ac0d68c396ab4d122b2abd7bb82cb6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "cosmwasm-std" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad011ae7447188e26e4a7dbca2fcd0fc186aa21ae5c86df0503ea44c78f9e469" -dependencies = [ - "base64 0.21.7", - "bech32", - "bnum", - "cosmwasm-crypto", - "cosmwasm-derive", - "derivative", - "forward_ref", - "hex", - "schemars", - "serde", - "serde-json-wasm", - "sha2 0.10.8", - "static_assertions", - "thiserror", -] - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "critical-section" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" - -[[package]] -name = "crossbeam-channel" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-ng" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.6.4", - "subtle-ng", - "zeroize", -] - -[[package]] -name = "cw-controllers" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57de8d3761e46be863e3ac1eba8c8a976362a48c6abf240df1e26c3e421ee9e8" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "cw-utils", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "cw-proof" -version = "0.1.0" -dependencies = [ - "clap", - "cosmrs", - "displaydoc", - "ics23", - "prost 0.12.6", - "serde", - "serde_with", - "tendermint 0.36.0", - "tendermint-rpc 0.36.0", -] - -[[package]] -name = "cw-storage-plus" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", -] - -[[package]] -name = "cw-tee-mtcs" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "cw2", - "cw20", - "cw20-base", - "getrandom", - "hex", - "k256", - "quartz-common", - "schemars", - "serde", - "serde_json", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "cw-utils" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw2", - "schemars", - "semver", - "serde", - "thiserror", -] - -[[package]] -name = "cw0" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae676b6cced78a3d38ad4b01ab4ed66fc78ac191c3c0d6bfd5372cb2efd473b" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "cw2" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "schemars", - "semver", - "serde", - "thiserror", -] - -[[package]] -name = "cw20" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "526e39bb20534e25a1cd0386727f0038f4da294e5e535729ba3ef54055246abd" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-utils", - "schemars", - "serde", -] - -[[package]] -name = "cw20-base" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ad79e86ea3707229bf78df94e08732e8f713207b4a77b2699755596725e7d9" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "cw2", - "cw20", - "schemars", - "semver", - "serde", - "thiserror", -] - -[[package]] -name = "cw4" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24754ff6e45f2a1c60adc409d9b2eb87666012c44021329141ffaab3388fccd2" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "schemars", - "serde", -] - -[[package]] -name = "cw4-group" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e24a22c3af54c52edf528673b420a67a1648be2c159b8ec778d2fbf543df24b" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-controllers", - "cw-storage-plus", - "cw-utils", - "cw2", - "cw4", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "cycles-sync" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-trait", - "bip32", - "clap", - "cosmrs", - "cosmwasm-std", - "cw-tee-mtcs", - "displaydoc", - "ecies", - "hex", - "reqwest 0.12.5", - "serde", - "serde_json", - "subtle-encoding", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber", - "uuid", -] - -[[package]] -name = "darling" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.71", -] - -[[package]] -name = "darling_macro" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - -[[package]] -name = "der" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" -dependencies = [ - "const-oid", - "der_derive", - "flagset", - "pem-rfc7468", - "zeroize", -] - -[[package]] -name = "der-parser" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" -dependencies = [ - "asn1-rs", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - -[[package]] -name = "der_derive" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_more" -version = "0.99.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "dyn-clone" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - -[[package]] -name = "ecies" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0206e602d2645ec8b24ed8307fadbc6c3110e2b11ab2f806fc02fee49327079" -dependencies = [ - "aes-gcm", - "getrandom", - "hkdf", - "libsecp256k1", - "once_cell", - "parking_lot", - "rand_core 0.6.4", - "sha2 0.10.8", - "typenum", - "wasm-bindgen", -] - -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8", - "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 0.6.4", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "ed25519-zebra" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" -dependencies = [ - "curve25519-dalek", - "hashbrown 0.12.3", - "hex", - "rand_core 0.6.4", - "serde", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core 0.6.4", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "enclave" -version = "0.1.0" -dependencies = [ - "clap", - "color-eyre", - "cosmrs", - "cosmwasm-std", - "cw-tee-mtcs", - "ecies", - "hex", - "k256", - "mtcs", - "prost 0.12.6", - "quartz-common", - "schemars", - "serde", - "serde_json", - "tendermint 0.36.0", - "tendermint-light-client", - "thiserror", - "tokio", - "tonic", - "tonic-build", -] - -[[package]] -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "eyre" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fastrand" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - -[[package]] -name = "flagset" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" - -[[package]] -name = "flex-error" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" -dependencies = [ - "eyre", - "paste", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "forward_ref" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" - -[[package]] -name = "futures" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-core", - "futures-macro", - "futures-sink", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", -] - -[[package]] -name = "ghash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" -dependencies = [ - "opaque-debug", - "polyval", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.2.6", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http 1.1.0", - "indexmap 2.2.6", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "half" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] - -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http 1.1.0", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.1", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.30", - "rustls 0.21.12", - "tokio", - "tokio-rustls 0.24.1", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" -dependencies = [ - "futures-util", - "http 1.1.0", - "hyper 1.4.1", - "hyper-util", - "rustls 0.23.11", - "rustls-pki-types", - "tokio", - "tokio-rustls 0.26.0", - "tower-service", - "webpki-roots", -] - -[[package]] -name = "hyper-timeout" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" -dependencies = [ - "hyper 0.14.30", - "pin-project-lite", - "tokio", - "tokio-io-timeout", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper 1.4.1", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "hyper 1.4.1", - "pin-project-lite", - "socket2", - "tokio", - "tower", - "tower-service", - "tracing", -] - -[[package]] -name = "ics23" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18798160736c1e368938ba6967dbcb3c7afb3256b442a5506ba5222eebb68a5a" -dependencies = [ - "anyhow", - "blake2", - "blake3", - "bytes", - "hex", - "prost 0.12.6", - "ripemd", - "sha2 0.10.8", - "sha3", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" -dependencies = [ - "equivalent", - "hashbrown 0.14.5", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "k256" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2 0.10.8", - "signature", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "libc" -version = "0.2.155" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "libsecp256k1" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" -dependencies = [ - "arrayref", - "base64 0.13.1", - "digest 0.9.0", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand", - "serde", -] - -[[package]] -name = "libsecp256k1-core" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] - -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - -[[package]] -name = "mc-attestation-verifier" -version = "0.4.3" -source = "git+https://github.com/informalsystems/attestation#ae86e2804abed218f4fd2fd4aec5e39408898cd8" -dependencies = [ - "der", - "displaydoc", - "hex", - "mc-sgx-core-sys-types", - "mc-sgx-core-types", - "mc-sgx-dcap-types", - "p256", - "serde", - "serde_json", - "subtle", - "x509-cert", -] - -[[package]] -name = "mc-sgx-core-sys-types" -version = "0.11.0" -source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" -dependencies = [ - "serde", - "serde_with", -] - -[[package]] -name = "mc-sgx-core-types" -version = "0.11.0" -source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" -dependencies = [ - "bitflags 2.6.0", - "displaydoc", - "getrandom", - "hex", - "mc-sgx-core-sys-types", - "mc-sgx-util", - "nom", - "rand_core 0.6.4", - "serde", - "subtle", -] - -[[package]] -name = "mc-sgx-dcap-sys-types" -version = "0.11.0" -source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" -dependencies = [ - "mc-sgx-core-sys-types", -] - -[[package]] -name = "mc-sgx-dcap-types" -version = "0.11.0" -source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" -dependencies = [ - "const-oid", - "displaydoc", - "hex", - "mc-sgx-core-types", - "mc-sgx-dcap-sys-types", - "mc-sgx-util", - "nom", - "p256", - "serde", - "sha2 0.10.8", - "static_assertions", - "subtle", - "x509-cert", -] - -[[package]] -name = "mc-sgx-util" -version = "0.11.0" -source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" - -[[package]] -name = "mcmf" -version = "2.0.0" -source = "git+https://github.com/hu55a1n1/flow#cad8f3adb29d3be2177a31db0fa0e5c2a858beb0" -dependencies = [ - "cc", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "mtcs" -version = "0.1.0" -source = "git+ssh://git@github.com/informalsystems/mtcs.git#b421d9ef42272b5eb73d9c74a2a5d590d4c20603" -dependencies = [ - "displaydoc", - "itertools", - "log", - "mcmf", - "num-traits", - "petgraph 0.6.3", - "serde", -] - -[[package]] -name = "mtcs-overdraft" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "cw-utils", - "cw0", - "cw4", - "cw4-group", - "thiserror", -] - -[[package]] -name = "multimap" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" - -[[package]] -name = "native-tls" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", -] - -[[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.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "oid-registry" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" -dependencies = [ - "asn1-rs", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -dependencies = [ - "critical-section", - "portable-atomic", -] - -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - -[[package]] -name = "openssl" -version = "0.10.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" -dependencies = [ - "bitflags 2.6.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "owo-colors" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" - -[[package]] -name = "p256" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" -dependencies = [ - "ecdsa", - "elliptic-curve", - "primeorder", - "sha2 0.10.8", -] - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.52.6", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest 0.10.7", - "hmac", -] - -[[package]] -name = "peg" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a625d12ad770914cbf7eff6f9314c3ef803bfe364a1b20bc36ddf56673e71e5" -dependencies = [ - "peg-macros", - "peg-runtime", -] - -[[package]] -name = "peg-macros" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f241d42067ed3ab6a4fece1db720838e1418f36d868585a27931f95d6bc03582" -dependencies = [ - "peg-runtime", - "proc-macro2", - "quote", -] - -[[package]] -name = "peg-runtime" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3aeb8f54c078314c2065ee649a7241f46b9d8e418e1a9581ba0546657d7aa3a" - -[[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.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "petgraph" -version = "0.6.3" -source = "git+https://github.com/hu55a1n1/petgraph?branch=min-cost-flow-primal-dual#3a2664a3b9d1e5b71c411a6ed497cf576c1a86ae" -dependencies = [ - "fixedbitset", - "indexmap 1.9.3", - "num", -] - -[[package]] -name = "petgraph" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" -dependencies = [ - "fixedbitset", - "indexmap 2.2.6", -] - -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "polyval" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash", -] - -[[package]] -name = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" - -[[package]] -name = "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.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" -dependencies = [ - "proc-macro2", - "syn 2.0.71", -] - -[[package]] -name = "primeorder" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" -dependencies = [ - "elliptic-curve", -] - -[[package]] -name = "proc-macro2" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "prost" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" -dependencies = [ - "bytes", - "prost-derive 0.12.6", -] - -[[package]] -name = "prost" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" -dependencies = [ - "bytes", - "prost-derive 0.13.1", -] - -[[package]] -name = "prost-build" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" -dependencies = [ - "bytes", - "heck", - "itertools", - "log", - "multimap", - "once_cell", - "petgraph 0.6.5", - "prettyplease", - "prost 0.12.6", - "prost-types 0.12.6", - "regex", - "syn 2.0.71", - "tempfile", -] - -[[package]] -name = "prost-derive" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "prost-derive" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "prost-types" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" -dependencies = [ - "prost 0.12.6", -] - -[[package]] -name = "prost-types" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" -dependencies = [ - "prost 0.13.1", -] - -[[package]] -name = "quartz-common" -version = "0.1.0" -dependencies = [ - "clap", - "color-eyre", - "cosmrs", - "quartz-cw", - "quartz-enclave", - "quartz-proto", - "tendermint-light-client", -] - -[[package]] -name = "quartz-cw" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "k256", - "quartz-tee-ra", - "serde", - "serde_json", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "quartz-enclave" -version = "0.1.0" -dependencies = [ - "clap", - "color-eyre", - "cosmrs", - "cosmwasm-std", - "cw-proof", - "ecies", - "hex", - "k256", - "mtcs", - "quartz-cw", - "quartz-proto", - "quartz-relayer", - "quartz-tee-ra", - "rand", - "serde", - "serde_json", - "tendermint 0.36.0", - "tendermint-light-client", - "tm-stateless-verifier", - "tokio", - "tonic", -] - -[[package]] -name = "quartz-proto" -version = "0.1.0" -dependencies = [ - "prost 0.12.6", - "tonic", - "tonic-build", -] - -[[package]] -name = "quartz-relayer" -version = "0.1.0" -dependencies = [ - "clap", - "cosmos-sdk-proto", - "cosmrs", - "cosmwasm-std", - "displaydoc", - "ecies", - "k256", - "quartz-cw", - "quartz-proto", - "quartz-tee-ra", - "serde", - "serde_json", - "subtle-encoding", - "tempfile", - "tendermint 0.36.0", - "thiserror", - "tokio", - "tonic", -] - -[[package]] -name = "quartz-tee-ra" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "der", - "displaydoc", - "hex-literal", - "mc-attestation-verifier", - "mc-sgx-core-types", - "mc-sgx-dcap-sys-types", - "mc-sgx-dcap-types", - "num-bigint", - "serde", - "serde_json", - "sha2 0.10.8", - "thiserror", - "x509-cert", - "x509-parser", - "zeroize", -] - -[[package]] -name = "quinn" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" -dependencies = [ - "bytes", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls 0.23.11", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "quinn-proto" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" -dependencies = [ - "bytes", - "rand", - "ring", - "rustc-hash", - "rustls 0.23.11", - "slab", - "thiserror", - "tinyvec", - "tracing", -] - -[[package]] -name = "quinn-udp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9096629c45860fc7fb143e125eb826b5e721e10be3263160c7d60ca832cf8c46" -dependencies = [ - "libc", - "once_cell", - "socket2", - "tracing", - "windows-sys 0.52.0", -] - -[[package]] -name = "quote" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" -dependencies = [ - "bitflags 2.6.0", -] - -[[package]] -name = "regex" -version = "1.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" - -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "hyper-rustls 0.24.2", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.21.12", - "rustls-native-certs 0.6.3", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration", - "tokio", - "tokio-rustls 0.24.1", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg 0.50.0", -] - -[[package]] -name = "reqwest" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" -dependencies = [ - "base64 0.22.1", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.1", - "http-body-util", - "hyper 1.4.1", - "hyper-rustls 0.27.2", - "hyper-tls", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls 0.23.11", - "rustls-pemfile 2.1.2", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 1.0.1", - "system-configuration", - "tokio", - "tokio-native-tls", - "tokio-rustls 0.26.0", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "winreg 0.52.0", -] - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rusticata-macros" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" -dependencies = [ - "nom", -] - -[[package]] -name = "rustix" -version = "0.38.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" -dependencies = [ - "bitflags 2.6.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - -[[package]] -name = "rustls" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" -dependencies = [ - "log", - "ring", - "rustls-pki-types", - "rustls-webpki 0.102.5", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls" -version = "0.23.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4828ea528154ae444e5a642dbb7d5623354030dc9822b83fd9bb79683c7399d0" -dependencies = [ - "once_cell", - "ring", - "rustls-pki-types", - "rustls-webpki 0.102.5", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile 1.0.4", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-native-certs" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" -dependencies = [ - "openssl-probe", - "rustls-pemfile 2.1.2", - "rustls-pki-types", - "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.7", -] - -[[package]] -name = "rustls-pemfile" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" -dependencies = [ - "base64 0.22.1", - "rustls-pki-types", -] - -[[package]] -name = "rustls-pki-types" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" - -[[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 = "rustls-webpki" -version = "0.102.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "schemars" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 2.0.71", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "scripts" -version = "0.1.0" -dependencies = [ - "anyhow", - "base64 0.22.1", - "clap", - "cosmrs", - "cosmwasm-std", - "cw-tee-mtcs", - "cycles-sync", - "enclave", - "futures-util", - "hex", - "mtcs-overdraft", - "once_cell", - "reqwest 0.12.5", - "serde", - "serde_json", - "subtle-encoding", - "tendermint-rpc 0.38.1", - "tokio", - "tokio-tungstenite", - "tonic", -] - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags 2.6.0", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" - -[[package]] -name = "serde" -version = "1.0.204" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-json-wasm" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e9213a07d53faa0b8dd81e767a54a8188a242fdb9be99ab75ec576a774bfdd7" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_bytes" -version = "0.11.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half", - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.204" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "serde_derive_internals" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "serde_json" -version = "1.0.120" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_repr" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "serde_spanned" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "3.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" -dependencies = [ - "base64 0.22.1", - "chrono", - "hex", - "serde", - "serde_derive", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.7", - "keccak", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "subtle-encoding" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" -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 = "2.0.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" - -[[package]] -name = "synstructure" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[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]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "tendermint" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f8a10105d0a7c4af0a242e23ed5a12519afe5cc0e68419da441bb5981a6802" -dependencies = [ - "bytes", - "digest 0.10.7", - "ed25519", - "ed25519-consensus", - "flex-error", - "futures", - "k256", - "num-traits", - "once_cell", - "prost 0.12.6", - "prost-types 0.12.6", - "ripemd", - "serde", - "serde_bytes", - "serde_json", - "serde_repr", - "sha2 0.10.8", - "signature", - "subtle", - "subtle-encoding", - "tendermint-proto 0.35.0", - "time", - "zeroize", -] - -[[package]] -name = "tendermint" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b50aae6ec24c3429149ad59b5b8d3374d7804d4c7d6125ceb97cb53907fb68d" -dependencies = [ - "bytes", - "digest 0.10.7", - "ed25519", - "ed25519-consensus", - "flex-error", - "futures", - "k256", - "num-traits", - "once_cell", - "prost 0.12.6", - "prost-types 0.12.6", - "ripemd", - "serde", - "serde_bytes", - "serde_json", - "serde_repr", - "sha2 0.10.8", - "signature", - "subtle", - "subtle-encoding", - "tendermint-proto 0.36.0", - "time", - "zeroize", -] - -[[package]] -name = "tendermint" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "505d9d6ffeb83b1de47c307c6e0d2dff56c6256989299010ad03cd80a8491e97" -dependencies = [ - "bytes", - "digest 0.10.7", - "ed25519", - "ed25519-consensus", - "flex-error", - "futures", - "num-traits", - "once_cell", - "prost 0.13.1", - "prost-types 0.13.1", - "serde", - "serde_bytes", - "serde_json", - "serde_repr", - "sha2 0.10.8", - "signature", - "subtle", - "subtle-encoding", - "tendermint-proto 0.38.1", - "time", - "zeroize", -] - -[[package]] -name = "tendermint-config" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e07b383dc8780ebbec04cfb603f3fdaba6ea6663d8dd861425b1ffa7761fe90d" -dependencies = [ - "flex-error", - "serde", - "serde_json", - "tendermint 0.36.0", - "toml", - "url", -] - -[[package]] -name = "tendermint-config" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de111ea653b2adaef627ac2452b463c77aa615c256eaaddf279ec5a1cf9775f" -dependencies = [ - "flex-error", - "serde", - "serde_json", - "tendermint 0.38.1", - "toml", - "url", -] - -[[package]] -name = "tendermint-light-client" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331544139bbcf353acb5f56e733093d8e4bf2522cda0491b4bba7039ef0b944e" -dependencies = [ - "contracts", - "crossbeam-channel", - "derive_more", - "flex-error", - "futures", - "regex", - "serde", - "serde_cbor", - "serde_derive", - "serde_json", - "static_assertions", - "tendermint 0.36.0", - "tendermint-light-client-verifier", - "tendermint-rpc 0.36.0", - "time", - "tracing", -] - -[[package]] -name = "tendermint-light-client-verifier" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4216e487165e5dbd7af79952eaa0d5f06c5bde861eb76c690acd7f2d2a19395c" -dependencies = [ - "derive_more", - "flex-error", - "serde", - "tendermint 0.36.0", - "time", -] - -[[package]] -name = "tendermint-proto" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff525d5540a9fc535c38dc0d92a98da3ee36fcdfbda99cecb9f3cce5cd4d41d7" -dependencies = [ - "bytes", - "flex-error", - "num-derive", - "num-traits", - "prost 0.12.6", - "prost-types 0.12.6", - "serde", - "serde_bytes", - "subtle-encoding", - "time", -] - -[[package]] -name = "tendermint-proto" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f193d04afde6592c20fd70788a10b8cb3823091c07456db70d8a93f5fb99c1" -dependencies = [ - "bytes", - "flex-error", - "prost 0.12.6", - "prost-types 0.12.6", - "serde", - "serde_bytes", - "subtle-encoding", - "time", -] - -[[package]] -name = "tendermint-proto" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed14abe3b0502a3afe21ca74ca5cdd6c7e8d326d982c26f98a394445eb31d6e" -dependencies = [ - "bytes", - "flex-error", - "prost 0.13.1", - "prost-types 0.13.1", - "serde", - "serde_bytes", - "subtle-encoding", - "time", -] - -[[package]] -name = "tendermint-rpc" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e3c231a3632cab53f92ad4161c730c468c08cfe4f0aa5a6735b53b390aecbd" -dependencies = [ - "async-trait", - "bytes", - "flex-error", - "futures", - "getrandom", - "peg", - "pin-project", - "rand", - "reqwest 0.11.27", - "semver", - "serde", - "serde_bytes", - "serde_json", - "subtle", - "subtle-encoding", - "tendermint 0.36.0", - "tendermint-config 0.36.0", - "tendermint-proto 0.36.0", - "thiserror", - "time", - "tokio", - "tracing", - "url", - "uuid", - "walkdir", -] - -[[package]] -name = "tendermint-rpc" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f96a2b8a0d3d0b59e4024b1a6bdc1589efc6af4709d08a480a20cc4ba90f63" -dependencies = [ - "async-trait", - "async-tungstenite", - "bytes", - "flex-error", - "futures", - "getrandom", - "peg", - "pin-project", - "rand", - "semver", - "serde", - "serde_bytes", - "serde_json", - "subtle", - "subtle-encoding", - "tendermint 0.38.1", - "tendermint-config 0.38.1", - "tendermint-proto 0.38.1", - "thiserror", - "time", - "tokio", - "tracing", - "url", - "uuid", - "walkdir", -] - -[[package]] -name = "thiserror" -version = "1.0.62" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.62" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "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.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tinyvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tm-stateless-verifier" -version = "0.1.0" -dependencies = [ - "displaydoc", - "tendermint 0.36.0", - "tendermint-light-client", -] - -[[package]] -name = "tokio" -version = "1.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "pin-project-lite", - "socket2", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-macros" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.12", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" -dependencies = [ - "rustls 0.22.4", - "rustls-pki-types", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" -dependencies = [ - "rustls 0.23.11", - "rustls-pki-types", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite 0.23.0", -] - -[[package]] -name = "tokio-util" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" -dependencies = [ - "indexmap 2.2.6", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tonic" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" -dependencies = [ - "async-stream", - "async-trait", - "axum", - "base64 0.21.7", - "bytes", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "hyper-timeout", - "percent-encoding", - "pin-project", - "prost 0.12.6", - "tokio", - "tokio-stream", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tonic-build" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" -dependencies = [ - "prettyplease", - "proc-macro2", - "prost-build", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "sharded-slab", - "thread_local", - "tracing-core", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "tungstenite" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 1.1.0", - "httparse", - "log", - "rand", - "rustls 0.22.4", - "rustls-pki-types", - "sha1", - "thiserror", - "url", - "utf-8", -] - -[[package]] -name = "tungstenite" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 1.1.0", - "httparse", - "log", - "rand", - "sha1", - "thiserror", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "universal-hash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" -dependencies = [ - "crypto-common", - "subtle", -] - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "uuid" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" -dependencies = [ - "serde", -] - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.71", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "winapi-util" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" -dependencies = [ - "windows-sys 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.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[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.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "x509-cert" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1301e935010a701ae5f8655edc0ad17c44bad3ac5ce8c39185f75453b720ae94" -dependencies = [ - "const-oid", - "der", - "spki", -] - -[[package]] -name = "x509-parser" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" -dependencies = [ - "asn1-rs", - "data-encoding", - "der-parser", - "lazy_static", - "nom", - "oid-registry", - "ring", - "rusticata-macros", - "thiserror", - "time", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] diff --git a/apps/mtcs/scripts/Cargo.toml b/apps/mtcs/scripts/Cargo.toml deleted file mode 100644 index dd48368..0000000 --- a/apps/mtcs/scripts/Cargo.toml +++ /dev/null @@ -1,58 +0,0 @@ -[package] -name = "scripts" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[[bin]] -name = "listen" -path = "src/bin/listen.rs" - -[[bin]] -name = "handshake" -path = "src/bin/handshake.rs" - -[[bin]] -name = "deploy" -path = "src/bin/deploy.rs" - -[dependencies] -clap.workspace = true -color-eyre.workspace = true -ecies.workspace = true -hex.workspace = true -k256.workspace = true -prost.workspace = true -serde.workspace = true -serde_json.workspace = true -thiserror.workspace = true -tokio.workspace = true -tonic.workspace = true -once_cell = "1.19.0" -reqwest = { version = "0.12.2", default-features = false, features = ["json", "rustls-tls"] } -anyhow = "1.0.86" -base64 = "0.22.1" -subtle-encoding = "0.5.1" -tokio-tungstenite = "0.23.1" -futures-util = "0.3.30" -tendermint-rpc = { version ="0.38.1", features=["websocket-client", "http-client"]} - -# cosmos -cosmrs.workspace = true -cosmwasm-std.workspace = true -tendermint.workspace = true -tendermint-light-client.workspace = true - -# quartz -cw-proof.workspace = true -cw-tee-mtcs.workspace = true -mtcs.workspace = true - -# todo remove unnecessary imports - -cycles-sync = { workspace = true} -tm-prover = { workspace = true} -quartz-common = { workspace = true, features=["contract"]} -quartz-tee-ra = { workspace = true} -mtcs-enclave = { path = "../enclave", optional = false} -regex = "1.10.5" diff --git a/apps/mtcs/scripts/aggregator.sh b/apps/mtcs/scripts/aggregator.sh deleted file mode 100644 index 8a6517c..0000000 --- a/apps/mtcs/scripts/aggregator.sh +++ /dev/null @@ -1,40 +0,0 @@ -set -eo pipefail - -ROOT=${ROOT:-$HOME} -DIR_MTCS="$ROOT/cycles-protocol/quartz-app" -DIR_CYCLES_SYNC="$ROOT/cycles-protocol/packages/cycles-sync/" -DIR_PROTO="$DIR_MTCS/enclave/proto" - -OVERDRAFT=wasm199rcvzawgyse89k4smqdn4wp83f3q8rurg9vautppxh5cypydafqk9nt6q - -cd $DIR_MTCS - -export NODE_URL=143.244.186.205:26657 -bash scripts/build.sh - -cd $DIR_MTCS/scripts/scripts -CONTRACT=$(RUST_BACKTRACE=1 cargo run --bin deploy | tail -n 1) - - -echo "------------ built and deployed ------------" - -PUB_KEY=$(RUST_BACKTRACE=1 cargo run --bin handshake -- --contract $CONTRACT | tail -n 1) - -echo "PUB KEY: '$PUB_KEY'" -echo "------------ shook some hands ------------" - -cd $DIR_CYCLES_SYNC -cargo run --bin submit -- --epoch-pk $PUB_KEY --mtcs $CONTRACT --overdraft $OVERDRAFT -echo "cargo run --bin submit -- --epoch-pk $PUB_KEY --mtcs $CONTRACT --overdraft $OVERDRAFT" - -echo "------------ submitted obligations ------------" - -# add contract to owners list in overdrafts contract -CURRENT_SEQUENCE=$(wasmd query account wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70 --node http://$NODE_URL --output json | jq -r .sequence) -WASMD_OUTPUT=$(wasmd tx wasm execute $OVERDRAFT '{"add_owner": {"new": "'$CONTRACT'"}}' --from wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70 --node http://$NODE_URL --chain-id testing --yes --sequence $CURRENT_SEQUENCE) - -echo $WASMD_OUTPUT -echo "------------ added contract as owner of overdrafts ------------" - -cd $DIR_MTCS/scripts/scripts -cargo run --bin listen -- --contract $CONTRACT diff --git a/apps/mtcs/scripts/build.sh b/apps/mtcs/scripts/build.sh deleted file mode 100644 index 459ef41..0000000 --- a/apps/mtcs/scripts/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -ROOT=${ROOT:-$HOME} - -echo "--------------------------------------------------------" -echo "building enclave binary" - -cd $ROOT/cycles-protocol/quartz-app/enclave/ -CARGO_TARGET_DIR=./target cargo build --release - -echo "--------------------------------------------------------" -echo "building cosmwasm contract binary" - - -cd $ROOT/cycles-protocol/quartz-app/contracts/cw-tee-mtcs/ -bash build.sh diff --git a/apps/mtcs/scripts/deploy.sh b/apps/mtcs/scripts/deploy.sh deleted file mode 100755 index 08e8d54..0000000 --- a/apps/mtcs/scripts/deploy.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -ROOT=${ROOT:-$HOME} - - -echo "--------------------------------------------------------" -echo "instantiate" -cd $ROOT/cycles-protocol/packages/relayer/ -export INSTANTIATE_MSG=$(./scripts/relay.sh Instantiate | jq '{quartz: .}' ) -echo "--------------------------------------------------------" - -echo "deploy contract" -cd $ROOT/cycles-protocol/quartz-app/contracts/cw-tee-mtcs - -bash deploy-contract.sh target/wasm32-unknown-unknown/release/cw_tee_mtcs.wasm |& tee output -export CONTRACT=$(cat output | grep Address | awk '{print $NF}' | sed 's/\x1b\[[0-9;]*m//g') -echo $CONTRACT - - - - diff --git a/apps/mtcs/scripts/deploy45.sh b/apps/mtcs/scripts/deploy45.sh deleted file mode 100755 index 08e8d54..0000000 --- a/apps/mtcs/scripts/deploy45.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -ROOT=${ROOT:-$HOME} - - -echo "--------------------------------------------------------" -echo "instantiate" -cd $ROOT/cycles-protocol/packages/relayer/ -export INSTANTIATE_MSG=$(./scripts/relay.sh Instantiate | jq '{quartz: .}' ) -echo "--------------------------------------------------------" - -echo "deploy contract" -cd $ROOT/cycles-protocol/quartz-app/contracts/cw-tee-mtcs - -bash deploy-contract.sh target/wasm32-unknown-unknown/release/cw_tee_mtcs.wasm |& tee output -export CONTRACT=$(cat output | grep Address | awk '{print $NF}' | sed 's/\x1b\[[0-9;]*m//g') -echo $CONTRACT - - - - diff --git a/apps/mtcs/scripts/handshake.sh b/apps/mtcs/scripts/handshake.sh deleted file mode 100755 index c40e610..0000000 --- a/apps/mtcs/scripts/handshake.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash -# -# Perform the SessionCreate and SessionSetPubKey handshake between the contract and the sgx node -# Expects: -# - enclave is already initialized -# - contract is already deployed -# - apps/transfers/trusted.hash exists -# - -set -eo pipefail - -ROOT=${ROOT:-$HOME} - -NODE_URL=${NODE_URL:-127.0.0.1:26657} - -if [ "$#" -eq 0 ]; then - echo "Usage: $0 " - exit 1 # Exit with a non-zero status to indicate an error -fi - -CONTRACT="$1" - -CMD="wasmd --node http://$NODE_URL" - -cd "$ROOT/cycles-protocol/quartz-app/" -export TRUSTED_HASH=$(cat trusted.hash) -export TRUSTED_HEIGHT=$(cat trusted.height) - -echo "using CMD: $CMD" -echo "--------------------------------------------------------" - -echo "create session" - -# change to relay dir -cd $ROOT/cycles-protocol/packages/relayer - -# execute SessionCreate on enclave -export EXECUTE_CREATE=$(./scripts/relay.sh SessionCreate) - -# submit SessionCreate to contract -RES=$($CMD tx wasm execute "$CONTRACT" "$EXECUTE_CREATE" --from admin --chain-id testing -y --output json) -TX_HASH=$(echo $RES | jq -r '.["txhash"]') - -# wait for tx to commit -while ! $CMD query tx $TX_HASH &> /dev/null; do - echo "... 🕐 waiting for tx" - sleep 1 -done - -# need to wait another block for light client proof -BLOCK_HEIGHT=$($CMD query block | jq .block.header.height) - -echo "at heigh $BLOCK_HEIGHT. need to wait for a block" -while [[ $BLOCK_HEIGHT == $($CMD query block | jq .block.header.height) ]]; do - echo "... 🕐 waiting for another block" - sleep 1 -done - -# need to wait another block for light client proof -BLOCK_HEIGHT=$($CMD query block | jq .block.header.height) -echo "at heigh $BLOCK_HEIGHT. need to wait for a block" -while [[ $BLOCK_HEIGHT == $($CMD query block | jq .block.header.height) ]]; do - echo "... 🕐 waiting for another block" - sleep 1 -done - -echo "--------------------------------------------------------" - -echo "set session pk" - -# change to prover dir -cd $ROOT/cycles-protocol/packages/tm-prover -export PROOF_FILE="light-client-proof.json" -if [ -f "$PROOF_FILE" ]; then - rm "$PROOF_FILE" - echo "removed old $PROOF_FILE" -fi - -# TODO: pass this in? -echo "trusted hash $TRUSTED_HASH" -echo "contract $CONTRACT" - -# run prover to get light client proof -# TODO: assume this binary is pre-built? -# TODO: pass in addresses and chain id -cargo run -vvv -- --chain-id testing \ - --primary "http://$NODE_URL" \ - --witnesses "http://$NODE_URL" \ - --trusted-height $TRUSTED_HEIGHT \ - --trusted-hash $TRUSTED_HASH \ - --contract-address $CONTRACT \ - --storage-key "quartz_session" \ - --trace-file $PROOF_FILE - -export POP=$(cat $PROOF_FILE) -export POP_MSG=$(jq -nc --arg message "$POP" '$ARGS.named') -echo "hi" -# execute SessionSetPubKey on enclave -cd $ROOT/cycles-protocol/packages/relayer -export EXECUTE_SETPUB=$(./scripts/relay.sh SessionSetPubKey "$POP_MSG") - -RES=$($CMD tx wasm execute "$CONTRACT" "$EXECUTE_SETPUB" --from admin --chain-id testing -y --output json) -TX_HASH=$(echo $RES | jq -r '.["txhash"]') - -# wait for tx to commit -while ! $CMD query tx $TX_HASH &> /dev/null; do - echo "... 🕐 waiting for tx" - sleep 1 -done - -echo "--------------------------------------------------------" - -echo "check session success" -export NONCE_AND_KEY=$($CMD query wasm contract-state raw "$CONTRACT" $(printf '%s' "quartz_session" | hexdump -ve '/1 "%02X"') -o json | jq -r .data | base64 -d) -echo $NONCE_AND_KEY -export PUBKEY=$(echo $NONCE_AND_KEY | jq -r .pub_key) - diff --git a/apps/mtcs/scripts/listen.sh b/apps/mtcs/scripts/listen.sh deleted file mode 100755 index 1179e05..0000000 --- a/apps/mtcs/scripts/listen.sh +++ /dev/null @@ -1,101 +0,0 @@ - - - ROOT=${ROOT:-$HOME} - DIR_MTCS="$ROOT/cycles-protocol/quartz-app/" - DIR_PROTO="$DIR_MTCS/enclave/proto" - DEFAULT_NODE="127.0.0.1:26657" - NODE_URL="143.244.186.205:26657" - # Use the QUARTZ_PORT environment variable if set, otherwise default to 11090 - QUARTZ_PORT="${QUARTZ_PORT:-11090}" - - - # Attestation constants - IAS_API_KEY="669244b3e6364b5888289a11d2a1726d" - RA_CLIENT_SPID="51CAF5A48B450D624AEFE3286D314894" - QUOTE_FILE="/tmp/${USER}_test.quote" - REPORT_FILE="/tmp/${USER}_datareport" - REPORT_SIG_FILE="/tmp/${USER}_datareportsig" - - if [ "$#" -eq 0 ]; then - echo "Usage: $0 " - exit 1 # Exit with a non-zero status to indicate an error - fi - - CONTRACT=$1 - - CMD="wasmd --node http://$NODE_URL" - - WSURL="ws://$NODE_URL/websocket" - - SUBSCRIBE="{\"jsonrpc\":\"2.0\",\"method\":\"subscribe\",\"params\":[\"tm.event='Tx' AND wasm._contract_address = '$CONTRACT' AND wasm.action='init_clearing'\"],\"id\":1}" - - echo $SUBSCRIBE - - echo "--------------------------------------------------------" - echo "subscribe to events" - - # cat keeps the stdin open so websocat doesnt close - (echo "$SUBSCRIBE"; cat) | websocat $WSURL | while read msg; do - if [[ "$msg" == '{"jsonrpc":"2.0","id":1,"result":{}}' ]]; then - echo "... subscribed" - echo "---------------------------------------------------------" - echo "... waiting for event" - continue - fi - - if echo "$msg" | jq 'has("error")' > /dev/null; then - echo "... error msg $msg" - echo "---------------------------------------------------------" - echo "... waiting for event" - continue - fi - - - echo "... received init_clearing event!" - echo $msg - - echo "... fetching obligations" - - export EPOCH=$($CMD query wasm contract-state raw "$CONTRACT" "65706f63685f636f756e746572" -o json | jq -r .data | base64 -d) - PREV_EPOCH=$((EPOCH - 1)) - - export OBLIGATIONS=$($CMD query wasm contract-state raw "$CONTRACT" $(printf '%s/%s' "$PREV_EPOCH" "obligations" | hexdump -ve '/1 "%02X"') -o json | jq -r .data | base64 -d) - export LIQUIDITY_SOURCES=$($CMD query wasm contract-state smart $CONTRACT '{"get_liquidity_sources": {"epoch": '$PREV_EPOCH'}}' -o json | jq -r .data.liquidity_sources) - - COMBINED_JSON=$(jq -nc \ - --argjson intents "$OBLIGATIONS" \ - --argjson liquidity_sources "$LIQUIDITY_SOURCES" \ - '{intents: $intents, liquidity_sources: $liquidity_sources}') - - echo $COMBINED_JSON - - # Wrap the combined JSON string into another JSON object with a "message" field - REQUEST_MSG=$(jq -nc --arg message "$COMBINED_JSON" '{"message": $message}') - - echo "... executing mtcs" - export ATTESTED_MSG=$(grpcurl -plaintext -import-path "$DIR_PROTO" -proto mtcs.proto -d "$REQUEST_MSG" "127.0.0.1:$QUARTZ_PORT" mtcs.Clearing/Run | jq -c '.message | fromjson') - - QUOTE=$(echo "$ATTESTED_MSG" | jq -c '.attestation') - MSG=$(echo "$ATTESTED_MSG" | jq -c '.msg') - - # request the IAS report for EPID attestations - echo -n "$QUOTE" | xxd -r -p - > "$QUOTE_FILE" - gramine-sgx-ias-request report -g "$RA_CLIENT_SPID" -k "$IAS_API_KEY" -q "$QUOTE_FILE" -r "$REPORT_FILE" -s "$REPORT_SIG_FILE" > /dev/null 2>&1 - REPORT=$(cat "$REPORT_FILE") - REPORTSIG=$(cat "$REPORT_SIG_FILE" | tr -d '\r') - - echo "... submitting update" - - - export EXECUTE=$(jq -nc --argjson submit_setoffs "$(jq -nc --argjson msg "$MSG" --argjson attestation \ - "$(jq -nc --argjson report "$(jq -nc --argjson report "$REPORT" --arg reportsig "$REPORTSIG" '$ARGS.named')" '$ARGS.named')" \ - '$ARGS.named')" '$ARGS.named') - $CMD tx wasm execute "$CONTRACT" "$EXECUTE" --from admin --chain-id testing -y --gas 2000000 - - - echo " ... done" - echo "---------------------------------------------------------" - echo "... waiting for event" - done - - diff --git a/apps/mtcs/scripts/src/bin/deploy.rs b/apps/mtcs/scripts/src/bin/deploy.rs deleted file mode 100644 index f4ab043..0000000 --- a/apps/mtcs/scripts/src/bin/deploy.rs +++ /dev/null @@ -1,80 +0,0 @@ -use std::{env::current_dir, str::FromStr}; - -use clap::Parser; -use cosmrs::tendermint::chain::Id as ChainId; -use cw_tee_mtcs::msg::InstantiateMsg as MtcsInstantiateMsg; -use cycles_sync::wasmd_client::{CliWasmdClient, WasmdClient}; -use quartz_common::contract::msg::RawInstantiateMsg; -use reqwest::Url; -use scripts::{ - types::{Log, WasmdTxResponse}, - utils::{block_tx_commit, run_relay}, -}; -use serde_json::json; -use tendermint::Hash; -use tendermint_rpc::HttpClient; - -#[derive(Clone, Debug, Parser)] -#[command(version, about, long_about = None)] -struct Cli { - #[clap(long, default_value = "143.244.186.205:26657")] - node_url: String, -} - -#[tokio::main] -async fn main() -> Result<(), anyhow::Error> { - let cli = Cli::parse(); - - let base_path = current_dir()?.join("../../../"); - - println!("\n🚀 Communicating with Relay to Instantiate...\n"); - let init_msg: RawInstantiateMsg = run_relay(base_path.as_path(), "Instantiate", None)?; // need to define the return type - let init_msg: MtcsInstantiateMsg = MtcsInstantiateMsg { quartz: init_msg }; - - let httpurl = Url::parse(&format!("http://{}", cli.node_url))?; - let tmrpc_client = HttpClient::new(httpurl.as_str()).unwrap(); - let wasmd_client = CliWasmdClient::new(Url::parse(httpurl.as_str())?); - - println!("\n🚀 Deploying MTCS Contract\n"); - let contract_path = base_path.join( - "quartz-app/contracts/cw-tee-mtcs/target/wasm32-unknown-unknown/release/cw_tee_mtcs.wasm", - ); - // TODO: uncertain about the path -> string conversion - let deploy_output: WasmdTxResponse = serde_json::from_str(&wasmd_client.deploy( - &ChainId::from_str("testing")?, - &String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), - contract_path.display().to_string(), - )?)?; - - let tx_hash = - Hash::from_str(&deploy_output.txhash).expect("Invalid hex string for transaction hash"); - let res = block_tx_commit(&tmrpc_client, tx_hash).await?; - - let log: Vec = serde_json::from_str(&res.tx_result.log)?; - let code_id: usize = log[0].events[1].attributes[1].value.parse()?; - - println!("\n🚀 Instantiating MTCS Contract\n"); - - let deploy_output: WasmdTxResponse = serde_json::from_str(&wasmd_client.init( - &ChainId::from_str("testing")?, - &String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), - code_id, - json!(init_msg), - &format!("MTCS Contract V{}", code_id), - )?)?; - - let tx_hash = - Hash::from_str(&deploy_output.txhash).expect("Invalid hex string for transaction hash"); - let res = block_tx_commit(&tmrpc_client, tx_hash).await?; - let log: Vec = serde_json::from_str(&res.tx_result.log)?; - let contract_addr: &String = &log[0].events[1].attributes[0].value; - - println!("\n🚀 Successfully deployed and instantiated contract!"); - println!("🆔 Code ID: {}", code_id); - println!("📌 Contract Address: {}", contract_addr); - - println!("{contract_addr}"); - Ok(()) -} - -//RES=$($CMD tx wasm instantiate "$CODE_ID" "$INSTANTIATE_MSG" --from "$USER_ADDR" --label $LABEL $TXFLAG -y --no-admin --output json) diff --git a/apps/mtcs/scripts/src/bin/handshake.rs b/apps/mtcs/scripts/src/bin/handshake.rs deleted file mode 100644 index 3707687..0000000 --- a/apps/mtcs/scripts/src/bin/handshake.rs +++ /dev/null @@ -1,229 +0,0 @@ -use std::{env, env::current_dir, fs::File, io::Read, path::Path, str::FromStr}; - -use anyhow::anyhow; -use clap::Parser; -use cosmrs::tendermint::chain::Id as ChainId; // TODO see if this redundancy in dependencies can be decreased -use cosmrs::AccountId; -use cw_tee_mtcs::msg::ExecuteMsg as MtcsExecuteMsg; -use cycles_sync::wasmd_client::{CliWasmdClient, WasmdClient}; -use futures_util::stream::StreamExt; -use quartz_common::contract::prelude::QuartzExecuteMsg; -use reqwest::Url; -use scripts::{ - types::WasmdTxResponse, - utils::{block_tx_commit, run_relay, wasmaddr_to_id}, -}; -use serde::Serialize; -use serde_json::json; -use tendermint::{block::Height, Hash}; -use tendermint_rpc::{query::EventType, HttpClient, SubscriptionClient, WebSocketClient}; -use tm_prover::{config::Config as TmProverConfig, prover::prove}; - -#[derive(Serialize)] -struct Message<'a> { - message: &'a str, -} - -#[derive(Clone, Debug, Parser)] -#[command(version, about, long_about = None)] -struct Cli { - /// Contract to listen to - #[arg(short, long, value_parser = wasmaddr_to_id)] - contract: AccountId, - /// Port enclave is listening on - #[arg(short, long, default_value = "11090")] - port: u16, - - #[arg( - short, - long, - default_value = "wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70" - )] - sender: String, - - #[clap(long, default_value = "143.244.186.205:26657")] - node_url: String, - - #[clap(long, default_value_t = default_rpc_addr())] - rpc_addr: String, -} - -fn default_rpc_addr() -> String { - env::var("RPC_URL").unwrap_or_else(|_| "http://127.0.0.1".to_string()) -} - -#[tokio::main] -async fn main() -> Result<(), anyhow::Error> { - let cli = Cli::parse(); - - // Convert contract address string parameter to an AccountId - // TODO: is this all the address validation that's needed? - let httpurl = Url::parse(&format!("http://{}", cli.node_url))?; - let wsurl = format!("ws://{}/websocket", cli.node_url); - - let tmrpc_client = HttpClient::new(httpurl.as_str()).unwrap(); - - let wasmd_client = CliWasmdClient::new(Url::parse(httpurl.as_str())?); - - // test(&client, &wasmd_client).await?; - // panic!(); - // read trusted hash and height from files - let base_path = current_dir()?.join("../../../"); - let trusted_files_path = base_path.join("quartz-app/"); - let (trusted_height, trusted_hash) = read_hash_height(trusted_files_path.as_path()).await?; - - // run sessioncreate in relayer script - // export EXECUTE_CREATE=$(./scripts/relay.sh SessionCreate) - // TODO: this is not the right return type - let res: MtcsExecuteMsg = run_relay(base_path.as_path(), "SessionCreate", None)?; // need to define the return type - - // submit SessionCreate to contract - - // RES=$($CMD tx wasm execute "$CONTRACT" "$EXECUTE_CREATE" --from admin --chain-id testing -y --output json) - // TX_HASH=$(echo $RES | jq -r '.["txhash"]') - // make sure this is json - let output: WasmdTxResponse = serde_json::from_str( - wasmd_client - .tx_execute( - &cli.contract.clone(), - &ChainId::from_str("testing")?, - 2000000, - &cli.sender, - json!(res), - )? - .as_str(), - )?; - println!("\n\n SessionCreate tx output: {:?}", output); - - // wait for tx to commit (in a loop?) - let tx_hash = Hash::from_str(&output.txhash).expect("Invalid hex string for transaction hash"); - block_tx_commit(&tmrpc_client, tx_hash).await?; - - // tendermint client subscription loop - // wait 2 blocks - two_block_waitoor(&wsurl).await?; - - //cd $ROOT/cycles-protocol/packages/tm-prover - //export PROOF_FILE="light-client-proof.json" - // TODO: move all the proof related files into a directory in scripts dir - let proof_path = current_dir()?.join("../../../packages/tm-prover/light-client-proof.json"); - println!("Proof path: {:?}", proof_path.to_str()); - - let config = TmProverConfig { - primary: httpurl.as_str().parse()?, - witnesses: httpurl.as_str().parse()?, - trusted_height, - trusted_hash, - trace_file: Some(proof_path.clone()), - verbose: "1".parse()?, - contract_address: cli.contract.clone(), - storage_key: "quartz_session".to_string(), - ..Default::default() - }; - - if let Err(report) = prove(config).await { - return Err(anyhow!("Tendermint prover failed. Report: {}", report)); - } - - // read proof file - let proof = read_file(proof_path.as_path()).await?; - let json_msg = serde_json::to_string(&Message { message: &proof })?; - - // execute SessionSetPubKey on enclave - // cd $ROOT/cycles-protocol/packages/relayer - // export EXECUTE_SETPUB=$(./scripts/relay.sh SessionSetPubKey "$POP_MSG") - - let res: MtcsExecuteMsg = run_relay( - base_path.as_path(), - "SessionSetPubKey", - Some(json_msg.as_str()), - )?; - // submit SessionSetPubKey to contract - - // RES=$($CMD tx wasm execute "$CONTRACT" "$EXECUTE_SETPUB" --from admin --chain-id testing -y --output json) - // TX_HASH=$(echo $RES | jq -r '.["txhash"]') - // wait for tx to commit - let output: WasmdTxResponse = serde_json::from_str( - wasmd_client - .tx_execute( - &cli.contract.clone(), - &ChainId::from_str("testing")?, - 2000000, - &cli.sender, - json!(res), - )? - .as_str(), - )?; - - println!("\n\n SessionSetPubKey tx output: {:?}", output); - - // wait for tx to commit (in a loop?) - let tx_hash = Hash::from_str(&output.txhash).expect("Invalid hex string for transaction hash"); - - block_tx_commit(&tmrpc_client, tx_hash).await?; - - if let MtcsExecuteMsg::Quartz(QuartzExecuteMsg::RawSessionSetPubKey(quartz)) = res { - println!("\n\n\n{}", quartz.msg.pub_key()); // TODO: return this instead later - } else { - return Err(anyhow!("Invalid relay response from SessionSetPubKey")); - } - - // query results - Ok(()) -} - -async fn two_block_waitoor(wsurl: &str) -> Result<(), anyhow::Error> { - let (client, driver) = WebSocketClient::new(wsurl).await.unwrap(); - - let driver_handle = tokio::spawn(async move { driver.run().await }); - - // Subscription functionality - let mut subs = client.subscribe(EventType::NewBlock.into()).await.unwrap(); - - // Wait 2 NewBlock events - let mut ev_count = 5_i32; - - while let Some(res) = subs.next().await { - let ev = res.unwrap(); - println!("Got event: {:?}", ev); - ev_count -= 1; - if ev_count < 0 { - break; - } - } - - // Signal to the driver to terminate. - client.close().unwrap(); - // Await the driver's termination to ensure proper connection closure. - let _ = driver_handle.await.unwrap(); - - Ok(()) -} - -async fn read_hash_height(base_path: &Path) -> Result<(Height, Hash), anyhow::Error> { - let height_path = base_path.join("trusted.height"); - let trusted_height: Height = read_file(height_path.as_path()).await?.parse()?; - - let hash_path = base_path.join("trusted.hash"); - let trusted_hash: Hash = read_file(hash_path.as_path()).await?.parse()?; - - Ok((trusted_height, trusted_hash)) -} - -async fn read_file(path: &Path) -> Result { - // Open the file - let mut file = match File::open(path) { - Ok(file) => file, - Err(e) => { - return Err(anyhow!(format!("Error opening file {:?}: {:?}", path, e))); - } - }; - - // Read the file contents into a string - let mut value = String::new(); - if let Err(e) = file.read_to_string(&mut value) { - return Err(anyhow!(format!("Error reading file {:?}: {:?}", file, e))); - } - - Ok(value.trim().to_owned()) -} diff --git a/apps/mtcs/scripts/src/bin/listen.rs b/apps/mtcs/scripts/src/bin/listen.rs deleted file mode 100644 index 85aaaea..0000000 --- a/apps/mtcs/scripts/src/bin/listen.rs +++ /dev/null @@ -1,239 +0,0 @@ -use std::{collections::BTreeMap, env, process::Command, str::FromStr}; - -use anyhow::anyhow; -use base64::prelude::*; -use clap::Parser; -use cosmrs::{tendermint::chain::Id as ChainId, AccountId}; -use cosmwasm_std::{Binary, HexBinary, Uint64}; -use cw_tee_mtcs::msg::{ - execute::SubmitSetoffsMsg, AttestedMsg, ExecuteMsg, GetLiquiditySourcesResponse, - QueryMsg::GetLiquiditySources, -}; -use cycles_sync::wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}; -use futures_util::stream::StreamExt; -use mtcs_enclave::{ - proto::{clearing_client::ClearingClient, RunClearingRequest}, - types::RunClearingMessage, -}; -use quartz_common::contract::msg::execute::attested::{ - EpidAttestation, RawAttested, RawAttestedMsgSansHandler, RawEpidAttestation, -}; -use quartz_tee_ra::{intel_sgx::epid::types::ReportBody, IASReport}; -use reqwest::Url; -use scripts::utils::wasmaddr_to_id; -use serde_json::json; -use tendermint_rpc::{ - query::{EventType, Query}, - SubscriptionClient, WebSocketClient, -}; -use tokio::{ - fs::{self, File}, - io::AsyncWriteExt, -}; -use tonic::Request; - -#[derive(Clone, Debug, Parser)] -#[command(version, about, long_about = None)] -struct Cli { - /// Contract to listen to - #[arg(short, long, value_parser = wasmaddr_to_id)] - contract: AccountId, - /// Port enclave is listening on - #[arg(short, long, default_value = "11090")] - port: u16, - - #[arg( - short, - long, - default_value = "wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70" - )] - sender: String, - - #[clap(long, default_value = "143.244.186.205:26657")] - node_url: String, - - #[clap(long, default_value_t = default_rpc_addr())] - rpc_addr: String, - - #[arg(short, long, default_value = "dangush")] - user: String, // The filesys user for gramine filepaths. TODO: improve this -} - -fn default_rpc_addr() -> String { - env::var("RPC_URL").unwrap_or_else(|_| "http://127.0.0.1".to_string()) -} - -#[tokio::main] -async fn main() -> Result<(), anyhow::Error> { - let cli = Cli::parse(); - - // Subscribe to "init_clearing" events - let wsurl = format!("ws://{}/websocket", cli.node_url); - let (client, driver) = WebSocketClient::new(wsurl.as_str()).await.unwrap(); - let driver_handle = tokio::spawn(async move { driver.run().await }); - - let mut subs = client - .subscribe(Query::from(EventType::Tx).and_contains("wasm.action", "init_clearing")) - .await - .unwrap(); - - while subs.next().await.is_some() { - // On init_clearing, run process - if let Err(e) = handler( - &cli.contract, - cli.sender.clone(), - format!("{}:{}", cli.rpc_addr, cli.port), - &cli.node_url, - &cli.user, - ) - .await - { - println!("{}", e); - } - } - - // Close connection - // Await the driver's termination to ensure proper connection closure. - client.close().unwrap(); - let _ = driver_handle.await.unwrap(); - - Ok(()) -} - -async fn handler( - contract: &AccountId, - sender: String, - rpc_addr: String, - node_url: &str, - user: &str, -) -> Result<(), anyhow::Error> { - let chain_id = &ChainId::from_str("testing")?; - let httpurl = Url::parse(&format!("http://{}", node_url))?; - let wasmd_client = CliWasmdClient::new(httpurl); - - // Query obligations and liquidity sources from chain - let clearing_contents = query_chain(&wasmd_client, contract).await?; - - // Send queried data to enclave over gRPC - let request = Request::new(RunClearingRequest { - message: json!(clearing_contents).to_string(), - }); - - let mut client = ClearingClient::connect(rpc_addr).await?; - let clearing_response = client - .run(request) - .await - .map_err(|e| anyhow!("Failed to communicate to relayer. {e}"))? - .into_inner(); - - // Extract json from the Protobuf message - let quote: RawAttested> = - serde_json::from_str(&clearing_response.message) - .map_err(|e| anyhow!("Error serializing SubmitSetoffs: {}", e))?; - - // Get IAS report and build attested message - let attestation = gramine_ias_request(quote.attestation, user).await?; - let msg = RawAttestedMsgSansHandler(quote.msg); - - let setoffs_msg = ExecuteMsg::SubmitSetoffs::(AttestedMsg { - msg, - attestation: attestation.into(), - }); - - // Send setoffs to mtcs contract on chain - let output = - wasmd_client.tx_execute(contract, chain_id, 2000000, &sender, json!(setoffs_msg))?; - - println!("output: {}", output); - Ok(()) -} - -// TODO: replace raw queries with smart -async fn query_chain( - wasmd_client: &CliWasmdClient, - contract: &AccountId, -) -> Result { - // Get epoch counter - let resp: QueryResult = wasmd_client - .query_raw(contract, hex::encode("epoch_counter")) - .map_err(|e| anyhow!("Problem querying epoch: {}", e))?; - let mut epoch_counter: usize = - String::from_utf8(BASE64_STANDARD.decode(resp.data)?)?.parse::()?; - if epoch_counter > 1 { - epoch_counter -= 1; - } - - // TODO: replace with tracer log here - // println!("epoch: {}", epoch_counter); - - // Get obligations - let resp: QueryResult = wasmd_client - .query_raw( - contract, - hex::encode(format!("{}/obligations", epoch_counter)), - ) - .map_err(|e| anyhow!("Problem querying obligatons: {}", e))?; - - let decoded_obligs = BASE64_STANDARD.decode(resp.data)?; - let obligations_map: BTreeMap = - serde_json::from_slice(&decoded_obligs).unwrap_or_default(); - // println!("obligations \n {:?}", obligations_map); - // TODO: replace with tracer log here - - // Get liquidity sources - let resp: QueryResult = wasmd_client - .query_smart( - contract, - json!(GetLiquiditySources { - epoch: Some(Uint64::new(epoch_counter as u64)) - }), - ) - .map_err(|e| anyhow!("Problem querying liquidity sources: {}", e))?; - - let liquidity_sources = resp.data.liquidity_sources; - // TODO: replace with tracer log here - // println!("liquidity_sources \n {:?}", liquidity_sources); - - Ok(RunClearingMessage { - intents: obligations_map, - liquidity_sources: liquidity_sources.into_iter().collect(), - }) -} - -// Request the IAS report for EPID attestations -async fn gramine_ias_request( - attested_msg: Vec, - user: &str, -) -> Result { - let ias_api_key = String::from("669244b3e6364b5888289a11d2a1726d"); - let ra_client_spid = String::from("51CAF5A48B450D624AEFE3286D314894"); - let quote_file = format!("/tmp/{}_test.quote", user); - let report_file = format!("/tmp/{}_datareport", user); - let report_sig_file = format!("/tmp/{}_datareportsig", user); - - // Write the binary data to a file - let mut file = File::create("e_file).await?; - file.write_all(&attested_msg) - .await - .map_err(|e| anyhow!("Couldn't write to file. {e}"))?; - - let mut gramine = Command::new("gramine-sgx-ias-request"); - let command = gramine - .arg("report") - .args(["-g", &ra_client_spid]) - .args(["-k", &ias_api_key]) - .args(["-q", "e_file]) - .args(["-r", &report_file]) - .args(["-s", &report_sig_file]); - - let output = command.output()?; - if !output.status.success() { - return Err(anyhow!("Couldn't run gramine. {:?}", output)); - } - - let report: ReportBody = serde_json::from_str(&fs::read_to_string(report_file).await?)?; - let report_sig_str = fs::read_to_string(report_sig_file).await?.replace('\r', ""); - let report_sig: Binary = Binary::from_base64(report_sig_str.trim())?; - - Ok(EpidAttestation::new(IASReport { report, report_sig })) -} diff --git a/apps/mtcs/scripts/src/lib.rs b/apps/mtcs/scripts/src/lib.rs deleted file mode 100644 index 5ea88ec..0000000 --- a/apps/mtcs/scripts/src/lib.rs +++ /dev/null @@ -1,3 +0,0 @@ -//TODO: make an error.rs to differentiate errors in listen.rs -pub mod types; -pub mod utils; diff --git a/apps/mtcs/scripts/src/types.rs b/apps/mtcs/scripts/src/types.rs deleted file mode 100644 index efbdcfa..0000000 --- a/apps/mtcs/scripts/src/types.rs +++ /dev/null @@ -1,39 +0,0 @@ -use serde::{Deserialize, Serialize}; - -// Rust libraries don't seem to implement this type from the wasmd go implementation -// TODO: Replace String with types from Rust libraries -// TODO: Move this into WasmdClient -#[derive(Deserialize, Debug)] -pub struct WasmdTxResponse { - pub height: String, - pub txhash: String, - pub codespace: String, - pub code: u32, - pub data: String, - pub raw_log: String, - pub logs: Vec, - pub info: String, - pub gas_wanted: String, - pub gas_used: String, - pub tx: Option, - pub timestamp: String, - pub events: Vec, -} - -#[derive(Serialize, Deserialize, Debug)] -pub struct Attribute { - pub key: String, - pub value: String, -} - -#[derive(Serialize, Deserialize, Debug)] -pub struct Event { - pub attributes: Vec, - pub r#type: String, -} - -#[derive(Serialize, Deserialize, Debug)] -pub struct Log { - pub events: Vec, - pub msg_index: u32, -} diff --git a/apps/mtcs/scripts/src/utils.rs b/apps/mtcs/scripts/src/utils.rs deleted file mode 100644 index 5d213bc..0000000 --- a/apps/mtcs/scripts/src/utils.rs +++ /dev/null @@ -1,81 +0,0 @@ -use std::{path::Path, process::Command, time::Duration}; - -use anyhow::anyhow; -use cosmrs::AccountId; -use regex::Regex; -use serde::de::DeserializeOwned; -use subtle_encoding::bech32::decode as bech32_decode; -use tendermint::Hash; -use tendermint_rpc::{ - endpoint::tx::Response as TmTxResponse, error::ErrorDetail, Client, HttpClient, -}; - -pub fn wasmaddr_to_id(address_str: &str) -> anyhow::Result { - let (hr, _) = bech32_decode(address_str).map_err(|e| anyhow!(e))?; - if hr != "wasm" { - return Err(anyhow!(hr)); - } - - Ok(address_str.parse().unwrap()) -} - -// TODO: move wrapping result with "quartz:" struct into here -pub fn run_relay( - base_path: &Path, - msg: &str, - arg: Option<&str>, -) -> Result { - let relayer_path = base_path.join("packages/relayer/scripts/relay.sh"); - - let mut bash = Command::new("bash"); - let command = bash.arg(relayer_path).arg(msg); - - if let Some(arg) = arg { - command.arg(arg); - } - - let output = command.output()?; - - if !output.status.success() { - return Err(anyhow!("{:?}", output)); - } - - let query_result: R = serde_json::from_slice(&output.stdout) - .map_err(|e| anyhow!("Error deserializing: {}", e))?; - - Ok(query_result) -} - -// Note: time until tx commit is empiraclly 800ms on DO wasmd chain. -pub async fn block_tx_commit(client: &HttpClient, tx: Hash) -> Result { - let re = Regex::new(r"tx \([A-F0-9]{64}\) not found").unwrap(); - - tokio::time::sleep(Duration::from_millis(400)).await; - loop { - match client.tx(tx, false).await { - Ok(resp) => { - return Ok(resp); - } - Err(e) => { - // If error, make sure it is only because of a not yet committed tx - match e.0 { - ErrorDetail::Response(subdetail) => { - if !re.is_match(subdetail.source.data().unwrap_or_default()) { - return Err(anyhow!( - "Error querying for tx: {}", - ErrorDetail::Response(subdetail) - )); - } else { - println!("🔗 Waiting for tx commit... (+400ms)"); - tokio::time::sleep(Duration::from_millis(400)).await; - continue; - } - } - _ => { - return Err(anyhow!("Error querying for tx: {}", e.0)); - } - } - } - } - } -} diff --git a/apps/mtcs/scripts/start.sh b/apps/mtcs/scripts/start.sh deleted file mode 100755 index ac526ce..0000000 --- a/apps/mtcs/scripts/start.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/bash - -#set -eo pipefail - -DIR_QUARTZ=${ROOT:-$(git rev-parse --show-toplevel)} -DIR_QUARTZ_APP="$DIR_QUARTZ/apps/mtcs" -DIR_QUARTZ_ENCLAVE="$DIR_QUARTZ_APP/enclave" -DIR_QUARTZ_TM_PROVER="$DIR_QUARTZ/utils/tm-prover" - -NODE_URL=${NODE_URL:-143.244.186.205:26657} -CMD="wasmd --node http://$NODE_URL" - -echo "--------------------------------------------------------" -echo "set trusted hash" - -cd "$DIR_QUARTZ_TM_PROVER" -# cargo run -- --chain-id testing \ -# --primary "http://$NODE_URL" \ -# --witnesses "http://$NODE_URL" \ -# --trusted-height 1 \ -# --trusted-hash "5237772462A41C0296ED688A0327B8A60DF310F08997AD760EB74A70D0176C27" \ -# --contract-address "wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d" \ -# --storage-key "quartz_session" \ -# --trace-file light-client-proof.json &> $DIR_QUARTZ_APP/output - -# # Debug output of cargo run -# echo "Cargo run output:" -# cat $DIR_QUARTZ_APP/output - -# cd $DIR_QUARTZ_APP -# # Debug hash extraction -# echo "Attempting to extract trusted hash from output..." -# cat output | grep found | head -1 | awk '{print $NF}' | sed 's/\x1b\[[0-9;]*m//g' > trusted.hash - -# # Check if the hash was extracted correctly -# if [[ ! -s trusted.hash ]]; then -# echo "Failed to extract trusted hash from output" -# exit 1 -# fi - -# export TRUSTED_HASH=$(cat trusted.hash) -# echo "Extracted TRUSTED_HASH: $TRUSTED_HASH" -# rm output -CHAIN_STATUS=$($CMD status) -TRUSTED_HASH=$(echo "$CHAIN_STATUS" | jq -r .SyncInfo.latest_block_hash) -TRUSTED_HEIGHT=$(echo "$CHAIN_STATUS" | jq -r .SyncInfo.latest_block_height) -echo "... $TRUSTED_HASH" - - -cd "$DIR_QUARTZ_APP" -echo "$TRUSTED_HASH" > trusted.hash -echo "$TRUSTED_HEIGHT" > trusted.height - -if [ -n "$MOCK_SGX" ]; then - echo "MOCK_SGX is set. Running enclave without gramine..." - cd $DIR_QUARTZ - - RUST_BACKTRACE=full ./target/release/mtcs-enclave --chain-id "testing" --trusted-height "$TRUSTED_HEIGHT" --trusted-hash "$TRUSTED_HASH" - exit -fi - -echo "--------------------------------------------------------" -echo "configure gramine" -cd "$DIR_QUARTZ_ENCLAVE" - -echo "... gen priv key if it doesnt exist" -gramine-sgx-gen-private-key > /dev/null 2>&1 || : # may fail - -# echo "... update manifest template with trusted hash $TRUSTED_HASH" -# sed -i -r "s/(\"--trusted-hash\", \")[A-Z0-9]+(\"])/\1$TRUSTED_HASH\2/" quartz.manifest.template - -echo "... create manifest" -gramine-manifest \ --Dlog_level="error" \ --Dhome="$HOME" \ --Darch_libdir="/lib/$(gcc -dumpmachine)" \ --Dra_type="epid" \ --Dra_client_spid="51CAF5A48B450D624AEFE3286D314894" \ --Dra_client_linkable=1 \ --Dquartz_dir="$(pwd)" \ --Dtrusted_height="$TRUSTED_HEIGHT" \ --Dtrusted_hash="$TRUSTED_HASH" \ -quartz.manifest.template quartz.manifest - -if [ $? -ne 0 ]; then - echo "gramine-manifest failed" - exit 1 -fi - -echo "... sign manifest" -gramine-sgx-sign --manifest quartz.manifest --output quartz.manifest.sgx - -if [ $? -ne 0 ]; then - echo "gramine-sgx-sign failed" - exit 1 -fi - -echo "--------------------------------------------------------" -echo "... start gramine" -gramine-sgx ./quartz - -if [ $? -ne 0 ]; then - echo "gramine-sgx failed to start" - exit 1 -fi \ No newline at end of file diff --git a/apps/mtcs/scripts/start45.sh b/apps/mtcs/scripts/start45.sh deleted file mode 100755 index d2d98a0..0000000 --- a/apps/mtcs/scripts/start45.sh +++ /dev/null @@ -1,128 +0,0 @@ -ROOT=${ROOT:-$HOME} -DIR_QUARTZ="$ROOT/cycles-protocol" -DIR_QUARTZ_APP="$DIR_QUARTZ/quartz-app/contracts/cw-tee-mtcs" -DIR_QUARTZ_ENCLAVE="$DIR_QUARTZ/quartz-app/enclave" -DIR_QUARTZ_TM_PROVER="$DIR_QUARTZ/packages/tm-prover" - -NODE_URL=${NODE_URL:-143.244.186.205:36657} -CMD="wasmd --node http://$NODE_URL" - -echo "--------------------------------------------------------" -echo "set trusted hash" - -cd "$DIR_QUARTZ_TM_PROVER" -cargo run -- --chain-id testing \ ---primary "http://$NODE_URL" \ ---witnesses "http://$NODE_URL" \ ---trusted-height 500000 \ ---trusted-hash "5237772462A41C0296ED688A0327B8A60DF310F08997AD760EB74A70D0176C27" \ ---contract-address "wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d" \ ---storage-key "quartz_session" \ ---trace-file light-client-proof.json &> $DIR_QUARTZ_APP/output - - -cd $DIR_QUARTZ_APP -cat output | grep found | head -1 | awk '{print $NF}' | sed 's/\x1b\[[0-9;]*m//g' > trusted.hash -export TRUSTED_HASH=$(cat trusted.hash) -echo "... $TRUSTED_HASH" -rm output - -echo "--------------------------------------------------------" -echo "configure gramine" -cd "$DIR_QUARTZ_ENCLAVE" - -echo "... gen priv key if it doesnt exist" -gramine-sgx-gen-private-key > /dev/null 2>&1 || : # may fail - -echo "... update manifest template with trusted hash $TRUSTED_HASH" -sed -i -r "s/(\"--trusted-hash\", \")[A-Z0-9]+(\"])/\1$TRUSTED_HASH\2/" quartz.manifest.template - - - -echo "... create manifest" -gramine-manifest \ --Dlog_level="error" \ --Dhome="$HOME" \ --Darch_libdir="/lib/$(gcc -dumpmachine)" \ --Dra_type="epid" \ --Dra_client_spid="51CAF5A48B450D624AEFE3286D314894" \ --Dra_client_linkable=1 \ --Dquartz_dir="$(pwd)" \ --Dtrusted_height="$TRUSTED_HEIGHT" \ --Dtrusted_hash="$TRUSTED_HASH" \ -quartz.manifest.template quartz.manifest - -echo "... sign manifest" -gramine-sgx-sign --manifest quartz.manifest --output quartz.manifest.sgx - - - -echo "--------------------------------------------------------" -echo "... start gramine" -gramine-sgx ./quartz - - - - -# #set -eo pipefail - -# ROOT=${ROOT:-$HOME} -# DIR_QUARTZ="$ROOT/quartz-app" -# DIR_QUARTZ_APP="$DIR_QUARTZ/contracts/cw-tee-mtcs" -# DIR_QUARTZ_ENCLAVE="$DIR_QUARTZ/enclave" -# DIR_QUARTZ_TM_PROVER="$DIR_QUARTZ/packages/tm-prover" - -# NODE_URL=${NODE_URL:-143.244.186.205:36657} -# CMD="wasmd --node http://$NODE_URL" - - -# echo "--------------------------------------------------------" -# echo "set trusted hash" - -# cd "$DIR_QUARTZ_TM_PROVER" -# cargo run -- --chain-id testing \ -# --primary "http://$NODE_URL" \ -# --witnesses "http://$NODE_URL" \ -# --trusted-height 500000 \ -# --trusted-hash "5237772462A41C0296ED688A0327B8A60DF310F08997AD760EB74A70D0176C27" \ -# --contract-address "wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d" \ -# --storage-key "quartz_session" \ -# --trace-file light-client-proof.json &> $DIR_QUARTZ_APP/output - -# cd $DIR_QUARTZ_APP -# cat output | grep found | head -1 | awk '{print $NF}' | sed 's/\x1b\[[0-9;]*m//g' > trusted.hash -# export TRUSTED_HASH=$(cat trusted.hash) -# echo "... $TRUSTED_HASH" -# rm output - -# echo "--------------------------------------------------------" -# echo "configure gramine" -# cd "$DIR_QUARTZ_ENCLAVE" - -# echo "... gen priv key if it doesnt exist" -# gramine-sgx-gen-private-key > /dev/null 2>&1 || : # may fail - -# echo "... update manifest template with trusted hash $TRUSTED_HASH" -# sed -i -r "s/(\"--trusted-hash\", \")[A-Z0-9]+(\"])/\1$TRUSTED_HASH\2/" quartz.manifest.template - - -# echo "... create manifest" -# gramine-manifest \ -# -Dlog_level="error" \ -# -Dhome="$HOME" \ -# -Darch_libdir="/lib/$(gcc -dumpmachine)" \ -# -Dra_type="epid" \ -# -Dra_client_spid="51CAF5A48B450D624AEFE3286D314894" \ -# -Dra_client_linkable=1 \ -# -Dquartz_dir="$(pwd)" \ -# -Dtrusted_height="$TRUSTED_HEIGHT" \ -# -Dtrusted_hash="$TRUSTED_HASH" \ -# quartz.manifest.template quartz.manifest - -# echo "... sign manifest" -# gramine-sgx-sign --manifest quartz.manifest --output quartz.manifest.sgx - - -# echo "--------------------------------------------------------" -# echo "... start gramine" -# gramine-sgx ./quartz diff --git a/apps/mtcs/scripts/transact.sh b/apps/mtcs/scripts/transact.sh deleted file mode 100644 index bf9e553..0000000 --- a/apps/mtcs/scripts/transact.sh +++ /dev/null @@ -1,40 +0,0 @@ - -OVERDRAFT=wasm1huhuswjxfydydxvdadqqsaet2p72wshtmr72yzx09zxncxtndf2sqs24hk -CMD='wasmd --node http://$NODE_URL' - -# users - -ALICE=wasm124tuy67a9dcvfgcr4gjmz60syd8ddaugl33v0n -BOB=wasm1ctkqmg45u85jnf5ur9796h7ze4hj6ep5y7m7l6 - -# query alice - -$CMD query wasm contract-state smart $OVERDRAFT '{"balance": {"user": "'$ALICE'"}}' - -# query bob - -$CMD query wasm contract-state smart $OVERDRAFT '{"balance": {"user": "'$BOB'"}}' - -# make obligation from alice to bob for 10 - -# $CMD tx wasm execute $CONTRACT '{"submit_obligation_msg": {"ciphertext": "", "digest": ""}}' --from $CONTRACT --chain-id testing - -# make bob acceptance to overdraft for 10 - -# make alice tender from overdraft for 10 - -# init clearing - -$CMD tx wasm execute $CONTRACT '"init_clearing"' --from $CONTRACT --chain-id testing - -# wait for 2 sec -sleep 2 - -# query alice - -$CMD query wasm contract-state smart $OVERDRAFT '{"balance": {"user": "'$ALICE'"}}' - -# query bob - -$CMD query wasm contract-state smart $OVERDRAFT '{"balance": {"user": "'$BOB'"}}' - diff --git a/apps/transfers/scripts/build.sh b/apps/transfers/scripts/build.sh deleted file mode 100644 index 69ce69f..0000000 --- a/apps/transfers/scripts/build.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -ROOT=${ROOT:-$HOME} -FEATURES= - -if [ -n "$MOCK_SGX" ]; then - echo "MOCK_SGX is set. Adding mock-sgx feature." - FEATURES="--features=mock-sgx" -fi - -echo "--------------------------------------------------------" -echo "building enclave binary" - -cd $ROOT/cycles-quartz/apps/transfers/enclave -CARGO_TARGET_DIR=./target cargo build --release $FEATURES - -echo "--------------------------------------------------------" -echo "building cosmwasm contract binary" - - -cd $ROOT/cycles-quartz/apps/transfers/contracts -bash build.sh $FEATURES diff --git a/apps/transfers/scripts/buildNeutron.sh b/apps/transfers/scripts/buildNeutron.sh deleted file mode 100644 index 4075a4e..0000000 --- a/apps/transfers/scripts/buildNeutron.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -ROOT=${ROOT:-$(git rev-parse --show-toplevel)} -FEATURES= - -if [ -n "$MOCK_SGX" ]; then - echo "MOCK_SGX is set. Adding mock-sgx feature." - FEATURES="--features=mock-sgx" -fi - -echo "--------------------------------------------------------" -echo "building enclave binary" - -cd $ROOT/apps/transfers/enclave -CARGO_TARGET_DIR=./target cargo build --release $FEATURES - -echo "--------------------------------------------------------" -echo "building cosmwasm contract binary" - - -cd $ROOT/apps/transfers/contracts -bash build.sh $FEATURES diff --git a/apps/transfers/scripts/decrypt_ephemeral.sh b/apps/transfers/scripts/decrypt_ephemeral.sh deleted file mode 100755 index 7392c57..0000000 --- a/apps/transfers/scripts/decrypt_ephemeral.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -# Check if an encrypted balance is provided -if [ "$#" -ne 1 ]; then - echo "Usage: $0 " - exit 1 -fi - -ENCRYPTED_BALANCE=$1 - -# Check if eciespy is installed -if ! pip list 2>/dev/null | grep -q eciespy; then - echo "eciespy is not installed. Installing now..." - pip install eciespy >/dev/null 2>&1 -fi - -# Extract the private key from wasmd -EPHEMERAL_PRIVKEY=$( yes | wasmd keys export ephemeral_user --unsafe --unarmored-hex) - -if [ $? -ne 0 ]; then - echo "Failed to export private key. Make sure 'ephemeral_user' exists and you've entered the correct password." - exit 1 -fi - -# Create a temporary Python script for decryption -TEMP_PYTHON_SCRIPT=$(mktemp) -cat << EOF > "$TEMP_PYTHON_SCRIPT" -from ecies import decrypt -import binascii -import sys - -private_key = bytes.fromhex(sys.argv[1]) -encrypted = binascii.unhexlify(sys.argv[2]) - -try: - decrypted = decrypt(private_key, encrypted) - print(decrypted.decode()) -except Exception as e: - print(f"Decryption failed: {str(e)}") -EOF - -# Run the Python script to decrypt -DECRYPTED=$(python3 "$TEMP_PYTHON_SCRIPT" "$EPHEMERAL_PRIVKEY" "$ENCRYPTED_BALANCE") - -echo "---------------------------------------------------------" -echo "Decrypted result:" -echo "$DECRYPTED" - -# Clean up -rm "$TEMP_PYTHON_SCRIPT" \ No newline at end of file diff --git a/apps/transfers/scripts/deploy.sh b/apps/transfers/scripts/deploy.sh deleted file mode 100755 index 8ae7456..0000000 --- a/apps/transfers/scripts/deploy.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -ROOT=${ROOT:-$HOME} - - -echo "--------------------------------------------------------" -echo "instantiate" -cd $ROOT/cycles-quartz/relayer/ -export INSTANTIATE_MSG=$(./scripts/relay.sh Instantiate | jq '{quartz: .} + {denom: "ucosm"}' ) -echo $INSTANTIATE_MSG -echo "--------------------------------------------------------" - -echo "deploy contract" -cd $ROOT/cycles-quartz/apps/transfers/contracts/ - -bash deploy-contract.sh target/wasm32-unknown-unknown/release/transfers_contract.wasm 2>&1 | tee output -export CONTRACT=$(cat output | grep Address | awk '{print $NF}' | sed 's/\x1b\[[0-9;]*m//g') -echo $CONTRACT - - - - diff --git a/apps/transfers/scripts/deployNeutron.sh b/apps/transfers/scripts/deployNeutron.sh deleted file mode 100755 index 4ec8544..0000000 --- a/apps/transfers/scripts/deployNeutron.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -ROOT=${ROOT:-$(git rev-parse --show-toplevel)} - -# Color definitions -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -MAGENTA='\033[0;35m' -CYAN='\033[0;36m' -BOLD='\033[1m' -NC='\033[0m' # No Color - -# Function to print colored and formatted messages -print_message() { - local color=$1 - local message=$2 - echo -e "${color}${BOLD}${message}${NC}" -} - -# Function to print section headers -print_header() { - local message=$1 - echo -e "\n${MAGENTA}${BOLD}======== $message ========${NC}\n" -} - -# Function to print success messages -print_success() { - local message=$1 - echo -e "${GREEN}${BOLD}✅ $message${NC}" -} - -# Function to print error messages -print_error() { - local message=$1 - echo -e "${RED}${BOLD}❌ Error: $message${NC}" - exit 1 -} - -# Function to print waiting messages -print_waiting() { - local message=$1 - echo -e "${YELLOW}${BOLD}⏳ $message${NC}" -} - - -print_header "Instantianting relayer" -print_success "Relayer instantiated successfully." - -cd $ROOT/relayer/ - -INSTANTIATE_MSG=$(./scripts/relay.sh Instantiate | jq -c '' ) - -cd $ROOT/apps/transfers/contracts/ - -bash deploy-contract-Neutrond.sh target/wasm32-unknown-unknown/release/transfers_contract.wasm "$INSTANTIATE_MSG" | tee output -export CONTRACT=$(cat output | grep Address | awk '{print $NF}' | sed 's/\x1b\[[0-9;]*m//g') \ No newline at end of file diff --git a/apps/transfers/scripts/handshake.sh b/apps/transfers/scripts/handshake.sh deleted file mode 100755 index 5ad1ce8..0000000 --- a/apps/transfers/scripts/handshake.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/bash -# -# Perform the SessionCreate and SessionSetPubKey handshake between the contract and the sgx node -# Expects: -# - enclave is already initialized -# - contract is already deployed -# - apps/transfers/trusted.hash exists -# - -set -eo pipefail - -ROOT=${ROOT:-$HOME} - -NODE_URL=${NODE_URL:-127.0.0.1:26657} - -if [ "$#" -eq 0 ]; then - echo "Usage: $0 " - exit 1 # Exit with a non-zero status to indicate an error -fi - -CONTRACT="$1" - -CMD="wasmd --node http://$NODE_URL" - -cd "$ROOT/cycles-quartz/apps/transfers" -export TRUSTED_HASH=$(cat trusted.hash) -export TRUSTED_HEIGHT=$(cat trusted.height) - -echo "using CMD: $CMD" -echo "--------------------------------------------------------" - -echo "create session" - -# change to relay dir -cd $ROOT/cycles-quartz/relayer - -# execute SessionCreate on enclave -export EXECUTE_CREATE=$(./scripts/relay.sh SessionCreate) -echo $EXECUTE_CREATE - -# submit SessionCreate to contract -RES=$($CMD tx wasm execute "$CONTRACT" "$EXECUTE_CREATE" --from admin --chain-id testing -y --output json) -TX_HASH=$(echo $RES | jq -r '.["txhash"]') - -# wait for tx to commit -while ! $CMD query tx $TX_HASH &> /dev/null; do - echo "... 🕐 waiting for tx $TX_HASH" - sleep 1 -done - -# need to wait another block for light client proof -BLOCK_HEIGHT=$($CMD query block | jq .block.header.height) - -echo "at height $BLOCK_HEIGHT. need to wait for a block" -while [[ $BLOCK_HEIGHT == $($CMD query block | jq .block.header.height) ]]; do - echo "... 🕐 waiting for another block" - sleep 1 -done - -# need to wait another block for light client proof -BLOCK_HEIGHT=$($CMD query block | jq .block.header.height) -echo "at height $BLOCK_HEIGHT. need to wait for a block" -while [[ $BLOCK_HEIGHT == $($CMD query block | jq .block.header.height) ]]; do - echo "... 🕐 waiting for another block" - sleep 1 -done - -echo "--------------------------------------------------------" - -echo "set session pk" - -# change to prover dir -cd $ROOT/cycles-quartz/utils/tm-prover -export PROOF_FILE="light-client-proof.json" -if [ -f "$PROOF_FILE" ]; then - rm "$PROOF_FILE" - echo "removed old $PROOF_FILE" -fi - -# TODO: pass this in? -echo "trusted hash $TRUSTED_HASH" -echo "trusted hash $TRUSTED_HEIGHT" -echo "contract $CONTRACT" - -# run prover to get light client proof -# TODO: assume this binary is pre-built? -# TODO: pass in addresses and chain id -cargo run -- --chain-id testing \ - --primary "http://$NODE_URL" \ - --witnesses "http://$NODE_URL" \ - --trusted-height $TRUSTED_HEIGHT \ - --trusted-hash $TRUSTED_HASH \ - --contract-address $CONTRACT \ - --storage-key "quartz_session" \ - --trace-file $PROOF_FILE - -export POP=$(cat $PROOF_FILE) -export POP_MSG=$(jq -nc --arg message "$POP" '$ARGS.named') - -# execute SessionSetPubKey on enclave -cd $ROOT/cycles-quartz/relayer -export EXECUTE_SETPUB=$(./scripts/relay.sh SessionSetPubKey "$POP_MSG") - -RES=$($CMD tx wasm execute "$CONTRACT" "$EXECUTE_SETPUB" --from admin --chain-id testing -y --output json) -TX_HASH=$(echo $RES | jq -r '.["txhash"]') - -# wait for tx to commit -while ! $CMD query tx $TX_HASH &> /dev/null; do - echo "... 🕐 waiting for tx $TX_HASH" - sleep 1 -done - -echo "--------------------------------------------------------" - -echo "check session success" -export NONCE_AND_KEY=$($CMD query wasm contract-state raw "$CONTRACT" $(printf '%s' "quartz_session" | hexdump -ve '/1 "%02X"') -o json | jq -r .data | base64 -d) -echo $NONCE_AND_KEY -export PUBKEY=$(echo $NONCE_AND_KEY | jq -r .pub_key) - diff --git a/apps/transfers/scripts/listen.sh b/apps/transfers/scripts/listen.sh deleted file mode 100755 index 279c275..0000000 --- a/apps/transfers/scripts/listen.sh +++ /dev/null @@ -1,171 +0,0 @@ -#!/bin/bash - -ROOT=${ROOT:-$HOME} -DEFAULT_NODE="127.0.0.1:26657" -NODE_URL=${NODE_URL:-$DEFAULT_NODE} -# Use the QUARTZ_PORT environment variable if set, otherwise default to 11090 -QUARTZ_PORT="${QUARTZ_PORT:-11090}" - -if [ "$#" -eq 0 ]; then - echo "Usage: $0 " - exit 1 # Exit with a non-zero status to indicate an error -fi - -CONTRACT=$1 -CMD="wasmd --node http://$NODE_URL" -WSURL="ws://$NODE_URL/websocket" - -SUBSCRIBE_TRANSFER="{\"jsonrpc\":\"2.0\",\"method\":\"subscribe\",\"params\":[\"execute._contract_address = '$CONTRACT' AND wasm-transfer.action = 'user'\"],\"id\":1}" -SUBSCRIBE_QUERY="{\"jsonrpc\":\"2.0\",\"method\":\"subscribe\",\"params\":[\"execute._contract_address = '$CONTRACT' AND wasm-query_balance.query = 'user'\"],\"id\":2}" -# Attestation constants -IAS_API_KEY="669244b3e6364b5888289a11d2a1726d" -RA_CLIENT_SPID="51CAF5A48B450D624AEFE3286D314894" -QUOTE_FILE="/tmp/${USER}_test.quote" -REPORT_FILE="/tmp/${USER}_datareport" -REPORT_SIG_FILE="/tmp/${USER}_datareportsig" - -# cat keeps the stdin open so websocat doesnt close -(echo "$SUBSCRIBE_TRANSFER"; echo "$SUBSCRIBE_QUERY"; cat) | websocat $WSURL | while read msg; do - if [[ "$msg" == '{"jsonrpc":"2.0","id":1,"result":{}}' ]] || \ - [[ "$msg" == '{"jsonrpc":"2.0","id":2,"result":{}}' ]]; then - echo "---------------------------------------------------------" - echo "... subscribed to $msg" - echo "... waiting for event" - continue - fi - - CLEAN_MSG=$(echo "$msg" | sed 's/"log":"\[.*\]"/"log":""/' | jq '.result.events') - - if echo "$CLEAN_MSG" | grep -q 'wasm-transfer'; then - echo "---------------------------------------------------------" - echo "... received wasm-transfer event!" - - current_height=$($CMD status | jq -r .SyncInfo.latest_block_height) - next_height=$((current_height + 1)) - - while [ "$($CMD status 2>&1 | jq -r .SyncInfo.latest_block_height)" -lt "$next_height" ]; do - echo "waiting for next block" - sleep 1 - done - - echo "... fetching requests" - REQUESTS=$($CMD query wasm contract-state raw $CONTRACT $(printf '%s' "requests" | \ - hexdump -ve '/1 "%02X"') -o json | jq -r .data | base64 -d) - STATE=$($CMD query wasm contract-state raw $CONTRACT $(printf '%s' "state" | \ - hexdump -ve '/1 "%02X"') -o json | jq -r .data | base64 -d) - - cd "$ROOT/cycles-quartz/apps/transfers" - export TRUSTED_HASH=$(cat trusted.hash) - export TRUSTED_HEIGHT=$(cat trusted.height) - - cd $ROOT/cycles-quartz/utils/tm-prover - export PROOF_FILE="light-client-proof.json" - if [ -f "$PROOF_FILE" ]; then - rm "$PROOF_FILE" - echo "removed old $PROOF_FILE" - fi - - echo "trusted hash $TRUSTED_HASH" - echo "trusted hash $TRUSTED_HEIGHT" - echo "contract $CONTRACT" - - # run prover to get light client proof - cargo run -- --chain-id testing \ - --primary "http://$NODE_URL" \ - --witnesses "http://$NODE_URL" \ - --trusted-height $TRUSTED_HEIGHT \ - --trusted-hash $TRUSTED_HASH \ - --contract-address $CONTRACT \ - --storage-key "requests" \ - --trace-file $PROOF_FILE - - export POP=$(cat $PROOF_FILE) - - export ENCLAVE_REQUEST=$(jq -nc --argjson requests "$REQUESTS" --argjson state $STATE '$ARGS.named') - export REQUEST_MSG=$(jq --argjson msg "$ENCLAVE_REQUEST" '. + {msg: $msg}' <<< "$POP") - export PROTO_MSG=$(jq -nc --arg message "$REQUEST_MSG" '$ARGS.named') - - cd $ROOT/cycles-quartz/apps/transfers/enclave - - echo "... executing transfer" - export ATTESTED_MSG=$(grpcurl -plaintext -import-path ./proto/ -proto transfers.proto \ - -d "$PROTO_MSG" "127.0.0.1:$QUARTZ_PORT" transfers.Settlement/Run | \ - jq .message | jq -R 'fromjson | fromjson' | jq -c) - QUOTE=$(echo "$ATTESTED_MSG" | jq -c '.attestation') - MSG=$(echo "$ATTESTED_MSG" | jq -c '.msg') - - if [ -n "$MOCK_SGX" ]; then - echo "... running in MOCK_SGX mode" - EXECUTE=$(jq -nc --argjson update "$(jq -nc --argjson msg "$MSG" \ - --argjson attestation "$QUOTE" '$ARGS.named')" '$ARGS.named') - else - echo "... getting report" - echo -n "$QUOTE" | xxd -r -p - > "$QUOTE_FILE" - gramine-sgx-ias-request report -g "$RA_CLIENT_SPID" -k "$IAS_API_KEY" -q "$QUOTE_FILE" \ - -r "$REPORT_FILE" -s "$REPORT_SIG_FILE" > /dev/null 2>&1 - REPORT=$(cat "$REPORT_FILE") - REPORTSIG=$(cat "$REPORT_SIG_FILE" | tr -d '\r') - - EXECUTE=$(jq -nc --argjson update "$(jq -nc --argjson msg "$MSG" --argjson attestation \ - "$(jq -nc --argjson report "$(jq -nc --argjson report "$REPORT" \ - --arg reportsig "$REPORTSIG" '$ARGS.named')" '$ARGS.named')" '$ARGS.named')" '$ARGS.named') - fi - - echo "... submitting update" - echo $EXECUTE | jq '.' - $CMD tx wasm execute "$CONTRACT" "$EXECUTE" --from admin --chain-id testing -y --gas 2000000 - - echo " ... done" - echo "---------------------------------------------------------" - echo "... waiting for event" - elif echo "$CLEAN_MSG" | grep -q 'wasm-query_balance'; then - echo "... received wasm-query_balance event!" - echo "... fetching state" - - STATE=$($CMD query wasm contract-state raw $CONTRACT $(printf '%s' "state" | \ - hexdump -ve '/1 "%02X"') -o json | jq -r .data | base64 -d) - - ADDRESS=$(echo "$msg" | sed 's/"log":"\[.*\]"/"log":""/' | \ - jq -r '.result.events["message.sender"]'[0]) - - EPHEMERAL_PUBKEY=$(echo "$msg" | sed 's/"log":"\[.*\]"/"log":""/' | \ - jq -r '.result.events["wasm-query_balance.emphemeral_pubkey"]'[0]) - - export ENCLAVE_REQUEST=$(jq -nc --argjson state "$STATE" --arg address "$ADDRESS" \ - --arg ephemeral_pubkey "$EPHEMERAL_PUBKEY" '$ARGS.named') - export REQUEST_MSG=$(jq -nc --arg message "$ENCLAVE_REQUEST" '$ARGS.named') - - cd $ROOT/cycles-quartz/apps/transfers/enclave - - echo "... executing query balance" - ATTESTED_MSG=$(grpcurl -plaintext -import-path ./proto/ -proto transfers.proto \ - -d "$REQUEST_MSG" "127.0.0.1:$QUARTZ_PORT" transfers.Settlement/Query | jq -r '.message | fromjson') - QUOTE=$(echo "$ATTESTED_MSG" | jq -c '.attestation') - MSG=$(echo "$ATTESTED_MSG" | jq -c '.msg') - QUERY_RESPONSE_MSG=$(jq -n --arg address "$ADDRESS" --argjson msg "$MSG" \ - '{address: $address, encrypted_bal: $msg.encrypted_bal}') - - if [ -n "$MOCK_SGX" ]; then - echo "... running in MOCK_SGX mode" - EXECUTE=$(jq -nc --argjson query_response "$(jq -nc --argjson msg "$QUERY_RESPONSE_MSG" \ - --argjson attestation "$QUOTE" '$ARGS.named')" '{query_response: $query_response}') - else - echo -n "$QUOTE" | xxd -r -p - > "$QUOTE_FILE" - gramine-sgx-ias-request report -g "$RA_CLIENT_SPID" -k "$IAS_API_KEY" -q "$QUOTE_FILE" \ - -r "$REPORT_FILE" -s "$REPORT_SIG_FILE" > /dev/null 2>&1 - REPORT=$(cat "$REPORT_FILE") - REPORTSIG=$(cat "$REPORT_SIG_FILE" | tr -d '\r') - EXECUTE=$(jq -nc --argjson query_response "$(jq -nc --argjson msg "$QUERY_RESPONSE_MSG" \ - --argjson attestation "$(jq -nc --argjson report "$(jq -nc --argjson report "$REPORT" \ - --arg reportsig "$REPORTSIG" '$ARGS.named')" '$ARGS.named')" '$ARGS.named')" \ - '{query_response: $query_response}') - fi - - echo "... submitting update" - echo $EXECUTE | jq '.' - $CMD tx wasm execute "$CONTRACT" "$EXECUTE" --from admin --chain-id testing -y --gas 2000000 - echo " ... done" - echo "------------------------------------" - echo "... waiting for event" - fi -done \ No newline at end of file diff --git a/apps/transfers/scripts/listenNeutron.sh b/apps/transfers/scripts/listenNeutron.sh deleted file mode 100755 index 93642ba..0000000 --- a/apps/transfers/scripts/listenNeutron.sh +++ /dev/null @@ -1,233 +0,0 @@ -#!/bin/bash - -set -eo pipefail - - -# Color definitions -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -MAGENTA='\033[0;35m' -CYAN='\033[0;36m' -BOLD='\033[1m' -NC='\033[0m' # No Color - -# Function to print colored and formatted messages -print_message() { - local color=$1 - local message=$2 - echo -e "${color}${BOLD}${message}${NC}" -} - -# Function to print section headers -print_header() { - local message=$1 - echo -e "\n${MAGENTA}${BOLD}======== $message ========${NC}\n" -} - -# Function to print success messages -print_success() { - local message=$1 - echo -e "${GREEN}${BOLD}✅ $message${NC}" -} - -# Function to print error messages -print_error() { - local message=$1 - echo -e "${RED}${BOLD}❌ Error: $message${NC}" >&2 -} - - - -# Configuration -DEFAULT_NODE="127.0.0.1:26657" -NODE_URL=${NODE_URL:-$DEFAULT_NODE} -QUARTZ_PORT="${QUARTZ_PORT:-11090}" - -if [ "$#" -eq 0 ]; then - echo "Usage: $0 " - exit 1 -fi - -CONTRACT=$1 -CMD="neutrond --node http://$NODE_URL" -WSURL="ws://$NODE_URL/websocket" -ROOT=${ROOT:-$(git rev-parse --show-toplevel)} - -WASMD_HOME=${WASMD_HOME:-"$HOME/.neutrond"} -CHAIN_ID=${CHAIN_ID:-test-1} -TXFLAG="--chain-id ${CHAIN_ID} --gas-prices 0.0025untrn --gas auto --gas-adjustment 1.3" -USER_ADDR=$(neutrond keys show -a "val1" --keyring-backend test --home "$WASMD_HOME" --keyring-dir "$WASMD_HOME") - -# Subscription queries -SUBSCRIBE_TRANSFER="{\"jsonrpc\":\"2.0\",\"method\": \"subscribe\" ,\"params\":{\"query\":\"execute._contract_address = '$CONTRACT' AND wasm-transfer.action = 'user'\"},\"id\":2}" -SUBSCRIBE_QUERY="{\"jsonrpc\":\"2.0\",\"method\": \"subscribe\" ,\"params\":{\"query\":\"execute._contract_address = '$CONTRACT' AND wasm-query_balance.query = 'user'\"},\"id\":3}" - -# Attestation constants -IAS_API_KEY="669244b3e6364b5888289a11d2a1726d" -RA_CLIENT_SPID="51CAF5A48B450D624AEFE3286D314894" -QUOTE_FILE="/tmp/${USER}_test.quote" -REPORT_FILE="/tmp/${USER}_datareport" -REPORT_SIG_FILE="/tmp/${USER}_datareportsig" - -process_json() { - local json_input="$1" - local result - result=$(echo "$json_input" | jq -r '.result // empty' 2>&1) || { - echo "Error parsing JSON: $result" >&2 - echo "No relevant wasm events found" - return - } - echo "$result" -} - -wait_for_next_block() { - local current_height=$($CMD status | jq -r .sync_info.latest_block_height) - local next_height=$((current_height + 1)) - while [ "$($CMD status 2>&1 | jq -r .sync_info.latest_block_height)" -lt "$next_height" ]; do - echo "Waiting for next block..." - sleep 1 - done -} - -handle_wasm_transfer() { - print_header "Received wasm-transfer event" - echo "Debug: Entering handle_wasm_transfer function" - - wait_for_next_block - - echo "Fetching requests and state..." - REQUESTS=$($CMD query wasm contract-state raw $CONTRACT $(printf '%s' "requests" | hexdump -ve '/1 "%02X"') -o json | jq -r .data | base64 -d) - STATE=$($CMD query wasm contract-state raw $CONTRACT $(printf '%s' "state" | hexdump -ve '/1 "%02X"') -o json | jq -r .data | base64 -d) - - cd "$ROOT/apps/transfers" - export TRUSTED_HASH=$(cat trusted.hash) - export TRUSTED_HEIGHT=$(cat trusted.height) - - cd $ROOT/utils/tm-prover - export PROOF_FILE="light-client-proof.json" - [ -f "$PROOF_FILE" ] && rm "$PROOF_FILE" && echo "Removed old $PROOF_FILE" - - echo "Trusted hash: $TRUSTED_HASH" - echo "Trusted height: $TRUSTED_HEIGHT" - echo "Contract: $CONTRACT" - - echo "Running prover to get light client proof..." - cargo run -- --chain-id $CHAIN_ID \ - --primary "http://$NODE_URL" \ - --witnesses "http://$NODE_URL" \ - --trusted-height $TRUSTED_HEIGHT \ - --trusted-hash $TRUSTED_HASH \ - --contract-address $CONTRACT \ - --storage-key "requests" \ - --trace-file $PROOF_FILE - - export POP=$(cat $PROOF_FILE) - export ENCLAVE_REQUEST=$(jq -nc --argjson requests "$REQUESTS" --argjson state $STATE '$ARGS.named') - export REQUEST_MSG=$(jq --argjson msg "$ENCLAVE_REQUEST" '. + {msg: $msg}' <<< "$POP") - export PROTO_MSG=$(jq -nc --arg message "$REQUEST_MSG" '$ARGS.named') - - cd $ROOT/apps/transfers/enclave - - echo "Executing transfer..." - ATTESTED_MSG=$(grpcurl -plaintext -import-path ./proto/ -proto transfers.proto \ - -d "$PROTO_MSG" "127.0.0.1:$QUARTZ_PORT" transfers.Settlement/Run | \ - jq .message | jq -R 'fromjson | fromjson' | jq -c) - QUOTE=$(echo "$ATTESTED_MSG" | jq -c '.attestation') - MSG=$(echo "$ATTESTED_MSG" | jq -c '.msg') - - - - if [ -n "$MOCK_SGX" ]; then - echo "Running in MOCK_SGX mode" - EXECUTE=$(jq -nc --argjson update "$(jq -nc --argjson msg "$MSG" --argjson attestation "$QUOTE" '$ARGS.named')" '$ARGS.named') - else - echo "Getting report..." - echo -n "$QUOTE" | xxd -r -p - > "$QUOTE_FILE" - gramine-sgx-ias-request report -g "$RA_CLIENT_SPID" -k "$IAS_API_KEY" -q "$QUOTE_FILE" \ - -r "$REPORT_FILE" -s "$REPORT_SIG_FILE" > /dev/null 2>&1 - REPORT=$(cat "$REPORT_FILE") - REPORTSIG=$(cat "$REPORT_SIG_FILE" | tr -d '\r') - EXECUTE=$(jq -nc --argjson update "$(jq -nc --argjson msg "$MSG" --argjson attestation \ - "$(jq -nc --argjson report "$(jq -nc --argjson report "$REPORT" \ - --arg reportsig "$REPORTSIG" '$ARGS.named')" '$ARGS.named')" '$ARGS.named')" '$ARGS.named') - fi - - echo "Submitting update..." - echo $EXECUTE | jq '.' - $CMD tx wasm execute "$CONTRACT" "$EXECUTE" --from "$USER_ADDR" $TXFLAG -y - print_success "Transfer executed" -} - -handle_wasm_query_balance() { - print_header "Received wasm-query_balance event" - echo "Debug: Entering handle_wasm_query_balance function" - - echo "Fetching state..." - - STATE=$($CMD query wasm contract-state raw $CONTRACT $(printf '%s' "state" | hexdump -ve '/1 "%02X"') -o json | jq -r .data | base64 -d) - ADDRESS=$(echo "$1" | jq -r '.result.events["message.sender"][0]') - EPHEMERAL_PUBKEY=$(echo "$1" | jq -r '.result.events["wasm-query_balance.emphemeral_pubkey"][0]') - - export ENCLAVE_REQUEST=$(jq -nc --argjson state "$STATE" --arg address "$ADDRESS" --arg ephemeral_pubkey "$EPHEMERAL_PUBKEY" '$ARGS.named') - export REQUEST_MSG=$(jq -nc --arg message "$ENCLAVE_REQUEST" '$ARGS.named') - - cd $ROOT/apps/transfers/enclave - - echo "Executing query balance..." - ATTESTED_MSG=$(grpcurl -plaintext -import-path ./proto/ -proto transfers.proto \ - -d "$REQUEST_MSG" "127.0.0.1:$QUARTZ_PORT" transfers.Settlement/Query | jq -r '.message | fromjson') - QUOTE=$(echo "$ATTESTED_MSG" | jq -c '.attestation') - MSG=$(echo "$ATTESTED_MSG" | jq -c '.msg') - QUERY_RESPONSE_MSG=$(jq -n --arg address "$ADDRESS" --argjson msg "$MSG" '{address: $address, encrypted_bal: $msg.encrypted_bal}') - - if [ -n "$MOCK_SGX" ]; then - echo "Running in MOCK_SGX mode" - EXECUTE=$(jq -nc --argjson query_response "$(jq -nc --argjson msg "$QUERY_RESPONSE_MSG" --argjson attestation "$QUOTE" '$ARGS.named')" '{query_response: $query_response}') - else - echo -n "$QUOTE" | xxd -r -p - > "$QUOTE_FILE" - gramine-sgx-ias-request report -g "$RA_CLIENT_SPID" -k "$IAS_API_KEY" -q "$QUOTE_FILE" \ - -r "$REPORT_FILE" -s "$REPORT_SIG_FILE" > /dev/null 2>&1 - REPORT=$(cat "$REPORT_FILE") - REPORTSIG=$(cat "$REPORT_SIG_FILE" | tr -d '\r') - EXECUTE=$(jq -nc --argjson query_response "$(jq -nc --argjson msg "$QUERY_RESPONSE_MSG" \ - --argjson attestation "$(jq -nc --argjson report "$(jq -nc --argjson report "$REPORT" \ - --arg reportsig "$REPORTSIG" '$ARGS.named')" '$ARGS.named')" '$ARGS.named')" \ - '{query_response: $query_response}') - fi - - echo "Submitting update..." - echo $EXECUTE | jq '.' - $CMD tx wasm execute "$CONTRACT" "$EXECUTE" --from "$USER_ADDR" $TXFLAG -y - print_success "Query balance executed" -} - - -# Main loop -( echo "$SUBSCRIBE_TRANSFER"; echo "$SUBSCRIBE_QUERY"; cat) | websocat $WSURL | while read -r msg; do - EVENTS=$(process_json "$msg") - - if [[ "$EVENTS" == "JSON parsing failed" ]]; then - print_error "Failed to parse JSON message. Skipping this message." - continue - fi - - if [[ -z "$EVENTS" || "$EVENTS" == "No relevant wasm events found" ]]; then - if [[ "$msg" == *'"result":{}'* ]]; then - print_success "Subscribed to $msg" - print_message "$YELLOW" "Waiting for event..." - else - print_message "$YELLOW" "No relevant events found in message. Waiting for next event..." - fi - continue - fi - - if echo "$EVENTS" | grep -q 'wasm-transfer'; then - handle_wasm_transfer - elif echo "$EVENTS" | grep -q 'wasm-query_balance'; then - handle_wasm_query_balance "$msg" - fi - - print_message "$YELLOW" "Waiting for next event..." -done \ No newline at end of file diff --git a/apps/transfers/scripts/start.sh b/apps/transfers/scripts/start.sh deleted file mode 100755 index 278a1df..0000000 --- a/apps/transfers/scripts/start.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -DIR_QUARTZ=${ROOT:-$(git rev-parse --show-toplevel)} -DIR_QUARTZ_APP="$DIR_QUARTZ/apps/transfers" -DIR_QUARTZ_ENCLAVE="$DIR_QUARTZ_APP/enclave" -DIR_QUARTZ_TM_PROVER="$DIR_QUARTZ/utils/tm-prover" - -NODE_URL=${NODE_URL:-127.0.0.1:26657} -CMD="wasmd --node http://$NODE_URL" - -# Use the QUARTZ_PORT environment variable if set, otherwise default to 11090 -QUARTZ_PORT="${QUARTZ_PORT:-11090}" - -echo "--------------------------------------------------------" -echo "QUARTZ_PORT is set to: $QUARTZ_PORT" -echo "set trusted hash" - -cd "$DIR_QUARTZ_TM_PROVER" -CHAIN_STATUS=$($CMD status) -TRUSTED_HASH=$(echo "$CHAIN_STATUS" | jq -r .SyncInfo.latest_block_hash) -TRUSTED_HEIGHT=$(echo "$CHAIN_STATUS" | jq -r .SyncInfo.latest_block_height) -echo "... $TRUSTED_HASH" - -cd ""$DIR_QUARTZ_APP"" -echo "$TRUSTED_HASH" > trusted.hash -echo "$TRUSTED_HEIGHT" > trusted.height - -if [ -n "$MOCK_SGX" ]; then - echo "MOCK_SGX is set. Running enclave without gramine..." - cd $DIR_QUARTZ - ./target/release/quartz-app-transfers-enclave --chain-id "testing" --trusted-height "$TRUSTED_HEIGHT" --trusted-hash "$TRUSTED_HASH" - exit -fi - - -echo "--------------------------------------------------------" -echo "configure gramine" -cd "$DIR_QUARTZ_ENCLAVE" - -echo "... gen priv key if it doesnt exist" -gramine-sgx-gen-private-key > /dev/null 2>&1 || : # may fail - -echo "... create manifest" -gramine-manifest \ - -Dlog_level="error" \ - -Dhome="${HOME}" \ - -Denclave_dir="$(pwd)" \ - -Denclave_executable="$(pwd)/target/release/quartz-app-transfers-enclave" \ - -Darch_libdir="/lib/$(gcc -dumpmachine)" \ - -Dra_type="epid" \ - -Dra_client_spid="51CAF5A48B450D624AEFE3286D314894" \ - -Dra_client_linkable=1 \ - -Dtrusted_height="${TRUSTED_HEIGHT}" \ - -Dtrusted_hash="${TRUSTED_HASH}" \ - -Dgramine_port="${QUARTZ_PORT}" \ - quartz.manifest.template quartz.manifest - -echo "... sign manifest" -gramine-sgx-sign --manifest quartz.manifest --output quartz.manifest.sgx - - -echo "--------------------------------------------------------" -echo "... start gramine" -gramine-sgx ./quartz diff --git a/apps/transfers/scripts/startNeutron.sh b/apps/transfers/scripts/startNeutron.sh deleted file mode 100755 index d923f52..0000000 --- a/apps/transfers/scripts/startNeutron.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash - -# Color definitions -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -MAGENTA='\033[0;35m' -CYAN='\033[0;36m' -BOLD='\033[1m' -NC='\033[0m' # No Color - -# Function to print colored and formatted messages -print_message() { - local color=$1 - local message=$2 - echo -e "${color}${BOLD}${message}${NC}" -} - -# Function to print section headers -print_header() { - local message=$1 - echo -e "\n${MAGENTA}${BOLD}======== $message ========${NC}\n" -} - -# Function to print success messages -print_success() { - local message=$1 - echo -e "${GREEN}${BOLD}✅ $message${NC}" -} - -# Function to print error messages -print_error() { - local message=$1 - echo -e "${RED}${BOLD}❌ Error: $message${NC}" >&2 -} - -# Set up variables -ROOT=${ROOT:-$(git rev-parse --show-toplevel)} -DIR_QUARTZ_APP="$ROOT/apps/transfers" -DIR_QUARTZ_ENCLAVE="$DIR_QUARTZ_APP/enclave" -DIR_QUARTZ_TM_PROVER="$ROOT/utils/tm-prover" - -NODE_URL=${NODE_URL:-127.0.0.1:26657} -CMD="neutrond --node http://$NODE_URL" -QUARTZ_PORT="${QUARTZ_PORT:-11090}" - -print_header "Quartz Setup and Launch" -print_message $CYAN "QUARTZ_PORT is set to: $QUARTZ_PORT" - -print_message $BLUE "Setting trusted hash and height" -CHAIN_STATUS=$($CMD status) -TRUSTED_HASH=$(echo "$CHAIN_STATUS" | jq -r .sync_info.latest_block_hash) -TRUSTED_HEIGHT=$(echo "$CHAIN_STATUS" | jq -r .sync_info.latest_block_height) -print_message $YELLOW "Trusted Hash: $TRUSTED_HASH" -print_message $YELLOW "Trusted Height: $TRUSTED_HEIGHT" - -cd "$DIR_QUARTZ_APP" -echo "$TRUSTED_HASH" > trusted.hash -echo "$TRUSTED_HEIGHT" > trusted.height -print_success "Trusted hash and height saved" - -if [ -n "$MOCK_SGX" ]; then - print_header "Running in MOCK_SGX mode" - cd $DIR_QUARTZ_ENCLAVE - print_message $BLUE "Running enclave without Gramine..." - ./target/release/quartz-app-transfers-enclave --chain-id "test-1" --trusted-height "$TRUSTED_HEIGHT" --trusted-hash "$TRUSTED_HASH" - exit -fi - -print_header "Configuring Gramine" -cd "$DIR_QUARTZ_ENCLAVE" - -print_message $BLUE "Generating private key (if it doesn't exist)" -gramine-sgx-gen-private-key > /dev/null 2>&1 || : - -print_message $BLUE "Creating manifest" -gramine-manifest \ --Dlog_level="error" \ --Dhome="$HOME" \ --Darch_libdir="/lib/$(gcc -dumpmachine)" \ --Dra_type="epid" \ --Dra_client_spid="51CAF5A48B450D624AEFE3286D314894" \ --Dra_client_linkable=1 \ --Dquartz_dir="$(pwd)" \ --Dtrusted_height="$TRUSTED_HEIGHT" \ --Dtrusted_hash="$TRUSTED_HASH" \ --Dgramine_port="$QUARTZ_PORT" \ -quartz.manifest.template quartz.manifest - -print_message $BLUE "Signing manifest" -gramine-sgx-sign --manifest quartz.manifest --output quartz.manifest.sgx - -print_header "Starting Gramine" -print_message $GREEN "Running Quartz with Gramine-SGX..." -gramine-sgx ./quartz \ No newline at end of file diff --git a/relayer/scripts/relay.sh b/cli/scripts/relay.sh similarity index 100% rename from relayer/scripts/relay.sh rename to cli/scripts/relay.sh diff --git a/cli/src/handler/utils/helpers.rs b/cli/src/handler/utils/helpers.rs index ecebfdf..0a1cb44 100644 --- a/cli/src/handler/utils/helpers.rs +++ b/cli/src/handler/utils/helpers.rs @@ -32,7 +32,7 @@ pub async fn run_relay( mock_sgx: bool, msg: RelayMessage, ) -> Result { - let relayer_path = base_path.join("relayer/scripts/relay.sh"); + let relayer_path = base_path.join("cli/scripts/relay.sh"); let mut bash = Command::new("bash"); let command = bash diff --git a/core/quartz/Cargo.toml b/core/quartz/Cargo.toml index 4f94761..52be002 100644 --- a/core/quartz/Cargo.toml +++ b/core/quartz/Cargo.toml @@ -39,6 +39,5 @@ cw-proof.workspace = true mtcs.workspace = true quartz-cw.workspace = true quartz-proto.workspace = true -quartz-relayer.workspace = true quartz-tee-ra.workspace = true tm-stateless-verifier.workspace = true \ No newline at end of file diff --git a/core/quartz/src/lib.rs b/core/quartz/src/lib.rs index 0c6f857..cb840c8 100644 --- a/core/quartz/src/lib.rs +++ b/core/quartz/src/lib.rs @@ -14,3 +14,4 @@ pub mod attestor; pub mod server; +pub mod types; diff --git a/core/quartz/src/server.rs b/core/quartz/src/server.rs index f51d48b..ee3ebd7 100644 --- a/core/quartz/src/server.rs +++ b/core/quartz/src/server.rs @@ -22,7 +22,6 @@ use quartz_proto::quartz::{ SessionSetPubKeyRequest as RawSessionSetPubKeyRequest, SessionSetPubKeyResponse as RawSessionSetPubKeyResponse, }; -use quartz_relayer::types::{InstantiateResponse, SessionCreateResponse, SessionSetPubKeyResponse}; use rand::Rng; use serde::{Deserialize, Serialize}; use tendermint_light_client::{ @@ -32,7 +31,10 @@ use tendermint_light_client::{ use tm_stateless_verifier::make_provider; use tonic::{Request, Response, Result as TonicResult, Status}; -use crate::attestor::Attestor; +use crate::{ + attestor::Attestor, + types::{InstantiateResponse, SessionCreateResponse, SessionSetPubKeyResponse}, +}; #[derive(Clone, Debug)] pub struct CoreService { diff --git a/relayer/src/types.rs b/core/quartz/src/types.rs similarity index 100% rename from relayer/src/types.rs rename to core/quartz/src/types.rs diff --git a/relayer/Cargo.toml b/relayer/Cargo.toml deleted file mode 100644 index 58368a6..0000000 --- a/relayer/Cargo.toml +++ /dev/null @@ -1,38 +0,0 @@ -[package] -name = "quartz-relayer" -version.workspace = true -authors.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -repository.workspace = true -keywords = ["blockchain", "cosmos", "tendermint", "cycles", "quartz"] -readme = "README.md" - -[features] -mock-sgx = ["quartz-cw/mock-sgx"] - -[dependencies] -# external -clap.workspace = true -displaydoc.workspace = true -ecies.workspace = true -k256.workspace = true -serde.workspace = true -serde_json.workspace = true -subtle-encoding.workspace = true -tempfile.workspace = true -thiserror.workspace = true -tonic.workspace = true -tokio.workspace = true - -# cosmos -cosmos-sdk-proto.workspace = true -cosmrs = { workspace = true, features = ["cosmwasm"] } -cosmwasm-std.workspace = true -tendermint = { workspace = true, features = ["secp256k1"] } - -# quartz -quartz-cw.workspace = true -quartz-tee-ra.workspace = true -quartz-proto.workspace = true diff --git a/relayer/src/cli.rs b/relayer/src/cli.rs deleted file mode 100644 index c1160a8..0000000 --- a/relayer/src/cli.rs +++ /dev/null @@ -1,53 +0,0 @@ -use std::path::PathBuf; - -use clap::Parser; -use cosmrs::{tendermint::chain::Id, AccountId}; -use displaydoc::Display; -use subtle_encoding::{bech32::decode as bech32_decode, Error as Bech32DecodeError}; -use thiserror::Error; -use tonic::transport::Endpoint; - -#[derive(Display, Error, Debug)] -pub enum AddressError { - /// Address is not bech32 encoded - NotBech32Encoded(#[source] Bech32DecodeError), - /// Human readable part mismatch (expected `wasm`, found {0}) - HumanReadableMismatch(String), -} - -#[derive(Debug, Parser)] -#[command(author, version, about, long_about = None)] -pub struct Cli { - /// RPC server address - #[clap(long, default_value = "http://localhost:11090")] - pub enclave_addr: Endpoint, - - /// Blockchain node gRPC URL - #[arg(short, long, default_value = "tcp://127.0.0.1:9090")] - pub node_addr: Endpoint, - - /// Chain-id of MTCS chain - #[arg(long, default_value = "testing")] - pub chain_id: Id, - - /// Smart contract address - #[arg(short, long, value_parser = wasm_address)] - pub contract: AccountId, - - /// Path to TSP secret key file - #[arg(short, long)] - pub secret: PathBuf, - - /// Gas limit for the set-offs submission transaction - #[arg(long, default_value = "900000000")] - pub gas_limit: u64, -} - -fn wasm_address(address_str: &str) -> Result { - let (hr, _) = bech32_decode(address_str).map_err(AddressError::NotBech32Encoded)?; - if hr != "wasm" { - return Err(AddressError::HumanReadableMismatch(hr)); - } - - Ok(address_str.parse().unwrap()) -} diff --git a/relayer/src/lib.rs b/relayer/src/lib.rs deleted file mode 100644 index cd40856..0000000 --- a/relayer/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod types; diff --git a/relayer/src/main.rs b/relayer/src/main.rs deleted file mode 100644 index b4ee669..0000000 --- a/relayer/src/main.rs +++ /dev/null @@ -1,189 +0,0 @@ -mod cli; - -use std::{error::Error, fs::File, io::Read}; - -use clap::Parser; -use cosmos_sdk_proto::{ - cosmos::{ - auth::v1beta1::{ - query_client::QueryClient as AuthQueryClient, BaseAccount as RawBaseAccount, - QueryAccountRequest, - }, - tx::v1beta1::{service_client::ServiceClient, BroadcastMode, BroadcastTxRequest}, - }, - traits::Message, - Any, -}; -use cosmrs::{ - auth::BaseAccount, - cosmwasm::MsgExecuteContract, - crypto::secp256k1::{SigningKey, VerifyingKey}, - tendermint::{account::Id as TmAccountId, chain::Id as TmChainId}, - tx, - tx::{Fee, Msg, SignDoc, SignerInfo}, - AccountId, Coin, -}; -use ecies::{PublicKey, SecretKey}; -use quartz_cw::msg::{ - execute::attested::Attested, - instantiate::{CoreInstantiate, RawInstantiate}, - InstantiateMsg, -}; -use quartz_proto::quartz::{core_client::CoreClient, InstantiateRequest}; -use quartz_relayer::types::InstantiateResponse; -use subtle_encoding::base64; -use tendermint::public_key::Secp256k1 as TmPublicKey; - -use crate::cli::Cli; - -#[tokio::main] -async fn main() -> Result<(), Box> { - let args = Cli::parse(); - - let mut client = CoreClient::connect(args.enclave_addr.uri().to_string()).await?; - let response = client.instantiate(InstantiateRequest {}).await?; - let response: InstantiateResponse = response.into_inner().try_into()?; - - #[cfg(feature = "mock-sgx")] - let attestation = { - use quartz_cw::msg::execute::attested::MockAttestation; - - MockAttestation::default() - }; - - #[cfg(not(feature = "mock-sgx"))] - let attestation = { - use quartz_cw::msg::execute::attested::EpidAttestation; - use quartz_tee_ra::IASReport; - - let ias_report = gramine_sgx_ias_report(response.quote())?; - println!( - "{}", - serde_json::to_string(&ias_report).expect("infallible serializer") - ); - let ias_report: IASReport = serde_json::from_str(&ias_report.to_string())?; - EpidAttestation::new(ias_report) - }; - - let cw_instantiate_msg = Attested::new( - CoreInstantiate::new(response.into_message().into_tuple().0), - attestation, - ); - - // Read the TSP secret - let secret = { - let mut secret = Vec::new(); - let mut tsp_sk_file = File::open(args.secret)?; - tsp_sk_file.read_to_end(secret.as_mut())?; - let secret = base64::decode(secret).unwrap(); - SecretKey::parse_slice(&secret).unwrap() - }; - let tm_pubkey = { - let pubkey = PublicKey::from_secret_key(&secret); - TmPublicKey::from_sec1_bytes(&pubkey.serialize()).unwrap() - }; - let sender = { - let tm_key = TmAccountId::from(tm_pubkey); - AccountId::new("wasm", tm_key.as_bytes()).unwrap() - }; - - let msgs = vec![MsgExecuteContract { - sender: sender.clone(), - contract: args.contract.clone(), - msg: serde_json::to_string::(&InstantiateMsg(cw_instantiate_msg).into())? - .into_bytes(), - funds: vec![], - } - .to_any() - .unwrap()]; - - let account = account_info(args.node_addr.uri().clone(), sender.clone()).await?; - let amount = Coin { - amount: 0u128, - denom: "cosm".parse()?, - }; - let tx_bytes = tx_bytes( - &secret, - amount, - args.gas_limit, - tm_pubkey, - msgs, - account.sequence, - account.account_number, - &args.chain_id, - )?; - - send_tx(args.node_addr.uri().clone(), tx_bytes).await?; - - Ok(()) -} - -pub async fn account_info( - node: impl ToString, - address: impl ToString, -) -> Result> { - let mut client = AuthQueryClient::connect(node.to_string()).await?; - let request = QueryAccountRequest { - address: address.to_string(), - }; - let response = client.account(request).await?; - let response = RawBaseAccount::decode(response.into_inner().account.unwrap().value.as_slice())?; - let account = BaseAccount::try_from(response)?; - Ok(account) -} - -#[allow(clippy::too_many_arguments)] -pub fn tx_bytes( - secret: &SecretKey, - amount: Coin, - gas: u64, - tm_pubkey: VerifyingKey, - msgs: Vec, - sequence_number: u64, - account_number: u64, - chain_id: &TmChainId, -) -> Result, Box> { - let tx_body = tx::Body::new(msgs, "", 0u16); - let signer_info = SignerInfo::single_direct(Some(tm_pubkey.into()), sequence_number); - let auth_info = signer_info.auth_info(Fee::from_amount_and_gas(amount, gas)); - let sign_doc = SignDoc::new(&tx_body, &auth_info, chain_id, account_number)?; - let tx_signed = sign_doc.sign(&SigningKey::from_slice(&secret.serialize()).unwrap())?; - Ok(tx_signed.to_bytes()?) -} - -pub async fn send_tx(node: impl ToString, tx_bytes: Vec) -> Result<(), Box> { - let mut client = ServiceClient::connect(node.to_string()).await?; - let request = BroadcastTxRequest { - tx_bytes, - mode: BroadcastMode::Block.into(), - }; - let _response = client.broadcast_tx(request).await?; - Ok(()) -} -#[cfg(not(feature = "mock-sgx"))] -fn gramine_sgx_ias_report(quote: &[u8]) -> Result> { - use std::{fs::read_to_string, io::Write, process::Command}; - - let dir = tempfile::tempdir()?; - let quote_file_path = dir.path().join("test.quote"); - let datareport_file_path = dir.path().join("datareport"); - let datareportsig_file_path = dir.path().join("datareportsig"); - - let mut quote_file = File::create(quote_file_path.clone())?; - quote_file.write_all(quote)?; - - let gramine_sgx_ias_request_output = Command::new("gramine-sgx-ias-request") - .arg("report") - .args(["-g", "51CAF5A48B450D624AEFE3286D314894"]) - .args(["-k", "669244b3e6364b5888289a11d2a1726d"]) - .args(["-q", "e_file_path.display().to_string()]) - .args(["-r", &datareport_file_path.display().to_string()]) - .args(["-s", &datareportsig_file_path.display().to_string()]) - .output()?; - println!("{gramine_sgx_ias_request_output:?}"); - - let report = read_to_string(datareport_file_path)?; - let report_sig = read_to_string(datareportsig_file_path)?; - let ias_report = serde_json::json!({"report": report, "reportsig": report_sig}); - Ok(ias_report) -} diff --git a/scripts/build-contract.sh b/scripts/build-contract.sh deleted file mode 100755 index 3994056..0000000 --- a/scripts/build-contract.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# Build and optimize the contract to output a WASM binary that can be deployed to a CosmWasm chain. - -set -euo pipefail - -usage() { - echo "Usage: $0 CARGO_PKG_DIR" - echo "Example: $0 apps/mtcs/contracts/cw-tee-mtcs/" - exit 1 -} - -if [ $# -ne 1 ]; then - echo "❌ Error: Missing CARGO_PKG_DIR parameter. Please check if all parameters were specified." - usage -fi - -if ! [ -f "$1/Cargo.toml" ]; then - echo "❌ Error: Cannot find 'Cargo.toml' in current directory. Make sure the contract's source directory is $1" - usage -fi - -ROOT=${ROOT:-$(pwd)} -CARGO_PKG_DIR="$1" - -cd "$CARGO_PKG_DIR" - -echo "👷 Building and optimizing the contract..." -echo "===========================================" - -docker run --rm -v "$ROOT":/code \ - --mount type=volume,source="$(basename "$(pwd)")_cache",target="/code/target" \ - --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.15.0 "$CARGO_PKG_DIR" - -echo "" -echo "🎉 Contract build and optimization completed successfully!" diff --git a/scripts/deploy-contract.sh b/scripts/deploy-contract.sh deleted file mode 100755 index c720f20..0000000 --- a/scripts/deploy-contract.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -# Deploy the specified contract's `WASM_BIN` to the chain specified by `CHAIN_ID` using the `USER_ADDR` account. - -set -eo pipefail - -usage() { - echo "Usage: $0 WASM_BIN [COUNT]" - echo "Example: $0 artifacts/cofi_karma_game.wasm" - exit 1 -} - -if [ -z "$1" ]; then - echo "❌ Error: Missing WASM_BIN parameter. Please check if all parameters were specified." - usage -fi - -if [ "$#" -gt 9 ]; then - echo "❌ Error: Incorrect number of parameters." - usage -fi - -USER_ADDR=${USER_ADDR:-$(wasmd keys show -a admin)} -WASM_BIN="$1" -CHAIN_ID=${CHAIN_ID:-testing} -NODE_URL=${NODE_URL:-127.0.0.1:26657} -LABEL=${LABEL:-bisenzone-mvp} -COUNT=${COUNT:-0} -INSTANTIATE_MSG=${INSTANTIATE_MSG:-"{}"} - -TXFLAG="--chain-id ${CHAIN_ID} --gas-prices 0.0025ucosm --gas auto --gas-adjustment 1.3" - -CMD="wasmd --node http://$NODE_URL" - -echo "🚀 Deploying WASM contract '${WASM_BIN}' on chain '${CHAIN_ID}' using account '${USER_ADDR}'..." -echo "====================================================================" - -RES=$($CMD tx wasm store "$WASM_BIN" --from "$USER_ADDR" $TXFLAG -y --output json) -TX_HASH=$(echo $RES | jq -r '.["txhash"]') - -while ! $CMD query tx $TX_HASH &> /dev/null; do - echo "... 🕐 waiting for contract to deploy" - sleep 1 -done - -RES=$($CMD query tx "$TX_HASH" --output json) -CODE_ID=$(echo $RES | jq -r '.logs[0].events[1].attributes[1].value') - -echo "" -echo "🚀 Instantiating contract with the following parameters:" -echo "--------------------------------------------------------" -echo "Label: ${LABEL}" -echo "--------------------------------------------------------" - -RES=$($CMD tx wasm instantiate "$CODE_ID" "$INSTANTIATE_MSG" --from "$USER_ADDR" --label $LABEL $TXFLAG -y --no-admin --output json) -TX_HASH=$(echo $RES | jq -r '.["txhash"]') - - -echo "" -while ! $CMD query tx $TX_HASH &> /dev/null; do - echo "... 🕐 waiting for contract to be queryable" - sleep 1 -done - -RES=$($CMD query wasm list-contract-by-code "$CODE_ID" --output json) -CONTRACT=$(echo $RES | jq -r '.contracts[0]') - -echo "🚀 Successfully deployed and instantiated contract!" -echo "🔗 Chain ID: ${CHAIN_ID}" -echo "🆔 Code ID: ${CODE_ID}" -echo "📌 Contract Address: ${CONTRACT}" -echo "🔑 Contract Key: ${KEY}" -echo "🔖 Contract Label: ${LABEL}" diff --git a/scripts/init-node.sh b/scripts/init-node.sh deleted file mode 100755 index 445b2fd..0000000 --- a/scripts/init-node.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Initialize a wasmd node that can host the MVP CosmWasm smart contract. -# Also creates a validator account and adds default genesis accounts with sufficient tokens for testing (stake and fees) - -set -euo pipefail - -ADMIN=${ADMIN:-$(wasmd keys show -a admin)} -ALICE=${ALICE:-$(wasmd keys show -a alice)} -BOB=${BOB:-$(wasmd keys show -a bob)} -CHARLIE=${CHARLIE:-$(wasmd keys show -a charlie)} - -echo "Remove old docker volume (if it exists)..." -docker volume rm -f wasmd_data - - -echo "" -echo "Setup wasmd (with validator and default genesis accounts)..." -docker run --rm -it \ - --mount type=volume,source=wasmd_data,target=/root \ - --name wasmd \ - cosmwasm/wasmd:v0.44.0 \ - /bin/sh -c "sed -i 's/1000000000/12000000000000/g' /opt/setup_wasmd.sh; - /opt/setup_wasmd.sh "$ADMIN" "$ALICE" "$BOB" "$CHARLIE";" \ - - diff --git a/scripts/keygen.sh b/scripts/keygen.sh deleted file mode 100755 index 00a7789..0000000 --- a/scripts/keygen.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# Generate keys for testing. - -set -euo pipefail - -wasmd keys add admin -wasmd keys add alice -wasmd keys add bob -wasmd keys add charlie diff --git a/scripts/run-node.sh b/scripts/run-node.sh deleted file mode 100755 index 0e7680c..0000000 --- a/scripts/run-node.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Run a previously initialized wasmd node. - -set -uo pipefail - -docker volume inspect wasmd_data >/dev/null 2>&1 -RESULT=$? -if [ $RESULT -eq 1 ]; then - echo "wasmd isn't initialized - run 'init-node.sh' first" - exit 1 -fi - -echo "Starting wasmd node" - -docker run --rm -it -p 26657:26657 -p 26656:26656 -p 1317:1317 -p 9090:9090 \ - --mount type=volume,source=wasmd_data,target=/root \ - --name wasmd \ - cosmwasm/wasmd:v0.44.0 \ - /bin/sh -c "sed -i 's/enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' /root/.wasmd/config/app.toml; - sed -i 's/address = \"tcp:\/\/localhost:1317\"/address = \"tcp:\/\/0.0.0.0:1317\"/g' /root/.wasmd/config/app.toml; - sed -i 's/address = \"localhost:909/address = \"0.0.0.0:909/g' /root/.wasmd/config/app.toml; - sed -i 's/enable = false/enable = true/g' /root/.wasmd/config/app.toml; - sed -i 's/rpc-max-body-bytes = 1000000$/rpc-max-body-bytes = 1000000000/g' /root/.wasmd/config/app.toml; - sed -i 's/laddr = \"tcp:\/\/127.0.0.1:26657\"/laddr = \"tcp:\/\/0.0.0.0:26657\"/g' /root/.wasmd/config/config.toml; - sed -i 's/cors_allowed_origins = \[\]/cors_allowed_origins = \[\"*\"\]/g' /root/.wasmd/config/config.toml; - sed -i 's/max_body_bytes = 1000000$/max_body_bytes = 1000000000/g' /root/.wasmd/config/config.toml; - sed -i 's/max_tx_bytes = 1048576$/max_tx_bytes = 104857600/g' /root/.wasmd/config/config.toml; - /opt/run_wasmd.sh" diff --git a/utils/mtcs-intent/.gitignore b/utils/mtcs-intent/.gitignore deleted file mode 100644 index d8c9f3f..0000000 --- a/utils/mtcs-intent/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.pk -*.sk - diff --git a/utils/mtcs-intent/Cargo.toml b/utils/mtcs-intent/Cargo.toml deleted file mode 100644 index 161838e..0000000 --- a/utils/mtcs-intent/Cargo.toml +++ /dev/null @@ -1,26 +0,0 @@ -[package] -name = "mtcs-intent" -version.workspace = true -authors.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -repository.workspace = true -keywords = ["blockchain", "cosmos", "tendermint", "cycles", "quartz"] -readme = "README.md" - -[dependencies] -# external -bip32.workspace = true -clap.workspace = true -ecies.workspace = true -hex.workspace = true -k256.workspace = true -rand = { workspace = true, default-features = true } -serde.workspace = true -serde_json.workspace = true -sha2.workspace = true - -# cosmos -cosmrs.workspace = true -cosmwasm-std.workspace = true diff --git a/utils/mtcs-intent/src/main.rs b/utils/mtcs-intent/src/main.rs deleted file mode 100644 index b976d99..0000000 --- a/utils/mtcs-intent/src/main.rs +++ /dev/null @@ -1,325 +0,0 @@ -#![forbid(unsafe_code)] -#![warn( - clippy::checked_conversions, - clippy::panic, - clippy::panic_in_result_fn, - clippy::unwrap_used, - trivial_casts, - trivial_numeric_casts, - rust_2018_idioms, - unused_lifetimes, - unused_import_braces, - unused_qualifications -)] - -use std::{ - error::Error, - fs::{read_to_string, File}, - io::Write, - path::PathBuf, - str::FromStr, -}; - -use bip32::XPrv; -use clap::{Parser, Subcommand}; -use cosmrs::{tendermint::account::Id as TmAccountId, AccountId}; -use cosmwasm_std::HexBinary; -use ecies::{decrypt, encrypt}; -use k256::{ - ecdsa::{SigningKey, VerifyingKey}, - elliptic_curve::generic_array::GenericArray, -}; -use rand::Rng; -use serde::{Deserialize, Serialize}; -use sha2::{Digest, Sha256}; - -#[derive(Debug, Parser)] -#[command(author, version, about, long_about = None)] -struct Cli { - #[command(subcommand)] - pub command: Command, -} - -#[derive(Debug, Subcommand)] -#[allow(clippy::large_enum_variant)] -enum Command { - KeyGen { - #[clap(long, default_value = "epoch.pk")] - pk_file: PathBuf, - #[clap(long, default_value = "epoch.sk")] - sk_file: PathBuf, - }, - EncryptObligation { - #[clap(long, value_parser = parse_obligation_json)] - obligation: Obligation, - #[clap(long, default_value = "epoch.pk")] - pk_file: PathBuf, - }, - DecryptObligation { - #[clap(long)] - obligation: String, - #[clap(long, default_value = "epoch.sk")] - sk_file: PathBuf, - }, - EncryptSetoff { - #[clap(long, value_parser = parse_setoff_json)] - setoff: Setoff, - #[clap(long)] - obligation_digest: String, - #[clap(long, default_value = "user.pk")] - pk_file: PathBuf, - }, - DecryptSetoff { - #[clap(long)] - setoff: String, - #[clap(long, default_value = "user.sk")] - sk_file: PathBuf, - }, - PrintAddress { - #[clap(long)] - pk: String, - }, - PrintAddressFromPriv { - #[clap(long)] - sk_str: String, - }, -} - -fn parse_obligation_json(s: &str) -> Result { - let raw_obligation: RawObligation = serde_json::from_str(s).map_err(|e| e.to_string())?; - raw_obligation.try_into() -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -struct RawObligation { - debtor: HexBinary, - creditor: HexBinary, - amount: u64, - #[serde(default)] - salt: HexBinary, -} - -#[derive(Clone, Debug)] -struct Obligation { - debtor: VerifyingKey, - creditor: VerifyingKey, - amount: u64, - salt: [u8; 64], -} - -impl TryFrom for Obligation { - type Error = String; - - fn try_from(raw_obligation: RawObligation) -> Result { - let mut salt = [0u8; 64]; - rand::thread_rng().fill(&mut salt[..]); - - Ok(Self { - debtor: VerifyingKey::from_sec1_bytes(raw_obligation.debtor.as_slice()) - .map_err(|e| e.to_string())?, - creditor: VerifyingKey::from_sec1_bytes(raw_obligation.creditor.as_slice()) - .map_err(|e| e.to_string())?, - amount: raw_obligation.amount, - salt, - }) - } -} - -impl From for RawObligation { - fn from(obligation: Obligation) -> Self { - Self { - debtor: obligation.debtor.to_sec1_bytes().into_vec().into(), - creditor: obligation.creditor.to_sec1_bytes().into_vec().into(), - amount: obligation.amount, - salt: obligation.salt.into(), - } - } -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -struct EncryptedIntent { - ciphertext: HexBinary, - digest: HexBinary, -} - -fn parse_setoff_json(s: &str) -> Result { - let raw_setoff: RawSetoff = serde_json::from_str(s).map_err(|e| e.to_string())?; - raw_setoff.try_into() -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -struct RawSetoff { - debtor: HexBinary, - creditor: HexBinary, - amount: u64, - #[serde(default)] - salt: HexBinary, -} - -#[derive(Clone, Debug)] -struct Setoff { - debtor: VerifyingKey, - creditor: VerifyingKey, - amount: u64, - salt: [u8; 64], -} - -impl TryFrom for Setoff { - type Error = String; - - fn try_from(raw_setoff: RawSetoff) -> Result { - let mut salt = [0u8; 64]; - rand::thread_rng().fill(&mut salt[..]); - - Ok(Self { - debtor: VerifyingKey::from_sec1_bytes(raw_setoff.debtor.as_slice()) - .map_err(|e| e.to_string())?, - creditor: VerifyingKey::from_sec1_bytes(raw_setoff.creditor.as_slice()) - .map_err(|e| e.to_string())?, - amount: raw_setoff.amount, - salt, - }) - } -} - -impl From for RawSetoff { - fn from(setoff: Setoff) -> Self { - Self { - debtor: setoff.debtor.to_sec1_bytes().into_vec().into(), - creditor: setoff.creditor.to_sec1_bytes().into_vec().into(), - amount: setoff.amount, - salt: setoff.salt.into(), - } - } -} - -fn main() -> Result<(), Box> { - let args = Cli::parse(); - - match args.command { - Command::KeyGen { pk_file, sk_file } => { - let sk = SigningKey::random(&mut rand::thread_rng()); - let pk = sk.verifying_key(); - - let mut sk_file = File::create(sk_file)?; - let sk = hex::encode(sk.to_bytes()); - sk_file.write_all(sk.as_bytes())?; - - let mut pk_file = File::create(pk_file)?; - let pk = hex::encode(pk.to_sec1_bytes()); - pk_file.write_all(pk.as_bytes())?; - } - Command::EncryptObligation { - obligation, - pk_file, - } => { - let epoch_pk = { - let pk_str = read_to_string(pk_file)?; - hex::decode(pk_str)? - }; - let obligation_ser = serde_json::to_string(&RawObligation::from(obligation)) - .expect("infallible serializer"); - - let ciphertext = - encrypt(&epoch_pk, obligation_ser.as_bytes()).map_err(|e| e.to_string())?; - - let digest: [u8; 32] = { - let mut hasher = Sha256::new(); - hasher.update(obligation_ser); - hasher.finalize().into() - }; - - let obligation_enc = EncryptedIntent { - ciphertext: ciphertext.into(), - digest: digest.into(), - }; - - println!( - "{}", - serde_json::to_string(&obligation_enc).expect("infallible serializer") - ); - } - Command::DecryptObligation { - obligation, - sk_file, - } => { - let sk = { - let sk_str = read_to_string(sk_file)?; - let sk = hex::decode(sk_str).expect(""); - SigningKey::from_bytes(GenericArray::from_slice(&sk))? - }; - - let ciphertext = hex::decode(obligation).unwrap(); - - let obligation = { - let o = decrypt(&sk.to_bytes(), &ciphertext).unwrap(); - serde_json::from_slice::(&o)? - }; - println!("{obligation:?}"); - } - Command::EncryptSetoff { - setoff, - obligation_digest, - pk_file, - } => { - let pk = { - let pk_str = read_to_string(pk_file)?; - hex::decode(pk_str)? - }; - let setoff_ser = - serde_json::to_string(&RawSetoff::from(setoff)).expect("infallible serializer"); - - let ciphertext = encrypt(&pk, setoff_ser.as_bytes()).map_err(|e| e.to_string())?; - - let digest: [u8; 32] = { - let d = hex::decode(obligation_digest)?; - d.try_into().unwrap() - }; - - let setoff_enc = EncryptedIntent { - ciphertext: ciphertext.into(), - digest: digest.into(), - }; - - println!( - "{}", - serde_json::to_string(&setoff_enc).expect("infallible serializer") - ); - } - Command::DecryptSetoff { setoff, sk_file } => { - let sk = { - let sk_str = read_to_string(sk_file)?; - let sk = hex::decode(sk_str).expect(""); - SigningKey::from_bytes(GenericArray::from_slice(&sk))? - }; - - let ciphertext = hex::decode(setoff).unwrap(); - - let setoff = decrypt(&sk.to_bytes(), &ciphertext).unwrap(); - serde_json::from_slice(&setoff)?; - } - Command::PrintAddress { pk } => { - let pk = { - let pk = hex::decode(pk)?; - VerifyingKey::from_sec1_bytes(&pk)? - }; - let tm_pk = TmAccountId::from(pk); - println!("{}", AccountId::new("wasm", tm_pk.as_bytes()).unwrap()); - } - Command::PrintAddressFromPriv { sk_str } => { - let sk = XPrv::from_str(&sk_str).unwrap(); - - let pk_b = sk.public_key().public_key().to_sec1_bytes(); - let pk = VerifyingKey::from_sec1_bytes(&pk_b)?; - - let pk_bytes = hex::encode(pk.to_sec1_bytes()); - - println!("{}", pk_bytes); - - let tm_pk = TmAccountId::from(pk); - println!("{}", AccountId::new("wasm", tm_pk.as_bytes()).unwrap()); - } - } - - Ok(()) -}