-
Notifications
You must be signed in to change notification settings - Fork 155
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
Avoid converting to and from compact representation for multi-assets. #4192
Comments
Digging around trying to understand why this might be expensive. So the most expensive thing to Serialize is the UTxO.
We will concentrate on the pattern
Note how the
So the EncCBOR is derived, so that means it uses the instance (EncCBOR CompactValue) which is this
So the What we need is 2 specially designed function just for nodes to snap shot the ledger state, which are not used for synching the chain, but a lot in common with the current serialisers, except on the TxOut of the UTxO. |
Fortunately, if we use the Coders library that is not very much code at all.
And if we ever have to recover from a Snapshot we can use
There are a few details about sharing that still need to be worked out. |
Closing this ticket as duplicate of #4078 |
Storing the ledger state on disk requires converting from the compact representation of multi-assets, which consumes a significant amount of memory, and raises garbage collection activity significantly. Consequently, slot leadership checks are missed.
The text was updated successfully, but these errors were encountered: