farcaster-node icon indicating copy to clipboard operation
farcaster-node copied to clipboard

health checks prior to making/taking

Open Lederstrumpf opened this issue 3 years ago • 2 comments

when user wants to initiate a swap, we should first check whether

  • [ ] monero-wallet-rpc is responsive
  • [ ] electrum server is responsive
  • [ ] monero daemon is responsive

In particular for new users, I can imagine this would avoid a lot of headache when they spin up the node for the first time and try to swap before they've completed their configuration.

I suggest we perform the same checks for autofunding, but that's less pressing.

Lederstrumpf avatar Aug 31 '22 10:08 Lederstrumpf

Doing this for every swap seems wasteful and complicated. I also don't want to do this once for the first make or take swap and then cache the result in farcasterd.

How about this: We add a cli-command health-check , that triggers requests to the various syncers which in term query the various coin daemons.

sedited avatar Aug 31 '22 16:08 sedited

you're right: doing it on every swap is too much, and caching the result's more state.

How about this: We add a cli-command health-check , that triggers requests to the various syncers which in term query the various coin daemons.

Sounds good. I'd say the health-check should also be triggered once when farcasterd is launched, so it at least shows up in the logs.

Lederstrumpf avatar Aug 31 '22 19:08 Lederstrumpf