Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Prevent fingerprinting, disk-DoS with compact blocks #8408
Because getblocktxn requests for unknown blocks would trigger a disconnect, while a getblocktxn for known-old blocks would just be ignored, it should be possible to fingerprint a node by seeing which old, non-main-chain blocks trigger disconnect.
The first commit removes the misbehaving score to eliminate this distinction.
In the handling of CMPCTBLOCK messages, the handling for blocks that are announced that have too little work, or where the block was known but pruned, was busted -- for requested blocks, we would generate a getdata for the block, but for unrequested blocks, we'd fall through and try to process. In particular, this means that announcing old CMPCTBLOCKs could cause a pruning node to redownload old blocks (potentially causing a fill-up-disk DoS).
The second commit fixes this by aborting processing of CMPCTBLOCK messages in this situation.
Please tag this for consideration in 0.13.0.
After discussion on IRC: