You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the bitcoind option network is read-only and defaults to mainnet. If the regtest option is set to true then network is set to regtest.
We should support signet and testnet4. This will support using bitcoinix to configure testnet nodes/stacks and will also make it easier to test bitcoinix services/transactions using signet and testnet.
I realize this is probably a non-trivial change and perhaps not the highest priority, but I think it should be on the roadmap.
I'm open to suggestions on what the best approach would be for adding this.
But it seems like the first step would be to create a PR that enables additional networks for only the bitcoind service.
network would be made settable, with the regtest boolean being settable, but deprecated. We'd add some form of network parameters attribute-set with the ports, etc. for each network. We could add assertions or failures for when modules don't support the configured network yet.
Then we could add support for additional networks for individual services (or perhaps logical groups of services) in additional PRs.
The current interface doesn’t fully express the network options as described in the issue body.
The module structure doesn’t allow multiple bitcoind instances in the same NixOS configuration (e.g. a mainnet and a signet node side by side), unlike the nixpkgs services.bitcoind module.
Services that consume bitcoind aren’t prepared for other networks: I haven’t gone through each module yet, but at a glance ~8 of them read bitcoind.network or makeNetworkName, so I expect a mix of simple renames and a few that need a closer look.
I think 2 deserves its own issue, picking up prusnak’s suggestion in fort-nix/nix-bitcoin#532 (comment), since it changes the module’s shape and touches everything downstream. 1 and 3 could go in a single PR: a table-driven network enum in bitcoind.nix (ports, bitcoin.conf section, cookie dir. so testnet3 or a future testnet5 is one extra entry), the consumers updated, regtest = true kept as a deprecated alias via versioning.nix, and a signet scenario in tests.nix that checks evaluation and service start-up.
If that split sounds right, I’d like to open an issue for 2 to gather opinions and look into drafting a PR for 1 + 3. WDYT? Are you already working on this?
@jaoleal Thanks for you interest. I'm waiting to hear from @seberm or @prusnak if they are interested in this feature and get any feedback or suggestions they have before I would start work.
I agree that (2) should have its own issue but I personally don't think it should be prioritized -- I would vote for keeping bitcoinix simple and only allowing one bitcoind instance per host/container configuration. People that need multiple bitcoind instances can always use containers or VMs to get them.
I have to say that having the limitation which supports only one network on a single bitcoinix node seems simpler and probably less error prone - so you have a node where everything is set and configured to use a mainnet. If you want to run testnet/signet/etc. maybe you should spin up another bitcoinix node.
What do you think? Is this the approach we want to do? I think it is my preference and seems less messy and easier to maintain.
Reacted by Sean Gilligan, Joao Leal and Andrew DeVries
Just to add my two cents: I'd prefer to see these changes split into smaller PRs.
For example, we could start by adding testnet4 support and disabling any bitcoind-dependent services while testnet4 is active. From there, we can enable other services (such as electrs) either one by one or in batches in follow-up PRs.
Of course, all changes must be covered by tests.
Once that's in place, we can follow the same approach for signet support.
I'd prefer to see these changes split into smaller PRs.
I agree.
For example, we could start by adding testnet4 support
My personal priority is testnet4 over signet (I want to use bitcoinix for our P2poolv2 testnet4 mining pool), so that sounds good to me.
From there, we can enable other services (such as electrs) either one by one or in batches in follow-up PRs.
Of course, all changes must be covered by tests.
Once that's in place, we can follow the same approach for signet support.
Activity
msgilligan commentedon Oct 14, 2026
I'm open to suggestions on what the best approach would be for adding this.
But it seems like the first step would be to create a PR that enables additional networks for only the
bitcoindservice.networkwould be made settable, with theregtestboolean being settable, but deprecated. We'd add some form of network parameters attribute-set with the ports, etc. for each network. We could add assertions or failures for when modules don't support the configured network yet.Then we could add support for additional networks for individual services (or perhaps logical groups of services) in additional PRs.
jaoleal commentedon Oct 15, 2026
Hi @msgilligan, Id like to help with this one as a way into the project. Happy to author or review.
I went through the old nix-bitcoin threads on this (fort-nix/nix-bitcoin#642 and fort-nix/nix-bitcoin#532). After reading the code, I see three coupled problems:
I think 2 deserves its own issue, picking up prusnak’s suggestion in fort-nix/nix-bitcoin#532 (comment), since it changes the module’s shape and touches everything downstream. 1 and 3 could go in a single PR: a table-driven network enum in bitcoind.nix (ports, bitcoin.conf section, cookie dir. so testnet3 or a future testnet5 is one extra entry), the consumers updated, regtest = true kept as a deprecated alias via versioning.nix, and a signet scenario in tests.nix that checks evaluation and service start-up.
If that split sounds right, I’d like to open an issue for 2 to gather opinions and look into drafting a PR for 1 + 3. WDYT? Are you already working on this?
msgilligan commentedon Oct 15, 2026
@jaoleal Thanks for you interest. I'm waiting to hear from @seberm or @prusnak if they are interested in this feature and get any feedback or suggestions they have before I would start work.
I agree that (2) should have its own issue but I personally don't think it should be prioritized -- I would vote for keeping bitcoinix simple and only allowing one bitcoind instance per host/container configuration. People that need multiple bitcoind instances can always use containers or VMs to get them.
prusnak commentedon Oct 16, 2026
I have to say that having the limitation which supports only one network on a single bitcoinix node seems simpler and probably less error prone - so you have a node where everything is set and configured to use a mainnet. If you want to run testnet/signet/etc. maybe you should spin up another bitcoinix node.
What do you think? Is this the approach we want to do? I think it is my preference and seems less messy and easier to maintain.
msgilligan commentedon Oct 20, 2026
Sounds like we have enough agreement (concept ack) where it is worth creating a feature branch.
prusnak commentedon Oct 21, 2026
ack, let's introduce testnet4 and signet network options
(later we can introduce testnet5 once it is deployed)
seberm commentedon Oct 22, 2026
Just to add my two cents: I'd prefer to see these changes split into smaller PRs.
For example, we could start by adding testnet4 support and disabling any bitcoind-dependent services while testnet4 is active. From there, we can enable other services (such as electrs) either one by one or in batches in follow-up PRs.
Of course, all changes must be covered by tests.
Once that's in place, we can follow the same approach for signet support.
msgilligan commentedon Oct 22, 2026
I agree.
My personal priority is testnet4 over signet (I want to use bitcoinix for our P2poolv2 testnet4 mining pool), so that sounds good to me.
This all sounds great to me.
prusnak commentedon Nov 13, 2026
first PR in the series - which just changes
services.bitcoind.regtesttoservices.bitcoind.network- #253 - targeted for 0.2.0further PRs incoming after this one is merged
Support signet and testnet4 deployments (#307)
prusnak commentedon Nov 23, 2026
closed via #307