Skip to content

Commit

Permalink
chore: fix-sgx-steps-redo (#191)
Browse files Browse the repository at this point in the history
## Why?

Clear and short explanation here.

## How?

- Done A (replace with a breakdown of the steps)
- Done B
- Done C

## Tickets?

- [Ticket 1](the-ticket-url-here)
- [Ticket 2](the-ticket-url-here)
- [Ticket 3](the-ticket-url-here)

## Contribution checklist?

- [ ] The commit messages are detailed
- [ ] The `build` command runs locally
- [ ] Assets or static content are linked and stored in the project
- [ ] Document filename is named after the slug
- [ ] You've reviewed spelling using a grammar checker
- [ ] For documentation, guides or references, you've tested the
commands and steps
- [ ] You've done enough research before writing

## Security checklist?

- [ ] Sensitive data has been identified and is being protected properly
- [ ] Injection has been prevented (parameterized queries, no eval or
system calls)
- [ ] The Components are escaping output (to prevent XSS)

## References?

Optionally, provide references such as links

## Preview?

Optionally, provide the preview url here

---------

Co-authored-by: nlc616 <[email protected]>
  • Loading branch information
0xAidan and nlc616 authored Sep 5, 2024
1 parent 7c18231 commit 7a10748
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions src/content/blog/announcements/introducing-fleek-edge-sgx/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,40 +52,26 @@ In addition to security, Fleek’s SGX service leverages content-addressed mecha

## How to use Fleek’s edge-optimized SGX service

Using Fleek’s SGX service is simple and follows a similar process to our Javascript service:
Using Fleek’s Edge SGX service is simple and follows a similar process to our Javascript service:

1. Upload your program
1. Get the [Fleek CLI](https://fleek.xyz/docs/cli/)

Compile your program to WASM, then upload it to an underlying storage layer, like IPFS.

The only difference here is the encryption step — before uploading to IPFS, you encrypt the data to ensure privacy. Soon, this step will be abstracted into Fleek’s CLI, but for now, you can use our standalone binary.

2. Install the binary

Install the binary tool with

```bash
cargo install sgxencrypt
```

Use the binary to encrypt your WASM program before uploading it to Fleek’s storage layer:
2. Run this command to auth your CLI tool:

```bash
sgxencrypt --pubkey <network pubkey> path/to/wasm.wasm
fleek login
```

3. Upload and run the program

Once encrypted, upload the output to Fleek’s storage:
3. Run this command to deploy:

```bash
fleek storage add path/to/wasm.cipher
fleek functions deploy --name Myfunction --path my.wasm --sgx
```

After that, you can call the service via HTTP or other supported transport methods using the CID:
4. You can invoke this function at https://fleek-test.network/services/3 with a payload containing hash, inputs, and whether its encrypted or not (always yes with the current tool), and any inputs you need:

```bash
https://fleek-test.network/services/3/ipfs/{CID}
curl fleek-test.network/services/3 --data '{"hash": "<hash>", "decrypt": true, "input": "foo"}'
```

---
Expand All @@ -112,7 +98,7 @@ As Fleek progresses towards offering a comprehensive full-stack developer experi

You can start building with our Edge SGX service in alpha at the links below. Don’t hesitate to reach out in [Discord](https://discord.gg/fleek) with any questions or feedback.

- Fleek CLI
- [Fleek CLI](https://fleek.xyz/docs/cli/)
- [GitHub ReadMe & Examples](https://github.com/fleek-network/lightning/tree/sgx-alpha/lib/sgxkit#readme)
- Fleek Network SGX Integration Technical Overview
- [Discord](https://discord.gg/fleek)

0 comments on commit 7a10748

Please sign in to comment.