ultralight
ultralight copied to clipboard
Rework block index
We recently added a blockIndex
that maps block number to blockhash so that the state network can retrieve state from a given block height without needing to have the Epoch Accumulator for whichever epoch the block is associated with in order to find the corresponding state root necessary to retrieve the state data. At present, it's a little cumbersome and should either be reworked to be an in memory map of block numbers to block hashes that is only stored in the DB on node close or else converted to a sublevel db on its own that is effectively just a block number -> blockhash key-value map stored on disk.