Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.

fix: align cost model key lists with Haskell ParamName enum order - #51

Closed
jonathanlim222 wants to merge 5 commits into
mainfrom
cost-model-changes
Closed

fix: align cost model key lists with Haskell ParamName enum order#51
jonathanlim222 wants to merge 5 commits into
mainfrom
cost-model-changes

Conversation

@jonathanlim222

@jonathanlim222 jonathanlim222 commented May 15, 2026

Copy link
Copy Markdown
Contributor

This PR updates the cost model logic to support the upcoming v11 changes.

  • Cost model initialization based on protocol version: Cost models are now parameterized by protocol version, enabling version-specific builtin costs (e.g. Plomin builtins at PV10+, PV11 builtins). Added initialize_cost_model and default_v3_cost_model entry points, along with eval_with_params for evaluation with explicit protocol version and cost model parameters.
  • Replace program-version gating with protocol-version gating for constr/case: The textual parser, flat decoder, and CEK machine now use a unified is_constr_case_available() check that considers both protocol version (>= 9) and program version (>= 1.1.0), instead of only checking the UPLC program version.

@jonathanlim222
jonathanlim222 marked this pull request as ready for review May 15, 2026 20:43
@jonathanlim222
jonathanlim222 requested a review from a team as a code owner May 15, 2026 20:43
@jonathanlim222
jonathanlim222 force-pushed the cost-model-changes branch 2 times, most recently from 5791470 to 0ba280f Compare May 29, 2026 15:36
Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>
Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>
Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>
Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>
Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>
@KtorZ KtorZ closed this Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants