-
Notifications
You must be signed in to change notification settings - Fork 155
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
JSON roundtripping of ConwayGenesis fails on a particular file #4782
Comments
@smelc That is the expected behavior. Because it is when the ConwayGenesis applied the delegations in the I do understand however how this can be confusing and undesirable for |
@lehins> Can you elaborate on what is the master data here? I'm asking because in CLI we are actually populating
Sounds reasonable to me 👍 |
So, you were actually doing it correctly before.
No, you do not need to populate both. All you need is the |
Thanks @lehins for the additional answers, very much appreciated 🙏 I believe you can close the issue 🙂 |
Dear ledger team, thank you very much for your hard work!
While working on
create-testnet-data
(the command to generate testnet configurations in cardano-cli), I observed in a test (in this PR) that decoding aconway-genesis.json
file was causing some data to be lost: thedelegators
fields in theinitialDReps
list.Here is how to reproduce it using
cabal repl
:conway-genesis.json
is the following: conway-genesis.jsonconway-genesis-roundtrip.json
is the following: conway-genesis-roundtrip.jsonWhen comparing the input file
conway-genesis.json
(to the left) with the file obtained after decoding and reencoding (conway-genesis-roundtrip.json
), the value within thedelegators
fields have been lost:Let me know if I can be of any help to solve this! Note that the input file is not generated manually, but programmatically, here: https://github.com/IntersectMBO/cardano-cli/blob/5e1e4f2ef30da7ffe02642a89870f990bd2d2216/cardano-cli/src/Cardano/CLI/EraBased/Run/Genesis/CreateTestnetData.hs#L369
The text was updated successfully, but these errors were encountered: