-
Notifications
You must be signed in to change notification settings - Fork 8
PRISM-928 - Document prism use case #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
1ce89d1
9208ae2
98e564b
4ae2ed4
8ccfad6
f4d2f21
a413106
7bcd0ed
a57fa95
9890d64
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. show images here on docs, it is good story telling to show this has actual real world use. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,211 @@ | ||||||||||||||||||||||||||
| # Multiparty Computation for COVID-19 Training | ||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use case should not just be a tutorial but talk of high level understanding of the possible real world use cases for prism, make references to the ai repo as well |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This document outlines a **real-world example** of using Prism to run a **secure multiparty computation (MPC)**. | ||||||||||||||||||||||||||
| In this scenario, multiple organizations contribute datasets to jointly run a **COVID-19 training algorithm** while keeping their data private. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Overview | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| In this example, we will: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 1. **Provision the Prism environment** — Set up the workspace, computation, billing, and roles. | ||||||||||||||||||||||||||
| 2. **Prepare and register assets** — Upload datasets and algorithms to Prism. | ||||||||||||||||||||||||||
| 3. **Create a CVM (Confidential Virtual Machine)** — Secure environment where computations are executed. | ||||||||||||||||||||||||||
| 4. **Run the computation** — Trigger the MPC process with all required inputs. | ||||||||||||||||||||||||||
| 5. **Consume the results** — Retrieve the computation output. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## 1. Provision the System on Prism | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Before running any computation: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 1. **Create a workspace** — A collaborative space for all computation participants. | ||||||||||||||||||||||||||
| 2. **Create a computation** — Defines the specific task to run (e.g., COVID-19 prediction). | ||||||||||||||||||||||||||
| 3. **Set up a billing account** — Required for usage tracking and payment. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 📖 **Reference:** See the [Getting Started guide](/docs/getting-started.md) for step-by-step instructions. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Once provisioned: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - All participating organizations **must** be registered on Prism. | ||||||||||||||||||||||||||
| - The computation owner sends **workspace invitations** to all parties so they can upload their datasets or algorithms. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## 2. Creating & Provisioning the Computation | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 1. **Create the computation** | ||||||||||||||||||||||||||
| - On the **Computations** page, click **New Computation**. | ||||||||||||||||||||||||||
| - Fill in the required fields in the modal form. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 2. **Initial state of a new computation** | ||||||||||||||||||||||||||
| - No assets, asset providers, or result consumers are linked yet. | ||||||||||||||||||||||||||
| - These must be **manually added by the computation admin**. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Computation Roles | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Each computation has **default roles** (e.g., Admin, Asset Provider, Result Consumer). | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - Members must be **assigned to roles** before the computation can run. | ||||||||||||||||||||||||||
| - Roles control **permissions** (who can upload datasets, run computations, view results, etc.). | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Preparing the Assets | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 1. Prepare datasets following the guidelines in the | ||||||||||||||||||||||||||
| [AI Docs for COVID-19 testing](https://github.com/ultravioletrs/ai/tree/main/covid19#testing-with-cocos). | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 2. Upload each dataset to Prism: | ||||||||||||||||||||||||||
| - Include the **file checksum** for verification. | ||||||||||||||||||||||||||
| - Associate it with the computation. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| A **fully provisioned computation** looks like this: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Public & Private Keys | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Before running the computation: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 1. Generate a **public/private key pair**. | ||||||||||||||||||||||||||
| 2. Upload the **public key** to Prism. | ||||||||||||||||||||||||||
| 3. Use the **private key** when uploading assets to the CVM. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This ensures assets are **securely transmitted**. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## 3. Create a CVM | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| **CVMs (Confidential Virtual Machines)** are secure execution environments where computations run. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 1. Navigate to the **CVMs** page. | ||||||||||||||||||||||||||
| 2. Click **New CVM** and fill in the required details. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 📖 **Reference:** See the [CVM documentation](/docs/cvms.md) for detailed setup instructions. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## 4. Running the Computation | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Once the CVM is **created** and **online**: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 1. Go to the **Computations** page. | ||||||||||||||||||||||||||
| 2. Click **Run** on your computation. | ||||||||||||||||||||||||||
| 3. In the modal, select the CVM you just created. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| The computation will enter the **waiting** state until the algorithm and datasets are uploaded. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Set CVM Agent URL | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Export the CVM’s gRPC endpoint so the CLI can communicate with it: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||
| export AGENT_GRPC_URL=109.92.195.153:6110 | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| export AGENT_GRPC_URL=109.92.195.153:6110 | |
| export AGENT_GRPC_URL=192.0.2.1:6110 |
Copilot
AI
Aug 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same production IP address is repeated here. This should be replaced with a documentation-safe placeholder IP address.
| export AGENT_GRPC_URL=109.92.195.153:6110 | |
| export AGENT_GRPC_URL=198.51.100.1:6110 |
Copilot
AI
Aug 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alt text 'alt text' is not descriptive. Consider using meaningful alt text like 'Downloaded computation results CLI output' for better accessibility and documentation clarity.
|  | |
| This also reflects on ui with an event to indicate the computation is complete: | |
|  | |
|  | |
| This also reflects on ui with an event to indicate the computation is complete: | |
|  |
Copilot
AI
Aug 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alt text 'alt text' is not descriptive. Consider using meaningful alt text like 'UI showing consumed results event' for better accessibility and documentation clarity.
|  | |
|  |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,7 +86,8 @@ const sidebars: SidebarsConfig = { | |
| 'logs_api_docs' | ||
| ] | ||
| }, | ||
| "billing" | ||
| "billing", | ||
| "use_case" | ||
| ], | ||
| }; | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be multiple parties to demonstrate the use case. here all data comes from one user