koinos / koinos-p2p

The p2p microservice orchestrates the distribution of blocks and transactions between peers.
MIT License
6 stars 4 forks source link

Detect and handle fork bombs #227

Closed sgerbino closed 1 year ago

sgerbino commented 1 year ago

Resolves #221.

Brief description

Detect and handle for bombs. When a user creates more than 3 blocks off the same parent we consider that a fork bomb and spank you off the network.

Checklist

Demonstration

Running tool: /usr/local/bin/go test -timeout 30s -run ^TestForkWatchdog$ github.com/koinos/koinos-p2p/internal/p2p

ok      github.com/koinos/koinos-p2p/internal/p2p   0.172s