feat(transfer): show client status and trusted height on render page#54
Open
tbruyelle wants to merge 1 commit into
Open
feat(transfer): show client status and trusted height on render page#54tbruyelle wants to merge 1 commit into
tbruyelle wants to merge 1 commit into
Conversation
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.
bc8217c to
f176749
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Transfer section of the transfer app's render page listed each client by ID only:
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:A non-active client (Expired/Frozen) can't send packets, so it's still listed with its status and height but without a
send vialink.How
core/client.gno: two read-only accessors, since the transfer realm can't reach core's privateclientstruct:ClientLatestHeight(clientID) string— latest trusted height as<revision>/<height>(or""if unknown).ClientStatus(clientID) string—Active/Expired/Frozen/ … (or""if unknown).transfer/render.gno:renderTransferLinks()shows<status>, trusted height <h>per client, and only renders theTransfertxlink when the status islightclient.Active.Note: returning the
lightclient.Interfacedirectly 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
z0bb_render_home_with_client_filetest.gnogolden output (now showsActive).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 nosend vialink.go tool gno test ./gno.land/r/aib/ibc/core/ ./gno.land/r/aib/ibc/apps/transfer/— both pass.