decred / dcrwallet

A secure Decred wallet daemon written in Go (golang).
https://decred.org
ISC License
216 stars 155 forks source link

spv: Fetch cfilters from multiple remote peers #2308

Closed matheusd closed 10 months ago

matheusd commented 10 months ago

This modifies the cfilter fetching stage of the initial sync process to request cfilters from multiple peers instead of a single one.

This spreads the load across multiple peers, making the initial sync process (on average) slightly faster due to lower remote peer resource usage.

jrick commented 10 months ago

the watchdog commit looks like a prime candidate for context.WithoutTimeoutCause, where we define our special error, and check for that, instead of checking that the watchdog context errored but the outer context did not.

unfortunately, that would require go 1.21 as a minimum, so we can't use that yet.