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

Review the enclave registration process #1133

Closed
Kailai-Wang opened this issue Dec 29, 2022 · 4 comments · Fixed by #2469
Closed

Review the enclave registration process #1133

Kailai-Wang opened this issue Dec 29, 2022 · 4 comments · Fixed by #2469
Assignees
Labels
D2-bug Something isn't working I3-high should be completed within 5 working days Stale

Comments

@Kailai-Wang
Copy link
Collaborator

Context

The last modification regarding enclave registration in worker-main won't change the logic, because trusted_url differs each time although MRENCLAVE is identical, is this intended?

Ok(Some(value)) => {
if value.mr_enclave.to_vec() == mrenclave && value.url == trusted_url {
// After calling the perform_ra function, the nonce will be incremented by 1,
// so enclave is already registered, we should reset the nonce_cache
enclave
.set_nonce(nonce)
.expect("Could not set nonce of enclave. Returning here...");
found = true;
info!("fond enclave: {:?}", value);
break
}

image

We might need to ask Integritee why such a registration process is implemented, it seems more intuitive to have MRENCLAVE as key and a list of workers as (sub)-values.


✔️ Please set appropriate labels and assignees if applicable.

@Kailai-Wang
Copy link
Collaborator Author

Please note if we want to change it we have to consider some implicit consequences, e.g. when search_peers it looks for all registered enclaves (even with duplicated MRENCLAVE) to find all worker-URLs:

for enclave in enclaves {
// FIXME: This is temporary only, as block broadcasting should be moved to trusted ws server.
let enclave_url = enclave.url.clone();
let worker_api_direct = DirectWorkerApi::new(enclave.url);
let untrusted_worker_url =
worker_api_direct.get_untrusted_worker_url().map_err(|e| {
error!(
"Failed to get untrusted worker url (enclave: {}): {:?}",
enclave_url, e
);
e
})?;

@Kailai-Wang Kailai-Wang added D2-bug Something isn't working I3-high should be completed within 5 working days labels Dec 29, 2022
@github-actions
Copy link
Contributor

❗ This issue is stale because it has been open for 60 days with no activity.
Remove Stale label or update it, otherwise this issue will be closed in 7 days.
@litentry/parachain

@github-actions
Copy link
Contributor

❗ This issue is stale because it has been open for 60 days with no activity.
Remove Stale label or update it, otherwise this issue will be closed in 7 days.
@litentry/parachain

@github-actions github-actions bot added the Stale label Apr 30, 2023
@felixfaisal
Copy link
Member

Hey @Kailai-Wang
Could this issue be related to this - #1820

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D2-bug Something isn't working I3-high should be completed within 5 working days Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants