Conversation
vnprc
left a comment
There was a problem hiding this comment.
This is a great start! Thank you for working on this.
The cln node dies on startup when it fails to connect to the bitcoind node. I can think of two causes:
-
Double check the port. You may need to add a new entry to the
config/miner.tomlfile. This is a global config file that keeps track of settings shared across roles. There's aminer.tomland apool.tomlto distinguish between the poolside services and the minerside services. Check this diagram: https://hashpool.dev/images/diagrams/process-architecture.png. Lightning is tightly integrated with the mint so it goes on the pool side. -
If that doesn't get it working you may need to add a polling loop to force cln to wait for bitcoind to come up. See the polling loops in other processes for an example:
pool = {
exec = withLogging ''
echo "Waiting for Mint..."
while ! nc -z localhost ${toString poolConfig.mint.port}; do
sleep 1
done
echo "Mint is up. Starting Local Pool..."
cargo -C roles/pool -Z unstable-options run -- \
-c ${config.devenv.root}/roles/pool/config-examples/pool-config-local-tp-example.toml \
-g ${config.devenv.root}/config/pool.toml
'' "pool.log";
};
|
I had it running all right several times, so it's no a port issue. The polling may be the cause. I haven't experienced it, but the bahavior may also depend the exact state of the processes. |
|
Added polling on bitcoind port |
|
Changed to 'regtest' (instead of 'testnet4'), rebased to current master. |
|
Nice work @optout21! 💪 |
Add CLN process to the devenv processes
pkgs.clightningnix packagetestnet4bitcoindPartly fixes #50 .