Open emizzle opened 5 years ago
Hi @emizzle
As you could see from our lightchain documentation during the initialization of your node you could specify a different datadir
using the argument --datadir=[CHOSEN_DIR]
, by default it is set to ${HOME}/.lightchain
.
During the execution of your lightchain node, lightchain run
, you can specify which data directory(datadir
) is to use using the same argument --datadir
. The IPC socket is always created under ${datadir}/database/geth.ipc
and that cannot be modified.
In case that explanation does not fullfill your needs, would you mind to detail why you would require the IPC socket to be located on a path outside of the regular data directory one? Maybe we could help.
We use an IPC path that is shared with an external application (Embark). When Embark spins up a geth node, we pass in the path to the IPC socket, ie --ipcpath=/var/folders/b3/v732nxrx2fn3vfmm_vwpm1v00000gn/T/embark-0d2878de/geth.ipc
. So, while your suggestion makes sense, it doesn't make sense to restrict the IPC path to the --datadir
, when it has no constraint for being there.
Ideally, ${datadir}/database/geth.ipc
would be the default value, with the option to override the path using the --ipcpath
CLI option.
Thanks for the explanation. I moved to the project feature pool in order to prioritize its development.
I hope that is not a blocker for you, as an easy workaround, in the meantime, would be to create a symbolic link such as follow:
ln -nsf ${datadir}/database/geth.ipc /var/folders/b3/../T/embark-0d2878de/geth.ipc
Thanks so much @ggarri, the workaround will work great for now! Looking forward to seeing this feature developed in.
System information
Steps to reproduce the behaviour
lightchain init --force --standalone
lightchain run --rpc --rpcport=8555 --rpcaddr=localhost --rpcapi=eth,web3,net,debug,personal,shh --ws --wsport=8556 --wsaddr=localhost
Is there any way we can set the IPC path?