Closed fehlmach closed 5 years ago
We have to define an order on the types (I suggest their code number
Yes.
and for each type how the objects of this type are sorted.
Hm. By "lexical order" of the serialized byte string (considered in network byte order); i.e. for v6 addresses :: < 1:: < 1::1 < 1::1:0 < 2:: and so on.
That would mean, we encode an object in cbor and then compare the resulting cbor byte strings, right? So we must make sure, that it is clear for each object, how to serialize it in cbor. Which is the case, I think.
Yep. We need to do this for signing anyway, so we might as well do it for sorting too.
Assertions must be sorted deterministically for signature validation in shards. So far the draft only sorts assertions by their name, But there might be assertions for different types and even several assertions per type. We have to define an order on the types (I suggest their code number) and for each type how the objects of this type are sorted.