Auditing Mechanism
Enclave Setup
At the beginning of every Epoch, each Enclave generates a random seed internally which is not exposed to anyone until seconds after the end of the Epoch. The host machine on which the Enclave is running can query the random seed after seconds (SeedQueryBufferPeriod) of the end of the epoch, along with an attestation signed by the enclave. The host machine has to submit the random seed on-chain within seconds (SeedSubmissionPeriod) after it can be queried (that is, within seconds after the end of the epoch). If the host machine fails to submit the random seed , the Enclave is considered to be offline and Tokens staked against the enclave are slashed.
Auditing Technique
During each Age, the auditor subset [] assigned to the enclave for the corresponding Slot sends audit requests to the enclave to ensure its availability. The audit requests are sent through a secure channel that is established using a protocol such as TLS to ensure that host can't distinguish an audit request from a user request. The random seed is used by the enclave to generate a response to the audit request. It calculates a 1-bit response as follows:
The above response by the enclave to the audit request is required to be submitted on-chain by the Auditor within seconds (AuditResponseSubmissionPeriod) of the end of the age to prove that the audit was actually done. If the enclave does not respond to the audit request, then it is considered to be offline and reported as such on-chain by the auditor. In case neither the response nor the offline status is reported on-chain by the auditor, then the auditor is assumed to be offline and the POND tokens staked are slashed for inactivity.