-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add new field 'inlineDatumRaw' to TxOut ToJSON instance #632
Conversation
Code LGTM but I'm more concerned about consistency. Other fields have JSON data, whereas this new one has CBOR. Isn't this new CBOR redundant with what's in the |
Yes, you make a good point; it's a bit redundant, but the idea is that it helps users more conveniently compute fees. See this ticket - cardano-scaling/hydra#1543 I understand if it doesn't make sense to include here; we can find another way to work around it; but ultimately we do want to return this type to improve the UX of our return values for our clients. |
Not only more conveniently, but otherwise impossible to compute as the exact binary representation is needed for evaluating scripts (or computing script integrity hashes). |
@ffakenz> can you fix the formatting of the files you modified? You need to run |
cb548d8
to
c78432b
Compare
c78432b
to
e570323
Compare
@ffakenz> you need to sign your commits: and it's good to go |
814e406
to
7ad4e25
Compare
@ffakenz> can you sign your commits again? You can setup your git to do that automatically: https://stackoverflow.com/a/20628522 |
Head branch was pushed to by a user without write access
7ad4e25
to
d3cdba8
Compare
Apologies for that. |
d3cdba8
to
42287b4
Compare
It contains the raw CBOR for any inline datum. Reason: > When building applications that need to spend from a script UTxO which has a datum attached (like in a Hydra head), that off-chain code needs access to the raw Datum for evaluating the transaction and calculate fees.
42287b4
to
ba0fef5
Compare
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
Changelog
Context
When building applications that need to spend from a script UTxO which has a datum attached,
that off-chain code needs access to the raw Datum for evaluating the transaction and calculate fees.
How to trust this PR
This item is a backward-compatible change.
Checklist