cardano-ledger icon indicating copy to clipboard operation
cardano-ledger copied to clipboard

Encode Value in Compact form in UTxO

Open lehins opened this issue 1 year ago • 0 comments

It is counterproductive to uncompact the value in order to store it on disk in the ledger state. There is not really requirement for TxOut to be serialized in the same format in the ledger as it is in the transaction. It is convenent, since we can reuse the same (de)serializers, but conceptually it doesn't have to be that way.

This came up in the context of snapshotting in consensus, where extra containers allocation overhead is present during serialization of ledger state. See https://github.com/IntersectMBO/ouroboros-consensus/issues/868#issuecomment-1938477531

First part of this ticket would be to implement a quick solution for Babbage, just so we can confirm that doing this change will actually be benefitial

lehins avatar Feb 13 '24 23:02 lehins