Skip to content

Commit

Permalink
imp: add a peerSnapshotFile nixos svc opt
Browse files Browse the repository at this point in the history
  • Loading branch information
johnalotoski authored and neilmayhew committed Jan 23, 2025
1 parent 1df79ee commit 586803e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions nix/nixos/cardano-node-service.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ let
bootstrapPeers = cfg.bootstrapPeers;
} // optionalAttrs (cfg.usePeersFromLedgerAfterSlot != null) {
useLedgerAfterSlot = cfg.usePeersFromLedgerAfterSlot;
} // optionalAttrs (cfg.peerSnapshotFile i != null) {
peerSnapshotFile = cfg.peerSnapshotFile i;
};

oldTopology = i: {
Expand Down Expand Up @@ -717,6 +719,21 @@ in {
else [];
description = ''RTS profiling options'';
};

peerSnapshotFile = mkOption {
type = funcToOr nullOrStr;
default = null;
example = i: "/etc/cardano-node/peer-snapshot-${toString i}.json";
apply = x: if builtins.isFunction x then x else _: x;
description = ''
If set, cardano-node will load a peer snapshot file from the declared absolute path.
The peer snapshot file contains a snapshot of big ledger peers taken at some arbitrary slot.
These are the largest pools that cumulatively hold 90% of total stake.
A peer snapshot file can be generated with a `cardano-cli query ledger-peer-snapshot` command.
'';
};
};
};

Expand Down

0 comments on commit 586803e

Please sign in to comment.