nix-bitcoin
nix-bitcoin copied to clipboard
Signet support
Currently only mainnet and regtest are supported, ideally we could also support signet (and maybe testnet?). I have a hack at d17dee5eb000a2fb1b8c8ff2f365c5fe9721ac25 that enables signet and got an instance running with it. I don't think my approach is good though. I think ideally we could define an enum for the networks and have a mapToName
function in each module that fails for unsupported networks.
I'd also like to use signet. Your hack looks like a good start, but you also need to adjust the ports. Normally Bitcoin Core does that by default, but nix-bitcoin hardcodes port numbers into the config which take precedence. See #667.
On a related note: can I run two nodes on the same NixOS (VM)? (e.g. one signet, one mainnet)
On a related note: can I run two nodes on the same NixOS (VM)? (e.g. one signet, one mainnet)
The current nix-bitcoin bitcoind module only supports running one instance of Bitcoin Core. However, the NixOS bitcoind module allows you to run multiple nodes (even multiple mainnet nodes if you want) on the same NixOS system. See https://search.nixos.org/options?query=services.bitcoind
. However, the NixOS bitcoind module allows you to run multiple nodes (even multiple mainnet nodes if you want) on the same NixOS system.
It would be great if you updated nix-bitcoin to use the upstream bitcoind module so one can run multiple bitcoind instances with nix-bitcoin. I am here to help you upstream the changes to nixpkgs if needed.
It's probably not easy to upstream our bitcoind module given all the nix-bitcoin specific functionality it uses.
It's probably not easy to upstream our bitcoind module given all the nix-bitcoin specific functionality it uses.
My suggestion was the other way around: nix-bitcoin starts using module from nixpkgs which supports running multiple instances of bitcoind. So one can easily run mainnet, regtest, signet and testnet at the same time on the same machine.