IntersectMBO / IntersectMBO/plutus

Make `applyCostModelParams` code more explicit

Open
#5,946 0 comments 0 reactions 0 assignees View on GitHub
Costing Internal status: triaged tech debt Textual representation
Dominant language
Haskell
Stars
1.6k
Forks
508
Avg merge
3d 10h
Merged PRs (30d)
22

Description

We have to allow dynamic updates of the cost model parameters, and [currently this is done](https://github.com/IntersectMBO/plutus/blob/d319fe5844cf9fc791510d7b63bf76322a97d2d5/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/CostModelInterface.hs#L37) by converting our internal cost model structures to JSON, flattening that into a hashmap using functions from Aeson, merging that with the new data, and then reversing the process. This is very complicated and we should do something better. At the very least we should be able to dig out what Aeson is actually doing and do it directly on the level of our datatypes. See also #5945 (which we should do first).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.