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

Add wait_on_channels_with_downgrade to SDK #1839

Merged
merged 3 commits into from
Feb 23, 2021

Conversation

ipetr0v
Copy link
Contributor

@ipetr0v ipetr0v commented Jan 13, 2021

This change adds:

  • wait_on_channels_with_downgrade to ABI, SDK andRuntime

Fixes #1736

@google-cla google-cla bot added the cla: yes label Jan 13, 2021
@ipetr0v
Copy link
Contributor Author

ipetr0v commented Jan 13, 2021

Currently is blocked by #1837 since it implements abitest signing.

@ipetr0v ipetr0v added the blocked This pull request is blocked by another pull request or issue label Jan 13, 2021
@ipetr0v ipetr0v removed the blocked This pull request is blocked by another pull request or issue label Feb 10, 2021
@ipetr0v ipetr0v force-pushed the wait_on_channels_with_downgrade branch from a25b32a to 5e3dcd2 Compare February 10, 2021 14:54
@tiziano88
Copy link
Collaborator

just checking: do we need this for anything in particular (and similarly for read_with_downgrade)?

@ipetr0v
Copy link
Contributor Author

ipetr0v commented Feb 10, 2021

Examples currently don't use these functions.
This is just remaining logic necessary for IFCv0.

@ipetr0v ipetr0v marked this pull request as ready for review February 10, 2021 18:21
@tiziano88
Copy link
Collaborator

Examples currently don't use these functions.
This is just remaining logic necessary for IFCv0.

I don't remember it being necessary for anything in particular, definitely not for IFCv0, in fact #1736 is added to IFCv1, but I am not even sure we should do it at all unless we have a use case for it, or do you have anything in mind?

@tiziano88
Copy link
Collaborator

(BTW similar argument for #1837)

@ipetr0v
Copy link
Contributor Author

ipetr0v commented Feb 11, 2021

This PR just completes the with_downgrade SDK that has already been started (write_with_downgrage, node_create_with_downgrade).
So that we have a full SDK

@ipetr0v
Copy link
Contributor Author

ipetr0v commented Feb 17, 2021

Also this PR adds wait_with_downgrade that should be used by Receiver::receive_with_downgrade instead of just wait:

fn receive_with_downgrade(&self) -> Result<T, OakError> {
self.wait()?;
self.try_receive_with_downgrade()
}

examples/abitest/module_0/rust/src/lib.rs Show resolved Hide resolved
sdk/rust/oak/src/lib.rs Show resolved Hide resolved
Add tests

Clean-up

Return tests

Fix logs

Add stubs
@ipetr0v ipetr0v force-pushed the wait_on_channels_with_downgrade branch from 26b6db3 to f15c8f9 Compare February 22, 2021 16:33
@ipetr0v ipetr0v merged commit 74c2f2a into project-oak:main Feb 23, 2021
@ipetr0v ipetr0v deleted the wait_on_channels_with_downgrade branch February 23, 2021 13:25
@github-actions
Copy link

Reproducibility Index:

faf7091d124a520c114b6523820f3b1f12eb50b341955fa38b6fcc300684ea10  ./examples/abitest/bin/abitest_0_frontend.wasm
5384945ff4d67d758e15f0ece0550f59aef877e3fef37907b749da3b2519c21f  ./examples/abitest/bin/abitest_1_backend.wasm
8f907b548339324bdbc87894714806facbbd225a5798b557b2001c2b493b0c52  ./examples/abitest/bin/abitest_linear_handles.wasm
cda3674646ebf25e5b34a15ded9c8dca78f7a8361cdbbb43b75b07fe92430382  ./examples/aggregator/bin/aggregator.wasm
ef447cdfda3b6d78ee518722ac3270609bc602a6c7cfd197fa82e9070b3ccd3e  ./examples/chat/bin/chat.wasm
d812f9b3a7c867be2df853f3061647c8e9a9b9fbcef4a39daaf5da33a53c1bb3  ./examples/hello_world/bin/hello_world.wasm
18c03f19c64a0e487e0a118743a0a2e1df16a87e41cd8530a523da4027a90bef  ./examples/hello_world/bin/translator.wasm
3d7bbf45681b499be9ee8daf55cd029ce749dd7f9113bdb0403da8b8d3d17a2c  ./examples/http_server/bin/http_server.wasm
9409a53f823a9febd7a2bc16677de093479880acd7da1a34ea79278972b53dc6  ./examples/injection/bin/injection.wasm
8efff73b9a678970664770512d97c191fb3c9397124439abe72e5b304b999e43  ./examples/private_set_intersection/bin/private_set_intersection.wasm
abf0475fe00c584096f16fd340dd822c1d6879b54adc912406902e7b0b035a43  ./examples/private_set_intersection/bin/private_set_intersection_handler.wasm
c6a2919c06a536170d225e9bba5c9be97eaa5e800f57f62405972ed138064639  ./examples/proxy_attestation/bin/proxy_attestation_example.wasm
18c03f19c64a0e487e0a118743a0a2e1df16a87e41cd8530a523da4027a90bef  ./examples/translator/bin/translator.wasm
424eb245c92b2afc48a2027aceb274525be765048ab38d759900db47fa037a11  ./examples/trusted_database/bin/trusted_database.wasm
882b5a4172ea835a258ddf5738c98a04b376fbc31d67053a5e8f65e5bd7324f3  ./oak_loader/bin/oak_loader

Reproducibility Index diff:

diff --git a/reproducibility_index b/reproducibility_index
index a8f1316..4b3015e 100644
--- a/reproducibility_index
+++ b/reproducibility_index
@@ -1,15 +1,15 @@
-ee8c08fbe8132e1d1f11ab0c811407c18a315625bfb24953d39beb858db173c4  ./examples/abitest/bin/abitest_0_frontend.wasm
-8400e545655f67486ea6fee06aaaae9cf2aadecefc3b4288dcb4bfb187db5d83  ./examples/abitest/bin/abitest_1_backend.wasm
-de915d71e5f77362f64eeb1924a349a3b8bc416e4d8bb8614913e2d96b432a10  ./examples/abitest/bin/abitest_linear_handles.wasm
-7a3d2479d81fe14c10f9874e5bfba1185b3c0d4f86b453fa01eed682aa305e50  ./examples/aggregator/bin/aggregator.wasm
-ad69eeeb74eed3a6185210cf4898749eed2d44617557d1327261774faa1e243c  ./examples/chat/bin/chat.wasm
-5edcb3c4a605d6a237a88e06d142b3796c388212895b3257e4eac1ac7c1c1d96  ./examples/hello_world/bin/hello_world.wasm
-24694ff8201d5a3488366c0f86bb81cad8dfedca72fa0559a6820c656027986f  ./examples/hello_world/bin/translator.wasm
-7c0855819b0c188f1a83478868915fe847fe8b847108ccc30a93c5110cb95fde  ./examples/http_server/bin/http_server.wasm
-9d7987628d9a520c64794dba9b76ee597d9b3f93b46186c01fc00bd7e24606fe  ./examples/injection/bin/injection.wasm
-fe327b49cc0ddcf6237952fa962e3a20d3293d7a5d063857cb3f01a5cce77d35  ./examples/private_set_intersection/bin/private_set_intersection.wasm
-d70324138043c16ea812fbd6ce3a75a82aea7a97d13de4570c790d4ab1dda903  ./examples/private_set_intersection/bin/private_set_intersection_handler.wasm
-97f5455a87aa2de4a401a75e8c12a8b49dc3e732d3b85bc8688f5386ad3e54a5  ./examples/proxy_attestation/bin/proxy_attestation_example.wasm
-24694ff8201d5a3488366c0f86bb81cad8dfedca72fa0559a6820c656027986f  ./examples/translator/bin/translator.wasm
-4d2bbcd612282243e85331c187d8f9004779e5724e8c02bdf8f93339ad9bd485  ./examples/trusted_database/bin/trusted_database.wasm
-dcfd1aec80c6482e1e1c1dcb0846d0abf11f5531bf1c2b434e84f128e010ccdd  ./oak_loader/bin/oak_loader
+faf7091d124a520c114b6523820f3b1f12eb50b341955fa38b6fcc300684ea10  ./examples/abitest/bin/abitest_0_frontend.wasm
+5384945ff4d67d758e15f0ece0550f59aef877e3fef37907b749da3b2519c21f  ./examples/abitest/bin/abitest_1_backend.wasm
+8f907b548339324bdbc87894714806facbbd225a5798b557b2001c2b493b0c52  ./examples/abitest/bin/abitest_linear_handles.wasm
+cda3674646ebf25e5b34a15ded9c8dca78f7a8361cdbbb43b75b07fe92430382  ./examples/aggregator/bin/aggregator.wasm
+ef447cdfda3b6d78ee518722ac3270609bc602a6c7cfd197fa82e9070b3ccd3e  ./examples/chat/bin/chat.wasm
+d812f9b3a7c867be2df853f3061647c8e9a9b9fbcef4a39daaf5da33a53c1bb3  ./examples/hello_world/bin/hello_world.wasm
+18c03f19c64a0e487e0a118743a0a2e1df16a87e41cd8530a523da4027a90bef  ./examples/hello_world/bin/translator.wasm
+3d7bbf45681b499be9ee8daf55cd029ce749dd7f9113bdb0403da8b8d3d17a2c  ./examples/http_server/bin/http_server.wasm
+9409a53f823a9febd7a2bc16677de093479880acd7da1a34ea79278972b53dc6  ./examples/injection/bin/injection.wasm
+8efff73b9a678970664770512d97c191fb3c9397124439abe72e5b304b999e43  ./examples/private_set_intersection/bin/private_set_intersection.wasm
+abf0475fe00c584096f16fd340dd822c1d6879b54adc912406902e7b0b035a43  ./examples/private_set_intersection/bin/private_set_intersection_handler.wasm
+c6a2919c06a536170d225e9bba5c9be97eaa5e800f57f62405972ed138064639  ./examples/proxy_attestation/bin/proxy_attestation_example.wasm
+18c03f19c64a0e487e0a118743a0a2e1df16a87e41cd8530a523da4027a90bef  ./examples/translator/bin/translator.wasm
+424eb245c92b2afc48a2027aceb274525be765048ab38d759900db47fa037a11  ./examples/trusted_database/bin/trusted_database.wasm
+882b5a4172ea835a258ddf5738c98a04b376fbc31d67053a5e8f65e5bd7324f3  ./oak_loader/bin/oak_loader

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

Successfully merging this pull request may close these issues.

Add with_downgrade versions of remaining node and channel functions to ABI and SDK
3 participants