onflow / flow-go

A fast, secure, and developer-friendly blockchain built to support the next generation of games, apps, and the digital assets that power them.
GNU Affero General Public License v3.0
532 stars 175 forks source link

[State Sync] Create a sybil resistant rate limiter #4403

Open peterargue opened 1 year ago

peterargue commented 1 year ago

Problem Definition

Execution sync is getting expanded to the public network. This will be accomplished in a similar way to how block sync is bridged to the public network: Access nodes opt in to relaying the data from the staked network to the public nodes.

To make sure these Access nodes aren't overwhelmed by the relaying data to malicious or otherwise aggressive clients, we will need to add some limits to the volume and speed with which individual peers can request data.

The public network is unstaked and permissionless, so node IDs can be ephemeral. This makes it difficult for a node to effectively rate limit peers, since they can easily create new identities.

Proposed Solution

Create a sybil resistant rate limiter for use by ExecutionDataStores on the public network. The goal is to support rate limiting peers' requests such that newly discovered peers receive a much lower limit which incrementally increases over time with good behavior.

Definition of Done

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.