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

Lighter-weight codec for the ledger state file on disk

Open nfrisby opened this issue 5 months ago • 0 comments

While investigating Issue https://github.com/IntersectMBO/ouroboros-consensus/issues/868, it became apparent that part of the problem is simply how much is allocated when serializing the ledger state. The UTxO map is a notable outlier, but it's not the only non-trivial cost in there (~70 seconds wall clock with the UTxO versus ~20 seconds wall clock with an empty UTxO map).

@lehins mentioned an idea to use a "raw" byte strings (ie CBOR major type 2) instead of the fully granular CBOR encoding of each individual UTxO. This is unacceptable for on-chain/on-the-wire data, but it's fine for the local file that persists the ledger state between the node's executions.

nfrisby avatar Sep 17 '24 15:09 nfrisby