Bitcoin full node and query server

Oct 27, 2024

View in context in the libbitcoin Slack #general mirror.

evoskuil03:02
replied to a thread: view
The protocols are attached to each channel and the block download protocol supports performance metrics (block byte totals) and feeds them to the outbound session (we don’t manage inbound or manual for block sync perf), which maintains a rate table. Configurable timers are used to measure download rates on a per channel basis, and to perform standard deviation computation across the set (if more than 2). Stalled channels are dropped (even if less that 3 or if SD is not enabled by config). Slow channels are defined by a configurable negative deviation from the SD and dropped. Drops are very common, so rapid connection is important. We can very rapidly connect even thousands of peers, but best sync on a 2Gbps network is 100-200 peers. Rapid connection is part address book hygiene and part concurrency. To connect 1 we attempt 5 (by default) with a race established between them, dropping all but the first to complete handshake. We find about 1/5 addresses are good on average.