Skip to content

Conversation

@kziemianek
Copy link
Contributor

resolves: P-177

  • Prints out generated VC.
  • perform_trusted_operation allows to specify the type of the TrustedOpResult::Ok variant, so no additional decoding is needed.
  • fixes aes_decrypt function - result of open_in_place should be returned as it doesn't containt the tag

@linear
Copy link

linear bot commented Nov 15, 2023

P-177 Print the result to stdout for `request-vc` CLI

A follow-up issue of P-166

Currently the CLI only returns the top status, see tee-worker/cli/src/trusted_operation.rs. As a result, you could only view the VC from the logs.

As we support synchronous DI response, it should be possible to print the result directly to stdout, either the generated VC, or any emitted error.

It's split into two issues (PRs) for better readability.

@kziemianek kziemianek requested a review from a team November 15, 2023 15:25
@wli-pro
Copy link
Contributor

wli-pro commented Nov 16, 2023

I wasn't sure now how did my test before (without this commit in this PR) even work: #2248 (see the cli test results in the PR...)

@wli-pro
Copy link
Contributor

wli-pro commented Nov 16, 2023

But this would be very helpful for testing, before this I used to need to get the VC from explorer

@kziemianek
Copy link
Contributor Author

I wasn't sure now how did my test before (without this commit in this PR) even work: #2248 (see the cli test results in the PR...)

You can find VC content in worker logs.
As a CLI user you probably won't have access to logs + production build doesn't log such information.

Copy link
Collaborator

@Kailai-Wang Kailai-Wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

Integirtee might be interested in perform_trusted_operation change too

Copy link
Collaborator

@BillyWooo BillyWooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

let json_value = RpcReturnValue {
do_watch: false,
value: response.encode(),
value: response,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kziemianek kziemianek merged commit 6f6bf9d into dev Nov 18, 2023
@kziemianek kziemianek deleted the p-177-print-the-result-to-stdout-for-request-vc-cli branch December 4, 2023 22:36
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

Successfully merging this pull request may close these issues.

5 participants