Skip to content

Commit

Permalink
Add stakepools nodes to the priviledge topology.
Browse files Browse the repository at this point in the history
  • Loading branch information
dnadales authored and jbgi committed Apr 6, 2021
1 parent b50dde9 commit e5d1fee
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 27 deletions.
10 changes: 2 additions & 8 deletions README.md
Expand Up @@ -198,14 +198,6 @@ systemctl status cardano-node --lines=20
Change the value of the `lines` flag if needed, or omit it if the default suits
your needs.

### Starting afresh

Deleting the cardano-node database

```sh
nixops ssh-for-each --parallel "rm -fr /var/lib/cardano-node/db-priviledge/"
```

### About the different kind of keys

Look in the keys directory.
Expand Down Expand Up @@ -342,3 +334,5 @@ cardano-cli shelley genesis initial-addr \
--testnet-magic 42 \
--verification-key-file utxo-keys/utxo1.vkey
```

### Getting information about the nixops deployment
56 changes: 37 additions & 19 deletions topologies/priviledge.nix
@@ -1,27 +1,45 @@
pkgs: with pkgs; with lib; with topology-lib; {
coreNodes = [
{
name = "a";
pkgs: with pkgs; with lib; with topology-lib;
let

regions = {
a = { name = "eu-central-1"; /* Europe (Frankfurt) */ };
b = { name = "us-east-2"; /* US East (Ohio) */ };
c = { name = "ap-southeast-1"; /* Asia Pacific (Singapore) */ };
d = { name = "eu-west-2"; /* Europe (London) */ };
};

bftCoreNodes = let
mkBftCoreNode = mkBftCoreNodeForRegions regions;
in regionalConnectGroupWith (reverseList stakingPoolNodes)
(fullyConnectNodes [
# OBFT centralized nodes recovery nodes
(mkBftCoreNode "a" 1 {
org = "IOHK";
nodeId = 1;
})
(mkBftCoreNode "b" 1 {
org = "IOHK";
region = "eu-central-1";
producers = ["b" "c"];
}
{
name = "b";
nodeId = 2;
})
(mkBftCoreNode "c" 1 {
org = "IOHK";
region = "eu-central-1";
producers = ["c" "a"];
}
{
name = "c";
nodeId = 3;
org = "IOHK";
region = "eu-central-1";
producers = ["a" "b"];
}
];
})
]);

stakingPoolNodes = let
mkStakingPool = mkStakingPoolForRegions regions;
in regionalConnectGroupWith bftCoreNodes
(fullyConnectNodes [
(mkStakingPool "a" 1 "IOHK1" { nodeId = 4; })
(mkStakingPool "b" 1 "IOHK2" { nodeId = 5; })
(mkStakingPool "c" 1 "IOHK3" { nodeId = 6; })
]);

coreNodes = bftCoreNodes ++ stakingPoolNodes;

relayNodes = [];

in {
inherit coreNodes relayNodes;
}

0 comments on commit e5d1fee

Please sign in to comment.