Skip to content

restore invalid attestation test - #579

Open
ImJeremyHe wants to merge 6 commits into
espresso/e2e-tests-2from
espresso/e2e-invalid-attestation
Open

ImJeremyHe wants to merge 6 commits into
espresso/e2e-tests-2from
espresso/e2e-invalid-attestation

Conversation

@ImJeremyHe

@ImJeremyHe ImJeremyHe commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T07:32:16.489049Z 0d66640 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@philippecamacho
philippecamacho force-pushed the espresso/e2e-invalid-attestation branch from e9fa3f1 to fbe2c86 Compare November 18, 2026 14:17
batchDriver := system.BatchSubmitter.TestDriver()
batchDriver.Espresso.Attestation = invalidAttestation
err = batchDriver.StartBatchSubmitting()
if err == nil {

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.

Let us be more specific about the error, it should be related to the attestation no to some 200 error for example.

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.

	for _, expectedMsg := range []string{
		"could not register with BatchAuthenticator contract",
		"failed to generate zk proof from nitro attestation",
		"received non-200 response: 400",
	} {
		if !strings.Contains(err.Error(), expectedMsg) {
			t.Fatalf("error message does not contain expected message %q:\ngot: %q", expectedMsg, err.Error())
		}
	}

Added these lines below

t.Fatalf("batcher should've failed to register with invalid attestation but got nil error")
}

expectedMsg := "could not register with BatchAuthenticator contract"

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.

Could we check for more specific error types here? There are several failure paths, so we should ideally verify the reasons for which that startup failed.

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.

For example, a proof-decoding error or a failed L1 registration transaction would also match this message. Could we check the underlying cause too, so the assertion specifically identifies rejection by the attestation verifier?

@ImJeremyHe
ImJeremyHe force-pushed the espresso/e2e-invalid-attestation branch from fbe2c86 to 8c5c79f Compare November 20, 2026 06:32
@ImJeremyHe
ImJeremyHe force-pushed the espresso/e2e-invalid-attestation branch from 8c5c79f to 0d66640 Compare November 20, 2026 07:30

This branch has not been deployed

No deployments
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