cosmos / ibc-go

Inter-Blockchain Communication Protocol (IBC) implementation in Golang.
https://ibc.cosmos.network/
MIT License
548 stars 586 forks source link

Add GetTimestampAtHeight to client state interface #876

Closed colin-axner closed 2 years ago

colin-axner commented 2 years ago

Summary

The solo machine cannot currently process timeouts because it does not have a consensus state associated with the timeout height until after processing the timeout. Core IBC assumes a consensus state exists in state for the timeout height, but solo machines stores the consensus state in the client state.

We should add a function GetTimestampAtHeight to the client state function which returns the timestamp at a given consensus state height.

Splitting PR recommendation

PR 1

Add the GetTimetstampAtHeight to each client state + unit tests

PR 2

Modify connection keeper GetTimestampAtHeight to use the client state interface function. See if it is possible to write a test for solo machines to send a successful timeout msg

For Admin Use

crodriguezvega commented 2 years ago

I have asked today if it's possible to merge Colin's PR to move forward with PR1 of this issue.