cardano-db-sync icon indicating copy to clipboard operation
cardano-db-sync copied to clipboard

Trim Ledger State for memory improvements

Open kderme opened this issue 10 months ago • 1 comments

DBSync maintains the exact same ledger state as the node, in order to recompute rewards, stake distribution etc. However db-sync doesn't need to fully validate each block. A possible memory optimization is to trim down parts of the ledger state that are needed for validation and not for replaying. These include

  • multiassets
  • datums, script, plutus data

kderme avatar Apr 22 '24 09:04 kderme

Easiest first step for this is to simply trim multiassets from outputs once every epoch. Then validate that it syncs properly on mainnet and compare the time and memory used to a normal sync.

kderme avatar May 31 '24 15:05 kderme