-
Notifications
You must be signed in to change notification settings - Fork 86
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
Raw CBOR datum in transaction outputs #1543
Comments
We encountered this when building https://github.com/cardano-scaling/hydra-doom with @Quantumplation and @yHSJ where we use https://github.com/spacebudz/lucid |
Related to #1509 |
PR upstream: IntersectMBO/cardano-api#632 |
Perhaps useful to respond with this - https://github.com/CardanoSolutions/cardanonical/blob/e0d41dc2c3e6467168f1dfe952089a4d2ba3984c/cardano.json#L795-L799 |
Present status:
|
While #1680 allows us to update |
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
Addresses #1543 and tests whether IntersectMBO/cardano-api#632 results in `GET /snapshot/utxo` to contain `inlineDatumRaw`. Bonus: First step on consolidating `TxOut` and `UTxO` generators (deduplicating and moving them to a common module) TODO: Somehow get IntersectMBO/cardano-api@17eb46f into this branch. Most likely requiring #1680 (which updates to most recent `cardano-api` release `9.30`) and a `source-repository-package` onto some unreleased cardano-api. --- * [x] CHANGELOG updated or not needed * [x] Documentation updated or not needed * [x] Haddocks updated or not needed * [x] No new TODOs introduced or explained herafter
Why
When building applications that need to spend from a script UTxO in a Hydra head, which has a datum attached, that off-chain code needs access to the raw Datum for evaluating the transaction and calculate fees.
The schema used by the
hydra-node
right now matches whatevercardano-api
provides, while other applications follow other schemas. For example: kupo, ogmios (also see cardanonical) or blockfrostThis item is a backward-compatible change and in further steps we might want to move to one of those.
What
inlineDatumRaw
to anyTxOut
sent out by the API, that contains the raw CBOR for any inline datumsHow
The text was updated successfully, but these errors were encountered: