Skip to content

Rename TEE Batcher#395

Merged
jjeangal merged 13 commits intocelo-integration-rebase-16.2from
jg/renaming-backlog-task
Apr 7, 2026
Merged

Rename TEE Batcher#395
jjeangal merged 13 commits intocelo-integration-rebase-16.2from
jg/renaming-backlog-task

Conversation

@jjeangal
Copy link
Copy Markdown
Member

@jjeangal jjeangal commented Apr 3, 2026

This PR

  • Renames teeBatcher/activeIsTeeespressoBatcher/activeIsEspresso throughout BatchAuthenticator.sol and its interface, generated Go bindings, batcher logic, and tests — aligns naming with Espresso-specific semantics rather than implementation detail (TEE).
  • Renames the NON_TEE devnet Docker Compose profile to FALLBACK and updates all test references to use espresso/fallback variable naming instead of tee/nonTee.
  • Renames registerSigner parameters in BatchAuthenticator.sol from attestationTbs/signature to verificationData/data for a more generic interface.
  • Renames .env vars TEE_BATCHER_ADDRESS/TEE_BATCHER_PRIVATE_KEYESPRESSO_BATCHER_ADDRESS/ESPRESSO_BATCHER_PRIVATE_KEY.
  • Updates espresso/SECURITY_ANALYSIS.md to consistently say "Espresso batcher" and "fallback batcher" in place of "TEE batcher" and "non-TEE batcher".

Key Places to Review

How to Test This PR

  1. Run the contract tests to verify the renamed ABI compiles and tests pass:
cd packages/contracts-bedrock
just build-dev
forge test --match-contract BatchAuthenticatorTest -vv
  1. Run integration smoke tests:
just smoke-tests
  1. Run the batcher switching devnet test (requires Docker):
just build-devnet
U_ID=$(id -u) GID=$(id -g) go test -timeout 30m -p 1 -count 1 -v -run '^TestBatcherSwitching$' ./espresso/devnet-tests/...

Asana tasks

@claude
Copy link
Copy Markdown

claude Bot commented Apr 3, 2026

Claude finished @jjeangal's task in 3m 8s —— View job


Review: PR #395 — Rename TEE Batcher

  • Read existing review comments
  • Review the diff for renaming consistency and correctness
  • Check for missed renames (old names still referenced)
  • Review Solidity contract changes
  • Review Go binding and test changes
  • Post review feedback

Summary

Clean renaming PR that consistently replaces teeBatcherespressoBatcher and nonTeeBatcherfallbackBatcher across Solidity contracts, Go bindings, deployer code, and tests. The registerSigner parameter rename (attestationTbs/signatureverificationData/data) is also applied.

Issues Found

ABI/Storage Layout Snapshots Not Updated (Medium)

The snapshot files still contain the old names and were not updated in this PR:

  • packages/contracts-bedrock/snapshots/abi/BatchAuthenticator.json still references teeBatcher, setTeeBatcher, TeeBatcherUpdated, attestationTbs
  • packages/contracts-bedrock/snapshots/storageLayout/BatchAuthenticator.json still references teeBatcher

These snapshots need to be regenerated to reflect the contract changes. This could cause CI snapshot checks to fail or create confusion for anyone relying on the ABI snapshots.

Fix this →

SECURITY_ANALYSIS.md Not Updated (Low)

espresso/SECURITY_ANALYSIS.md still contains many references to the old naming (nonTeeBatcher, non-TEE batcher). While this file isn't code, it could cause confusion if someone reads it after this rename lands.

Minor Inconsistencies in Comments (Nit)

Two places use "non-Espresso batcher" instead of the preferred "fallback batcher" — see inline comments on batcher_switching_test.go:14 and batcher_active_publish_test.go:108.

What Looks Good

  • The core renaming across Solidity contracts, interfaces, Go code, deployer pipeline, and E2E tests is thorough and consistent
  • The Go bindings were properly regenerated to match the new contract ABI
  • The opsuccinct_fault_dispute_game.go binding update appears to be an unrelated regeneration (ABI changes) bundled with this PR — no issues there
  • The function selector in streamer_test.go was correctly updated to 0x030650d2 for the new espressoBatcher() getter
  • Test names were appropriately updated (e.g., test_setTeeBatcher_*test_setEspressoBatcher_*)
  • Storage slot layout is preserved since espressoBatcher replaces teeBatcher at the same position — no migration needed


// TestBatcherSwitching tests that the batcher can be switched from the TEE-enabled
// batcher to a fallback non-TEE batcher using the BatchAuthenticator contract.
// batcher to a fallback non-Espresso batcher using the BatchAuthenticator contract.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: The rest of the PR uses "fallback batcher" consistently, but this comment says "non-Espresso batcher". Consider updating for consistency:

Suggested change
// batcher to a fallback non-Espresso batcher using the BatchAuthenticator contract.
// batcher to a fallback batcher using the BatchAuthenticator contract.

require.NoError(t, err)

t.Logf("TEE batcher published: %v, non-TEE batcher published: %v", teePublished, nonTeePublished)
t.Logf("Espresso batcher published: %v, non-Espresso batcher published: %v", espressoPublished, fallbackPublished)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: Same inconsistency here — the log message says "non-Espresso batcher" while the variable is named fallbackPublished. Consider aligning:

Suggested change
t.Logf("Espresso batcher published: %v, non-Espresso batcher published: %v", espressoPublished, fallbackPublished)
t.Logf("Espresso batcher published: %v, fallback batcher published: %v", espressoPublished, fallbackPublished)

}

function registerSigner(bytes calldata attestationTbs, bytes calldata signature) external {
function registerSigner(bytes calldata verificationData, bytes calldata data) external {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The new parameter name data is quite generic. The underlying registerService in the TEE verifier mocks uses attestation for the first parameter. Consider whether verificationData and data are descriptive enough, or if something like attestation and proof (or attestationData and proofData) would better communicate the purpose of each parameter.

Not a blocker, but worth considering for developer clarity.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request renames 'TEE' and 'non-TEE' batcher references to 'Espresso' and 'fallback' across the system's contracts, bindings, and tests. It also adds the 'rootClaimByChainId' function to the fault dispute game bindings. Feedback was provided to improve consistency by renaming the 'activeIsTee' variable and related event parameters in the 'BatchAuthenticator' contract to match the new naming convention, despite the potential for breaking changes in the ABI.


/// @notice Flag indicating which batcher is currently active.
/// @dev When true the TEE batcher is active; when false the non-TEE batcher is active.
/// @dev When true the Espresso batcher is active; when false the fallback batcher is active.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The comment has been updated to refer to the "Espresso batcher" and "fallback batcher", but the variable activeIsTee (on line 38) and the event BatcherSwitched (referenced in switchBatcher) still use the "Tee" terminology. For consistency with the PR's objective of renaming TEE and non-TEE batchers, consider renaming activeIsTee to activeIsEspresso and updating the associated event and functions. Note that this would be a breaking change for the contract ABI, similar to the renaming of teeBatcher to espressoBatcher.

Copy link
Copy Markdown
Member

@shenkeyao shenkeyao left a comment

Choose a reason for hiding this comment

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

Thank you for doing the renaming!

I realized that we should do a similar change in the tee-op-deploy repo as well, so I just created this ticket: https://app.asana.com/1/1208976916964769/project/1209392461754458/task/1213920204955146?focus=true. I can take on it next week.

Comment thread espresso/devnet-tests/batcher_switching_test.go
Comment thread espresso/scripts/decode_batch_calldata.py Outdated
Comment thread espresso/streamer_test.go Outdated
@philippecamacho
Copy link
Copy Markdown
Collaborator

philippecamacho commented Apr 6, 2026

just smoke-test fails on my machine. Attaching the logs.
logs.txt

Here is the error:

   service.go:632:             �[32mINFO �[0m[04-06|15:43:25.502] Stopping batcher                         �[32mrole�[0m=batcher
    service.go:692:             �[32mINFO �[0m[04-06|15:43:25.502] Batch Submitter stopped                  �[32mrole�[0m=batcher
    espresso_dev_node_test.go:24: failed to start dev environment with espresso dev node:
        have:
        	"failed to setup batch submitter: failed to init Espresso: invalid Espresso config: query service URLs are required when Espresso is enabled"
        want:
        	"<nil>"
    setup.go:521: CLOSING

@philippecamacho
Copy link
Copy Markdown
Collaborator

just smoke-test fails on my machine. Attaching the logs. logs.txt

Here is the error:

   service.go:632:             �[32mINFO �[0m[04-06|15:43:25.502] Stopping batcher                         �[32mrole�[0m=batcher
    service.go:692:             �[32mINFO �[0m[04-06|15:43:25.502] Batch Submitter stopped                  �[32mrole�[0m=batcher
    espresso_dev_node_test.go:24: failed to start dev environment with espresso dev node:
        have:
        	"failed to setup batch submitter: failed to init Espresso: invalid Espresso config: query service URLs are required when Espresso is enabled"
        want:
        	"<nil>"
    setup.go:521: CLOSING

Sorry it was a problem on my end. Test is passing now.

@jjeangal
Copy link
Copy Markdown
Member Author

jjeangal commented Apr 6, 2026

just smoke-test fails on my machine. Attaching the logs. logs.txt
Here is the error:

   service.go:632:             �[32mINFO �[0m[04-06|15:43:25.502] Stopping batcher                         �[32mrole�[0m=batcher
    service.go:692:             �[32mINFO �[0m[04-06|15:43:25.502] Batch Submitter stopped                  �[32mrole�[0m=batcher
    espresso_dev_node_test.go:24: failed to start dev environment with espresso dev node:
        have:
        	"failed to setup batch submitter: failed to init Espresso: invalid Espresso config: query service URLs are required when Espresso is enabled"
        want:
        	"<nil>"
    setup.go:521: CLOSING

Sorry it was a problem on my end. Test is passing now.

Maybe it was related to the code not using the updated espresso-streamers branch? Some CI failures are finicky. Re-running them!

@philippecamacho
Copy link
Copy Markdown
Collaborator

just smoke-test fails on my machine. Attaching the logs. logs.txt
Here is the error:

   service.go:632:             �[32mINFO �[0m[04-06|15:43:25.502] Stopping batcher                         �[32mrole�[0m=batcher
    service.go:692:             �[32mINFO �[0m[04-06|15:43:25.502] Batch Submitter stopped                  �[32mrole�[0m=batcher
    espresso_dev_node_test.go:24: failed to start dev environment with espresso dev node:
        have:
        	"failed to setup batch submitter: failed to init Espresso: invalid Espresso config: query service URLs are required when Espresso is enabled"
        want:
        	"<nil>"
    setup.go:521: CLOSING

Sorry it was a problem on my end. Test is passing now.

Maybe it was related to the code not using the updated espresso-streamers branch? Some CI failures are finicky. Re-running them!

No, I think it was an issue with some local docker configuration.

Copy link
Copy Markdown
Collaborator

@philippecamacho philippecamacho left a comment

Choose a reason for hiding this comment

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

LGTM

@jjeangal jjeangal merged commit e7aaee6 into celo-integration-rebase-16.2 Apr 7, 2026
41 checks passed
@jjeangal jjeangal deleted the jg/renaming-backlog-task branch April 7, 2026 16:03
QuentinI pushed a commit that referenced this pull request Apr 9, 2026
* Rename tee batcher

* change name `activeIsTee`

* update function selector for espresso batcher

* update security analysis doc

* delete unrelated script

* espresso devnet tests use fallback & espresso terms

* modify .env var names

* (hopefully last references)

* push new batch authenticator bindings

* update espresso-streamers commit

* pin to point to espresso-streamers last PR
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.

3 participants