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 C++ API to get untrusted host time #2550

Merged
merged 5 commits into from
May 4, 2021

Conversation

eddyashton
Copy link
Member

Resolves #2523.

Adds the API get_untrusted_host_time_v1, which returns the host-written (UTC) time as a timespec.

Also adds an example endpoint using this in the nobuiltins app, and a few test calls to confirm the reported time is close enough to the true time.

@eddyashton eddyashton requested a review from a team as a code owner April 30, 2021 15:24
@ghost
Copy link

ghost commented Apr 30, 2021

add_untrusted_time_api@24693 aka 20210504.4 vs main ewma over 20 builds from 24352 to 24682

Click to see table
build_id build_number sb_sgx_cft^ sb_sgx_cft_mem sb_sgx_bft^ sb_sgx_bft_mem sb_ws_sgx_cft^ sb_ws_sgx_cft_mem sb_sig_sgx_cft^ sb_sig_sgx_cft_mem tpcc_sgx_cft^ tpcc_sgx_cft_mem tpcc_sgx_bft^ tpcc_sgx_bft_mem ls_sgx_cft^ ls_sgx_cft_mem ls_ws_sgx_cft^ ls_ws_sgx_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem CHAMP put (/s)^ CHAMP get (/s)^
24352 20210428.8 28895.2 1.29803e+07 14498.9 3.84083e+07 33762.1 1.35046e+07 5044.93 1.00967e+07 6663.74 9.39828e+07 3393.1 1.66072e+08 24508.9 1.7961e+07 30331.2 1.95339e+07 4139.63 1.45532e+07 2079.75 8.2617e+06 1432.61 7.99955e+06 1.29587e+06 3.62478e+07
24374 20210428.14 29642.4 1.29803e+07 14141.4 3.73597e+07 32426.3 1.35046e+07 5193.36 1.0621e+07 6737.77 9.21478e+07 3400.48 1.64762e+08 22596.6 1.74367e+07 28415.2 1.74367e+07 4395.46 1.45532e+07 2029.57 8.52384e+06 1465.31 7.73741e+06 1.33332e+06 3.69675e+07
24388 20210428.19 27537.3 1.29803e+07 14386.1 3.70975e+07 34193.6 1.35046e+07 4513.3 1.03588e+07 6621.58 9.26721e+07 3453.72 1.6083e+08 23389.9 1.76989e+07 29303.9 1.95339e+07 4360.38 1.45532e+07 1997.49 8.52384e+06 1484.83 7.99955e+06 1.32848e+06 3.62471e+07
24417 20210428.28 27889.4 1.29803e+07 14659 4.57483e+07 31372.8 1.32424e+07 4942.76 1.00967e+07 6541.86 9.31964e+07 3376.01 1.55062e+08 22314.5 1.74367e+07 27595.7 1.76989e+07 3990.78 1.48153e+07 2022.42 1.11453e+07 1451.43 8.2617e+06 1.33654e+06 3.58663e+07
24438 20210428.32 28878.4 1.29803e+07 13946.9 3.70975e+07 33323.2 1.35046e+07 4897.49 1.03588e+07 6294.31 9.31964e+07 3398.9 1.62402e+08 21914.7 1.74367e+07 28948 1.76989e+07 4384.71 1.45532e+07 1961.69 1.16696e+07 1453.03 7.73741e+06 1.32436e+06 3.60563e+07
24487 20210429.4 27148 1.29803e+07 13733.5 3.81461e+07 33049.7 1.32424e+07 5374.23 1.0621e+07 6334.64 9.21478e+07 3067.47 2.68571e+08 23624.5 1.76989e+07 28208.1 1.76989e+07 4026.92 1.4291e+07 1951.07 8.2617e+06 1496.77 7.99955e+06 1.32453e+06 3.60563e+07
24492 20210429.5 27268.9 1.27181e+07 14052.4 3.76218e+07 29533.3 1.35046e+07 4932.77 1.00967e+07 6302.39 9.24099e+07 3239.5 2.15093e+08 24754.3 1.76989e+07 28947.3 1.76989e+07 4068.59 1.40289e+07 1938.36 8.2617e+06 1453.82 7.99955e+06 1.35745e+06 3.63114e+07
24502 20210429.9 26546.4 1.29803e+07 14672.1 3.84083e+07 33595.1 1.35046e+07 4975.21 1.03588e+07 6474.73 9.24099e+07 3431.58 1.54276e+08 23228.3 1.71746e+07 30183.1 1.7961e+07 4074.73 1.45532e+07 1998.9 1.08831e+07 1437.94 7.99955e+06 1.33142e+06 3.59298e+07
24511 20210429.11 29967.2 1.29803e+07 14185.6 3.91947e+07 34475.4 1.35046e+07 5416.95 1.03588e+07 6427.87 9.10992e+07 3464.18 1.51392e+08 22026.7 1.74367e+07 29712.9 1.7961e+07 4349.76 1.45532e+07 2081.75 8.52384e+06 1487.42 7.99955e+06 1.34576e+06 3.67684e+07
24526 20210429.15 29339.9 1.29803e+07 14726.7 3.7884e+07 33436.9 1.32424e+07 5439.19 1.0621e+07 6463.56 9.37206e+07 3300.53 1.9019e+08 23574.1 1.76989e+07 28025.5 1.76989e+07 4235.43 1.48153e+07 1978.29 8.52384e+06 1470.07 7.99955e+06 1.35314e+06 3.61837e+07
24544 20210429.18 26808.2 1.32424e+07 14938.1 4.10297e+07 33268.6 1.32424e+07 4866.27 1.00967e+07 6325.62 9.13613e+07 3408.75 1.52965e+08 24792.1 1.82232e+07 29967.8 1.76989e+07 4401.18 1.48153e+07 2011.91 8.2617e+06 1451.97 7.99955e+06 1.3708e+06 3.59292e+07
24551 20210429.21 25439 1.27181e+07 13367.6 3.7884e+07 28387.9 1.32424e+07 4977.33 1.03588e+07 6486.59 9.18856e+07 2891.19 2.05656e+08 23363 1.71746e+07 30101.9 1.76989e+07 3925.77 1.4291e+07 2075.49 8.52384e+06 1458.71 7.99955e+06 1.34215e+06 3.63121e+07
24567 20210429.25 26991 1.29803e+07 13575.8 3.86704e+07 33216.1 1.32424e+07 4860.98 1.0621e+07 6486.62 9.16235e+07 3411.9 1.77082e+08 24125.5 1.74367e+07 29101.7 1.7961e+07 4228.48 1.45532e+07 2077.86 8.2617e+06 1453.77 9.31027e+06 1.34497e+06 3.62478e+07
24584 20210430.1 28953.8 1.32424e+07 14670.6 3.7884e+07 30152 1.35046e+07 4796.8 1.0621e+07 6605.36 9.16235e+07 3323.05 1.47722e+08 23001.3 1.76989e+07 29445.5 1.76989e+07 4242.52 1.45532e+07 2058.09 8.52384e+06 1451.77 9.57242e+06 1.34844e+06 3.61199e+07
24587 20210430.2 28120.1 1.29803e+07 14524.9 3.94568e+07 34453.3 1.35046e+07 4920.3 1.00967e+07 6723.07 9.26721e+07 3030.36 1.9753e+08 22394.7 1.76989e+07 29226.1 1.7961e+07 3868.71 1.4291e+07 2007.56 1.00967e+07 1423.19 7.99955e+06 1.30611e+06 3.59292e+07
24604 20210430.7 26052.8 1.29803e+07 13873.6 3.81461e+07 34375.7 1.35046e+07 5276.97 1.21939e+07 6385.08 9.16235e+07 3353.43 1.78131e+08 24343.7 1.76989e+07 29897.1 1.76989e+07 3859.3 1.4291e+07 2052.38 8.52384e+06 1402.32 7.99955e+06 1.34294e+06 3.62471e+07
24616 20210430.10 28306.6 1.29803e+07 14294.7 3.76218e+07 31792.8 1.32424e+07 4471.42 1.00967e+07 6558.14 9.05749e+07 3426.68 1.50606e+08 22784.9 1.76989e+07 28840.2 1.76989e+07 4207.73 1.45532e+07 1965.97 8.52384e+06 1400.25 7.73741e+06 1.34276e+06 3.62478e+07
24640 20210430.18 24936.4 1.32424e+07 13727.2 3.76218e+07 32701.6 1.32424e+07 4841.66 1.00967e+07 6510.91 9.26721e+07 3346.24 1.68956e+08 23653.7 1.7961e+07 30023.9 1.76989e+07 4102.44 1.50774e+07 2039.69 8.52384e+06 1455.89 7.99955e+06 1.35538e+06 3.63121e+07
24665 20210430.25 28071.2 1.27181e+07 13753.2 3.73597e+07 31916.5 1.29803e+07 4528.1 1.03588e+07 6462.63 9.16235e+07 3412.93 1.67383e+08 22795.5 1.76989e+07 27710.3 1.74367e+07 4214.67 1.48153e+07 2107.05 1.11453e+07 1457.57 7.73741e+06 1.34303e+06 3.54933e+07
24682 20210504.1 29888.9 1.29803e+07 14073.7 4.10297e+07 33852.8 1.32424e+07 4887.24 1.00967e+07 6742.63 9.13613e+07 3472.05 1.73675e+08 23470.9 1.74367e+07 29675.4 1.76989e+07 4036.84 1.45532e+07 1993.47 8.2617e+06 1481.98 9.57242e+06 1.34879e+06 3.62478e+07

images

@eddyashton eddyashton merged commit 5aa666f into microsoft:main May 4, 2021
@achamayou achamayou added the 1.x-todo PRs which should be backported to 1.x label Aug 11, 2021
eddyashton added a commit to eddyashton/CCF that referenced this pull request Aug 25, 2021
achamayou pushed a commit that referenced this pull request Aug 25, 2021
@achamayou achamayou removed the 1.x-todo PRs which should be backported to 1.x label Dec 2, 2021
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.

Expose get_untrusted_time_v1()
4 participants