Skip to content

feat(link): relayer packets endpoint - #1396

Merged
dhfang merged 44 commits into
mainfrom
feat/relayer-packets-endpoint
Aug 24, 2026
Merged

dhfang merged 44 commits into
mainfrom
feat/relayer-packets-endpoint

Conversation

@dhfang

@dhfang dhfang commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor
  • Adds a Packets RPC listing packets the relayer knows about filterable by chain, client, state, source transaction, and sequence. Paginated.
  • Adds ibc relayer packets
  • Removes Status along with ibc relayer status

closes FOU-1218

@dhfang
dhfang requested a review from a team as a code owner August 20, 2026 03:11
@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR replaces the transaction-scoped Status RPC and CLI command with a filtered, cursor-paginated Packets endpoint.

  • Adds packet filters, page limits, opaque cursors, state projection, and CLI support including multi-page output.
  • Adds equivalent SQLite and PostgreSQL packet-listing queries plus a source-transaction index.
  • Updates the E2E harness to query packet listings when observing relay progress.

Confidence Score: 4/5

The sequence-filter narrowing should be fixed before merging because valid wire values can be silently applied as different database values; the E2E pagination gap is also worth correcting.

The new endpoint forwards an unrestricted uint64 sequence into a signed database parameter without validation, while the E2E compatibility helper does not preserve its all-statuses behavior for transactions spanning multiple pages.

Files Needing Attention: link/internal/store/store.go and e2e/internal/harness/ibclink/daemon.go

Important Files Changed

Filename Overview
link/internal/service/relayer/service.go Implements packet filter normalization, state expansion, bounded cursor pagination, and packet-status projection; sequence range validation is missing before persistence conversion.
link/internal/store/queries/relayer.sql Adds the shared SQLite/PostgreSQL filtered packet query with descending keyset pagination.
link/internal/store/store.go Adds packet-listing domain filters and paging helpers, but silently narrows the public uint64 sequence filter to int64.
link/internal/server/relayer_handler.go Converts optional wire filters into service filters and maps packet pages and invalid input to the Connect API.
proto/link/relayer.proto Replaces Status with the filtered, paginated Packets wire contract.
link/cmd/ibc/relayer.go Adds packet filter flags and supports either one-page output or cursor traversal with --all.
e2e/internal/harness/ibclink/daemon.go Migrates E2E status observation to Packets, but its transaction-status helper reads only the first bounded page.

Sequence Diagram

sequenceDiagram
  participant Client
  participant Handler as Packets RPC
  participant Service as Relayer Service
  participant Store as SQLite/Postgres
  Client->>Handler: Packets(filter, limit, cursor)
  Handler->>Service: Packets(PacketFilter, PacketQuery)
  Service->>Service: Validate filters and decode cursor
  Service->>Store: ListPackets(filters, before, limit+1)
  Store-->>Service: Rows ordered by id DESC
  Service-->>Handler: Packets, has_more, next_cursor
  Handler-->>Client: PacketsResponse
Loading

Reviews (1): Last reviewed commit: "trim comments across the packets endpoin..." | Re-trigger Greptile

Comment thread link/internal/store/store.go Resolved
Comment thread e2e/internal/harness/ibclink/daemon.go Resolved
@dhfang

dhfang commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

closes FOU-1218

@dhfang
dhfang force-pushed the feat/relayer-packets-endpoint branch from b44f23c to 7e51088 Compare August 20, 2026 03:24
@linear-code

linear-code Bot commented Aug 20, 2026

Copy link
Copy Markdown

FOU-1218

@gjermundgaraba gjermundgaraba left a comment

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.

Just a bunch of small stuff for the most part.

Comment thread link/internal/store/store_postgres.go Resolved
Comment thread e2e/internal/harness/ibclink/daemon.go Resolved
Comment thread link/cmd/ibc/relayer.go Resolved
Comment thread link/internal/store/queries/relayer.sql Resolved
@dhfang
dhfang requested a review from gjermundgaraba August 24, 2026 05:56
@gjermundgaraba
gjermundgaraba force-pushed the feat/relayer-packets-endpoint branch from 394727b to 6174914 Compare August 24, 2026 15:50
dhfang added 19 commits August 24, 2026 09:38
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
dhfang and others added 25 commits August 24, 2026 09:38
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
@dhfang
dhfang force-pushed the feat/relayer-packets-endpoint branch from 6174914 to de4b19c Compare August 24, 2026 16:38
@dhfang
dhfang merged commit 10a23c2 into main Aug 24, 2026
25 of 26 checks passed
@dhfang
dhfang deleted the feat/relayer-packets-endpoint branch August 24, 2026 17:19
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