GenerateProtobufDefinition fails on interface
tharvik opened this issue · 1 comments
tharvik commented
I'm trying to find how onet.Roster
is serialized by protobuf. Sadly, when encountering an interface, such as kyber.Point
, it fails.
protobuf.GenerateProtobufDefinition(os.Stdout, []interface{}{
new(onet.Roster),
}, nil, nil)
It would be nice to support it, such as using the Any
prototype defined in proto3, or simply a reserved
with a comment.
jeffallen commented
In onet/network/encoding.go, there are a series of protobuf.RegisterInterface calls that set up protobuf to handle this correctly; at least for decoding.
But yes, I agree that GenerateProtobufDefinition doesn't do this right.