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

Switch to new release of go protocol buffers and proto and rpc service compiler #1362

Closed
baryluk opened this issue Jun 11, 2018 · 0 comments
Closed
Labels
beginner Issues suitable for new developers enhancement Improvements to existing features / behaviour gRPC P3 might get fixed, nice to have

Comments

@baryluk
Copy link

baryluk commented Jun 11, 2018

Background

https://groups.google.com/forum/#!topic/golang-nuts/F5xFHTfwRnY

Already released.

golang/protobuf#591
https://github.com/golang/protobuf/releases/tag/v1.1.0

It is faster, and has a better forward compatibility, by forcing people to use named literals, and do not assume order of fields in the message. Plus some other nice tweaks. I do not know what is the impact on memory usage (asked on golang-nuts mailing list, maybe they know). Binary size should increase slightly, but maybe just few KB from what I can see in generated code.

Found this out when I "accidentally" regenerated LND RPC protos with newer compiler and Go plugin.

protoc-gen-grpc-gateway protoc-gen-swagger also do generated slightly different code. Only minor differences, some just cosmetic.

There is probably no need to change any of lnd code itself.

./docs/go-fuzz/wirefuzz.go might require a change from reflect.DeepEqual to proto.Equal.

egrep -A 1 -r '&?\blnrpc\.[a-zA-Z_0-9]+{([^}]+| *$)' . show that all protobuf messages are used as literals with named fields.

I did not try compiling with new version, as I encountered other issues.

@Roasbeef Roasbeef added enhancement Improvements to existing features / behaviour gRPC beginner Issues suitable for new developers labels Jun 12, 2018
@Roasbeef Roasbeef added the P3 might get fixed, nice to have label Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner Issues suitable for new developers enhancement Improvements to existing features / behaviour gRPC P3 might get fixed, nice to have
Projects
None yet
Development

No branches or pull requests

2 participants