Skip to content

proto: add proto files for ibc unblock#4853

Merged
mergify[bot] merged 15 commits intomasterfrom
marko/add_proto
May 25, 2020
Merged

proto: add proto files for ibc unblock#4853
mergify[bot] merged 15 commits intomasterfrom
marko/add_proto

Conversation

@tac0turtle
Copy link
Contributor

Description

these proto files are meant to help unblock ibc in their quest of migrating the ibc module to proto.

Closes: #XXX

@auto-comment
Copy link

auto-comment bot commented May 18, 2020

👋 Thanks for creating a PR!

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.

  • Wrote tests
  • Updated CHANGELOG_PENDING.md
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments
  • Re-reviewed Files changed in the Github PR explorer
  • Applied Appropriate Labels

Thank you for your contribution to Tendermint! 🚀

@tac0turtle tac0turtle self-assigned this May 18, 2020
@tac0turtle tac0turtle added R:minor Release: Minor T:encoding Type: Amino, ProtoBuf labels May 18, 2020
@tac0turtle
Copy link
Contributor Author

@fedekunze @cwgoes does this look good for what is needed? I added all the types which are used in the light clients

@tac0turtle tac0turtle marked this pull request as ready for review May 19, 2020 09:31
@tac0turtle tac0turtle requested review from melekes and tessr as code owners May 19, 2020 09:31
@codecov-commenter
Copy link

codecov-commenter commented May 19, 2020

Codecov Report

Merging #4853 into master will decrease coverage by 0.50%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4853      +/-   ##
==========================================
- Coverage   63.56%   63.06%   -0.51%     
==========================================
  Files         225      176      -49     
  Lines       21135    16018    -5117     
==========================================
- Hits        13435    10101    -3334     
+ Misses       6607     5091    -1516     
+ Partials     1093      826     -267     
Impacted Files Coverage Δ
libs/bits/bit_array.go 81.14% <100.00%> (ø)
blockchain/v0/pool.go 78.66% <0.00%> (-0.32%) ⬇️
node/id.go 0.00% <0.00%> (ø)
p2p/conn_set.go
consensus/ticker.go
crypto/secp256k1/secp256k1.go
p2p/codec.go
privval/retry_signer_client.go
consensus/codec.go
crypto/merkle/simple_proof.go
... and 58 more

Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general. Thanks Marko. The only type missing is tmmath.Fraction. Can you add that too? 🙏

@tac0turtle
Copy link
Contributor Author

The only type missing is tmmath.Fraction

I believe you will have to add this in the sdk. We do not encode tmmath.Fraction and I would want to avoid having prototypes for things that we do not encode.

Copy link
Contributor

@erikgrinaker erikgrinaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tac0turtle
Copy link
Contributor Author

found some bugs in this PR while thinking about proto yesterday. Writing some tests that help fix them

@fedekunze
Copy link
Contributor

found some bugs in this PR while thinking

😲


// ToProto converts SignedHeader to protobuf
func (sh *SignedHeader) ToProto() *tmproto.SignedHeader {
if sh == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that even possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in usage, it may not be possible but while testing it was an issue so I decided to include it

}

psh := new(tmproto.SignedHeader)
if sh.Header != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not possible imho (if Tendermint works correctly)

Copy link
Contributor Author

@tac0turtle tac0turtle May 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think having the case may be good. It may not be possible but to test this func and get the correct output I do need to check this

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@tac0turtle tac0turtle added the S:automerge Automatically merge PR when requirements pass label May 25, 2020
@mergify mergify bot merged commit e03b61a into master May 25, 2020
@mergify mergify bot deleted the marko/add_proto branch May 25, 2020 15:52
@fedekunze
Copy link
Contributor

fedekunze commented May 25, 2020

thanks @marbar3778! Will this PR be included in the next release?

@tac0turtle
Copy link
Contributor Author

yes it will be. We will be working on creating a release in the coming days

@tessr tessr removed the R:minor Release: Minor label May 27, 2020
tac0turtle added a commit that referenced this pull request May 27, 2020
these proto files are meant to help unblock ibc in their quest of migrating the ibc module to proto.

Closes: #XXX
tac0turtle added a commit that referenced this pull request May 27, 2020
these proto files are meant to help unblock ibc in their quest of migrating the ibc module to proto.

Closes: #XXX
tac0turtle added a commit that referenced this pull request May 27, 2020
these proto files are meant to help unblock ibc in their quest of migrating the ibc module to proto.
tessr pushed a commit that referenced this pull request May 28, 2020
these proto files are meant to help unblock ibc in their quest of migrating the ibc module to proto.
@egonspace
Copy link

This PR is already done, but I have a question. ToProto() and FromProto() functions that convert between tmproto.state and state/State will be implemented later? I can't see them in this PR.

@tac0turtle
Copy link
Contributor Author

yes they have been added. you can find them here:

func (state *State) ToProto() (*tmstate.State, error) {

@egonspace
Copy link

yes they have been added. you can find them here:

func (state *State) ToProto() (*tmstate.State, error) {

Oh, thank you. That's right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S:automerge Automatically merge PR when requirements pass T:encoding Type: Amino, ProtoBuf

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants