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

Use aiken for commit validator #1680

Merged
merged 40 commits into from
Oct 7, 2024
Merged

Commits on Oct 4, 2024

  1. Update cardano-api: 9.1 -> 9.3

    locallycompact authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    3e288c3 View commit details
    Browse the repository at this point in the history
  2. Add aiken to our nix develop shell

    We intend to create one of the hydra-plutus scripts with aiken.
    ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    bbee1ba View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c9e19c9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4343b66 View commit details
    Browse the repository at this point in the history
  5. Create a module to load blueprint json

    This separates the aiken build, which yields the plutus.json blueprint
    and the haskell build which provides access to the compiled validators.
    ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    3b98df5 View commit details
    Browse the repository at this point in the history
  6. Replace plutus-tx commit with the aiken commit script

    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.
    ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    9f4ac0f View commit details
    Browse the repository at this point in the history
  7. implement 'ViaCollectCom' path in Aiken

    KtorZ authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    ef8b7d5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4c6bc03 View commit details
    Browse the repository at this point in the history
  9. Try to make plutus.json a extra source file

    This is not yet working and it does not correctly detect changes to plutus.json
    ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    eb368a7 View commit details
    Browse the repository at this point in the history
  10. Decode commit datum as a record

    Plutus-tx seems to be encoding tuples as a Constr on-chain.
    ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    f706f7a View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0e320b1 View commit details
    Browse the repository at this point in the history
  12. Add commit errors to the validator script

    ffakenz authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    f0551ca View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    7e3e680 View commit details
    Browse the repository at this point in the history
  14. Remove commit validator

    Also add TODO comments for things that are missing to be removed.
    ffakenz authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    e7fb038 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    15f587d View commit details
    Browse the repository at this point in the history
  16. Alter plutus.json and aiken.lock

    v0d1ch authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    b2eef70 View commit details
    Browse the repository at this point in the history
  17. Fix commit mutation tests on abort and collect-com

    By regenerating the plutus.json file using -k flag during aiken build.
    ffakenz authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    0607633 View commit details
    Browse the repository at this point in the history
  18. Remove unit-test focus

    ffakenz authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    0585f6e View commit details
    Browse the repository at this point in the history
  19. Replace the use of ByteArray for String on aiken commit validator script

    This removes the need of using aiken/builtin function decode_utf8,
    providing some small optimization.
    
    Also recreated plutus scripts.
    ffakenz authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    69547b6 View commit details
    Browse the repository at this point in the history
  20. Increase the number of parties for FanOut tx-cost

    To correlate with the rest.
    ffakenz authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    895905b View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    4a22a58 View commit details
    Browse the repository at this point in the history
  22. Remove commit plutus validator as it is not needed anymore

    Also removed its golden spec.
    
    Finally added a note about a fragility being present while accessing
    the commit validator script from the blueprintJSON.
    ffakenz authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    244f815 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    54f1a26 View commit details
    Browse the repository at this point in the history
  24. Add a CIP-57 todo

    v0d1ch authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    210f65c View commit details
    Browse the repository at this point in the history
  25. Re-add golden tests for commit validator

    v0d1ch authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    a3f4865 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    4ad41dc View commit details
    Browse the repository at this point in the history
  27. Update changelog

    abailly authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    7ff4ecc View commit details
    Browse the repository at this point in the history
  28. Compiling aiken script

    locallycompact authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    5c4c79f View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    e4851b2 View commit details
    Browse the repository at this point in the history
  30. Use aiken scripts as PlutusV3 script

    Seems like the aiken compiler uses plutus core version 1.1.0 syntax and
    we need to declare it as a PlutusV3 script.
    ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    2527fac View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    8d5590e View commit details
    Browse the repository at this point in the history
  32. Drop commit from inspect-script exe

    We do not need the plutus-style envelope and this would not match with
    the PlutusV2 used there.
    ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    d49a2a2 View commit details
    Browse the repository at this point in the history
  33. Rebuild commit aiken validator with -t compact

    This will keep the first trace argument which we expect to see in our
    mutation tests.
    ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    c52c7af View commit details
    Browse the repository at this point in the history
  34. Simply compare the plutus.json after regeneration

    This does not require us to be in a git repository and hence makes the
    test more flexible and isolated.
    locallycompact authored and ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    90b32b8 View commit details
    Browse the repository at this point in the history
  35. Drop a redundant test and FIXME

    The hydra-plutus library seems to be consistently rebuilt when the
    plutus.json gets changed.
    ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    55dd765 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    db10f25 View commit details
    Browse the repository at this point in the history
  37. Only reference commit script if spending commits in abort

    This was failing with PPViewHashesDontMatch because the transaction was
    referencing the commit script which is does not always need, and the
    commit script being of different version than the other scripts spent.
    ch1bo committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    75a0775 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    f4d379a View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    f9e07ce View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    665cc17 View commit details
    Browse the repository at this point in the history