Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement real vs mock protocol parsers #297

Closed
Jimbo4350 opened this issue Nov 13, 2019 · 1 comment
Closed

Implement real vs mock protocol parsers #297

Jimbo4350 opened this issue Nov 13, 2019 · 1 comment
Labels
priority medium issues/PRs that SHOULD be addressed. This should be done for the release, but acceptable if it doesn
Milestone

Comments

@Jimbo4350
Copy link
Contributor

Jimbo4350 commented Nov 13, 2019

Real and mock protocols require different arguments and this should be differentiated at the top level of the node.

@Jimbo4350 Jimbo4350 changed the title Include socket-path option Implement real vs mock protocol parsers Nov 21, 2019
@Jimbo4350 Jimbo4350 modified the milestones: Sprint 1.1.0, Sprint 1.2.0 Dec 6, 2019
@vhulchenko-iohk vhulchenko-iohk modified the milestones: S3 2020-01-02, S4 2020-01-16 Jan 6, 2020
@i-o-m
Copy link

i-o-m commented Jan 13, 2020

What is this blocked by?

@Jimbo4350 Jimbo4350 added the priority medium issues/PRs that SHOULD be addressed. This should be done for the release, but acceptable if it doesn label Jan 14, 2020
@Jimbo4350 Jimbo4350 modified the milestones: S4 2020-01-16, S6 2020-02-13, S5 2020-01-30 Jan 16, 2020
iohk-bors bot added a commit that referenced this issue Feb 3, 2020
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority medium issues/PRs that SHOULD be addressed. This should be done for the release, but acceptable if it doesn
Projects
None yet
Development

No branches or pull requests

3 participants