Switch to new release of go protocol buffers and proto and rpc service compiler #1362
Labels
beginner
Issues suitable for new developers
enhancement
Improvements to existing features / behaviour
gRPC
P3
might get fixed, nice to have
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.
The text was updated successfully, but these errors were encountered: