-
Notifications
You must be signed in to change notification settings - Fork 84
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
Use aiken for commit validator #1680
Open
ch1bo
wants to merge
37
commits into
master
Choose a base branch
from
aiken-commit-validator
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+950
−543
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We intend to create one of the hydra-plutus scripts with aiken.
This separates the aiken build, which yields the plutus.json blueprint and the haskell build which provides access to the compiled validators.
Instead of using the plutus-tx "compiledScript", we use the loaded-from-blueprint aiken script in the init validator and when constructing/observing transactions in the hydra-node.
This is not yet working and it does not correctly detect changes to plutus.json
Plutus-tx seems to be encoding tuples as a Constr on-chain.
Also add TODO comments for things that are missing to be removed.
By regenerating the plutus.json file using -k flag during aiken build.
This removes the need of using aiken/builtin function decode_utf8, providing some small optimization. Also recreated plutus scripts.
To correlate with the rest.
Also removed its golden spec. Finally added a note about a fragility being present while accessing the commit validator script from the blueprintJSON.
Seems like the aiken compiler uses plutus core version 1.1.0 syntax and we need to declare it as a PlutusV3 script.
This was referenced Oct 4, 2024
Closed
We do not need the plutus-style envelope and this would not match with the PlutusV2 used there.
This will keep the first trace argument which we expect to see in our mutation tests.
locallycompact
force-pushed
the
aiken-commit-validator
branch
from
October 4, 2024 13:23
bae8866
to
38e1743
Compare
ch1bo
force-pushed
the
aiken-commit-validator
branch
from
October 4, 2024 14:05
50f836e
to
7bafe31
Compare
This does not require us to be in a git repository and hence makes the test more flexible and isolated.
The hydra-plutus library seems to be consistently rebuilt when the plutus.json gets changed.
ch1bo
force-pushed
the
aiken-commit-validator
branch
from
October 4, 2024 14:12
7bafe31
to
296395c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We want to update to a recent
cardano-api
version to get #1543 (which we contributed upstream). This update implied a bump onplutus-tx
(via the ledger) and resulted in growing script sizes. At that point we explored various ways to decrease the script size again to keep the single transaction publishing and--hydra-scripts-tx-id
config (or even expanding that).This mikado / dependency graph shows our option and the chosen path of this PR:
Concretely this PR contains:
Update to
cardano-api
version9.3
Rebased and updated to latest
aiken
the commit validator from this work: Aiken: commit validator #1072TODO:
maximumNumberOfParties
accordingly