Skip to content

test(e2e): cover attested client misbehaviour freeze - #1323

Merged
gjermundgaraba merged 4 commits into
mainfrom
gjermund/fou-1079
Aug 12, 2026
Merged

gjermundgaraba merged 4 commits into
mainfrom
gjermund/fou-1079

Conversation

@gjermundgaraba

@gjermundgaraba gjermundgaraba commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add a portable E2E scenario for a conflicting same-height attested client update
  • submit a signed different-timestamp update through ICS26Router
  • verify the destination client freezes without changing its trusted height or timestamp
  • verify a subsequent IFT remains stably pending, has no receive transaction, and mints nothing
  • add the bounded signer transaction helper and update the generated E2E matrix

Why

FOU-1079 requires end-to-end coverage proving that attestor equivocation freezes the destination client and prevents subsequent packet delivery without corrupting trusted state.

Depends on #1332 for the production attestation types and codecs used to construct the conflicting proof.

Validation

  • make test-harness
  • make test-e2e
  • focused TestAttestedClient_MisbehaviourFreeze runs on Anvil and Besu
  • go test ./... -run "^$" in e2e

Closes FOU-1079

@linear-code

linear-code Bot commented Aug 10, 2026

Copy link
Copy Markdown

FOU-1079

@gjermundgaraba
gjermundgaraba marked this pull request as ready for review August 10, 2026 06:48
@gjermundgaraba
gjermundgaraba requested a review from a team as a code owner August 10, 2026 06:48
@greptile-apps

greptile-apps Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds portable end-to-end coverage for freezing an attested client after a conflicting same-height update.

  • Constructs and signs a conflicting state attestation using the production codecs.
  • Submits the update through ICS26Router and verifies trusted state remains unchanged after freezing.
  • Confirms a subsequent IFT remains pending without a receive transaction or destination mint.
  • Adds a bounded signer transaction helper and updates the generated E2E matrix.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
e2e/attestation_helpers_test.go Adds helpers for reading consensus timestamps and encoding a signed state-attestation proof with production codecs.
e2e/ift_test.go Adds the misbehaviour-freeze E2E scenario and assertions covering frozen state, retained trusted state, and blocked packet delivery.
e2e/internal/e2etest/traffic_signers.go Adds a zero-value transaction helper that delegates signing, submission, receipt waiting, and failure reporting to the EVM harness.
e2e/test-matrix.md Records the new portable test in the generated fast, complete, and production E2E matrices.

Sequence Diagram

sequenceDiagram
    participant Test as E2E Test
    participant Source as Source Chain
    participant Relayer
    participant Router as Destination ICS26Router
    participant Client as Attested Client

    Test->>Source: Send initial IFT
    Relayer->>Router: Relay valid update and packet
    Router->>Client: Install trusted consensus state
    Client-->>Router: Updated height and timestamp
    Test->>Router: Submit signed same-height conflicting update
    Router->>Client: updateClient(conflicting proof)
    Client-->>Router: Freeze without replacing trusted state
    Test->>Source: Send subsequent IFT
    Relayer->>Router: Attempt relay
    Router->>Client: Verify against frozen client
    Client-->>Router: Delivery blocked
    Test->>Relayer: Verify packet remains pending
    Test->>Test: Verify no receive transaction or mint
Loading

Reviews (2): Last reviewed commit: "test(e2e): use simplified proof encoder" | Re-trigger Greptile

@gjermundgaraba
gjermundgaraba marked this pull request as draft August 10, 2026 06:50
@gjermundgaraba
gjermundgaraba changed the base branch from development to gjermund/fou-1079-attestation-codecs August 10, 2026 12:18
@gjermundgaraba
gjermundgaraba force-pushed the gjermund/fou-1079 branch 2 times, most recently from ccc044d to 8b2c2a5 Compare August 10, 2026 12:21
@gjermundgaraba
gjermundgaraba marked this pull request as ready for review August 10, 2026 16:06
dhfang
dhfang previously approved these changes Aug 12, 2026
dianab-cl
dianab-cl previously approved these changes Aug 12, 2026
@gjermundgaraba
gjermundgaraba dismissed stale reviews from dianab-cl and dhfang via a24a39e August 12, 2026 12:15
Base automatically changed from gjermund/fou-1079-attestation-codecs to main August 12, 2026 12:24
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
@gjermundgaraba
gjermundgaraba merged commit 0118c66 into main Aug 12, 2026
18 checks passed
@gjermundgaraba
gjermundgaraba deleted the gjermund/fou-1079 branch August 12, 2026 13:02
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