Skip to content

contract should not store full Attestation submission #1629

Closed

Description

@DSharifi

Background

@barakeinav1 observed that gas usage is too high when deploying two nodes with TEE, and attempting to vote in a new node. We also observed that verify_tee is using ~270Tgas per call, which is only to verify 2-3 nodes with attestation.

We believe our current tests did not uncover this bug earlier, as all our sandbox tests that use a runtime use mocked attestations which are very cheap to verify.

The issue is that resharing votes failed due to max gas (300tgas) being exceeded. This is due to resharing votes currently re-verifying every participant + the proposed one.

User Story

No response

Acceptance Criteria

  • the contract does not store the full attestation for any participant
  • re-verifications only manually checks for expiry and the allowed hash
  • re-run @barakeinav1 's manual test and verify that gas usage is acceptable

Resources & Additional Notes

No response

Activity

  1. self-assigned this
    on Dec 9, 2025
  2. barakeinav1 commented on Dec 10, 2025

    @barakeinav1
    Contributor

    I check several pck_crl certificates we got from DTX collateral (from phala endpoint)./
    the CRLs Next update field is 30 day ahead of the This update field - e.g CRL are valid for 30 days.

    if we can extract this value during verification - great.
    but if it hard, I think we can assume this will be the value.

  3. barakeinav1 commented on Dec 10, 2025

    @barakeinav1
    Contributor

    TL/DR

    • Root CA is very long-lived (≈30 years)
    • PCK CA ≈15 years
    • TCB Signing Cert ≈7 years
    • PCK CRL & TCB Info are refreshed every 30 days
    • Root CRL is refreshed yearly

    Certificate & CRL Validity Table (example):

    Category Name Valid From (NotBefore / ThisUpdate) Valid To (NotAfter / NextUpdate) Signed By
    Certificate Intel SGX Root CA 2018-05-21 10:45:10 2049-12-31 23:59:59 Self-signed
    Certificate Intel SGX PCK Platform CA 2018-05-21 10:50:10 2033-05-21 10:50:10 Intel SGX Root CA
    Certificate Intel SGX TCB Signing Certificate 2025-05-06 09:25:00 2032-05-06 09:25:00 Intel SGX Root CA
    CRL Root CA CRL 2025-03-20 11:21:57 (ThisUpdate) 2026-04-03 11:21:57 (NextUpdate) Intel SGX Root CA
    CRL PCK CRL 2025-09-03 14:11:05 (ThisUpdate) 2025-10-03 14:11:05 (NextUpdate) Intel SGX PCK Platform CA
    TCB Info TCB Info JSON 2025-09-03 14:16:47 (issueDate) 2025-10-03 14:16:47 (nextUpdate) Intel SGX TCB Signing Cert
    QE Identity QE Identity JSON 2025-08-19 11:34:35 (issueDate) 2025-09-18 11:34:35 (nextUpdate) Intel SGX TCB Signing Cert
  4. DSharifi commented on Dec 10, 2025

    @DSharifi
    ContributorAuthor

    Thanks for digging this up @barakeinav1. I'll create a follow up issue in case we want to use these TTLs that are part of the certificate.

    For this Issue I'll go ahead and use a timeout value that the contract can enforce that is less than 30 days.

  5. DSharifi commented on Dec 10, 2025

    @DSharifi
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions