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

Add semantically scoped vm#23

Merged
yHSJ merged 9 commits into
pragma-org:mainfrom
jonathanlim222:semantically-scoped-vm
Nov 11, 2025
Merged

Add semantically scoped vm#23
yHSJ merged 9 commits into
pragma-org:mainfrom
jonathanlim222:semantically-scoped-vm

Conversation

@jonathanlim222

@jonathanlim222 jonathanlim222 commented Oct 3, 2025

Copy link
Copy Markdown
Contributor

This PR adds initializing the cost model from the incoming protocol params.

Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>
@jonathanlim222 jonathanlim222 requested a review from a team as a code owner October 3, 2025 16:33
Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>
Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>
@jonathanlim222 jonathanlim222 changed the title feat: added builtin cost model A Add semantically scoped vm Oct 8, 2025
Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>
Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>
Comment thread crates/uplc/src/machine/cost_model/builtin_costs/mod.rs Outdated
Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>
Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>

@yHSJ yHSJ left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I like this a lot more. I gave it a rather brief review, I'll dig more in depth later if I have time (I am also struggling a bit with the new files changed view, which seems to handle files individually when there are lots of changes), so I'm not sure if I missed anything.

I love knowing that we will not be panicking when running a program with unsupported functions in it based on the plutus version. I think the biggest thing I'd think about for now is to use a trait instead of an enum with variants for each version. But, this is looking a lot better and I'd be willing to say that we can focus on "cleanup and improvement" in a future iteration.

Comment thread crates/uplc/src/machine/cost_model/builtin_costs/builtin_costs_v1.rs Outdated
Comment thread crates/uplc/src/machine/cost_model/builtin_costs/mod.rs Outdated
Comment thread crates/uplc/src/machine/cost_model/builtin_costs.rs Outdated
jonathanlim222 and others added 2 commits November 7, 2025 11:34
Signed-off-by: Jonathan Lim <jonathan.lim.222@gmail.com>
Signed-off-by: yHSJ <josh@securitybot.info>
@yHSJ yHSJ merged commit a4132f7 into pragma-org:main Nov 11, 2025
5 of 6 checks passed
Quantumplation pushed a commit that referenced this pull request Mar 15, 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.

4 participants