This fixes bugs where we end up banning peers running different consensus rules (including old nodes following a softfork). Since we rely on having peers enforcing the same rules as us, it also enforces that outbound non-feeler connections must have and maintain the same tip block; if they diverge from us, we disconnect them (and find a replacement).
Rework same-chain from abusing DoS banning, to explicit checks #10512
pull luke-jr wants to merge 8 commits into bitcoin:master from luke-jr:samechain_rework changing 6 files +156 −63-
luke-jr commented at 10:05 PM on June 2, 2017: member
-
validation: Combine all 3 block-invalidation logics into one function c64fb2381f
-
Bugfix: Exclude known-invalid blocks from pindexBestHeader de5f9fb348
-
Bugfix: Do not DoS-ban for invalid prev block, since old nodes may forward such in the event of a softfork 7a73c44d17
-
Bugfix: Don't ban peers just because they have header chains we consider invalid d8bab24adf
-
gmaxwell commented at 8:22 PM on June 5, 2017: contributor
bleh please don't use reject for this.
- laanwj added the label P2P on Jun 6, 2017
- laanwj added the label Validation on Jun 6, 2017
- luke-jr force-pushed on Jun 9, 2017
-
Require outbound non-feeler connections use the same tip block as us 6b85ced449
-
If an outbound-and-not-feeler peer rejects a block we send them, they presumably are on a different tip, and therefore we disconnect them 0d5d631270
-
net: Log unmatching-tip disconnections 39ce020c2f
-
net: Tolerate unmatching tips on whitelisted and addnode'd peers 4c322c8964
-
luke-jr commented at 6:32 AM on June 13, 2017: member
This breaks because compact blocks allows relaying invalid blocks without penalty, but there is no indication at all even later, whether the peer sending you the compact block has accepted it himself or not... so basically we can almost never know if a compact-block peer is on a different tip than us.
Ideas for how to solve this?
- luke-jr force-pushed on Jun 13, 2017
- luke-jr closed this on Jun 14, 2017
- DrahtBot locked this on Sep 8, 2021
Labels