I am wondering what would happen to ethereum's mempool if it was bombarded with tons and tons of invalid transactions. Not even reverting transactions, because they cost gas, but against completely invalid ones that just clutter the mempool. Could one run a DoS or eclipse attack using this technique? Is the handling of transactions in the mempool part of the ethereum protocol, i.e. would it be handled by a client software like geth?

2 Answers 2


First, when you send a transaction it doesn't go directly to the mempool, but to the RPC node you are connected to. This node will check the transaction, and only if its valid, will add it to it's own mempool and broadcast it to its neighbour nodes, wich again will validate it. Finally, if a node that has your transaction in its mempool builds the next block, your transaction will be finalized. So at most you could try to flood your own node, wich in turn will have its own security measures, like IP filtering etc. You could possibly slow down the network by saturating the most popular RPC networks, such as Infura, but I am sure they will also be resilient enough to withstand that.


Even if RPC nodes included all the transactions inside their mempool the main issue of the "bombarding" is that it would be financially critical for the attacker.

DDOS the Ethereum network is really expensive due to the existance of Gas and it's price.

Let's see an example. Assume an attacker creates transactions that will run out of gas (inside of a loop so that the RPC can not catch the issue), or tries to create transactions that spending as less gas as possible, force the nodes to work the most.

The attacker then needs to pay:

  1. Enough gas price so that their tx is processed first always. This means that you need to pay more for each unit of gas than other users in the network so that your fake txs get processed first.
  2. Then you need to pay for at the very least 21000 gas which is the price of "just triggering a tx". And since it will run out of gas, your entire tx would actually be executed but also the gas you pay for consumed. See: Example

That actually means you're paying for failed transactions high prices only to DDOS the nodes. 3. Note that there's multiple RPC nodes and block generators. So you'd need a way to send to the biggest amount of them possible your txs so that the chances of them including them into their block proposal are higher.

In summary, you can try to DDOS Ethereum. But you'd need outrageous ammounts of ETH to pay for the gas fees. So sustain the DDOS for a long period of time is quite unrealistic to happen.

  • Thanks @Pereez19 for the detailed answer of the difficulty of launching a DDOS against ethereum through reverting transactions. I was however wondering whether one can launch an attack against the network by sending transactions that are not even valid. Maybe the wrong signature or whatever ... essentially transactions that do not cost gas.
    – Marlo
    Commented Jun 11, 2023 at 16:21
  • Generally since the full node needs to run the transaction inside prior to propose a block for it, no one will include your transaction on their block. It's just not worth it economically-wise.
    – CPereez19
    Commented Jun 21, 2023 at 13:29
  • My understanding has been that, even if you modify/fork your full node to not validate your invalid tx, the first peers receiving the tx will notice it's invalid and the tx will never get past through the first point of contract, therefor not flooding the network. This means, the full nodes also validate the tx's received to the mempool, right?
    – kuzdogan
    Commented Aug 10, 2023 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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