Description
Internal/External
Internal
Area
Other
Context
When providing plutus cost models as an input to cardano-cli:
- as a map
- excess parameters are ignored, only existing parameters are checked.
- If the existing parameters are missing, the parsing fails and the error is reported.
- as a list
- lists longer than expected are consumed up to the number of existing parameters - excess parameters are ignored.
- If the list of cost model parameters is too short, the missing parameters are defaulted to
maxBound :: Int64
and no error is reported.
Description
When an user provides a cost model containing too many or not enough parameters, cardano-cli
should fail with an appropriate message.
Additional info
The original issue:
The v2 cost models included in Alonzo Genesis validation and conversion was implemented in
- Fix reading of Plutus V2 cost models with different lengths in AlonzoGenesis in different eras cardano-api#564 - parts of the logic potentially can be reused for this as well.
Warning
Needs clarification: Which cost models should we cover with this validation? V1? V2? V3?