Skip to content

Commit

Permalink
modified AttestationSubmitted event
Browse files Browse the repository at this point in the history
  • Loading branch information
preston4896 committed Jan 6, 2025
1 parent 560c208 commit 2e751ee
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions contracts/AttestationEntrypointBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import {IRiscZeroVerifier} from "risc0/IRiscZeroVerifier.sol";
import {ISP1Verifier} from "@sp1-contracts/ISP1Verifier.sol";

enum ZkCoProcessorType {
Unknown,
// if the ZkCoProcessorType is included as None in the AttestationSubmitted event log
// it indicates that the attestation of the DCAP quote is executed entirely on-chain
None,
RiscZero,
Succinct
}
Expand Down Expand Up @@ -42,7 +44,7 @@ abstract contract AttestationEntrypointBase is Ownable {

mapping(uint16 quoteVersion => IQuoteVerifier verifier) public quoteVerifiers;

event AttestationSubmitted(bool success, bytes output);
event AttestationSubmitted(bool success, ZkCoProcessorType verifierType, bytes output);

constructor() {
_initializeOwner(msg.sender);
Expand Down Expand Up @@ -107,7 +109,7 @@ abstract contract AttestationEntrypointBase is Ownable {
// Note: The quote header cannot be trusted yet, it will be validated by the Verifier library
(success, output) = quoteVerifier.verifyQuote(header, rawQuote);

emit AttestationSubmitted(success, output);
emit AttestationSubmitted(success, ZkCoProcessorType.None, output);
}

/**
Expand Down Expand Up @@ -150,7 +152,7 @@ abstract contract AttestationEntrypointBase is Ownable {
}
(success, verifiedOutput) = quoteVerifier.verifyZkOutput(output);

emit AttestationSubmitted(success, output);
emit AttestationSubmitted(success, zkCoprocessor, output);
}

/**
Expand Down

0 comments on commit 2e751ee

Please sign in to comment.