nimbus-eth2 icon indicating copy to clipboard operation
nimbus-eth2 copied to clipboard

Refactoring idea: Don't deserialize the blocks into regular Nim objects. Keep them as SSZ byte blobs instead.

Open zah opened this issue 3 years ago • 0 comments

If the state transition functions are modified to use SSZ navigators when accessing the data stored in blocks, we won't ever need to deserialize a block to a regular Nim object in memory. Blocks always enter our system as compressed SSZ blobs (either from the network or from the database) and we can just decompress them and then pass them around as blobs. Some minor performance wins are expected due to reduced copying of data and less memory allocations (due to the dynamic lists stored in blocks).

zah avatar Feb 19 '22 20:02 zah