Juanan7676 / netcoin

A cryptocurrency written in lua for Minecraft mod OpenComputers.
10 stars 6 forks source link

Anti-spamming system #7

Open Juanan7676 opened 2 years ago

Juanan7676 commented 2 years ago

Context: Node server is one-threaded: requests are synchronous, since the access to the blocks and the verification can't be parallelized.

The problem: A malicious agent could spam requests to one or more nodes in the network, requesting blocks or presenting blocks with a very high height, which would cause the node to keep requesting blocks only to find the chain is invalid.

Proposed solution: To implement an anti-spam system. Limit the number of requests a client can make in a minute, and ban clients that present fake blocks (blocks +50 current height that are found to be invalid)