CardanoSolutions / ogmios

❇️ A WebSocket JSON/RPC bridge for Cardano
https://ogmios.dev
Mozilla Public License 2.0
304 stars 90 forks source link

`ProtocolParametersAlonzo.coinsPerUtxoWord` renamed upstream to `lovelacePerUTxOWord` #121

Closed rhyslbw closed 3 years ago

rhyslbw commented 3 years ago

The Alonzo protocol parameter coinsPerUTxOWord was renamed to lovelacePerUTxOWord, but we're still using the legacy name: https://github.com/CardanoSolutions/ogmios/blob/d82027bad67ee6e1afffceb46aba5bb0e40fd0c5/clients/TypeScript/packages/schema/src/index.ts#L1182

I'm struggling to see how this is even working if there's no mapping between the two: https://github.com/CardanoSolutions/ogmios/blob/5be2c86e495e966c2c3e58e38720197d284932e8/server/src/Ogmios/Data/Json/Alonzo.hs#L188-L190

:thinking:

rhyslbw commented 3 years ago

The name actually went from adaPerUTxOWord to lovelacePerUTxOWord, which you can observe in the git blame

https://github.com/input-output-hk/cardano-configurations/blame/master/network/mainnet/genesis/alonzo.json

KtorZ commented 3 years ago

It is actually referred to as coinsPerUTxOWord in the ledger code as well. Only the genesis JSON key is different for some reason. I still prefer the "coins" version though, because it's consistent with some other constructors. The JSON representations are already quite different between Ogmios and the genesis file and the argument for aligning them isn't really clear to me :no_mouth: ?

rhyslbw commented 3 years ago

It is actually referred to as coinsPerUTxOWord in the ledger code as well

Oh, that's surprising. I have always expected the genesis to contain the current era's protocol parameters, and had even modelled the Shelley genesis types in cardano-graphql this way. 🤷