-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove timestamp
from ConsensusState
and query contract to retrieve it
#3957
Comments
The ConsensusState type does not know its |
Thank you for your comment, @misko9! Since |
Yes, that is correct, but we still have the |
Sorry, now I know what you mean. Yes, that was actually another change we wanted to make. It turns out that |
Hey @vuong177 I think you might want to have a look at this one as well. @womensrights thank you very much for pulling my eye over here. |
Closed by #4034 |
Surfaced from Interchain IBC team's review of 08-wasm at hash https://github.com/strangelove-ventures/ibc-go/commit/96e9930ab87a171a3ae6ac9717ee25bfda77212b
Summary
Remove
timestamp
fromConsensusState
.Problem Definition
The 08-wasm module is not completely a proxy client, since in the implementation of
GetTimestampAtHeight
function of theClientState
interface 08-wasm fetches the timestamp from the stored consensus state, instead of delegating to the light client contract the responsibility to provide that information.The
timestamp
should also already be encoded in thedata
field ofConsensusState
(and also in thedata
ofHeader
when updating the client). Having a separatetimestamp
field inConsensusState
opens the possibility that a relayer constructs aMsgCreateClient
with a consensus state where the timestamp does not match the timestamp encoded in thedata
field.Proposal
We would like light contracts to implement the
GetTimestampAtHeight
function of theClientState
interface, so that 08-wasm's implementation simply queries the contract to retrieve the timestamp, instead of retrieving it from the stored consensus state. The implementation ofGetTimestamp
function of theConsensusState
interface should return 0 (the function will be marked deprecated).This change impacts existing implementation of light contracts, since they will need to implement an extra query to return the timestamp for the consensus state at a particular height.
Tagging @misko9 @blasrodri to hear their thoughts, since this change impacts the contracts.
For Admin Use
The text was updated successfully, but these errors were encountered: