Skip to content

Commit

Permalink
Use aiken for commit validator (#1680)
Browse files Browse the repository at this point in the history
We want to update to a recent `cardano-api` version to get #1543 (which
we contributed upstream). This update implied a bump on `plutus-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:

![ADRs _ Designs - cardano-api 9 3 update mikado
2024-10-03](https://github.com/user-attachments/assets/52d61e15-0485-4a63-81ce-de4c2f6eeec1)

Concretely this PR contains:

* Update to `cardano-api` version `9.3`

* Rebased and updated to latest `aiken` the commit validator from this
work: #1072

* Support `PlutusV3` validators next to legacy `PlutusV2` validators
(the aiken one is V3)

Consequences of switching to `aiken`:
- 🚀 reduces cost to open (collect) a head, for example 5 parties
from 1.00 -> 0.81 ADA =~ **20% cost saving**
- 🚀 reduces cost to abort a head, for example 5 parties from 1.27
-> 0.85 ADA =~ **50% cost saving**
- 🚀 supports collect transaction with 9 parties (abort 12) = new
maximum number of parties is **8** (tests showed we need some margin)

---

* [x] CHANGELOG updated
* [x] Documentation update not needed
* [x] Haddocks updated
* [x] New TODOs introduced
- One as a reminder that we have duplication of types between
aiken/haskell
  • Loading branch information
locallycompact authored Oct 7, 2024
2 parents d3db623 + 665cc17 commit 5e6eca0
Show file tree
Hide file tree
Showing 64 changed files with 968 additions and 581 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
As a minor extension, we also keep a semantic version for the `UNRELEASED`
changes.

## Unreleased
## [0.20.0] - UNRELEASED

- **IMPORTANT - Do not release this version**
- Incremental commits - off-chain changes to make the incremental commits possible.
Expand All @@ -23,6 +23,11 @@ changes.

- Tested with `cardano-node 9.2.0` and `cardano-cli 9.4.1.0`.

- **BREAKING** Rewrite of the commit script in aiken:
- This makes `abort` and `collectCom` transactions more efficient and results
in a new maximum number of head participants being `8`.
- Changes script hashes in `hydra-plutus`

## [0.19.0] - 2024-09-13

- Tested with `cardano-node 9.1.1` and `cardano-cli 9.2.1.0`
Expand Down
Loading

0 comments on commit 5e6eca0

Please sign in to comment.