Better fingerprinting protection for non-main-chain getdatas.#5820
Merged
laanwj merged 1 commit intobitcoin:masterfrom Feb 26, 2015
Merged
Better fingerprinting protection for non-main-chain getdatas.#5820laanwj merged 1 commit intobitcoin:masterfrom
laanwj merged 1 commit intobitcoin:masterfrom
Conversation
With headers-first we can compare against the best header timestamp, rather than using checkpoints which require code updates to maintain.
Contributor
|
Code review ACK; I didn't try to test. |
Contributor
|
ut ACK |
Member
|
Tested; works as expected. |
Member
|
utACK |
laanwj
added a commit
that referenced
this pull request
Feb 26, 2015
85da07a Better fingerprinting protection for non-main-chain getdatas. (Pieter Wuille)
Member
|
Backported to 0.10 as aeb9279 |
Contributor
|
@SergioDemianLerner How about an nbits test? |
Member
Author
|
@SergioDemianLerner I would really prefer avoiding checkpoints for this. Wouldn't a nHeight-based check be just as good to prevent that, similar to the check added in this patch? |
Contributor
|
We have several possibilities:
pcheckpoint = last check point
Option 3 has sense only if the relative height is less than 1-month of time (current fingerprinting window). This limits the re-org depth. I like option 1. |
Member
Author
|
Another alternative is using "equivalent PoW-days". You look at the
difference in nChainWork between the requested block and the best known
header, divided by the best difficulty seen, multiplied by the block
interval. This yields something with time units: the amount of time an
attacker with 100% of the current observable hash rate would need to expend
to build on top of the fork to beat the main chain. Accept requests of a
block when this time value is less than some constant.
Also, I don't believe this actually hurts reorganizations. The new blocks
to reorg to can always be requested from the peer who has already switched
to it. The only reason why you'd allow requests for blocks outside of your
own best chain, is because during a reorg your own view of the best chain
may chain between an inv and the receipt of a getdata in response. Not
answering could delay convergence (but only a bit, there are timeouts). One
month of desync time is probably serious overkill, but given that the
hashrate can hardly drop in such a time frame, it already makes
fingerprinting very expensive.
|
reddink
pushed a commit
to reddcoin-project/reddcoin-3.10
that referenced
this pull request
Jul 11, 2020
With headers-first we can compare against the best header timestamp, rather than using checkpoints which require code updates to maintain. Rebased-From: 85da07a Github-Pull: bitcoin#5820 (cherry picked from commit aeb9279)
reddink
pushed a commit
to reddcoin-project/reddcoin-3.10
that referenced
this pull request
Jul 14, 2020
With headers-first we can compare against the best header timestamp, rather than using checkpoints which require code updates to maintain. Rebased-From: 85da07a Github-Pull: bitcoin#5820 (cherry picked from commit aeb9279)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With headers-first we can compare against the best header timestamp, rather than using checkpoints which require code updates to maintain.