-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
nixos/bitcoind: change to multi-instance + add tests #93700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Please add this change to the release notes for the next release. |
@aanderse hmm, good point, but I don't consider this to be a major rewrite, at least running both testnet and mainnet networks at the same time is a standard feature that has been omitted in the previous module. I like the rewrite, the previous code was a mess (understandable, if we consider what a mess the upstream bitcoin node is). @1000101 as mentioned, please note this change in the release notes and if possible, add yourself as maintainer (I guess you are fine with it given you added yourself to the test?). |
@mmahut thanks for feedback. |
@aanderse It may look like it, but it's just a rewrite. In fact, everything will work out of box (as previously), all you have to do is name the instance and that's it. I've updated some of stuff I found not working properly but other than that, I kept it compatible with the original service (apart from the instance name). There was no maintainer before, but it's a good point, I'll add myself. |
@mmahut yeap, will do |
@GrahamcOfBorg test bitcoind |
Looks good, thank you. |
This changes the bitcoind data directory, correct? That means that if there's already a running instance which is using There's also the issue of changing the bitcoind user, since existing files would be owned by the original bitcoind user. You may need to use NixOS |
Given this is breaking the way this service is configured I think just mentioning it in the release notes is enough, given this change will not redefine the directory nor user out of the box without users intervention. But you have a good point that it would be useful if the release notes did mention this change, just in case. @1000101 do you mind opening an addendum? |
To use this new multi-instance config with an existing bitcoind data directory, the user would have to change from something like this:
To something like this:
The key settings are:
|
The directory and user may/will change by default, but you have the option to set them manually to the original (desired) values. However, you are absolutely right and I should mention this in the release notes (incompatibility section).
Since it is a breaking change it will not automatically change, however, I definitely need to add the points you mention in the release notes. |
Thank you so much, I'll amend it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity would it make sense to use DynamicUser
at all here?
If |
|
Motivation for this change
Currently, it is not possible to run multiple instances of bitcoind (typical use case is running mainnet and testnet on the same server). While at it, I also refactored some things which I think weren't properly configured (e.g. RPC options were ignored when running testnet) or deprecated (loaOf). Plus I have also added basic tests.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)