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

feat(tee): introduce get_tee_proofs RPC method for TEE proofs #2474

Merged
merged 30 commits into from
Aug 8, 2024

Conversation

pbeza
Copy link
Collaborator

@pbeza pbeza commented Jul 24, 2024

What ❔

Add get_tee_proofs RPC method to expose TEE attestations and proofs for a given batch number and TEE type.

Currently, there can be only one proof instance per batch number per TEE type. In the future, we may allow multiple instances since attestations can be revoked if the machine that produced them is compromised.

Why ❔

We want to enable anyone to download TEE attestations and proofs for any transaction, allowing them to verify it on their own machines using the verify-attestation standalone binary (available at https://github.com/matter-labs/teepot/tree/main/bin/verify-attestation).

This is just an intermediate step; the ultimate goal is to have TEE proofs and attestations verification implemented on-chain.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zk fmt and zk lint.

@pbeza pbeza requested review from haraldh and popzxc July 24, 2024 17:18
@pbeza
Copy link
Collaborator Author

pbeza commented Jul 25, 2024

FYI: CI is failing due to a recent DevOps-related issue, which is not related to this PR.

core/lib/dal/src/tee_proof_generation_dal.rs Outdated Show resolved Hide resolved
core/node/proof_data_handler/src/lib.rs Outdated Show resolved Hide resolved
@pbeza pbeza force-pushed the tee/attestation_fetcher branch 12 times, most recently from e07fced to ca2824f Compare July 29, 2024 21:10
Make them more flexible to allow multiple proofs for each
(batch_number, tee_type) pair.
core/lib/dal/src/proof_generation_dal.rs Outdated Show resolved Hide resolved
core/lib/dal/src/tee_proof_generation_dal.rs Outdated Show resolved Hide resolved
@pbeza pbeza force-pushed the tee/attestation_fetcher branch 3 times, most recently from 26eb5f1 to a56114a Compare July 31, 2024 11:17
@pbeza
Copy link
Collaborator Author

pbeza commented Aug 6, 2024

As mentioned here, @RomanBrodetski and @perekopskiy, could you please review? Unless you strongly prefer splitting this PR into two separate ones, I would prefer to wait for your comments and address them in a single PR. This would save me a couple of hours for properly splitting this PR and retesting.

@pbeza pbeza requested a review from perekopskiy August 7, 2024 13:01
perekopskiy
perekopskiy previously approved these changes Aug 7, 2024
@haraldh haraldh added this pull request to the merge queue Aug 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 8, 2024
@haraldh haraldh added this pull request to the merge queue Aug 8, 2024
Merged via the queue into main with commit d40ff5f Aug 8, 2024
47 checks passed
@haraldh haraldh deleted the tee/attestation_fetcher branch August 8, 2024 15:22
github-merge-queue bot pushed a commit that referenced this pull request Aug 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[24.17.0](core-v24.16.0...core-v24.17.0)
(2024-08-13)


### Features

* Allow tracking l2 fees for L2-based chains
([#2563](#2563))
([e3f7804](e3f7804))
* Remove old EN code
([#2595](#2595))
([8d31ebc](8d31ebc))
* **tee:** introduce get_tee_proofs RPC method for TEE proofs
([#2474](#2474))
([d40ff5f](d40ff5f))
* **vm:** Fast VM integration
([#1949](#1949))
([b752a54](b752a54))


### Bug Fixes

* query for prover API
([#2628](#2628))
([b8609eb](b8609eb))
* **vm:** Fix missing experimental VM config
([#2629](#2629))
([e07a39d](e07a39d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Aug 29, 2024
## What ❔

Introduce strong typing for the TEE proof generation status in the Rust
code only (_not_ in the database). This is a followup for:
-
#2474 (comment)
-
#2474 (comment)

This PR also aligns the status types with those
[implemented](https://github.com/matter-labs/zksync-era/blame/7b9e7bf249157272f2c437b86e88d382dd845618/core/lib/dal/src/proof_generation_dal.rs#L22-L23)
in `proof_generation_dal.rs` (specifically the `unpicked` status
introduced in #2258).

## Why ❔

Strong typing makes it easier to reason about the code and helps protect
against subtle bugs.

## Checklist

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [x] Code has been formatted via `zk fmt` and `zk lint`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants