8

The memory pool holds unconfirmed transactions in RAM. It seems that memory pool storage could overflow if no block is solved for a very long time and many transactions are published within a short interval.

In browsing the source code, I found no mention of a cap on the memory pool size:

https://github.com/bitcoin/bitcoin/blob/v0.10.1/src/main.cpp#L934

Does such a cap exist? If not, couldn't an attacker use the unbounded size of the memory pool to overflow the RAM of a large number of nodes, knocking them offline?

I noticed two proposals that seemed to address this issue, but neither has made it through the approval process:

6

There is no cap on the maximum size of the mempool, nor a janitor which cleans up transactions which are not confirming. Loss of unconfirmed transactions isn't a problem as wallets are supposed to rebroadcast transactions if they don't confirm within a reasonable time frame, so it wouldn't be unreasonable to drop them in a critical low memory situation. The limit on free transaction relay is there partly to prevent this from being an issue, it would be fairly expensive to pack the mempool with junk from a fee standpoint.

  • 3
    I think the OPs concern is that an attacker could cause memory overflows just by broadcasting many many transactions. – morsecoder Apr 29 '15 at 10:21
  • @StephenM347, you got it. I'll update the question. – Rich Apodaca Apr 29 '15 at 22:17

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.