Closed justinmoon closed 4 months ago
Braindump:
[gateway, federation, user]
where the user key is randomly generated by the user and the federation key is generated once by the gateway. This is important since the GW needs to be able to decrypt the onion that would be sent to the "federation" hop (but is just processed by the GW to determine from where to get the preimage). Any ideas where else to hide a few bits to select the federation welcome (hash/user pk grinding?)Add a hop to the route hint so that the route becomes [gateway, federation, user] where the user key is randomly generated by the user and the federation key is generated once by the gateway. This is important since the GW needs to be able to decrypt the onion that would be sent to the "federation" hop (but is just processed by the GW to determine from where to get the preimage). Any ideas where else to hide a few bits to select the federation welcome (hash/user pk grinding?)
Ack on this.
The GW needs to maintain separate e-cash wallets per federation
Supported by #714 , by fact of the each registered federation getting a dedicated GatewayActor
"Internal routing" can now happen between federations and becomes more complex
Semantics: We probably should distinguish between payments/routing by giving definitions for "internal payments", "external payments" and "self payments". My take on it is that:
internal payments
external payments
self payments
current issue is about external payments and self payments
Add a hop to the route hint so that the route becomes [gateway, federation, user] where the user key is randomly generated by the user and the federation key is generated once by the gateway. This is important since the GW needs to be able to decrypt the onion that would be sent to the "federation" hop (but is just processed by the GW to determine from where to get the preimage). Any ideas where else to hide a few bits to select the federation welcome (hash/user pk grinding?)
Ack on this.
@okjodom taking up this task
Remember to fix this TODO when you close out this issue.
This was a limitation of the old gateway architecture, from which we have fully migrated after #1718 The new gateway introduced to the test framework at #1717 supports multiple federations
Do we have a test for this, yet?
Do we have a test for this, yet?
Reactivating, until we have automated tests
Update:
LndClient.router().htlc_interceptor
can't be called twice in our experience. But why not?LND might not work because LndClient.router().htlc_interceptor can't be called twice in our experience. But why not?
This should be fixed after https://github.com/fedimint/fedimint/pull/2161. We know only have one interceptor thread. Still need the test to confirm this works though.
Dope. I think we could use fedimint-bin-tests
to make a test for this. We would just need something like this, but which runs 2 federations, and joins both gateways in each federation. Then make a bunch of payments testing that everything works.
To which degree does this work now and how much is it tested? @m1sterc001guy @okjodom
We have a few tests that utilize multi_federation_test
helper function in our gateway test suite. The main test that covers the swap scenario between two connected federations in a gateway is called test_gateway_executes_swaps_between_connected_federations
Making a new issue based inspired by https://github.com/fedimint/fedimint/issues/613#issuecomment-1257633238
What needs to happen in order to support this usecase?