Skip to content

test(e2e): cover GMP packet timeout - #1326

Merged
gjermundgaraba merged 2 commits into
mainfrom
gjermund/fou-1103
Aug 12, 2026
Merged

test(e2e): cover GMP packet timeout#1326
gjermundgaraba merged 2 commits into
mainfrom
gjermund/fou-1103

Conversation

@gjermundgaraba

@gjermundgaraba gjermundgaraba commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds GMP timeout coverage that sends a short-lived call, advances destination time, waits for the relayer-reported timeout, verifies the matching TimeoutPacket event, and confirms the destination Counter remains unchanged.
  • Adds configurable GMP packet timeouts and reuses the shared receipt-based timeout verifier introduced earlier in the stack.
  • Renames the shared timeout constants and unchanged-counter assertion so they apply across Transfer, IFT, and GMP tests.

Testing

  • make check
  • make test-e2e E2E_MODE=complete

Stack created with GitHub Stacks CLIGive Feedback 💬

Closes FOU-1103

@linear-code

linear-code Bot commented Aug 10, 2026

Copy link
Copy Markdown

FOU-1103

@gjermundgaraba
gjermundgaraba force-pushed the gjermund/fou-1103 branch 2 times, most recently from c491f0a to 0f2898f Compare August 10, 2026 07:19
@gjermundgaraba
gjermundgaraba changed the base branch from gjermund/fou-1092 to gjermund/e2e-generated-event-parsers August 10, 2026 15:53
@gjermundgaraba
gjermundgaraba marked this pull request as ready for review August 10, 2026 16:00
@gjermundgaraba
gjermundgaraba requested a review from a team as a code owner August 10, 2026 16:00
@greptile-apps

greptile-apps Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds end-to-end GMP packet-timeout coverage and configurable GMP timeout durations, while generalizing shared timeout constants and unchanged-Counter verification.

  • Adds a controlled-mining GMP timeout scenario and records it in the E2E matrix.
  • Reuses receipt-based TimeoutPacket verification for GMP calls.
  • Renames timeout constants shared by Transfer, IFT, and GMP tests.

Confidence Score: 4/5

The PR should not merge until the GMP timeout test mines enough destination blocks for the advanced timestamp to become finalized and provable.

The new test restarts the relayer after mining only the first post-timeout block, while the configured one-block finality offset makes timeout processing inspect the preceding block whose timestamp has not expired.

Files Needing Attention: e2e/gmp_test.go

Important Files Changed

Filename Overview
e2e/gmp_test.go Adds the GMP timeout scenario, but does not mine the additional block required by the harness finality offset.
e2e/internal/e2etest/traffic_gmp.go Adds configurable packet lifetimes and correctly delegates GMP timeout receipt verification to the shared helper.
e2e/ift_test.go Renames shared timeout constants without changing behavior and provides the established extra-mining pattern for finalized timeout tests.
e2e/transfer_test.go Generalizes timeout constant names across packet types without changing their values.
e2e/test-matrix.md Documents the new controlled-mining GMP timeout coverage.

Sequence Diagram

sequenceDiagram
    participant Test
    participant Destination
    participant Relayer
    Test->>Relayer: Stop
    Test->>Destination: Send GMP packet (5s timeout)
    Test->>Destination: AdvanceTime(25s) and mine block N+1
    Test->>Relayer: Restart
    Relayer->>Destination: Check finalized height N
    Destination-->>Relayer: Timestamp still before timeout
    Relayer-->>Test: No TIMED_OUT state
    Test-->>Test: AwaitState fails
Loading

Reviews (1): Last reviewed commit: "test(e2e): cover GMP packet timeout" | Re-trigger Greptile

Comment thread e2e/gmp_test.go
Comment on lines +56 to +57
require.NoError(t, mining.AdvanceTime(ctx, packetTimeoutAdvance))
relayer = e2etest.StartRelayer(t, driver, env)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Timeout height remains unfinalized

When controlled mining advances time, AdvanceTime mines only the first post-timeout block, while the configured one-block finality offset makes the relayer inspect the preceding block. That block still predates the timeout, so the relayer cannot submit it and AwaitState fails to reach PACKET_STATE_TIMED_OUT.

Suggested change
require.NoError(t, mining.AdvanceTime(ctx, packetTimeoutAdvance))
relayer = e2etest.StartRelayer(t, driver, env)
require.NoError(t, mining.AdvanceTime(ctx, packetTimeoutAdvance))
require.NoError(t, mining.Mine(ctx, 1))
relayer = e2etest.StartRelayer(t, driver, env)

srdtrk
srdtrk previously approved these changes Aug 11, 2026

@srdtrk srdtrk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

srdtrk
srdtrk previously approved these changes Aug 11, 2026
@gjermundgaraba
gjermundgaraba dismissed srdtrk’s stale review August 11, 2026 19:58

The merge-base changed after approval.

Base automatically changed from gjermund/e2e-generated-event-parsers to main August 12, 2026 07:40
@gjermundgaraba
gjermundgaraba force-pushed the gjermund/fou-1103 branch 2 times, most recently from b5d7d9a to b4d324c Compare August 12, 2026 08:38
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
@gjermundgaraba
gjermundgaraba merged commit 980b8ca into main Aug 12, 2026
18 checks passed
@gjermundgaraba
gjermundgaraba deleted the gjermund/fou-1103 branch August 12, 2026 12:12
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