Skip to content

Commit

Permalink
add sequence diagram to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
auryn-macmillan committed Jun 24, 2024
1 parent 21684a3 commit b8d63fd
Showing 1 changed file with 58 additions and 1 deletion.
59 changes: 58 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Github Actions][gha-badge]][gha] [![Hardhat][hardhat-badge]][hardhat] [![License: MIT][license-badge]][license]

# Enclave

[gha]: https://github.com/gnosisguild/enclave/actions
Expand All @@ -10,10 +11,66 @@

This is the monorepo for Enclave, an open-source protocol for Encrypted Execution Environments (E3).

## Architecture

Enclave employs a modular architecture involving numerous actors and participants. The sequence diagram below offers a high-level overview of the protocol, but necessarily omits most detail.

```mermaid
sequenceDiagram
actor Token Holders
actor Requester
actor Data Providers
participant Enclave
participant Ciphernode Registry
participant Ciphernodes
participant Computation Module
participant Execution Module
loop Each token holder that wants to register a ciphernode
Token Holders ->> Ciphernode Registry: Stake tokens to register ciphernodes
end
loop Each computation request
Requester ->> Enclave: Request computation
activate Enclave
Enclave ->> Ciphernode Registry: Select Committee
activate Ciphernode Registry
Ciphernode Registry -->> Ciphernodes: Key Setup
activate Ciphernodes
Ciphernodes -->> Ciphernode Registry: Publish shared key
deactivate Ciphernodes
Ciphernode Registry -->> Enclave: Publish Committee
deactivate Ciphernode Registry
loop Each input provider
Data Providers ->> Enclave: Publish inputs
Enclave ->> Computation Module: Validate inputs
activate Computation Module
Computation Module -->> Enclave: 👌
deactivate Computation Module
end
Enclave ->> Execution Module: Request execution
activate Execution Module
Execution Module -->> Enclave: Publish ciphertext output
deactivate Execution Module
Enclave -->> Ciphernodes: Request plaintext output
activate Ciphernodes
Ciphernodes ->> Enclave: Publish plaintext output
deactivate Ciphernodes
Requester -->> Enclave: Get plaintext
Enclave -->> Requester: Returns plaintext
deactivate Enclave
end
```

## Security and Liability

This repo is provided WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

## License

This repo created under the [LGPL-3.0+ license](LICENSE).
This repo created under the [LGPL-3.0+ license](LICENSE).

0 comments on commit b8d63fd

Please sign in to comment.