Skip to content

Commit 68825d3

Browse files
mgmeierfmaste
authored andcommitted
cardano-topology: rm non-p2p topology
1 parent 9547360 commit 68825d3

File tree

188 files changed

+1464
-4605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+1464
-4605
lines changed

bench/cardano-topology/app/cardano-topology.hs

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ data Cli =
3030
| ProjectionFor FilePath ProjectionFor
3131

3232
data ProjectionFor =
33-
-- Node i, base port, p2p on or off.
34-
BFT Int Int Bool
35-
| Pool Int Int Bool
36-
-- Nodes indices, base port.
37-
| Explorer Int Int
33+
-- Node i, base port.
34+
Core Int Int
35+
| Relay Int Int
3836
| ChaindbServer
3937
| Proxy
4038
deriving Show
@@ -218,41 +216,22 @@ cliParserProjection =
218216
<> metavar "NODENUMBER"
219217
<> help "Base port"
220218
)
221-
parseEnableP2P =
222-
flag False True
223-
( long "enable-p2p"
224-
<> help "Create a P2P topology"
225-
)
226-
parseSrcIndices =
227-
option auto
228-
( long "nodes"
229-
<> metavar "NODES"
230-
<> help "Create a non-P2P topology with nodes [0..(NODES-1)]"
231-
)
232219

233220
in subparser $
234-
command "bft"
221+
command "core"
235222
(info
236-
(BFT <$> parseNodeNumber <*> parseBasePort <*> parseEnableP2P)
237-
( progDesc "BFT"
223+
(Core <$> parseNodeNumber <*> parseBasePort)
224+
( progDesc "Core"
238225
<> fullDesc
239-
<> header "Generate the topology file for a BFT node"
226+
<> header "Generate the topology file for a `coreNodes`"
240227
)
241228
)
242-
<> command "pool"
229+
<> command "relay"
243230
(info
244-
(Pool <$> parseNodeNumber <*> parseBasePort <*> parseEnableP2P)
245-
( progDesc "Pool"
231+
(Relay <$> parseNodeNumber <*> parseBasePort)
232+
( progDesc "Relay"
246233
<> fullDesc
247-
<> header "Generate the topology file for a pool node"
248-
)
249-
)
250-
<> command "explorer"
251-
(info
252-
(Explorer <$> parseSrcIndices <*> parseBasePort)
253-
( progDesc "Explorer"
254-
<> fullDesc
255-
<> header "Generate the topology file for an explorer node"
234+
<> header "Generate the topology file for a `relayNodes`"
256235
)
257236
)
258237
<> command "chaindb-server"
@@ -333,14 +312,7 @@ writeProjectionFor topology projectionFor = do
333312
BSL8.putStrLn $ writeProjectionFor' topology projectionFor
334313

335314
writeProjectionFor' :: Topo.Topology -> ProjectionFor -> BSL8.ByteString
336-
writeProjectionFor' topology (BFT i basePort p2pEnabled) = writeProjectionForProducer topology i basePort p2pEnabled
337-
writeProjectionFor' topology (Pool i basePort p2pEnabled) = writeProjectionForProducer topology i basePort p2pEnabled
338-
writeProjectionFor' _ (Explorer srcIndices basePort) = Aeson.encode $ Projection.projectionExplorer srcIndices basePort
315+
writeProjectionFor' topology (Core i basePort) = Aeson.encode $ Projection.projectionCoreNode topology i basePort
316+
writeProjectionFor' topology (Relay i basePort) = Aeson.encode $ Projection.projectionRelayNode topology i basePort
339317
writeProjectionFor' topology ChaindbServer = Aeson.encode $ Projection.projectionChainDB topology
340318
writeProjectionFor' _ Proxy = error "Nodes of kind \"proxy\" are not supported, Nix handles this case!"
341-
342-
writeProjectionForProducer :: Topo.Topology -> Int -> Int -> Bool -> BSL8.ByteString
343-
writeProjectionForProducer topology i basePort enableP2P =
344-
if enableP2P
345-
then Aeson.encode $ Projection.projectionP2P topology i basePort
346-
else Aeson.encode $ Projection.projection topology i basePort

bench/cardano-topology/cardano-topology.cabal

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 3.0
22

33
name: cardano-topology
4-
version: 8.4.0
4+
version: 10.6.0
55
synopsis: A cardano topology generator
66
description: A cardano topology generator.
77
category: Cardano,
@@ -19,18 +19,12 @@ data-files: data/test/10-coay/*.json
1919
data/test/ci-test-coay/*.json
2020
data/test/ci-test-dense10-coay/*.json
2121
data/test/ci-test-nomadperf-coay/*.json
22-
data/test/ci-test-nomadperf-nop2p-coay/*.json
23-
data/test/ci-test-p2p-coay/*.json
2422
data/test/default-coay/*.json
2523
data/test/default-nomadperf-coay/*.json
26-
data/test/default-nomadperf-nop2p-coay/*.json
27-
data/test/default-p2p-coay/*.json
2824
data/test/fast-solo-coay/*.json
2925
data/test/forge-stress-coay/*.json
30-
data/test/forge-stress-p2p-coay/*.json
3126
data/test/model-value-coay/*.json
3227
data/test/trace-bench-coay/*.json
33-
data/test/value-nomadperf-nop2p-coay/*.json
3428
data/test/value-volt-nomadperf-coay/*.json
3529

3630
common project-config
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
2-
"Producers": [
2+
"bootstrapPeers": null,
3+
"localRoots": [
34
{
4-
"addr": "127.0.0.1",
5-
"port": 30001,
5+
"accessPoints": [
6+
{
7+
"address": "127.0.0.1",
8+
"port": 30001
9+
}
10+
],
11+
"advertise": false,
12+
"trustable": true,
613
"valency": 1
714
}
8-
]
15+
],
16+
"publicRoots": [],
17+
"useLedgerAfterSlot": -1
918
}
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
2-
"Producers": [
2+
"bootstrapPeers": null,
3+
"localRoots": [
34
{
4-
"addr": "127.0.0.1",
5-
"port": 30002,
5+
"accessPoints": [
6+
{
7+
"address": "127.0.0.1",
8+
"port": 30002
9+
}
10+
],
11+
"advertise": false,
12+
"trustable": true,
613
"valency": 1
714
}
8-
]
15+
],
16+
"publicRoots": [],
17+
"useLedgerAfterSlot": -1
918
}
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
2-
"Producers": [
2+
"bootstrapPeers": null,
3+
"localRoots": [
34
{
4-
"addr": "127.0.0.1",
5-
"port": 30003,
5+
"accessPoints": [
6+
{
7+
"address": "127.0.0.1",
8+
"port": 30003
9+
}
10+
],
11+
"advertise": false,
12+
"trustable": true,
613
"valency": 1
714
}
8-
]
15+
],
16+
"publicRoots": [],
17+
"useLedgerAfterSlot": -1
918
}
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
2-
"Producers": [
2+
"bootstrapPeers": null,
3+
"localRoots": [
34
{
4-
"addr": "127.0.0.1",
5-
"port": 30004,
5+
"accessPoints": [
6+
{
7+
"address": "127.0.0.1",
8+
"port": 30004
9+
}
10+
],
11+
"advertise": false,
12+
"trustable": true,
613
"valency": 1
714
}
8-
]
15+
],
16+
"publicRoots": [],
17+
"useLedgerAfterSlot": -1
918
}
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
2-
"Producers": [
2+
"bootstrapPeers": null,
3+
"localRoots": [
34
{
4-
"addr": "127.0.0.1",
5-
"port": 30005,
5+
"accessPoints": [
6+
{
7+
"address": "127.0.0.1",
8+
"port": 30005
9+
}
10+
],
11+
"advertise": false,
12+
"trustable": true,
613
"valency": 1
714
}
8-
]
15+
],
16+
"publicRoots": [],
17+
"useLedgerAfterSlot": -1
918
}
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
2-
"Producers": [
2+
"bootstrapPeers": null,
3+
"localRoots": [
34
{
4-
"addr": "127.0.0.1",
5-
"port": 30006,
5+
"accessPoints": [
6+
{
7+
"address": "127.0.0.1",
8+
"port": 30006
9+
}
10+
],
11+
"advertise": false,
12+
"trustable": true,
613
"valency": 1
714
}
8-
]
15+
],
16+
"publicRoots": [],
17+
"useLedgerAfterSlot": -1
918
}
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
2-
"Producers": [
2+
"bootstrapPeers": null,
3+
"localRoots": [
34
{
4-
"addr": "127.0.0.1",
5-
"port": 30007,
5+
"accessPoints": [
6+
{
7+
"address": "127.0.0.1",
8+
"port": 30007
9+
}
10+
],
11+
"advertise": false,
12+
"trustable": true,
613
"valency": 1
714
}
8-
]
15+
],
16+
"publicRoots": [],
17+
"useLedgerAfterSlot": -1
918
}
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
2-
"Producers": [
2+
"bootstrapPeers": null,
3+
"localRoots": [
34
{
4-
"addr": "127.0.0.1",
5-
"port": 30008,
5+
"accessPoints": [
6+
{
7+
"address": "127.0.0.1",
8+
"port": 30008
9+
}
10+
],
11+
"advertise": false,
12+
"trustable": true,
613
"valency": 1
714
}
8-
]
15+
],
16+
"publicRoots": [],
17+
"useLedgerAfterSlot": -1
918
}

0 commit comments

Comments
 (0)