Merge fort-nix/nix-bitcoin#416: secure-node: stop pruning liquidd

bac8518e7c secure-node: stop pruning liquidd (Jonas Nick)
347a0f3aee secure-node: add dummy option to determine if the preset is enabled (Jonas Nick)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK bac8518e7c

Tree-SHA512: df09889933355e97ccfa0cbbe3e5776e6984c492d52dd51e97220e7efbac0248599ee1187773d0db4f314b47def7cb6c5cd1074ec92cd4cfa824c8f1ee11d547
This commit is contained in:
Jonas Nick 2021-10-31 15:41:47 +00:00
commit 41514b8667
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
3 changed files with 23 additions and 2 deletions

View File

@ -259,5 +259,5 @@
# The nix-bitcoin release version that your config is compatible with. # The nix-bitcoin release version that your config is compatible with.
# When upgrading to a backwards-incompatible release, nix-bitcoin will display an # When upgrading to a backwards-incompatible release, nix-bitcoin will display an
# an error and provide hints for migrating your config to the new release. # an error and provide hints for migrating your config to the new release.
nix-bitcoin.configVersion = "0.0.53"; nix-bitcoin.configVersion = "0.0.57";
} }

View File

@ -12,6 +12,11 @@ in {
./enable-tor.nix ./enable-tor.nix
]; ];
options = {
# Used by ../versioning.nix
nix-bitcoin.secure-node-preset-enabled = {};
};
config = { config = {
# For backwards compatibility only # For backwards compatibility only
nix-bitcoin.secretsDir = mkDefault "/secrets"; nix-bitcoin.secretsDir = mkDefault "/secrets";
@ -39,7 +44,9 @@ in {
}; };
services.liquidd = { services.liquidd = {
prune = 1000; # Enable `validatepegin` to verify that a transaction sending BTC into
# Liquid exists on Bitcoin. Without it, a malicious liquid federation can
# make the node accept a sidechain that is not fully backed.
validatepegin = true; validatepegin = true;
listen = true; listen = true;
}; };

View File

@ -169,6 +169,20 @@ let
This includes the final database size (0.4) plus some extra storage (0.2). This includes the final database size (0.4) plus some extra storage (0.2).
''; '';
} }
{
version = "0.0.57";
condition = config.nix-bitcoin ? secure-node-preset-enabled && config.services.liquidd.enable;
message = ''
The `secure-node.nix` preset does _not_ set `liquidd.prune = 1000` anymore.
- If you want to keep the same behavior as before, manually set
`services.liquidd.prune = 1000;` in your configuration.nix.
- Otherwise, if you want to turn off pruning, you must instruct liquidd
to reindex by setting `services.liquidd.extraConfig = "reindex=1";`.
This can be removed after having started liquidd with that option
once.
'';
}
]; ];
mkOnionServiceChange = service: { mkOnionServiceChange = service: {