Change IPC path
System information
Lightchain version: Version: 1.1.0-beta MainNet (but running off fork https://github.com/0x13a/lightchain/tree/fix/upgrade-geth)
OS & version: OSX Mojave 10.14.4 / Kernel Version 18.5.0
Go version: go version go1.12.5 darwin/amd64
Branch: https://github.com/0x13a/lightchain/tree/fix/upgrade-geth
Commit hash: cb8e32e6209e8aaf302ac21d67cabe014b667b3e
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
INFO [05-16|11:43:22.533] IPC endpoint opened url=/Users/emizzle/.lightchain/database/geth.ipc
INFO [05-16|11:43:22.682] HTTP endpoint opened url=http://localhost:8555 cors= vhosts=localhost
INFO [05-16|11:43:22.686] WebSocket endpoint opened url=ws://127.0.0.1:8556
Is there any way we can set the IPC path?
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.