You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have built many additional caches in Lodestar CachedBeaconState to make the beacon state transition as fast as it needs to be. However those structures are very verbose, repetitive in code and have huge memory cost.
Cache to skip traversals
Teku ssz has a nice approach where tree views have a cache attached to prevent having to traverse the tree unless when strictly necessary. The idea is to add a regular fast array that shortcuts to leaf data, either nodes or actual data.
Mutate then commit
Also the Tree views can leverage that cache to make many mutations more cheaply.
We have built many additional caches in Lodestar CachedBeaconState to make the beacon state transition as fast as it needs to be. However those structures are very verbose, repetitive in code and have huge memory cost.
Cache to skip traversals
Teku ssz has a nice approach where tree views have a cache attached to prevent having to traverse the tree unless when strictly necessary. The idea is to add a regular fast array that shortcuts to leaf data, either nodes or actual data.
Mutate then commit
Also the Tree views can leverage that cache to make many mutations more cheaply.
This is similar to the persistent-ts architecture but without having to duplicate data.
References:
.update()
wrapper to handle toMutable, mutations, commit steps at once https://github.com/ConsenSys/teku/blob/9cd657a7f057a1ed96b3e722df37f42f7bb60be4/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/common/block/AbstractBlockProcessor.java#L281-L282The text was updated successfully, but these errors were encountered: