Skip to content

cardano-ledger can not/no longer parse AlonzoGenesis from JSON / Yaml #5340

@KtorZ

Description

@KtorZ

Hello. The parser for the AlonzoGenesis expects the PlutusV1 cost models to contain keys/values for parameters introduced well after the definition of that genesis configuration. As a result, one cannot decode the genesis config from JSON/Yaml directly.

To make it work, one must patch the PlutusV1's cost model with placeholder values for the missing parameters (which is wrong because those parameters simply did not exist at the time). See for example:

https://github.com/CardanoSolutions/ogmios/blob/master/server/src/Ogmios/App/Configuration.hs#L147-L203

I am not the only person bumping into this, as similar code can be witnessed in the cardano-api which has to work around that too:

https://github.com/IntersectMBO/cardano-api/blob/master/cardano-api/src/Cardano/Api/Genesis/Internal.hs#L372-L440

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions