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

Limit payment path length based on payment_metadata, custom TLVs, etc. #3026

Merged

Commits on May 14, 2024

  1. OutboundOnionPayload: hold Vec fields as references.

    Will be useful when we reuse this enum to calculate the maximum path length,
    to avoid cloning the vecs.
    valentinewallace committed May 14, 2024
    Configuration menu
    Copy the full SHA
    e4e6e09 View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary RecipientOnionFields clone.

    Doable now that we take Vecs by reference in OutboundOnionPayload.
    valentinewallace committed May 14, 2024
    Configuration menu
    Copy the full SHA
    960dd65 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    336c77c View commit details
    Browse the repository at this point in the history
  4. Make MAX_PATH_LENGTH_ESTIMATE const pub and expand doc comment.

    Will be used in the next commit when we make this configurable in
    PaymentParameters.
    valentinewallace committed May 14, 2024
    Configuration menu
    Copy the full SHA
    2de600b View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. Extract onion_utils::build_onion_payloads_callback helper.

    Will be useful when we want to calculate the total size of the payloads without
    actually allocating for them.
    valentinewallace committed May 16, 2024
    Configuration menu
    Copy the full SHA
    bcdb67e View commit details
    Browse the repository at this point in the history

Commits on May 20, 2024

  1. Add max path length knob to PaymentParameters.

    Will be used so the outbound_payment module can calculate the maximum path
    length with knowledge of any custom TLVs or payment metadata present.
    valentinewallace committed May 20, 2024
    Configuration menu
    Copy the full SHA
    7f7f375 View commit details
    Browse the repository at this point in the history
  2. Abide by max path length param in router.

    Also adds some testing by augmenting existing tests.
    valentinewallace committed May 20, 2024
    Configuration menu
    Copy the full SHA
    baa727e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c6de5e1 View commit details
    Browse the repository at this point in the history
  4. outbound_payment: set max path length in PaymentParameters.

    So the router knows how long the maximum payment path can be.
    valentinewallace committed May 20, 2024
    Configuration menu
    Copy the full SHA
    f0b5c58 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c07245f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3cc673b View commit details
    Browse the repository at this point in the history