Add message and rpc handler to recover clients using v1 governance proposals #3672
Closed
6 tasks done
Labels
02-client
change: api breaking
Issues or PRs that break Go API (need to be release in a new major version)
Milestone
Part of #1282.
Overview of changes:
Protobuf
MsgService
. Something like this:where
MsgRecoverClient
could look like this:and
MsgRecoverClientResponse
can be empty:02-client
RecoverClient
to 02-client keeper with logic to recover client. The signature of the function could look like this:Add implementation of
RecoverClient
, which could be similar toClientUpdateProposal
's implementation.Implement
sdk.Msg
interface forMsgRecoverClient
.If it's possible to re-use the error code for
ErrInvalidUpdateClientProposal
, then rename the error to, for example,ErrInvalidRecoveryClient
and adjust the error description toinvalid recovery client
.Core
RecoverClient
rpc handler in IBC coremsg_server.go
(modules/core/keeper/msg_server.go
). The signature of the handler could look like this:and the implementation could look like this:
&MsgRecoverClient{}
as input toRegisterImplementations
.CLI
NewCmdSubmitClientRecoverProposal
) in 02-client with flagrecover-client
and parameterssubject-client-id
andsubstitute-client-id
to construct aMsgRecoverClient
and include it in aMsgSubmitProposal
. Use v1beta1 legacyNewCmdSubmitUpdateClientProposal
command and SDK'sNewCmdSubmitUpgradeProposal
as examples.Documentation
Break up the implementation in multiple PRs. One possible suggestion:
The text was updated successfully, but these errors were encountered: