• Jason Yellick's avatar
    FAB-10292 Update protobuf to v1.1.0 · 03104e71
    Jason Yellick authored
    Protobuf was slated to be updated already, but there is a long list of
    incompatibilities with the current source tree.
    Thi CR updates protobuf to v1.1.0, and addresses those
    incompatibilities.  Most of the changes are quite rote and fall into one
    of three buckets.
    1. Code which uses non-keyed field initialization.  (ie, initializing a
    struct like MyStruct{value1, value2, value3}).  The newer generated
    protos produces structs which have additional non-field members.
    Structs should always be initialized with named fields, regardless of
    whether they are protos or not.
    2. Code which assumes that reflect.DeepEqual between two protos with the
    same fields will return true.  This has never been the case, especially
    when considering protos with slice or map fields, but with proto v1.1.0
    with the addition of caching and other members to the proto structs, it
    is even less true.  The correct call is proto.Equal.
    3. Code which assumes that proto fails on bad inputs -- the proto spec
    has always stated that failure _may_ occur, not that it must.  Certain
    code would attempt to determine proto message type based on failure to
    unmarshal, which was unsafe in v1.0.0, but is even more likely to cause
    problems in v1.1.0.
    4. On average, half of gossip identity digests aren't valid UTF8 strings,
       and proto v1.1.0 now enforces UTF8 validity checks for string fields.
       Therefore, the field was converted to bytes.
    Change-Id: I74cc037903137705dbe3f4e27e34d1307596db3b
    Signed-off-by: default avatarJason Yellick <jyellick@us.ibm.com>
    Signed-off-by: default avataryacovm <yacovm@il.ibm.com>