IntersectMBO / IntersectMBO/cardano-ledger

Change how we serialize pulser state

Open
#4,079 0 comments 0 reactions 1 assignee Claimed by @lehins View on GitHub
Dominant language
Haskell
Stars
295
Forks
179
Avg merge
4d 7h
Merged PRs (30d)
29

Description

Currently we force pulser prior to serializing the result. This has couple of downsides:

* This sometimes results in a massive computation at an arbitrary point, especially at the beginning of the epoch. By itself it is not a huge deal, since it happens in a separate thread, but it puts pressure on the garbage collector which does affect the running node.
* That computation is discarded after serialization is done. Which means that same computation will continue being performed by the pulser until the end of the epoch

There are two approaches we can try to alleviate this issue:

1. Store the initial state and perform the pulser computation upon deserialization.
2. Store the actual pulser state.

The first approach will affect the startup time of the node, while the second approach will probably be the most complicated, but it has no issues with performance.

I believe we should first try the 1st approach, because it should be easy and see how does it affect the snapshotting profile.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.