Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename PlutusV3 directory to UPLC #1

Open
SeungheonOh opened this issue Jan 2, 2025 · 4 comments
Open

Rename PlutusV3 directory to UPLC #1

SeungheonOh opened this issue Jan 2, 2025 · 4 comments

Comments

@SeungheonOh
Copy link

Currently, definitions of UPLC and CEK machine itself it under PlutusV3 directory. Because PlutusV3 is ledger api version and not name for UPLC, it would be better to have that directory renamed to "UPLC" or something of that nature. "PlutusV[1|2|3]" would need to hold ledger api that is how data like TxInfo is encoded for the ledger types to be used in scripts

@mpetruska
Copy link
Collaborator

The UPLC and CEK machine are tied to the Plutus version, hence I think it makes sense to put the UPLC and CEKMachine mudules under the "namespace" PlutusV3.
I think the data types you mention (TxInfo and others) might be implemented in a Data module under the same directory.

@SeungheonOh
Copy link
Author

SeungheonOh commented Jan 2, 2025

I guess it's rather murky because of the way how they add new builtins and bump UPLC version 😓 There is three versioning: "Ledger version", "Protocol version", "Plutus Core language version".

Ledger version PlutusV[1|2|3] that defines how ledger data is provided to script; Protocol version defines how much builtin function evaluator gets; and plutus core version that defines the version of UPLC itself(which there is only two 0.1.0 and 0.1.1 with SOP terms).

Protocol version and Plutus Core language version is rather tied and IMO there should just be one version for both, but they don't depend on ledger version at all. Which means said Data module can be entirely taken away from UPLC definition. Since UPLC version(and protocol version) is(and likely will be) backward compatible, src/UPLC/ can contain latest definitions of UPLC terms, evaluator, and builtin functions. src/PlutusV[1|2|3]/ can hold each ledger types corresponding to ledger version. That way all ledger version can be supported without duplicating definitions of uplc terms and builtins.

This is versioning mess, but this is what we get :/

@mpetruska
Copy link
Collaborator

I will think about it, but it does not seem to make sense to have a UPLC module under the UPLC directory. That would mean that users of the library would need to Import UPLC.UPLC...

@SeungheonOh
Copy link
Author

SeungheonOh commented Jan 2, 2025

Definitions can be split so there's UPLC.Term, UPLC.Builtins, etc Nevermind, there's already UPLC.Builtins, but just renaming it to UPLC.Term would still work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants