Skip to content

[XRP] Lookup channels in parallel #16

@dappelt

Description

@dappelt

checkIfChannelsNeedToBeClaimed() checks sequentially if any of the connector's paychans need to be claimed. .getPaymentChannel() and .submit() are both awaited. I wonder how long these functions take to complete if RippleNet is under load. Are there any worst-case estimates?

Assuming that getPaymentChannel lookups take some time to complete, an attacker could open many paychans to the connector and make the connector forward a payment on the channel the connector looks up last. If the time to look up all the channels exceeds the settle delay, the connector will miss submitting the claim before the channel closes.

Solution: Lookup channels and submit claims in parallel. Also, a real connector probably wants to closely monitor RippleNet load and adapt accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions