-
Notifications
You must be signed in to change notification settings - Fork 3
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 TSS endpoint to get TDX quote #1173
Conversation
Ok(nonce) | ||
attestee: &sr25519::Pair, | ||
) -> Result<[u8; 32], ClientError> { | ||
Ok(user::request_attestation(api, rpc, attestee).await?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function needed to move out of this module because it is behind a feature flag which entropy-tss does not enable. I have left this wrapper so that there is a version of it with the same error type as the other full-client functions.
let nonce = request_attestation(&api, &rpc, signer.signer()).await?; | ||
|
||
// We also need the current block number as input | ||
let block_number = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the problem - we cannot know at what block number the node operator is going to submit this quote
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this!
/// body. | ||
/// This is used by node operators to get a quote for use in the `validate`, `change_endpoint` | ||
/// and `change_tss_accounts` extrinsics. | ||
pub async fn get_attest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub async fn get_attest( | |
pub async fn request_attestation( |
To match the extrinsic?
let api = get_api(&app_state.configuration.endpoint).await?; | ||
let rpc = get_rpc(&app_state.configuration.endpoint).await?; | ||
|
||
// Request attestation to get nonce |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Request attestation to get nonce |
let rpc = get_rpc(&app_state.configuration.endpoint).await?; | ||
|
||
// Request attestation to get nonce | ||
let nonce = request_attestation(&api, &rpc, signer.signer()).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As part of the AttestationIssued
event we return not only the nonce
but also the block_number
at which that request was processed.
I thought it would be useful for that second step, but thinking about it a bit more it might not be.
Part of #982 - see #982 (comment)
This adds an endpoint to the TSS server which allows the operator to get a quote for use in the
validate
,change_endpoint
, andchange_tss_accounts
extrinsics.In doing this i noticed a possible problem with our design. I have made an issue: #1174