-
Notifications
You must be signed in to change notification settings - Fork 36.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blocktxns are not requested when a cmpctblock received if in flight from another peer #9242
Comments
E.g.:-
i.e. it is not until the cmpctblock that was requested arrives that the blocktxns are finally requested. Block propagation time is therefore delayed unnecessarily as the blocktxns could be requested from the peer that first provides the cmpctblock. |
I have something working, which seems (to me at least) better behavior than the current behaviour:-
|
Also speeds up block propagation in instances where only the full block would have been requested:-
A further improvement could be to disconnect the node sending the full-block once we have validated the block constructed from blocktxns to save bandwidth. Out of scope for #9325 though. |
requested). Speeds up block propagation as avoids an unncessary wait for the first requested cmpctblock and instead allows cmpctblocks sent as announcement to be processed when they arrive before the requested cmpctblock. Fixes bitcoin#9242
requested). Speeds up block propagation as avoids an unncessary wait for the first requested cmpctblock and instead allows cmpctblocks sent as announcement to be processed when they arrive before the requested cmpctblock. Fixes bitcoin#9242
There are cases when it could certainly be faster to acquire the block by requesting blocktxns following a received cmpctblock even though a full-block is in flight, and some where it would not be.
This could be determined by seeing how many requests are needed in the blocktxns and seeing how much of the full-block has already been downloaded. In cases where the full-block has only just started to be received (it will know how big the incoming full-block is once it has started to arrive, and also can calculate how long it will take to finish downloading), it could disconnect that connection (to abort the download) and request the blocktxns, for example.
The text was updated successfully, but these errors were encountered: