1

I notice that mempool messages result in multiple tx messages, usually completely out of order.

What I generally do is re-queue the message until the parent is processed, however that doesn't seem to be the right approach. If the parent can't be verified, shouldn't it be discarded immediately?

In a hostile scenario I could receive an unsolicited tx that relies on an unseen parent. What are the best practices here? Just wait up until N seconds and then discard?

  • If you are attempting to replicate Bitcoin Core behavior, look into how the orphan pool operates. – Anonymous Jul 11 '15 at 3:46
  • This thread seems to illuminate the issue, github.com/bitcoin/bitcoin/issues/3566 It still seems odd that a high percentage of transactions on a mempool sync would go into the orphan map first instead of being ordered by the relaying node. – Matt Jul 11 '15 at 4:20
0

If the parent can't be verified, shouldn't it be discarded immediately?

Then you risk needing to redownload that transaction.

What are the best practices here? Just wait up until N seconds and then discard?

I think what bitcoin does, adding it to a size-limited cache, works well in practice. You just have to make sure that when you receive the parent you broadcast invs for both the parent and the child (assuming the child is still in the size-limited cache).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.