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

Genesis Files Default to Nothing in Emulator Initialization #35

Open
Dr-Mazen-Khaddaj opened this issue Sep 5, 2024 · 1 comment
Open
Assignees

Comments

@Dr-Mazen-Khaddaj
Copy link

Dr-Mazen-Khaddaj commented Sep 5, 2024

Description: I've been reviewing how the emulator loads Genesis files upon start and found that it defaults to Nothing. I want to clarify if this is intentional or if there's an option to provide Genesis files explicitly. If not, is there a plan to support this functionality, especially with the upcoming Conway upgrade?

Steps to Reproduce:

  • Check the code responsible for loading the genesis files (cardano-node-socket-emulator).
  • Notice that the main uses the default implementation (defaultNodeServerConfig which is set to Nothing).

Expected Behavior: An explicit genesis file should be required or loaded if available.

Actual Behavior: Defaults to Nothing without indicating the need for a genesis file.

Questions:

Would you happen to know if this is the intended behavior?
How does the emulator load Genesis files upon the start?

Additional Information: This could affect configurations when simulating different blockchain states during testing or development.

@smelc
Copy link
Collaborator

smelc commented Sep 18, 2024

@Dr-Mazen-Khaddaj> interim maintainer of cardano-node-emulator here 👋

Indeed as you pointed out, it is not possible actually to specify custom genesis files, as the paths are defaulted to Nothing here and the default value is used in the main.

We could have the main take command-line parameters (using optparse-applicative) and allow the user to give paths to its own genesis files. Would that help with you use case?

@smelc smelc self-assigned this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants