[bisq-network/bisq] Hash of ProtectedStoragePayload is non-deterministic (leading to duplication of elements in P2PDataStorage) (#3367)

Justin Carter notifications at github.com
Wed Oct 9 09:30:01 UTC 2019


Ignore the idea above ^^^ It didn't work. But I have now commited code that makes the problem visible _in java_ https://github.com/bodymindarts/bisq/tree/bad-bytes-repro.
Build + run it in mainnet. Eventually you should see an output:
```
REPRO - BYTES OF LAST MESSAGE != BYTES OF THIS MESSAGE -> different serialization but same hash
```
Followed by some stringified objects (to compare the values). The output comes from [this](https://github.com/bodymindarts/bisq/blob/bad-bytes-repro/p2p/src/main/java/bisq/network/p2p/storage/P2PDataStorage.java#L397-L418) section of code. Though there is other code added to make this work (best to review the diff).

This proves that, while locally serialization may be deterministic, globally it is not indicating that different nodes must be coming up with different hashes in some cases.

Or is there another explanation?

-- 
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-539920008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191009/c945ad2b/attachment.html>


More information about the bisq-github mailing list