AleoNet / snarkOS

A Decentralized Operating System for ZK Applications
http://snarkos.org
Apache License 2.0
4.07k stars 2.57k forks source link

[Bug] Potential temporary sync stall from weak-link or malicious peers #3322

Open Meshiest opened 2 weeks ago

Meshiest commented 2 weeks ago

🐛 Bug Report

A circumstance where block requests are forced to timeout can be reached when a peer with a pending request does not respond with a block response. This is similar to the temporary stall outlined in #3321.

Steps to Reproduce

  1. prevent a block response from being created from the validator or the client's router
  2. observe syncing nodes using the modified nodes as peers get stuck for ~10 minutes when reaching a block with an "incomplete request"

We encountered a 10 minute stall during a sync of a node on high performance hardware after merging the latest client sync fixes and deduced it may be related to a swarm of low-quality clients as connected peers (from another test). We were able to resume block sync immediately by forcibly disconnecting the weak links.

image

The 34.16.96.117 IP is one of 20 16core servers under extreme stress from 10 clients syncing blocks with dozens of transactions per block and as a result is unreliably able to respond to block requests, preventing a block request from being marked as complete.

image

Expected Behavior

Blocks to sync without stalls when a peer unable to respond.

Potential Fixes

Your Environment

elderhammer commented 2 weeks ago

https://github.com/AleoNet/snarkOS/issues/3320 As I observed a few days ago, I thought this issue can be ignored because the team did not comment on it. Now I reopened this issue