integritee-network / pallets

Other
10 stars 14 forks source link

Timestamp in `EnclaveRegistry` in teerex pallet never gets refreshed #117

Open Kailai-Wang opened 1 year ago

Kailai-Wang commented 1 year ago

Tracking issue in our repo: https://github.com/litentry/litentry-parachain/issues/995

TL;DR Enclave.timestamp field only gets populated when the enclave is initially registered but never gets updated since then.

As a result, an enclave will certainly be removed after MaxSilenceTime. Shall we update the timestamp upon confirm_processed_parentchain_block maybe?

clangenb commented 1 year ago

Thanks for the report!

So there are two timestamps that are relevant in the future, which is not yet completely implemented:

  1. MaxSilenceTime: Unregister a worker, which has not given any update for a while, I think it is a good idea that this is done with a confirm_processed_parentchain_block.

  2. Refresh attestation report: The future for this would be that the worker re-registers to update the attestations timestamp because we want to ensure that the worker can still get a valid attestation report to ensure its integrity. This still needs to be implemented.

Edit: actually, I think the MaxSilenceTime was intended to be for 2., but its name is poorly chosen. Let me think.