apache / incubator-teaclave

Apache Teaclave (incubating) is an open source universal secure computing platform, making computation on privacy-sensitive data safe and simple.
https://teaclave.apache.org
Apache License 2.0
757 stars 159 forks source link

My builtin-functions cannot be invoked by the Python/Rust client SDK #724

Closed yujingyue9166 closed 8 months ago

yujingyue9166 commented 9 months ago

I tried to add a "builtin-hello-world" function (with the same functionality as the echo example) by following the official documentation at https://teaclave.apache.org/docs/builtin-functions/.

After building with make teaclave_unit_tests and running tests with make run-unit-tests, everything seemed to work normally.

However, when I try to invoke this function using either the Python or Rust client SDKs, I get an error saying the function cannot be found.

I would like to understand:

  1. Where can I verify that my builtin-function is correctly registered by the executor?
  2. What might be going wrong that is preventing client SDKs from locating and invoking the function?

Any pointers on where to check or how to further troubleshoot this issue would be greatly appreciated! Please let me know if any other details would be helpful in diagnosing the problem.

Thank you for your time and assistance!

henrysun007 commented 8 months ago

It might be helpful if we could see your modification.

yujingyue9166 commented 8 months ago

Thank you for replying. These are the main changes I made: image image image

And this is the debug output of running make teaclave_unit_tests, make run-examples :

image

It seems like I am missing some steps after registering the new function.

Could you please advise if any operations needed after function registration and before client invocation? Or help me check if I missed anything in my implementation and debugging steps?

yujingyue9166 commented 8 months ago

I have found the cause of the problem. I forgot to update the cargo.toml file for the executor.