-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
335: Implement real vs mock protocol selection r=Jimbo4350 a=Jimbo4350 Implements the `NodeProtocolMode` type which differentiates whether the node is running a real protocol vs a mock protocol. Changes: - When running a real protocol, the topology comes from a `JSON` file which is decoded to `RealNodeTopology` which specifies the addresses the node intends to connect to. - `socket-dir` command line argument is changed to `socket-path` i.e you must specify socket paths and not dirs anymore. - `NodeId` only needs to be specified for mock protocols (https://github.com/input-output-hk/cardano-node/blob/d24cefd7a4fb1afbf13e8e7f7971e22704673f98/cardano-config/src/Cardano/Config/Protocol.hs#L129) The `cardano-node` client is now as follows (with further help for both `run` and `run-mock` via `cabal exec cardano-node run/run-mock -- --help`): ``` Usage: cardano-node (run | run-mock) [--help] Start node of the Cardano blockchain. Available options: --help Show this help text Execute node with a real protocol. run Execute node with a real protocol. Execute node with a mock protocol. run-mock Execute node with a mock protocol. ``` Relevant: #297, #318, #314 Co-authored-by: Jordan Millar <[email protected]>
- Loading branch information
Showing
64 changed files
with
692 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
[{"nodeAddress":{"addr":"127.0.0.1","port":3001},"nodeId":0,"producers":[{"addr":"127.0.0.1","port":7777,"valency":1}]}] | ||
{ | ||
"Producers":[ | ||
{ | ||
"addr":"127.0.0.1", | ||
"port":7777, | ||
"valency":1 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
benchmarking/cluster3nodes/configuration/simple-topology-real-pbft-node-0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
{ | ||
"Producers":[ | ||
{ | ||
"addr":"127.0.0.1", | ||
"port":3001, | ||
"valency":1 | ||
}, | ||
{ | ||
"addr":"127.0.0.1", | ||
"port":3002, | ||
"valency":1 | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
benchmarking/cluster3nodes/configuration/simple-topology-real-pbft-node-1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"Producers":[ | ||
{ | ||
"addr":"127.0.0.1", | ||
"port":3000, | ||
"valency":1 | ||
}, | ||
{ | ||
"addr":"127.0.0.1", | ||
"port":3002, | ||
"valency":1 | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
benchmarking/cluster3nodes/configuration/simple-topology-real-pbft-node-2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"Producers":[ | ||
{ | ||
"addr":"127.0.0.1", | ||
"port":3000, | ||
"valency":1 | ||
}, | ||
{ | ||
"addr":"127.0.0.1", | ||
"port":3001, | ||
"valency":1 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.