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

create-testnet-data: fix generation of Conway genesis w.r.t. delegation of voting power #987

Closed

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Dec 4, 2024

Changelog

- description: |
    Fix that the `initialDReps` fields in the `conway-genesis.json` file generated by `create-testnet-data` was incomplete.
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
  - bugfix         # fixes a defect
  - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

While testing #911, I noticed that the SPO created by create-testnet-data doesn't delegate its voting power to a DRep.

So I looked at create-testnet-data and found that only the --stake-delegators created by create-testnet-data delegate to DReps (whereas the SPO is created by --pools). But then, starting with --stake-delegators, there is a bug (introduced in https://github.com/IntersectMBO/cardano-cli/pull/940/files#diff-46f6afb73150af450b10d232ebdca10061efd5a69e268f5b0870439aca3b19e0) that causes an incorrect conway-genesis to be created.

This PR fixes that

How to trust this PR

TBD

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@smelc
Copy link
Contributor Author

smelc commented Dec 11, 2024

This PR is useless, by virtue of the explanation here: IntersectMBO/cardano-ledger#4782 (comment)

This PR was causing the following change:

image

But it is not required, because, as @lehins explained; the field delegators is derived from delegs; so we don't need to populate it. I'll do another PR to add some comments to the code, so that we keep a trace of this, because this is confusing IMO.

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

Successfully merging this pull request may close these issues.

1 participant