Skip to content
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

Encode Value in Compact form in UTxO #4078

Open
lehins opened this issue Feb 13, 2024 · 1 comment
Open

Encode Value in Compact form in UTxO #4078

lehins opened this issue Feb 13, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request performance serialization Anything that affects serialization of ledger types

Comments

@lehins
Copy link
Collaborator

lehins commented Feb 13, 2024

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 IntersectMBO/ouroboros-consensus#868 (comment)

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
Copy link
Collaborator Author

lehins commented Nov 14, 2024

There is a mostly complete implementation of this ticket in this branch: https://github.com/IntersectMBO/cardano-ledger/tree/lehins/use-mempack

@nfrisby have successfully confirmed that this results in a significant improvement to performance of snapshot creation: IntersectMBO/ouroboros-consensus#868 (comment)

We are now waiting for IntersectMBO/cardano-base#506 to be merged and new version of cardano-crypto-class to be released to CHaP. This is currently blocked by #4699

@lehins lehins added enhancement New feature or request performance serialization Anything that affects serialization of ledger types labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance serialization Anything that affects serialization of ledger types
Projects
None yet
Development

No branches or pull requests

1 participant