Closed cthulhu-rider closed 4 months ago
What if container's hash is all zeros? It a caller is a liar (and that is not a 32 zeros hash), it is easy to check.
we see zeros - we dont hash the container at all. That's the difference
But do we really need to specify it for the fields that are commented as "hash"?
for hash - mb not. But i prefer to explicitly state such cases. For example, although zeros are not a particularly valid hash, the protocol may dictate a special interpretation of them. And so we emphasize that it does not exist
@roman-khimov, I have checked UUID generators we used and it is impossible to get zero ID. At the same time, I do not understand what prevents getting zero sha256.
The probability of getting it is rather low. Hash collision between two containers (or objects) is more probable than that and if it happens -- we're toast.
i propose to reserve zero IDs and prohibit them from being message fields. While this is a breaking change in theory, in practice nothing will break. At the same time, application development will benefit