Skip to content
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

In buyQuery: createRequestOrder does not expect a callback parameter #5

Open
iosonopersia opened this issue Aug 17, 2022 · 5 comments
Assignees

Comments

@iosonopersia
Copy link
Contributor

See documentation of iExec SDK: IExecOrderModule:createRequestOrder.

The createRequestOrder function does not expect to receive a callback parameter, so we need to check again the code of buyQuery in the Desmo module. We may simply need to remove this line.

@iosonopersia
Copy link
Contributor Author

Update: removing the callback parameter causes the following error when calling buyQuery:

Error: Requester storage token is not set for selected provider "ipfs". Result archive upload will fail.
at checkRequestRequirements (C:\Users\Simone\Documents\Github\desmo-sdk\node_modules\iexec\dist\common\execution\request-helper.js:103:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at IExecOrderModule.signRequestorder (C:\Users\Simone\Documents\Github\desmo-sdk\node_modules\iexec\dist\lib\IExecOrderModule.js:88:100)
at Desmo.buyQuery (C:\Users\Simone\Documents\Github\desmo-sdk\src\lib\desmo-module.ts:162:28)
at Context. (C:\Users\Simone\Documents\Github\desmo-sdk\src\test\desmo-test.ts:45:7)

@relu91
Copy link
Member

relu91 commented Aug 23, 2022

The doc is probably outdated... check the internal docs: https://github.com/iExecBlockchainComputing/iexec-sdk/blob/e41d2c282d10d3cbd19a4d8f47dd8e4639891aca/docs/interfaces/internal_.RequestorderTemplate.md. However, I still have to figure out why the callback is needed... since we must retrieve the task result manually... We have to investigate more.

@iosonopersia
Copy link
Contributor Author

iosonopersia commented Aug 23, 2022

I kept the callback parameter in PR #1 but this means I had to use a @ts-ignore comment. Let's keep this issue open until we fully understand how this function works.

@iosonopersia
Copy link
Contributor Author

iosonopersia commented Sep 2, 2022

We are using v7.2.1 of iExec SDK. Here's the line at which the callback parameter gets used: see here. It gets validated to be sure it's a proper hex address and then it's put in the returned data structure.

@relu91
Copy link
Member

relu91 commented Sep 6, 2022

We are using v7.2.1 of iExec SDK. Here's the line at which the callback parameter gets used: see here. It gets validated to be sure it's a proper hex address and then it's put in the returned data structure.

Related to this comment (?) In particular, I'm referring to why we need the verifyCallbackAddress method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants