iotaledger / goshimmer

Prototype implementation of IOTA 2.0
https://wiki.iota.org/goshimmer/welcome
Apache License 2.0
387 stars 113 forks source link

Spam attacks testing #1888

Closed piotrm50 closed 2 years ago

piotrm50 commented 2 years ago

Perform spamming attacks on a real network (feature network/docker network). The network should not have any PoW set and the scheduler buffer size should be decreased to drop messages more easily. This test's purpose is to test whether the dropping of messages doesn't crash the node and doesn't have any other weird implications that make the network unusable.

piotrm50 commented 2 years ago

Single spammer with honest congestion control with little mana:

Tangle visualization on honest node:

image.png

Tangle visualization on spammer node:

image.png

piotrm50 commented 2 years ago

Single spammer with half the scheduling rate (50ms vs 100ms) congestion control with little mana:

piotrm50 commented 2 years ago

After implementing heuristic not to assign markers to messages from spammer nodes (spammer nodes are estimated using buffer and queue size), dropped markers are not a problem most of the times, however a problem occurs when a node schedules a message, that the rest of the network has dropped.

Say a node schedules something that the rest of the network has dropped, then attaches to it, and one of the messages in the future cone is marked as a marker. Then the confirmation stops on an honest node (or is delayed) because it attached markers to part of the tangle dropped by the network (thus no confirmation). It cannot confirm the other part of the tangle (or is delayed), because there are no markers for some time and the node is building up in soon-to-be-orphaned subtangle, so a lot his messages will be orphaned (until the tips are removed by the TSC condition). It's messages will never be even scheduled by its neighbors because they will never be ready (past cone is dropped and will not be confirmed).

piotrm50 commented 2 years ago

Need to perform those tests in a more decentralized scenario, where cMana is more evenly distributed. E.g. on the feature network.

piotrm50 commented 2 years ago

Spam tests setup:

Results:

Spam tests setup:

Results:

GalRogozinski commented 2 years ago

Closing by request of @karimodm Can be reopened if needed