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-attestation): RPC attestation and batch signature verification binary #189

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

pbeza
Copy link
Contributor

@pbeza pbeza commented Aug 13, 2024

This is another variant of the binary tool for verifying attestation and the signature of a given batch. Unlike the existing tool, this variant does not require you to provide two separate files – one for the attestation and one for the signature. Instead, it automatically fetches both from the RPC node.

Unfortunately, after discussing with @popzxc, we found that there is no way to reuse the RPC client because our published crates on crates.io are outdated and do not include the recently merged TEE-specific code changes. To be fixed in the future.

To use verify-rpc-attestation, run:

$ nix build -L .#container-verify-era-proof-attestation-sgx
$ export IMAGE_TAG=$(docker load -i result | grep -Po 'Loaded image.*: \K.*')
$ docker run -i --rm $IMAGE_TAG --batch-number 598706 --rpc-url https://z2-dev-api.zksync.dev

@pbeza pbeza force-pushed the patrick/sgx-rpc-attestation-verifier branch 11 times, most recently from b35014a to bc42e30 Compare August 14, 2024 15:24
@pbeza pbeza marked this pull request as ready for review August 14, 2024 15:36
@pbeza pbeza requested a review from a team as a code owner August 14, 2024 15:36
@haraldh
Copy link
Contributor

haraldh commented Aug 27, 2024

small bike shedding.... rename verify_rpc_attestation to something like verify_era_proof_attestation???

@haraldh
Copy link
Contributor

haraldh commented Aug 27, 2024

Also we want to create the docker container with the github actions, so please add it to the CI

teepot-crate.nix Outdated Show resolved Hide resolved
packages/container-verify-rpc-attestation-sgx/default.nix Outdated Show resolved Hide resolved
packages/container-verify-rpc-attestation-sgx/default.nix Outdated Show resolved Hide resolved
@haraldh
Copy link
Contributor

haraldh commented Aug 29, 2024

To use verify-rpc-attestation, run:

$ nix build -L .#container-verify-rpc-attestation-sgx
$ export IMAGE_TAG=$(docker load -i result | grep -Po 'Loaded image.*: \K.*')
$ docker run -i --rm $IMAGE_TAG --batch-number 12 --rpc-url http://localhost:3050

@haraldh
Copy link
Contributor

haraldh commented Aug 29, 2024

btw:

$ nix shell .#teepot.verify_rpc_attestation
$ verify-rpc-attestation --batch-number 12 --rpc-url http://localhost:3050

can also be:

$ nix shell .#teepot.verify_rpc_attestation --command verify-rpc-attestation --batch-number 12 --rpc-url http://localhost:3050

@haraldh
Copy link
Contributor

haraldh commented Aug 29, 2024

you might wanna rebase and squash the commits

@haraldh haraldh force-pushed the patrick/sgx-rpc-attestation-verifier branch from 3e5aa43 to f322fc7 Compare August 29, 2024 10:33
@haraldh
Copy link
Contributor

haraldh commented Aug 29, 2024

Also we want to create the docker container with the github actions, so please add it to the CI

done

…ation binary

This is another variant of the binary tool for verifying attestation and
the signature of a given batch. Unlike the existing tool, this variant
does not require you to provide two separate files—one for the
attestation and one for the signature. Instead, it automatically fetches
both from the RPC node.

Unfortunately, after discussing with @popzxc, we found that there is no way
to reuse the RPC client because our published crates on crates.io are
outdated and do not include the recently merged TEE-specific code
changes. To be fixed in the future.
@pbeza pbeza force-pushed the patrick/sgx-rpc-attestation-verifier branch from d84182c to 5e4b890 Compare August 30, 2024 10:15
@pbeza pbeza requested a review from haraldh August 30, 2024 10:22
@haraldh haraldh merged commit 6b0b0b6 into main Aug 30, 2024
14 checks passed
@haraldh haraldh deleted the patrick/sgx-rpc-attestation-verifier branch August 30, 2024 10:37
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