From d475bb11539f441bd684cdddc14f01e827b37267 Mon Sep 17 00:00:00 2001 From: Ryan MacArthur Date: Sat, 17 Feb 2024 04:30:17 -0400 Subject: [PATCH] Update README.md --- README.md | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) 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