Skip to content

fix(dash-spv): release the charge of a request the broker gave up on #1574

Not planned

Description

@xdustinface

When Broker::expire gives up on a request after KICKING_ATTEMPTS and requeues it without kicking the peer, requeue leaves the request's byte charge on that peer's ledger. The ledger releases a charge only when a reply or notfound settles it, and Dash Core sends nothing for a block it does not know, so the charge can stay for the life of the connection.

The leftover charge makes the peer look busier than it is: it shrinks the peer's room in the router's budget, ranks it behind idle peers for headers and blocks, keeps it out of hedges and lets the timeout monitor blame it once its byte counter freezes. With #1375 it also counts as owed bytes for the stalled flag.

#1563 releases the charges of skipped blocks and filter batches once a later reply of the same kind arrives, but not headers, mnlistdiff or QRInfo, and not a request no later reply follows.

Fix: have expire return the requests it gave up on and release their charges on that peer's ledger. This touches the broker code #1374 rewrites, so it should follow that PR.

Activity

  1. xdustinface commented on Dec 1, 2026

    @xdustinface
    CollaboratorAuthor

    Duplicate of #1232, which already tracks the charge left on a peer when the broker requeues or expires a request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions