Skip to content
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

[release-v1.6] server: Only send fast block anns to full nodes. #2609

Commits on Mar 1, 2021

  1. [release-v1.6] server: Only send fast block anns to full nodes.

    Fast block announcements were added a few years ago as a way to increase
    the propagation speed of new blocks that extend the main chain through
    the network to significantly reduce voting latency as well as how
    quickly proof-of-work miners discover new blocks.  This is desirable
    behavior, however, it should only apply to full nodes since only they
    are equipped to deal with the fast announcements.
    
    As a case in point, header commitments and committed block filters can
    pose a problem for lightweight clients that rely on them in the case of
    fast block announcements because lightweight clients tend to request the
    filters as soon as they learn about the new blocks and those filters
    have not been created yet when fast block announcements are sent.
    
    Since there is network latency involved in the request process, the
    result is that sometimes the filters are available by the time the
    requests from lightweight clients are received and sometimes they are
    not.
    
    In order to help prevent the aforementioned case, and other similar
    ones, this modifies the code that deals with block announcements to only
    send fast block announcements to peers that advertise themselves as full
    nodes instead of all nodes and separates out the block announcement
    logic slightly to make future enhancements easier in the process.
    
    It also modifies the filtering of duplicate block announcements to work
    on a per peer basis since not all peers receive the fast block
    announcement now.
    davecgh committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    9ca673a View commit details
    Browse the repository at this point in the history