celestiaorg / go-header

Go library with all the services needed to request, sync and store blockchain headers.
Apache License 2.0
19 stars 17 forks source link

p2p: Exchange should have built-in single flight protection #154

Open Wondertan opened 9 months ago

Wondertan commented 9 months ago

Currently, if two clients request the same headers, the exchange will end up duplicating requests for headers. We should avoid this with single-flight protection on the Exchange level. We should also consider doing that on a higher Service level once we introduce the Service here

renaynay commented 2 weeks ago

Additionally, this should replace the single flight protection from syncer that performs the same function.