[bisq-network/bisq] Fix tradestat hash issue (#3529)

chimp1984 notifications at github.com
Thu Oct 31 04:20:50 UTC 2019


We used the hash from the protobuf file of the trade statistics and that can be a hash which was created with an older version where we used a different hash method (extra map included). This causes that the excludedKeys at GetDataRequest are not matching the seed nodes keys so our deltat handling fails which results in too much data transmitted (7 MB instead of 3MB). To fix that we force the tradestat to update its hash by passing a null to the constructor which causes a call of the new hash method. Further we need to add a new capability so that seed nodes only deliver trade stat objects in case the node has updated.
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/3529

-- Commit Summary --

  * Recreate hash from protobuf data
  * Add filter.toString method and log filter in case of wrong signature
  * Change log level, add log
  * Refactor: Move code to dump method
  * Add TRADE_STATISTICS_HASH_UPDATE capability
  * Add logs for size of data exchange messages
  * Add more data in log
  * Improve logs
  * Fix wrong msg in log, cahnge log level
  * Add check for depositTxId not empty
  * Remove check for duplicates
  * Add logs

-- File Changes --

    M common/src/main/java/bisq/common/app/Capability.java (4)
    M core/src/main/java/bisq/core/filter/Filter.java (22)
    M core/src/main/java/bisq/core/filter/FilterManager.java (2)
    M core/src/main/java/bisq/core/trade/statistics/TradeStatistics2.java (12)
    M core/src/main/java/bisq/core/trade/statistics/TradeStatistics2StorageService.java (15)
    M core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java (57)
    M p2p/src/main/java/bisq/network/p2p/network/Connection.java (8)
    M p2p/src/main/java/bisq/network/p2p/peers/PeerManager.java (3)
    M p2p/src/main/java/bisq/network/p2p/peers/getdata/GetDataRequestHandler.java (10)
    M p2p/src/main/java/bisq/network/p2p/peers/getdata/RequestDataHandler.java (10)
    M p2p/src/main/java/bisq/network/p2p/peers/getdata/messages/GetDataResponse.java (9)
    M p2p/src/main/java/bisq/network/p2p/peers/getdata/messages/GetUpdatedDataRequest.java (11)
    M p2p/src/main/java/bisq/network/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java (9)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/3529.patch
https://github.com/bisq-network/bisq/pull/3529.diff

-- 
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/pull/3529
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191030/419dbd9a/attachment.html>


More information about the bisq-github mailing list