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
288 changes: 144 additions & 144 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,147 +1,147 @@
{
"authorizedDecrypters": [],
"authorizedDecryptersList": [],
"allowedValidators": [],
"allowedValidatorsList": [],
"authorizedPublishers": [],
"authorizedPublishersList": [],
"keys": {},
"hasIndexer": true,
"hasHttp": true,
"hasP2P": true,
"p2pConfig": {
"bootstrapTimeout": 20000,
"bootstrapTagName": "bootstrap",
"bootstrapTagValue": 50,
"bootstrapTTL": 0,
"enableIPV4": true,
"enableIPV6": true,
"ipV4BindAddress": "0.0.0.0",
"ipV4BindTcpPort": 9000,
"ipV4BindWsPort": 9001,
"ipV6BindAddress": "::",
"ipV6BindTcpPort": 9002,
"ipV6BindWsPort": 9003,
"announceAddresses": [],
"pubsubPeerDiscoveryInterval": 10000,
"dhtMaxInboundStreams": 500,
"dhtMaxOutboundStreams": 500,
"dhtFilter": null,
"mDNSInterval": 20000,
"connectionsMaxParallelDials": 15,
"connectionsDialTimeout": 30000,
"upnp": true,
"autoNat": true,
"enableCircuitRelayServer": false,
"enableCircuitRelayClient": false,
"circuitRelays": 0,
"announcePrivateIp": false,
"filterAnnouncedAddresses": [
"127.0.0.0/8",
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
"100.64.0.0/10",
"169.254.0.0/16",
"192.0.0.0/24",
"192.0.2.0/24",
"198.51.100.0/24",
"203.0.113.0/24",
"224.0.0.0/4",
"240.0.0.0/4"
],
"minConnections": 1,
"maxConnections": 300,
"autoDialPeerRetryThreshold": 7200000,
"autoDialConcurrency": 5,
"maxPeerAddrsToDial": 5,
"autoDialInterval": 5000,
"enableNetworkStats": false
},
"hasControlPanel": true,
"httpPort": 8001,
"dbConfig": {
"url": "http://localhost:8108/?apiKey=xyz",
"username": "",
"password": "",
"dbType": "typesense"
},
"supportedNetworks": {
"8996": {
"rpc": "http://127.0.0.1:8545",
"chainId": 8996,
"network": "development",
"chunkSize": 100
}
},
"feeStrategy": {},
"c2dClusters": [],
"ipfsGateway": "https://ipfs.io/",
"arweaveGateway": "https://arweave.net/",
"accountPurgatoryUrl": null,
"assetPurgatoryUrl": null,
"allowedAdmins": [],
"allowedAdminsList": [],
"rateLimit": 30,
"maxConnections": 30,
"denyList": {
"peers": [],
"ips": []
},
"unsafeURLs": [],
"isBootstrap": false,
"claimDurationTimeout": 600,
"validateUnsignedDDO": true,
"jwtSecret": "ocean-node-secret",
"dockerComputeEnvironments": [
"authorizedDecrypters": [],
"authorizedDecryptersList": [],
"allowedValidators": [],
"allowedValidatorsList": [],
"authorizedPublishers": [],
"authorizedPublishersList": [],
"keys": {},
"hasIndexer": true,
"hasHttp": true,
"hasP2P": true,
"p2pConfig": {
"bootstrapTimeout": 20000,
"bootstrapTagName": "bootstrap",
"bootstrapTagValue": 50,
"bootstrapTTL": 0,
"enableIPV4": true,
"enableIPV6": true,
"ipV4BindAddress": "0.0.0.0",
"ipV4BindTcpPort": 9000,
"ipV4BindWsPort": 9001,
"ipV6BindAddress": "::",
"ipV6BindTcpPort": 9002,
"ipV6BindWsPort": 9003,
"announceAddresses": [],
"pubsubPeerDiscoveryInterval": 10000,
"dhtMaxInboundStreams": 500,
"dhtMaxOutboundStreams": 500,
"dhtFilter": null,
"mDNSInterval": 20000,
"connectionsMaxParallelDials": 15,
"connectionsDialTimeout": 30000,
"upnp": true,
"autoNat": true,
"enableCircuitRelayServer": false,
"enableCircuitRelayClient": false,
"circuitRelays": 0,
"announcePrivateIp": false,
"filterAnnouncedAddresses": [
"127.0.0.0/8",
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
"100.64.0.0/10",
"169.254.0.0/16",
"192.0.0.0/24",
"192.0.2.0/24",
"198.51.100.0/24",
"203.0.113.0/24",
"224.0.0.0/4",
"240.0.0.0/4"
],
"minConnections": 1,
"maxConnections": 300,
"autoDialPeerRetryThreshold": 7200000,
"autoDialConcurrency": 5,
"maxPeerAddrsToDial": 5,
"autoDialInterval": 5000,
"enableNetworkStats": false
},
"hasControlPanel": true,
"httpPort": 8001,
"dbConfig": {
"url": "http://localhost:8108/?apiKey=xyz",
"username": "",
"password": "",
"dbType": "typesense"
},
"supportedNetworks": {
"8996": {
"rpc": "http://127.0.0.1:8545",
"chainId": 8996,
"network": "development",
"chunkSize": 100
}
},
"feeStrategy": {},
"c2dClusters": [],
"ipfsGateway": "https://ipfs.io/",
"arweaveGateway": "https://arweave.net/",
"accountPurgatoryUrl": null,
"assetPurgatoryUrl": null,
"allowedAdmins": [],
"allowedAdminsList": [],
"rateLimit": 30,
"maxConnections": 30,
"denyList": {
"peers": [],
"ips": []
},
"unsafeURLs": [],
"isBootstrap": false,
"claimDurationTimeout": 3600,
"validateUnsignedDDO": true,
"jwtSecret": "ocean-node-secret",
"dockerComputeEnvironments": [
{
"socketPath": "/var/run/docker.sock",
"resources": [
{
"socketPath": "/var/run/docker.sock",
"resources": [
{
"id": "disk",
"total": 1
}
],
"storageExpiry": 604800,
"maxJobDuration": 3600,
"access": {
"addresses": [],
"accessLists": []
},
"fees": {
"8996": [
{
"prices": [
{
"id": "cpu",
"price": 1
}
]
}
]
},
"free": {
"maxJobDuration": 3600,
"maxJobs": 3,
"access": {
"addresses": [],
"accessLists": []
},
"resources": [
{
"id": "cpu",
"max": 1
},
{
"id": "ram",
"max": 1
},
{
"id": "disk",
"max": 1
}
]
}
"id": "disk",
"total": 1
}
]
}
],
"storageExpiry": 604800,
"maxJobDuration": 3600,
"access": {
"addresses": [],
"accessLists": []
},
"fees": {
"8996": [
{
"prices": [
{
"id": "cpu",
"price": 1
}
]
}
]
},
"free": {
"maxJobDuration": 3600,
"maxJobs": 3,
"access": {
"addresses": [],
"accessLists": []
},
"resources": [
{
"id": "cpu",
"max": 1
},
{
"id": "ram",
"max": 1
},
{
"id": "disk",
"max": 1
}
]
}
}
]
}
27 changes: 14 additions & 13 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1400,19 +1400,20 @@ starts a free compute job and returns jobId if succesfull

#### Parameters

| name | type | required | description |
| ----------------- | ------ | -------- | ---------------------------------------------------------------- |
| command | string | v | command name |
| node | string | | if not present it means current node |
| consumerAddress | string | v | consumer address |
| signature | string | v | signature (msg=String(nonce) ) |
| nonce | string | v | nonce for the request |
| datasets | object | | list of ComputeAsset to be used as inputs |
| algorithm | object | | ComputeAlgorithm definition |
| environment | string | v | compute environment to use |
| resources | object | | optional list of required resources |
| metadata | object | | optional metadata for the job, data provided by the user |
| additionalViewers | object | | optional array of addresses that are allowed to fetch the result |
| name | type | required | description |
| ----------------- | ------ | -------- | ----------------------------------------------------------------------------- |
| command | string | v | command name |
| node | string | | if not present it means current node |
| consumerAddress | string | v | consumer address |
| signature | string | v | signature (msg=String(nonce) ) |
| nonce | string | v | nonce for the request |
| datasets | object | | list of ComputeAsset to be used as inputs |
| algorithm | object | | ComputeAlgorithm definition |
| environment | string | v | compute environment to use |
| resources | object | | optional list of required resources |
| metadata | object | | optional metadata for the job, data provided by the user |
| additionalViewers | object | | optional array of addresses that are allowed to fetch the result |
| queueMaxWaitTime | number | | optional max time in seconds a job can wait in the queue before being started |

#### Request

Expand Down
2 changes: 1 addition & 1 deletion docs/env.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Environmental variables are also tracked in `ENVIRONMENT_VARIABLES` within `src/

## Payments

- `ESCROW_CLAIM_TIMEOUT`: Amount of time reserved to claim a escrow payment, in seconds. Defaults to `600`. Example: `600`
- `ESCROW_CLAIM_TIMEOUT`: Amount of time reserved to claim a escrow payment, in seconds. Defaults to `3600`. Example: `3600`

## Logs

Expand Down
13 changes: 13 additions & 0 deletions src/@types/C2D/C2D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ export interface ComputeEnvironment extends ComputeEnvironmentBaseConfig {
runningJobs: number
runningfreeJobs?: number
consumerAddress: string // v1
queuedJobs: number
queuedFreeJobs: number
queMaxWaitTime: number
queMaxWaitTimeFree: number
}

export interface C2DDockerConfig {
Expand Down Expand Up @@ -174,6 +178,7 @@ export interface ComputeJob {
environment?: string
metadata?: DBComputeJobMetadata
terminationDetails?: ComputeJobTerminationDetails
queueMaxWaitTime: number // max time in seconds a job can wait in the queue before being started
}

export interface ComputeOutput {
Expand Down Expand Up @@ -260,6 +265,10 @@ export enum C2DStatusNumber {
// eslint-disable-next-line no-unused-vars
JobStarted = 0,
// eslint-disable-next-line no-unused-vars
JobQueued = 1,
// eslint-disable-next-line no-unused-vars
JobQueuedExpired = 2,
// eslint-disable-next-line no-unused-vars
PullImage = 10,
// eslint-disable-next-line no-unused-vars
PullImageFailed = 11,
Expand Down Expand Up @@ -302,6 +311,10 @@ export enum C2DStatusText {
// eslint-disable-next-line no-unused-vars
JobStarted = 'Job started',
// eslint-disable-next-line no-unused-vars
JobQueued = 'Job queued',
// eslint-disable-next-line no-unused-vars
JobQueuedExpired = 'Job expired in queue',
// eslint-disable-next-line no-unused-vars
PullImage = 'Pulling algorithm image',
// eslint-disable-next-line no-unused-vars
PullImageFailed = 'Pulling algorithm image failed',
Expand Down
Loading
Loading