Closed twoeths closed 4 months ago
Motivation
ListBasicType<UintNumberType<8>>.toViewDU()
balances
Description
ListUintNum64Type
toViewDU()
number[]
serialize()/deserialize()
part of https://github.com/ChainSafe/lodestar/issues/6520
✔️ no performance regression detected
by benchmarkbot/action
Implementation note for lodestar: migrate state.balances to export const Balances = new ListUintNum64Type(VALIDATOR_REGISTRY_LIMIT);
state.balances
export const Balances = new ListUintNum64Type(VALIDATOR_REGISTRY_LIMIT);
Motivation
ListBasicType<UintNumberType<8>>.toViewDU()
(balances
type in lodestar), the performance issue was noted here https://github.com/ChainSafe/ssz/blob/14c4457026a9fbea5bfe5c66580f7c8a8bee790a/packages/ssz/src/type/abstract.ts#L96Description
ListUintNum64Type
class and overwritetoViewDU()
function:number[]
instead of having toserialize()/deserialize()
implementation in the parent abstract classpart of https://github.com/ChainSafe/lodestar/issues/6520