#sgx #cosmwasm #cycle #quartz #cosmos

quartz-enclave-core

A Rust framework for building Intel SGX enclaves managed by a CosmWasm contract

2 releases

0.1.1 Oct 17, 2024
0.1.0 Oct 16, 2024

#14 in #quartz

24 downloads per month
Used in quartz-common

Apache-2.0

155KB
3K SLoC

Quartz enclave

Enclave usage

gramine-sgx-gen-private-key

CARGO_TARGET_DIR=./target cargo build --release

gramine-manifest  \
    -Dlog_level="error"  \
    -Dhome=${HOME}  \
    -Darch_libdir="/lib/$(gcc -dumpmachine)"  \
    -Dra_type="dcap" \
    -Dra_client_linkable=1 \
    -Dquartz_dir="$(pwd)"  \
    quartz.manifest.template quartz.manifest

gramine-sgx-sign --manifest quartz.manifest --output quartz.manifest.sgx
gramine-sgx ./quartz

CLI usage

cargo run -- --chain-id testing \
    --trusted-height 1 \
    --trusted-hash "A1D115BA3A5E9FCC12ED68A9D8669159E9085F6F96EC26619F5C7CEB4EE02869"

Dependencies

~48–66MB
~1.5M SLoC