-
Notifications
You must be signed in to change notification settings - Fork 580
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
update godoc for VerifyClientMessage #1281
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just couple of nits. :)
Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a side note, should we re-order the interface definitions on ClientState
so that these 4 new functions read in order of expected execution.
E.g.
VerifyClientMessage
CheckForMisbehaviour
UpdateStateOnMisbehaviour
UpdateState
Yup great idea! |
modules/core/exported/client.go
Outdated
// UpdateState updates and stores as necessary any associated information for an IBC client, such as the ClientState and corresponding ConsensusState. | ||
// An error is returned if ClientMessage is of type Misbehaviour | ||
// An error is returned if ClientMessage is of type Misbehaviour. It assumes the ClientMessage has already been verified. | ||
UpdateState(sdk.Context, codec.BinaryCodec, sdk.KVStore, ClientMessage) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry if we've discussed this point already. Why can't CheckForMisbehaviour be in UpdateState
?
Is it to make the check explicit for light client developers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it to make the check explicit for light client developers?
It's two fold:
- make the check explicit to light client developers
- not doing it would require the API to return that misbehaviour has been detected and the client frozen (since we emit different events)
…to colin/1185-update-godoc
* update godoc * Update modules/core/exported/client.go Co-authored-by: Carlos Rodriguez <carlos@interchain.io> * update UpdateState godoc * reorganize interface functions logically Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
Description
closes: #1185
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes