[bisq-network/bisq] periodical UpdateDataReq for Seednodes (#3202)

Florian Reimair notifications at github.com
Wed Sep 4 17:11:49 UTC 2019


This PR introduces a recurring syncronization with other seed nodes if Bisq is run in seed node-mode. In detail, every seed node issues an UpdateDataRequest to the connected seed nodes once every hour, receives data such as it would during restart. By having the same effect as a restart but without having to wait 24h and being offline for some time, this PR deprecates https://github.com/bisq-network/bisq/tree/seednode_temporaryfix.

I did a lot of debugging and analyzing in order to get this thing up and running. First and foremost, I found that by counting the unique messages of all seed nodes together results in a higher number of messages than any seed node has on its own. In other words, no seed node has every message. Here is a graph with distinct snapshots: 
![Screenshot from 2019-09-04 18-51-24](https://user-images.githubusercontent.com/1070734/64275141-33303080-cf45-11e9-896a-47047c6f7a41.png)

Secondly, I monitored the proposed fix over periods of time to see how the number evolve. I only monitored Offer- and MailboxStoragePayloads, as the other messages are pretty much in sync (according to https://monitor.bisq.network/d/wTDl6T_iz/p2p-stats). The graphs below denote the number of messages on their y-axis, the time of measurement on the x-axis, the "got-" values reflect the number of messages received from a seed node during a periodical UpdateDataRequest, the "have-" values denote the number of messages we already have.
![Screenshot from 2019-08-30 10-05-09](https://user-images.githubusercontent.com/1070734/64275387-b8b3e080-cf45-11e9-9a3c-7ed668f8b055.png)
![Screenshot from 2019-08-30 10-05-22](https://user-images.githubusercontent.com/1070734/64275378-b6ea1d00-cf45-11e9-8299-ff0e567aecd8.png)
![Screenshot from 2019-08-30 10-05-29](https://user-images.githubusercontent.com/1070734/64275369-b3569600-cf45-11e9-87e3-70658faf6c36.png)

All in all, it seems that the recurring querying of other seed nodes might fill in the missing messages just fine. I even believe that we might get rid of at least some arbitration cases, where MailboxMessages simply did not arrive at the receiver. However, I suggest a slow adoption as we had our difficulties with these attempts in the past.




You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * UpdateDataReq is run periodically
  * Refactored logging into subroutine
  * Don't add data if it has been removed recently
  * Cleanup cache of recently removed messages
  * Only do recurring updatedatareq if seednode

-- File Changes --

    M common/src/main/java/bisq/common/app/Capabilities.java (4)
    M p2p/src/main/java/bisq/network/p2p/P2PService.java (9)
    M p2p/src/main/java/bisq/network/p2p/peers/getdata/RequestDataHandler.java (104)

-- Patch Links --

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


More information about the bisq-github mailing list