Skip to content

Genesis Files Default to Nothing in Emulator Initialization #35

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

Open
Dr-Mazen-Khaddaj opened this issue Sep 5, 2024 · 5 comments
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
@smelc
Copy link
Collaborator

smelc commented Mar 12, 2025

As I'm going to stop working on the team maintaining cardano-node-emulator soon, maybe @mmontin you can take this one?

@smelc smelc removed their assignment Mar 18, 2025
@smelc
Copy link
Collaborator

smelc commented Mar 18, 2025

@mmontin> Should probably be assigned to you, but I can't assign you in the corresponding field 🙃

@mmontin
Copy link
Contributor

mmontin commented Apr 17, 2025

@smelc That's definitely something I intend to look into, depending on the permissions I'm given regarding CNE. Once the main PR is merged (should be soon) we can collectively come up with a plan forward for all the missing features and shortcomings of CNE, including default parameters and initial emulated ledger state. At the moment, it is likely the the cost models by default as well are flawed.

@smelc
Copy link
Collaborator

smelc commented Apr 17, 2025

@mmontin> I can assign you now 🙃

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

3 participants