[bisq-network/bisq] Change data response behaviour (#4642)

chimp1984 notifications at github.com
Wed Oct 14 01:42:43 UTC 2020


Add DateSortedTruncatablePayload interface for TradeStatistics2

We check first if we need to truncate dateSortedTruncatablePayloads, if so we have sorted by date and truncate in the way that we receive the most recent data. We define the maxItems in the class implementing the interface (3000 for trade stats).
Later we apply the maxEntries check the combined list and if we need to truncate here as well (10 000) we have added the dateSortedTruncatablePayloads at the end so those will get truncated with higher prio.

This code change is only relevant for seed nodes (data response). It needs to get into 1.4.0.
Old nodes send hashes for trade stats which are different to the new ones, so the seed would send all 10k trade stat objects and other important data like account age witness might get dropped as we hit the 10 000 item limit. 
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Change data response behaviour

-- File Changes --

    M core/src/main/java/bisq/core/trade/statistics/TradeStatistics3.java (13)
    M p2p/src/main/java/bisq/network/p2p/storage/P2PDataStorage.java (56)
    A p2p/src/main/java/bisq/network/p2p/storage/payload/DateSortedTruncatablePayload.java (31)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/4642.patch
https://github.com/bisq-network/bisq/pull/4642.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/4642
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201013/ea5180cf/attachment.html>


More information about the bisq-github mailing list