wizardsardine / liana

The missing safety net for your coins
https://wizardsardine.com/liana
BSD 3-Clause "New" or "Revised" License
321 stars 57 forks source link

GUI: *actually* allow to connect to a running daemon (ie do not require lianad's config) #147

Closed darosior closed 1 year ago

darosior commented 1 year ago

If there is already an existing deployment.

$ ls ~/.liana/testnet/
lianad_rpc  lianad.sqlite3  lianad_watchonly_wallet
$ cargo run -- --testnet
# This spawns the installer, which in turn says there already is an existing datadir for testnet...
edouardparis commented 1 year ago

The Gui cannot start the daemon if it does not find ~/.liana/testnet/gui.toml. So it needs to display an error saying the directory exists but it cannot start and not display the installer

darosior commented 1 year ago

Can't it use a default config? What does it need in this gui.toml?

edouardparis commented 1 year ago

path to the daemon.toml, and in your case, the path is not default one

darosior commented 1 year ago

I'm not sure i understand in my example above there is a testnet datadir at literally the default path: https://github.com/revault/liana/blob/f03b617490fe701635307160accba14073e502c5/src/config.rs#L146-L172

darosior commented 1 year ago

Ok i think i got you. The GUI needs to get into its own config the path to the config of the daemon. So the GUI cannot start without the path to the daemon's config? This is very awkward.. This means you can't just plug the GUI to a running daemon instance, you need to also find the config that was used at the time this daemon instance was itself started..

Can it be made to not require the path to the daemon configuration file? Would that be an unreasonable refactoring?

edouardparis commented 1 year ago

Can it be made to not require the path to the daemon configuration file? Would that be an unreasonable refactoring?

Yes we can make that the gui when connecting to a running Daemon need only the rpc socket path in its config. But in this case if it does not have access to config, then the settings panel cannot display stuff about bitcoind.

But for a gui with daemon embedded, the daemon config path and access are required.

darosior commented 1 year ago

This is very unfortunate but we should probably drop this from the release milestone.

darosior commented 1 year ago

Postponing this to v1.

darosior commented 1 year ago

Unfortunately this needs again slip to the next release..