-
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
Aiken: commit validator #1072
Aiken: commit validator #1072
Conversation
Transactions CostsSizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using
Script summary
Cost of Init Transaction
Cost of Commit TransactionThis is using ada-only outputs for better comparability.
Cost of CollectCom Transaction
Cost of Close Transaction
Cost of Contest Transaction
Cost of Abort TransactionSome variation because of random mixture of still initial and already committed outputs.
Cost of FanOut TransactionInvolves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.
End-To-End Benchmark ResultsThis page is intended to collect the latest end-to-end benchmarks results produced by Hydra's Continuous Integration system from the latest Please take those results with a grain of salt as they are currently produced from very limited cloud VMs and not controlled hardware. Instead of focusing on the absolute results, the emphasis should be on relative results, eg. how the timings for a scenario evolve as the code changes. Generated at 2023-10-10 15:25:54.91674161 UTC 3-nodes ScenarioA rather typical setup, with 3 nodes forming a Hydra head.
Baseline ScenarioThis scenario represents a minimal case and as such is a good baseline against which to assess the overhead introduced by more complex setups. There is a single hydra-node d with a single client submitting single input and single output transactions with a constant UTxO set of 1.
|
c0bdc2c
to
4ec5725
Compare
4ec5725
to
f72cccc
Compare
19240cc
to
7f6441e
Compare
67f6a0e
to
d7ad707
Compare
Note: Locally I always see recompilation when I change plutus.json file |
This is related to work on this branch https://github.com/cardano-foundation/CIPs/tree/master/CIP-0057 |
d7ad707
to
a2e0c86
Compare
ccd35ed
to
53c7385
Compare
6a2f071
to
41158f2
Compare
Not sure why the CI is red. I wonder if you should merge that PR straight away given the security implications: I have reached out to bcryptic for more information on how they could review aiken SCs. The commit script is simple enough but this will be an issue for the |
94a7ea5
to
28b669e
Compare
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 main thing is we have an entry in the changelog that doesn't belong in this PR. Other than that 👌
4dc7797
to
b4bb881
Compare
As the aiken scripts are not audited, and while they are awaiting audit, one option would be to add a feature flag to the hydra-node that would allow a user to decide, while we are still developing them, to use them or not. eg. something like |
b4bb881
to
47c6fbf
Compare
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.
- In order to compile and rebase against master we need this type since currently there is no way to go from the openApi style of json encoding for plutus redeemer to actual Plutus `Data` type. CIP-57 is related to this conversion but this is ongoing work still.
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.
Because soon then Plutus team will provide such parsers.
We don't need this piece of code now that we fixed the aiken nix build input in the plutus tests. Also removed wrong entry in CHANGELOG.
47c6fbf
to
60817a9
Compare
We close the PR for now because we think the experiment is done and provided good results, but there's not pressing need to migrate everything to aiken |
waitForProcess gitStatusProcessHandle | ||
-- Read git log file and verify plutus.json did not change | ||
gitLogContents <- decodeUtf8 <$> readFileBS gitLogFilePath | ||
gitLogContents `shouldNotContain` "plutus.json" |
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.
Should: not run git
(assumes a working copy), but rather run aiken build
and assert freshly generated plutus.json
contents vs the embedded one from Hydra.Plutus
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.
Should: not need this file anymore
, plutus-core >=1.7 && <1.10 | ||
, plutus-ledger-api >=1.7 && <1.10 | ||
, plutus-tx >=1.7 && <1.10 | ||
, plutus-tx-plugin >=1.7 && <1.10 |
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.
Need to update these
"narHash": "sha256-cOhHYQUt7TgtNkN+Am5eGWlPbKVL8Vsn7FDf1b1Psfo=", | ||
"owner": "aiken-lang", | ||
"repo": "aiken", | ||
"rev": "78ff6cf178f9e7707d1a5297e4a774c9ab81d73e", |
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.
Should: use the latest aiken version
@@ -48,7 +48,7 @@ maxMainnetLovelace = 100_000_000 | |||
-- The value is obtained from calculating the costs of running the scripts | |||
-- and on-chan validators (see 'computeCollectComCost' 'computeAbortCost') | |||
maximumNumberOfParties :: Int | |||
maximumNumberOfParties = 4 | |||
maximumNumberOfParties = 7 |
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.
Should revisit this
Created with @KtorZ on the Hydra/Mithril workshop in Nantes.
😈 Write the vCommit validator in Aiken and produce a
plutus.json
blueprint😈 Add
Hydra.Plutus
module which loads validators from aplutus.json
blueprint.😈 Use the aiken created vCommit validator in
hydra-node
😈 Profit! Abort/Collect transactions do fit double the participants; but, due to execution memory limits, the maximum amount of parties got increased to 7.
TODO:
plutus.json
for CI golden tests.hydra-plutus
lib is recompiled wheneverplutus.json
changes.