Просмотр исходного кода

doc: add useful attack definition to arch/p2p-network.md

also delete no longer relevant comment
draoi 2 лет назад
Родитель
Сommit
ea9044216d
1 измененных файлов с 6 добавлено и 3 удалено
  1. 6 3
      doc/src/arch/p2p-network.md

+ 6 - 3
doc/src/arch/p2p-network.md

@@ -179,14 +179,17 @@ To faciliate this future upgrade, we have made the peer discovery process a gene
 
 
 ## Scoring Subsystem
 ## Scoring Subsystem
 
 
+From [libp2p2 DoS mitigation](
+https://docs.libp2p.io/concepts/security/dos-mitigation/): "An attack is
+considered viable if it takes fewer resources to execute than the damage
+it does. In other words, if the payoff is higher than the investment it
+is a viable attack and should be mitigated."
+
 Connections should maintain a scoring system. Protocols can increment the score.
 Connections should maintain a scoring system. Protocols can increment the score.
 
 
 The score backs off exponentially. If the watermark is crossed then the
 The score backs off exponentially. If the watermark is crossed then the
 connection is dropped.
 connection is dropped.
 
 
-Since the reader in `messages.rs` preallocs buffers, there should be a hard
-limit here, and the raw reads also affects your score too.
-
 ### Libp2p resource manager
 ### Libp2p resource manager
 
 
 In libp2p, resource usage is constrained by a `Resource Manager` that
 In libp2p, resource usage is constrained by a `Resource Manager` that