Skip to content

Commit

Permalink
wb: amend Ouroboros Genesis config on nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmeier committed Feb 4, 2025
1 parent aa72c7d commit fd1209f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion nix/workbench/service/nodes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ let
then go {} (__head eras) (__tail eras)
else throw "configHardforksIntoEra: unknown era '${era}'";

valency = nodeSpec:
let
srv = (nodeService nodeSpec).topology.value;
val = if hasAttr "localRoots" srv
then let lr = head srv.localRoots; in lr.valency
else length srv.Producers;
in __trace "node ${toString nodeSpec.name} has valency ${toString val}" val;

##
## nodeServiceConfig :: NodeSpec -> ServiceConfig
##
Expand Down Expand Up @@ -104,7 +112,10 @@ let
SnapshotInterval = 4230;
ChainSyncIdleTimeout = 0;

ConsensusMode = "GenesisMode";
ConsensusMode = "GenesisMode";
MinBigLedgerPeersForTrustedState = 0;
SyncTargetNumberOfActivePeers = valency nodeSpec;


ByronGenesisFile = "../genesis/byron/genesis.json";
ShelleyGenesisFile = "../genesis/genesis-shelley.json";
Expand Down

0 comments on commit fd1209f

Please sign in to comment.