Repo reorg phase-3 (#8)
This commit is contained in:
parent
ba2146ff7d
commit
cd442db003
26 changed files with 1824 additions and 1166 deletions
|
@ -1,6 +1,3 @@
|
|||
[net]
|
||||
git-fetch-with-cli = true
|
||||
|
||||
[alias]
|
||||
wasm = "build --release --lib --target wasm32-unknown-unknown"
|
||||
unit-test = "test --lib"
|
||||
|
|
6
.github/workflows/cosmwasm-basic.yml
vendored
6
.github/workflows/cosmwasm-basic.yml
vendored
|
@ -6,16 +6,12 @@ on:
|
|||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/cosmwasm-basic.yml
|
||||
- Cargo.lock
|
||||
- Cargo.toml
|
||||
- apps/**
|
||||
- cosmwasm/**
|
||||
push:
|
||||
branches: master
|
||||
branches: main
|
||||
paths:
|
||||
- .github/workflows/cosmwasm-basic.yml
|
||||
- Cargo.lock
|
||||
- Cargo.toml
|
||||
- apps/**
|
||||
- cosmwasm/**
|
||||
|
||||
|
|
8
.github/workflows/rust.yml
vendored
8
.github/workflows/rust.yml
vendored
|
@ -70,7 +70,7 @@ jobs:
|
|||
- uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
args: --all-features --all-targets --workspace --exclude "cw-tee-mtcs"
|
||||
args: --all-features --all-targets --workspace
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -90,12 +90,12 @@ jobs:
|
|||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --all-features --no-fail-fast --no-run --workspace --exclude "cw-tee-mtcs"
|
||||
args: --all-features --no-fail-fast --no-run --workspace
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --all-features --no-fail-fast --workspace --exclude "cw-tee-mtcs" -- --nocapture
|
||||
args: --all-features --no-fail-fast --workspace -- --nocapture
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --no-default-features --no-fail-fast --no-run --workspace --exclude "cw-tee-mtcs"
|
||||
args: --no-default-features --no-fail-fast --no-run --workspace
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,4 +3,4 @@
|
|||
*.manifest.sgx
|
||||
.idea/
|
||||
target/
|
||||
**/Cargo.lock
|
||||
artifacts/
|
||||
|
|
1195
Cargo.lock
generated
1195
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
74
Cargo.toml
74
Cargo.toml
|
@ -1,9 +1,81 @@
|
|||
[workspace]
|
||||
resolver = "2"
|
||||
members = [
|
||||
"apps/mtcs/contracts/cw-tee-mtcs",
|
||||
"core/light-client-proofs/*",
|
||||
"core/quartz",
|
||||
"cosmwasm/packages/*",
|
||||
"utils/*",
|
||||
]
|
||||
exclude = ["apps/mtcs/contracts/cw-tee-mtcs"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.71.1"
|
||||
license = ""
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/informalsystems/cycles-quartz"
|
||||
authors = ["Informal Systems <hello@informal.systems>"]
|
||||
|
||||
[workspace.dependencies]
|
||||
# external
|
||||
async-trait = { version = "0.1.79", default-features = false }
|
||||
bip32 = { version = "0.5.1", default-features = false, features = ["alloc", "secp256k1", "bip39"] }
|
||||
clap = { version = "4.1.8", default-features = false, features = ["derive", "std"] }
|
||||
color-eyre = { version = "0.6.2", default-features = false }
|
||||
der = { version = "0.7.9", default-features = false }
|
||||
displaydoc = { version = "0.2.4", default-features = false }
|
||||
ecies = { version = "0.2.3", default-features = false, features = ["pure"] }
|
||||
futures = { version = "0.3.27", default-features = false, features = ["alloc"] }
|
||||
hex = { version = "0.4.3", default-features = false }
|
||||
hex-literal = { version = "0.4.1", default-features = false }
|
||||
k256 = { version = "0.13.2", default-features = false, features = ["ecdsa", "alloc"] }
|
||||
num-bigint = { version = "0.4.4", default-features = false }
|
||||
prost = { version = "0.12.3", default-features = false }
|
||||
rand = { version = "0.8.5", default-features = false }
|
||||
rand_core = { version = "0.6", default-features = false, features = ["std"] }
|
||||
reqwest = { version = "0.12.2", default-features = false, features = ["json", "rustls-tls"] }
|
||||
serde = { version = "1.0.189", default-features = false, features = ["derive"] }
|
||||
serde_json = { version = "1.0.94", default-features = false }
|
||||
serde_with = { version = "3.4.0", default-features = false, features = ["hex", "macros"] }
|
||||
sha2 = { version = "0.10.8", default-features = false }
|
||||
subtle-encoding = { version = "0.5.1", default-features = false, features = ["bech32-preview"] }
|
||||
tempfile = { version = "3", default-features = false }
|
||||
thiserror = { version = "1.0.49", default-features = false }
|
||||
tokio = { version = "1.0", default-features = false, features = ["macros", "rt-multi-thread"] }
|
||||
tonic = { version = "0.11", default-features = false, features = ["codegen", "prost", "transport"] }
|
||||
tonic-build = { version = "0.11", default-features = false, features = ["prost", "transport"] }
|
||||
tracing = { version = "0.1.39", default-features = false }
|
||||
tracing-subscriber = { version = "0.3.17", default-features = false, features = ["fmt"] }
|
||||
uuid = { version = "1.4.1", default-features = false, features = ["serde"] }
|
||||
x509-cert = { version = "0.2.5", default-features = false }
|
||||
zeroize = { version = "1.7.0", default-features = false }
|
||||
|
||||
# cosmos
|
||||
cosmos-sdk-proto = { version = "0.21.1" }
|
||||
cosmrs = { version = "=0.16.0", default-features = false }
|
||||
cosmwasm-schema = { version = "1.4.0", default-features = false }
|
||||
cosmwasm-std = { version = "1.5.2", default-features = false }
|
||||
cw-storage-plus = { version = "1.1.0", default-features = false }
|
||||
ics23 = { version = "0.11.0", default-features = false, features = ["host-functions"] }
|
||||
tendermint = { version = "=0.36.0", default-features = false }
|
||||
tendermint-light-client = { version = "=0.36.0", default-features = false, features = ["rust-crypto"] }
|
||||
tendermint-light-client-detector = { version = "=0.36.0", default-features = false }
|
||||
tendermint-rpc = { version = "=0.36.0", default-features = false, features = ["http-client"] }
|
||||
|
||||
# mobilecoin
|
||||
mc-sgx-core-types = { git = "https://github.com/informalsystems/sgx", default-features = false }
|
||||
mc-sgx-dcap-types = { git = "https://github.com/informalsystems/sgx", default-features = false }
|
||||
mc-sgx-dcap-sys-types = { git = "https://github.com/informalsystems/sgx", default-features = false }
|
||||
mc-attestation-verifier = { git = "https://github.com/informalsystems/attestation", default-features = false }
|
||||
|
||||
# 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-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 }
|
||||
tm-stateless-verifier = { path = "core/light-client-proofs/tm-stateless-verifier", default-features = false }
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[alias]
|
||||
wasm = "build --release --lib --target wasm32-unknown-unknown"
|
||||
unit-test = "test --lib"
|
||||
schema = "run --bin schema"
|
1184
apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock
generated
Normal file
1184
apps/mtcs/contracts/cw-tee-mtcs/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -3,13 +3,7 @@ name = "cw-tee-mtcs"
|
|||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
exclude = [
|
||||
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
|
||||
"contract.wasm",
|
||||
"hash.txt",
|
||||
]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
exclude = ["contract.wasm", "hash.txt"]
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
@ -26,35 +20,25 @@ incremental = false
|
|||
overflow-checks = true
|
||||
|
||||
[features]
|
||||
# for more explicit tests, cargo test --features=backtraces
|
||||
backtraces = ["cosmwasm-std/backtraces"]
|
||||
# use library feature to disable all instantiate/execute/query exports
|
||||
library = []
|
||||
|
||||
[package.metadata.scripts]
|
||||
optimize = """docker run --rm -v "$(pwd)":/code \
|
||||
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \
|
||||
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
|
||||
cosmwasm/rust-optimizer:0.14.0
|
||||
"""
|
||||
|
||||
[dependencies]
|
||||
cosmwasm-schema = "1.5.0"
|
||||
cosmwasm-std = { version = "1.5.0", features = [
|
||||
"cosmwasm_1_3",
|
||||
# Enable this if you only deploy to chains that have CosmWasm 1.4 or higher
|
||||
# "cosmwasm_1_4",
|
||||
] }
|
||||
cw-storage-plus = "1.1.0"
|
||||
cw20-base = { version = "1.1.1", features = ["library"] }
|
||||
cw20 = "1.1.1"
|
||||
cw2 = "1.1.1"
|
||||
# external
|
||||
hex = { version = "0.4.3", default-features = false }
|
||||
k256 = { version = "0.13.2", default-features = false, features = ["ecdsa"] }
|
||||
schemars = "0.8.15"
|
||||
serde = { version = "1.0.189", default-features = false, features = ["derive"] }
|
||||
thiserror = { version = "1.0.49" }
|
||||
|
||||
# cosmwasm
|
||||
cosmwasm-schema = "1.5.0"
|
||||
cosmwasm-std = { version = "1.5.0", features = ["cosmwasm_1_3"] }
|
||||
cw-storage-plus = "1.1.0"
|
||||
cw20-base = { version = "1.1.1", features = ["library"] }
|
||||
cw20 = "1.1.1"
|
||||
cw2 = "1.1.1"
|
||||
|
||||
# quartz
|
||||
quartz-cw = { path = "../../../../cosmwasm/packages/quartz-cw" }
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
@ -1,18 +1,27 @@
|
|||
[package]
|
||||
name = "cw-proof"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
keywords = ["blockchain", "cosmos", "cosmwasm", "cycles", "quartz"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.1.8", features = ["derive"] }
|
||||
cosmrs = { version = "0.15.0", default-features = false }
|
||||
displaydoc = { version = "0.2.4", default-features = false }
|
||||
ics23 = { version = "0.11.0", default-features = false, features = ["host-functions"] }
|
||||
prost = { version = "0.12.3", default-features = false }
|
||||
serde = { version = "1.0.189", features = ["derive"] }
|
||||
serde_with = { version = "3.4.0", default-features = false, features = ["hex", "macros"] }
|
||||
tendermint = { version = "0.34.0", default-features = false }
|
||||
tendermint-rpc = { version = "0.34.0", default-features = false, features = ["http-client"] }
|
||||
# external
|
||||
clap.workspace = true
|
||||
displaydoc.workspace = true
|
||||
prost.workspace = true
|
||||
serde.workspace = true
|
||||
serde_with.workspace = true
|
||||
|
||||
# cosmos
|
||||
cosmrs.workspace = true
|
||||
ics23.workspace = true
|
||||
tendermint.workspace = true
|
||||
tendermint-rpc.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
hex = { version = "0.4.3", default-features = false }
|
||||
hex.workspace = true
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
[package]
|
||||
name = "tm-stateless-verifier"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
keywords = ["blockchain", "cosmos", "tendermint", "cycles", "quartz"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
displaydoc = { version = "0.2.4", default-features = false }
|
||||
tendermint = { version = "=0.34.0", default-features = false }
|
||||
tendermint-light-client = { version = "=0.34.0", default-features = false, features = ["rust-crypto"] }
|
||||
# external
|
||||
displaydoc.workspace = true
|
||||
|
||||
# cosmos
|
||||
tendermint.workspace = true
|
||||
tendermint-light-client.workspace = true
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
[package]
|
||||
name = "quartz-proto"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
keywords = ["blockchain", "cosmos", "tendermint", "cycles", "quartz"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
prost = "0.12"
|
||||
tonic = "0.11"
|
||||
# external
|
||||
prost.workspace = true
|
||||
tonic.workspace = true
|
||||
|
||||
[build-dependencies]
|
||||
tonic-build = "0.11"
|
||||
tonic-build.workspace = true
|
||||
|
|
|
@ -1,34 +1,44 @@
|
|||
[package]
|
||||
name = "quartz-enclave"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
keywords = ["blockchain", "cosmos", "tendermint", "cycles", "quartz"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.1.8", features = ["derive"] }
|
||||
color-eyre = "0.6.2"
|
||||
cosmrs = "0.16.0"
|
||||
cosmwasm-std = "1.5.2"
|
||||
ecies = { version = "0.2.3", default-features = false, features = ["pure"] }
|
||||
k256 = { version = "0.13.2", default-features = false, features = ["ecdsa", "alloc"] }
|
||||
prost = "0.12"
|
||||
rand = "0.8.5"
|
||||
serde = { version = "1.0.189", features = ["derive"] }
|
||||
serde_json = "1.0.94"
|
||||
tendermint = "0.34.0"
|
||||
tendermint-light-client = "0.34.0"
|
||||
tonic = "0.11"
|
||||
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
|
||||
# external
|
||||
clap.workspace = true
|
||||
color-eyre.workspace = true
|
||||
ecies.workspace = true
|
||||
hex.workspace = true
|
||||
k256.workspace = true
|
||||
prost.workspace = true
|
||||
rand.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
tonic.workspace = true
|
||||
tokio.workspace = true
|
||||
|
||||
cw-proof = { path = "../light-client-proofs/cw-proof" }
|
||||
cw-tee-mtcs = { path = "../../apps/mtcs/contracts/cw-tee-mtcs" }
|
||||
cycles-sync = { path = "../../utils/cycles-sync" }
|
||||
mtcs = { git = "ssh://git@github.com/informalsystems/mtcs.git" }
|
||||
quartz-cw = { path = "../../cosmwasm/packages/quartz-cw" }
|
||||
quartz-proto = { path = "../quartz-proto" }
|
||||
quartz-relayer = { path = "../../relayer" }
|
||||
quartz-tee-ra = { path = "../../cosmwasm/packages/quartz-tee-ra" }
|
||||
tm-stateless-verifier = { path = "../light-client-proofs/tm-stateless-verifier" }
|
||||
hex = "0.4.3"
|
||||
# cosmos
|
||||
cosmrs.workspace = true
|
||||
cosmwasm-std.workspace = true
|
||||
tendermint.workspace = true
|
||||
tendermint-light-client.workspace = true
|
||||
|
||||
# quartz
|
||||
cw-proof.workspace = true
|
||||
cw-tee-mtcs.workspace = true
|
||||
cycles-sync.workspace = true
|
||||
mtcs.workspace = true
|
||||
quartz-cw.workspace = true
|
||||
quartz-proto.workspace = true
|
||||
quartz-relayer.workspace = true
|
||||
quartz-tee-ra.workspace = true
|
||||
tm-stateless-verifier.workspace = true
|
||||
|
||||
[build-dependencies]
|
||||
tonic-build = "0.11"
|
||||
tonic-build.workspace = true
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[alias]
|
||||
wasm = "build --release --lib --target wasm32-unknown-unknown"
|
||||
unit-test = "test --lib"
|
||||
schema = "run --bin schema"
|
|
@ -1,5 +0,0 @@
|
|||
[alias]
|
||||
wasm = "build --release --lib --target wasm32-unknown-unknown"
|
||||
wasm-debug = "build --lib --target wasm32-unknown-unknown"
|
||||
schema = "run --bin schema"
|
||||
|
|
@ -1,19 +1,29 @@
|
|||
[package]
|
||||
name = "quartz-cw"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
keywords = ["blockchain", "cosmos", "cosmwasm", "cycles", "quartz"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
cw-storage-plus = "1.1.0"
|
||||
cosmwasm-schema = "1.4.0"
|
||||
cosmwasm-std = "1.4.0"
|
||||
k256 = { version = "0.13.2", default-features = false, features = ["ecdsa", "alloc"] }
|
||||
serde = { version = "1.0.188", default-features = false, features = ["derive"] }
|
||||
serde_json = "1.0.94"
|
||||
sha2 = "0.10.8"
|
||||
thiserror = "1.0.57"
|
||||
# external
|
||||
k256.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
sha2.workspace = true
|
||||
thiserror.workspace = true
|
||||
|
||||
quartz-tee-ra = { path = "../../packages/quartz-tee-ra" }
|
||||
# cosmos
|
||||
cw-storage-plus.workspace = true
|
||||
cosmwasm-schema.workspace = true
|
||||
cosmwasm-std.workspace = true
|
||||
|
||||
# quartz
|
||||
quartz-tee-ra.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
serde_json = "1.0.113"
|
||||
serde_json.workspace = true
|
||||
|
|
|
@ -1,25 +1,33 @@
|
|||
[package]
|
||||
name = "quartz-tee-ra"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
keywords = ["blockchain", "cosmos", "cosmwasm", "cycles", "quartz"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
cosmwasm-schema = "1.4.0"
|
||||
cosmwasm-std = "1.4.0"
|
||||
hex-literal = "0.4.1"
|
||||
num-bigint = "0.4.4"
|
||||
serde_json = "1.0.108"
|
||||
sha2 = "0.10.8"
|
||||
thiserror = { version = "1.0.49" }
|
||||
# external
|
||||
der.workspace = true
|
||||
displaydoc.workspace = true
|
||||
hex-literal.workspace = true
|
||||
num-bigint.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
sha2.workspace = true
|
||||
thiserror.workspace = true
|
||||
x509-cert.workspace = true
|
||||
zeroize.workspace = true
|
||||
|
||||
der = { version = "0.7.9", default-features = false }
|
||||
displaydoc = { version = "0.2.4", default-features = false }
|
||||
mc-sgx-core-types = { git = "https://github.com/informalsystems/sgx" }
|
||||
mc-sgx-dcap-types = { git = "https://github.com/informalsystems/sgx" }
|
||||
mc-sgx-dcap-sys-types = { git = "https://github.com/informalsystems/sgx" }
|
||||
mc-attestation-verifier = { git = "https://github.com/informalsystems/attestation" }
|
||||
serde = { version = "1.0.198", default-features = false }
|
||||
x509-cert = { version = "0.2.5", default-features = false }
|
||||
zeroize = { version = "1.7.0", default-features = false }
|
||||
# mobilecoin
|
||||
mc-attestation-verifier.workspace = true
|
||||
mc-sgx-core-types.workspace = true
|
||||
mc-sgx-dcap-types.workspace = true
|
||||
mc-sgx-dcap-sys-types.workspace = true
|
||||
|
||||
# cosmos
|
||||
cosmwasm-schema.workspace = true
|
||||
cosmwasm-std.workspace = true
|
|
@ -1,25 +1,35 @@
|
|||
[package]
|
||||
name = "quartz-relayer"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
keywords = ["blockchain", "cosmos", "tendermint", "cycles", "quartz"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.1.8", features = ["derive"] }
|
||||
cosmos-sdk-proto = "0.16.0"
|
||||
cosmrs = { version = "=0.11.0", features = ["cosmwasm"] }
|
||||
cosmwasm-std = "1.5.2"
|
||||
displaydoc = { version = "0.2.3", default-features = false }
|
||||
ecies = { version = "0.2.6", default-features = false, features = ["pure"] }
|
||||
k256 = { version = "0.13.2", default-features = false, features = ["ecdsa", "alloc"] }
|
||||
serde = { version = "1.0.189", features = ["derive"] }
|
||||
serde_json = "1.0.94"
|
||||
subtle-encoding = { version = "0.5.1", features = ["bech32-preview"] }
|
||||
tempfile = "3"
|
||||
tendermint = { version = "0.29.0", features = ["secp256k1"] }
|
||||
thiserror = "1.0.38"
|
||||
tonic = "=0.8.3"
|
||||
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
|
||||
# external
|
||||
clap.workspace = true
|
||||
displaydoc.workspace = true
|
||||
ecies.workspace = true
|
||||
k256.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
subtle-encoding.workspace = true
|
||||
tempfile.workspace = true
|
||||
thiserror.workspace = true
|
||||
tonic.workspace = true
|
||||
tokio.workspace = true
|
||||
|
||||
quartz-cw = { path = "../cosmwasm/packages/quartz-cw" }
|
||||
quartz-tee-ra = { path = "../cosmwasm/packages/quartz-tee-ra" }
|
||||
quartz-proto = { path = "../core/quartz-proto" }
|
||||
# cosmos
|
||||
cosmos-sdk-proto.workspace = true
|
||||
cosmrs = { workspace = true, features = ["cosmwasm"] }
|
||||
cosmwasm-std.workspace = true
|
||||
tendermint = { workspace = true, features = ["secp256k1"] }
|
||||
|
||||
# quartz
|
||||
quartz-cw.workspace = true
|
||||
quartz-tee-ra.workspace = true
|
||||
quartz-proto.workspace = true
|
||||
|
|
|
@ -8,6 +8,9 @@ usage() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
ROOT=${ROOT:-$(pwd)}
|
||||
DIR_QUARTZ="$ROOT/cycles-quartz"
|
||||
DIR_PROTO="$DIR_QUARTZ/core/quartz-proto/proto"
|
||||
IAS_API_KEY="669244b3e6364b5888289a11d2a1726d"
|
||||
RA_CLIENT_SPID="51CAF5A48B450D624AEFE3286D314894"
|
||||
QUOTE_FILE="/tmp/${USER}_test.quote"
|
||||
|
@ -21,7 +24,7 @@ REQUEST_MSG=${2:-"{}"}
|
|||
rm -f "$QUOTE_FILE" "$REPORT_FILE" "$REPORT_SIG_FILE"
|
||||
|
||||
# query the gRPC quartz enclave service
|
||||
ATTESTED_MSG=$(grpcurl -plaintext -import-path ../../utils/quartz-proto/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:11090' quartz.Core/"$REQUEST" | jq -c '.message | fromjson')
|
||||
|
||||
# parse out the quote and the message
|
||||
QUOTE=$(echo "$ATTESTED_MSG" | jq -c '.quote')
|
||||
|
|
|
@ -138,7 +138,7 @@ pub fn tx_bytes(
|
|||
let signer_info = SignerInfo::single_direct(Some(tm_pubkey.into()), sequence_number);
|
||||
let auth_info = signer_info.auth_info(Fee::from_amount_and_gas(amount, gas));
|
||||
let sign_doc = SignDoc::new(&tx_body, &auth_info, chain_id, account_number)?;
|
||||
let tx_signed = sign_doc.sign(&SigningKey::from_bytes(&secret.serialize()).unwrap())?;
|
||||
let tx_signed = sign_doc.sign(&SigningKey::from_slice(&secret.serialize()).unwrap())?;
|
||||
Ok(tx_signed.to_bytes()?)
|
||||
}
|
||||
|
||||
|
|
|
@ -4,20 +4,34 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
if ! [ -f "Cargo.toml" ]; then
|
||||
echo "❌ Error: Cannot find 'Cargo.toml' in current directory. Make sure this command is run from the contract's source directory"
|
||||
usage() {
|
||||
echo "Usage: $0 CARGO_PKG_DIR"
|
||||
echo "Example: $0 apps/mtcs/contracts/cw-tee-mtcs/"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "❌ Error: Missing CARGO_PKG_DIR parameter. Please check if all parameters were specified."
|
||||
usage
|
||||
fi
|
||||
|
||||
if ! [ -f "$1/Cargo.toml" ]; then
|
||||
echo "❌ Error: Cannot find 'Cargo.toml' in current directory. Make sure the contract's source directory is $1"
|
||||
usage
|
||||
fi
|
||||
|
||||
ROOT=${ROOT:-$(pwd)}
|
||||
CARGO_PKG_DIR="$1"
|
||||
|
||||
cd "$CARGO_PKG_DIR"
|
||||
|
||||
echo "👷 Building and optimizing the contract..."
|
||||
echo "==========================================="
|
||||
|
||||
RUSTFLAGS='-C link-arg=-s' cargo wasm
|
||||
|
||||
docker run --rm -v "$(pwd)":/code \
|
||||
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
|
||||
docker run --rm -v "$ROOT":/code \
|
||||
--mount type=volume,source="$(basename "$(pwd)")_cache",target="/code/target" \
|
||||
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
|
||||
cosmwasm/rust-optimizer:0.15.0
|
||||
cosmwasm/rust-optimizer:0.15.0 "$CARGO_PKG_DIR"
|
||||
|
||||
echo ""
|
||||
echo "🎉 Contract build and optimization completed successfully!"
|
||||
|
|
|
@ -1,18 +1,27 @@
|
|||
[package]
|
||||
name = "cw-prover"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
keywords = ["blockchain", "cosmos", "cosmwasm", "cycles", "quartz"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.1.8", features = ["derive"] }
|
||||
cosmrs = "0.15.0"
|
||||
cw-proof = { path = "../../core/light-client-proofs/cw-proof" }
|
||||
serde_json = "1.0.108"
|
||||
tendermint = "0.34.0"
|
||||
tendermint-rpc = { version = "0.34.0", features = ["http-client"] }
|
||||
tokio = { version = "1.26.0", features = ["full"] }
|
||||
# external
|
||||
clap.workspace = true
|
||||
serde_json.workspace = true
|
||||
tokio.workspace = true
|
||||
|
||||
# cosmos
|
||||
cosmrs.workspace = true
|
||||
tendermint.workspace = true
|
||||
tendermint-rpc.workspace = true
|
||||
|
||||
# quartz
|
||||
cw-proof.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
hex = "0.4.3"
|
||||
hex.workspace = true
|
||||
|
|
|
@ -1,26 +1,35 @@
|
|||
[package]
|
||||
name = "cycles-sync"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
keywords = ["blockchain", "cosmos", "tendermint", "cycles", "quartz"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
async-trait = "0.1.79"
|
||||
bip32 = { version = "0.5.1" , features = ["alloc"] }
|
||||
clap = { version = "4.4.6", features = ["derive"] }
|
||||
cosmrs = "0.16.0"
|
||||
cosmwasm-std = "1.5.2"
|
||||
displaydoc = "0.2.4"
|
||||
ecies = { version = "0.2.6", default-features = false, features = ["pure"] }
|
||||
hex = "0.4.3"
|
||||
reqwest = { version = "0.12.2", default-features = false, features = ["json", "rustls-tls"] }
|
||||
serde = { version = "1.0.189", features = ["derive"] }
|
||||
serde_json = "1.0.107"
|
||||
subtle-encoding = "0.5.1"
|
||||
thiserror = "1.0.49"
|
||||
tokio = { version = "1.33.0", features = ["rt-multi-thread", "macros"] }
|
||||
tracing = "0.1.39"
|
||||
tracing-subscriber = "0.3.17"
|
||||
uuid = { version = "1.4.1", features = ["serde"] }
|
||||
# external
|
||||
async-trait.workspace = true
|
||||
bip32.workspace = true
|
||||
clap.workspace = true
|
||||
displaydoc.workspace = true
|
||||
ecies.workspace = true
|
||||
hex.workspace = true
|
||||
reqwest.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
subtle-encoding.workspace = true
|
||||
thiserror.workspace = true
|
||||
tokio.workspace = true
|
||||
tracing.workspace = true
|
||||
tracing-subscriber.workspace = true
|
||||
uuid.workspace = true
|
||||
|
||||
# cosmos
|
||||
cosmrs.workspace = true
|
||||
cosmwasm-std.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
rand_core = { version = "0.6", features = ["std"] }
|
||||
rand_core.workspace = true
|
||||
|
|
|
@ -2,7 +2,7 @@ use async_trait::async_trait;
|
|||
use reqwest::Url;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::json;
|
||||
use tracing::log::debug;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::{
|
||||
obligato_client::Client,
|
||||
|
|
|
@ -1,20 +1,26 @@
|
|||
[package]
|
||||
name = "mtcs-intent"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
keywords = ["blockchain", "cosmos", "tendermint", "cycles", "quartz"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0.32", features = ["derive"] }
|
||||
cosmrs = "0.16.0"
|
||||
cosmwasm-std = "1.5.2"
|
||||
ecies = { version = "0.2.6", default-features = false, features = ["pure"] }
|
||||
hex = "0.4.3"
|
||||
k256 = { version = "0.13.2", default-features = false, features = ["ecdsa", "alloc", "serde"] }
|
||||
rand = "0.8.5"
|
||||
serde = { version = "1.0.197", features = ["derive"] }
|
||||
serde_json = "1.0.114"
|
||||
sha2 = "0.10.8"
|
||||
bip32 = { version = "0.5.1" , features = ["alloc"] }
|
||||
# external
|
||||
bip32.workspace = true
|
||||
clap.workspace = true
|
||||
ecies.workspace = true
|
||||
hex.workspace = true
|
||||
k256.workspace = true
|
||||
rand.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
sha2.workspace = true
|
||||
|
||||
# cosmos
|
||||
cosmrs.workspace = true
|
||||
cosmwasm-std.workspace = true
|
||||
|
|
|
@ -1,22 +1,31 @@
|
|||
[package]
|
||||
name = "tm-prover"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
keywords = ["blockchain", "cosmos", "tendermint", "cycles", "quartz"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.1.8", features = ["derive"] }
|
||||
color-eyre = "0.6.2"
|
||||
cosmrs = "0.15.0"
|
||||
cw-proof = { path = "../../core/light-client-proofs/cw-proof" }
|
||||
futures = "0.3.27"
|
||||
serde = { version = "1.0.189", features = ["derive"] }
|
||||
serde_json = "1.0.94"
|
||||
tendermint = "0.34.0"
|
||||
tendermint-rpc = { version = "0.34.0", features = ["http-client"] }
|
||||
tendermint-light-client = "0.34.0"
|
||||
tendermint-light-client-detector = "0.34.0"
|
||||
tokio = { version = "1.26.0", features = ["full"] }
|
||||
tracing = "0.1.37"
|
||||
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
||||
# external
|
||||
clap.workspace = true
|
||||
color-eyre.workspace = true
|
||||
futures.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
tokio.workspace = true
|
||||
tracing.workspace = true
|
||||
tracing-subscriber = { workspace = true, features = ["env-filter"] }
|
||||
|
||||
# cosmos
|
||||
cosmrs.workspace = true
|
||||
tendermint.workspace = true
|
||||
tendermint-rpc.workspace = true
|
||||
tendermint-light-client.workspace = true
|
||||
tendermint-light-client-detector.workspace = true
|
||||
|
||||
# quartz
|
||||
cw-proof.workspace = true
|
||||
|
|
Loading…
Reference in a new issue