ethersphere / swarm

Swarm: Censorship resistant storage and communication infrastructure for a truly sovereign digital society
https://swarm.ethereum.org/
GNU Lesser General Public License v3.0
489 stars 110 forks source link

flood of recovery requests #2209

Open santicomp2014 opened 4 years ago

santicomp2014 commented 4 years ago

This issue was originally raised in #2205.

After #2202 was merged, flooding of recovery attempts is still occurring under a different set of conditions.

The current implementation sets the publisher in the context when downloading content; so that content recovery process is triggered only when the publisher was explicitly set in the download query/request. But it seems this is not enough to fix all of the flooding.

When a made-up hash is requested and the publisher is set, the flooding also occurs.

Something similar occurs when setting a made-up publisher.

Verify that the test scenarios behave as specified, without flooding in any case:

Chunk Publisher Expected Result
Valid Chunk Valid Publisher Recovery Successful
Invalid Chunk Valid Publisher Recovery Unsuccessful
Valid Chunk Invalid Publisher Recovery Unsuccessful
Invalid Chunk Invalid Publisher Recovery Unsuccessful

(valid/invalid means existing/non-existing)