My reading of what the BIP says is that the fields that are serialized, are serialized in numerical order. Not that all fields including optional fields must be redundantly written to the wire.
This is the part that is not clear for me,
My reading is that
all fields should be serialized. Even if they are not included in the wire.
This is the part that is unclear, and I think each implementation have its own interpretation. (which depends on the default behavior of their protobuf implementation)
As I said, there is no wrong implementation of protobuf, we just need to know what I need to sign : the data from the wire ? or all data (omited fields from the wire included) ?
To my understanding we need to sign
all fields, and not just what is received or sent to the wire.