Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/cli/Guides/collaboration.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ Both Alice and Bob can retrieve the order report (11) that confirms the authenti
**Bob**:

- [SPCTL](/cli)
- Provider Tools
- [Provider Tools](/cli/guides/provider-tools)

## Preparation

### Alice: 1. Build a solution

1.1. Write a Dockerfile that creates an image with the training engine. Keep in mind the special file structure inside the <a id="tee"><span className="dashed-underline">TEE</span></a>:
1.1. Write a Dockerfile that creates an image with your code. Keep in mind the special file structure inside the <a id="tee"><span className="dashed-underline">TEE</span></a>:

| **Location** | **Purpose** | **Access** |
| :- | :- | :- |
Expand Down Expand Up @@ -351,3 +351,7 @@ Additionally, find entries in the `runtimeInfo` array that start with `"type": "
```

These hashes are of the actual solution and data that were executed within a TEE. Compare them with the solution and dataset hashes from the respective resource files.

## Support

If you have any issues or questions, contact Super Protocol on [Discord](https://discord.gg/superprotocol) or via the [contact form](https://superprotocol.zendesk.com/hc/en-us/requests/new).
14 changes: 9 additions & 5 deletions docs/cli/Guides/confidential-fine-tuning.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: "fine-tune"
title: "Confidential Fine-Tuning"
slug: "/guides/fine-tune"
sidebar_position: 2
sidebar_position: 3
---

Super Protocol enables independent parties to jointly compute over their private inputs without revealing those inputs to one another.
Expand All @@ -23,7 +23,7 @@ The following is just one example of confidential collaboration. Super Protocol'

## General workflow

**Prepare the solution**
**Prepare the solution**:

```mermaid
sequenceDiagram
Expand All @@ -47,7 +47,7 @@ Alice and Bob download the solution ([4](/cli/guides/fine-tune#alice-and-bob-4-d

If Carol cannot share the code with Alice and Bob, and a third-party auditor is involved, the workflow will differ slightly. After uploading, Carol must also create a solution <a id="offer"><span className="dashed-underline">offer</span></a> on Super Protocol Marketplace (similar to Bob's [Step 8](/cli/guides/fine-tune#bob-8-create-an-offer)).

**Prepare the data**
**Prepare the data**:

```mermaid
sequenceDiagram
Expand All @@ -68,7 +68,7 @@ Alice uploads her model ([6](/cli/guides/fine-tune#alice-6-upload-the-model)) an

Bob creates an offer on the Marketplace ([8](/cli/guides/fine-tune#bob-8-create-an-offer)). The offer requires Bob's manual approval for use. He shares the offer's IDs with Alice.

**Execute**
**Execute**:

```mermaid
sequenceDiagram
Expand Down Expand Up @@ -113,7 +113,7 @@ Both Alice and Bob can retrieve the order report ([12](/cli/guides/fine-tune#ali
**Bob**:

- [SPCTL](/cli)
- Provider Tools
- [Provider Tools](/cli/guides/provider-tools)

**Carol**:

Expand Down Expand Up @@ -411,3 +411,7 @@ Additionally, find entries in the `runtimeInfo` array that start with `"type": "
```

These hashes are of the actual solution and data that were executed within a TEE. Compare them with the solution and dataset hashes from the respective resource files.

## Support

If you have any issues or questions, contact Super Protocol on [Discord](https://discord.gg/superprotocol) or via the [contact form](https://superprotocol.zendesk.com/hc/en-us/requests/new).
147 changes: 147 additions & 0 deletions docs/cli/Guides/provider-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
id: "provider-tools"
title: "Set Up Provider Tools"
slug: "/guides/provider-tools"
sidebar_position: 1
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Provider Tools is a Super Protocol CLI utility for registering <a id="provider"><span className="dashed-underline">providers</span></a> and creating <a id="offer"><span className="dashed-underline">offers</span></a>.

## Download

<Tabs>
<TabItem value="linux" label="Linux" default>
Create a separate directory, open a terminal there, and run the following command:
```
curl -L https://github.com/Super-Protocol/provider-tools/releases/latest/download/provider-tools-linux-x64 -o provider-tools
chmod +x ./provider-tools
```
</TabItem>
<TabItem value="macos" label="macOS">
Create a separate directory, open Terminal there, and run the following command:
```
curl -L https://github.com/Super-Protocol/provider-tools/releases/latest/download/provider-tools-macos-x64 -o provider-tools
chmod +x ./provider-tools
```
</TabItem>
<TabItem value="windows" label="Windows">
Install and launch [WSL](https://learn.microsoft.com/en-us/windows/wsl). Create a separate directory, and install Provider Tools for Linux:
```
curl -L https://github.com/Super-Protocol/provider-tools/releases/latest/download/provider-tools-linux-x64 -o provider-tools
chmod +x ./provider-tools
```
</TabItem>
</Tabs>

## Set Up

```shell
./provider-tools setup
```

Enter the Access token:

```text
eyJhbGciOiJFUzI1NiJ9.eyJhZGRyZXNzIjoiMHhBN0E5NjQ4ZGE2QTg5QjBhNzFhNGMwRDQ2Y2FENDAwMDU3ODI3NGEyIiwiaWF0IjoxNjc5OTk4OTQyLCJleHAiOjE3NDMxMTQxNDJ9.x2lx90D733mToYYdOWhh4hhXn3YowFW4JxFjDFtI7helgp2uqekDHFgekT5yjbBWeHTzRap7SHbDC3VvMIDe0g
```

Follow the dialog:

Q: `Do you need to generate a new authority account?`<br/>
A: `y` (Yes)

Q: `Do you need to generate a new action account?`<br/>
A: `y` (Yes)

Q: `Do you need to generate a new tokenReceiver account?`<br/>
A: `y` (Yes)

## Provider's SPCTL

Providers need another copy of SPCTL configured to manage their offers.

<Tabs>
<TabItem value="provider-tools" label="Provider Tools" default>
If you registered a provider using Provider Tools, you should have a configuration file created automatically in the Provider Tools directory. Its name should be similar to `spctl-config-0xB9f0b77BDbAe9fBe3E60BdC567E453f503605BAb.json`, where `0xB9f0b77BDbAe9fBe3E60BdC567E453f503605BAb` is your Authority Account wallet address.

Copy or download the SPCTL binary to the Provider Tools directory; rename this file to `config.json` so SPCTL can recognize it as its configuration file.

Alternatively, add the `--config` option to SPCTL commands to use the same SPCTL binary with another account. For example:

```shell
./spctl orders list --my-account --type tee --config ../provider-tools/spctl-config-0xB9f0b77BDbAe9fBe3E60BdC567E453f503605BAb.json
```
</TabItem>
<TabItem value="pt-manual" label="Manual Configuration">
As with your User Account's configuration file, you can manually create the provider's SPCTL configuration file.

1. In the Provider Tools directory, create a file named `config.json`. Use the following template:

```json title="config.json"
{
"backend": {
"url": "https://bff.superprotocol.com/graphql",
"accessToken": "eyJhbGciOiJFUzI1NiJ9.eyJhZGRyZXNzIjoiMHhBN0E5NjQ4ZGE2QTg5QjBhNzFhNGMwRDQ2Y2FENDAwMDU3ODI3NGEyIiwiaWF0IjoxNjc5OTk4OTQyLCJleHAiOjE3NDMxMTQxNDJ9.x2lx90D733mToYYdOWhh4hhXn3YowFW4JxFjDFtI7helgp2uqekDHFgekT5yjbBWeHTzRap7SHbDC3VvMIDe0g"
},
"blockchain": {
"rpcUrl": "https://opbnb.superprotocol.com",
"smartContractAddress": "0x3C69ea105Fc716C1Dcb41859281Aa817D0A0B279",
"accountPrivateKey": "",
"authorityAccountPrivateKey": ""
},
"storage": {
"type": "STORJ",
"bucket": "",
"prefix": "",
"writeAccessToken": "",
"readAccessToken": ""
},
"workflow": {
"resultEncryption": {
"algo": "ECIES",
"key": "",
"encoding": "base64"
}
}
}
```

2. Do not change the preconfigured values and provide values to the following keys:

| **Key** | **Description** |
| :- | :- |
| `"accountPrivateKey"` | Action Account private key. |
| `"authorityAccountPrivateKey"` | Authority Account private key. |
| `"bucket"` | (optional) Name of a Storj bucket. |
| `"prefix"` | (optional) Path to a directory inside the bucket. It can be empty. |
| `"writeAccessToken"` | (optional) Storj access grant with **Full** permission (**Read**, **List**, **Write**, **Delete**) for this bucket. |
| `"readAccessToken"` | (optional) Storj access grant with **Read** permission for this bucket. |

You can find the section with your Authority and Action Accounts private keys in `provider-tools-config.json` in the Provider Tools directory. For example:

```json title="provider-tools-config.json"
"account": {
"authority": "0x50612a8bf52cb263825e58c72361ea58c04efa7af7e5b549ea9c2ed02059c668d",
"action": "0x0512ad96fzc01900d3ecf0987m81c7bc1fd2daf455ebb49kjce5b410c7dc6f05",
"tokenReceiver": "0x167d93786ghbf00d19b7d58065a5a59276e55ca1e621e47330f2b64d9fcb6a38"
},
```

Save and close the file.

3. Generate a key for order result encryption using the [`workflows generate-key`](/cli/commands/workflows/generate-key) command. Open `config.json` again and set the generated key to `workflow.resultEncryption.key`. Save and close the file.
</TabItem>
</Tabs>

### Set up Storj access (optional)

If you already [set up Storj access](/cli/#set-up-storj-access-optional) for your regular SPCTL, you may reuse the same credentials for your provider's SPCTL.

If you skip this step, Super Protocol will automatically provide you with 20 GB of storage.

## Support

If you have any issues or questions, contact Super Protocol on [Discord](https://discord.gg/superprotocol) or via the [contact form](https://superprotocol.zendesk.com/hc/en-us/requests/new).
2 changes: 1 addition & 1 deletion docs/cli/Guides/quick-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: "quick-guide"
title: "Quick Deployment Guide"
slug: "/guides/quick-guide"
sidebar_position: 1
sidebar_position: 2
---

This quick guide provides instructions on deploying a <a id="solution"><span className="dashed-underline">solution</span></a> and <a id="data"><span className="dashed-underline">data</span></a> on Super Protocol. Its purpose is to introduce you to the logic and sequence of the CLI commands.
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/commands/offers/add-slot.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 9

Adds a <a id="slot"><span className="dashed-underline">slot</span></a> to an <a id="offer"><span className="dashed-underline">offer</span></a>.

**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers).
**Important:** This command requires SPCTL with a [provider configuration file](/cli/guides/provider-tools#providers-spctl).

## Syntax

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/commands/offers/delete-slot.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 11

Deletes a <a id="slot"><span className="dashed-underline">slot</span></a> in an <a id="offer"><span className="dashed-underline">offer</span></a>.

**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers).
**Important:** This command requires SPCTL with a [provider configuration file](/cli/guides/provider-tools#providers-spctl).

Use the [`offers get`](/cli/commands/offers/get) command to get the IDs of all slots in an offer. Use the [`offers get-slot`](/cli/commands/offers/get-slot) command to get additional information on a slot.

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/commands/offers/disable.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 6

Disables an existing enabled <a id="offer"><span className="dashed-underline">offer</span></a>.

**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers).
**Important:** This command requires SPCTL with a [provider configuration file](/cli/guides/provider-tools#providers-spctl).

## Syntax

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/commands/offers/enable.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 7

Enables an existing disabled <a id="offer"><span className="dashed-underline">offer</span></a>.

**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers).
**Important:** This command requires SPCTL with a [provider configuration file](/cli/guides/provider-tools#providers-spctl).

## Syntax

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/commands/offers/update-slot.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 10

Updates a <a id="slot"><span className="dashed-underline">slot</span></a> in an <a id="offer"><span className="dashed-underline">offer</span></a>.

**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers).
**Important:** This command requires SPCTL with a [provider configuration file](/cli/guides/provider-tools#providers-spctl).

Use the [`offers get`](/cli/commands/offers/get) command to get the IDs of all slots in an offer. Use the [`offers get-slot`](/cli/commands/offers/get-slot) command to get additional information on a slot.

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/commands/offers/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 5

Updates information about an <a id="offer"><span className="dashed-underline">offer</span></a>.

**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers).
**Important:** This command requires SPCTL with a [provider configuration file](/cli/guides/provider-tools#providers-spctl).

## Syntax

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/commands/providers/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 3

Updates information about a provider.

**Important:** This command requires SPCTL with a [provider configuration file](/cli/#for-providers).
**Important:** This command requires SPCTL with a [provider configuration file](/cli/guides/provider-tools#providers-spctl).

## Syntax

Expand Down
6 changes: 5 additions & 1 deletion docs/cli/commands/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ So, the final format of this option should be one of the following:
- `--solution <OFFER>,<SLOT>`. For example, `--solution 26,25`.
- `--solution <PATH>`. For example, `--solution ./solution.resource.json`.

Read the descriptions of arguments and options and refer to the examples for more information. If you have any issues or questions, contact Super Protocol on [Discord](https://discord.gg/superprotocol) or via the [contact form](https://superprotocol.zendesk.com/hc/en-us/requests/new).
Read the descriptions of arguments and options and refer to the examples for more information. If you have any issues or questions, contact Super Protocol on [Discord](https://discord.gg/superprotocol) or via the [contact form](https://superprotocol.zendesk.com/hc/en-us/requests/new).

## Support

If you have any issues or questions, contact Super Protocol on [Discord](https://discord.gg/superprotocol) or via the [contact form](https://superprotocol.zendesk.com/hc/en-us/requests/new).
Loading
Loading