mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Merge branch 'feature/ddo_v4' of http://github.com/oceanprotocol/docs into feature/ddo_v4
This commit is contained in:
commit
6a7c73aa07
@ -49,9 +49,8 @@ Provider -> Provider: depending on metadataState (expired,retired) and aquarius
|
|||||||
Provider -> Aquarius: DDO
|
Provider -> Aquarius: DDO
|
||||||
Aquarius -> Aquarius : validate DDO
|
Aquarius -> Aquarius : validate DDO
|
||||||
Aquarius -> Aquarius : cache DDO
|
Aquarius -> Aquarius : cache DDO
|
||||||
Aquarius -> Aquarius : enhance cached DDO in response with additional infos like `events` & `stats`
|
Aquarius -> Aquarius : enhance cached DDO in response with additional infos like events & stats
|
||||||
|
```
|
||||||
````
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@ -61,7 +60,7 @@ In Ocean, a DID is a string that looks like this:
|
|||||||
|
|
||||||
```text
|
```text
|
||||||
did:op:0ebed8226ada17fde24b6bf2b95d27f8f05fcce09139ff5cec31f6d81a7cd2ea
|
did:op:0ebed8226ada17fde24b6bf2b95d27f8f05fcce09139ff5cec31f6d81a7cd2ea
|
||||||
````
|
```
|
||||||
|
|
||||||
The part after `did:op:` is the checksum of the ERC721 contract address and the chain the asset has been published to:
|
The part after `did:op:` is the checksum of the ERC721 contract address and the chain the asset has been published to:
|
||||||
|
|
||||||
@ -93,8 +92,8 @@ This object holds information describing the actual asset.
|
|||||||
|
|
||||||
| Attribute | Type | Required | Description |
|
| Attribute | Type | Required | Description |
|
||||||
| --------------------------- | ----------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------- | ----------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| **`created`** | `ISO Date Time string` | | Contains the date of the creation of the dataset content in ISO Date Time Format, e.g. `2000-10-31T01:30:00`.|
|
| **`created`** | `ISO Date Time string` | | Contains the date of the creation of the dataset content in ISO Date Time Format, e.g. `2000-10-31T01:30:00`. |
|
||||||
| **`updated`** | `ISO Date Time string` | | Contains the date of last update of the dataset content in ISO Date Time Format, e.g. `2000-10-31T01:30:00`.|
|
| **`updated`** | `ISO Date Time string` | | Contains the date of last update of the dataset content in ISO Date Time Format, e.g. `2000-10-31T01:30:00`. |
|
||||||
| **`description`** | `string` | **✓** | Details of what the resource is. For a dataset, this attribute explains what the data represents and what it can be used for. |
|
| **`description`** | `string` | **✓** | Details of what the resource is. For a dataset, this attribute explains what the data represents and what it can be used for. |
|
||||||
| **`copyrightHolder`** | `string` | | The party holding the legal copyright. Empty by default. |
|
| **`copyrightHolder`** | `string` | | The party holding the legal copyright. Empty by default. |
|
||||||
| **`name`** | `string` | **✓** | Descriptive name or title of the asset. |
|
| **`name`** | `string` | **✓** | Descriptive name or title of the asset. |
|
||||||
@ -181,7 +180,7 @@ An asset should have at least one service to be actually accessible, and can hav
|
|||||||
| **`serviceEndpoint`** | `string` | **✓** | Provider URL (schema + host) |
|
| **`serviceEndpoint`** | `string` | **✓** | Provider URL (schema + host) |
|
||||||
| **`files`** | [string](#files) | **✓** | Encrypted file URLs. |
|
| **`files`** | [string](#files) | **✓** | Encrypted file URLs. |
|
||||||
| **`timeout`** | `number` | **✓** | Describing how long the service can be used after consumption is initiated. A timeout of `0` represents no time limit. Expressed in seconds. |
|
| **`timeout`** | `number` | **✓** | Describing how long the service can be used after consumption is initiated. A timeout of `0` represents no time limit. Expressed in seconds. |
|
||||||
| **`compute`** | [Compute](#compute-options) | **✓** (for compute assets only) | If service is of `type` `compute`, holds information about the compute-related privacy settings & resources. |
|
| **`compute`** | [Compute](#compute-options) | **✓** (for compute assets only) | If service is of `type` `compute`, holds information about the compute-related privacy settings & resources. |
|
||||||
|
|
||||||
#### Files
|
#### Files
|
||||||
|
|
||||||
@ -222,19 +221,18 @@ This only concerns metadata about a file, but never the file URLs. The only way
|
|||||||
|
|
||||||
An asset with a service of `type` `compute` has the following additional attributes under the `compute` object. This object is required if the asset is of `type` `compute`, but can be omitted for `type` of `access`.
|
An asset with a service of `type` `compute` has the following additional attributes under the `compute` object. This object is required if the asset is of `type` `compute`, but can be omitted for `type` of `access`.
|
||||||
|
|
||||||
| Attribute | Type | Required | Description |
|
| Attribute | Type | Required | Description |
|
||||||
| ------------------------------------------ | ------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------ | ------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| **`namespace`** | `string` | **✓** | Namespaced used for the compute job. Defaults to 'ocean-compute'. |
|
| **`namespace`** | `string` | **✓** | Namespaced used for the compute job. Defaults to 'ocean-compute'. |
|
||||||
| **`cpus`** | `number` | | Maximum number of CPUs allocated for a job|
|
| **`cpus`** | `number` | | Maximum number of CPUs allocated for a job |
|
||||||
| **`gpus`** | `number` | | Maximum number of GPUs allocated for a job|
|
| **`gpus`** | `number` | | Maximum number of GPUs allocated for a job |
|
||||||
| **`gpuType`** | `string` | | Type of GPU (if any)
|
| **`gpuType`** | `string` | | Type of GPU (if any) |
|
||||||
| **`memory`** | `string` | | Maximum amount of memory allocated for a job. You can express memory as a plain integer or as a fixed-point number using one of these suffixes: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. For example, the following represent roughly the same value: 128974848, 129e6, 129M, 123Mi|
|
| **`memory`** | `string` | | Maximum amount of memory allocated for a job. You can express memory as a plain integer or as a fixed-point number using one of these suffixes: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. For example, the following represent roughly the same value: 128974848, 129e6, 129M, 123Mi |
|
||||||
| **`volumeSize`** | `string` | | Amount of disk space allocated. You can express it as a plain integer or as a fixed-point number using one of these suffixes: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. |
|
| **`volumeSize`** | `string` | | Amount of disk space allocated. You can express it as a plain integer or as a fixed-point number using one of these suffixes: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. |
|
||||||
| **`allowRawAlgorithm`** | `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. |
|
| **`allowRawAlgorithm`** | `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. |
|
||||||
| **`allowNetworkAccess`** | `boolean` | **✓** | If `true`, the algorithm job will have network access. |
|
| **`allowNetworkAccess`** | `boolean` | **✓** | If `true`, the algorithm job will have network access. |
|
||||||
| **`publisherTrustedAlgorithmPublishers `** | Array of `string` | **✓** | If empty, then any published algorithm is allowed. Otherwise, only published algorithms by some publishers are allowed |
|
| **`publisherTrustedAlgorithmPublishers `** | Array of `string` | **✓** | If empty, then any published algorithm is allowed. Otherwise, only published algorithms by some publishers are allowed |
|
||||||
| **`publisherTrustedAlgorithms `** | Array of `publisherTrustedAlgorithms` | **✓** | If empty, then any published algorithm is allowed. (see below) |
|
| **`publisherTrustedAlgorithms `** | Array of `publisherTrustedAlgorithms` | **✓** | If empty, then any published algorithm is allowed. (see below) |
|
||||||
|
|
||||||
|
|
||||||
The `publisherTrustedAlgorithms ` is an array of objects with the following structure:
|
The `publisherTrustedAlgorithms ` is an array of objects with the following structure:
|
||||||
|
|
||||||
@ -278,17 +276,17 @@ Example:
|
|||||||
"datatokenAddress": "0x124",
|
"datatokenAddress": "0x124",
|
||||||
"serviceEndpoint": "https://myprovider.com",
|
"serviceEndpoint": "https://myprovider.com",
|
||||||
"timeout": 0,
|
"timeout": 0,
|
||||||
"compute":{
|
"compute": {
|
||||||
"namespace": "ocean-compute",
|
"namespace": "ocean-compute",
|
||||||
"cpus": 2,
|
"cpus": 2,
|
||||||
"gpus": 4,
|
"gpus": 4,
|
||||||
"gpuType": "NVIDIA Tesla V100 GPU",
|
"gpuType": "NVIDIA Tesla V100 GPU",
|
||||||
"memory": "128M",
|
"memory": "128M",
|
||||||
"volumeSize": "2G",
|
"volumeSize": "2G",
|
||||||
"allowRawAlgorithm": false,
|
"allowRawAlgorithm": false,
|
||||||
"allowNetworkAccess": true,
|
"allowNetworkAccess": true,
|
||||||
"publisherTrustedAlgorithmPublishers": ["0x234", "0x235"],
|
"publisherTrustedAlgorithmPublishers": ["0x234", "0x235"],
|
||||||
"publisherTrustedAlgorithms": [
|
"publisherTrustedAlgorithms": [
|
||||||
{
|
{
|
||||||
"did": "did:op:123",
|
"did": "did:op:123",
|
||||||
"filesChecksum": "100",
|
"filesChecksum": "100",
|
||||||
@ -351,25 +349,25 @@ The checksum hash is used when publishing/updating metadata using the `setMetaDa
|
|||||||
|
|
||||||
```solidity
|
```solidity
|
||||||
event MetadataCreated(
|
event MetadataCreated(
|
||||||
address indexed createdBy,
|
address indexed createdBy,
|
||||||
uint8 state,
|
uint8 state,
|
||||||
string decryptorUrl,
|
string decryptorUrl,
|
||||||
bytes flags,
|
bytes flags,
|
||||||
bytes data,
|
bytes data,
|
||||||
bytes metaDataHash,
|
bytes metaDataHash,
|
||||||
uint256 timestamp,
|
uint256 timestamp,
|
||||||
uint256 blockNumber
|
uint256 blockNumber
|
||||||
);
|
);
|
||||||
|
|
||||||
event MetadataUpdated(
|
event MetadataUpdated(
|
||||||
address indexed updatedBy,
|
address indexed updatedBy,
|
||||||
uint8 state,
|
uint8 state,
|
||||||
string decryptorUrl,
|
string decryptorUrl,
|
||||||
bytes flags,
|
bytes flags,
|
||||||
bytes data,
|
bytes data,
|
||||||
bytes metaDataHash,
|
bytes metaDataHash,
|
||||||
uint256 timestamp,
|
uint256 timestamp,
|
||||||
uint256 blockNumber
|
uint256 blockNumber
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -397,14 +395,14 @@ These additional fields are never stored on-chain, and are never taken into cons
|
|||||||
|
|
||||||
The `nft` object contains information about the ERC721 NFT contract which represents the intellectual property of the publisher.
|
The `nft` object contains information about the ERC721 NFT contract which represents the intellectual property of the publisher.
|
||||||
|
|
||||||
| Attribute | Type | Description |
|
| Attribute | Type | Description |
|
||||||
| ------------- | -------- | ------------------------------------------------------------------------- |
|
| ------------- | ---------------------- | ------------------------------------------------------------------------- |
|
||||||
| **`address`** | `string` | Contract address of the deployed ERC721 NFT contract. |
|
| **`address`** | `string` | Contract address of the deployed ERC721 NFT contract. |
|
||||||
| **`name`** | `string` | Name of NFT set in contract. |
|
| **`name`** | `string` | Name of NFT set in contract. |
|
||||||
| **`symbol`** | `string` | Symbol of NFT set in contract. |
|
| **`symbol`** | `string` | Symbol of NFT set in contract. |
|
||||||
| **`owner`** | `string` | ETH account address of the NFT owner. |
|
| **`owner`** | `string` | ETH account address of the NFT owner. |
|
||||||
| **`state`** | `number` | State of the asset reflecting the NFT contract value. See [State](#state) |
|
| **`state`** | `number` | State of the asset reflecting the NFT contract value. See [State](#state) |
|
||||||
| **`created`** | `ISO Date Time string` | Contains the date of nft creation |
|
| **`created`** | `ISO Date Time string` | Contains the date of nft creation |
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -498,13 +496,13 @@ Example:
|
|||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"chainId": 1,
|
"chainId": 1,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"created": "2020-11-15T12:27:48Z",
|
"created": "2020-11-15T12:27:48Z",
|
||||||
"updated": "2021-05-17T21:58:02Z",
|
"updated": "2021-05-17T21:58:02Z",
|
||||||
"description": "Sample description",
|
"description": "Sample description",
|
||||||
"name": "Sample asset",
|
"name": "Sample asset",
|
||||||
"type": "dataset",
|
"type": "dataset",
|
||||||
"author": "OPF",
|
"author": "OPF",
|
||||||
"license": "https://market.oceanprotocol.com/terms"
|
"license": "https://market.oceanprotocol.com/terms"
|
||||||
},
|
},
|
||||||
"services": [
|
"services": [
|
||||||
{
|
{
|
||||||
@ -524,17 +522,17 @@ Example:
|
|||||||
"datatokenAddress": "0x124",
|
"datatokenAddress": "0x124",
|
||||||
"serviceEndpoint": "https://myprovider.com",
|
"serviceEndpoint": "https://myprovider.com",
|
||||||
"timeout": 3600,
|
"timeout": 3600,
|
||||||
"compute":{
|
"compute": {
|
||||||
"namespace": "ocean-compute",
|
"namespace": "ocean-compute",
|
||||||
"cpus": 2,
|
"cpus": 2,
|
||||||
"gpus": 4,
|
"gpus": 4,
|
||||||
"gpuType": "NVIDIA Tesla V100 GPU",
|
"gpuType": "NVIDIA Tesla V100 GPU",
|
||||||
"memory": "128M",
|
"memory": "128M",
|
||||||
"volumeSize": "2G",
|
"volumeSize": "2G",
|
||||||
"allowRawAlgorithm": false,
|
"allowRawAlgorithm": false,
|
||||||
"allowNetworkAccess": true,
|
"allowNetworkAccess": true,
|
||||||
"publisherTrustedAlgorithmPublishers": ["0x234", "0x235"],
|
"publisherTrustedAlgorithmPublishers": ["0x234", "0x235"],
|
||||||
"publisherTrustedAlgorithms": [
|
"publisherTrustedAlgorithms": [
|
||||||
{
|
{
|
||||||
"did": "did:op:123",
|
"did": "did:op:123",
|
||||||
"filesChecksum": "100",
|
"filesChecksum": "100",
|
||||||
|
Loading…
Reference in New Issue
Block a user