Open ineiti opened 8 months ago
If there are many blocks (3000 for 10k votes), startup of a node takes about 1 minute. This is due to the method here:
https://github.com/c4dt/dela/blob/main/core/ordering/cosipbft/blockstore/disk.go#L70
It crawls through all blocks, deserializes them, and creates a map of block-hashes to block-indexes. Some comments:
cachedData.last
cachedData.length
If there are many blocks (3000 for 10k votes), startup of a node takes about 1 minute. This is due to the method here:
https://github.com/c4dt/dela/blob/main/core/ordering/cosipbft/blockstore/disk.go#L70
It crawls through all blocks, deserializes them, and creates a map of block-hashes to block-indexes. Some comments:
cachedData.last
andcachedData.length
, so only store those in the db