fedimint / fedimint

Federated E-Cash Mint
https://fedimint.org/
MIT License
536 stars 209 forks source link

chore(devimint): fix most of flakiness in setting up LN gateways #5149

Closed dpc closed 2 weeks ago

dpc commented 2 weeks ago

There's a complicated web of initialization dependencies in areas of LN that leads to flakes.

Most importantly devimint expects gateway-cli info to tell if gatewayd started. This doesn't currently work well, because it will hang for 60s or until gateway gets a channel opened. But then in a "new way" of opening channel doing so can't happen until gateway is ready to respond to API calls.

And then 60s of timeout is as much as other steps in devimint are actually polling some stuff. Some then sometimes it works, sometimes it doesn't.

Then fedimint-cli connect-fed also has the same behavior of waiting for a route hint from the channel. I don't change that, because it would probably spook many places in the tests that expect the hint to be there.

But generally currently it's all messed up to the point where it's hard to keep track of write a reliable code that would setup up devimint with gateways.

4875 needs to get fixed, it's a significant architectural issue.

dpc commented 2 weeks ago

@fedimint/lightning for awarness

dpc commented 2 weeks ago

Before:

image

image

After:

image

image