From c3cbd80d209529b9fcb927529780ba3efebd54fd Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Tue, 9 Jul 2024 17:41:33 -0700 Subject: [PATCH 01/15] feat: shared quartz_common crate + enclave server macro --- .gitignore | 1 + Cargo.lock | 21 +- Cargo.toml | 4 +- apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock | 3356 ++++++++++++++-- apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml | 2 +- .../contracts/cw-tee-mtcs/src/contract.rs | 4 +- apps/mtcs/contracts/cw-tee-mtcs/src/error.rs | 2 +- apps/mtcs/contracts/cw-tee-mtcs/src/msg.rs | 4 +- apps/mtcs/contracts/cw-tee-mtcs/src/state.rs | 2 +- apps/mtcs/enclave/Cargo.toml | 4 +- apps/mtcs/enclave/src/main.rs | 57 +- apps/mtcs/enclave/src/mtcs_server.rs | 3 +- apps/transfers/contracts/Cargo.lock | 3381 +++++++++++++++-- apps/transfers/contracts/Cargo.toml | 2 +- apps/transfers/contracts/src/contract.rs | 2 +- apps/transfers/contracts/src/error.rs | 2 +- apps/transfers/contracts/src/msg.rs | 4 +- apps/transfers/enclave/Cargo.lock | 135 +- apps/transfers/enclave/Cargo.toml | 4 +- apps/transfers/enclave/src/main.rs | 59 +- .../transfers/enclave/src/transfers_server.rs | 11 +- core/quartz-common/Cargo.toml | 20 + core/quartz-common/src/cli.rs | 52 + core/quartz-common/src/lib.rs | 7 + core/quartz-common/src/quartz_macro.rs | 61 + core/quartz/Cargo.toml | 1 - 26 files changed, 6373 insertions(+), 828 deletions(-) create mode 100644 core/quartz-common/Cargo.toml create mode 100644 core/quartz-common/src/cli.rs create mode 100644 core/quartz-common/src/lib.rs create mode 100644 core/quartz-common/src/quartz_macro.rs diff --git a/.gitignore b/.gitignore index cb9ef849..ba69bf89 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ .idea/ target/ artifacts/ +.vscode/ \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 9d676116..623eaa8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -762,9 +762,10 @@ dependencies = [ "cw2", "cw20", "cw20-base", + "getrandom", "hex", "k256", - "quartz-cw", + "quartz-common", "schemars", "serde", "serde_json", @@ -1115,9 +1116,7 @@ dependencies = [ "k256", "mtcs", "prost", - "quartz-cw", - "quartz-enclave", - "quartz-proto", + "quartz-common", "schemars", "serde", "serde_json", @@ -2409,6 +2408,19 @@ dependencies = [ "prost", ] +[[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" @@ -2433,7 +2445,6 @@ dependencies = [ "cosmrs", "cosmwasm-std", "cw-proof", - "cw-tee-mtcs", "cycles-sync", "ecies", "hex", diff --git a/Cargo.toml b/Cargo.toml index 0414947b..fb53c040 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ resolver = "2" members = [ "apps/mtcs/enclave", "core/light-client-proofs/*", - "core/quartz", + "core/quartz", "core/quartz-common", "cosmwasm/packages/*", "utils/*", ] @@ -75,8 +75,10 @@ cw-proof = { path = "core/light-client-proofs/cw-proof", default-features = fals cw-tee-mtcs = { path = "apps/mtcs/contracts/cw-tee-mtcs", default-features = false } cycles-sync = { path = "utils/cycles-sync", default-features = false } mtcs = { git = "ssh://git@github.com/informalsystems/mtcs.git", default-features = false } +quartz-common = { path = "core/quartz-common"} quartz-cw = { path = "cosmwasm/packages/quartz-cw", default-features = false } quartz-proto = { path = "core/quartz-proto", default-features = false } quartz-relayer = { path = "relayer", default-features = false } quartz-tee-ra = { path = "cosmwasm/packages/quartz-tee-ra", default-features = false } +quartz-enclave = { path = "core/quartz"} tm-stateless-verifier = { path = "core/light-client-proofs/tm-stateless-verifier", default-features = false } diff --git a/apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock b/apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock index b1d9450f..c3cba7db 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock +++ b/apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock @@ -2,6 +2,56 @@ # 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" @@ -13,12 +63,39 @@ dependencies = [ "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 = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + [[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" @@ -58,24 +135,129 @@ dependencies = [ "syn 2.0.66", ] +[[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.66", +] + +[[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.66", +] + [[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" @@ -88,12 +270,58 @@ 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.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +[[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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", +] + [[package]] name = "block-buffer" version = "0.9.0" @@ -118,6 +346,15 @@ 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" @@ -135,6 +372,9 @@ name = "bytes" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] [[package]] name = "cc" @@ -148,12 +388,148 @@ 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.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +dependencies = [ + "anstyle", + "clap_lex", +] + +[[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.66", +] + +[[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 = "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", + "prost-types", + "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" @@ -207,7 +583,7 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad011ae7447188e26e4a7dbca2fcd0fc186aa21ae5c86df0503ea44c78f9e469" dependencies = [ - "base64", + "base64 0.21.7", "bech32", "bnum", "cosmwasm-crypto", @@ -232,6 +608,33 @@ 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" @@ -254,6 +657,15 @@ dependencies = [ "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" @@ -267,6 +679,19 @@ dependencies = [ "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-multi-test" version = "0.17.0" @@ -286,6 +711,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cw-proof" +version = "0.1.0" +dependencies = [ + "clap", + "cosmrs", + "displaydoc", + "ics23", + "prost", + "serde", + "serde_with", + "tendermint 0.36.0", + "tendermint-rpc", +] + [[package]] name = "cw-storage-plus" version = "1.2.0" @@ -311,7 +751,7 @@ dependencies = [ "getrandom", "hex", "k256", - "quartz-cw", + "quartz-common", "schemars", "serde", "serde_json", @@ -379,6 +819,29 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cycles-sync" +version = "0.1.0" +dependencies = [ + "async-trait", + "bip32", + "clap", + "cosmrs", + "cosmwasm-std", + "displaydoc", + "ecies", + "hex", + "reqwest 0.12.5", + "serde", + "serde_json", + "subtle-encoding", + "thiserror", + "tokio", + "tracing", + "tracing-subscriber", + "uuid", +] + [[package]] name = "darling" version = "0.20.9" @@ -478,6 +941,17 @@ dependencies = [ "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.66", +] + [[package]] name = "digest" version = "0.9.0" @@ -530,6 +1004,47 @@ dependencies = [ "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" @@ -537,7 +1052,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", - "hashbrown", + "hashbrown 0.12.3", "hex", "rand_core 0.6.4", "serde", @@ -570,6 +1085,47 @@ dependencies = [ "zeroize", ] +[[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" @@ -580,24 +1136,109 @@ dependencies = [ "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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdeb3aa5e95cf9aabc17f060cfa0ced7b83f042390760ca53bf09df9968acaa1" +[[package]] +name = "flex-error" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "paste", +] + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[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-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-sink", + "futures-task", + "pin-project-lite", + "pin-utils", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -611,9 +1252,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "js-sys", @@ -622,6 +1263,22 @@ dependencies = [ "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" @@ -633,6 +1290,31 @@ dependencies = [ "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 = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + [[package]] name = "hashbrown" version = "0.12.3" @@ -642,6 +1324,24 @@ 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" @@ -657,6 +1357,15 @@ 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" @@ -667,134 +1376,462 @@ dependencies = [ ] [[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "itertools" -version = "0.11.0" +name = "http" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "either", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "itertools" -version = "0.12.1" +name = "http" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ - "either", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "itoa" -version = "1.0.11" +name = "http-body" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] [[package]] -name = "js-sys" -version = "0.3.69" +name = "http-body" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ - "wasm-bindgen", + "bytes", + "http 1.1.0", ] [[package]] -name = "k256" -version = "0.13.3" +name = "http-body-util" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2 0.10.8", - "signature", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "pin-project-lite", ] [[package]] -name = "lazy_static" -version = "1.5.0" +name = "httparse" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] -name = "libc" -version = "0.2.155" +name = "httpdate" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] -name = "log" -version = "0.4.22" +name = "hyper" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] [[package]] -name = "mc-attestation-verifier" -version = "0.4.3" -source = "git+https://github.com/informalsystems/attestation#ae86e2804abed218f4fd2fd4aec5e39408898cd8" +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ - "der", - "displaydoc", - "hex", - "mc-sgx-core-sys-types", - "mc-sgx-core-types", - "mc-sgx-dcap-types", - "p256", - "serde", - "serde_json", - "subtle", - "x509-cert", + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", ] [[package]] -name = "mc-sgx-core-sys-types" -version = "0.11.0" -source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "serde", - "serde_with", + "futures-util", + "http 0.2.12", + "hyper 0.14.30", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", ] [[package]] -name = "mc-sgx-core-types" -version = "0.11.0" -source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" +name = "hyper-rustls" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" dependencies = [ - "bitflags", - "displaydoc", - "getrandom", - "hex", - "mc-sgx-core-sys-types", - "mc-sgx-util", - "nom", - "rand_core 0.6.4", - "serde", - "subtle", + "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 = "mc-sgx-dcap-sys-types" -version = "0.11.0" -source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "mc-sgx-core-sys-types", + "hyper 0.14.30", + "pin-project-lite", + "tokio", + "tokio-io-timeout", ] [[package]] -name = "mc-sgx-dcap-types" -version = "0.11.0" -source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" +name = "hyper-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" dependencies = [ - "const-oid", + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.4.1", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "ics23" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc3b8be84e7285c73b88effdc3294b552277d6b0ec728ee016c861b7b9a2c19c" +dependencies = [ + "anyhow", + "blake2", + "blake3", + "bytes", + "hex", + "prost", + "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 = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +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.5.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", @@ -814,12 +1851,26 @@ 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.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +[[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" @@ -827,49 +1878,164 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] -name = "nom" -version = "7.1.3" +name = "miniz_oxide" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ - "memchr", - "minimal-lexical", + "adler", ] [[package]] -name = "num-bigint" -version = "0.4.5" +name = "mio" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ - "num-integer", - "num-traits", + "libc", + "wasi", + "windows-sys 0.48.0", ] [[package]] -name = "num-conv" +name = "mtcs" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +source = "git+ssh://git@github.com/informalsystems/mtcs.git#b421d9ef42272b5eb73d9c74a2a5d590d4c20603" dependencies = [ + "displaydoc", + "itertools 0.10.5", + "log", + "mcmf", "num-traits", + "petgraph 0.6.3", + "serde", ] [[package]] -name = "num-traits" -version = "0.2.19" +name = "multimap" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" + +[[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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +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.66", +] + +[[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" @@ -884,426 +2050,1690 @@ 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-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[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.5", +] + +[[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.66", +] + +[[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 = "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.66", +] + +[[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.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" +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", +] + +[[package]] +name = "prost-build" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +dependencies = [ + "bytes", + "heck", + "itertools 0.12.1", + "log", + "multimap", + "once_cell", + "petgraph 0.6.5", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 2.0.66", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "prost-types" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +dependencies = [ + "prost", +] + +[[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", + "cycles-sync", + "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", + "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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +dependencies = [ + "bitflags 2.5.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", + "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", + "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", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.4.1", + "hyper-rustls 0.27.2", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "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", + "tokio", + "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.5.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.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-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.66", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.5.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +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.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +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.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[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.66", +] + +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +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.66", +] + +[[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.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] [[package]] -name = "opaque-debug" -version = "0.3.1" +name = "subtle-ng" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" [[package]] -name = "p256" -version = "0.13.2" +name = "syn" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "ecdsa", - "elliptic-curve", - "primeorder", - "sha2 0.10.8", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] -name = "pem-rfc7468" -version = "0.7.0" +name = "syn" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ - "base64ct", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] -name = "pkcs8" -version = "0.10.2" +name = "sync_wrapper" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "powerfmt" -version = "0.2.0" +name = "sync_wrapper" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" [[package]] -name = "primeorder" -version = "0.13.6" +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ - "elliptic-curve", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] -name = "proc-macro2" -version = "1.0.84" +name = "system-configuration" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "unicode-ident", + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", ] [[package]] -name = "prost" -version = "0.12.6" +name = "system-configuration-sys" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" dependencies = [ - "bytes", - "prost-derive", + "core-foundation-sys", + "libc", ] [[package]] -name = "prost-derive" -version = "0.12.6" +name = "tempfile" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ - "anyhow", - "itertools 0.12.1", - "proc-macro2", - "quote", - "syn 2.0.66", + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", ] [[package]] -name = "quartz-cw" -version = "0.1.0" +name = "tendermint" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f8a10105d0a7c4af0a242e23ed5a12519afe5cc0e68419da441bb5981a6802" dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", + "bytes", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures", "k256", - "quartz-tee-ra", + "num-traits", + "once_cell", + "prost", + "prost-types", + "ripemd", "serde", + "serde_bytes", "serde_json", + "serde_repr", "sha2 0.10.8", - "thiserror", + "signature", + "subtle", + "subtle-encoding", + "tendermint-proto 0.35.0", + "time", + "zeroize", ] [[package]] -name = "quartz-tee-ra" -version = "0.1.0" +name = "tendermint" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b50aae6ec24c3429149ad59b5b8d3374d7804d4c7d6125ceb97cb53907fb68d" 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", + "bytes", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures", + "k256", + "num-traits", + "once_cell", + "prost", + "prost-types", + "ripemd", "serde", + "serde_bytes", "serde_json", + "serde_repr", "sha2 0.10.8", - "thiserror", - "x509-cert", - "x509-parser", + "signature", + "subtle", + "subtle-encoding", + "tendermint-proto 0.36.0", + "time", "zeroize", ] [[package]] -name = "quote" -version = "1.0.36" +name = "tendermint-config" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "e07b383dc8780ebbec04cfb603f3fdaba6ea6663d8dd861425b1ffa7761fe90d" dependencies = [ - "proc-macro2", + "flex-error", + "serde", + "serde_json", + "tendermint 0.36.0", + "toml", + "url", ] [[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" +name = "tendermint-light-client" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "331544139bbcf353acb5f56e733093d8e4bf2522cda0491b4bba7039ef0b944e" dependencies = [ - "getrandom", + "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", + "time", + "tracing", ] [[package]] -name = "rfc6979" -version = "0.4.0" +name = "tendermint-light-client-verifier" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +checksum = "4216e487165e5dbd7af79952eaa0d5f06c5bde861eb76c690acd7f2d2a19395c" dependencies = [ - "hmac", - "subtle", + "derive_more", + "flex-error", + "serde", + "tendermint 0.36.0", + "time", ] [[package]] -name = "ring" -version = "0.17.8" +name = "tendermint-proto" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "ff525d5540a9fc535c38dc0d92a98da3ee36fcdfbda99cecb9f3cce5cd4d41d7" dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys", + "bytes", + "flex-error", + "num-derive", + "num-traits", + "prost", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", ] [[package]] -name = "rusticata-macros" -version = "4.1.0" +name = "tendermint-proto" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +checksum = "46f193d04afde6592c20fd70788a10b8cb3823091c07456db70d8a93f5fb99c1" dependencies = [ - "nom", + "bytes", + "flex-error", + "prost", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", ] [[package]] -name = "ryu" -version = "1.0.18" +name = "tendermint-rpc" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +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", + "tendermint-proto 0.36.0", + "thiserror", + "time", + "tokio", + "tracing", + "url", + "uuid", + "walkdir", +] [[package]] -name = "schemars" -version = "0.8.21" +name = "thiserror" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", + "thiserror-impl", ] [[package]] -name = "schemars_derive" -version = "0.8.21" +name = "thiserror-impl" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "serde_derive_internals", "syn 2.0.66", ] [[package]] -name = "sec1" -version = "0.7.3" +name = "thread_local" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", + "cfg-if", + "once_cell", ] [[package]] -name = "semver" -version = "1.0.23" +name = "time" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] [[package]] -name = "serde" -version = "1.0.203" +name = "time-core" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" -dependencies = [ - "serde_derive", -] +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] -name = "serde-json-wasm" -version = "0.5.2" +name = "time-macros" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e9213a07d53faa0b8dd81e767a54a8188a242fdb9be99ab75ec576a774bfdd7" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ - "serde", + "num-conv", + "time-core", ] [[package]] -name = "serde_derive" -version = "1.0.203" +name = "tinyvec" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", + "tinyvec_macros", ] [[package]] -name = "serde_derive_internals" -version = "0.29.1" +name = "tinyvec_macros" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tm-stateless-verifier" +version = "0.1.0" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", + "displaydoc", + "tendermint 0.36.0", + "tendermint-light-client", ] [[package]] -name = "serde_json" -version = "1.0.117" +name = "tokio" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ - "itoa", - "ryu", - "serde", + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", ] [[package]] -name = "serde_with" -version = "3.8.1" +name = "tokio-io-timeout" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" dependencies = [ - "serde", - "serde_derive", - "serde_with_macros", + "pin-project-lite", + "tokio", ] [[package]] -name = "serde_with_macros" -version = "3.8.1" +name = "tokio-macros" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ - "darling", "proc-macro2", "quote", "syn 2.0.66", ] [[package]] -name = "sha2" -version = "0.9.9" +name = "tokio-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "rustls 0.21.12", + "tokio", ] [[package]] -name = "sha2" -version = "0.10.8" +name = "tokio-rustls" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", + "rustls 0.23.11", + "rustls-pki-types", + "tokio", ] [[package]] -name = "signature" -version = "2.2.0" +name = "tokio-stream" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", + "futures-core", + "pin-project-lite", + "tokio", ] [[package]] -name = "spin" -version = "0.9.8" +name = "tokio-util" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] [[package]] -name = "spki" -version = "0.7.3" +name = "toml" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ - "base64ct", - "der", + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", ] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "toml_datetime" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] [[package]] -name = "strsim" -version = "0.11.1" +name = "toml_edit" +version = "0.22.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] [[package]] -name = "subtle" -version = "2.5.0" +name = "tonic" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64 0.21.7", + "bytes", + "h2", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] [[package]] -name = "syn" -version = "1.0.109" +name = "tonic-build" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" dependencies = [ + "prettyplease", "proc-macro2", + "prost-build", "quote", - "unicode-ident", + "syn 2.0.66", ] [[package]] -name = "syn" -version = "2.0.66" +name = "tower" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "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 = "synstructure" -version = "0.13.1" +name = "tower-layer" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] -name = "thiserror" -version = "1.0.61" +name = "tower-service" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "thiserror-impl", + "pin-project-lite", + "tracing-attributes", + "tracing-core", ] [[package]] -name = "thiserror-impl" -version = "1.0.61" +name = "tracing-attributes" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", @@ -1311,35 +3741,30 @@ dependencies = [ ] [[package]] -name = "time" -version = "0.3.36" +name = "tracing-core" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", + "once_cell", ] [[package]] -name = "time-core" -version = "0.1.2" +name = "tracing-subscriber" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "sharded-slab", + "thread_local", + "tracing-core", +] [[package]] -name = "time-macros" -version = "0.2.18" +name = "try-lock" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" @@ -1347,24 +3772,88 @@ 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 = "uuid" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +dependencies = [ + "serde", +] + [[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" @@ -1396,6 +3885,18 @@ dependencies = [ "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" @@ -1425,13 +3926,65 @@ 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", + "windows-targets 0.52.5", +] + +[[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]] @@ -1440,28 +3993,46 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +[[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.5" @@ -1474,30 +4045,83 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +[[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" @@ -1532,3 +4156,17 @@ 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.66", +] diff --git a/apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml b/apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml index a7ba7bd9..4eec8283 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml +++ b/apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml @@ -42,7 +42,7 @@ cw20 = "1.1.1" cw2 = "1.1.1" # quartz -quartz-cw = { path = "../../../../cosmwasm/packages/quartz-cw" } +quartz-common = { path = "../../../../core/quartz-common/" } [dev-dependencies] cw-multi-test = "0.17.0" diff --git a/apps/mtcs/contracts/cw-tee-mtcs/src/contract.rs b/apps/mtcs/contracts/cw-tee-mtcs/src/contract.rs index 2ff1970c..2bae605a 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/src/contract.rs +++ b/apps/mtcs/contracts/cw-tee-mtcs/src/contract.rs @@ -7,7 +7,7 @@ use cw20_base::{ contract::query_balance as cw20_query_balance, state::{MinterData, TokenInfo, TOKEN_INFO}, }; -use quartz_cw::{handler::RawHandler, state::EPOCH_COUNTER}; +use quartz_common::contract::{handler::RawHandler, state::EPOCH_COUNTER}; use crate::{ error::ContractError, @@ -119,7 +119,7 @@ pub mod execute { use cosmwasm_std::{DepsMut, Env, HexBinary, MessageInfo, Response, StdResult}; use cw20_base::contract::{execute_burn, execute_mint}; use k256::ecdsa::VerifyingKey; - use quartz_cw::state::{Hash, EPOCH_COUNTER}; + use quartz_common::contract::state::{Hash, EPOCH_COUNTER}; use crate::{ state::{ diff --git a/apps/mtcs/contracts/cw-tee-mtcs/src/error.rs b/apps/mtcs/contracts/cw-tee-mtcs/src/error.rs index ff827112..4c7b2ba1 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/src/error.rs +++ b/apps/mtcs/contracts/cw-tee-mtcs/src/error.rs @@ -2,7 +2,7 @@ use cosmwasm_std::StdError; use cw20_base::ContractError as Cw20ContractError; use hex::FromHexError; use k256::ecdsa::Error as K256Error; -use quartz_cw::error::Error as QuartzError; +use quartz_common::contract::error::Error as QuartzError; use thiserror::Error; #[derive(Error, Debug)] diff --git a/apps/mtcs/contracts/cw-tee-mtcs/src/msg.rs b/apps/mtcs/contracts/cw-tee-mtcs/src/msg.rs index 0be3d6d0..4c6b158d 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/src/msg.rs +++ b/apps/mtcs/contracts/cw-tee-mtcs/src/msg.rs @@ -2,7 +2,7 @@ use std::collections::BTreeMap; use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::HexBinary; -use quartz_cw::{ +use quartz_common::contract::{ msg::execute::attested::{RawAttested, RawAttestedMsgSansHandler, RawEpidAttestation}, prelude::*, }; @@ -28,7 +28,7 @@ pub enum ExecuteMsg { } pub mod execute { - use quartz_cw::{msg::execute::attested::HasUserData, state::UserData}; + use quartz_common::contract::{msg::execute::attested::HasUserData, state::UserData}; use sha2::{Digest, Sha256}; use super::*; diff --git a/apps/mtcs/contracts/cw-tee-mtcs/src/state.rs b/apps/mtcs/contracts/cw-tee-mtcs/src/state.rs index f9672f84..98e16528 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/src/state.rs +++ b/apps/mtcs/contracts/cw-tee-mtcs/src/state.rs @@ -3,7 +3,7 @@ use std::collections::{BTreeMap, BTreeSet}; use cosmwasm_schema::cw_serde; use cosmwasm_std::{HexBinary, StdError, Storage}; use cw_storage_plus::Item; -use quartz_cw::state::EPOCH_COUNTER; +use quartz_common::contract::state::EPOCH_COUNTER; pub type RawHash = HexBinary; pub type RawCipherText = HexBinary; diff --git a/apps/mtcs/enclave/Cargo.toml b/apps/mtcs/enclave/Cargo.toml index 791c805f..174c0f6d 100644 --- a/apps/mtcs/enclave/Cargo.toml +++ b/apps/mtcs/enclave/Cargo.toml @@ -40,9 +40,7 @@ cycles-sync.workspace = true mtcs.workspace = true # quartz -quartz-cw = { path = "../../../cosmwasm/packages/quartz-cw" } -quartz-proto = { path = "../../../core/quartz-proto" } -quartz-enclave = { path = "../../../core/quartz"} +quartz-common.workspace = true [dev-dependencies] cw-multi-test = "0.17.0" diff --git a/apps/mtcs/enclave/src/main.rs b/apps/mtcs/enclave/src/main.rs index d408a6a1..4ac43905 100644 --- a/apps/mtcs/enclave/src/main.rs +++ b/apps/mtcs/enclave/src/main.rs @@ -17,59 +17,14 @@ mod cli; mod mtcs_server; mod proto; -use std::{ - sync::{Arc, Mutex}, - time::Duration, -}; - -use clap::Parser; -use cli::Cli; use mtcs_server::MtcsService; use proto::clearing_server::ClearingServer as MtcsServer; -use quartz_cw::state::{Config, LightClientOpts}; -use quartz_enclave::{ - attestor::{Attestor, EpidAttestor}, - server::CoreService, -}; -use quartz_proto::quartz::core_server::CoreServer; -use tonic::transport::Server; - -#[tokio::main(flavor = "current_thread")] -async fn main() -> Result<(), Box> { - let args = Cli::parse(); - - let light_client_opts = LightClientOpts::new( - args.chain_id, - args.trusted_height.into(), - Vec::from(args.trusted_hash) - .try_into() - .expect("invalid trusted hash"), - ( - args.trust_threshold.numerator(), - args.trust_threshold.denominator(), - ), - args.trusting_period, - args.max_clock_drift, - args.max_block_lag, - )?; - - let config = Config::new( - EpidAttestor.mr_enclave()?, - Duration::from_secs(30 * 24 * 60), - light_client_opts, - ); +use cli::Cli; - let sk = Arc::new(Mutex::new(None)); +use quartz_common::quartz_server; - Server::builder() - .add_service(CoreServer::new(CoreService::new( - config, - sk.clone(), - EpidAttestor, - ))) - .add_service(MtcsServer::new(MtcsService::new(sk.clone(), EpidAttestor))) - .serve(args.rpc_addr) - .await?; +// Passing a custom clap Cli is optional +quartz_server!(Cli, MtcsServer, |sk| MtcsServer::new(MtcsService::new(sk, EpidAttestor))); - Ok(()) -} +// With default Cli: +// quartz_server!(MtcsServer, |sk| MtcsServer::new(MtcsService::new(sk, EpidAttestor))); diff --git a/apps/mtcs/enclave/src/mtcs_server.rs b/apps/mtcs/enclave/src/mtcs_server.rs index 0674210d..634d255e 100644 --- a/apps/mtcs/enclave/src/mtcs_server.rs +++ b/apps/mtcs/enclave/src/mtcs_server.rs @@ -17,8 +17,7 @@ use mtcs::{ algo::mcmf::primal_dual::PrimalDual, impls::complex_id::ComplexIdMtcs, obligation::SimpleObligation, prelude::DefaultMtcs, setoff::SimpleSetoff, Mtcs, }; -use quartz_cw::msg::execute::attested::RawAttested; -use quartz_enclave::attestor::Attestor; +use quartz_common::{contract::msg::execute::attested::RawAttested, enclave::attestor::Attestor}; use serde::{Deserialize, Serialize}; use tonic::{Request, Response, Result as TonicResult, Status}; diff --git a/apps/transfers/contracts/Cargo.lock b/apps/transfers/contracts/Cargo.lock index 1aef309d..6a0f7f16 100644 --- a/apps/transfers/contracts/Cargo.lock +++ b/apps/transfers/contracts/Cargo.lock @@ -2,6 +2,56 @@ # 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" @@ -13,6 +63,39 @@ dependencies = [ "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 = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[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" @@ -52,24 +135,129 @@ dependencies = [ "syn 2.0.66", ] +[[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.66", +] + +[[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.66", +] + [[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" @@ -82,12 +270,58 @@ 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.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +[[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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", +] + [[package]] name = "block-buffer" version = "0.9.0" @@ -112,12 +346,36 @@ 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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + [[package]] name = "cc" version = "1.0.104" @@ -130,12 +388,148 @@ 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.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +dependencies = [ + "anstyle", + "clap_lex", +] + +[[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.66", +] + +[[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 = "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", + "prost-types", + "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" @@ -189,7 +583,7 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad011ae7447188e26e4a7dbca2fcd0fc186aa21ae5c86df0503ea44c78f9e469" dependencies = [ - "base64", + "base64 0.21.7", "bech32", "bnum", "cosmwasm-crypto", @@ -214,6 +608,33 @@ 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" @@ -236,6 +657,15 @@ dependencies = [ "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" @@ -250,18 +680,46 @@ dependencies = [ ] [[package]] -name = "cw-storage-plus" -version = "1.2.0" +name = "curve25519-dalek-ng" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" dependencies = [ - "cosmwasm-std", - "schemars", - "serde", + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", ] [[package]] -name = "cw-utils" +name = "cw-proof" +version = "0.1.0" +dependencies = [ + "clap", + "cosmrs", + "displaydoc", + "ics23", + "prost", + "serde", + "serde_with", + "tendermint 0.36.0", + "tendermint-rpc", +] + +[[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-utils" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" @@ -320,6 +778,29 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cycles-sync" +version = "0.1.0" +dependencies = [ + "async-trait", + "bip32", + "clap", + "cosmrs", + "cosmwasm-std", + "displaydoc", + "ecies", + "hex", + "reqwest 0.12.5", + "serde", + "serde_json", + "subtle-encoding", + "thiserror", + "tokio", + "tracing", + "tracing-subscriber", + "uuid", +] + [[package]] name = "darling" version = "0.20.9" @@ -419,6 +900,17 @@ dependencies = [ "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.66", +] + [[package]] name = "digest" version = "0.9.0" @@ -471,6 +963,47 @@ dependencies = [ "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" @@ -478,7 +1011,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", - "hashbrown", + "hashbrown 0.12.3", "hex", "rand_core 0.6.4", "serde", @@ -486,6 +1019,12 @@ dependencies = [ "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" @@ -505,6 +1044,47 @@ dependencies = [ "zeroize", ] +[[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" @@ -515,24 +1095,109 @@ dependencies = [ "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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdeb3aa5e95cf9aabc17f060cfa0ced7b83f042390760ca53bf09df9968acaa1" +[[package]] +name = "flex-error" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "paste", +] + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[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-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-sink", + "futures-task", + "pin-project-lite", + "pin-utils", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -546,15 +1211,33 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +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" @@ -566,6 +1249,31 @@ dependencies = [ "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 = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + [[package]] name = "hashbrown" version = "0.12.3" @@ -575,6 +1283,24 @@ 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" @@ -590,6 +1316,15 @@ 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" @@ -600,98 +1335,450 @@ dependencies = [ ] [[package]] -name = "ident_case" -version = "1.0.1" +name = "http" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] [[package]] -name = "itoa" -version = "1.0.11" +name = "http" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] [[package]] -name = "k256" -version = "0.13.3" +name = "http-body" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2 0.10.8", - "signature", + "bytes", + "http 0.2.12", + "pin-project-lite", ] [[package]] -name = "lazy_static" -version = "1.5.0" +name = "http-body" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.1.0", +] [[package]] -name = "libc" -version = "0.2.155" +name = "http-body-util" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "pin-project-lite", +] [[package]] -name = "mc-attestation-verifier" -version = "0.4.3" -source = "git+https://github.com/informalsystems/attestation#ae86e2804abed218f4fd2fd4aec5e39408898cd8" +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 = [ - "der", - "displaydoc", - "hex", - "mc-sgx-core-sys-types", - "mc-sgx-core-types", - "mc-sgx-dcap-types", - "p256", - "serde", - "serde_json", - "subtle", - "x509-cert", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", ] [[package]] -name = "mc-sgx-core-sys-types" -version = "0.11.0" -source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ - "serde", - "serde_with", + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", ] [[package]] -name = "mc-sgx-core-types" -version = "0.11.0" -source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "bitflags", - "displaydoc", - "getrandom", - "hex", - "mc-sgx-core-sys-types", - "mc-sgx-util", - "nom", - "rand_core 0.6.4", - "serde", - "subtle", + "futures-util", + "http 0.2.12", + "hyper 0.14.30", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", ] [[package]] -name = "mc-sgx-dcap-sys-types" -version = "0.11.0" -source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" +name = "hyper-rustls" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" dependencies = [ - "mc-sgx-core-sys-types", + "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 = "mc-sgx-dcap-types" -version = "0.11.0" +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-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.0", + "hyper 1.4.1", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "ics23" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc3b8be84e7285c73b88effdc3294b552277d6b0ec728ee016c861b7b9a2c19c" +dependencies = [ + "anyhow", + "blake2", + "blake3", + "bytes", + "hex", + "prost", + "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 = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +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.5.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", @@ -714,18 +1801,72 @@ 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 0.10.5", + "log", + "mcmf", + "num-traits", + "petgraph 0.6.3", + "serde", +] + +[[package]] +name = "multimap" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" + [[package]] name = "nom" version = "7.1.3" @@ -736,6 +1877,20 @@ dependencies = [ "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.5" @@ -746,12 +1901,32 @@ dependencies = [ "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.66", +] + [[package]] name = "num-integer" version = "0.1.46" @@ -761,6 +1936,28 @@ 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" @@ -770,6 +1967,25 @@ 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" @@ -784,6 +2000,10 @@ 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" @@ -791,6 +2011,18 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[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" @@ -804,418 +2036,1678 @@ dependencies = [ ] [[package]] -name = "pem-rfc7468" -version = "0.7.0" +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.5", +] + +[[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.66", +] + +[[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 = "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.66", +] + +[[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.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +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", +] + +[[package]] +name = "prost-build" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +dependencies = [ + "bytes", + "heck", + "itertools 0.12.1", + "log", + "multimap", + "once_cell", + "petgraph 0.6.5", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 2.0.66", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "prost-types" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +dependencies = [ + "prost", +] + +[[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", + "cycles-sync", + "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", + "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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +dependencies = [ + "bitflags 2.5.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", + "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", + "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", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.4.1", + "hyper-rustls 0.27.2", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "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", + "tokio", + "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.5.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.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-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.66", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.5.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +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.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +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.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[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.66", +] + +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +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.66", +] + +[[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.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[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.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +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 = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" -dependencies = [ - "base64ct", -] +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "pkcs8" -version = "0.10.2" +name = "sync_wrapper" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ - "der", - "spki", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] -name = "powerfmt" -version = "0.2.0" +name = "system-configuration" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] [[package]] -name = "primeorder" -version = "0.13.6" +name = "system-configuration-sys" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" dependencies = [ - "elliptic-curve", + "core-foundation-sys", + "libc", ] [[package]] -name = "proc-macro2" -version = "1.0.85" +name = "tempfile" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ - "unicode-ident", + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", ] [[package]] -name = "quartz-cw" -version = "0.1.0" +name = "tendermint" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f8a10105d0a7c4af0a242e23ed5a12519afe5cc0e68419da441bb5981a6802" dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", + "bytes", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures", "k256", - "quartz-tee-ra", + "num-traits", + "once_cell", + "prost", + "prost-types", + "ripemd", "serde", + "serde_bytes", "serde_json", + "serde_repr", "sha2 0.10.8", - "thiserror", + "signature", + "subtle", + "subtle-encoding", + "tendermint-proto 0.35.0", + "time", + "zeroize", ] [[package]] -name = "quartz-tee-ra" -version = "0.1.0" +name = "tendermint" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b50aae6ec24c3429149ad59b5b8d3374d7804d4c7d6125ceb97cb53907fb68d" 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", + "bytes", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures", + "k256", + "num-traits", + "once_cell", + "prost", + "prost-types", + "ripemd", "serde", + "serde_bytes", "serde_json", + "serde_repr", "sha2 0.10.8", - "thiserror", - "x509-cert", - "x509-parser", + "signature", + "subtle", + "subtle-encoding", + "tendermint-proto 0.36.0", + "time", "zeroize", ] [[package]] -name = "quote" -version = "1.0.36" +name = "tendermint-config" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "e07b383dc8780ebbec04cfb603f3fdaba6ea6663d8dd861425b1ffa7761fe90d" dependencies = [ - "proc-macro2", + "flex-error", + "serde", + "serde_json", + "tendermint 0.36.0", + "toml", + "url", ] [[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" +name = "tendermint-light-client" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "331544139bbcf353acb5f56e733093d8e4bf2522cda0491b4bba7039ef0b944e" dependencies = [ - "getrandom", + "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", + "time", + "tracing", ] [[package]] -name = "rfc6979" -version = "0.4.0" +name = "tendermint-light-client-verifier" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +checksum = "4216e487165e5dbd7af79952eaa0d5f06c5bde861eb76c690acd7f2d2a19395c" dependencies = [ - "hmac", - "subtle", + "derive_more", + "flex-error", + "serde", + "tendermint 0.36.0", + "time", ] [[package]] -name = "ring" -version = "0.17.8" +name = "tendermint-proto" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "ff525d5540a9fc535c38dc0d92a98da3ee36fcdfbda99cecb9f3cce5cd4d41d7" dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys", + "bytes", + "flex-error", + "num-derive", + "num-traits", + "prost", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", ] [[package]] -name = "rusticata-macros" -version = "4.1.0" +name = "tendermint-proto" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +checksum = "46f193d04afde6592c20fd70788a10b8cb3823091c07456db70d8a93f5fb99c1" dependencies = [ - "nom", + "bytes", + "flex-error", + "prost", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", ] [[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "schemars" -version = "0.8.21" +name = "tendermint-rpc" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +checksum = "21e3c231a3632cab53f92ad4161c730c468c08cfe4f0aa5a6735b53b390aecbd" dependencies = [ - "dyn-clone", - "schemars_derive", + "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", + "tendermint-proto 0.36.0", + "thiserror", + "time", + "tokio", + "tracing", + "url", + "uuid", + "walkdir", ] [[package]] -name = "schemars_derive" -version = "0.8.21" +name = "thiserror" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 2.0.66", + "thiserror-impl", ] [[package]] -name = "sec1" -version = "0.7.3" +name = "thiserror-impl" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[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.203" +name = "thread_local" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ - "serde_derive", + "cfg-if", + "once_cell", ] [[package]] -name = "serde-json-wasm" -version = "0.5.2" +name = "time" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e9213a07d53faa0b8dd81e767a54a8188a242fdb9be99ab75ec576a774bfdd7" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", "serde", + "time-core", + "time-macros", ] [[package]] -name = "serde_derive" -version = "1.0.203" +name = "time-core" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] -name = "serde_derive_internals" -version = "0.29.1" +name = "time-macros" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", + "num-conv", + "time-core", ] [[package]] -name = "serde_json" -version = "1.0.117" +name = "tinyvec" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ - "itoa", - "ryu", - "serde", + "tinyvec_macros", ] [[package]] -name = "serde_with" -version = "3.8.1" +name = "tinyvec_macros" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tm-stateless-verifier" +version = "0.1.0" dependencies = [ - "serde", - "serde_derive", - "serde_with_macros", + "displaydoc", + "tendermint 0.36.0", + "tendermint-light-client", ] [[package]] -name = "serde_with_macros" -version = "3.8.1" +name = "tokio" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.66", + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", ] [[package]] -name = "sha2" -version = "0.9.9" +name = "tokio-io-timeout" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "pin-project-lite", + "tokio", ] [[package]] -name = "sha2" -version = "0.10.8" +name = "tokio-macros" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] -name = "signature" -version = "2.2.0" +name = "tokio-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", + "rustls 0.21.12", + "tokio", ] [[package]] -name = "spin" -version = "0.9.8" +name = "tokio-rustls" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls 0.23.11", + "rustls-pki-types", + "tokio", +] [[package]] -name = "spki" -version = "0.7.3" +name = "tokio-stream" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ - "base64ct", - "der", + "futures-core", + "pin-project-lite", + "tokio", ] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "tokio-util" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] [[package]] -name = "strsim" -version = "0.11.1" +name = "toml" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] [[package]] -name = "subtle" -version = "2.5.0" +name = "toml_datetime" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] [[package]] -name = "syn" -version = "1.0.109" +name = "toml_edit" +version = "0.22.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", ] [[package]] -name = "syn" -version = "2.0.66" +name = "tonic" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "async-stream", + "async-trait", + "axum", + "base64 0.21.7", + "bytes", + "h2", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", ] [[package]] -name = "synstructure" -version = "0.13.1" +name = "tonic-build" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" dependencies = [ + "prettyplease", "proc-macro2", + "prost-build", "quote", "syn 2.0.66", ] [[package]] -name = "thiserror" -version = "1.0.61" +name = "tower" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ - "thiserror-impl", + "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 = "thiserror-impl" -version = "1.0.61" +name = "tower-layer" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +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 = [ - "proc-macro2", - "quote", - "syn 2.0.66", + "pin-project-lite", + "tracing-attributes", + "tracing-core", ] [[package]] -name = "time" -version = "0.3.36" +name = "tracing-attributes" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] -name = "time-core" -version = "0.1.2" +name = "tracing-core" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] [[package]] -name = "time-macros" -version = "0.2.18" +name = "tracing-subscriber" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ - "num-conv", - "time-core", + "sharded-slab", + "thread_local", + "tracing-core", ] [[package]] @@ -1228,49 +3720,237 @@ dependencies = [ "cw-utils", "cw2", "cw20-base", - "quartz-cw", + "quartz-common", "serde_json", "sha2 0.10.8", "thiserror", ] +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[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 = "uuid" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +dependencies = [ + "serde", +] + [[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.66", + "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.66", + "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", + "windows-targets 0.52.5", +] + +[[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]] @@ -1279,28 +3959,46 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +[[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.5" @@ -1313,30 +4011,83 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +[[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" @@ -1371,3 +4122,17 @@ 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.66", +] diff --git a/apps/transfers/contracts/Cargo.toml b/apps/transfers/contracts/Cargo.toml index 0852f3c2..b19faa33 100644 --- a/apps/transfers/contracts/Cargo.toml +++ b/apps/transfers/contracts/Cargo.toml @@ -42,4 +42,4 @@ cw2 = "1.1.1" cw20-base = { version = "1.1.1", features = ["library"] } # quartz -quartz-cw = { path = "../../../cosmwasm/packages/quartz-cw" } +quartz-common = { path = "../../../core/quartz-common"} diff --git a/apps/transfers/contracts/src/contract.rs b/apps/transfers/contracts/src/contract.rs index 8db20179..6ab5cdd3 100644 --- a/apps/transfers/contracts/src/contract.rs +++ b/apps/transfers/contracts/src/contract.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{entry_point, DepsMut, Env, HexBinary, MessageInfo, Response}; -use quartz_cw::handler::RawHandler; +use quartz_common::contract::handler::RawHandler; use crate::{ error::ContractError, diff --git a/apps/transfers/contracts/src/error.rs b/apps/transfers/contracts/src/error.rs index 2c029876..4f84be93 100644 --- a/apps/transfers/contracts/src/error.rs +++ b/apps/transfers/contracts/src/error.rs @@ -1,7 +1,7 @@ use cosmwasm_std::StdError; use cw20_base::ContractError as Cw20ContractError; use cw_utils::PaymentError; -use quartz_cw::error::Error as QuartzError; +use quartz_common::contract::error::Error as QuartzError; use thiserror::Error; #[derive(Error, Debug)] diff --git a/apps/transfers/contracts/src/msg.rs b/apps/transfers/contracts/src/msg.rs index a632a69d..63a965ef 100644 --- a/apps/transfers/contracts/src/msg.rs +++ b/apps/transfers/contracts/src/msg.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::cw_serde; use cosmwasm_std::{Addr, HexBinary, Uint128}; -use quartz_cw::{ +use quartz_common::contract::{ msg::execute::attested::{RawAttested, RawEpidAttestation}, prelude::*, }; @@ -33,7 +33,7 @@ pub enum ExecuteMsg { pub mod execute { use cosmwasm_std::{DepsMut, Env, MessageInfo, Response, StdError}; - use quartz_cw::{ + use quartz_common::contract::{ error::Error, handler::Handler, msg::{execute::attested::HasUserData, HasDomainType}, diff --git a/apps/transfers/enclave/Cargo.lock b/apps/transfers/enclave/Cargo.lock index e479355c..f07be759 100644 --- a/apps/transfers/enclave/Cargo.lock +++ b/apps/transfers/enclave/Cargo.lock @@ -96,6 +96,45 @@ 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.66", + "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.66", +] + [[package]] name = "async-stream" version = "0.3.5" @@ -698,24 +737,6 @@ dependencies = [ "serde", ] -[[package]] -name = "cw-tee-mtcs" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "cw2", - "cw20", - "cw20-base", - "hex", - "k256", - "quartz-cw", - "schemars", - "serde", - "thiserror", -] - [[package]] name = "cw-utils" version = "1.0.3" @@ -834,6 +855,12 @@ dependencies = [ "syn 2.0.66", ] +[[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" @@ -847,6 +874,20 @@ dependencies = [ "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.2" @@ -1036,9 +1077,7 @@ dependencies = [ "hex", "k256", "prost", - "quartz-cw", - "quartz-enclave", - "quartz-proto", + "quartz-common", "schemars", "serde", "serde_json", @@ -2129,6 +2168,15 @@ 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" @@ -2423,6 +2471,19 @@ dependencies = [ "prost", ] +[[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" @@ -2447,7 +2508,6 @@ dependencies = [ "cosmrs", "cosmwasm-std", "cw-proof", - "cw-tee-mtcs", "cycles-sync", "ecies", "hex", @@ -2519,6 +2579,7 @@ dependencies = [ "sha2 0.10.8", "thiserror", "x509-cert", + "x509-parser", "zeroize", ] @@ -2781,6 +2842,15 @@ 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" @@ -3549,6 +3619,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", + "itoa", "num-conv", "powerfmt", "serde", @@ -3847,7 +3918,7 @@ dependencies = [ "cw-utils", "cw2", "cw20-base", - "quartz-cw", + "quartz-common", "serde_json", "sha2 0.10.8", "thiserror", @@ -4235,6 +4306,24 @@ dependencies = [ "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 = "yoke" version = "0.7.4" diff --git a/apps/transfers/enclave/Cargo.toml b/apps/transfers/enclave/Cargo.toml index a736b9e8..3d35bd13 100644 --- a/apps/transfers/enclave/Cargo.toml +++ b/apps/transfers/enclave/Cargo.toml @@ -44,9 +44,7 @@ sha2 = "0.10.8" transfers_contracts = { path = "../contracts" } # quartz -quartz-cw = { path = "../../../cosmwasm/packages/quartz-cw" } -quartz-proto = { path = "../../../core/quartz-proto" } -quartz-enclave = { path = "../../../core/quartz"} +quartz-common = { path = "../../../core/quartz-common"} [dev-dependencies] cw-multi-test = "0.17.0" diff --git a/apps/transfers/enclave/src/main.rs b/apps/transfers/enclave/src/main.rs index 663ed577..fc7edcac 100644 --- a/apps/transfers/enclave/src/main.rs +++ b/apps/transfers/enclave/src/main.rs @@ -18,62 +18,9 @@ pub mod proto; pub mod state; pub mod transfers_server; -use std::{ - sync::{Arc, Mutex}, - time::Duration, -}; - -use clap::Parser; -use cli::Cli; -use proto::settlement_server::SettlementServer as TransfersServer; -use quartz_cw::state::{Config, LightClientOpts}; -use quartz_enclave::{ - attestor::{Attestor, EpidAttestor}, - server::CoreService, -}; -use quartz_proto::quartz::core_server::CoreServer; -use tonic::transport::Server; use transfers_server::TransfersService; +use proto::settlement_server::SettlementServer as TransfersServer; -#[tokio::main(flavor = "current_thread")] -async fn main() -> Result<(), Box> { - let args = Cli::parse(); - - let light_client_opts = LightClientOpts::new( - args.chain_id, - args.trusted_height.into(), - Vec::from(args.trusted_hash) - .try_into() - .expect("invalid trusted hash"), - ( - args.trust_threshold.numerator(), - args.trust_threshold.denominator(), - ), - args.trusting_period, - args.max_clock_drift, - args.max_block_lag, - )?; - - let config = Config::new( - EpidAttestor.mr_enclave()?, - Duration::from_secs(30 * 24 * 60), - light_client_opts, - ); - - let sk = Arc::new(Mutex::new(None)); - - Server::builder() - .add_service(CoreServer::new(CoreService::new( - config, - sk.clone(), - EpidAttestor, - ))) - .add_service(TransfersServer::new(TransfersService::::new( - sk.clone(), - EpidAttestor, - ))) - .serve(args.rpc_addr) - .await?; +use quartz_common::quartz_server; - Ok(()) -} +quartz_server!(TransfersServer, |sk| TransfersServer::new(TransfersService::::new(sk, EpidAttestor))); \ No newline at end of file diff --git a/apps/transfers/enclave/src/transfers_server.rs b/apps/transfers/enclave/src/transfers_server.rs index b1c08c82..5a24b903 100644 --- a/apps/transfers/enclave/src/transfers_server.rs +++ b/apps/transfers/enclave/src/transfers_server.rs @@ -9,11 +9,14 @@ pub type RawCipherText = HexBinary; use ecies::{decrypt, encrypt}; use k256::ecdsa::{SigningKey, VerifyingKey}; -use quartz_cw::{ - msg::execute::attested::{HasUserData, RawAttested}, - state::UserData, + +use quartz_common::{ + enclave::attestor::Attestor, + contract::{ + msg::execute::attested::{HasUserData, RawAttested}, + state::UserData, + } }; -use quartz_enclave::attestor::Attestor; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; use tonic::{Request, Response, Result as TonicResult, Status}; diff --git a/core/quartz-common/Cargo.toml b/core/quartz-common/Cargo.toml new file mode 100644 index 00000000..f8e2ad00 --- /dev/null +++ b/core/quartz-common/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "quartz-common" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +readme.workspace = true +repository.workspace = true +authors.workspace = true + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +quartz-cw.workspace = true +quartz-proto.workspace = true +quartz-enclave.workspace = true +cosmrs = { version = "0.16.0"} +color-eyre = { version = "0.6.2", default-features = false } +clap = { version = "4.1.8", default-features = false, features = ["derive", "std"] } +tendermint-light-client = { version = "=0.36.0", default-features = false, features = ["rust-crypto"] } diff --git a/core/quartz-common/src/cli.rs b/core/quartz-common/src/cli.rs new file mode 100644 index 00000000..7c59e628 --- /dev/null +++ b/core/quartz-common/src/cli.rs @@ -0,0 +1,52 @@ +use std::net::SocketAddr; + +use clap::Parser; +use color_eyre::eyre::{eyre, Result}; +use cosmrs::tendermint::Hash; +use tendermint_light_client::types::{Height, TrustThreshold}; + +fn parse_trust_threshold(s: &str) -> Result { + if let Some((l, r)) = s.split_once('/') { + TrustThreshold::new(l.parse()?, r.parse()?).map_err(Into::into) + } else { + Err(eyre!( + "invalid trust threshold: {s}, format must be X/Y where X and Y are integers" + )) + } +} + +#[derive(Debug, Parser)] +#[command(author, version, about, long_about = None)] +pub struct Cli { + /// RPC server address + #[clap(long, default_value = "127.0.0.1:11090")] + pub rpc_addr: SocketAddr, + + /// Identifier of the chain + #[clap(long)] + pub chain_id: String, + + /// Height of the trusted header (AKA root-of-trust) + #[clap(long)] + pub trusted_height: Height, + + /// Hash of the trusted header (AKA root-of-trust) + #[clap(long)] + pub trusted_hash: Hash, + + /// Trust threshold + #[clap(long, value_parser = parse_trust_threshold, default_value_t = TrustThreshold::TWO_THIRDS)] + pub trust_threshold: TrustThreshold, + + /// Trusting period, in seconds (default: two weeks) + #[clap(long, default_value = "1209600")] + pub trusting_period: u64, + + /// Maximum clock drift, in seconds + #[clap(long, default_value = "5")] + pub max_clock_drift: u64, + + /// Maximum block lag, in seconds + #[clap(long, default_value = "5")] + pub max_block_lag: u64, +} diff --git a/core/quartz-common/src/lib.rs b/core/quartz-common/src/lib.rs new file mode 100644 index 00000000..91870bda --- /dev/null +++ b/core/quartz-common/src/lib.rs @@ -0,0 +1,7 @@ + +mod quartz_macro; +mod cli; + +pub use quartz_cw as contract; +pub use quartz_enclave as enclave; +pub use quartz_proto::quartz as proto; \ No newline at end of file diff --git a/core/quartz-common/src/quartz_macro.rs b/core/quartz-common/src/quartz_macro.rs new file mode 100644 index 00000000..f2be3db1 --- /dev/null +++ b/core/quartz-common/src/quartz_macro.rs @@ -0,0 +1,61 @@ +#[macro_export] +macro_rules! quartz_server { + ($server_type:ty, $service_new:expr) => { + quartz_server!(crate::cli::Cli, $server_type, $service_new); + }; + ($cli_type:ty, $server_type:ty, $service_new:expr) => { + use std::sync::{Arc, Mutex}; + use std::time::Duration; + + use clap::Parser; + use quartz_common::{ + contract::state::{Config, LightClientOpts}, + enclave::{ + attestor::{Attestor, EpidAttestor}, + server::CoreService, + }, + proto::core_server::CoreServer, + }; + use tonic::transport::Server; + + #[tokio::main(flavor = "current_thread")] + async fn main() -> Result<(), Box> { + let args = <$cli_type>::parse(); + + let light_client_opts = LightClientOpts::new( + args.chain_id, + args.trusted_height.into(), + Vec::from(args.trusted_hash) + .try_into() + .expect("invalid trusted hash"), + ( + args.trust_threshold.numerator(), + args.trust_threshold.denominator(), + ), + args.trusting_period, + args.max_clock_drift, + args.max_block_lag, + )?; + + let config = Config::new( + EpidAttestor.mr_enclave()?, + Duration::from_secs(30 * 24 * 60), + light_client_opts, + ); + + let sk = Arc::new(Mutex::new(None)); + + Server::builder() + .add_service(CoreServer::new(CoreService::new( + config, + sk.clone(), + EpidAttestor, + ))) + .add_service($service_new(sk.clone())) + .serve(args.rpc_addr) + .await?; + + Ok(()) + } + }; +} diff --git a/core/quartz/Cargo.toml b/core/quartz/Cargo.toml index dbbced6f..002f8b64 100644 --- a/core/quartz/Cargo.toml +++ b/core/quartz/Cargo.toml @@ -33,7 +33,6 @@ tendermint-light-client.workspace = true # quartz cw-proof.workspace = true -cw-tee-mtcs.workspace = true cycles-sync.workspace = true mtcs.workspace = true quartz-cw.workspace = true From 86cdd622f8f62533a413a0839ff99f374d55401e Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Tue, 9 Jul 2024 19:34:54 -0700 Subject: [PATCH 02/15] fix: use the macro definition's Cli. Clippy warning --- core/quartz-common/src/quartz_macro.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/quartz-common/src/quartz_macro.rs b/core/quartz-common/src/quartz_macro.rs index f2be3db1..7fe8dbd8 100644 --- a/core/quartz-common/src/quartz_macro.rs +++ b/core/quartz-common/src/quartz_macro.rs @@ -1,7 +1,7 @@ #[macro_export] macro_rules! quartz_server { ($server_type:ty, $service_new:expr) => { - quartz_server!(crate::cli::Cli, $server_type, $service_new); + quartz_server!($crate::cli::Cli, $server_type, $service_new); }; ($cli_type:ty, $server_type:ty, $service_new:expr) => { use std::sync::{Arc, Mutex}; From d3da1a1531f916f9b3f112da0abff90e302014db Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Tue, 9 Jul 2024 19:35:54 -0700 Subject: [PATCH 03/15] fmt --- apps/mtcs/enclave/src/main.rs | 8 +++++--- core/quartz-common/src/lib.rs | 5 ++--- core/quartz-common/src/quartz_macro.rs | 6 ++++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/apps/mtcs/enclave/src/main.rs b/apps/mtcs/enclave/src/main.rs index 4ac43905..cddbf7dc 100644 --- a/apps/mtcs/enclave/src/main.rs +++ b/apps/mtcs/enclave/src/main.rs @@ -17,14 +17,16 @@ mod cli; mod mtcs_server; mod proto; +use cli::Cli; use mtcs_server::MtcsService; use proto::clearing_server::ClearingServer as MtcsServer; -use cli::Cli; - use quartz_common::quartz_server; // Passing a custom clap Cli is optional -quartz_server!(Cli, MtcsServer, |sk| MtcsServer::new(MtcsService::new(sk, EpidAttestor))); +quartz_server!(Cli, MtcsServer, |sk| MtcsServer::new(MtcsService::new( + sk, + EpidAttestor +))); // With default Cli: // quartz_server!(MtcsServer, |sk| MtcsServer::new(MtcsService::new(sk, EpidAttestor))); diff --git a/core/quartz-common/src/lib.rs b/core/quartz-common/src/lib.rs index 91870bda..320758ab 100644 --- a/core/quartz-common/src/lib.rs +++ b/core/quartz-common/src/lib.rs @@ -1,7 +1,6 @@ - -mod quartz_macro; mod cli; +mod quartz_macro; pub use quartz_cw as contract; pub use quartz_enclave as enclave; -pub use quartz_proto::quartz as proto; \ No newline at end of file +pub use quartz_proto::quartz as proto; diff --git a/core/quartz-common/src/quartz_macro.rs b/core/quartz-common/src/quartz_macro.rs index 7fe8dbd8..f3822015 100644 --- a/core/quartz-common/src/quartz_macro.rs +++ b/core/quartz-common/src/quartz_macro.rs @@ -4,8 +4,10 @@ macro_rules! quartz_server { quartz_server!($crate::cli::Cli, $server_type, $service_new); }; ($cli_type:ty, $server_type:ty, $service_new:expr) => { - use std::sync::{Arc, Mutex}; - use std::time::Duration; + use std::{ + sync::{Arc, Mutex}, + time::Duration, + }; use clap::Parser; use quartz_common::{ From 90eac0dfcc5617e01ee644e5f61f7c33c6dcf9c7 Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Wed, 10 Jul 2024 09:22:42 -0700 Subject: [PATCH 04/15] protoc issue --- .github/workflows/cosmwasm-basic.yml | 3 + .github/workflows/cosmwasm-release.yml | 2 + apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock | 190 ++++++++++----------- 3 files changed, 100 insertions(+), 95 deletions(-) diff --git a/.github/workflows/cosmwasm-basic.yml b/.github/workflows/cosmwasm-basic.yml index 372dd8e1..bd17dbae 100644 --- a/.github/workflows/cosmwasm-basic.yml +++ b/.github/workflows/cosmwasm-basic.yml @@ -37,6 +37,9 @@ jobs: - name: Checkout sources uses: actions/checkout@v2 + - name: Install protobuf-compiler + run: sudo apt-get install -y protobuf-compiler + - name: Install wasm32-unknown-unknown toolchain uses: dtolnay/rust-toolchain@stable with: diff --git a/.github/workflows/cosmwasm-release.yml b/.github/workflows/cosmwasm-release.yml index f467fb45..4fd4d7dd 100644 --- a/.github/workflows/cosmwasm-release.yml +++ b/.github/workflows/cosmwasm-release.yml @@ -10,6 +10,8 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v2 + - name: Install protobuf-compiler + run: sudo apt-get install -y protobuf-compiler - name: Install cargo-run-script uses: actions-rs/cargo@v1 with: diff --git a/apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock b/apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock index c3cba7db..c9f8050f 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock +++ b/apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock @@ -120,7 +120,7 @@ checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", "synstructure", ] @@ -132,7 +132,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -154,7 +154,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -165,7 +165,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -296,9 +296,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "blake2" @@ -378,9 +378,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.103" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2755ff20a1d93490d26ba33a6f092a38a508398a5320df5d4b3014fcccce9410" +checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" [[package]] name = "cfg-if" @@ -437,7 +437,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -844,9 +844,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -854,27 +854,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -912,13 +912,13 @@ dependencies = [ [[package]] name = "der_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe87ce4529967e0ba1dcf8450bab64d97dfd5010a6256187ffe2e43e6f0e049" +checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -949,7 +949,7 @@ checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -975,13 +975,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -1062,9 +1062,9 @@ dependencies = [ [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -1806,7 +1806,7 @@ name = "mc-sgx-core-types" version = "0.11.0" source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "displaydoc", "getrandom", "hex", @@ -1861,9 +1861,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -1943,9 +1943,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", @@ -1974,7 +1974,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -2105,7 +2105,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2203,7 +2203,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -2265,7 +2265,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -2279,9 +2279,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.84" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -2313,7 +2313,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.66", + "syn 2.0.70", "tempfile", ] @@ -2327,7 +2327,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -2549,7 +2549,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -2725,7 +2725,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -2867,7 +2867,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -2906,7 +2906,7 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -2931,9 +2931,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] @@ -2968,13 +2968,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -2985,14 +2985,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -3007,7 +3007,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -3033,9 +3033,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.8.1" +version = "3.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +checksum = "e73139bc5ec2d45e6c5fd85be5a46949c1c39a4c18e56915f5eb4c12f975e377" dependencies = [ "base64 0.22.1", "chrono", @@ -3049,14 +3049,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.8.1" +version = "3.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +checksum = "b80d3d6b56b64335c0180e5ffde23b3c5e08c14c585b51a15bd0e95393f46703" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -3167,9 +3167,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "subtle-encoding" @@ -3199,9 +3199,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" dependencies = [ "proc-macro2", "quote", @@ -3228,7 +3228,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -3461,7 +3461,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -3564,7 +3564,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -3683,7 +3683,7 @@ dependencies = [ "proc-macro2", "prost-build", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -3737,7 +3737,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] [[package]] @@ -3881,7 +3881,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", "wasm-bindgen-shared", ] @@ -3915,7 +3915,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3969,7 +3969,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3989,18 +3989,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "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.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "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]] @@ -4011,9 +4011,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -4023,9 +4023,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -4035,15 +4035,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -4053,9 +4053,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -4065,9 +4065,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -4077,9 +4077,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -4089,9 +4089,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -4168,5 +4168,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.70", ] From b85cf03999805a642932d5c68f09c856dfaf2155 Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Wed, 10 Jul 2024 14:40:44 -0700 Subject: [PATCH 05/15] fixed dependency issues by separating quartz sub-packages into features --- Cargo.lock | 2 - apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock | 3297 ++------------------ apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml | 2 +- apps/mtcs/enclave/Cargo.toml | 3 +- apps/mtcs/enclave/src/main.rs | 1 + apps/mtcs/enclave/src/mtcs_server.rs | 3 +- apps/mtcs/enclave/src/types.rs | 50 + core/quartz-common/Cargo.toml | 21 +- core/quartz-common/src/lib.rs | 7 + core/quartz-common/src/quartz_macro.rs | 3 +- core/quartz/Cargo.toml | 1 - 11 files changed, 409 insertions(+), 2981 deletions(-) create mode 100644 apps/mtcs/enclave/src/types.rs diff --git a/Cargo.lock b/Cargo.lock index 623eaa8c..96fd5159 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1110,7 +1110,6 @@ dependencies = [ "cosmwasm-std", "cw-multi-test", "cw-tee-mtcs", - "cycles-sync", "ecies", "hex", "k256", @@ -2445,7 +2444,6 @@ dependencies = [ "cosmrs", "cosmwasm-std", "cw-proof", - "cycles-sync", "ecies", "hex", "k256", diff --git a/apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock b/apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock index c9f8050f..90544163 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock +++ b/apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock @@ -2,56 +2,6 @@ # 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" @@ -63,39 +13,12 @@ dependencies = [ "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 = "anstyle" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" - [[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" @@ -135,129 +58,24 @@ dependencies = [ "syn 2.0.70", ] -[[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.70", -] - -[[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.70", -] - [[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" @@ -270,58 +88,12 @@ 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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -346,15 +118,6 @@ 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" @@ -372,9 +135,6 @@ name = "bytes" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" -dependencies = [ - "serde", -] [[package]] name = "cc" @@ -388,148 +148,12 @@ 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.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" -dependencies = [ - "anstyle", - "clap_lex", -] - -[[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.70", -] - -[[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 = "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", - "prost-types", - "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" @@ -583,7 +207,7 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad011ae7447188e26e4a7dbca2fcd0fc186aa21ae5c86df0503ea44c78f9e469" dependencies = [ - "base64 0.21.7", + "base64", "bech32", "bnum", "cosmwasm-crypto", @@ -608,33 +232,6 @@ 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" @@ -657,15 +254,6 @@ dependencies = [ "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" @@ -679,19 +267,6 @@ dependencies = [ "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-multi-test" version = "0.17.0" @@ -711,21 +286,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cw-proof" -version = "0.1.0" -dependencies = [ - "clap", - "cosmrs", - "displaydoc", - "ics23", - "prost", - "serde", - "serde_with", - "tendermint 0.36.0", - "tendermint-rpc", -] - [[package]] name = "cw-storage-plus" version = "1.2.0" @@ -819,29 +379,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cycles-sync" -version = "0.1.0" -dependencies = [ - "async-trait", - "bip32", - "clap", - "cosmrs", - "cosmwasm-std", - "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" @@ -941,17 +478,6 @@ dependencies = [ "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.70", -] - [[package]] name = "digest" version = "0.9.0" @@ -1004,47 +530,6 @@ dependencies = [ "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" @@ -1052,7 +537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", - "hashbrown 0.12.3", + "hashbrown", "hex", "rand_core 0.6.4", "serde", @@ -1085,47 +570,6 @@ dependencies = [ "zeroize", ] -[[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" @@ -1136,109 +580,24 @@ dependencies = [ "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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdeb3aa5e95cf9aabc17f060cfa0ced7b83f042390760ca53bf09df9968acaa1" -[[package]] -name = "flex-error" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" -dependencies = [ - "paste", -] - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[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-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-sink", - "futures-task", - "pin-project-lite", - "pin-utils", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -1263,22 +622,6 @@ dependencies = [ "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" @@ -1290,31 +633,6 @@ dependencies = [ "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 = "half" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" - [[package]] name = "hashbrown" version = "0.12.3" @@ -1324,24 +642,6 @@ 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" @@ -1357,15 +657,6 @@ 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" @@ -1376,454 +667,126 @@ dependencies = [ ] [[package]] -name = "http" -version = "0.2.12" +name = "ident_case" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] -name = "http" -version = "1.1.0" +name = "itertools" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" dependencies = [ - "bytes", - "fnv", - "itoa", + "either", ] [[package]] -name = "http-body" -version = "0.4.6" +name = "itertools" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", + "either", ] [[package]] -name = "http-body" -version = "1.0.0" +name = "itoa" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" -dependencies = [ - "bytes", - "http 1.1.0", -] +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] -name = "http-body-util" -version = "0.1.2" +name = "js-sys" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ - "bytes", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "pin-project-lite", + "wasm-bindgen", ] [[package]] -name = "httparse" -version = "1.9.4" +name = "k256" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.8", + "signature", +] [[package]] -name = "httpdate" -version = "1.0.3" +name = "lazy_static" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] -name = "hyper" -version = "0.14.30" +name = "libc" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] -name = "hyper" -version = "1.4.1" +name = "log" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +name = "mc-attestation-verifier" +version = "0.4.3" +source = "git+https://github.com/informalsystems/attestation#ae86e2804abed218f4fd2fd4aec5e39408898cd8" dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.30", - "rustls 0.21.12", - "tokio", - "tokio-rustls 0.24.1", + "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 = "hyper-rustls" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +name = "mc-sgx-core-sys-types" +version = "0.11.0" +source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" 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", + "serde", + "serde_with", ] [[package]] -name = "hyper-timeout" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +name = "mc-sgx-core-types" +version = "0.11.0" +source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" dependencies = [ - "hyper 0.14.30", - "pin-project-lite", - "tokio", - "tokio-io-timeout", + "bitflags", + "displaydoc", + "getrandom", + "hex", + "mc-sgx-core-sys-types", + "mc-sgx-util", + "nom", + "rand_core 0.6.4", + "serde", + "subtle", ] [[package]] -name = "hyper-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +name = "mc-sgx-dcap-sys-types" +version = "0.11.0" +source = "git+https://github.com/informalsystems/sgx#f25807776cbe10901f53d23fca548c9e4f6f284c" dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "hyper 1.4.1", - "pin-project-lite", - "socket2", - "tokio", - "tower", - "tower-service", - "tracing", -] - -[[package]] -name = "ics23" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3b8be84e7285c73b88effdc3294b552277d6b0ec728ee016c861b7b9a2c19c" -dependencies = [ - "anyhow", - "blake2", - "blake3", - "bytes", - "hex", - "prost", - "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 = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -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", + "mc-sgx-core-sys-types", ] [[package]] @@ -1851,72 +814,18 @@ 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 0.10.5", - "log", - "mcmf", - "num-traits", - "petgraph 0.6.3", - "serde", -] - -[[package]] -name = "multimap" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" - [[package]] name = "nom" version = "7.1.3" @@ -1927,20 +836,6 @@ dependencies = [ "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" @@ -1952,31 +847,11 @@ dependencies = [ ] [[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" +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.70", -] - [[package]] name = "num-integer" version = "0.1.46" @@ -1986,28 +861,6 @@ 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" @@ -2017,25 +870,6 @@ 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" @@ -2050,10 +884,6 @@ 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" @@ -2062,1678 +892,425 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[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.70", -] - -[[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 = "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.70", -] - -[[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", -] - -[[package]] -name = "prost-build" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" -dependencies = [ - "bytes", - "heck", - "itertools 0.12.1", - "log", - "multimap", - "once_cell", - "petgraph 0.6.5", - "prettyplease", - "prost", - "prost-types", - "regex", - "syn 2.0.70", - "tempfile", -] - -[[package]] -name = "prost-derive" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" -dependencies = [ - "anyhow", - "itertools 0.12.1", - "proc-macro2", - "quote", - "syn 2.0.70", -] - -[[package]] -name = "prost-types" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" -dependencies = [ - "prost", -] - -[[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", - "cycles-sync", - "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", - "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.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" -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", - "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", - "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", - "futures-core", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "http-body-util", - "hyper 1.4.1", - "hyper-rustls 0.27.2", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "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", - "tokio", - "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.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-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.70", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" -dependencies = [ - "bitflags 2.6.0", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" -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.70", -] - -[[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.70", -] - -[[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.70", -] - -[[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.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e73139bc5ec2d45e6c5fd85be5a46949c1c39a4c18e56915f5eb4c12f975e377" -dependencies = [ - "base64 0.22.1", - "chrono", - "hex", - "serde", - "serde_derive", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b80d3d6b56b64335c0180e5ffde23b3c5e08c14c585b51a15bd0e95393f46703" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.70", -] - -[[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" +name = "p256" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.8", +] [[package]] -name = "syn" -version = "1.0.109" +name = "pem-rfc7468" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "base64ct", ] [[package]] -name = "syn" -version = "2.0.70" +name = "pkcs8" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "der", + "spki", ] [[package]] -name = "sync_wrapper" -version = "0.1.2" +name = "powerfmt" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] -name = "sync_wrapper" -version = "1.0.1" +name = "primeorder" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] [[package]] -name = "synstructure" -version = "0.13.1" +name = "proc-macro2" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.70", + "unicode-ident", ] [[package]] -name = "system-configuration" -version = "0.5.1" +name = "prost" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", + "bytes", + "prost-derive", ] [[package]] -name = "system-configuration-sys" -version = "0.5.0" +name = "prost-derive" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ - "core-foundation-sys", - "libc", + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.70", ] [[package]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +name = "quartz-common" +version = "0.1.0" dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", + "quartz-cw", ] [[package]] -name = "tendermint" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f8a10105d0a7c4af0a242e23ed5a12519afe5cc0e68419da441bb5981a6802" +name = "quartz-cw" +version = "0.1.0" dependencies = [ - "bytes", - "digest 0.10.7", - "ed25519", - "ed25519-consensus", - "flex-error", - "futures", + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", "k256", - "num-traits", - "once_cell", - "prost", - "prost-types", - "ripemd", + "quartz-tee-ra", "serde", - "serde_bytes", "serde_json", - "serde_repr", "sha2 0.10.8", - "signature", - "subtle", - "subtle-encoding", - "tendermint-proto 0.35.0", - "time", - "zeroize", + "thiserror", ] [[package]] -name = "tendermint" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b50aae6ec24c3429149ad59b5b8d3374d7804d4c7d6125ceb97cb53907fb68d" +name = "quartz-tee-ra" +version = "0.1.0" dependencies = [ - "bytes", - "digest 0.10.7", - "ed25519", - "ed25519-consensus", - "flex-error", - "futures", - "k256", - "num-traits", - "once_cell", - "prost", - "prost-types", - "ripemd", + "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_bytes", "serde_json", - "serde_repr", "sha2 0.10.8", - "signature", - "subtle", - "subtle-encoding", - "tendermint-proto 0.36.0", - "time", + "thiserror", + "x509-cert", + "x509-parser", "zeroize", ] [[package]] -name = "tendermint-config" -version = "0.36.0" +name = "quote" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e07b383dc8780ebbec04cfb603f3fdaba6ea6663d8dd861425b1ffa7761fe90d" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ - "flex-error", - "serde", - "serde_json", - "tendermint 0.36.0", - "toml", - "url", + "proc-macro2", ] [[package]] -name = "tendermint-light-client" -version = "0.36.0" +name = "rand_core" +version = "0.5.1" 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", - "time", - "tracing", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] -name = "tendermint-light-client-verifier" -version = "0.36.0" +name = "rand_core" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4216e487165e5dbd7af79952eaa0d5f06c5bde861eb76c690acd7f2d2a19395c" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "derive_more", - "flex-error", - "serde", - "tendermint 0.36.0", - "time", + "getrandom", ] [[package]] -name = "tendermint-proto" -version = "0.35.0" +name = "rfc6979" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff525d5540a9fc535c38dc0d92a98da3ee36fcdfbda99cecb9f3cce5cd4d41d7" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "bytes", - "flex-error", - "num-derive", - "num-traits", - "prost", - "prost-types", - "serde", - "serde_bytes", - "subtle-encoding", - "time", + "hmac", + "subtle", ] [[package]] -name = "tendermint-proto" -version = "0.36.0" +name = "ring" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f193d04afde6592c20fd70788a10b8cb3823091c07456db70d8a93f5fb99c1" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ - "bytes", - "flex-error", - "prost", - "prost-types", - "serde", - "serde_bytes", - "subtle-encoding", - "time", + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys", ] [[package]] -name = "tendermint-rpc" -version = "0.36.0" +name = "rusticata-macros" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e3c231a3632cab53f92ad4161c730c468c08cfe4f0aa5a6735b53b390aecbd" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" 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", - "tendermint-proto 0.36.0", - "thiserror", - "time", - "tokio", - "tracing", - "url", - "uuid", - "walkdir", + "nom", ] [[package]] -name = "thiserror" -version = "1.0.61" +name = "ryu" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "schemars" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" dependencies = [ - "thiserror-impl", + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", ] [[package]] -name = "thiserror-impl" -version = "1.0.61" +name = "schemars_derive" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ "proc-macro2", "quote", + "serde_derive_internals", "syn 2.0.70", ] [[package]] -name = "thread_local" -version = "1.1.8" +name = "sec1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "cfg-if", - "once_cell", + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", ] [[package]] -name = "time" -version = "0.3.36" +name = "semver" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] -name = "time-core" -version = "0.1.2" +name = "serde" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +dependencies = [ + "serde_derive", +] [[package]] -name = "time-macros" -version = "0.2.18" +name = "serde-json-wasm" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "9e9213a07d53faa0b8dd81e767a54a8188a242fdb9be99ab75ec576a774bfdd7" dependencies = [ - "num-conv", - "time-core", + "serde", ] [[package]] -name = "tinyvec" -version = "1.8.0" +name = "serde_derive" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ - "tinyvec_macros", + "proc-macro2", + "quote", + "syn 2.0.70", ] [[package]] -name = "tinyvec_macros" -version = "0.1.1" +name = "serde_derive_internals" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tm-stateless-verifier" -version = "0.1.0" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ - "displaydoc", - "tendermint 0.36.0", - "tendermint-light-client", + "proc-macro2", + "quote", + "syn 2.0.70", ] [[package]] -name = "tokio" -version = "1.38.0" +name = "serde_json" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "pin-project-lite", - "socket2", - "tokio-macros", - "windows-sys 0.48.0", + "itoa", + "ryu", + "serde", ] [[package]] -name = "tokio-io-timeout" -version = "1.2.0" +name = "serde_with" +version = "3.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +checksum = "e73139bc5ec2d45e6c5fd85be5a46949c1c39a4c18e56915f5eb4c12f975e377" dependencies = [ - "pin-project-lite", - "tokio", + "serde", + "serde_derive", + "serde_with_macros", ] [[package]] -name = "tokio-macros" -version = "2.3.0" +name = "serde_with_macros" +version = "3.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "b80d3d6b56b64335c0180e5ffde23b3c5e08c14c585b51a15bd0e95393f46703" dependencies = [ + "darling", "proc-macro2", "quote", "syn 2.0.70", ] [[package]] -name = "tokio-rustls" -version = "0.24.1" +name = "sha2" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "rustls 0.21.12", - "tokio", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", ] [[package]] -name = "tokio-rustls" -version = "0.26.0" +name = "sha2" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "rustls 0.23.11", - "rustls-pki-types", - "tokio", + "cfg-if", + "cpufeatures", + "digest 0.10.7", ] [[package]] -name = "tokio-stream" -version = "0.1.15" +name = "signature" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", + "digest 0.10.7", + "rand_core 0.6.4", ] [[package]] -name = "tokio-util" -version = "0.7.11" +name = "spin" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] -name = "toml" -version = "0.8.14" +name = "spki" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", + "base64ct", + "der", ] [[package]] -name = "toml_datetime" -version = "0.6.6" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" -dependencies = [ - "serde", -] +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "toml_edit" -version = "0.22.15" +name = "strsim" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" -dependencies = [ - "indexmap 2.2.6", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] -name = "tonic" -version = "0.11.0" +name = "subtle" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" -dependencies = [ - "async-stream", - "async-trait", - "axum", - "base64 0.21.7", - "bytes", - "h2", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "hyper-timeout", - "percent-encoding", - "pin-project", - "prost", - "tokio", - "tokio-stream", - "tower", - "tower-layer", - "tower-service", - "tracing", -] +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] -name = "tonic-build" -version = "0.11.0" +name = "syn" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "prettyplease", "proc-macro2", - "prost-build", "quote", - "syn 2.0.70", + "unicode-ident", ] [[package]] -name = "tower" -version = "0.4.13" +name = "syn" +version = "2.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", + "proc-macro2", + "quote", + "unicode-ident", ] [[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" +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.70", +] [[package]] -name = "tracing" -version = "0.1.40" +name = "thiserror" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", + "thiserror-impl", ] [[package]] -name = "tracing-attributes" -version = "0.1.27" +name = "thiserror-impl" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", @@ -3741,30 +1318,35 @@ dependencies = [ ] [[package]] -name = "tracing-core" -version = "0.1.32" +name = "time" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ - "once_cell", + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", ] [[package]] -name = "tracing-subscriber" -version = "0.3.18" +name = "time-core" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "sharded-slab", - "thread_local", - "tracing-core", -] +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] -name = "try-lock" -version = "0.2.5" +name = "time-macros" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] [[package]] name = "typenum" @@ -3772,88 +1354,24 @@ 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 = "uuid" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" -dependencies = [ - "serde", -] - [[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" @@ -3885,18 +1403,6 @@ dependencies = [ "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" @@ -3926,65 +1432,13 @@ 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", + "windows-targets", ] [[package]] @@ -3993,46 +1447,28 @@ 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_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "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", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[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" @@ -4045,83 +1481,30 @@ 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" @@ -4156,17 +1539,3 @@ 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.70", -] diff --git a/apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml b/apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml index 4eec8283..628255d7 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml +++ b/apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml @@ -42,7 +42,7 @@ cw20 = "1.1.1" cw2 = "1.1.1" # quartz -quartz-common = { path = "../../../../core/quartz-common/" } +quartz-common = { path = "../../../../core/quartz-common/", features = ["contract"]} [dev-dependencies] cw-multi-test = "0.17.0" diff --git a/apps/mtcs/enclave/Cargo.toml b/apps/mtcs/enclave/Cargo.toml index 174c0f6d..31165578 100644 --- a/apps/mtcs/enclave/Cargo.toml +++ b/apps/mtcs/enclave/Cargo.toml @@ -36,11 +36,10 @@ prost = { version = "0.12.3", default-features = false } # local cw-tee-mtcs.workspace = true -cycles-sync.workspace = true mtcs.workspace = true # quartz -quartz-common.workspace = true +quartz-common = { workspace = true, features = ["full"]} [dev-dependencies] cw-multi-test = "0.17.0" diff --git a/apps/mtcs/enclave/src/main.rs b/apps/mtcs/enclave/src/main.rs index cddbf7dc..c30c14f6 100644 --- a/apps/mtcs/enclave/src/main.rs +++ b/apps/mtcs/enclave/src/main.rs @@ -16,6 +16,7 @@ mod cli; mod mtcs_server; mod proto; +mod types; use cli::Cli; use mtcs_server::MtcsService; diff --git a/apps/mtcs/enclave/src/mtcs_server.rs b/apps/mtcs/enclave/src/mtcs_server.rs index 634d255e..30e9a735 100644 --- a/apps/mtcs/enclave/src/mtcs_server.rs +++ b/apps/mtcs/enclave/src/mtcs_server.rs @@ -10,7 +10,6 @@ use cw_tee_mtcs::{ msg::execute::SubmitSetoffsMsg, state::{RawHash, SettleOff, Transfer}, }; -use cycles_sync::types::RawObligation; use ecies::{decrypt, encrypt}; use k256::ecdsa::{SigningKey, VerifyingKey}; use mtcs::{ @@ -21,7 +20,7 @@ use quartz_common::{contract::msg::execute::attested::RawAttested, enclave::atte use serde::{Deserialize, Serialize}; use tonic::{Request, Response, Result as TonicResult, Status}; -use crate::proto::{clearing_server::Clearing, RunClearingRequest, RunClearingResponse}; +use crate::{proto::{clearing_server::Clearing, RunClearingRequest, RunClearingResponse}, types::RawObligation}; pub type RawCipherText = HexBinary; diff --git a/apps/mtcs/enclave/src/types.rs b/apps/mtcs/enclave/src/types.rs new file mode 100644 index 00000000..d98a0444 --- /dev/null +++ b/apps/mtcs/enclave/src/types.rs @@ -0,0 +1,50 @@ +use cosmwasm_std::HexBinary; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct RawObligation { + pub debtor: HexBinary, + pub creditor: HexBinary, + pub amount: u64, + #[serde(default)] + pub salt: HexBinary, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct RawEncryptedObligation { + pub digest: HexBinary, + pub ciphertext: HexBinary, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct SubmitObligationsMsg { + pub submit_obligations: SubmitObligationsMsgInner, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct SubmitObligationsMsgInner { + pub obligations: Vec, + pub liquidity_sources: Vec, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RawSetOff { + SetOff(Vec), + Transfer(RawSetOffTransfer), +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct RawSetOffTransfer { + pub payer: String, + pub payee: String, + pub amount: u64, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct RawOffset { + pub debtor: HexBinary, + pub creditor: HexBinary, + pub amount: u64, + pub set_off: u64, +} diff --git a/core/quartz-common/Cargo.toml b/core/quartz-common/Cargo.toml index f8e2ad00..82fa0d1a 100644 --- a/core/quartz-common/Cargo.toml +++ b/core/quartz-common/Cargo.toml @@ -8,13 +8,18 @@ readme.workspace = true repository.workspace = true authors.workspace = true -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[features] +full = ["contract", "enclave", "proto", "macro"] +contract = ["dep:quartz-cw"] +enclave = ["dep:quartz-enclave", "proto"] +proto = ["dep:quartz-proto"] +macro = ["dep:cosmrs", "dep:color-eyre", "dep:clap", "dep:tendermint-light-client"] [dependencies] -quartz-cw.workspace = true -quartz-proto.workspace = true -quartz-enclave.workspace = true -cosmrs = { version = "0.16.0"} -color-eyre = { version = "0.6.2", default-features = false } -clap = { version = "4.1.8", default-features = false, features = ["derive", "std"] } -tendermint-light-client = { version = "=0.36.0", default-features = false, features = ["rust-crypto"] } +quartz-cw = { workspace = true, optional = true } +quartz-proto = { workspace = true, optional = true } +quartz-enclave = { workspace = true, optional = true } +cosmrs = { version = "0.16.0", optional = true } +color-eyre = { version = "0.6.2", default-features = false, optional = true} +clap = { version = "4.1.8", default-features = false, features = ["derive", "std"], optional = true} +tendermint-light-client = { version = "=0.36.0", default-features = false, features = ["rust-crypto"], optional = true} diff --git a/core/quartz-common/src/lib.rs b/core/quartz-common/src/lib.rs index 320758ab..6980d70c 100644 --- a/core/quartz-common/src/lib.rs +++ b/core/quartz-common/src/lib.rs @@ -1,6 +1,13 @@ +#[cfg(feature = "macro")] mod cli; +#[cfg(feature = "macro")] mod quartz_macro; +#[cfg(feature = "contract")] pub use quartz_cw as contract; + +#[cfg(feature = "enclave")] pub use quartz_enclave as enclave; + +#[cfg(feature = "proto")] pub use quartz_proto::quartz as proto; diff --git a/core/quartz-common/src/quartz_macro.rs b/core/quartz-common/src/quartz_macro.rs index f3822015..56adb6e6 100644 --- a/core/quartz-common/src/quartz_macro.rs +++ b/core/quartz-common/src/quartz_macro.rs @@ -1,3 +1,4 @@ +#[cfg(feature = "macro")] #[macro_export] macro_rules! quartz_server { ($server_type:ty, $service_new:expr) => { @@ -10,7 +11,7 @@ macro_rules! quartz_server { }; use clap::Parser; - use quartz_common::{ + use $crate::{ contract::state::{Config, LightClientOpts}, enclave::{ attestor::{Attestor, EpidAttestor}, diff --git a/core/quartz/Cargo.toml b/core/quartz/Cargo.toml index 002f8b64..ac53f582 100644 --- a/core/quartz/Cargo.toml +++ b/core/quartz/Cargo.toml @@ -33,7 +33,6 @@ tendermint-light-client.workspace = true # quartz cw-proof.workspace = true -cycles-sync.workspace = true mtcs.workspace = true quartz-cw.workspace = true quartz-proto.workspace = true From b55bcf35c4cc0a83b0478ff26d094eaa44962df4 Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Wed, 10 Jul 2024 14:41:59 -0700 Subject: [PATCH 06/15] fmt --- apps/mtcs/enclave/src/mtcs_server.rs | 5 ++++- core/quartz-common/src/lib.rs | 2 -- core/quartz-common/src/quartz_macro.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/mtcs/enclave/src/mtcs_server.rs b/apps/mtcs/enclave/src/mtcs_server.rs index 30e9a735..93271af2 100644 --- a/apps/mtcs/enclave/src/mtcs_server.rs +++ b/apps/mtcs/enclave/src/mtcs_server.rs @@ -20,7 +20,10 @@ use quartz_common::{contract::msg::execute::attested::RawAttested, enclave::atte use serde::{Deserialize, Serialize}; use tonic::{Request, Response, Result as TonicResult, Status}; -use crate::{proto::{clearing_server::Clearing, RunClearingRequest, RunClearingResponse}, types::RawObligation}; +use crate::{ + proto::{clearing_server::Clearing, RunClearingRequest, RunClearingResponse}, + types::RawObligation, +}; pub type RawCipherText = HexBinary; diff --git a/core/quartz-common/src/lib.rs b/core/quartz-common/src/lib.rs index 6980d70c..3afb5022 100644 --- a/core/quartz-common/src/lib.rs +++ b/core/quartz-common/src/lib.rs @@ -5,9 +5,7 @@ mod quartz_macro; #[cfg(feature = "contract")] pub use quartz_cw as contract; - #[cfg(feature = "enclave")] pub use quartz_enclave as enclave; - #[cfg(feature = "proto")] pub use quartz_proto::quartz as proto; diff --git a/core/quartz-common/src/quartz_macro.rs b/core/quartz-common/src/quartz_macro.rs index 56adb6e6..7d96f25d 100644 --- a/core/quartz-common/src/quartz_macro.rs +++ b/core/quartz-common/src/quartz_macro.rs @@ -11,6 +11,7 @@ macro_rules! quartz_server { }; use clap::Parser; + use tonic::transport::Server; use $crate::{ contract::state::{Config, LightClientOpts}, enclave::{ @@ -19,7 +20,6 @@ macro_rules! quartz_server { }, proto::core_server::CoreServer, }; - use tonic::transport::Server; #[tokio::main(flavor = "current_thread")] async fn main() -> Result<(), Box> { From 99be7d4549e7f60198994d8a741f7daf94b52e12 Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Fri, 26 Jul 2024 09:06:00 -0700 Subject: [PATCH 07/15] merge main from cycles-protocol into cycles-quartz --- .gitignore | 3 +- Cargo.lock | 2 + apps/mtcs/scripts/Cargo.lock | 4723 +++++++++++++++++ apps/mtcs/scripts/Cargo.toml | 50 + apps/mtcs/scripts/aggregator.sh | 40 + apps/mtcs/scripts/build.sh | 18 + apps/mtcs/scripts/deploy.sh | 23 + apps/mtcs/scripts/deploy45.sh | 23 + apps/mtcs/scripts/handshake.sh | 117 + apps/mtcs/scripts/listen.sh | 101 + apps/mtcs/scripts/src/bin/deploy-mc.rs | 159 + apps/mtcs/scripts/src/bin/deploy.rs | 86 + apps/mtcs/scripts/src/bin/handshake.rs | 231 + apps/mtcs/scripts/src/bin/listen.rs | 235 + apps/mtcs/scripts/src/lib.rs | 3 + apps/mtcs/scripts/src/types.rs | 39 + apps/mtcs/scripts/src/utils.rs | 78 + apps/mtcs/scripts/start.sh | 98 + apps/mtcs/scripts/start45.sh | 128 + apps/mtcs/scripts/transact.sh | 40 + .../src/msg/execute/session_set_pub_key.rs | 4 +- relayer/scripts/relay.sh | 5 +- utils/cycles-sync/Cargo.toml | 11 + utils/cycles-sync/src/bin/submit.rs | 411 ++ utils/cycles-sync/src/cli.rs | 2 +- utils/cycles-sync/src/lib.rs | 3 + utils/cycles-sync/src/main.rs | 6 +- utils/cycles-sync/src/types.rs | 23 +- utils/cycles-sync/src/wasmd_client.rs | 152 +- utils/tm-prover/Cargo.toml | 6 +- utils/tm-prover/src/cli.rs | 113 + utils/tm-prover/src/lib.rs | 2 + utils/tm-prover/src/main.rs | 355 +- utils/tm-prover/src/prover.rs | 292 + 34 files changed, 7195 insertions(+), 387 deletions(-) create mode 100644 apps/mtcs/scripts/Cargo.lock create mode 100644 apps/mtcs/scripts/Cargo.toml create mode 100644 apps/mtcs/scripts/aggregator.sh create mode 100644 apps/mtcs/scripts/build.sh create mode 100755 apps/mtcs/scripts/deploy.sh create mode 100755 apps/mtcs/scripts/deploy45.sh create mode 100755 apps/mtcs/scripts/handshake.sh create mode 100755 apps/mtcs/scripts/listen.sh create mode 100644 apps/mtcs/scripts/src/bin/deploy-mc.rs create mode 100644 apps/mtcs/scripts/src/bin/deploy.rs create mode 100644 apps/mtcs/scripts/src/bin/handshake.rs create mode 100644 apps/mtcs/scripts/src/bin/listen.rs create mode 100644 apps/mtcs/scripts/src/lib.rs create mode 100644 apps/mtcs/scripts/src/types.rs create mode 100644 apps/mtcs/scripts/src/utils.rs create mode 100755 apps/mtcs/scripts/start.sh create mode 100755 apps/mtcs/scripts/start45.sh create mode 100644 apps/mtcs/scripts/transact.sh create mode 100644 utils/cycles-sync/src/bin/submit.rs create mode 100644 utils/tm-prover/src/cli.rs create mode 100644 utils/tm-prover/src/lib.rs create mode 100644 utils/tm-prover/src/prover.rs diff --git a/.gitignore b/.gitignore index ba69bf89..c7aaa274 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ .idea/ target/ artifacts/ -.vscode/ \ No newline at end of file +.vscode/ +.DS_Store \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 96fd5159..e7b72c9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -837,11 +837,13 @@ dependencies = [ name = "cycles-sync" version = "0.1.0" dependencies = [ + "anyhow", "async-trait", "bip32", "clap", "cosmrs", "cosmwasm-std", + "cw-tee-mtcs", "displaydoc", "ecies", "hex", diff --git a/apps/mtcs/scripts/Cargo.lock b/apps/mtcs/scripts/Cargo.lock new file mode 100644 index 00000000..605c122f --- /dev/null +++ b/apps/mtcs/scripts/Cargo.lock @@ -0,0 +1,4723 @@ +# 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 new file mode 100644 index 00000000..61511864 --- /dev/null +++ b/apps/mtcs/scripts/Cargo.toml @@ -0,0 +1,50 @@ +[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" + +[[bin]] +name = "mc" +path = "src/bin/deploy-mc.rs" + +[dependencies] +cosmrs = { version = "=0.16.0", default-features = false } +once_cell = "1.19.0" +serde_json = "1.0.120" +tokio = { version = "1.38.0" } +reqwest = { version = "0.12.2", default-features = false, features = ["json", "rustls-tls"] } +anyhow = "1.0.86" +serde = "1.0.204" +hex = "0.4.3" +cosmwasm-std = "1.5" +base64 = "0.22.1" +tonic = { version = "0.11.0"} +subtle-encoding = "0.5.1" +tokio-tungstenite = "0.23.1" +futures-util = "0.3.30" +tendermint-rpc = { version ="0.36.0", features=["websocket-client", "http-client"]} +tendermint = "=0.36.0" +clap = "4.5.10" +# todo remove unnecessary imports + +cycles-sync = { path = "../../../packages/cycles-sync"} +tm-prover = { path = "../../../packages/tm-prover"} +quartz-common = { path = "../../../packages/quartz-common", features=["contract"]} +quartz-tee-ra = { path = "../../../packages/quartz-tee-ra"} +mtcs-overdraft = { path = "../../../contracts/overdraft"} +cw-tee-mtcs = { path = "../../contracts/cw-tee-mtcs"} +enclave = { path = "../../enclave"} +regex = "1.10.5" diff --git a/apps/mtcs/scripts/aggregator.sh b/apps/mtcs/scripts/aggregator.sh new file mode 100644 index 00000000..8a6517cf --- /dev/null +++ b/apps/mtcs/scripts/aggregator.sh @@ -0,0 +1,40 @@ +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 new file mode 100644 index 00000000..459ef417 --- /dev/null +++ b/apps/mtcs/scripts/build.sh @@ -0,0 +1,18 @@ +#!/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 new file mode 100755 index 00000000..08e8d549 --- /dev/null +++ b/apps/mtcs/scripts/deploy.sh @@ -0,0 +1,23 @@ +#!/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 new file mode 100755 index 00000000..08e8d549 --- /dev/null +++ b/apps/mtcs/scripts/deploy45.sh @@ -0,0 +1,23 @@ +#!/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 new file mode 100755 index 00000000..c40e6104 --- /dev/null +++ b/apps/mtcs/scripts/handshake.sh @@ -0,0 +1,117 @@ +#!/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 new file mode 100755 index 00000000..1179e05f --- /dev/null +++ b/apps/mtcs/scripts/listen.sh @@ -0,0 +1,101 @@ + + + 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-mc.rs b/apps/mtcs/scripts/src/bin/deploy-mc.rs new file mode 100644 index 00000000..0acecb89 --- /dev/null +++ b/apps/mtcs/scripts/src/bin/deploy-mc.rs @@ -0,0 +1,159 @@ +use std::{env::current_dir, str::FromStr}; + +use clap::Parser; +use cosmwasm_std::Addr; +use quartz_common::contract::msg::RawInstantiateMsg; +use reqwest::Url; +use cosmrs::tendermint::chain::Id as ChainId; +use tendermint::Hash; +use tendermint_rpc::HttpClient; +use serde_json::json; + +use scripts::{types::{WasmdTxResponse, Log}, utils::{wasmaddr_to_id, block_tx_commit}}; +use cw_tee_mtcs::msg::{InstantiateMsg as MtcsInstantiateMsg}; +use cycles_sync::wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}; +use mtcs_overdraft::{msg::{InstantiateMsg, QueryMsg, QueryResp, Cw4ExecuteMsg, Member}, AddHook}; + +use anyhow::anyhow; + +#[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 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())?); + + let contracts_path = current_dir()?.join("../../../contracts"); + + println!("\nšŸš€ Deploying Memberships Contract\n"); + let group_wasm = contracts_path.join("cw4_group.wasm"); + // TODO: uncertain about the path -> string conversion + let group_deploy_output: WasmdTxResponse = serde_json::from_str( + &wasmd_client.deploy( + &ChainId::from_str("testing")?, + String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), + group_wasm.as_path().to_string_lossy() + )? + )?; + + let tx_hash = Hash::from_str(&group_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 memberships_code_id: u64 = log[0].events[1].attributes[1].value.parse()?; + + println!("\nšŸš€ Deploying Mutual Credit Contract\n"); + + let mc_wasm = contracts_path.join("overdraft/target/wasm32-unknown-unknown/release/mtcs_overdraft.wasm"); + // TODO: uncertain about the path -> string conversion + let mc_deploy_output: WasmdTxResponse = serde_json::from_str( + &wasmd_client.deploy( + &ChainId::from_str("testing")?, + String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), + mc_wasm.as_path().to_string_lossy() + )? + )?; + + let tx_hash = Hash::from_str(&mc_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 mc_code_id: u64 = log[0].events[1].attributes[1].value.parse()?; + + println!("\nšŸš€ Initializing Mutual Credit Contract with Memberships Contract Code Id: {}\n", memberships_code_id); + + let init_msg = InstantiateMsg { + owner: Addr::unchecked("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), memberships_code_id + }; + + let deploy_output: WasmdTxResponse = serde_json::from_str( + &wasmd_client.init( + &ChainId::from_str("testing")?, + String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), + mc_code_id as usize, + json!(init_msg), + format!("MTCS Contract V{}", mc_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 mc_contract_addr = &log[0].events[1].attributes[0].value; + + let resp: QueryResult = wasmd_client + .query_smart( + &wasmaddr_to_id(mc_contract_addr)?, + json!(QueryMsg::GroupAddr {}), + ) + .map_err(|e| anyhow!("Problem querying liquidity sources: {}", e))?; + + let group_contract_addr = &resp.data.message; + + // *** ADD HOOK *** + + // TODO: Make sure it succeeded (or return error + contract reuse) + let _add_hook_output: WasmdTxResponse = serde_json::from_str( + wasmd_client + .tx_execute( + &wasmaddr_to_id(group_contract_addr)?, + &ChainId::from_str("testing")?, + 2000000, + String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), + json!(AddHook { + addr: mc_contract_addr.to_owned() + }), + )? + .as_str(), + )?; + + // *** Regsiter test members *** + let update_members_output: WasmdTxResponse = serde_json::from_str( + wasmd_client + .tx_execute( + &wasmaddr_to_id(group_contract_addr)?, + &ChainId::from_str("testing")?, + 2000000, + String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), + json!(Cw4ExecuteMsg::UpdateMembers { + remove: vec![], + add: vec![Member { + addr: String::from("wasm124tuy67a9dcvfgcr4gjmz60syd8ddaugl33v0n"), + weight: 0u64 + }, Member { + addr: String::from("wasm1ctkqmg45u85jnf5ur9796h7ze4hj6ep5y7m7l6"), + weight: 0u64 + }] + }), + )? + .as_str(), + )?; + + println!("{:?}", update_members_output); + + println!("\nšŸš€ Successfully deployed and instantiated mutual credit contract!"); + println!("\nMutual Credit"); + println!("šŸ†” Code ID: {}", mc_code_id); + println!("šŸ“Œ Contract Address: {}", mc_contract_addr); + println!("\nMemberships sub-contract"); + println!("šŸ†” Code ID: {}", memberships_code_id); + println!("šŸ“Œ Contract Address: {}", group_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/deploy.rs b/apps/mtcs/scripts/src/bin/deploy.rs new file mode 100644 index 00000000..bddcad7f --- /dev/null +++ b/apps/mtcs/scripts/src/bin/deploy.rs @@ -0,0 +1,86 @@ +use std::{env::{self, current_dir}, str::FromStr}; + +use clap::Parser; +use quartz_common::contract::msg::RawInstantiateMsg; +use reqwest::Url; +use cosmrs::tendermint::chain::Id as ChainId; +use tendermint::Hash; +use tendermint_rpc::HttpClient; +use serde_json::json; + +use scripts::{types::{WasmdTxResponse, Log}, utils::{run_relay, block_tx_commit}}; +use cw_tee_mtcs::msg::{InstantiateMsg as MtcsInstantiateMsg}; +use cycles_sync::wasmd_client::{CliWasmdClient, WasmdClient}; + +#[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.as_path().to_string_lossy() + )? + )?; + + 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 new file mode 100644 index 00000000..f21e3dc0 --- /dev/null +++ b/apps/mtcs/scripts/src/bin/handshake.rs @@ -0,0 +1,231 @@ +use anyhow::anyhow; +use cosmrs::tendermint::chain::Id as ChainId; // TODO see if this redundancy in dependencies can be decreased +use clap::Parser; +use cosmrs::AccountId; +use futures_util::stream::StreamExt; +use reqwest::Url; +use serde::Serialize; +use serde_json::json; +use std::{env, fs::File, io::Read, path::Path, str::FromStr}; +use tendermint::{block::Height, Hash}; +use tendermint_rpc::query::EventType; +use tendermint_rpc::{HttpClient, SubscriptionClient, WebSocketClient}; + +use cw_tee_mtcs::msg::ExecuteMsg as MtcsExecuteMsg; +use cycles_sync::wasmd_client::{CliWasmdClient, WasmdClient}; +use quartz_common::contract::prelude::QuartzExecuteMsg; +use scripts::{types::WasmdTxResponse, utils::{wasmaddr_to_id, run_relay, block_tx_commit}}; +use tm_prover::prover::proof_parse_with_defaults; + +use std::env::current_dir; + +#[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.clone(), + 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()); + + // run tm prover cargo binary with trusted hash and height + // TODO: decouple logic in tm_prover + if let Err(report) = proof_parse_with_defaults( + "testing".to_string(), + httpurl.as_str(), + httpurl.as_str(), + trusted_height, + trusted_hash, + proof_path.to_str().unwrap(), // potentially dangerous + 1, + cli.contract.clone(), + "quartz_session", + ) + .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.clone(), + 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 new file mode 100644 index 00000000..6e9ef571 --- /dev/null +++ b/apps/mtcs/scripts/src/bin/listen.rs @@ -0,0 +1,235 @@ +use anyhow::anyhow; +use base64::prelude::*; +use clap::Parser; +use cosmrs::{tendermint::chain::Id as ChainId, AccountId}; +use cosmwasm_std::{Binary, HexBinary}; +use futures_util::stream::StreamExt; +use reqwest::Url; +use scripts::utils::wasmaddr_to_id; +use serde::{Deserialize, Serialize}; +use serde_json::json; +use tendermint_rpc::{ + query::{EventType, Query}, + SubscriptionClient, WebSocketClient, +}; +use tokio::{fs::{self, File}, io::AsyncWriteExt}; +use tonic::Request; + +use cw_tee_mtcs::{ + msg::{AttestedMsg, execute::{SubmitSetoffsMsg}, ExecuteMsg, GetLiquiditySourcesResponse, QueryMsg::GetLiquiditySources}, + state::LiquiditySource, +}; +use cycles_sync::wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}; +use enclave::proto::{clearing_client::ClearingClient, RunClearingRequest}; +use mtcs_overdraft::msg::{QueryMembersResp, QueryMsg::DumpMembers}; +use quartz_tee_ra::{intel_sgx::epid::types::ReportBody, IASReport}; +use quartz_common::contract::msg::execute::attested::{EpidAttestation, RawAttested, RawAttestedMsgSansHandler}; + +use std::{ + collections::{BTreeMap, BTreeSet}, env, process::Command, str::FromStr +}; + +// TODO: import this from enclave or somewhere shared +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct RunClearingMessage { + intents: BTreeMap, + liquidity_sources: BTreeSet, +} + +#[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 let Some(_) = subs.next().await { + // 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(epoch_counter) + }), + ) + .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 + } + )) +} \ No newline at end of file diff --git a/apps/mtcs/scripts/src/lib.rs b/apps/mtcs/scripts/src/lib.rs new file mode 100644 index 00000000..fcfb0a8b --- /dev/null +++ b/apps/mtcs/scripts/src/lib.rs @@ -0,0 +1,3 @@ +//TODO: make an error.rs to differentiate errors in listen.rs +pub mod utils; +pub mod types; \ No newline at end of file diff --git a/apps/mtcs/scripts/src/types.rs b/apps/mtcs/scripts/src/types.rs new file mode 100644 index 00000000..4d10f321 --- /dev/null +++ b/apps/mtcs/scripts/src/types.rs @@ -0,0 +1,39 @@ +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, +} \ No newline at end of file diff --git a/apps/mtcs/scripts/src/utils.rs b/apps/mtcs/scripts/src/utils.rs new file mode 100644 index 00000000..6ecd52ee --- /dev/null +++ b/apps/mtcs/scripts/src/utils.rs @@ -0,0 +1,78 @@ +use anyhow::anyhow; +use cosmrs::AccountId; +use regex::Regex; +use serde::de::DeserializeOwned; +use subtle_encoding::bech32::decode as bech32_decode; +use std::{path::Path, process::Command, time::Duration}; +use tendermint_rpc::{error::ErrorDetail, Client, HttpClient, endpoint::tx::Response as TmTxResponse}; +use tendermint::Hash; + +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)); + } + } + } + } + } +} \ No newline at end of file diff --git a/apps/mtcs/scripts/start.sh b/apps/mtcs/scripts/start.sh new file mode 100755 index 00000000..641def64 --- /dev/null +++ b/apps/mtcs/scripts/start.sh @@ -0,0 +1,98 @@ +#!/bin/bash + +#set -eo pipefail + +ROOT=${ROOT:-$HOME} +DIR_QUARTZ="$ROOT/cycles-protocol" +DIR_QUARTZ_APP="$DIR_QUARTZ/quartz-app/" +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: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 + +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 new file mode 100755 index 00000000..d2d98a00 --- /dev/null +++ b/apps/mtcs/scripts/start45.sh @@ -0,0 +1,128 @@ +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 new file mode 100644 index 00000000..bf9e5534 --- /dev/null +++ b/apps/mtcs/scripts/transact.sh @@ -0,0 +1,40 @@ + +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/cosmwasm/packages/quartz-cw/src/msg/execute/session_set_pub_key.rs b/cosmwasm/packages/quartz-cw/src/msg/execute/session_set_pub_key.rs index 9f857f25..ba1fb477 100644 --- a/cosmwasm/packages/quartz-cw/src/msg/execute/session_set_pub_key.rs +++ b/cosmwasm/packages/quartz-cw/src/msg/execute/session_set_pub_key.rs @@ -27,8 +27,8 @@ impl SessionSetPubKey { #[cw_serde] pub struct RawSessionSetPubKey { - nonce: HexBinary, - pub_key: HexBinary, + pub nonce: HexBinary, + pub pub_key: HexBinary, } impl TryFrom for SessionSetPubKey { diff --git a/relayer/scripts/relay.sh b/relayer/scripts/relay.sh index f0e99ceb..b1a8b61d 100755 --- a/relayer/scripts/relay.sh +++ b/relayer/scripts/relay.sh @@ -20,11 +20,14 @@ REPORT_SIG_FILE="/tmp/${USER}_datareportsig" REQUEST="$1" REQUEST_MSG=${2:-"{}"} +# Use the QUARTZ_PORT environment variable if set, otherwise default to 11090 +QUARTZ_PORT="${QUARTZ_PORT:-11090}" + # clear tmp files from previous runs rm -f "$QUOTE_FILE" "$REPORT_FILE" "$REPORT_SIG_FILE" # query the gRPC quartz enclave service -ATTESTED_MSG=$(grpcurl -plaintext -import-path "$DIR_PROTO" -proto quartz.proto -d "$REQUEST_MSG" '127.0.0.1:11090' quartz.Core/"$REQUEST" | jq -c '.message | fromjson') +ATTESTED_MSG=$(grpcurl -plaintext -import-path "$DIR_PROTO" -proto quartz.proto -d "$REQUEST_MSG" "127.0.0.1:$QUARTZ_PORT" quartz.Core/"$REQUEST" | jq -c '.message | fromjson') # parse out the quote and the message QUOTE=$(echo "$ATTESTED_MSG" | jq -c '.quote') diff --git a/utils/cycles-sync/Cargo.toml b/utils/cycles-sync/Cargo.toml index 5b2abc91..1e9e5f33 100644 --- a/utils/cycles-sync/Cargo.toml +++ b/utils/cycles-sync/Cargo.toml @@ -9,6 +9,13 @@ repository.workspace = true keywords = ["blockchain", "cosmos", "tendermint", "cycles", "quartz"] readme = "README.md" +[lib] +path = "src/lib.rs" + +[[bin]] +name = "submit" +path = "src/bin/submit.rs" + [dependencies] # external async-trait.workspace = true @@ -26,10 +33,14 @@ tokio.workspace = true tracing.workspace = true tracing-subscriber.workspace = true uuid.workspace = true +anyhow ={ version = "*"} # cosmos cosmrs.workspace = true cosmwasm-std.workspace = true +# quartz +cw-tee-mtcs = { path = "../../apps/mtcs/contracts/cw-tee-mtcs/" } + [dev-dependencies] rand_core.workspace = true diff --git a/utils/cycles-sync/src/bin/submit.rs b/utils/cycles-sync/src/bin/submit.rs new file mode 100644 index 00000000..872a830c --- /dev/null +++ b/utils/cycles-sync/src/bin/submit.rs @@ -0,0 +1,411 @@ +use std::{ + collections::{HashMap, HashSet}, + env, + error::Error, + fs::File, + io::{BufReader, BufWriter, Write}, + path::PathBuf, + str::FromStr, +}; + +use anyhow::anyhow; +use bip32::{ + secp256k1::{ + ecdsa::VerifyingKey, + sha2::{Digest, Sha256}, + }, + Error as Bip32Error, Language, Mnemonic, Prefix, PrivateKey, Seed, XPrv, +}; +use clap::Parser; +use cosmrs::{ + tendermint::account::Id as TmAccountId, tendermint::chain::Id as TmChainId, AccountId, +}; +use cosmwasm_std::{Addr, HexBinary, StdError}; +use cw_tee_mtcs::state::{LiquiditySource, LiquiditySourceType}; +use serde::{Deserialize, Serialize}; +use serde_json::json; +use subtle_encoding::{bech32::decode as bech32_decode, Error as Bech32DecodeError}; +use tracing::{debug, Level}; +use uuid::Uuid; + +use cycles_sync::{ + obligato_client::{http::HttpClient, Client}, + types::{ + ContractObligation, Obligation, ObligatoObligation, ObligatoSetOff, RawEncryptedObligation, + RawObligation, RawOffset, RawSetOff, SubmitObligationsMsg, SubmitObligationsMsgInner, + }, + wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}, +}; + +use reqwest::Url; + +const MNEMONIC_PHRASE: &str = "clutch debate vintage foster barely primary clown leader sell manual leopard ladder wet must embody story oyster imitate cable alien six square rice wedding"; + +const ADDRESS_PREFIX: &str = "wasm"; + +type Sha256Digest = [u8; 32]; + +#[derive(Clone, Debug, Serialize, Deserialize)] +struct QueryAllSetoffsResponse { + setoffs: Vec<(HexBinary, RawSetOff)>, +} + +#[derive(Clone, Debug, Parser)] +#[command(version, about, long_about = None)] +struct Cli { + #[arg(short, long, value_parser = wasmaddr_to_id)] + mtcs: AccountId, + + #[arg(short, long)] + epoch_pk: String, + + #[arg(short, long)] + overdraft: String, + + #[clap(long)] + flip: bool, + + #[arg( + short, + long, + default_value = "wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70" + )] + admin: String, +} + +#[tokio::main] +async fn main() -> Result<(), anyhow::Error> { + let cli = Cli::parse(); + let mut alice = Addr::unchecked("wasm124tuy67a9dcvfgcr4gjmz60syd8ddaugl33v0n"); + let mut bob = Addr::unchecked("wasm1ctkqmg45u85jnf5ur9796h7ze4hj6ep5y7m7l6"); + let overdraft = Addr::unchecked(cli.overdraft); + + if cli.flip { + let temp = alice.clone(); + alice = bob; + bob = temp; + } + + let alice_to_bob: ContractObligation = ContractObligation { + debtor: alice.clone(), + creditor: bob.clone(), + amount: 10, + salt: HexBinary::from([0; 64]), + }; + + let bob_acceptance: ContractObligation = ContractObligation { + debtor: bob.clone(), + creditor: overdraft.clone(), + amount: 10, + salt: HexBinary::from([0; 64]), + }; + + let alice_tender: ContractObligation = ContractObligation { + debtor: overdraft.clone(), + creditor: alice.clone(), + amount: 10, + salt: HexBinary::from([0; 64]), + }; + + let intents = vec![alice_to_bob, bob_acceptance, alice_tender]; + let epoch_pk = VerifyingKey::from_sec1_bytes(&hex::decode(cli.epoch_pk).unwrap()).unwrap(); + + let intents_enc = encrypt_overdraft_intents(intents, &epoch_pk); + + let liquidity_sources: Vec = vec![LiquiditySource { + address: overdraft, + source_type: LiquiditySourceType::Overdraft, + }]; + + let msg = create_wasm_msg(intents_enc, liquidity_sources)?; + + let node_url = Url::parse("http://143.244.186.205:26657")?; + let chain_id = TmChainId::from_str("testing")?; + + let wasmd_client = CliWasmdClient::new(node_url); + + wasmd_client.tx_execute(&cli.mtcs, &chain_id, 3000000, cli.admin.to_string(), msg)?; + + Ok(()) +} + +pub struct OverdraftObligation { + pub debtor: Addr, + pub creditor: Addr, + pub amount: u64, +} + +fn encrypt_overdraft_intents( + intents: Vec, + epoch_pk: &VerifyingKey, +) -> Vec<(Sha256Digest, Vec)> { + let mut intents_enc = vec![]; + + for i in intents { + // serialize intent + let i_ser = serde_json::to_string(&i).unwrap(); + + // encrypt intent + let i_cipher = ecies::encrypt(&epoch_pk.to_sec1_bytes(), i_ser.as_bytes()).unwrap(); + + // hash intent + let i_digest: Sha256Digest = { + let mut hasher = Sha256::new(); + hasher.update(i_ser); + hasher.finalize().into() + }; + + intents_enc.push((i_digest, i_cipher)); + } + + intents_enc +} + +fn address_from_uuid(uuid: Uuid) -> anyhow::Result<()> { + let seed = global_seed()?; + let sk = derive_child_xprv(&seed, uuid); + let pk_b = sk.public_key().public_key().to_sec1_bytes(); + let pk = VerifyingKey::from_sec1_bytes(&pk_b)?; + println!("{}", wasm_address(pk)); + Ok(()) +} + +fn wasm_address(pk: VerifyingKey) -> String { + let tm_pk = TmAccountId::from(pk); + AccountId::new(ADDRESS_PREFIX, tm_pk.as_bytes()) + .unwrap() + .to_string() +} + +fn global_seed() -> Result { + let mnemonic = Mnemonic::new(MNEMONIC_PHRASE, Language::English)?; + Ok(mnemonic.to_seed("password")) +} + +fn create_wasm_msg( + obligations_enc: Vec<(Sha256Digest, Vec)>, + liquidity_sources: Vec, +) -> anyhow::Result { + let obligations_enc: Vec<_> = obligations_enc + .into_iter() + .map(|(digest, ciphertext)| { + let digest = HexBinary::from(digest); + let ciphertext = HexBinary::from(ciphertext); + RawEncryptedObligation { digest, ciphertext } + }) + .collect(); + + let msg = SubmitObligationsMsg { + submit_obligations: SubmitObligationsMsgInner { + obligations: obligations_enc, + liquidity_sources, + }, + }; + serde_json::to_value(msg).map_err(Into::into) +} + +fn encrypt_intents( + intents: Vec, + keys: &HashMap, + epoch_pk: &VerifyingKey, +) -> Vec<(Sha256Digest, Vec)> { + let mut intents_enc = vec![]; + let mut intent_user_map = HashMap::new(); + + for i in intents { + // create an intent + let ro = { + let o = Obligation { + debtor: keys[&i.debtor_id].private_key().public_key(), + creditor: keys[&i.creditor_id].private_key().public_key(), + amount: i.amount, + salt: [0; 64], + }; + RawObligation::from(o) + }; + + // serialize intent + let i_ser = serde_json::to_string(&ro).unwrap(); + + // encrypt intent + let i_cipher = ecies::encrypt(&epoch_pk.to_sec1_bytes(), i_ser.as_bytes()).unwrap(); + + // hash intent + let i_digest: Sha256Digest = { + let mut hasher = Sha256::new(); + hasher.update(i_ser); + hasher.finalize().into() + }; + + intents_enc.push((i_digest, i_cipher)); + intent_user_map.insert(HexBinary::from(i_digest), (i.debtor_id, i.creditor_id)); + } + + intents_enc +} + +fn add_default_acceptances(obligations: &mut Vec, liquidity_sources: &[Uuid]) { + let acceptances = obligations.iter().fold(HashSet::new(), |mut acc, o| { + if !liquidity_sources.contains(&o.debtor_id) { + for ls in liquidity_sources { + let acceptance = ObligatoObligation { + id: Default::default(), + debtor_id: o.creditor_id, + creditor_id: *ls, + amount: u32::MAX as u64, + }; + acc.insert(acceptance); + } + } + acc + }); + + obligations.extend(acceptances.into_iter().collect::>()); +} + +fn read_keys_file(keys_file: PathBuf) -> anyhow::Result> { + let keys_file = File::open(keys_file)?; + let keys_reader = BufReader::new(keys_file); + let keys: HashMap = serde_json::from_reader(keys_reader)?; + Ok(keys + .into_iter() + .map(|(id, key_str)| (id, XPrv::from_str(&key_str).unwrap())) + .collect()) +} + +fn write_keys_to_file(output_file: PathBuf, keys: &HashMap) { + let keys_str: HashMap<_, _> = keys + .iter() + .map(|(id, k)| (id, k.to_string(Prefix::XPRV).to_string())) + .collect(); + + let output_file = File::create(output_file).expect("create file"); + let mut output_reader = BufWriter::new(output_file); + output_reader + .write_all(serde_json::to_string(&keys_str).unwrap().as_bytes()) + .expect("write file"); +} + +fn read_obligation_user_map_file( + file: PathBuf, +) -> anyhow::Result> { + let map_file = File::open(file)?; + let map_reader = BufReader::new(map_file); + serde_json::from_reader(map_reader).map_err(Into::into) +} + +fn write_obligation_user_map_to_file( + output_file: PathBuf, + obligation_user_map: &HashMap, +) { + let output_file = File::create(output_file).expect("create file"); + let mut output_reader = BufWriter::new(output_file); + output_reader + .write_all( + serde_json::to_string(&obligation_user_map) + .unwrap() + .as_bytes(), + ) + .expect("write file"); +} + +fn derive_keys( + obligations: &mut Vec, + liquidity_sources: &[Uuid], +) -> anyhow::Result> { + // Derive a BIP39 seed value using the given password + let seed = global_seed()?; + + obligations.sort_by_key(|o| o.debtor_id); + + let mut keys = HashMap::new(); + + for ls in liquidity_sources { + keys.entry(*ls) + .or_insert_with(|| derive_child_xprv(&seed, *ls)); + } + + for o in obligations { + keys.entry(o.debtor_id) + .or_insert_with(|| derive_child_xprv(&seed, o.debtor_id)); + keys.entry(o.creditor_id) + .or_insert_with(|| derive_child_xprv(&seed, o.creditor_id)); + } + + Ok(keys) +} + +fn derive_child_xprv(seed: &Seed, uuid: Uuid) -> XPrv { + // Hash the UUID using SHA-256 + let mut hasher = Sha256::new(); + hasher.update(uuid.as_bytes()); + let uuid_digest = hasher.finalize(); + + // Convert the hash bytes to a number + let uuid_digest_num = u128::from_be_bytes(uuid_digest[..16].try_into().unwrap()); + + // Take modulo (2^31 - 1) + let address_index = uuid_digest_num % ((1u128 << 31) - 1); + + let child_path = format!("m/0/44'/118'/0'/0/{address_index}") + .parse() + .unwrap(); + let child_xprv = XPrv::derive_from_path(seed, &child_path); + child_xprv.unwrap() +} + +#[cfg(test)] +mod tests { + use std::{error::Error, str::FromStr}; + + use bip32::{Mnemonic, Prefix, PrivateKey, XPrv}; + use rand_core::OsRng; + use uuid::Uuid; + + use crate::{derive_child_xprv, global_seed}; + + #[test] + fn test_create_mnemonic() { + // Generate random Mnemonic using the default language (English) + let mnemonic = Mnemonic::random(&mut OsRng, Default::default()); + println!("{}", mnemonic.phrase()); + } + + #[test] + fn test_enc_dec_for_derived() -> Result<(), Box> { + let seed = global_seed()?; + + let alice_uuid = Uuid::from_u128(1); + let alice_sk = derive_child_xprv(&seed, alice_uuid); + let alice_pk = alice_sk.private_key().public_key(); + + assert_eq!( + alice_pk.to_sec1_bytes(), + hex::decode("0219b0b8ee5fe9b317b69119fd15170d79737380c4f020e251b7839096f5513ccf") + .unwrap() + .into() + ); + + let alice_sk_str = alice_sk.to_string(Prefix::XPRV).to_string(); + assert_eq!(XPrv::from_str(&alice_sk_str).unwrap(), alice_sk); + + let msg = r#"{"debtor":"02027e3510f66f1f6c1ea5e3600062255928e518220f7883810cac3fc7fc092057","creditor":"0216254f4636c4e68ae22d98538851a46810b65162fe37bf57cba6d563617c913e","amount":10,"salt":"65c188bcc133add598f7eecc449112f4bf61024345316cff0eb5ce61291991b141073dcd3c543ea142e66fffa8f483dc382043d37e490ef9b8069c489ce94a0b"}"#; + let ciphertext = ecies::encrypt(&alice_pk.to_sec1_bytes(), msg.as_bytes()).unwrap(); + // println!("{}", hex::encode(&ciphertext)); + + let msg_dec = + ecies::decrypt(&alice_sk.private_key().to_bytes(), ciphertext.as_slice()).unwrap(); + assert_eq!(msg, String::from_utf8(msg_dec).unwrap().as_str()); + + Ok(()) + } +} + +fn wasmaddr_to_id(address_str: &str) -> anyhow::Result { + let (hr, _) = bech32_decode(address_str).map_err(|e| anyhow!(e))?; + if hr != ADDRESS_PREFIX { + return Err(anyhow!(hr)); + } + + Ok(address_str.parse().unwrap()) +} diff --git a/utils/cycles-sync/src/cli.rs b/utils/cycles-sync/src/cli.rs index 194f7049..e30d6078 100644 --- a/utils/cycles-sync/src/cli.rs +++ b/utils/cycles-sync/src/cli.rs @@ -8,7 +8,7 @@ use subtle_encoding::{bech32::decode as bech32_decode, Error as Bech32DecodeErro use thiserror::Error; use uuid::Uuid; -use crate::ADDRESS_PREFIX; +const ADDRESS_PREFIX: &str = "wasm"; #[derive(Clone, Debug, Parser)] #[command(author, version, about)] diff --git a/utils/cycles-sync/src/lib.rs b/utils/cycles-sync/src/lib.rs index cd408564..2c526337 100644 --- a/utils/cycles-sync/src/lib.rs +++ b/utils/cycles-sync/src/lib.rs @@ -1 +1,4 @@ +pub mod cli; +pub mod obligato_client; pub mod types; +pub mod wasmd_client; diff --git a/utils/cycles-sync/src/main.rs b/utils/cycles-sync/src/main.rs index 57805b58..1590ad89 100644 --- a/utils/cycles-sync/src/main.rs +++ b/utils/cycles-sync/src/main.rs @@ -27,7 +27,7 @@ use crate::{ obligato_client::{http::HttpClient, Client}, types::{ Obligation, ObligatoObligation, ObligatoSetOff, RawEncryptedObligation, RawObligation, - RawOffset, RawSetOff, SubmitObligationsMsg, SubmitObligationsMsgInner, + RawOffset, RawSetOff, SubmitObligatioMsg, SubmitObligatoObligationsMsgInner, }, wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}, }; @@ -202,8 +202,8 @@ fn create_wasm_msg( .map(|pk| HexBinary::from(pk.to_sec1_bytes().as_ref())) .collect(); - let msg = SubmitObligationsMsg { - submit_obligations: SubmitObligationsMsgInner { + let msg = SubmitObligatioMsg { + submit_obligations: SubmitObligatoObligationsMsgInner { obligations: obligations_enc, liquidity_sources, }, diff --git a/utils/cycles-sync/src/types.rs b/utils/cycles-sync/src/types.rs index 428f1134..acb352b9 100644 --- a/utils/cycles-sync/src/types.rs +++ b/utils/cycles-sync/src/types.rs @@ -1,5 +1,6 @@ use bip32::secp256k1::ecdsa::VerifyingKey; -use cosmwasm_std::HexBinary; +use cosmwasm_std::{Addr, HexBinary}; +use cw_tee_mtcs::state::LiquiditySource; use serde::{Deserialize, Serialize}; use uuid::Uuid; @@ -11,6 +12,15 @@ pub struct ObligatoObligation { pub amount: u64, } +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct ContractObligation { + pub debtor: Addr, + pub creditor: Addr, + pub amount: u64, + #[serde(default)] + pub salt: HexBinary, +} + #[derive(Clone, Debug, Serialize, Deserialize)] pub struct RawObligation { pub debtor: HexBinary, @@ -52,6 +62,17 @@ pub struct SubmitObligationsMsg { #[derive(Clone, Debug, Serialize, Deserialize)] pub struct SubmitObligationsMsgInner { + pub obligations: Vec, + pub liquidity_sources: Vec, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct SubmitObligatioMsg { + pub submit_obligations: SubmitObligatoObligationsMsgInner, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct SubmitObligatoObligationsMsgInner { pub obligations: Vec, pub liquidity_sources: Vec, } diff --git a/utils/cycles-sync/src/wasmd_client.rs b/utils/cycles-sync/src/wasmd_client.rs index 14e4c851..6cb3d605 100644 --- a/utils/cycles-sync/src/wasmd_client.rs +++ b/utils/cycles-sync/src/wasmd_client.rs @@ -1,22 +1,30 @@ -use std::{error::Error, process::Command}; +use std::process::Command; +use anyhow::anyhow; use cosmrs::{tendermint::chain::Id, AccountId}; +use hex::ToHex; use reqwest::Url; -use serde::{Deserialize, Serialize}; -use tracing::debug; +use serde::{de::DeserializeOwned, Deserialize, Serialize}; pub trait WasmdClient { type Address: AsRef; type Query: ToString; + type RawQuery: ToHex; type ChainId: AsRef; type Error; - fn query_smart( + fn query_smart( &self, contract: &Self::Address, query: Self::Query, ) -> Result; + fn query_raw( + &self, + contract: &Self::Address, + query: Self::RawQuery, + ) -> Result; + fn tx_execute( &self, contract: &Self::Address, @@ -24,22 +32,28 @@ pub trait WasmdClient { gas: u64, sender: String, msg: M, - ) -> Result<(), Self::Error>; -} + ) -> Result; -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct QueryResult { - pub data: T, -} + fn deploy( + &self, + chain_id: &Id, + sender: String, // what should this type be + wasm_path: M, + ) -> Result; -pub trait FromVec: Sized { - fn from_vec(value: Vec) -> Self; + fn init( + &self, + chain_id: &Id, + sender: String, + code_id: usize, + init_msg: M, + label: String + ) -> Result; } -impl Deserialize<'any>> FromVec for T { - fn from_vec(value: Vec) -> Self { - serde_json::from_slice(&value).unwrap() - } +#[derive(Clone, Debug, Serialize, Deserialize, Default)] +pub struct QueryResult { + pub data: T, } #[derive(Clone, Debug)] @@ -56,10 +70,11 @@ impl CliWasmdClient { impl WasmdClient for CliWasmdClient { type Address = AccountId; type Query = serde_json::Value; + type RawQuery = String; type ChainId = Id; - type Error = Box; + type Error = anyhow::Error; - fn query_smart( + fn query_smart( &self, contract: &Self::Address, query: Self::Query, @@ -73,9 +88,34 @@ impl WasmdClient for CliWasmdClient { .args(["--output", "json"]); let output = command.output()?; - debug!("{:?} => {:?}", 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) + } + + fn query_raw( + &self, + contract: &Self::Address, + query: Self::RawQuery, + ) -> Result { + let mut wasmd = Command::new("wasmd"); + let command = wasmd + .args(["--node", self.url.as_str()]) + .args(["query", "wasm"]) + .args(["contract-state", "raw", contract.as_ref()]) + .arg(query.to_string()) + .args(["--output", "json"]); + + let output = command.output()?; + if !output.status.success() { + return Err(anyhow!("{:?}", output)); + } - let query_result = R::from_vec(output.stdout); + let query_result: R = serde_json::from_slice(&output.stdout).unwrap_or_default(); Ok(query_result) } @@ -86,7 +126,7 @@ impl WasmdClient for CliWasmdClient { gas: u64, sender: String, msg: M, - ) -> Result<(), Self::Error> { + ) -> Result { let mut wasmd = Command::new("wasmd"); let command = wasmd .args(["--node", self.url.as_str()]) @@ -99,12 +139,74 @@ impl WasmdClient for CliWasmdClient { .arg("-y"); let output = command.output()?; - debug!("{:?} => {:?}", command, output); - if output.status.success() { - println!("{}", String::from_utf8(output.stdout).unwrap()); + if !output.status.success() { + return Err(anyhow!("{:?}", output)); + } + + // TODO: find the rust type for the tx output and return that + Ok(format!("{}", String::from_utf8(output.stdout)?)) + } + + fn deploy( + &self, + chain_id: &Id, + sender: String, + wasm_path: M, + ) -> Result { + let mut wasmd = Command::new("wasmd"); + let command = wasmd + .args(&["--node", self.url.as_str()]) + .args(&["tx", "wasm", "store", &wasm_path.to_string()]) + .args(&["--from", sender.as_ref()]) + .args(&["--chain-id", chain_id.as_ref()]) + .args(&["--gas-prices", "0.0025ucosm"]) + .args(&["--gas", "auto"]) + .args(&["--gas-adjustment", "1.3"]) + .args(&["-o", "json"]) + .arg("-y"); + + + let output = command.output()?; + + if !output.status.success() { + return Err(anyhow!("{:?}", output)); + } + + // TODO: find the rust type for the tx output and return that + Ok(format!("{}", String::from_utf8(output.stdout)?)) + } + + fn init( + &self, + chain_id: &Id, + sender: String, + code_id: usize, + init_msg: M, + label: String + ) -> Result { + let mut wasmd = Command::new("wasmd"); + let command = wasmd + .args(&["--node", self.url.as_str()]) + .args(&["tx", "wasm", "instantiate"]) + .args(&[&code_id.to_string(), &init_msg.to_string()]) + .args(&["--label", label.as_ref()]) + .args(&["--from", sender.as_ref()]) + .arg("--no-admin") + .args(&["--chain-id", chain_id.as_ref()]) + .args(&["--gas-prices", "0.0025ucosm"]) + .args(&["--gas", "auto"]) + .args(&["--gas-adjustment", "1.3"]) + .args(&["-o", "json"]) + .arg("-y"); + + let output = command.output()?; + + if !output.status.success() { + return Err(anyhow!("{:?}", output)); } - Ok(()) + // TODO: find the rust type for the tx output and return that + Ok(format!("{}", String::from_utf8(output.stdout)?)) } } diff --git a/utils/tm-prover/Cargo.toml b/utils/tm-prover/Cargo.toml index 2fc1e1f5..d7e6e937 100644 --- a/utils/tm-prover/Cargo.toml +++ b/utils/tm-prover/Cargo.toml @@ -9,6 +9,10 @@ repository.workspace = true keywords = ["blockchain", "cosmos", "tendermint", "cycles", "quartz"] readme = "README.md" +[[bin]] +name = "main" +path = "src/main.rs" + [dependencies] # external clap.workspace = true @@ -28,4 +32,4 @@ tendermint-light-client.workspace = true tendermint-light-client-detector.workspace = true # quartz -cw-proof.workspace = true +cw-proof.workspace = true \ No newline at end of file diff --git a/utils/tm-prover/src/cli.rs b/utils/tm-prover/src/cli.rs new file mode 100644 index 00000000..e6489884 --- /dev/null +++ b/utils/tm-prover/src/cli.rs @@ -0,0 +1,113 @@ +use std::{path::PathBuf, str::FromStr}; + +use clap::Parser; +use color_eyre::eyre::{eyre, Result}; +use cosmrs::AccountId; +use cw_proof::proof::cw::RawCwProof; +use serde::{Deserialize, Serialize}; +use tendermint_light_client::types::{Hash, Height, LightBlock, TrustThreshold}; +use tendermint_rpc::HttpClientUrl; +use tracing::metadata::LevelFilter; + +pub fn parse_trust_threshold(s: &str) -> Result { + if let Some((l, r)) = s.split_once('/') { + TrustThreshold::new(l.parse()?, r.parse()?).map_err(Into::into) + } else { + Err(eyre!( + "invalid trust threshold: {s}, format must be X/Y where X and Y are integers" + )) + } +} + +#[derive(Clone, Debug)] +pub struct List(pub Vec); + +impl> FromStr for List { + type Err = E; + + fn from_str(s: &str) -> Result { + s.split(',') + .map(|s| s.parse()) + .collect::, _>>() + .map(Self) + } +} + +#[derive(clap::Args, Debug, Clone)] +pub struct Verbosity { + /// Increase verbosity, can be repeated up to 2 times + #[arg(long, short, action = clap::ArgAction::Count)] + pub verbose: u8, +} + +impl Verbosity { + pub fn to_level_filter(&self) -> LevelFilter { + match self.verbose { + 0 => LevelFilter::INFO, + 1 => LevelFilter::DEBUG, + _ => LevelFilter::TRACE, + } + } +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct ProofOutput { + pub light_client_proof: Vec, + pub merkle_proof: RawCwProof, +} + +#[derive(Debug, Parser)] +#[command(author, version, about, long_about = None)] +pub struct Cli { + /// Identifier of the chain + #[clap(long)] + pub chain_id: String, + + /// Primary RPC address + #[clap(long, default_value = "http://127.0.0.1:26657")] + pub primary: HttpClientUrl, + + /// Comma-separated list of witnesses RPC addresses + #[clap(long)] + pub witnesses: List, + + /// Height of trusted header + #[clap(long)] + pub trusted_height: Height, + + /// Hash of trusted header + #[clap(long)] + pub trusted_hash: Hash, + + /// Trust threshold + #[clap(long, value_parser = parse_trust_threshold, default_value_t = TrustThreshold::TWO_THIRDS)] + pub trust_threshold: TrustThreshold, + + /// Trusting period, in seconds (default: two weeks) + #[clap(long, default_value = "1209600")] + pub trusting_period: u64, + + /// Maximum clock drift, in seconds + #[clap(long, default_value = "5")] + pub max_clock_drift: u64, + + /// Maximum block lag, in seconds + #[clap(long, default_value = "5")] + pub max_block_lag: u64, + + /// Output file to store light client proof (AKA verification trace) + #[clap(long)] + pub trace_file: Option, + + /// Increase verbosity + #[clap(flatten)] + pub verbose: Verbosity, + + /// Address of the CosmWasm contract + #[clap(long)] + pub contract_address: AccountId, + + /// Storage key of the state item for which proofs must be retrieved + #[clap(long)] + pub storage_key: String, +} diff --git a/utils/tm-prover/src/lib.rs b/utils/tm-prover/src/lib.rs new file mode 100644 index 00000000..c469e69c --- /dev/null +++ b/utils/tm-prover/src/lib.rs @@ -0,0 +1,2 @@ +pub mod cli; +pub mod prover; diff --git a/utils/tm-prover/src/main.rs b/utils/tm-prover/src/main.rs index ed8902e2..dd5cbf9a 100644 --- a/utils/tm-prover/src/main.rs +++ b/utils/tm-prover/src/main.rs @@ -1,152 +1,6 @@ -#![deny( - warnings, - trivial_casts, - trivial_numeric_casts, - unused_import_braces, - unused_qualifications -)] -#![forbid(unsafe_code)] - -use std::{ - fs::File, - io::{BufWriter, Write}, - path::PathBuf, - str::FromStr, - time::Duration, -}; - use clap::Parser; -use color_eyre::{ - eyre::{eyre, Result}, - Report, -}; -use cosmrs::AccountId; -use cw_proof::{ - error::ProofError, - proof::{ - cw::{CwProof, RawCwProof}, - key::CwAbciKey, - Proof, - }, -}; -use futures::future::join_all; -use serde::{Deserialize, Serialize}; -use tendermint::{crypto::default::Sha256, evidence::Evidence}; -use tendermint_light_client::{ - builder::LightClientBuilder, - light_client::Options, - store::memory::MemoryStore, - types::{Hash, Height, LightBlock, TrustThreshold}, -}; -use tendermint_light_client_detector::{detect_divergence, Error, Provider, Trace}; -use tendermint_rpc::{client::HttpClient, Client, HttpClientUrl}; -use tracing::{error, info, metadata::LevelFilter}; -use tracing_subscriber::{util::SubscriberInitExt, EnvFilter}; - -const WASM_STORE_KEY: &str = "/store/wasm/key"; - -fn parse_trust_threshold(s: &str) -> Result { - if let Some((l, r)) = s.split_once('/') { - TrustThreshold::new(l.parse()?, r.parse()?).map_err(Into::into) - } else { - Err(eyre!( - "invalid trust threshold: {s}, format must be X/Y where X and Y are integers" - )) - } -} - -#[derive(Clone, Debug)] -struct List(Vec); - -impl> FromStr for List { - type Err = E; - - fn from_str(s: &str) -> Result { - s.split(',') - .map(|s| s.parse()) - .collect::, _>>() - .map(Self) - } -} - -#[derive(clap::Args, Debug, Clone)] -struct Verbosity { - /// Increase verbosity, can be repeated up to 2 times - #[arg(long, short, action = clap::ArgAction::Count)] - verbose: u8, -} - -impl Verbosity { - fn to_level_filter(&self) -> LevelFilter { - match self.verbose { - 0 => LevelFilter::INFO, - 1 => LevelFilter::DEBUG, - _ => LevelFilter::TRACE, - } - } -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -struct ProofOutput { - light_client_proof: Vec, - merkle_proof: RawCwProof, -} - -#[derive(Debug, Parser)] -#[command(author, version, about, long_about = None)] -struct Cli { - /// Identifier of the chain - #[clap(long)] - chain_id: String, - - /// Primary RPC address - #[clap(long, default_value = "http://127.0.0.1:26657")] - primary: HttpClientUrl, - - /// Comma-separated list of witnesses RPC addresses - #[clap(long)] - witnesses: List, - - /// Height of trusted header - #[clap(long)] - trusted_height: Height, - - /// Hash of trusted header - #[clap(long)] - trusted_hash: Hash, - - /// Trust threshold - #[clap(long, value_parser = parse_trust_threshold, default_value_t = TrustThreshold::TWO_THIRDS)] - trust_threshold: TrustThreshold, - - /// Trusting period, in seconds (default: two weeks) - #[clap(long, default_value = "1209600")] - trusting_period: u64, - - /// Maximum clock drift, in seconds - #[clap(long, default_value = "5")] - max_clock_drift: u64, - - /// Maximum block lag, in seconds - #[clap(long, default_value = "5")] - max_block_lag: u64, - - /// Output file to store light client proof (AKA verification trace) - #[clap(long)] - trace_file: Option, - - /// Increase verbosity - #[clap(flatten)] - verbose: Verbosity, - - /// Address of the CosmWasm contract - #[clap(long)] - contract_address: AccountId, - - /// Storage key of the state item for which proofs must be retrieved - #[clap(long)] - storage_key: String, -} +use color_eyre::eyre::Result; +use tm_prover::{cli::Cli, prover::proof}; #[tokio::main] async fn main() -> Result<()> { @@ -154,208 +8,5 @@ async fn main() -> Result<()> { let args = Cli::parse(); - let env_filter = EnvFilter::builder() - .with_default_directive(args.verbose.to_level_filter().into()) - .from_env_lossy(); - - tracing_subscriber::fmt() - .with_target(false) - .with_env_filter(env_filter) - .finish() - .init(); - - let options = Options { - trust_threshold: args.trust_threshold, - trusting_period: Duration::from_secs(args.trusting_period), - clock_drift: Duration::from_secs(args.max_clock_drift), - }; - - let mut primary = make_provider( - &args.chain_id, - args.primary.clone(), - args.trusted_height, - args.trusted_hash, - options, - ) - .await?; - - let client = HttpClient::builder(args.primary.clone()).build()?; - - let trusted_block = primary - .latest_trusted() - .ok_or_else(|| eyre!("No trusted state found for primary"))?; - - let status = client.status().await?; - let latest_height = status.sync_info.latest_block_height; - let latest_app_hash = status.sync_info.latest_app_hash; - - // `proof_height` is the height at which we want to query the blockchain's state - // This is one less than than the `latest_height` because we want to verify the merkle-proof for - // the state against the `app_hash` at `latest_height`. - // (because Tendermint commits to the latest `app_hash` in the subsequent block) - let proof_height = (latest_height.value() - 1) - .try_into() - .expect("infallible conversion"); - - info!("Verifying to latest height on primary..."); - - let primary_block = primary.verify_to_height(latest_height)?; - - info!("Verified to height {} on primary", primary_block.height()); - let mut primary_trace = primary.get_trace(primary_block.height()); - - let witnesses = join_all(args.witnesses.0.into_iter().map(|addr| { - make_provider( - &args.chain_id, - addr, - trusted_block.height(), - trusted_block.signed_header.header.hash(), - options, - ) - })) - .await; - - let mut witnesses = witnesses.into_iter().collect::>>()?; - - let max_clock_drift = Duration::from_secs(args.max_clock_drift); - let max_block_lag = Duration::from_secs(args.max_block_lag); - - run_detector( - &mut primary, - witnesses.as_mut_slice(), - primary_trace.clone(), - max_clock_drift, - max_block_lag, - ) - .await?; - - let path = WASM_STORE_KEY.to_owned(); - let data = CwAbciKey::new(args.contract_address, args.storage_key, None); - let result = client - .abci_query(Some(path), data, Some(proof_height), true) - .await?; - - let proof: CwProof = result - .clone() - .try_into() - .expect("result should contain proof"); - proof - .verify(latest_app_hash.clone().into()) - .map_err(|e: ProofError| eyre!(e))?; - - if let Some(trace_file) = args.trace_file { - // replace the last block in the trace (i.e. the (latest - 1) block) with the latest block - // we don't actually verify the latest block because it will be verified on the other side - let latest_block = primary.fetch_light_block(latest_height)?; - let _ = primary_trace.pop(); - primary_trace.push(latest_block); - - let output = ProofOutput { - light_client_proof: primary_trace, - merkle_proof: proof.into(), - }; - write_proof_to_file(trace_file, output).await?; - }; - - Ok(()) -} - -async fn write_proof_to_file(trace_file: PathBuf, output: ProofOutput) -> Result<()> { - info!("Writing proof to output file ({})", trace_file.display()); - - let file = File::create(trace_file)?; - let mut writer = BufWriter::new(file); - serde_json::to_writer(&mut writer, &output)?; - writer.flush()?; - Ok(()) -} - -async fn run_detector( - primary: &mut Provider, - witnesses: &mut [Provider], - primary_trace: Vec, - max_clock_drift: Duration, - max_block_lag: Duration, -) -> Result<(), Report> { - if witnesses.is_empty() { - return Err(Error::no_witnesses().into()); - } - - info!( - "Running misbehavior detection against {} witnesses...", - witnesses.len() - ); - - let primary_trace = Trace::new(primary_trace)?; - - for witness in witnesses { - let divergence = detect_divergence::( - Some(primary), - witness, - primary_trace.clone().into_vec(), - max_clock_drift, - max_block_lag, - ) - .await; - - let evidence = match divergence { - Ok(Some(divergence)) => divergence.evidence, - Ok(None) => { - info!( - "no divergence found between primary and witness {}", - witness.peer_id() - ); - - continue; - } - Err(e) => { - error!( - "failed to run attack detector against witness {}: {e}", - witness.peer_id() - ); - - continue; - } - }; - - // Report the evidence to the witness - witness - .report_evidence(Evidence::from(evidence.against_primary)) - .await - .map_err(|e| eyre!("failed to report evidence to witness: {}", e))?; - - if let Some(against_witness) = evidence.against_witness { - // Report the evidence to the primary - primary - .report_evidence(Evidence::from(against_witness)) - .await - .map_err(|e| eyre!("failed to report evidence to primary: {}", e))?; - } - } - - Ok(()) -} - -async fn make_provider( - chain_id: &str, - rpc_addr: HttpClientUrl, - trusted_height: Height, - trusted_hash: Hash, - options: Options, -) -> Result { - use tendermint_rpc::client::CompatMode; - - let rpc_client = HttpClient::builder(rpc_addr) - .compat_mode(CompatMode::V0_34) - .build()?; - - let node_id = rpc_client.status().await?.node_info.id; - let light_store = Box::new(MemoryStore::new()); - - let instance = - LightClientBuilder::prod(node_id, rpc_client.clone(), light_store, options, None) - .trust_primary_at(trusted_height, trusted_hash)? - .build(); - - Ok(Provider::new(chain_id.to_string(), instance, rpc_client)) + proof(args).await } diff --git a/utils/tm-prover/src/prover.rs b/utils/tm-prover/src/prover.rs new file mode 100644 index 00000000..bcafce3c --- /dev/null +++ b/utils/tm-prover/src/prover.rs @@ -0,0 +1,292 @@ +#![deny( + warnings, + trivial_casts, + trivial_numeric_casts, + unused_import_braces, + unused_qualifications +)] +#![forbid(unsafe_code)] + +use std::{ + fs::File, + io::{BufWriter, Write}, + path::PathBuf, + time::Duration, +}; + +use color_eyre::{ + eyre::{eyre, Result}, + Report, +}; +use cosmrs::AccountId; +use cw_proof::{ + error::ProofError, + proof::{cw::CwProof, key::CwAbciKey, Proof}, +}; +use futures::future::join_all; +use tendermint::{crypto::default::Sha256, evidence::Evidence, Hash}; +use tendermint_light_client::{ + builder::LightClientBuilder, + light_client::Options, + store::memory::MemoryStore, + types::{Height, LightBlock, TrustThreshold}, +}; +use tendermint_light_client_detector::{detect_divergence, Error, Provider, Trace}; +use tendermint_rpc::{client::HttpClient, Client, HttpClientUrl}; +use tracing::{error, info}; +use tracing_subscriber::{util::SubscriberInitExt, EnvFilter}; + +const WASM_STORE_KEY: &str = "/store/wasm/key"; + +use crate::cli::{Cli as TmProverCli, ProofOutput, Verbosity}; + +pub async fn proof_parse_with_defaults( + chain_id: String, + primary: &str, + witnesses: &str, + trusted_height: Height, + trusted_hash: Hash, + trace_file: &str, + verbose: u8, + contract_address: AccountId, + storage_key: &str, +) -> Result<()> { + proof(TmProverCli { + chain_id, + primary: primary.parse()?, + witnesses: witnesses.parse()?, + trusted_height: trusted_height, + trusted_hash: trusted_hash, + trust_threshold: TrustThreshold::TWO_THIRDS, // default + trusting_period: 1209600u64, // default + max_clock_drift: 5u64, // default + max_block_lag: 5u64, // default + trace_file: Some(trace_file.parse()?), + verbose: Verbosity { verbose }, + contract_address: contract_address, + storage_key: storage_key.to_owned(), + }) + .await +} + +pub async fn proof( + TmProverCli { + chain_id, + primary, + witnesses, + trusted_height, + trusted_hash, + trust_threshold, + trusting_period, + max_clock_drift, + max_block_lag, + trace_file, + verbose, + contract_address, + storage_key, + }: TmProverCli, +) -> Result<()> { + let env_filter = EnvFilter::builder() + .with_default_directive(verbose.to_level_filter().into()) + .from_env_lossy(); + + tracing_subscriber::fmt() + .with_target(false) + .with_env_filter(env_filter) + .finish() + .init(); + + let options = Options { + trust_threshold: trust_threshold, + trusting_period: Duration::from_secs(trusting_period), + clock_drift: Duration::from_secs(max_clock_drift), + }; + + let mut provider = make_provider( + &chain_id, + primary.clone(), + trusted_height, + trusted_hash, + options, + ) + .await?; + + let client = HttpClient::builder(primary.clone()).build()?; + + let trusted_block = provider + .latest_trusted() + .ok_or_else(|| eyre!("No trusted state found for primary"))?; + + let status = client.status().await?; + let latest_height = status.sync_info.latest_block_height; + let latest_app_hash = status.sync_info.latest_app_hash; + + // `proof_height` is the height at which we want to query the blockchain's state + // This is one less than than the `latest_height` because we want to verify the merkle-proof for + // the state against the `app_hash` at `latest_height`. + // (because Tendermint commits to the latest `app_hash` in the subsequent block) + let proof_height = (latest_height.value() - 1) + .try_into() + .expect("infallible conversion"); + + info!("Verifying to latest height on primary..."); + + let primary_block = provider.verify_to_height(latest_height)?; + + info!("Verified to height {} on primary", primary_block.height()); + let mut primary_trace = provider.get_trace(primary_block.height()); + let witnesses = join_all(witnesses.0.into_iter().map(|addr: HttpClientUrl| { + make_provider( + &chain_id, + addr, + trusted_block.height(), + trusted_block.signed_header.header.hash(), + options, + ) + })) + .await; + + let mut witnesses = witnesses.into_iter().collect::>>()?; + + let max_clock_drift = Duration::from_secs(max_clock_drift); + let max_block_lag = Duration::from_secs(max_block_lag); + + run_detector( + &mut provider, + witnesses.as_mut_slice(), + primary_trace.clone(), + max_clock_drift, + max_block_lag, + ) + .await?; + + let path = WASM_STORE_KEY.to_owned(); + let data = CwAbciKey::new(contract_address, storage_key, None); + let result = client + .abci_query(Some(path), data, Some(proof_height), true) + .await?; + + let proof: CwProof = result + .clone() + .try_into() + .expect("result should contain proof"); + proof + .verify(latest_app_hash.clone().into()) + .map_err(|e: ProofError| eyre!(e))?; + + if let Some(trace_file) = trace_file { + // replace the last block in the trace (i.e. the (latest - 1) block) with the latest block + // we don't actually verify the latest block because it will be verified on the other side + let latest_block = provider.fetch_light_block(latest_height)?; + let _ = primary_trace.pop(); + primary_trace.push(latest_block); + + let output = ProofOutput { + light_client_proof: primary_trace, + merkle_proof: proof.into(), + }; + write_proof_to_file(trace_file, output).await?; + }; + + Ok(()) +} + +async fn write_proof_to_file(trace_file: PathBuf, output: ProofOutput) -> Result<()> { + info!("Writing proof to output file ({})", trace_file.display()); + + let file = File::create(trace_file)?; + let mut writer = BufWriter::new(file); + serde_json::to_writer(&mut writer, &output)?; + writer.flush()?; + Ok(()) +} + +async fn run_detector( + primary: &mut Provider, + witnesses: &mut [Provider], + primary_trace: Vec, + max_clock_drift: Duration, + max_block_lag: Duration, +) -> Result<(), Report> { + if witnesses.is_empty() { + return Err(Error::no_witnesses().into()); + } + + info!( + "Running misbehavior detection against {} witnesses...", + witnesses.len() + ); + + let primary_trace = Trace::new(primary_trace)?; + + for witness in witnesses { + let divergence = detect_divergence::( + Some(primary), + witness, + primary_trace.clone().into_vec(), + max_clock_drift, + max_block_lag, + ) + .await; + + let evidence = match divergence { + Ok(Some(divergence)) => divergence.evidence, + Ok(None) => { + info!( + "no divergence found between primary and witness {}", + witness.peer_id() + ); + + continue; + } + Err(e) => { + error!( + "failed to run attack detector against witness {}: {e}", + witness.peer_id() + ); + + continue; + } + }; + + // Report the evidence to the witness + witness + .report_evidence(Evidence::from(evidence.against_primary)) + .await + .map_err(|e| eyre!("failed to report evidence to witness: {}", e))?; + + if let Some(against_witness) = evidence.against_witness { + // Report the evidence to the primary + primary + .report_evidence(Evidence::from(against_witness)) + .await + .map_err(|e| eyre!("failed to report evidence to primary: {}", e))?; + } + } + + Ok(()) +} + +async fn make_provider( + chain_id: &str, + rpc_addr: HttpClientUrl, + trusted_height: Height, + trusted_hash: Hash, + options: Options, +) -> Result { + use tendermint_rpc::client::CompatMode; + + let rpc_client = HttpClient::builder(rpc_addr) + .compat_mode(CompatMode::V0_34) + .build()?; + + let node_id = rpc_client.status().await?.node_info.id; + let light_store = Box::new(MemoryStore::new()); + + let instance = + LightClientBuilder::prod(node_id, rpc_client.clone(), light_store, options, None) + .trust_primary_at(trusted_height, trusted_hash)? + .build(); + + Ok(Provider::new(chain_id.to_string(), instance, rpc_client)) +} From cf266d24c68e063c6a355b44d442bd21719b7dd2 Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Fri, 26 Jul 2024 12:33:52 -0700 Subject: [PATCH 08/15] fmt --- .../contracts/cw-tee-mtcs/src/contract.rs | 27 ++-- apps/mtcs/contracts/cw-tee-mtcs/src/error.rs | 2 +- apps/mtcs/contracts/cw-tee-mtcs/src/lib.rs | 2 +- apps/mtcs/contracts/cw-tee-mtcs/src/msg.rs | 3 +- apps/mtcs/contracts/cw-tee-mtcs/src/state.rs | 2 +- apps/mtcs/enclave/src/lib.rs | 2 +- apps/mtcs/enclave/src/main.rs | 4 +- apps/mtcs/enclave/src/mtcs_server.rs | 21 ++- apps/mtcs/enclave/src/types.rs | 2 +- apps/mtcs/scripts/src/bin/deploy-mc.rs | 120 +++++++++--------- apps/mtcs/scripts/src/bin/deploy.rs | 71 +++++------ apps/mtcs/scripts/src/bin/handshake.rs | 22 ++-- apps/mtcs/scripts/src/bin/listen.rs | 88 ++++++++----- apps/mtcs/scripts/src/lib.rs | 2 +- apps/mtcs/scripts/src/types.rs | 2 +- apps/mtcs/scripts/src/utils.rs | 11 +- apps/transfers/enclave/src/main.rs | 4 +- .../transfers/enclave/src/transfers_server.rs | 4 +- utils/cycles-sync/src/bin/submit.rs | 15 +-- utils/cycles-sync/src/wasmd_client.rs | 9 +- utils/tm-prover/src/prover.rs | 8 +- 21 files changed, 229 insertions(+), 192 deletions(-) diff --git a/apps/mtcs/contracts/cw-tee-mtcs/src/contract.rs b/apps/mtcs/contracts/cw-tee-mtcs/src/contract.rs index 6ed4b0b2..8d9307d6 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/src/contract.rs +++ b/apps/mtcs/contracts/cw-tee-mtcs/src/contract.rs @@ -4,7 +4,6 @@ use cosmwasm_std::{ entry_point, to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, Uint128, Uint64, }; - use cw2::set_contract_version; use cw20_base::contract::query_balance as cw20_query_balance; use quartz_common::contract::{handler::RawHandler, state::EPOCH_COUNTER}; @@ -12,7 +11,10 @@ use quartz_common::contract::{handler::RawHandler, state::EPOCH_COUNTER}; use crate::{ error::ContractError, msg::{ - execute::{Cw20Transfer, FaucetMintMsg, SetLiquiditySourcesMsg, SubmitObligationMsg, SubmitObligationsMsg, SubmitSetoffsMsg}, + execute::{ + Cw20Transfer, FaucetMintMsg, SetLiquiditySourcesMsg, SubmitObligationMsg, + SubmitObligationsMsg, SubmitSetoffsMsg, + }, ExecuteMsg, InstantiateMsg, QueryMsg, }, state::{ @@ -68,7 +70,7 @@ pub fn execute( ExecuteMsg::Quartz(msg) => msg.handle_raw(deps, &env, &info).map_err(Into::into), ExecuteMsg::FaucetMint(FaucetMintMsg { recipient, amount }) => { execute::faucet_mint(deps, env, recipient, amount) - }, + } ExecuteMsg::Transfer(Cw20Transfer { recipient, amount }) => Ok( cw20_base::contract::execute_transfer(deps, env, info, recipient, amount.into())?, ), @@ -105,13 +107,14 @@ pub mod execute { use std::{collections::BTreeMap, ops::DerefMut}; use cosmwasm_std::{ - to_json_binary, Addr, DepsMut, Env, HexBinary, MessageInfo, Response, StdResult, Storage, SubMsg, Uint128, Uint64, WasmMsg + to_json_binary, Addr, DepsMut, Env, HexBinary, MessageInfo, Response, StdResult, Storage, + SubMsg, Uint128, Uint64, WasmMsg, }; use cw20_base::contract::{execute_burn, execute_mint}; use quartz_common::contract::state::{Hash, EPOCH_COUNTER}; + // use mtcs_overdraft::msg::ExecuteMsg as OverdraftExecuteMsg; use crate::msg::OverdraftExecuteMsg; // TODO: change when dependency issue fiexed - use crate::{ msg::execute::EscrowExecuteMsg, state::{ @@ -152,8 +155,8 @@ pub mod execute { let _: Hash = digest.to_array()?; // store the `(digest, ciphertext)` tuple - let obligs_key = ObligationsItem::new_dyn( - current_epoch_key(OBLIGATIONS_KEY, deps.storage)?); + let obligs_key = + ObligationsItem::new_dyn(current_epoch_key(OBLIGATIONS_KEY, deps.storage)?); let mut epoch_obligation = obligs_key.may_load(deps.storage)?.unwrap_or_default(); @@ -223,12 +226,12 @@ pub mod execute { // Payer is a liquidity source let msg = create_transfer_message(&source, &t, true)?; messages.push(msg); - }, + } (None, Some(source)) => { // Payee is a liquidity source let msg = create_transfer_message(&source, &t, false)?; messages.push(msg); - }, + } (_, _) => { // As of now, transfers should only be between a user and liquidity source. return Err(ContractError::LiquiditySourceNotFound {}); @@ -348,8 +351,8 @@ pub mod query { use crate::{ msg::{GetAllSetoffsResponse, GetLiquiditySourcesResponse}, state::{ - current_epoch_key, epoch_key, previous_epoch_key, SetoffsItem, - LIQUIDITY_SOURCES, LIQUIDITY_SOURCES_KEY, SETOFFS_KEY, + current_epoch_key, epoch_key, previous_epoch_key, SetoffsItem, LIQUIDITY_SOURCES, + LIQUIDITY_SOURCES_KEY, SETOFFS_KEY, }, }; @@ -375,4 +378,4 @@ pub mod query { Ok(GetLiquiditySourcesResponse { liquidity_sources }) } -} \ No newline at end of file +} diff --git a/apps/mtcs/contracts/cw-tee-mtcs/src/error.rs b/apps/mtcs/contracts/cw-tee-mtcs/src/error.rs index c2695f2c..6f66b14d 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/src/error.rs +++ b/apps/mtcs/contracts/cw-tee-mtcs/src/error.rs @@ -51,4 +51,4 @@ impl From for ContractError { fn from(e: Cw20ContractError) -> Self { Self::Cw20(e) } -} \ No newline at end of file +} diff --git a/apps/mtcs/contracts/cw-tee-mtcs/src/lib.rs b/apps/mtcs/contracts/cw-tee-mtcs/src/lib.rs index fec0be34..eca0b7ff 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/src/lib.rs +++ b/apps/mtcs/contracts/cw-tee-mtcs/src/lib.rs @@ -12,4 +12,4 @@ mod error; pub mod msg; pub mod state; -pub use crate::error::ContractError; \ No newline at end of file +pub use crate::error::ContractError; diff --git a/apps/mtcs/contracts/cw-tee-mtcs/src/msg.rs b/apps/mtcs/contracts/cw-tee-mtcs/src/msg.rs index dbdfb8be..9af0268e 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/src/msg.rs +++ b/apps/mtcs/contracts/cw-tee-mtcs/src/msg.rs @@ -63,9 +63,8 @@ pub mod execute { use quartz_common::contract::{msg::execute::attested::HasUserData, state::UserData}; use sha2::{Digest, Sha256}; - use crate::state::LiquiditySource; - use super::*; + use crate::state::LiquiditySource; #[cw_serde] pub struct FaucetMintMsg { diff --git a/apps/mtcs/contracts/cw-tee-mtcs/src/state.rs b/apps/mtcs/contracts/cw-tee-mtcs/src/state.rs index 7e88411b..87ef21b7 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/src/state.rs +++ b/apps/mtcs/contracts/cw-tee-mtcs/src/state.rs @@ -81,4 +81,4 @@ pub fn previous_epoch_key(key: &str, storage: &dyn Storage) -> Result Result { Ok(format!("{}/{}", epoch, key)) -} \ No newline at end of file +} diff --git a/apps/mtcs/enclave/src/lib.rs b/apps/mtcs/enclave/src/lib.rs index 3e1772e2..febacec6 100644 --- a/apps/mtcs/enclave/src/lib.rs +++ b/apps/mtcs/enclave/src/lib.rs @@ -1 +1 @@ -pub mod proto; \ No newline at end of file +pub mod proto; diff --git a/apps/mtcs/enclave/src/main.rs b/apps/mtcs/enclave/src/main.rs index 9a4f8ce3..a2a303ca 100644 --- a/apps/mtcs/enclave/src/main.rs +++ b/apps/mtcs/enclave/src/main.rs @@ -30,9 +30,9 @@ use quartz_common::{ contract::state::{Config, LightClientOpts}, enclave::{ attestor::{Attestor, DefaultAttestor}, - server::CoreService + server::CoreService, }, - proto::core_server::CoreServer + proto::core_server::CoreServer, }; use tonic::transport::Server; diff --git a/apps/mtcs/enclave/src/mtcs_server.rs b/apps/mtcs/enclave/src/mtcs_server.rs index 19683383..861ee7cb 100644 --- a/apps/mtcs/enclave/src/mtcs_server.rs +++ b/apps/mtcs/enclave/src/mtcs_server.rs @@ -16,7 +16,10 @@ use mtcs::{ algo::mcmf::primal_dual::PrimalDual, impls::complex_id::ComplexIdMtcs, obligation::SimpleObligation, prelude::DefaultMtcs, setoff::SimpleSetoff, Mtcs, }; -use quartz_common::{contract::{msg::execute::attested::RawAttested, state::Config}, enclave::{attestor::Attestor, server::ProofOfPublication}}; +use quartz_common::{ + contract::{msg::execute::attested::RawAttested, state::Config}, + enclave::{attestor::Attestor, server::ProofOfPublication}, +}; use serde::{Deserialize, Serialize}; use tonic::{Request, Response, Result as TonicResult, Status}; @@ -110,7 +113,12 @@ fn into_settle_offs( println!("\nliq sources: {:?}", liquidity_sources); // TODO: temporary patch, fix issue with liquidity sources becoming type External - if liquidity_sources.iter().map(|lqs| lqs.address.clone()).collect::>().contains(&&so.debtor.address) { + if liquidity_sources + .iter() + .map(|lqs| lqs.address.clone()) + .collect::>() + .contains(&&so.debtor.address) + { // A setoff on a tender should result in the creditor's (i.e. the tender receiver) balance // decreasing by the setoff amount SettleOff::Transfer(Transfer { @@ -119,7 +127,12 @@ fn into_settle_offs( // TODO: Include denominations amount: ("peppicoin".to_owned(), Uint128::from(so.set_off as u128)), }) - } else if liquidity_sources.iter().map(|lqs| lqs.address.clone()).collect::>().contains(&&so.creditor.address) { + } else if liquidity_sources + .iter() + .map(|lqs| lqs.address.clone()) + .collect::>() + .contains(&&so.creditor.address) + { // A setoff on an acceptance should result in the debtor's (i.e. the acceptance initiator) // balance increasing by the setoff amount SettleOff::Transfer(Transfer { @@ -176,4 +189,4 @@ fn decrypt_obligation( i64::try_from(o.amount).unwrap(), ) .unwrap() -} \ No newline at end of file +} diff --git a/apps/mtcs/enclave/src/types.rs b/apps/mtcs/enclave/src/types.rs index 21d295f4..6f48f4fc 100644 --- a/apps/mtcs/enclave/src/types.rs +++ b/apps/mtcs/enclave/src/types.rs @@ -56,4 +56,4 @@ pub struct RawOffset { pub creditor: HexBinary, pub amount: u64, pub set_off: u64, -} \ No newline at end of file +} diff --git a/apps/mtcs/scripts/src/bin/deploy-mc.rs b/apps/mtcs/scripts/src/bin/deploy-mc.rs index 0acecb89..2b29ba27 100644 --- a/apps/mtcs/scripts/src/bin/deploy-mc.rs +++ b/apps/mtcs/scripts/src/bin/deploy-mc.rs @@ -1,20 +1,24 @@ use std::{env::current_dir, str::FromStr}; +use anyhow::anyhow; use clap::Parser; +use cosmrs::tendermint::chain::Id as ChainId; use cosmwasm_std::Addr; +use cw_tee_mtcs::msg::InstantiateMsg as MtcsInstantiateMsg; +use cycles_sync::wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}; +use mtcs_overdraft::{ + msg::{Cw4ExecuteMsg, InstantiateMsg, Member, QueryMsg, QueryResp}, + AddHook, +}; use quartz_common::contract::msg::RawInstantiateMsg; use reqwest::Url; -use cosmrs::tendermint::chain::Id as ChainId; +use scripts::{ + types::{Log, WasmdTxResponse}, + utils::{block_tx_commit, wasmaddr_to_id}, +}; +use serde_json::json; use tendermint::Hash; use tendermint_rpc::HttpClient; -use serde_json::json; - -use scripts::{types::{WasmdTxResponse, Log}, utils::{wasmaddr_to_id, block_tx_commit}}; -use cw_tee_mtcs::msg::{InstantiateMsg as MtcsInstantiateMsg}; -use cycles_sync::wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}; -use mtcs_overdraft::{msg::{InstantiateMsg, QueryMsg, QueryResp, Cw4ExecuteMsg, Member}, AddHook}; - -use anyhow::anyhow; #[derive(Clone, Debug, Parser)] #[command(version, about, long_about = None)] @@ -36,59 +40,61 @@ async fn main() -> Result<(), anyhow::Error> { println!("\nšŸš€ Deploying Memberships Contract\n"); let group_wasm = contracts_path.join("cw4_group.wasm"); // TODO: uncertain about the path -> string conversion - let group_deploy_output: WasmdTxResponse = serde_json::from_str( - &wasmd_client.deploy( - &ChainId::from_str("testing")?, - String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), - group_wasm.as_path().to_string_lossy() - )? - )?; - - let tx_hash = Hash::from_str(&group_deploy_output.txhash).expect("Invalid hex string for transaction hash"); + let group_deploy_output: WasmdTxResponse = serde_json::from_str(&wasmd_client.deploy( + &ChainId::from_str("testing")?, + String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), + group_wasm.as_path().to_string_lossy(), + )?)?; + + let tx_hash = Hash::from_str(&group_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 memberships_code_id: u64 = log[0].events[1].attributes[1].value.parse()?; + let memberships_code_id: u64 = log[0].events[1].attributes[1].value.parse()?; println!("\nšŸš€ Deploying Mutual Credit Contract\n"); - let mc_wasm = contracts_path.join("overdraft/target/wasm32-unknown-unknown/release/mtcs_overdraft.wasm"); + let mc_wasm = + contracts_path.join("overdraft/target/wasm32-unknown-unknown/release/mtcs_overdraft.wasm"); // TODO: uncertain about the path -> string conversion - let mc_deploy_output: WasmdTxResponse = serde_json::from_str( - &wasmd_client.deploy( - &ChainId::from_str("testing")?, - String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), - mc_wasm.as_path().to_string_lossy() - )? - )?; - - let tx_hash = Hash::from_str(&mc_deploy_output.txhash).expect("Invalid hex string for transaction hash"); + let mc_deploy_output: WasmdTxResponse = serde_json::from_str(&wasmd_client.deploy( + &ChainId::from_str("testing")?, + String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), + mc_wasm.as_path().to_string_lossy(), + )?)?; + + let tx_hash = + Hash::from_str(&mc_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 mc_code_id: u64 = log[0].events[1].attributes[1].value.parse()?; + let mc_code_id: u64 = log[0].events[1].attributes[1].value.parse()?; - println!("\nšŸš€ Initializing Mutual Credit Contract with Memberships Contract Code Id: {}\n", memberships_code_id); + println!( + "\nšŸš€ Initializing Mutual Credit Contract with Memberships Contract Code Id: {}\n", + memberships_code_id + ); let init_msg = InstantiateMsg { - owner: Addr::unchecked("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), memberships_code_id + owner: Addr::unchecked("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), + memberships_code_id, }; - let deploy_output: WasmdTxResponse = serde_json::from_str( - &wasmd_client.init( - &ChainId::from_str("testing")?, - String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), - mc_code_id as usize, - json!(init_msg), - format!("MTCS Contract V{}", mc_code_id) - )? - )?; + let deploy_output: WasmdTxResponse = serde_json::from_str(&wasmd_client.init( + &ChainId::from_str("testing")?, + String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), + mc_code_id as usize, + json!(init_msg), + format!("MTCS Contract V{}", mc_code_id), + )?)?; - let tx_hash = Hash::from_str(&deploy_output.txhash).expect("Invalid hex string for transaction hash"); + 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 mc_contract_addr = &log[0].events[1].attributes[0].value; + let mc_contract_addr = &log[0].events[1].attributes[0].value; let resp: QueryResult = wasmd_client .query_smart( @@ -98,7 +104,7 @@ async fn main() -> Result<(), anyhow::Error> { .map_err(|e| anyhow!("Problem querying liquidity sources: {}", e))?; let group_contract_addr = &resp.data.message; - + // *** ADD HOOK *** // TODO: Make sure it succeeded (or return error + contract reuse) @@ -126,20 +132,23 @@ async fn main() -> Result<(), anyhow::Error> { String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), json!(Cw4ExecuteMsg::UpdateMembers { remove: vec![], - add: vec![Member { - addr: String::from("wasm124tuy67a9dcvfgcr4gjmz60syd8ddaugl33v0n"), - weight: 0u64 - }, Member { - addr: String::from("wasm1ctkqmg45u85jnf5ur9796h7ze4hj6ep5y7m7l6"), - weight: 0u64 - }] + add: vec![ + Member { + addr: String::from("wasm124tuy67a9dcvfgcr4gjmz60syd8ddaugl33v0n"), + weight: 0u64 + }, + Member { + addr: String::from("wasm1ctkqmg45u85jnf5ur9796h7ze4hj6ep5y7m7l6"), + weight: 0u64 + } + ] }), )? .as_str(), )?; println!("{:?}", update_members_output); - + println!("\nšŸš€ Successfully deployed and instantiated mutual credit contract!"); println!("\nMutual Credit"); println!("šŸ†” Code ID: {}", mc_code_id); @@ -151,9 +160,4 @@ async fn main() -> Result<(), anyhow::Error> { Ok(()) } - - - - - - //RES=$($CMD tx wasm instantiate "$CODE_ID" "$INSTANTIATE_MSG" --from "$USER_ADDR" --label $LABEL $TXFLAG -y --no-admin --output json) +//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/deploy.rs b/apps/mtcs/scripts/src/bin/deploy.rs index 4aadfaee..d13dbae2 100644 --- a/apps/mtcs/scripts/src/bin/deploy.rs +++ b/apps/mtcs/scripts/src/bin/deploy.rs @@ -1,16 +1,21 @@ -use std::{env::{self, current_dir}, str::FromStr}; +use std::{ + env::{self, 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 cosmrs::tendermint::chain::Id as ChainId; +use scripts::{ + types::{Log, WasmdTxResponse}, + utils::{block_tx_commit, run_relay}, +}; +use serde_json::json; use tendermint::Hash; use tendermint_rpc::HttpClient; -use serde_json::json; - -use scripts::{types::{WasmdTxResponse, Log}, utils::{run_relay, block_tx_commit}}; -use cw_tee_mtcs::msg::{InstantiateMsg as MtcsInstantiateMsg}; -use cycles_sync::wasmd_client::{CliWasmdClient, WasmdClient}; #[derive(Clone, Debug, Parser)] #[command(version, about, long_about = None)] @@ -34,40 +39,39 @@ async fn main() -> Result<(), anyhow::Error> { 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"); + 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.as_path().to_string_lossy() - )? - )?; - - let tx_hash = Hash::from_str(&deploy_output.txhash).expect("Invalid hex string for transaction hash"); + let deploy_output: WasmdTxResponse = serde_json::from_str(&wasmd_client.deploy( + &ChainId::from_str("testing")?, + String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), + contract_path.as_path().to_string_lossy(), + )?)?; + + 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()?; + 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 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 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; + 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); @@ -76,9 +80,4 @@ async fn main() -> Result<(), anyhow::Error> { Ok(()) } - - - - - - //RES=$($CMD tx wasm instantiate "$CODE_ID" "$INSTANTIATE_MSG" --from "$USER_ADDR" --label $LABEL $TXFLAG -y --no-admin --output json) +//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 index f21e3dc0..17669e0c 100644 --- a/apps/mtcs/scripts/src/bin/handshake.rs +++ b/apps/mtcs/scripts/src/bin/handshake.rs @@ -1,24 +1,24 @@ +use std::{env, env::current_dir, fs::File, io::Read, path::Path, str::FromStr}; + use anyhow::anyhow; -use cosmrs::tendermint::chain::Id as ChainId; // TODO see if this redundancy in dependencies can be decreased 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 std::{env, fs::File, io::Read, path::Path, str::FromStr}; use tendermint::{block::Height, Hash}; -use tendermint_rpc::query::EventType; -use tendermint_rpc::{HttpClient, SubscriptionClient, WebSocketClient}; - -use cw_tee_mtcs::msg::ExecuteMsg as MtcsExecuteMsg; -use cycles_sync::wasmd_client::{CliWasmdClient, WasmdClient}; -use quartz_common::contract::prelude::QuartzExecuteMsg; -use scripts::{types::WasmdTxResponse, utils::{wasmaddr_to_id, run_relay, block_tx_commit}}; +use tendermint_rpc::{query::EventType, HttpClient, SubscriptionClient, WebSocketClient}; use tm_prover::prover::proof_parse_with_defaults; -use std::env::current_dir; - #[derive(Serialize)] struct Message<'a> { message: &'a str, diff --git a/apps/mtcs/scripts/src/bin/listen.rs b/apps/mtcs/scripts/src/bin/listen.rs index e56c2a2d..aa4beb63 100644 --- a/apps/mtcs/scripts/src/bin/listen.rs +++ b/apps/mtcs/scripts/src/bin/listen.rs @@ -1,9 +1,30 @@ +use std::{ + collections::{BTreeMap, BTreeSet}, + 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, + }, + state::LiquiditySource, +}; +use cycles_sync::wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}; use futures_util::stream::StreamExt; +use mtcs_enclave::proto::{clearing_client::ClearingClient, RunClearingRequest}; +use mtcs_overdraft::msg::{QueryMembersResp, QueryMsg::DumpMembers}; +use quartz_common::contract::msg::execute::attested::{ + EpidAttestation, RawAttested, RawAttestedMsgSansHandler, +}; +use quartz_tee_ra::{intel_sgx::epid::types::ReportBody, IASReport}; use reqwest::Url; use scripts::utils::wasmaddr_to_id; use serde::{Deserialize, Serialize}; @@ -12,22 +33,11 @@ use tendermint_rpc::{ query::{EventType, Query}, SubscriptionClient, WebSocketClient, }; -use tokio::{fs::{self, File}, io::AsyncWriteExt}; -use tonic::Request; - -use cw_tee_mtcs::{ - msg::{AttestedMsg, execute::{SubmitSetoffsMsg}, ExecuteMsg, GetLiquiditySourcesResponse, QueryMsg::GetLiquiditySources}, - state::LiquiditySource, -}; -use cycles_sync::wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}; -use mtcs_overdraft::msg::{QueryMembersResp, QueryMsg::DumpMembers}; -use quartz_tee_ra::{intel_sgx::epid::types::ReportBody, IASReport}; -use quartz_common::contract::msg::execute::attested::{EpidAttestation, RawAttested, RawAttestedMsgSansHandler}; -use mtcs_enclave::proto::{clearing_client::ClearingClient, RunClearingRequest}; - -use std::{ - collections::{BTreeMap, BTreeSet}, env, process::Command, str::FromStr +use tokio::{ + fs::{self, File}, + io::AsyncWriteExt, }; +use tonic::Request; // TODO: import this from enclave or somewhere shared #[derive(Clone, Debug, Serialize, Deserialize)] @@ -60,7 +70,7 @@ struct Cli { rpc_addr: String, #[arg(short, long, default_value = "dangush")] - user: String // The filesys user for gramine filepaths. TODO: improve this + user: String, // The filesys user for gramine filepaths. TODO: improve this } fn default_rpc_addr() -> String { @@ -88,7 +98,7 @@ async fn main() -> Result<(), anyhow::Error> { cli.sender.clone(), format!("{}:{}", cli.rpc_addr, cli.port), &cli.node_url, - &cli.user + &cli.user, ) .await { @@ -109,7 +119,7 @@ async fn handler( sender: String, rpc_addr: String, node_url: &str, - user: &str, + user: &str, ) -> Result<(), anyhow::Error> { let chain_id = &ChainId::from_str("testing")?; let httpurl = Url::parse(&format!("http://{}", node_url))?; @@ -122,19 +132,27 @@ async fn handler( 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(); - + 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))?; - + 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()}); + let setoffs_msg = ExecuteMsg::SubmitSetoffs::(AttestedMsg { + msg, + attestation: attestation.into(), + }); // Send setoffs to mtcs contract on chain let output = @@ -175,7 +193,7 @@ async fn query_chain( 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( @@ -197,7 +215,10 @@ async fn query_chain( } // Request the IAS report for EPID attestations -async fn gramine_ias_request(attested_msg: Vec, user: &str) -> Result { +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); @@ -206,7 +227,9 @@ async fn gramine_ias_request(attested_msg: Vec, user: &str) -> Result, user: &str) -> Result, pub msg_index: u32, -} \ No newline at end of file +} diff --git a/apps/mtcs/scripts/src/utils.rs b/apps/mtcs/scripts/src/utils.rs index 6ecd52ee..5d213bc6 100644 --- a/apps/mtcs/scripts/src/utils.rs +++ b/apps/mtcs/scripts/src/utils.rs @@ -1,11 +1,14 @@ +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 std::{path::Path, process::Command, time::Duration}; -use tendermint_rpc::{error::ErrorDetail, Client, HttpClient, endpoint::tx::Response as TmTxResponse}; 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))?; @@ -52,7 +55,7 @@ pub async fn block_tx_commit(client: &HttpClient, tx: Hash) -> Result { return Ok(resp); - }, + } Err(e) => { // If error, make sure it is only because of a not yet committed tx match e.0 { @@ -75,4 +78,4 @@ pub async fn block_tx_commit(client: &HttpClient, tx: Hash) -> Result Result<(), Box> { .await?; Ok(()) -} \ No newline at end of file +} diff --git a/apps/transfers/enclave/src/transfers_server.rs b/apps/transfers/enclave/src/transfers_server.rs index ddf5f54f..4434b72f 100644 --- a/apps/transfers/enclave/src/transfers_server.rs +++ b/apps/transfers/enclave/src/transfers_server.rs @@ -6,12 +6,12 @@ use std::{ use cosmwasm_std::{Addr, HexBinary, Uint128}; use ecies::{decrypt, encrypt}; use k256::ecdsa::{SigningKey, VerifyingKey}; - use quartz_common::{ contract::{ msg::execute::attested::{HasUserData, RawAttested}, state::{Config, UserData}, - }, enclave::{attestor::Attestor, server::ProofOfPublication} + }, + enclave::{attestor::Attestor, server::ProofOfPublication}, }; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; diff --git a/utils/cycles-sync/src/bin/submit.rs b/utils/cycles-sync/src/bin/submit.rs index 872a830c..f3dbca57 100644 --- a/utils/cycles-sync/src/bin/submit.rs +++ b/utils/cycles-sync/src/bin/submit.rs @@ -18,16 +18,11 @@ use bip32::{ }; use clap::Parser; use cosmrs::{ - tendermint::account::Id as TmAccountId, tendermint::chain::Id as TmChainId, AccountId, + tendermint::{account::Id as TmAccountId, chain::Id as TmChainId}, + AccountId, }; use cosmwasm_std::{Addr, HexBinary, StdError}; use cw_tee_mtcs::state::{LiquiditySource, LiquiditySourceType}; -use serde::{Deserialize, Serialize}; -use serde_json::json; -use subtle_encoding::{bech32::decode as bech32_decode, Error as Bech32DecodeError}; -use tracing::{debug, Level}; -use uuid::Uuid; - use cycles_sync::{ obligato_client::{http::HttpClient, Client}, types::{ @@ -36,8 +31,12 @@ use cycles_sync::{ }, wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}, }; - use reqwest::Url; +use serde::{Deserialize, Serialize}; +use serde_json::json; +use subtle_encoding::{bech32::decode as bech32_decode, Error as Bech32DecodeError}; +use tracing::{debug, Level}; +use uuid::Uuid; const MNEMONIC_PHRASE: &str = "clutch debate vintage foster barely primary clown leader sell manual leopard ladder wet must embody story oyster imitate cable alien six square rice wedding"; diff --git a/utils/cycles-sync/src/wasmd_client.rs b/utils/cycles-sync/src/wasmd_client.rs index 6cb3d605..c5391104 100644 --- a/utils/cycles-sync/src/wasmd_client.rs +++ b/utils/cycles-sync/src/wasmd_client.rs @@ -47,7 +47,7 @@ pub trait WasmdClient { sender: String, code_id: usize, init_msg: M, - label: String + label: String, ) -> Result; } @@ -149,7 +149,7 @@ impl WasmdClient for CliWasmdClient { } fn deploy( - &self, + &self, chain_id: &Id, sender: String, wasm_path: M, @@ -165,7 +165,6 @@ impl WasmdClient for CliWasmdClient { .args(&["--gas-adjustment", "1.3"]) .args(&["-o", "json"]) .arg("-y"); - let output = command.output()?; @@ -181,9 +180,9 @@ impl WasmdClient for CliWasmdClient { &self, chain_id: &Id, sender: String, - code_id: usize, + code_id: usize, init_msg: M, - label: String + label: String, ) -> Result { let mut wasmd = Command::new("wasmd"); let command = wasmd diff --git a/utils/tm-prover/src/prover.rs b/utils/tm-prover/src/prover.rs index bcafce3c..34bde8a4 100644 --- a/utils/tm-prover/src/prover.rs +++ b/utils/tm-prover/src/prover.rs @@ -55,15 +55,15 @@ pub async fn proof_parse_with_defaults( chain_id, primary: primary.parse()?, witnesses: witnesses.parse()?, - trusted_height: trusted_height, - trusted_hash: trusted_hash, + trusted_height, + trusted_hash, trust_threshold: TrustThreshold::TWO_THIRDS, // default trusting_period: 1209600u64, // default max_clock_drift: 5u64, // default max_block_lag: 5u64, // default trace_file: Some(trace_file.parse()?), verbose: Verbosity { verbose }, - contract_address: contract_address, + contract_address, storage_key: storage_key.to_owned(), }) .await @@ -97,7 +97,7 @@ pub async fn proof( .init(); let options = Options { - trust_threshold: trust_threshold, + trust_threshold, trusting_period: Duration::from_secs(trusting_period), clock_drift: Duration::from_secs(max_clock_drift), }; From afc41f30b387485b75cdf0f79a2770640fdde0c6 Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Fri, 26 Jul 2024 13:00:16 -0700 Subject: [PATCH 09/15] remove overdraft import to prevent ci errors --- Cargo.lock | 73 ----------- apps/mtcs/scripts/Cargo.toml | 5 - apps/mtcs/scripts/src/bin/deploy-mc.rs | 163 ------------------------- apps/mtcs/scripts/src/bin/listen.rs | 1 - 4 files changed, 242 deletions(-) delete mode 100644 apps/mtcs/scripts/src/bin/deploy-mc.rs diff --git a/Cargo.lock b/Cargo.lock index cbc4a0dd..2601d80b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -987,21 +987,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "cw-controllers" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c1804013d21060b994dea28a080f9eab78a3bcb6b617f05e7634b0600bf7b1" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-storage-plus 2.0.0", - "cw-utils 2.0.0", - "schemars", - "serde", - "thiserror", -] - [[package]] name = "cw-multi-test" version = "0.17.0" @@ -1141,18 +1126,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cw0" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae676b6cced78a3d38ad4b01ab4ed66fc78ac191c3c0d6bfd5372cb2efd473b" -dependencies = [ - "cosmwasm-std 1.5.2", - "schemars", - "serde", - "thiserror", -] - [[package]] name = "cw2" version = "1.1.2" @@ -1213,37 +1186,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cw4" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d33f5c8a6b6cd1bd24e212d7f44967697bfa3c4f9cc3f9a8e1c58f5fe5db032d" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-storage-plus 2.0.0", - "schemars", - "serde", -] - -[[package]] -name = "cw4-group" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e60083d0aec9f6d6191c797bb3605835289fd3d875fe516ae5a164c7f8a0ba4e" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-controllers", - "cw-storage-plus 2.0.0", - "cw-utils 2.0.0", - "cw2 2.0.0", - "cw4", - "schemars", - "serde", - "thiserror", -] - [[package]] name = "cycles-sync" version = "0.1.0" @@ -2469,20 +2411,6 @@ dependencies = [ "sha2 0.10.8", ] -[[package]] -name = "mtcs-overdraft" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema 2.1.0", - "cosmwasm-std 2.1.0", - "cw-storage-plus 2.0.0", - "cw-utils 2.0.0", - "cw0", - "cw4", - "cw4-group", - "thiserror", -] - [[package]] name = "multimap" version = "0.10.0" @@ -3570,7 +3498,6 @@ dependencies = [ "k256", "mtcs", "mtcs-enclave", - "mtcs-overdraft", "once_cell", "prost", "quartz-common", diff --git a/apps/mtcs/scripts/Cargo.toml b/apps/mtcs/scripts/Cargo.toml index 6a332689..ffd391ab 100644 --- a/apps/mtcs/scripts/Cargo.toml +++ b/apps/mtcs/scripts/Cargo.toml @@ -16,10 +16,6 @@ path = "src/bin/handshake.rs" name = "deploy" path = "src/bin/deploy.rs" -[[bin]] -name = "mc" -path = "src/bin/deploy-mc.rs" - [dependencies] clap.workspace = true color-eyre.workspace = true @@ -58,6 +54,5 @@ cycles-sync = { workspace = true} tm-prover = { workspace = true} quartz-common = { workspace = true, features=["contract"]} quartz-tee-ra = { workspace = true} -mtcs-overdraft = { path = "../../../../cycles-protocol/contracts/overdraft"} mtcs-enclave = { path = "../enclave", optional = false} regex = "1.10.5" diff --git a/apps/mtcs/scripts/src/bin/deploy-mc.rs b/apps/mtcs/scripts/src/bin/deploy-mc.rs deleted file mode 100644 index 2b29ba27..00000000 --- a/apps/mtcs/scripts/src/bin/deploy-mc.rs +++ /dev/null @@ -1,163 +0,0 @@ -use std::{env::current_dir, str::FromStr}; - -use anyhow::anyhow; -use clap::Parser; -use cosmrs::tendermint::chain::Id as ChainId; -use cosmwasm_std::Addr; -use cw_tee_mtcs::msg::InstantiateMsg as MtcsInstantiateMsg; -use cycles_sync::wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}; -use mtcs_overdraft::{ - msg::{Cw4ExecuteMsg, InstantiateMsg, Member, QueryMsg, QueryResp}, - AddHook, -}; -use quartz_common::contract::msg::RawInstantiateMsg; -use reqwest::Url; -use scripts::{ - types::{Log, WasmdTxResponse}, - utils::{block_tx_commit, wasmaddr_to_id}, -}; -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 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())?); - - let contracts_path = current_dir()?.join("../../../contracts"); - - println!("\nšŸš€ Deploying Memberships Contract\n"); - let group_wasm = contracts_path.join("cw4_group.wasm"); - // TODO: uncertain about the path -> string conversion - let group_deploy_output: WasmdTxResponse = serde_json::from_str(&wasmd_client.deploy( - &ChainId::from_str("testing")?, - String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), - group_wasm.as_path().to_string_lossy(), - )?)?; - - let tx_hash = Hash::from_str(&group_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 memberships_code_id: u64 = log[0].events[1].attributes[1].value.parse()?; - - println!("\nšŸš€ Deploying Mutual Credit Contract\n"); - - let mc_wasm = - contracts_path.join("overdraft/target/wasm32-unknown-unknown/release/mtcs_overdraft.wasm"); - // TODO: uncertain about the path -> string conversion - let mc_deploy_output: WasmdTxResponse = serde_json::from_str(&wasmd_client.deploy( - &ChainId::from_str("testing")?, - String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), - mc_wasm.as_path().to_string_lossy(), - )?)?; - - let tx_hash = - Hash::from_str(&mc_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 mc_code_id: u64 = log[0].events[1].attributes[1].value.parse()?; - - println!( - "\nšŸš€ Initializing Mutual Credit Contract with Memberships Contract Code Id: {}\n", - memberships_code_id - ); - - let init_msg = InstantiateMsg { - owner: Addr::unchecked("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), - memberships_code_id, - }; - - let deploy_output: WasmdTxResponse = serde_json::from_str(&wasmd_client.init( - &ChainId::from_str("testing")?, - String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), - mc_code_id as usize, - json!(init_msg), - format!("MTCS Contract V{}", mc_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 mc_contract_addr = &log[0].events[1].attributes[0].value; - - let resp: QueryResult = wasmd_client - .query_smart( - &wasmaddr_to_id(mc_contract_addr)?, - json!(QueryMsg::GroupAddr {}), - ) - .map_err(|e| anyhow!("Problem querying liquidity sources: {}", e))?; - - let group_contract_addr = &resp.data.message; - - // *** ADD HOOK *** - - // TODO: Make sure it succeeded (or return error + contract reuse) - let _add_hook_output: WasmdTxResponse = serde_json::from_str( - wasmd_client - .tx_execute( - &wasmaddr_to_id(group_contract_addr)?, - &ChainId::from_str("testing")?, - 2000000, - String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), - json!(AddHook { - addr: mc_contract_addr.to_owned() - }), - )? - .as_str(), - )?; - - // *** Regsiter test members *** - let update_members_output: WasmdTxResponse = serde_json::from_str( - wasmd_client - .tx_execute( - &wasmaddr_to_id(group_contract_addr)?, - &ChainId::from_str("testing")?, - 2000000, - String::from("wasm14qdftsfk6fwn40l0xmruga08xlczl4g05npy70"), - json!(Cw4ExecuteMsg::UpdateMembers { - remove: vec![], - add: vec![ - Member { - addr: String::from("wasm124tuy67a9dcvfgcr4gjmz60syd8ddaugl33v0n"), - weight: 0u64 - }, - Member { - addr: String::from("wasm1ctkqmg45u85jnf5ur9796h7ze4hj6ep5y7m7l6"), - weight: 0u64 - } - ] - }), - )? - .as_str(), - )?; - - println!("{:?}", update_members_output); - - println!("\nšŸš€ Successfully deployed and instantiated mutual credit contract!"); - println!("\nMutual Credit"); - println!("šŸ†” Code ID: {}", mc_code_id); - println!("šŸ“Œ Contract Address: {}", mc_contract_addr); - println!("\nMemberships sub-contract"); - println!("šŸ†” Code ID: {}", memberships_code_id); - println!("šŸ“Œ Contract Address: {}", group_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/listen.rs b/apps/mtcs/scripts/src/bin/listen.rs index aa4beb63..498769b9 100644 --- a/apps/mtcs/scripts/src/bin/listen.rs +++ b/apps/mtcs/scripts/src/bin/listen.rs @@ -20,7 +20,6 @@ use cw_tee_mtcs::{ use cycles_sync::wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}; use futures_util::stream::StreamExt; use mtcs_enclave::proto::{clearing_client::ClearingClient, RunClearingRequest}; -use mtcs_overdraft::msg::{QueryMembersResp, QueryMsg::DumpMembers}; use quartz_common::contract::msg::execute::attested::{ EpidAttestation, RawAttested, RawAttestedMsgSansHandler, }; From e712d541afb1894aaa5151fc25b9efdb96d5e4f9 Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Fri, 26 Jul 2024 13:57:56 -0700 Subject: [PATCH 10/15] rename cli to config --- utils/tm-prover/src/{cli.rs => config.rs} | 2 +- utils/tm-prover/src/lib.rs | 2 +- utils/tm-prover/src/main.rs | 4 ++-- utils/tm-prover/src/prover.rs | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) rename utils/tm-prover/src/{cli.rs => config.rs} (99%) diff --git a/utils/tm-prover/src/cli.rs b/utils/tm-prover/src/config.rs similarity index 99% rename from utils/tm-prover/src/cli.rs rename to utils/tm-prover/src/config.rs index e6489884..298df9cd 100644 --- a/utils/tm-prover/src/cli.rs +++ b/utils/tm-prover/src/config.rs @@ -58,7 +58,7 @@ pub struct ProofOutput { #[derive(Debug, Parser)] #[command(author, version, about, long_about = None)] -pub struct Cli { +pub struct Config { /// Identifier of the chain #[clap(long)] pub chain_id: String, diff --git a/utils/tm-prover/src/lib.rs b/utils/tm-prover/src/lib.rs index c469e69c..8dc915ef 100644 --- a/utils/tm-prover/src/lib.rs +++ b/utils/tm-prover/src/lib.rs @@ -1,2 +1,2 @@ -pub mod cli; +pub mod config; pub mod prover; diff --git a/utils/tm-prover/src/main.rs b/utils/tm-prover/src/main.rs index dd5cbf9a..c19421bf 100644 --- a/utils/tm-prover/src/main.rs +++ b/utils/tm-prover/src/main.rs @@ -1,12 +1,12 @@ use clap::Parser; use color_eyre::eyre::Result; -use tm_prover::{cli::Cli, prover::proof}; +use tm_prover::{config::Config, prover::proof}; #[tokio::main] async fn main() -> Result<()> { color_eyre::install()?; - let args = Cli::parse(); + let args = Config::parse(); proof(args).await } diff --git a/utils/tm-prover/src/prover.rs b/utils/tm-prover/src/prover.rs index 34bde8a4..be7f1d2f 100644 --- a/utils/tm-prover/src/prover.rs +++ b/utils/tm-prover/src/prover.rs @@ -38,7 +38,7 @@ use tracing_subscriber::{util::SubscriberInitExt, EnvFilter}; const WASM_STORE_KEY: &str = "/store/wasm/key"; -use crate::cli::{Cli as TmProverCli, ProofOutput, Verbosity}; +use crate::config::{Config as TmProverConfig, ProofOutput, Verbosity}; pub async fn proof_parse_with_defaults( chain_id: String, @@ -51,7 +51,7 @@ pub async fn proof_parse_with_defaults( contract_address: AccountId, storage_key: &str, ) -> Result<()> { - proof(TmProverCli { + proof(TmProverConfig { chain_id, primary: primary.parse()?, witnesses: witnesses.parse()?, @@ -70,7 +70,7 @@ pub async fn proof_parse_with_defaults( } pub async fn proof( - TmProverCli { + TmProverConfig { chain_id, primary, witnesses, @@ -84,7 +84,7 @@ pub async fn proof( verbose, contract_address, storage_key, - }: TmProverCli, + }: TmProverConfig, ) -> Result<()> { let env_filter = EnvFilter::builder() .with_default_directive(verbose.to_level_filter().into()) From 0f738c52d52303725dc0a782e045b5a5b54e0adb Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Fri, 26 Jul 2024 14:31:36 -0700 Subject: [PATCH 11/15] build config file and pass to prove directly in handshake --- apps/mtcs/scripts/src/bin/handshake.rs | 26 ++++++++--------- utils/tm-prover/src/config.rs | 39 +++++++++++++++++++++++++- utils/tm-prover/src/main.rs | 4 +-- utils/tm-prover/src/prover.rs | 36 ++---------------------- 4 files changed, 56 insertions(+), 49 deletions(-) diff --git a/apps/mtcs/scripts/src/bin/handshake.rs b/apps/mtcs/scripts/src/bin/handshake.rs index 17669e0c..4470dd3c 100644 --- a/apps/mtcs/scripts/src/bin/handshake.rs +++ b/apps/mtcs/scripts/src/bin/handshake.rs @@ -17,7 +17,7 @@ use serde::Serialize; use serde_json::json; use tendermint::{block::Height, Hash}; use tendermint_rpc::{query::EventType, HttpClient, SubscriptionClient, WebSocketClient}; -use tm_prover::prover::proof_parse_with_defaults; +use tm_prover::{config::Config as TmProverConfig, prover::prove}; #[derive(Serialize)] struct Message<'a> { @@ -111,18 +111,18 @@ async fn main() -> Result<(), anyhow::Error> { // run tm prover cargo binary with trusted hash and height // TODO: decouple logic in tm_prover - if let Err(report) = proof_parse_with_defaults( - "testing".to_string(), - httpurl.as_str(), - httpurl.as_str(), - trusted_height, - trusted_hash, - proof_path.to_str().unwrap(), // potentially dangerous - 1, - cli.contract.clone(), - "quartz_session", - ) - .await + let mut config = TmProverConfig::default(); + config.chain_id = "testing".parse()?; + config.primary = httpurl.as_str().parse()?; + config.witnesses = httpurl.as_str().parse()?; + config.trusted_height = trusted_height; + config.trusted_hash = trusted_hash; + config.trace_file = Some(proof_path.clone()); + config.verbose = "1".parse()?; + config.contract_address = cli.contract.clone(); + config.storage_key = "quartz_session".to_owned(); + + if let Err(report) = prove(config).await { return Err(anyhow!("Tendermint prover failed. Report: {}", report)); } diff --git a/utils/tm-prover/src/config.rs b/utils/tm-prover/src/config.rs index 298df9cd..38bf9516 100644 --- a/utils/tm-prover/src/config.rs +++ b/utils/tm-prover/src/config.rs @@ -1,10 +1,11 @@ -use std::{path::PathBuf, str::FromStr}; +use std::{num::ParseIntError, path::PathBuf, str::FromStr}; use clap::Parser; use color_eyre::eyre::{eyre, Result}; use cosmrs::AccountId; use cw_proof::proof::cw::RawCwProof; use serde::{Deserialize, Serialize}; +use tendermint::crypto::default; use tendermint_light_client::types::{Hash, Height, LightBlock, TrustThreshold}; use tendermint_rpc::HttpClientUrl; use tracing::metadata::LevelFilter; @@ -48,6 +49,21 @@ impl Verbosity { _ => LevelFilter::TRACE, } } + + fn default() -> Self { + Self { + verbose: 0 + } + } +} + +impl FromStr for Verbosity { + type Err = ParseIntError; + + fn from_str(s: &str) -> Result { + let verbose: u8 = s.parse()?; + Ok(Self { verbose }) + } } #[derive(Clone, Debug, Serialize, Deserialize)] @@ -56,6 +72,27 @@ pub struct ProofOutput { pub merkle_proof: RawCwProof, } +// TODO: Investigate if it's possible to derive default using Clap's default values +impl Default for Config { + fn default() -> Self { + Config { + chain_id: String::default(), + primary: "http://127.0.0.1:26657".parse().unwrap(), + witnesses: "[]".parse().unwrap(), + trusted_height: Height::default(), + trusted_hash: Hash::default(), + trust_threshold: TrustThreshold::TWO_THIRDS, + trusting_period: 1209600u64, + max_clock_drift: 5u64, + max_block_lag: 5u64, + trace_file: None, + verbose: Verbosity::default(), + contract_address: "".parse().unwrap(), + storage_key: String::default(), + } + } +} + #[derive(Debug, Parser)] #[command(author, version, about, long_about = None)] pub struct Config { diff --git a/utils/tm-prover/src/main.rs b/utils/tm-prover/src/main.rs index c19421bf..e36333af 100644 --- a/utils/tm-prover/src/main.rs +++ b/utils/tm-prover/src/main.rs @@ -1,6 +1,6 @@ use clap::Parser; use color_eyre::eyre::Result; -use tm_prover::{config::Config, prover::proof}; +use tm_prover::{config::Config, prover::prove}; #[tokio::main] async fn main() -> Result<()> { @@ -8,5 +8,5 @@ async fn main() -> Result<()> { let args = Config::parse(); - proof(args).await + prove(args).await } diff --git a/utils/tm-prover/src/prover.rs b/utils/tm-prover/src/prover.rs index be7f1d2f..7a7f2521 100644 --- a/utils/tm-prover/src/prover.rs +++ b/utils/tm-prover/src/prover.rs @@ -18,7 +18,6 @@ use color_eyre::{ eyre::{eyre, Result}, Report, }; -use cosmrs::AccountId; use cw_proof::{ error::ProofError, proof::{cw::CwProof, key::CwAbciKey, Proof}, @@ -29,7 +28,7 @@ use tendermint_light_client::{ builder::LightClientBuilder, light_client::Options, store::memory::MemoryStore, - types::{Height, LightBlock, TrustThreshold}, + types::{Height, LightBlock}, }; use tendermint_light_client_detector::{detect_divergence, Error, Provider, Trace}; use tendermint_rpc::{client::HttpClient, Client, HttpClientUrl}; @@ -38,38 +37,9 @@ use tracing_subscriber::{util::SubscriberInitExt, EnvFilter}; const WASM_STORE_KEY: &str = "/store/wasm/key"; -use crate::config::{Config as TmProverConfig, ProofOutput, Verbosity}; +use crate::config::{Config as TmProverConfig, ProofOutput}; -pub async fn proof_parse_with_defaults( - chain_id: String, - primary: &str, - witnesses: &str, - trusted_height: Height, - trusted_hash: Hash, - trace_file: &str, - verbose: u8, - contract_address: AccountId, - storage_key: &str, -) -> Result<()> { - proof(TmProverConfig { - chain_id, - primary: primary.parse()?, - witnesses: witnesses.parse()?, - trusted_height, - trusted_hash, - trust_threshold: TrustThreshold::TWO_THIRDS, // default - trusting_period: 1209600u64, // default - max_clock_drift: 5u64, // default - max_block_lag: 5u64, // default - trace_file: Some(trace_file.parse()?), - verbose: Verbosity { verbose }, - contract_address, - storage_key: storage_key.to_owned(), - }) - .await -} - -pub async fn proof( +pub async fn prove( TmProverConfig { chain_id, primary, From 74506f5d8a2dc73d4c6a906ff4b8e4a7b52eef69 Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Fri, 26 Jul 2024 14:34:23 -0700 Subject: [PATCH 12/15] fmt --- apps/mtcs/scripts/src/bin/handshake.rs | 3 +-- utils/tm-prover/src/config.rs | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/mtcs/scripts/src/bin/handshake.rs b/apps/mtcs/scripts/src/bin/handshake.rs index 4470dd3c..dbf707e7 100644 --- a/apps/mtcs/scripts/src/bin/handshake.rs +++ b/apps/mtcs/scripts/src/bin/handshake.rs @@ -122,8 +122,7 @@ async fn main() -> Result<(), anyhow::Error> { config.contract_address = cli.contract.clone(); config.storage_key = "quartz_session".to_owned(); - if let Err(report) = prove(config).await - { + if let Err(report) = prove(config).await { return Err(anyhow!("Tendermint prover failed. Report: {}", report)); } diff --git a/utils/tm-prover/src/config.rs b/utils/tm-prover/src/config.rs index 38bf9516..280a5b1c 100644 --- a/utils/tm-prover/src/config.rs +++ b/utils/tm-prover/src/config.rs @@ -51,9 +51,7 @@ impl Verbosity { } fn default() -> Self { - Self { - verbose: 0 - } + Self { verbose: 0 } } } @@ -72,7 +70,7 @@ pub struct ProofOutput { pub merkle_proof: RawCwProof, } -// TODO: Investigate if it's possible to derive default using Clap's default values +// TODO: Investigate if it's possible to derive default using Clap's default values impl Default for Config { fn default() -> Self { Config { From 59a962e0f447bf55aaeda1c6500f1f66fde785d3 Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Mon, 29 Jul 2024 09:22:47 -0700 Subject: [PATCH 13/15] clean up dependencies, replace pub field with getter, change dependencies to workspace --- Cargo.lock | 1 - .../contracts/cw-tee-mtcs/src/contract.rs | 16 +- apps/mtcs/enclave/src/mtcs_server.rs | 5 +- apps/mtcs/scripts/src/bin/deploy.rs | 5 +- apps/mtcs/scripts/src/bin/handshake.rs | 2 +- apps/transfers/contracts/src/msg.rs | 11 +- core/quartz-common/Cargo.toml | 8 +- .../src/msg/execute/session_set_pub_key.rs | 10 +- utils/cycles-sync/src/bin/submit.rs | 258 +----------------- utils/tm-prover/src/config.rs | 1 - 10 files changed, 36 insertions(+), 281 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2601d80b..28571025 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -684,7 +684,6 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d184abb7b0039cc64f282dfa5b34165e4c5a7410ab46804636d53f4d09aee44" dependencies = [ - "bip32", "cosmos-sdk-proto", "ecdsa", "eyre", diff --git a/apps/mtcs/contracts/cw-tee-mtcs/src/contract.rs b/apps/mtcs/contracts/cw-tee-mtcs/src/contract.rs index 8d9307d6..549e0def 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/src/contract.rs +++ b/apps/mtcs/contracts/cw-tee-mtcs/src/contract.rs @@ -1,8 +1,6 @@ -use std::collections::BTreeSet; - use cosmwasm_std::{ entry_point, to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, - Uint128, Uint64, + Uint64, }; use cw2::set_contract_version; use cw20_base::contract::query_balance as cw20_query_balance; @@ -18,8 +16,8 @@ use crate::{ ExecuteMsg, InstantiateMsg, QueryMsg, }, state::{ - current_epoch_key, LiquiditySource, LiquiditySourceType, ObligationsItem, State, - LIQUIDITY_SOURCES, LIQUIDITY_SOURCES_KEY, OBLIGATIONS_KEY, STATE, + current_epoch_key, ObligationsItem, State, LIQUIDITY_SOURCES, LIQUIDITY_SOURCES_KEY, + OBLIGATIONS_KEY, STATE, }, }; @@ -104,13 +102,13 @@ pub fn execute( } pub mod execute { - use std::{collections::BTreeMap, ops::DerefMut}; + use std::collections::BTreeMap; use cosmwasm_std::{ to_json_binary, Addr, DepsMut, Env, HexBinary, MessageInfo, Response, StdResult, Storage, - SubMsg, Uint128, Uint64, WasmMsg, + SubMsg, Uint64, WasmMsg, }; - use cw20_base::contract::{execute_burn, execute_mint}; + use cw20_base::contract::execute_mint; use quartz_common::contract::state::{Hash, EPOCH_COUNTER}; // use mtcs_overdraft::msg::ExecuteMsg as OverdraftExecuteMsg; @@ -327,7 +325,7 @@ pub mod execute { pub fn init_clearing(deps: DepsMut) -> Result { EPOCH_COUNTER.update(deps.storage, |counter| -> StdResult<_> { - counter.checked_add(Uint64::new(1)); + counter.checked_add(Uint64::new(1))?; Ok(counter) })?; Ok(Response::new().add_attribute("action", "init_clearing")) diff --git a/apps/mtcs/enclave/src/mtcs_server.rs b/apps/mtcs/enclave/src/mtcs_server.rs index 861ee7cb..bca2ea89 100644 --- a/apps/mtcs/enclave/src/mtcs_server.rs +++ b/apps/mtcs/enclave/src/mtcs_server.rs @@ -3,7 +3,6 @@ use std::{ sync::{Arc, Mutex}, }; -use cosmrs::{tendermint::account::Id as TmAccountId, AccountId}; use cosmwasm_std::{Addr, HexBinary, Uint128}; //TODO: get rid of this use cw_tee_mtcs::{ @@ -11,7 +10,7 @@ use cw_tee_mtcs::{ state::{LiquiditySource, LiquiditySourceType, RawHash, SettleOff, Transfer}, }; use ecies::{decrypt, encrypt}; -use k256::ecdsa::{SigningKey, VerifyingKey}; +use k256::ecdsa::SigningKey; use mtcs::{ algo::mcmf::primal_dual::PrimalDual, impls::complex_id::ComplexIdMtcs, obligation::SimpleObligation, prelude::DefaultMtcs, setoff::SimpleSetoff, Mtcs, @@ -32,7 +31,7 @@ pub type RawCipherText = HexBinary; #[derive(Clone, Debug)] pub struct MtcsService { - config: Config, + config: Config, // TODO: this config is not used anywhere sk: Arc>>, attestor: A, } diff --git a/apps/mtcs/scripts/src/bin/deploy.rs b/apps/mtcs/scripts/src/bin/deploy.rs index d13dbae2..afde55be 100644 --- a/apps/mtcs/scripts/src/bin/deploy.rs +++ b/apps/mtcs/scripts/src/bin/deploy.rs @@ -1,7 +1,4 @@ -use std::{ - env::{self, current_dir}, - str::FromStr, -}; +use std::{env::current_dir, str::FromStr}; use clap::Parser; use cosmrs::tendermint::chain::Id as ChainId; diff --git a/apps/mtcs/scripts/src/bin/handshake.rs b/apps/mtcs/scripts/src/bin/handshake.rs index dbf707e7..c17fc168 100644 --- a/apps/mtcs/scripts/src/bin/handshake.rs +++ b/apps/mtcs/scripts/src/bin/handshake.rs @@ -164,7 +164,7 @@ async fn main() -> Result<(), anyhow::Error> { 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 + println!("\n\n\n{}", quartz.msg.pub_key()); // TODO: return this instead later } else { return Err(anyhow!("Invalid relay response from SessionSetPubKey")); } diff --git a/apps/transfers/contracts/src/msg.rs b/apps/transfers/contracts/src/msg.rs index 51181264..adb0cecc 100644 --- a/apps/transfers/contracts/src/msg.rs +++ b/apps/transfers/contracts/src/msg.rs @@ -1,10 +1,8 @@ use cosmwasm_schema::cw_serde; -use cosmwasm_std::{Addr, HexBinary, Uint128}; use quartz_common::contract::{ msg::execute::attested::{RawAttested, RawAttestedMsgSansHandler, RawDefaultAttestation}, prelude::*, }; -use serde::{Deserialize, Serialize}; type AttestedMsg = RawAttested, RA>; @@ -41,13 +39,8 @@ pub enum ExecuteMsg { pub mod execute { use cosmwasm_schema::cw_serde; - use cosmwasm_std::{Addr, DepsMut, Env, HexBinary, MessageInfo, Response, StdError, Uint128}; - use quartz_common::contract::{ - error::Error, - handler::Handler, - msg::{execute::attested::HasUserData, HasDomainType}, - state::UserData, - }; + use cosmwasm_std::{Addr, HexBinary, Uint128}; + use quartz_common::contract::{msg::execute::attested::HasUserData, state::UserData}; use sha2::{Digest, Sha256}; #[cw_serde] diff --git a/core/quartz-common/Cargo.toml b/core/quartz-common/Cargo.toml index fa9db4d8..9a7ef5a4 100644 --- a/core/quartz-common/Cargo.toml +++ b/core/quartz-common/Cargo.toml @@ -21,7 +21,7 @@ mock-sgx-enclave = ["quartz-enclave/mock-sgx"] quartz-cw = { workspace = true, optional = true } quartz-proto = { workspace = true, optional = true } quartz-enclave = { workspace = true, optional = true } -cosmrs = { version = "0.16.0", optional = true } -color-eyre = { version = "0.6.2", default-features = false, optional = true} -clap = { version = "4.1.8", default-features = false, features = ["derive", "std"], optional = true} -tendermint-light-client = { version = "=0.36.0", default-features = false, features = ["rust-crypto"], optional = true} +cosmrs = { workspace = true, optional = true } +color-eyre = { workspace = true, default-features = false, optional = true} +clap = { workspace = true, default-features = false, features = ["derive", "std"], optional = true} +tendermint-light-client = { workspace = true, default-features = false, features = ["rust-crypto"], optional = true} diff --git a/cosmwasm/packages/quartz-cw/src/msg/execute/session_set_pub_key.rs b/cosmwasm/packages/quartz-cw/src/msg/execute/session_set_pub_key.rs index ba1fb477..63252121 100644 --- a/cosmwasm/packages/quartz-cw/src/msg/execute/session_set_pub_key.rs +++ b/cosmwasm/packages/quartz-cw/src/msg/execute/session_set_pub_key.rs @@ -27,8 +27,14 @@ impl SessionSetPubKey { #[cw_serde] pub struct RawSessionSetPubKey { - pub nonce: HexBinary, - pub pub_key: HexBinary, + nonce: HexBinary, + pub_key: HexBinary, +} + +impl RawSessionSetPubKey { + pub fn pub_key(&self) -> &HexBinary { + &self.pub_key + } } impl TryFrom for SessionSetPubKey { diff --git a/utils/cycles-sync/src/bin/submit.rs b/utils/cycles-sync/src/bin/submit.rs index f3dbca57..f321e11a 100644 --- a/utils/cycles-sync/src/bin/submit.rs +++ b/utils/cycles-sync/src/bin/submit.rs @@ -1,44 +1,26 @@ -use std::{ - collections::{HashMap, HashSet}, - env, - error::Error, - fs::File, - io::{BufReader, BufWriter, Write}, - path::PathBuf, - str::FromStr, -}; +use std::str::FromStr; use anyhow::anyhow; -use bip32::{ - secp256k1::{ - ecdsa::VerifyingKey, - sha2::{Digest, Sha256}, - }, - Error as Bip32Error, Language, Mnemonic, Prefix, PrivateKey, Seed, XPrv, +use bip32::secp256k1::{ + ecdsa::VerifyingKey, + sha2::{Digest, Sha256}, }; use clap::Parser; -use cosmrs::{ - tendermint::{account::Id as TmAccountId, chain::Id as TmChainId}, - AccountId, -}; -use cosmwasm_std::{Addr, HexBinary, StdError}; +use cosmrs::{tendermint::chain::Id as TmChainId, AccountId}; +use cosmwasm_std::{Addr, HexBinary}; use cw_tee_mtcs::state::{LiquiditySource, LiquiditySourceType}; use cycles_sync::{ - obligato_client::{http::HttpClient, Client}, types::{ - ContractObligation, Obligation, ObligatoObligation, ObligatoSetOff, RawEncryptedObligation, - RawObligation, RawOffset, RawSetOff, SubmitObligationsMsg, SubmitObligationsMsgInner, + ContractObligation, RawEncryptedObligation, RawSetOff, SubmitObligationsMsg, + SubmitObligationsMsgInner, }, - wasmd_client::{CliWasmdClient, QueryResult, WasmdClient}, + wasmd_client::{CliWasmdClient, WasmdClient}, }; use reqwest::Url; use serde::{Deserialize, Serialize}; -use serde_json::json; -use subtle_encoding::{bech32::decode as bech32_decode, Error as Bech32DecodeError}; -use tracing::{debug, Level}; -use uuid::Uuid; +use subtle_encoding::bech32::decode as bech32_decode; -const MNEMONIC_PHRASE: &str = "clutch debate vintage foster barely primary clown leader sell manual leopard ladder wet must embody story oyster imitate cable alien six square rice wedding"; +// const MNEMONIC_PHRASE: &str = "clutch debate vintage foster barely primary clown leader sell manual leopard ladder wet must embody story oyster imitate cable alien six square rice wedding"; const ADDRESS_PREFIX: &str = "wasm"; @@ -160,27 +142,6 @@ fn encrypt_overdraft_intents( intents_enc } -fn address_from_uuid(uuid: Uuid) -> anyhow::Result<()> { - let seed = global_seed()?; - let sk = derive_child_xprv(&seed, uuid); - let pk_b = sk.public_key().public_key().to_sec1_bytes(); - let pk = VerifyingKey::from_sec1_bytes(&pk_b)?; - println!("{}", wasm_address(pk)); - Ok(()) -} - -fn wasm_address(pk: VerifyingKey) -> String { - let tm_pk = TmAccountId::from(pk); - AccountId::new(ADDRESS_PREFIX, tm_pk.as_bytes()) - .unwrap() - .to_string() -} - -fn global_seed() -> Result { - let mnemonic = Mnemonic::new(MNEMONIC_PHRASE, Language::English)?; - Ok(mnemonic.to_seed("password")) -} - fn create_wasm_msg( obligations_enc: Vec<(Sha256Digest, Vec)>, liquidity_sources: Vec, @@ -203,203 +164,6 @@ fn create_wasm_msg( serde_json::to_value(msg).map_err(Into::into) } -fn encrypt_intents( - intents: Vec, - keys: &HashMap, - epoch_pk: &VerifyingKey, -) -> Vec<(Sha256Digest, Vec)> { - let mut intents_enc = vec![]; - let mut intent_user_map = HashMap::new(); - - for i in intents { - // create an intent - let ro = { - let o = Obligation { - debtor: keys[&i.debtor_id].private_key().public_key(), - creditor: keys[&i.creditor_id].private_key().public_key(), - amount: i.amount, - salt: [0; 64], - }; - RawObligation::from(o) - }; - - // serialize intent - let i_ser = serde_json::to_string(&ro).unwrap(); - - // encrypt intent - let i_cipher = ecies::encrypt(&epoch_pk.to_sec1_bytes(), i_ser.as_bytes()).unwrap(); - - // hash intent - let i_digest: Sha256Digest = { - let mut hasher = Sha256::new(); - hasher.update(i_ser); - hasher.finalize().into() - }; - - intents_enc.push((i_digest, i_cipher)); - intent_user_map.insert(HexBinary::from(i_digest), (i.debtor_id, i.creditor_id)); - } - - intents_enc -} - -fn add_default_acceptances(obligations: &mut Vec, liquidity_sources: &[Uuid]) { - let acceptances = obligations.iter().fold(HashSet::new(), |mut acc, o| { - if !liquidity_sources.contains(&o.debtor_id) { - for ls in liquidity_sources { - let acceptance = ObligatoObligation { - id: Default::default(), - debtor_id: o.creditor_id, - creditor_id: *ls, - amount: u32::MAX as u64, - }; - acc.insert(acceptance); - } - } - acc - }); - - obligations.extend(acceptances.into_iter().collect::>()); -} - -fn read_keys_file(keys_file: PathBuf) -> anyhow::Result> { - let keys_file = File::open(keys_file)?; - let keys_reader = BufReader::new(keys_file); - let keys: HashMap = serde_json::from_reader(keys_reader)?; - Ok(keys - .into_iter() - .map(|(id, key_str)| (id, XPrv::from_str(&key_str).unwrap())) - .collect()) -} - -fn write_keys_to_file(output_file: PathBuf, keys: &HashMap) { - let keys_str: HashMap<_, _> = keys - .iter() - .map(|(id, k)| (id, k.to_string(Prefix::XPRV).to_string())) - .collect(); - - let output_file = File::create(output_file).expect("create file"); - let mut output_reader = BufWriter::new(output_file); - output_reader - .write_all(serde_json::to_string(&keys_str).unwrap().as_bytes()) - .expect("write file"); -} - -fn read_obligation_user_map_file( - file: PathBuf, -) -> anyhow::Result> { - let map_file = File::open(file)?; - let map_reader = BufReader::new(map_file); - serde_json::from_reader(map_reader).map_err(Into::into) -} - -fn write_obligation_user_map_to_file( - output_file: PathBuf, - obligation_user_map: &HashMap, -) { - let output_file = File::create(output_file).expect("create file"); - let mut output_reader = BufWriter::new(output_file); - output_reader - .write_all( - serde_json::to_string(&obligation_user_map) - .unwrap() - .as_bytes(), - ) - .expect("write file"); -} - -fn derive_keys( - obligations: &mut Vec, - liquidity_sources: &[Uuid], -) -> anyhow::Result> { - // Derive a BIP39 seed value using the given password - let seed = global_seed()?; - - obligations.sort_by_key(|o| o.debtor_id); - - let mut keys = HashMap::new(); - - for ls in liquidity_sources { - keys.entry(*ls) - .or_insert_with(|| derive_child_xprv(&seed, *ls)); - } - - for o in obligations { - keys.entry(o.debtor_id) - .or_insert_with(|| derive_child_xprv(&seed, o.debtor_id)); - keys.entry(o.creditor_id) - .or_insert_with(|| derive_child_xprv(&seed, o.creditor_id)); - } - - Ok(keys) -} - -fn derive_child_xprv(seed: &Seed, uuid: Uuid) -> XPrv { - // Hash the UUID using SHA-256 - let mut hasher = Sha256::new(); - hasher.update(uuid.as_bytes()); - let uuid_digest = hasher.finalize(); - - // Convert the hash bytes to a number - let uuid_digest_num = u128::from_be_bytes(uuid_digest[..16].try_into().unwrap()); - - // Take modulo (2^31 - 1) - let address_index = uuid_digest_num % ((1u128 << 31) - 1); - - let child_path = format!("m/0/44'/118'/0'/0/{address_index}") - .parse() - .unwrap(); - let child_xprv = XPrv::derive_from_path(seed, &child_path); - child_xprv.unwrap() -} - -#[cfg(test)] -mod tests { - use std::{error::Error, str::FromStr}; - - use bip32::{Mnemonic, Prefix, PrivateKey, XPrv}; - use rand_core::OsRng; - use uuid::Uuid; - - use crate::{derive_child_xprv, global_seed}; - - #[test] - fn test_create_mnemonic() { - // Generate random Mnemonic using the default language (English) - let mnemonic = Mnemonic::random(&mut OsRng, Default::default()); - println!("{}", mnemonic.phrase()); - } - - #[test] - fn test_enc_dec_for_derived() -> Result<(), Box> { - let seed = global_seed()?; - - let alice_uuid = Uuid::from_u128(1); - let alice_sk = derive_child_xprv(&seed, alice_uuid); - let alice_pk = alice_sk.private_key().public_key(); - - assert_eq!( - alice_pk.to_sec1_bytes(), - hex::decode("0219b0b8ee5fe9b317b69119fd15170d79737380c4f020e251b7839096f5513ccf") - .unwrap() - .into() - ); - - let alice_sk_str = alice_sk.to_string(Prefix::XPRV).to_string(); - assert_eq!(XPrv::from_str(&alice_sk_str).unwrap(), alice_sk); - - let msg = r#"{"debtor":"02027e3510f66f1f6c1ea5e3600062255928e518220f7883810cac3fc7fc092057","creditor":"0216254f4636c4e68ae22d98538851a46810b65162fe37bf57cba6d563617c913e","amount":10,"salt":"65c188bcc133add598f7eecc449112f4bf61024345316cff0eb5ce61291991b141073dcd3c543ea142e66fffa8f483dc382043d37e490ef9b8069c489ce94a0b"}"#; - let ciphertext = ecies::encrypt(&alice_pk.to_sec1_bytes(), msg.as_bytes()).unwrap(); - // println!("{}", hex::encode(&ciphertext)); - - let msg_dec = - ecies::decrypt(&alice_sk.private_key().to_bytes(), ciphertext.as_slice()).unwrap(); - assert_eq!(msg, String::from_utf8(msg_dec).unwrap().as_str()); - - Ok(()) - } -} - fn wasmaddr_to_id(address_str: &str) -> anyhow::Result { let (hr, _) = bech32_decode(address_str).map_err(|e| anyhow!(e))?; if hr != ADDRESS_PREFIX { diff --git a/utils/tm-prover/src/config.rs b/utils/tm-prover/src/config.rs index 280a5b1c..60b80fa4 100644 --- a/utils/tm-prover/src/config.rs +++ b/utils/tm-prover/src/config.rs @@ -5,7 +5,6 @@ use color_eyre::eyre::{eyre, Result}; use cosmrs::AccountId; use cw_proof::proof::cw::RawCwProof; use serde::{Deserialize, Serialize}; -use tendermint::crypto::default; use tendermint_light_client::types::{Hash, Height, LightBlock, TrustThreshold}; use tendermint_rpc::HttpClientUrl; use tracing::metadata::LevelFilter; From 6f7c52f584f1ba50449f76c19af215114786cdf5 Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Mon, 29 Jul 2024 09:39:12 -0700 Subject: [PATCH 14/15] cargo clippy fixes --- apps/mtcs/enclave/src/mtcs_server.rs | 8 ++--- apps/mtcs/scripts/src/bin/handshake.rs | 23 +++++++------- apps/mtcs/scripts/src/bin/listen.rs | 12 +++---- utils/cycles-sync/src/main.rs | 8 ++--- utils/cycles-sync/src/wasmd_client.rs | 44 +++++++++++++------------- 5 files changed, 45 insertions(+), 50 deletions(-) diff --git a/apps/mtcs/enclave/src/mtcs_server.rs b/apps/mtcs/enclave/src/mtcs_server.rs index bca2ea89..1bd2f141 100644 --- a/apps/mtcs/enclave/src/mtcs_server.rs +++ b/apps/mtcs/enclave/src/mtcs_server.rs @@ -9,7 +9,7 @@ use cw_tee_mtcs::{ msg::execute::SubmitSetoffsMsg, state::{LiquiditySource, LiquiditySourceType, RawHash, SettleOff, Transfer}, }; -use ecies::{decrypt, encrypt}; +use ecies::decrypt; use k256::ecdsa::SigningKey; use mtcs::{ algo::mcmf::primal_dual::PrimalDual, impls::complex_id::ComplexIdMtcs, @@ -17,7 +17,7 @@ use mtcs::{ }; use quartz_common::{ contract::{msg::execute::attested::RawAttested, state::Config}, - enclave::{attestor::Attestor, server::ProofOfPublication}, + enclave::attestor::Attestor, }; use serde::{Deserialize, Serialize}; use tonic::{Request, Response, Result as TonicResult, Status}; @@ -116,7 +116,7 @@ fn into_settle_offs( .iter() .map(|lqs| lqs.address.clone()) .collect::>() - .contains(&&so.debtor.address) + .contains(&so.debtor.address) { // A setoff on a tender should result in the creditor's (i.e. the tender receiver) balance // decreasing by the setoff amount @@ -130,7 +130,7 @@ fn into_settle_offs( .iter() .map(|lqs| lqs.address.clone()) .collect::>() - .contains(&&so.creditor.address) + .contains(&so.creditor.address) { // A setoff on an acceptance should result in the debtor's (i.e. the acceptance initiator) // balance increasing by the setoff amount diff --git a/apps/mtcs/scripts/src/bin/handshake.rs b/apps/mtcs/scripts/src/bin/handshake.rs index c17fc168..14feb391 100644 --- a/apps/mtcs/scripts/src/bin/handshake.rs +++ b/apps/mtcs/scripts/src/bin/handshake.rs @@ -109,18 +109,17 @@ async fn main() -> Result<(), anyhow::Error> { let proof_path = current_dir()?.join("../../../packages/tm-prover/light-client-proof.json"); println!("Proof path: {:?}", proof_path.to_str()); - // run tm prover cargo binary with trusted hash and height - // TODO: decouple logic in tm_prover - let mut config = TmProverConfig::default(); - config.chain_id = "testing".parse()?; - config.primary = httpurl.as_str().parse()?; - config.witnesses = httpurl.as_str().parse()?; - config.trusted_height = trusted_height; - config.trusted_hash = trusted_hash; - config.trace_file = Some(proof_path.clone()); - config.verbose = "1".parse()?; - config.contract_address = cli.contract.clone(); - config.storage_key = "quartz_session".to_owned(); + 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)); diff --git a/apps/mtcs/scripts/src/bin/listen.rs b/apps/mtcs/scripts/src/bin/listen.rs index 498769b9..e7d32f20 100644 --- a/apps/mtcs/scripts/src/bin/listen.rs +++ b/apps/mtcs/scripts/src/bin/listen.rs @@ -90,7 +90,7 @@ async fn main() -> Result<(), anyhow::Error> { .await .unwrap(); - while let Some(_) = subs.next().await { + while subs.next().await.is_some() { // On init_clearing, run process if let Err(e) = handler( &cli.contract, @@ -145,17 +145,15 @@ async fn handler( .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 attestation = gramine_ias_request(quote.attestation, user).await?; let msg = RawAttestedMsgSansHandler(quote.msg); - let setoffs_msg = ExecuteMsg::SubmitSetoffs::(AttestedMsg { - msg, - attestation: attestation.into(), - }); + let setoffs_msg = + ExecuteMsg::SubmitSetoffs::(AttestedMsg { msg, attestation }); // Send setoffs to mtcs contract on chain let output = - wasmd_client.tx_execute(&contract, chain_id, 2000000, sender, json!(setoffs_msg))?; + wasmd_client.tx_execute(contract, chain_id, 2000000, sender, json!(setoffs_msg))?; println!("output: {}", output); Ok(()) diff --git a/utils/cycles-sync/src/main.rs b/utils/cycles-sync/src/main.rs index 1590ad89..9d82a763 100644 --- a/utils/cycles-sync/src/main.rs +++ b/utils/cycles-sync/src/main.rs @@ -112,10 +112,8 @@ async fn sync_setoffs(cli: Cli) -> Result<(), DynError> { .flat_map(|(obligation_digest, so)| match so { RawSetOff::SetOff(sos_enc) => { let so_enc = sos_enc.first().unwrap(); - let (debtor_id, creditor_id) = obligation_user_map - .get(obligation_digest) - .map(Clone::clone) - .unwrap(); + let (debtor_id, creditor_id) = + obligation_user_map.get(obligation_digest).copied().unwrap(); let sk = |id| keys[&id].private_key().to_bytes(); let so_ser = if let Ok(so) = ecies::decrypt(&sk(debtor_id), so_enc.as_slice()) { @@ -377,7 +375,7 @@ mod tests { #[test] fn test_create_mnemonic() { // Generate random Mnemonic using the default language (English) - let mnemonic = Mnemonic::random(&mut OsRng, Default::default()); + let mnemonic = Mnemonic::random(OsRng, Default::default()); println!("{}", mnemonic.phrase()); } diff --git a/utils/cycles-sync/src/wasmd_client.rs b/utils/cycles-sync/src/wasmd_client.rs index c5391104..f93457bb 100644 --- a/utils/cycles-sync/src/wasmd_client.rs +++ b/utils/cycles-sync/src/wasmd_client.rs @@ -107,7 +107,7 @@ impl WasmdClient for CliWasmdClient { .args(["--node", self.url.as_str()]) .args(["query", "wasm"]) .args(["contract-state", "raw", contract.as_ref()]) - .arg(query.to_string()) + .arg(&query) .args(["--output", "json"]); let output = command.output()?; @@ -145,7 +145,7 @@ impl WasmdClient for CliWasmdClient { } // TODO: find the rust type for the tx output and return that - Ok(format!("{}", String::from_utf8(output.stdout)?)) + Ok((String::from_utf8(output.stdout)?).to_string()) } fn deploy( @@ -156,14 +156,14 @@ impl WasmdClient for CliWasmdClient { ) -> Result { let mut wasmd = Command::new("wasmd"); let command = wasmd - .args(&["--node", self.url.as_str()]) - .args(&["tx", "wasm", "store", &wasm_path.to_string()]) - .args(&["--from", sender.as_ref()]) - .args(&["--chain-id", chain_id.as_ref()]) - .args(&["--gas-prices", "0.0025ucosm"]) - .args(&["--gas", "auto"]) - .args(&["--gas-adjustment", "1.3"]) - .args(&["-o", "json"]) + .args(["--node", self.url.as_str()]) + .args(["tx", "wasm", "store", &wasm_path.to_string()]) + .args(["--from", sender.as_ref()]) + .args(["--chain-id", chain_id.as_ref()]) + .args(["--gas-prices", "0.0025ucosm"]) + .args(["--gas", "auto"]) + .args(["--gas-adjustment", "1.3"]) + .args(["-o", "json"]) .arg("-y"); let output = command.output()?; @@ -173,7 +173,7 @@ impl WasmdClient for CliWasmdClient { } // TODO: find the rust type for the tx output and return that - Ok(format!("{}", String::from_utf8(output.stdout)?)) + Ok((String::from_utf8(output.stdout)?).to_string()) } fn init( @@ -186,17 +186,17 @@ impl WasmdClient for CliWasmdClient { ) -> Result { let mut wasmd = Command::new("wasmd"); let command = wasmd - .args(&["--node", self.url.as_str()]) - .args(&["tx", "wasm", "instantiate"]) - .args(&[&code_id.to_string(), &init_msg.to_string()]) - .args(&["--label", label.as_ref()]) - .args(&["--from", sender.as_ref()]) + .args(["--node", self.url.as_str()]) + .args(["tx", "wasm", "instantiate"]) + .args([&code_id.to_string(), &init_msg.to_string()]) + .args(["--label", label.as_ref()]) + .args(["--from", sender.as_ref()]) .arg("--no-admin") - .args(&["--chain-id", chain_id.as_ref()]) - .args(&["--gas-prices", "0.0025ucosm"]) - .args(&["--gas", "auto"]) - .args(&["--gas-adjustment", "1.3"]) - .args(&["-o", "json"]) + .args(["--chain-id", chain_id.as_ref()]) + .args(["--gas-prices", "0.0025ucosm"]) + .args(["--gas", "auto"]) + .args(["--gas-adjustment", "1.3"]) + .args(["-o", "json"]) .arg("-y"); let output = command.output()?; @@ -206,6 +206,6 @@ impl WasmdClient for CliWasmdClient { } // TODO: find the rust type for the tx output and return that - Ok(format!("{}", String::from_utf8(output.stdout)?)) + Ok((String::from_utf8(output.stdout)?).to_string()) } } From 02b24ee26b1c594469b15cf66e01a957ec6c54ef Mon Sep 17 00:00:00 2001 From: Daniel Gushchyan Date: Tue, 30 Jul 2024 09:37:09 -0700 Subject: [PATCH 15/15] remove cli macro, minor reformatting --- Cargo.lock | 4 -- Cargo.toml | 15 +++-- apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml | 3 +- apps/transfers/contracts/Cargo.toml | 1 + core/quartz-common/Cargo.toml | 9 +-- core/quartz-common/src/cli.rs | 52 ------------------ core/quartz-common/src/lib.rs | 5 -- core/quartz-common/src/quartz_macro.rs | 64 ---------------------- 8 files changed, 14 insertions(+), 139 deletions(-) delete mode 100644 core/quartz-common/src/cli.rs delete mode 100644 core/quartz-common/src/quartz_macro.rs diff --git a/Cargo.lock b/Cargo.lock index 28571025..71d725f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2874,13 +2874,9 @@ dependencies = [ name = "quartz-common" version = "0.1.0" dependencies = [ - "clap", - "color-eyre", - "cosmrs", "quartz-cw", "quartz-enclave", "quartz-proto", - "tendermint-light-client", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 906ee0c6..2b8796a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,8 @@ members = [ "apps/transfers/enclave", "cli", "core/light-client-proofs/*", - "core/quartz", "core/quartz-common", + "core/quartz", + "core/quartz-common", "cosmwasm/packages/*", "utils/*", ] @@ -77,19 +78,21 @@ mc-attestation-verifier = { git = "https://github.com/informalsystems/attestatio # quartz cw-proof = { path = "core/light-client-proofs/cw-proof", default-features = false } -cw-tee-mtcs = { path = "apps/mtcs/contracts/cw-tee-mtcs", default-features = false } cycles-sync = { path = "utils/cycles-sync", default-features = false } -mtcs = { git = "ssh://git@github.com/informalsystems/mtcs.git", default-features = false } -quartz-common = { path = "core/quartz-common"} +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 } quartz-tee-ra = { path = "cosmwasm/packages/quartz-tee-ra", default-features = false } -tm-stateless-verifier = { path = "core/light-client-proofs/tm-stateless-verifier", default-features = false } tm-prover = { path = "utils/tm-prover", default-features = false } -transfers-contract = { path = "apps/transfers/contracts", default-features = false } +tm-stateless-verifier = { path = "core/light-client-proofs/tm-stateless-verifier", default-features = false } + +# quartz apps +cw-tee-mtcs = { path = "apps/mtcs/contracts/cw-tee-mtcs", default-features = false } +mtcs = { git = "ssh://git@github.com/informalsystems/mtcs.git", default-features = false } mtcs-enclave = { path = "apps/mtcs/enclave" } +transfers-contract = { path = "apps/transfers/contracts", default-features = false } [profile.release] opt-level = 3 diff --git a/apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml b/apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml index f8535b41..45935d36 100644 --- a/apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml +++ b/apps/mtcs/contracts/cw-tee-mtcs/Cargo.toml @@ -20,6 +20,7 @@ incremental = false overflow-checks = true [features] +library = [] mock-sgx = ["quartz-common/mock-sgx-cw"] [dependencies] @@ -47,4 +48,4 @@ getrandom = { version = "0.2.15", features = ["js"] } [dev-dependencies] cw-multi-test = "2.0.0" -serde_json = "1.0.113" +serde_json = "1.0.113" \ No newline at end of file diff --git a/apps/transfers/contracts/Cargo.toml b/apps/transfers/contracts/Cargo.toml index 715867f2..ed004af6 100644 --- a/apps/transfers/contracts/Cargo.toml +++ b/apps/transfers/contracts/Cargo.toml @@ -24,6 +24,7 @@ incremental = false overflow-checks = true [features] +library = [] mock-sgx = ["quartz-common/mock-sgx-cw"] [dependencies] diff --git a/core/quartz-common/Cargo.toml b/core/quartz-common/Cargo.toml index 9a7ef5a4..b039afb8 100644 --- a/core/quartz-common/Cargo.toml +++ b/core/quartz-common/Cargo.toml @@ -9,19 +9,14 @@ repository.workspace = true authors.workspace = true [features] -full = ["contract", "enclave", "proto", "macro"] +full = ["contract", "enclave", "proto"] contract = ["dep:quartz-cw"] enclave = ["dep:quartz-enclave", "proto"] proto = ["dep:quartz-proto"] -macro = ["dep:cosmrs", "dep:color-eyre", "dep:clap", "dep:tendermint-light-client"] mock-sgx-cw = ["quartz-cw/mock-sgx"] mock-sgx-enclave = ["quartz-enclave/mock-sgx"] [dependencies] quartz-cw = { workspace = true, optional = true } quartz-proto = { workspace = true, optional = true } -quartz-enclave = { workspace = true, optional = true } -cosmrs = { workspace = true, optional = true } -color-eyre = { workspace = true, default-features = false, optional = true} -clap = { workspace = true, default-features = false, features = ["derive", "std"], optional = true} -tendermint-light-client = { workspace = true, default-features = false, features = ["rust-crypto"], optional = true} +quartz-enclave = { workspace = true, optional = true } \ No newline at end of file diff --git a/core/quartz-common/src/cli.rs b/core/quartz-common/src/cli.rs deleted file mode 100644 index 7c59e628..00000000 --- a/core/quartz-common/src/cli.rs +++ /dev/null @@ -1,52 +0,0 @@ -use std::net::SocketAddr; - -use clap::Parser; -use color_eyre::eyre::{eyre, Result}; -use cosmrs::tendermint::Hash; -use tendermint_light_client::types::{Height, TrustThreshold}; - -fn parse_trust_threshold(s: &str) -> Result { - if let Some((l, r)) = s.split_once('/') { - TrustThreshold::new(l.parse()?, r.parse()?).map_err(Into::into) - } else { - Err(eyre!( - "invalid trust threshold: {s}, format must be X/Y where X and Y are integers" - )) - } -} - -#[derive(Debug, Parser)] -#[command(author, version, about, long_about = None)] -pub struct Cli { - /// RPC server address - #[clap(long, default_value = "127.0.0.1:11090")] - pub rpc_addr: SocketAddr, - - /// Identifier of the chain - #[clap(long)] - pub chain_id: String, - - /// Height of the trusted header (AKA root-of-trust) - #[clap(long)] - pub trusted_height: Height, - - /// Hash of the trusted header (AKA root-of-trust) - #[clap(long)] - pub trusted_hash: Hash, - - /// Trust threshold - #[clap(long, value_parser = parse_trust_threshold, default_value_t = TrustThreshold::TWO_THIRDS)] - pub trust_threshold: TrustThreshold, - - /// Trusting period, in seconds (default: two weeks) - #[clap(long, default_value = "1209600")] - pub trusting_period: u64, - - /// Maximum clock drift, in seconds - #[clap(long, default_value = "5")] - pub max_clock_drift: u64, - - /// Maximum block lag, in seconds - #[clap(long, default_value = "5")] - pub max_block_lag: u64, -} diff --git a/core/quartz-common/src/lib.rs b/core/quartz-common/src/lib.rs index 3afb5022..95da31a1 100644 --- a/core/quartz-common/src/lib.rs +++ b/core/quartz-common/src/lib.rs @@ -1,8 +1,3 @@ -#[cfg(feature = "macro")] -mod cli; -#[cfg(feature = "macro")] -mod quartz_macro; - #[cfg(feature = "contract")] pub use quartz_cw as contract; #[cfg(feature = "enclave")] diff --git a/core/quartz-common/src/quartz_macro.rs b/core/quartz-common/src/quartz_macro.rs deleted file mode 100644 index 7d96f25d..00000000 --- a/core/quartz-common/src/quartz_macro.rs +++ /dev/null @@ -1,64 +0,0 @@ -#[cfg(feature = "macro")] -#[macro_export] -macro_rules! quartz_server { - ($server_type:ty, $service_new:expr) => { - quartz_server!($crate::cli::Cli, $server_type, $service_new); - }; - ($cli_type:ty, $server_type:ty, $service_new:expr) => { - use std::{ - sync::{Arc, Mutex}, - time::Duration, - }; - - use clap::Parser; - use tonic::transport::Server; - use $crate::{ - contract::state::{Config, LightClientOpts}, - enclave::{ - attestor::{Attestor, EpidAttestor}, - server::CoreService, - }, - proto::core_server::CoreServer, - }; - - #[tokio::main(flavor = "current_thread")] - async fn main() -> Result<(), Box> { - let args = <$cli_type>::parse(); - - let light_client_opts = LightClientOpts::new( - args.chain_id, - args.trusted_height.into(), - Vec::from(args.trusted_hash) - .try_into() - .expect("invalid trusted hash"), - ( - args.trust_threshold.numerator(), - args.trust_threshold.denominator(), - ), - args.trusting_period, - args.max_clock_drift, - args.max_block_lag, - )?; - - let config = Config::new( - EpidAttestor.mr_enclave()?, - Duration::from_secs(30 * 24 * 60), - light_client_opts, - ); - - let sk = Arc::new(Mutex::new(None)); - - Server::builder() - .add_service(CoreServer::new(CoreService::new( - config, - sk.clone(), - EpidAttestor, - ))) - .add_service($service_new(sk.clone())) - .serve(args.rpc_addr) - .await?; - - Ok(()) - } - }; -}