-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using existing node automatically #8
Comments
eznode runs entirely inside the docker container, without a pre-setup script that runs directly on the host. This makes cross-platform compatibility straightforward, and enables the single-command This also means that eznode doesn't have full filesystem access to the host, and can't look up the config file in its expected locations. The user would have to explicitly mount it (with e.g. The rpc hostname is also different, it would be The setup is already pretty straightforward if cookie auth is used and the RPC server is listening on the default port, just a matter of mounting the bitcoind data dir (e.g. |
Would it make sense to add a very small, simple setup script for those who want to configure the internal node? It shouldn't be too hard to make it multi-platform.
Why would it be required? Simple setup script would read the file and mount the appropriate directories wherever needed by the docker containers.
I personally don't consider anything that requires manual configuration of ports and paths "straightforward". If all software was like this computers would be used by maybe five nerds and never be mainstream. I believe we as bitcoiners need to do it much better than this and bring the experience as close to out-of-the-box as possible. This is why I'm trying to come up with some reasonable standard that we all could follow in order to enable great UX. Or did I misunderstand and |
Idea mentioned in janoside/btc-rpc-explorer#279 (comment)
TL;DR: scroll down to "The simplest client-side implementation..."
Currently I solve this in my repository by simply placing proper configuration files in standard location and then reading them from other apps. This is still sub-optimal, so I intend to use interface files. I hope to refactor it in the following months.
The general idea is that we would standardize these locations:
/etc/interfaces/$INTERFACE/*
$XDG_CONFIG_HOME/interfaces/$INTERFACE/*
($XDG_CONFIG_HOME
defaults to~/.config
)Where
$INTERFACE
refers to interface name. In case of Bitcoin, we would have these interfaces:bitcoin-rpc-public-$NETWORK
- can only execute harmless callsbitcoin-rpc-full-$NETWORK
- full access to bitcoind wallet and chain.$NETWORK
refers tomainnet
|testnet
|regtest
|signet
. We can have more permission granularity in the future.There's obligatory
_default
file in the interfaces directory. This can be used in case the consumer doesn't want to mess with handling multiple services.The simplest client-side implementation is to just try to read and parse the files in this order:
$XDG_CONFIG_HOME/interfaces/bitcoin-rpc-public-$NETWORK/_default
~/.config/interfaces/bitcoin-rpc-public-$NETWORK/_default
(ifXDG_CONFIG_HOME
is not set)/etc/interfaces/bitcoin-rpc-public-$NETWORK/_default
When one of them succeeds, break the loop and use it.
The contents of the file should be:
The text was updated successfully, but these errors were encountered: