Receiver is sending XRP back in the cross-ETH-XRP 3 nodes setup

I am cloning the latest version of the interledger-rs and settlement-engines and setup the Interledger with Ethereum and XRP On-Ledger Settlement.

I try to send the first 500 unit of ETH and it works fine. However, when I try to send another 500, both the connector (Bob) and the receiver (Charlie) receives a settlement request of 500 XRP (exchange rate is 1:1) and sends XRP to each other, which I expect only Bob should do the settlement.

I have attached the log as GitHub gist for your reference:

node-alice.log
node-bob.log
node-charlie.log
node-bob-settlement-engine-xrpl.log
node-charlie-settlement-engine-xrpl.log

GitHub code commit:
interledger-rs: ecfa27e63539a5e02bc3c05c1df9515b6bc5e89d
settlement-engines: f7f07916971488a1289d0c6b02749214a092f8a3

Hi @calvinlauco , thank you so much for trying out interledger.rs.

Let me clarify, when you try to send 500, who are you sending a payment from and to? from Alice to Charlie?
If so, does Charlie receive the payment? You could check Charlie’s balance (on Charlie’s node) as follows:

curl \
-H "Authorization: Bearer hi_charlie" \
http://localhost:9770/accounts/charlie/balance

Currently, the example has a problem (I’m so sorry) that the node setting of Charlie is wrong. Please try removing this line from Charlie’s node:

ILP_ADDRESS=example.bob.charlie \

Could you try this?

1 Like

Now three nodes example has been updated not to set the child address explicitly.

Thanks @dora-gt, I have verified that after removing the ILP_ADDRESS line it is working as expected.

May I know a bit more about the reason behind this? What is the use of setting ILP_ADDRESS on node start, and comparing with adding the account using curl to {node_url}/accounts?

Thanks in advance.

Glad to hear that.

ILP_ADDRESS is used to set the node’s ILP address. It is basically used for Peer node. If it is used for a Child node, it doesn’t seem to be working although it is not a desired behavior. That’s why we had to remove the line. I think we should fix this.

Accounts are representations of the relationship with others (basically). If you add an account on your node with an ILP address example.another, it represents another node’s ILP address, not yours.

Note that we could add an account of the node itself. In the three nodes example, example.bob.charlie on Charlie’s node (on port 9770) is the case. Now it doesn’t seem working properly with ILP_ADDRESS option.

Ah I think the issue might be that if you set your ILP address but you’re only reachable as a child of another node, that node won’t be accepting route broadcasts from you so it won’t know how to route packets for your address.

@dora-gt We should clarify the purpose of that field