[bisq-network/bisq] Hash of ProtectedStoragePayload is non-deterministic (#3367)

Justin Carter notifications at github.com
Thu Oct 10 19:15:37 UTC 2019


An important detail of the pb library is that internally it is using `LinkedHashMap` when [deserializing](https://github.com/protocolbuffers/protobuf/blob/f9d8138376765d229a32635c9209061e4e4aed8c/java/core/src/main/java/com/google/protobuf/MapField.java#L171) a map field.

This means it preserves the initial order of the keys in the map across multiple de-serialization -> re-serialization passes thus enabling the hashes created in Bisq to be stable across nodes. If this implementation detail would ever change hashes computed on different nodes may no longer line up.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/issues/3367#issuecomment-540737111
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191010/255c3844/attachment.html>


More information about the bisq-github mailing list