In several areas of our code we use []byte for roots when [32]byte would be more efficient. The main reason for this is protobuf support. Forkchoice uses internally [32]byte and in the interface with blockchain package it needs to convert from []byte. This issue should be marked as solved when all calls from the blockchain package to save/read checkpoints to/from db are switched to use [32]byte so as to avoid copying a checkpoint from a BeaconState.
In several areas of our code we use
[]byte
for roots when[32]byte
would be more efficient. The main reason for this is protobuf support. Forkchoice uses internally[32]byte
and in the interface with blockchain package it needs to convert from[]byte
. This issue should be marked as solved when all calls from the blockchain package to save/read checkpoints to/from db are switched to use[32]byte
so as to avoid copying a checkpoint from a BeaconState.