diff --git a/README.md b/README.md index 9ce306e..fced843 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,45 @@

quickstart tlsn notary inside sgx enclave

-

for development purposes only

+build: +```bash +SGX=1 make +``` + +then use the generated Gramine RATLS Root CA certificate from `fixture/tls/gramine_crt.pem` in your prover: +```env +GRAMINE_ROOTCA=/home/gg/sgx-tlsn-notary-server/fixture/tls/gramine_crt.pem +``` + +```rust +pub async fn request_notarization( + host: &str, + port: u16, + max_transcript_size: Option, +) -> (tokio_rustls::client::TlsStream, String) { + // Connect to the Notary via TLS-TCP + let pem_file = std::str::from_utf8(include_bytes!( + &env_variables["GRAMINE_ROOTCA"] + )) + .unwrap(); +``` + +run the notary server: +```bash +gramine-sgx sgx-notary-server +``` + +run a prover: +```bash +RUST_LOG=debug,yamux=info cargo run --release --example twitter_dm +``` + +
+
+ +----- + +APPENDIX: +
these install steps are outdated and broken: ```sh #install SGX