Home / dcSpark / cardano-multiplatform-lib
May 24, 9-10 PM (0)
May 24, 10-11 PM (0)
May 24, 11-12 AM (0)
May 25, 12-1 AM (0)
May 25, 1-2 AM (0)
May 25, 2-3 AM (0)
May 25, 3-4 AM (0)
May 25, 4-5 AM (0)
May 25, 5-6 AM (0)
May 25, 6-7 AM (0)
May 25, 7-8 AM (0)
May 25, 8-9 AM (0)
May 25, 9-10 AM (0)
May 25, 10-11 AM (0)
May 25, 11-12 PM (0)
May 25, 12-1 PM (0)
May 25, 1-2 PM (0)
May 25, 2-3 PM (0)
May 25, 3-4 PM (0)
May 25, 4-5 PM (0)
May 25, 5-6 PM (0)
May 25, 6-7 PM (0)
May 25, 7-8 PM (0)
May 25, 8-9 PM (0)
May 25, 9-10 PM (0)
May 25, 10-11 PM (0)
May 25, 11-12 AM (1)
May 26, 12-1 AM (0)
May 26, 1-2 AM (1)
May 26, 2-3 AM (1)
May 26, 3-4 AM (0)
May 26, 4-5 AM (0)
May 26, 5-6 AM (0)
May 26, 6-7 AM (0)
May 26, 7-8 AM (0)
May 26, 8-9 AM (0)
May 26, 9-10 AM (0)
May 26, 10-11 AM (0)
May 26, 11-12 PM (0)
May 26, 12-1 PM (0)
May 26, 1-2 PM (0)
May 26, 2-3 PM (0)
May 26, 3-4 PM (0)
May 26, 4-5 PM (0)
May 26, 5-6 PM (0)
May 26, 6-7 PM (0)
May 26, 7-8 PM (0)
May 26, 8-9 PM (0)
May 26, 9-10 PM (0)
May 26, 10-11 PM (0)
May 26, 11-12 AM (0)
May 27, 12-1 AM (0)
May 27, 1-2 AM (0)
May 27, 2-3 AM (0)
May 27, 3-4 AM (0)
May 27, 4-5 AM (0)
May 27, 5-6 AM (0)
May 27, 6-7 AM (0)
May 27, 7-8 AM (0)
May 27, 8-9 AM (0)
May 27, 9-10 AM (0)
May 27, 10-11 AM (0)
May 27, 11-12 PM (0)
May 27, 12-1 PM (0)
May 27, 1-2 PM (0)
May 27, 2-3 PM (0)
May 27, 3-4 PM (0)
May 27, 4-5 PM (0)
May 27, 5-6 PM (0)
May 27, 6-7 PM (0)
May 27, 7-8 PM (0)
May 27, 8-9 PM (0)
May 27, 9-10 PM (0)
May 27, 10-11 PM (0)
May 27, 11-12 AM (0)
May 28, 12-1 AM (0)
May 28, 1-2 AM (0)
May 28, 2-3 AM (0)
May 28, 3-4 AM (0)
May 28, 4-5 AM (0)
May 28, 5-6 AM (0)
May 28, 6-7 AM (0)
May 28, 7-8 AM (0)
May 28, 8-9 AM (0)
May 28, 9-10 AM (0)
May 28, 10-11 AM (0)
May 28, 11-12 PM (0)
May 28, 12-1 PM (0)
May 28, 1-2 PM (0)
May 28, 2-3 PM (0)
May 28, 3-4 PM (0)
May 28, 4-5 PM (0)
May 28, 5-6 PM (0)
May 28, 6-7 PM (0)
May 28, 7-8 PM (0)
May 28, 8-9 PM (0)
May 28, 9-10 PM (0)
May 28, 10-11 PM (0)
May 28, 11-12 AM (0)
May 29, 12-1 AM (0)
May 29, 1-2 AM (0)
May 29, 2-3 AM (0)
May 29, 3-4 AM (0)
May 29, 4-5 AM (0)
May 29, 5-6 AM (0)
May 29, 6-7 AM (0)
May 29, 7-8 AM (0)
May 29, 8-9 AM (0)
May 29, 9-10 AM (0)
May 29, 10-11 AM (0)
May 29, 11-12 PM (0)
May 29, 12-1 PM (0)
May 29, 1-2 PM (0)
May 29, 2-3 PM (0)
May 29, 3-4 PM (0)
May 29, 4-5 PM (0)
May 29, 5-6 PM (0)
May 29, 6-7 PM (0)
May 29, 7-8 PM (0)
May 29, 8-9 PM (0)
May 29, 9-10 PM (0)
May 29, 10-11 PM (0)
May 29, 11-12 AM (0)
May 30, 12-1 AM (0)
May 30, 1-2 AM (0)
May 30, 2-3 AM (0)
May 30, 3-4 AM (0)
May 30, 4-5 AM (0)
May 30, 5-6 AM (0)
May 30, 6-7 AM (0)
May 30, 7-8 AM (0)
May 30, 8-9 AM (0)
May 30, 9-10 AM (0)
May 30, 10-11 AM (0)
May 30, 11-12 PM (0)
May 30, 12-1 PM (0)
May 30, 1-2 PM (0)
May 30, 2-3 PM (0)
May 30, 3-4 PM (0)
May 30, 4-5 PM (0)
May 30, 5-6 PM (0)
May 30, 6-7 PM (0)
May 30, 7-8 PM (0)
May 30, 8-9 PM (0)
May 30, 9-10 PM (0)
May 30, 10-11 PM (0)
May 30, 11-12 AM (0)
May 31, 12-1 AM (0)
May 31, 1-2 AM (0)
May 31, 2-3 AM (0)
May 31, 3-4 AM (0)
May 31, 4-5 AM (0)
May 31, 5-6 AM (0)
May 31, 6-7 AM (0)
May 31, 7-8 AM (0)
May 31, 8-9 AM (0)
May 31, 9-10 AM (0)
May 31, 10-11 AM (0)
May 31, 11-12 PM (0)
May 31, 12-1 PM (0)
May 31, 1-2 PM (0)
May 31, 2-3 PM (0)
May 31, 3-4 PM (1)
May 31, 4-5 PM (0)
May 31, 5-6 PM (0)
May 31, 6-7 PM (0)
May 31, 7-8 PM (1)
May 31, 8-9 PM (0)
May 31, 9-10 PM (1)
6 commits this week May 24, 2023 - May 31, 2023
TxBuilder refactor to split format (#210)
Complete TxBuilder refactor including all tests. Various related fixes as well.

Commits:

* TxBuilder refactor to split format

Contais only rust crate updates

Tests are commented out for now as there are thousands and thousands  of lines of them.

* tx_builder tests now compile

Unfortunately only 67/94 are immediately passing. We will need to look
into them one by one but a lot seem to be issues with min ADA/fee
calculations which could have to do with CBOR size differences.

* Fixes for tx_builder failing unit tests

Bugs fixed (affecting non-test code):
* script data hash calculation was not following encoded binary (where
  it should - redeemres/datums).
* AssetBundle::checked_add() was broken and would duplicate some assets.

Bugs fixed (only tests):
* datums in old CML defaulted to indefinite when non-empty to mimick
  cardano-cli. this impacted several tests e.g. cbor size / hash
differences
* ordering in assets changed (used to be sorted) causing some
  differences. test updated to use old order
* default to always using minimal tx out encodings to mimick old code
  (and reduce cbor size). this was causing cbor (and thus hash)
differences with old CML tests.
* AssetBundle::get() would return 0 for no asset but now does None.
  updated test to not panic there.
* some tests were incorrectly refactored calling
  create_aux_with_metadata() and thus adding extra metadata
* some tests had fees smaller now due to no default indefinite encodings
CIP25 merge V1/V2 in API and get rid of redundant types
V1 vs V2 from a user perspective are identical but are encoded
differently e.g. as text (v1) vs bytes (v2). A user should not need to
care about this. We also previously had 3 different types each for asset
names and policy ids: cip25 v1, cip25 v2 and the cml-chain ones.

This modifies the outer map part of cip25 to directly use the cml-chain
ones and remove the cip25 structs. The serialization for this map had
already been hand-edited to allow for permissive parsing so having to
move this to utils and hand-edit it shouldn't be much of an issue.
Places where hand-editing was done is commented and the other code was
taken directly from the auto-generated code from before.

Doing this gives better structural checking too as we didn't do any of
that for the v1/v2 policy ids. This is why the noise_metadata test had
to be edited.

As a result of this CIP25 has about half the types and should have a
much less confusing API.