Open alexcos20 opened 4 years ago
so if I get this right this would mean that ocean.compute.start()
should optionally accept an output
object and passes that through to Brizo.
Fine for advanced users since there is room for a lot of confusion with all those values. So there always should be a default which ideally does not have to be set in squid-js. The output object should then be standardized somewhere, in OEP-12 or Squid API I guess.
Maybe should be like this:
"output": {
"brizoAddress": "0x4aaab179035dc57b35e2ce066919048686f82972",
"brizoUri": "https://brizo.marketplace.dev-ocean.com",
"metadata": {
"main": {
"name": "Job output"
},
"additionalInformation": {
"description": "Job output from my algorithm."
}
},
"aquariusUri": "https://aquarius.marketplace.dev-ocean.com",
"nodeUri": "https://nile.dev-ocean.com",
"owner": "0xC41808BBef371AD5CFc76466dDF9dEe228d2BdAA",
"publishAlgorithmLog": true,
"publishOutput": true,
"secretStoreUri": "https://secret-store.nile.dev-ocean.com",
"whitelist": [
"0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"0xACBd138aBD70e2F00903268F3Db08f2D25677C9e"
]
}
and we need to define what's required and when stuff gets autofilled. E.g. for not publishing a result I would expect I have to do:
const output = {
"publishOutput": false
}
const status = ocean.compute.start(account, agreementId, algoDid, undefined, output)
And then we probably don't want to autofill anything else?
I agree with:
"metadata": {
"main": {
"name": "Job output"
},
"additionalInformation": {
"description": "Job output from my algorithm."
}
},
this will give us more slack in setting the metadata of the result
We can have it like this:
brizoAddress
brizoUrl,
metadataUrl
nodeUri
secretstoreUrl
(which can be filled from the ocean.this.config from the ocean object that calls compute.start)
The rest are optional:
metadata
owner
whitelist
Let's standardize the output object in Squid API , section compute.start.
what shoud be the default values for publishAlgorithmLog and publishOutput? It makes sense to have them both true and fill up the required URL with current this.config. states ?
In the workflow schema that it's passed to the compute service is one section called output.
"output": { "brizoAddress": "0x4aaab179035dc57b35e2ce066919048686f82972", "brizoUrl": "https://brizo.marketplace.dev-ocean.com", "metadata": { "name": "Workflow output" }, "metadataUrl": "https://aquarius.marketplace.dev-ocean.com", "nodeUri": "https://nile.dev-ocean.com", "owner": "0xC41808BBef371AD5CFc76466dDF9dEe228d2BdAA", "publishAlgorithmLog": true, "publishOutput": true, "secretStoreUrl": "https://secret-store.nile.dev-ocean.com", "whitelist": [ "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e", "0xACBd138aBD70e2F00903268F3Db08f2D25677C9e" ] }
Here is the definition of the fields, as intended:
Squid should get that object from the user and autocomplete with current settings if any required value is missing (Ocean object has all the URI already, so they can be filled)
Pro:
Thoughts ?