Closed sappenin closed 4 years ago
For now, I figured out a way to overcome this problem in code. Also, I have added this issue as something to consider when if we ever roll-out STREAM v2 (see here).
The sender will always send a ConnectionNewAddress
frame in order to trigger the ConnectionAssetDetails
, but in the case where the caller doesn't supply a sourceAddress, the SimpleStreamSender, will prepend the Link operator address with the private
prefix. This should signal to receiver's that the address is not routable, but will also allow receivers to log who was doing a STREAM payment with them.
Currently all stateless STREAM receiver implementations (Java, Rust) rely upon a hack to trigger themselves to send a
ConnectionAssetDetailsFrame
. This hack involves looking for aConnectionNewAddressFrame
on grounds that a sender will send this frame when a STREAM is first opened.However, because ILP-over-HTTP can be used in send-only scenarios where the HTTP client is not accessible to have payments routed back to itself via ILP (e.g., see the scenario outlined in https://github.com/hyperledger/quilt/issues/445), there are cases where it's desirable for a Stream sender to never send a
ConnectionNewAddressFrame
frame.However, due to the necessity of this hack, these senders will need to send a
ConnectionNewAddressFrame
with an un-routable ILP source address just to get the receiver to trigger a response with itsConnectionAssetDetailsFrame
. As can be seen in https://github.com/hyperledger/quilt/issues/445, this can cause problems for certain ILP receivers (in that case, the JS receiver became stuck with a receiveMax value of 0 which caused the overall payment to fail).This is not ideal - the STREAM protocol should have a mechanism for a sender to "ask" the receiver to send its ConnectionAssetDetails.
I propose we define a new STREAM Frame called
ConnectionAssetDetailsRequestFrame
that could serve this purpose.