-
Notifications
You must be signed in to change notification settings - Fork 12
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
Bump to latest Plutarch #52
Conversation
Bump plutus and plutarch version Change script role name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need this to make example compile and CI pass
Co-authored-by: Alberto Fanton <alberto.fanton@protonmail.com>
Co-authored-by: Alberto Fanton <alberto.fanton@protonmail.com>
@@ -1,3 +1,8 @@ | |||
# 0.7.0 - Bump plutus version to 1.30.0.0 | |||
|
|||
- Renamed `ValidatorRole` and `MintingPolicyRole` to `ThreeArgumentScript` and `TwoArgumentScript`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the point behind this change. I think it's not only unnecessary, but perhaps also backwards.
The roles communicate to the user the purpose of a script. We have not removed any ambiguity, but added more. TwoArgumentScript
does not tell us whether it's a minting policy or a staking validator, yet their usage is vastly different.
Unifying should not be done at a type level. After all, type
aliases are almost always inferior to newtype
s. This is the same concept. Unifying should instead be done at the instance and usage level. You could have parseStakeValidator
and parseMintingPolicy
both use common helpers, but it's important for both of them to actually check the role.
The argument that "runMintingPolicy" and "runStakingValidator" have the same implementation seems moot. Just alias them. They are usage site, it's fine to alias them there. Or even have runScriptWithDatum
and runScript
depending on how you want the interface to be. Notice how all these changes are losing information downstream. It doesn't seem correct to lose the information at the source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Furthermore, the ecosystem is much more aware of the terms "StakingValidator", "Validator", "MintingPolicy". Introducing new terms (though they are very simple terms) seems weird. I have never seen any project so far refer to them as "ThreeArgumentScript" and "TwoArgumentScript" - but this point is far less relevant than the fact that we are losing information by this transformation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @TotallyNotChase, I'm the one who introduced the naming in the last PR. This comes from the idea that we cannot distinguish between a stake validator and a minting policy. I don't know what is more confusing: having a staking validator with the role MintingPolicyRole
or one with the role TwoArgumentScript
. The only information that got lost in the script role is, as far as I remember, the script's versioning. I agree that the script role does not make sense anymore. Perhaps we should drop it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point is that there can be a new role for StakeValidator. Again, this is not redundant because this is essentially a typing component. Same way as newtype
s often carry invariants, therefore not being redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that role description really relevant? In V3, we will have even more unified scripts. From that perspective, I don't think keeping those roles will be very useful in the future; it might increase confusion. Adding a new role for StakeValidator
does not add much value and is not particularly future-proof IMHO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the CIP: CIP-0069
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, It's this one! It's been a long time but I remember this from back when Maks actually proposed it (he used to work at MLabs).
Anyway, this isn't actually an approved CIP and it has been in talks for awhile. There's no actual indication that it'll be approved and implemented. I remember Las liked the idea back when me and him were initially building Plutarch but it never ended up affecting any development since it was never even close to being actually approved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless we're talking about this one: cardano-foundation/CIPs#784 ?
It seems like this one's different from the one linked at cardano.org
, but it seems more promising.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this one's different from the one linked at cardano.org, but it seems more promising.
What do you mean? Do you see differences between the link I've shared and that PR? To me it seems the diffs into that branch were ported into cardano.org (actually I assume that page is automatically generated). Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linked CIP PR in the cardano.org page is the original old PR (the latest comment on it just says that it is not approved). But looks like the diffs are indeed from an updated PR that seems more promising.
I can see that happening in the future. And so, as I mentioned before, I'm totally open to removing roles entirely. But please not in this PR. In a separate PR in the future, when that CIP is actually implemented and the ecosystem has started moving towards it.
Could the changes to the role be removed please so we can merge the Plutarch bump? Let's leave that or any similar changes to a separate PR. I can make the changes myself if necessary. cc @kozross |
I'm merging this in to get the Plutarch update in but I will have to rollback the script arg changes. |
No description provided.