-
Notifications
You must be signed in to change notification settings - Fork 21
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
Plutus v3 #83
base: main
Are you sure you want to change the base?
Plutus v3 #83
Conversation
begin code review
test validator for sancho net: validator {
fn params(_datum: Void, _redeemer: Void, context: ScriptContext) -> Bool {
when context.purpose is {
Spend(_) -> {
let d = #"97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb"
let g1 = builtin.bls12_381_g1_uncompress(d)
let x = g1 |> builtin.bls12_381_g1_compress
x == d
}
_ -> False
}
}
} Should be able to compile the script, create a reference script utxo, and spend into and out of that contract. |
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.
Awesome! Thanks for doing this. I have made a few naming suggestion essentially trying to explicit some of the guidelines / conventions that we've been following in the standard library.
I'd be nice to get also extend those acceptance tests here: https://github.com/aiken-lang/aiken/tree/main/examples/acceptance_tests/script_context with Conway transactions, though this requires having already updated Aiken's simulate
command and internals with the ability to create full Plutus V3 script contexts. In the meantime, using Ogmios for evaluating transactions is a viable option.
ChangedParameters -> ChangedProtocolParameters Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com>
ParameterChange -> ProtocolParameterChange Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com>
return_addr -> return_address Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com>
constitution -> guardrails Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com>
Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com>
Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com>
Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com>
Co-authored-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com>
Name changes and adding back in the yml workspace file
first rev for new naming convention
With Aiken 1.0.26, the use of the Dict type was discouraged. https://github.com/logicalmechanism/stdlib/blob/plutus-v3/lib/aiken/transaction.ak#L67-L87 Does this mean all of these Dicts should be turned into lists of tuples too? like List<(x,y)> @KtorZ |
Not really. It wasn't discourage, but simply made safer. We will still use |
Well when the Pair type comes out in 1.0.27 I think I will revisit this and see what to change or update. I am attempting to use this branch on SanchoNet with some interesting errors so I was assuming something may be went wrong because of the Dict type. |
New types are generated from: v1.30.0.0 Context. Key changes: ScriptContext using ScriptInfo now and has the redeemer field. There are naming conflicts introduced here so to avoid any issues, the ScriptPurpose uses the verb form of the action and the ScriptInfo will use the present tense verb form. The new types need an additional review due to the introduction of Pair/Pairs type. I want to make sure everything still agrees with the current branch of both the stdlib and plutus. |
Beginning of the v2 to v3 transition. This branch is pure Plutus V3. It contains breaking changes.
Each new type needs a review and double check but it at least lays down the groundwork for this transition.
New types are generated from: v1.22.1.0 Context
I tried to group types where they should be going so some movement might be needed.