Closed twoeths closed 4 months ago
Motivation
state.serialize()
Description Define serialize() in ViewDU to go through the new serializeToBytes() method instead of its respective type class
serialize()
serializeToBytes()
serializeToBytes
listComposite
listBasic
Test New serialize() implementation in ViewDU is scanned through spec tests
✔️ no performance regression detected
by benchmarkbot/action
Implementation note for lodestar: use BeaconStateViewDU.serialize(), or the ViewDU.serializeToBytes() if there is a preallocated buffer
BeaconStateViewDU.serialize()
ViewDU.serializeToBytes()
Motivation
state.serialize()
in lodestar: right after we get through state transition, we always have cached nodes insideDescription Define
serialize()
in ViewDU to go through the newserializeToBytes()
method instead of its respective type classserializeToBytes()
method to TreeViewDU, by default it'll delegate to respective type classserializeToBytes()
will recursively call respectiveserializeToBytes
of internal ViewDU propertieslistComposite
andlistBasic
ViewDUs, they'll use use cached nodes if possibleTest New
serialize()
implementation in ViewDU is scanned through spec tests