nix-bitcoin icon indicating copy to clipboard operation
nix-bitcoin copied to clipboard

Signet support

Open elsirion opened this issue 2 years ago • 5 comments

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.

elsirion avatar Aug 08 '22 15:08 elsirion

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)

Sjors avatar Dec 22 '23 22:12 Sjors

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

0xB10C avatar Dec 23 '23 10:12 0xB10C

. 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.

prusnak avatar Dec 23 '23 10:12 prusnak

It's probably not easy to upstream our bitcoind module given all the nix-bitcoin specific functionality it uses.

jonasnick avatar Jan 01 '24 14:01 jonasnick

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.

prusnak avatar Jan 01 '24 15:01 prusnak