Skip to content
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

Make 02-client messages modular #7155

Closed
4 tasks
colin-axner opened this issue Aug 25, 2020 · 0 comments · Fixed by #7160
Closed
4 tasks

Make 02-client messages modular #7155

colin-axner opened this issue Aug 25, 2020 · 0 comments · Fixed by #7160
Assignees
Labels
S:proposed T: Dev UX UX for SDK developers (i.e. how to call our code) Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.

Comments

@colin-axner
Copy link
Contributor

Summary

Reduce 02-client messages into a singular concrete implementation so every client doesn't need to reproduce code.

Problem Definition

While implementing solo machine I basically copy pasted the tendermint client messages. I think all clients would end up doing the same since there isn't much flexibility needed in creating clients, updating clients, and submitting misbehaviour.

Proposal

Move MsgCreateClient, MsgUpdateClient and MsgSubmitMisbehaviour to 02-client types with the following definitions:

message MsgCreateClient {
  string client_id = 1;
  google.protobuf.Any client_state = 2;
  google.protobuf.Any consensus_state = 3;
  bytes signer = 4;
}

message MsgUpdateClient {
  string client_id = 1;
  google.protobuf.Any header = 2;
  bytes signer = 3;
}

message MsgSubmitMisbehaviour {
  string client_id = 1;
  google.protobuf.Any misbehaviour = 2;
  bytes signer = 3;

This will reduce redundant code. The only downside I see is storing the client state and consensus state in MsgCreateClient since their might be some overlap.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@colin-axner colin-axner added S:proposed x/ibc Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. T: Dev UX UX for SDK developers (i.e. how to call our code) labels Aug 25, 2020
@fedekunze fedekunze added this to the IBC 1.0 milestone Aug 25, 2020
@fedekunze fedekunze self-assigned this Aug 25, 2020
@mergify mergify bot closed this as completed in #7160 Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S:proposed T: Dev UX UX for SDK developers (i.e. how to call our code) Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants