Consistent Hashing for Generating Protobuf Field Numbers

Tomasz Madejski
Rob Shakir


To convert a YANG-based model into a protobuf format, a unique field identification numbers needs to be assigned to each node in the YANG schema tree. Field identification numbers can be generated by calculating a numeric hash of characteristics of the YANG schema node; for example, its identifier or schema tree path. The resulting hash values provide backwards compatible field identification numbers suitable for protobuf field numbers.