1

Gas fees, among other things, make spamming expensive and thus prevent attackers to emit thousands of transactions.

Since testnets have no fees (or "free" tokens), what really prevents attackers to do such spamming ?

Makubu
  • 65
  • 6
  • 2
    Great question. One of my answers would be the fact that there is no financial gain to doing it (fake tokens etc). However, there are always trolls who will do it for fun. And I too am surprised we are not seeing that. – Sky Nov 21 '22 at 10:54

2 Answers2

1

I see a couple of reasons:

  1. The ETH for the testnets is "free", but is still limited
  2. The GAS price is dynamic, which means the more transactions are processed, the more test ETH must be spent. The attacker would drain his own wallet just by himself
  3. Unclear, what the attacker could gain with testnet fraud.
tenbits
  • 2,304
  • 4
  • 12
  • Agree with these points. I came to the conclusion of your second point reading further stuff about the attack on Ropsten several years ago (https://ethereum.stackexchange.com/questions/12477/ropsten-testnet-is-under-kind-of-attack-what-can-we-do). I just wanted to be sure that i was not missing a point. I'll close the question soon, in case further stuff comes up. – Makubu Nov 21 '22 at 14:48
0

I don't want to link to another site but Vitalik chipped in - so no better source than him. What he said almost 10 years ago is still likely true.

"Depends what kind of "invalid" we're talking about. Invalid as in bad signature, those take constant time to detect. Invalid as in run out of gas, those are actually valid transactions - they go in the blockchain and they pay the fee at the sender's expense. - but they have the unfortunate effect of having their impact on the state reverted.

If a transaction pays for N gas (~computational steps), but takes more than N gas to execute, then the transaction can still be included in a block, but transaction execution is completely reverted, except the fee is still paid. This both prevents denial of service attacks by deliberately sending transactions that don't pay enough of a fee and removes the need for contracts to make themselves secure against attacks involving transactions that run out of gas in the middle of execution."

VX3
  • 646
  • 1
  • 11