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.
checkIfChannelsNeedToBeClaimed()checks sequentially if any of the connector's paychans need to be claimed..getPaymentChannel()and.submit()are bothawaited. I wonder how long these functions take to complete if RippleNet is under load. Are there any worst-case estimates?Assuming that
getPaymentChannellookups 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.