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(verify-era-proof-attestation): added continuous mode with attestation policies #198

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

pbeza
Copy link
Contributor

@pbeza pbeza commented Sep 9, 2024

This PR introduces TEE Prover continuous mode with attestation policies.

Attestation policies are a set of criteria that determine whether an SGX attestation should be considered valid or invalid. In practice, this means checking against a specified set of mrsigners, mrenclaves, and TCB levels. If the attestation’s mrenclave/mrsigner/TCB levels matches those in the provided --sgx-mrenclaves/--sgx-mrsigners/--sgx-allowed-tcb-levels, we treat the attestation as successfully verified. Otherwise, the attestation is considered invalid.

The --continuous mode for the TEE Prover allows it to run continuously, verifying new batches exposed by the node's RPC API in real-time.

To try it out, run the following commands:

$ nix build -L .#container-verify-era-proof-attestation-sgx
$ export IMAGE_TAG=$(docker load -i result | grep -Po 'Loaded image.*: \K.*')
$ docker run  -i --init --rm $IMAGE_TAG --continuous 11505 --rpc https://sepolia.era.zksync.dev --sgx-allowed-tcb-levels Ok,SwHardeningNeeded --log-level debug
$ docker run  -i --init --rm $IMAGE_TAG --batch 11509 --rpc https://sepolia.era.zksync.dev --sgx-allowed-tcb-levels Ok,SwHardeningNeeded --log-level debug

@pbeza pbeza force-pushed the patrick/attestation-acceptance-params branch 20 times, most recently from 9fe3bac to ab32fd7 Compare September 12, 2024 13:13
@pbeza pbeza changed the title feat(verify-era-proof-attestation): add attestation acceptance checks feat(verify-era-proof-attestation): added continuous mode with attestation policies Sep 12, 2024
…policies

This PR introduces TEE Prover continuous mode with attestation policies.

Attestation policies are a set of criteria that determine whether an SGX
attestation should be considered valid or invalid. In practice, this
means checking against a specified set of mrsigners, mrenclaves, and TCB
levels. If the attestation’s mrenclave/mrsigner/TCB levels matches those
in the provided --sgx-mrenclaves/--sgx-mrsigners/--sgx-allowed-tcb-levels,
we treat the attestation as successfully verified. Otherwise, the
attestation is considered invalid.

The --continuous mode for the TEE Prover allows it to run continuously,
verifying new batches exposed by the node's RPC API in real-time.

To try it out, run the following commands:

    $ nix build -L .#container-verify-era-proof-attestation-sgx
    $ export IMAGE_TAG=$(docker load -i result | grep -Po 'Loaded image.*: \K.*')
    $ docker run  -i --init --rm $IMAGE_TAG --continuous 11505 --rpc https://sepolia.era.zksync.dev --sgx-allowed-tcb-levels Ok,SwHardeningNeeded --log-level debug
    $ docker run  -i --init --rm $IMAGE_TAG --batch 11509 --rpc https://sepolia.era.zksync.dev --sgx-allowed-tcb-levels Ok,SwHardeningNeeded --log-level debug
@pbeza pbeza force-pushed the patrick/attestation-acceptance-params branch from f11bdec to 4fcaaa7 Compare September 13, 2024 17:38
@pbeza pbeza marked this pull request as ready for review September 13, 2024 17:39
@pbeza pbeza requested a review from a team as a code owner September 13, 2024 17:39
@pbeza
Copy link
Contributor Author

pbeza commented Sep 13, 2024

@haraldh, I just fixed the issue we had with handling SIGINT, squashed everything, and retested. Everything looks good on my end. Feel free to merge/review! ✅

@pbeza pbeza requested a review from haraldh September 13, 2024 17:49
@haraldh haraldh merged commit 108ef8c into main Sep 16, 2024
14 checks passed
@haraldh haraldh deleted the patrick/attestation-acceptance-params branch September 16, 2024 10:04
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.

2 participants