-
Notifications
You must be signed in to change notification settings - Fork 14
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
Remove chain id from get compute envs task. #460
Conversation
Response from ocean-node: {
component: 'CORE',
moduleName: 'CORE',
level: 'debug',
message: '[CORE] => [CORE] => ComputeGetEnvironmentsCommand Response: [\n' +
' {\n' +
' "id": "0x2580a2f80b1cbb31dc9dd4b72923f267432b47f3165cc37893f3479e14a581e4-ocean-compute",\n' +
' "cpuNumber": 1,\n' +
' "cpuType": "",\n' +
' "gpuNumber": 0,\n' +
' "gpuType": "",\n' +
' "ramGB": 1,\n' +
' "diskGB": 1,\n' +
' "priceMin": 0,\n' +
' "desc": "",\n' +
' "currentJobs": 0,\n' +
' "maxJobs": 10,\n' +
' "consumerAddress": "0x03b9d6Ba248fe931e338840223985CcC43E05894",\n' +
' "storageExpiry": 0,\n' +
' "maxJobDuration": 60,\n' +
' "lastSeen": "1716294576.33361",\n' +
' "feeToken": "0xf26c6C93f9f1d725e149d95f8E7B2334a406aD10"\n' +
' },\n' +
' {\n' +
' "id": "0x2580a2f80b1cbb31dc9dd4b72923f267432b47f3165cc37893f3479e14a581e4-ocean-compute-env2",\n' +
' "cpuNumber": 1,\n' +
' "cpuType": "",\n' +
' "gpuNumber": 0,\n' +
' "gpuType": "",\n' +
' "ramGB": 1,\n' +
' "diskGB": 1,\n' +
' "priceMin": "1.2",\n' +
' "desc": "",\n' +
' "currentJobs": 0,\n' +
' "maxJobs": 10,\n' +
' "consumerAddress": "0x1E40c0231516C61D2C8F3794626B37c3eBdc7c8F",\n' +
' "storageExpiry": 0,\n' +
' "maxJobDuration": 60,\n' +
' "lastSeen": "1716294576.9219",\n' +
' "feeToken": "0xf26c6C93f9f1d725e149d95f8E7B2334a406aD10"\n' +
' }\n' +
']',
timestamp: '2024-05-21 12:29:38'
} and in ocean-cli: /home/ubuntu/ocean-cli/src/commands.ts:259
const computeEnv = computeEnvs[dataDdo.chainId][0];
^
TypeError: Cannot read properties of undefined (reading '0')
at Commands.<anonymous> (/home/ubuntu/ocean-cli/src/commands.ts:259:50)
at Generator.next (<anonymous>)
at fulfilled (/home/ubuntu/ocean-cli/src/commands.ts:5:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5) ocean-cli needs some checks for computeEnvs if we are going to proceed with this solution to list all the compute envs for all networks |
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.
lgtm
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.
Looks good to me
Solved the issue with getComputeEnvironments, now there is an issue when initializeCompute command occurs: {
component: 'CORE',
moduleName: 'CORE',
level: 'info',
message: '[CORE] => Checking received command data for Command "initializeCompute": {\n' +
' "datasets": [\n' +
' {\n' +
' "documentId": "did:op:3d13a841219361d53899283283ea1a85c775a820384f171d5bcc427c3976196d",\n' +
' "serviceId": "ccb398c50d6abd5b456e8d7242bd856a1767a890b537c2f8c10ba8b8a10e6025"\n' +
' }\n' +
' ],\n' +
' "algorithm": {\n' +
' "documentId": "did:op:e1054465693b020a73258bdc782d70e757dd7be3a5aa30ea45ff8bcab8520e85",\n' +
' "serviceId": "db164c1b981e4d2974e90e61bda121512e6909c1035c908d68933ae4cfaba6b0"\n' +
' },\n' +
' "compute": {\n' +
' "env": "0x2580a2f80b1cbb31dc9dd4b72923f267432b47f3165cc37893f3479e14a581e4-ocean-compute",\n' +
' "validUntil": 1716457766\n' +
' },\n' +
' "consumerAddress": "0xe2DD09d719Da89e5a3D0F2549c7E24566e947260",\n' +
' "command": "initializeCompute"\n' +
'}',
timestamp: '2024-05-23 09:44:26'
}
{
component: 'DATABASE',
moduleName: 'DATABASE',
level: 'debug',
message: '[DATABASE] => Request /collections/op_ddo_short/documents/did:op:e1054465693b020a73258bdc782d70e757dd7be3a5aa30ea45ff8bcab8520e85',
timestamp: '2024-05-23 09:44:26'
}
{
component: 'DATABASE',
moduleName: 'DATABASE',
level: 'debug',
message: '[DATABASE] => Request /collections/op_ddo_short/documents/did:op:e1054465693b020a73258bdc782d70e757dd7be3a5aa30ea45ff8bcab8520e85: Attempting GET request Try #1 to Node localhost',
timestamp: '2024-05-23 09:44:26'
}
{
component: 'DATABASE',
moduleName: 'DATABASE',
level: 'debug',
message: '[DATABASE] => Request /collections/op_ddo_short/documents/did:op:e1054465693b020a73258bdc782d70e757dd7be3a5aa30ea45ff8bcab8520e85: Request to Node localhost was made. Response Code was 404.',
timestamp: '2024-05-23 09:44:27'
}
{
component: 'DATABASE',
moduleName: 'DATABASE',
level: 'debug',
message: '[DATABASE] => Request /collections/op_ddo_v4.1.0/documents/did:op:e1054465693b020a73258bdc782d70e757dd7be3a5aa30ea45ff8bcab8520e85',
timestamp: '2024-05-23 09:44:27'
}
{
component: 'DATABASE',
moduleName: 'DATABASE',
level: 'debug',
message: '[DATABASE] => Request /collections/op_ddo_v4.1.0/documents/did:op:e1054465693b020a73258bdc782d70e757dd7be3a5aa30ea45ff8bcab8520e85: Attempting GET request Try #1 to Node localhost',
timestamp: '2024-05-23 09:44:27'
}
{
component: 'DATABASE',
moduleName: 'DATABASE',
level: 'debug',
message: '[DATABASE] => Request /collections/op_ddo_v4.1.0/documents/did:op:e1054465693b020a73258bdc782d70e757dd7be3a5aa30ea45ff8bcab8520e85: Request to Node localhost was made. Response Code was 200.',
timestamp: '2024-05-23 09:44:27'
}
{
component: 'HTTP',
moduleName: 'HTTP',
level: 'error',
message: 'Stream not found: Service db164c1b981e4d2974e90e61bda121512e6909c1035c908d68933ae4cfaba6b0 from DDO did:op:e1054465693b020a73258bdc782d70e757dd7be3a5aa30ea45ff8bcab8520e85 cannot be used in compute on this provider',
timestamp: '2024-05-23 09:44:27'
} It occurs here https://github.com/oceanprotocol/ocean-node/blob/develop/src/components/core/compute/initialize.ts#L104. My testing assets were published WITH encryption using ocean-cli. |
Fixes # .
Changes proposed in this PR: