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

discovery: make batch size distinct from chunk size, reduce to 500 #2905

Merged
merged 1 commit into from
Apr 10, 2019

Commits on Apr 6, 2019

  1. discovery: make batch size distinct from chunk size, reduce to 500

    This commit reduces the number of channels a syncer will request from
    the remote node in a single QueryShortChanIDs message. The current size
    is derived from the chunkSize, which is meant to signal the maximum
    number of short chan ids that can fit in a single ReplyChannelRange
    message. For EncodingSortedPlain, this number is 8000, and we use the
    same number to dictate the size of the batch from the remote peer.
    
    We modify this by introducing a separately configurable batchSize, so
    that both can be tuned independently. The value is chosen to reduce the
    amount of buffering the remote party will perform, only requiring them
    queue 500 responses, as opposed to 8000. In turn, this reduces larges
    spikes in allocation on the remote node at the expense of a few extra
    round trips for the control messages. However, will be negligible since
    the control messages are much smaller than the messages being returned.
    cfromknecht committed Apr 6, 2019
    Configuration menu
    Copy the full SHA
    a4b4fe6 View commit details
    Browse the repository at this point in the history