openbazaar-go icon indicating copy to clipboard operation
openbazaar-go copied to clipboard

Offline messages which disappear from the network are retried forever

Open placer14 opened this issue 5 years ago • 1 comments

It seems that if an offline message falls into the retry path (within (m *MessageRetriever) processQueuedMessages()) that they retry forever in the case that the message disappears from the network for whatever reason. We should probably improve this code so that after a period of retrying (45 days or maybe however long the default dispute timeout is) that we eventually stop asking the network for these messages.

This could present a sort of processing DoS attack vector for buyers unwittingly buying from a malicious node.

placer14 avatar Oct 15 '19 15:10 placer14

Some additional thoughts: we only care about these offline order messages for as long as someone might be using the order. The longest use cases of the order remaining active are:

  • a fulfilled order which has not been completed by the buyer which resolves approx 45 days (in blocktime) after payment in favor of the vendor automatically (for BTC, BCH, and LTC)
  • a disputed order which has not bee resolved by a moderator for the maximum dispute time 45 days (in realtime, I think, but not positive about that?) after the dispute was started
  • ZEC doesn't have a blocktime-release redemption option so these orders may be active indefinitely

My suggestion for 45 days is arbitrary. The objective there is we don't want to keep asking about offline messages if they were created X number of days ago because they'd probably be for an old order. The question is what is a good X that doesn't preclude order messages from getting lost if they belong to an order that happens to be running very, very long. My best guess at a number was 45 days at the time that I wrote the description.

placer14 avatar Oct 18 '19 15:10 placer14