Skip to content

feat(transfer): show client status and trusted height on render page#54

Open
tbruyelle wants to merge 1 commit into
masterfrom
feat/transfer-render-client-height
Open

feat(transfer): show client status and trusted height on render page#54
tbruyelle wants to merge 1 commit into
masterfrom
feat/transfer-render-client-height

Conversation

@tbruyelle

@tbruyelle tbruyelle commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

What

The Transfer section of the transfer app's render page listed each client by ID only:

- send via `07-tendermint-1` (client details)
- send via `07-tendermint-2` (client details)

When several clients track the same chain, there was no way to tell at a glance which one is up-to-date — or even usable. This adds the client's status and latest trusted height to each row, and drops the send link for clients that aren't Active:

- send via `07-tendermint-1` — Active, trusted height `2/2` (client details)
- `07-tendermint-2` — Expired, trusted height `2/2` (client details)

A non-active client (Expired/Frozen) can't send packets, so it's still listed with its status and height but without a send via link.

How

  • core/client.gno: two read-only accessors, since the transfer realm can't reach core's private client struct:
    • ClientLatestHeight(clientID) string — latest trusted height as <revision>/<height> (or "" if unknown).
    • ClientStatus(clientID) stringActive / Expired / Frozen / … (or "" if unknown).
  • transfer/render.gno: renderTransferLinks() shows <status>, trusted height <h> per client, and only renders the Transfer txlink when the status is lightclient.Active.

Note: returning the lightclient.Interface directly was considered but rejected — it exposes mutating methods (UpdateState, Initialize, RecoverClient, …) that would let any caller bypass core's relayer-gated client lifecycle. The string accessors keep the boundary read-only.

Test

  • Updated z0bb_render_home_with_client_filetest.gno golden output (now shows Active).
  • Added z0bbb_render_home_expired_client_filetest.gno: creates a client, advances block time past the trusting period to expire it, and asserts the row has no send via link.
  • go tool gno test ./gno.land/r/aib/ibc/core/ ./gno.land/r/aib/ibc/apps/transfer/ — both pass.

The Transfer section listed each client by ID only, making it hard to
tell which client is up-to-date or usable when several track the same
chain. Add read-only core.ClientLatestHeight and core.ClientStatus
accessors and surface both next to each client. Non-active clients
(Expired, Frozen) are still listed but without a "send via" link, since
packets can't be sent through them.
@tbruyelle tbruyelle force-pushed the feat/transfer-render-client-height branch from bc8217c to f176749 Compare June 10, 2026 16:42
@tbruyelle tbruyelle changed the title feat(transfer): show client latest trusted height on render page feat(transfer): show client status and trusted height on render page Jun 10, 2026
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.

1 participant