Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

update types.proto to match tendermint 0.15.0, and regenerate sources. #33

Closed
wants to merge 1 commit into from

Conversation

longzhi
Copy link

@longzhi longzhi commented Jan 11, 2018

No description provided.

Copy link
Member

@srmo srmo left a comment

Choose a reason for hiding this comment

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

First: thanks for this!
Second: why did you ommit all those gogo changes in the ABCI protobuf? Aren't they required?
See https://github.com/tendermint/abci/blob/5d5ea6869b91cadb55dbc4211ad7b326f053a33e/types/types.proto#L198 for example

package com.github.jtendermint.jabci;

public enum CodeType
implements com.google.protobuf.ProtocolMessageEnum {
Copy link
Member

Choose a reason for hiding this comment

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

Why implementing the protobuf enum?

This was referenced Jan 11, 2018
@srmo srmo requested a review from wolfposd January 11, 2018 12:04
Copy link
Member

@srmo srmo left a comment

Choose a reason for hiding this comment

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

Glad to see this. As mentioned, I'm a bit concerned with the lack of gogoproto magic that was introduced in abci/types.proto. See https://github.com/tendermint/abci/blob/5d5ea6869b91cadb55dbc4211ad7b326f053a33e/types/types.proto#L198

Can we clarify what it means to not use those supplementary types?

@@ -0,0 +1,372 @@
package com.github.jtendermint.jabci;

public enum CodeType
Copy link
Member

Choose a reason for hiding this comment

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

Another idea could be to just use a class with constants instead of enum. So we can get rid of all the protobuf things here. In the end, abci/tendermint just expects an INT as code.

Copy link
Author

Choose a reason for hiding this comment

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

You are right. We can declare a class, rather than using the enum generated by protobuf, which is removed from types.proto now.

@longzhi
Copy link
Author

longzhi commented Jan 12, 2018

I find it is difficult to port gogoproto to non go languages, so I removed that. It seems no any side effects.

@srmo
Copy link
Member

srmo commented Jan 13, 2018

@longzhi yeah, understood.
Edit: I had the same trouble and did some workaround magin in the tm13 branch, but it turned out that I had no idea why it was working, so I'm hesitant to merge the tm13 branch.

Let's see what happens. We've opened tendermint/abci#179 to adress those concerns. Have you tried the port on any non-trivial cases?

@srmo
Copy link
Member

srmo commented Jan 16, 2018

@longzhi I started over after a discussion in tendermint/abci#179
The discussion offered a few links that gave more insight on what is going on which allowed be to rather cleanly generate the full proto and gogoproto files.

I would like to close this PR here in favor of #35 - are you OK with that?

It would be amazing if you could somehow also test the new branch (tm-15) before we merge.

@wolfposd
Copy link
Contributor

0.15 released

@wolfposd wolfposd closed this Jan 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants