Hacker News new | ask | show | jobs
by sprovoost 1136 days ago
This script asks a node for the 2000 headers between block 783,569 and 785,568.

It's normal for a node to request headers in chunks of 2000, either as part of syncing the entire chain from scratch, or when catching up after being offline for more than two weeks.

https://github.com/bitcoin/bitcoin/blob/fc06881f13495154c888...

It's not the most efficient (asymmetric) way to waste bandwidth either. For each ~100 byte header request you get a 160 KB reply. You can instead ask for a block using a shorter message and get up to 4 MB. This way you can download the entire blockchain at 500+ GB multiple times.

Those with limited upload bandwidth (and for some reason not behind a NAT) can use -maxuploadtarget to limit the total upload.

I'm not sure how the available bandwidth is distributed between peers, but it's generally quite hard to dominate all connections of all nodes (search for "eclipse attacks"), even with a botnet [0].

So that leaves CPU draining as a possible goal (or stealing Bitcoin from random script kiddies who run untrusted code and dependencies from the internet).

[0] = which isn't free, probably not their most economic use case and some of their operators may not like it when you attack a cryptocurrency they themselves may want to use