Skip to content

Add enclave tools / docker building for TEE image to celo repository - #527

Open
shenkeyao wants to merge 6 commits into
espresso/batcherfrom
espresso/tee-images
Open

shenkeyao wants to merge 6 commits into
espresso/batcherfrom
espresso/tee-images

Conversation

@shenkeyao

@shenkeyao shenkeyao commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Based on #459.

  • Adds op-batcher-enclave-app and op-batcher-enclave-targetas targets in ops/docker/op-stack-go/Dockerfile.
  • Adds op-batcher/enclave-tools and a just enclave-tools recipe.
  • Builds and publishes both images to ghcr.io/celo-org/optimism on pushes and PRs to espresso/**.
  • Drops --espresso.batch-authenticator-addr and --espresso.rollup-l1-url from the ported scripts.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 705e611165

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +249 to +250
else
echo " [$i]: $arg" >&2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Redact credential-bearing arguments before logging

When the enclave is launched with credentials in --signer.header, an RPC URL, or --espresso.testing-batcher-private-key, this fallback prints the complete argument to container logs because only --private-key and --mnemonic are recognized as secrets. This can expose remote-signer authorization tokens, provider API keys, or another private key; redact these credential-bearing flags and sensitive URL components rather than logging them verbatim.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, worth removing that I think @shenkeyao .

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated: b2adb98

Comment thread op-batcher/enclave-entrypoint.bash Outdated
Comment on lines +169 to +170
# Batcher flags whose values are URLs
URL_ARG_RE='^(--altda\.da-server|--espresso\.espresso-attestation-service|--espresso\.urls|--espresso\.l1-url|--l1-eth-rpc|--l2-eth-rpc|--rollup-rpc|--signer\.endpoint)(=|$)'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Proxy additional throttling endpoints

When --throttle.additional-endpoints contains localhost, 127.0.0.1, or host endpoints exposed by the enclave parent, this regex leaves them in filtered_args instead of routing them through the Odyn/socat bridge. The batcher includes these URLs in its throttling endpoint set, so requests then target the enclave itself and throttling updates to those builders fail; include this StringSlice URL flag in the rewrite path.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shenkeyao please fix this as well.
This regexp should work:

URL_ARG_RE='^(--altda\.da-server|--espresso\.espresso-attestation-service|--espresso\.urls|--espresso\.l1-url|--l1-eth-rpc|--l2-eth-rpc|--rollup-rpc|--signer\.endpoint|--throttle\.additional-endpoints)(=|$)'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: 21d9a60

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 21d9a60cdb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread op-batcher/enclave-entrypoint.bash Outdated
Comment thread op-batcher/enclave-entrypoint.bash

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e858b64f5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread op-batcher/enclave-entrypoint.bash
@philippecamacho

Copy link
Copy Markdown
Collaborator

Hey @ezdac a bit of context on this one: This is the code needed to generate the TEE batcher enclave image. We already used this code from our fork of this repository in order to spinup the TEE batcher currently running in the testnet. See EspressoSystems#1.

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