service/block: Implement ring buffer to cache latest X blocks for easy sampling access #120
Labels
architecture
Architecture / design-related issues
area:block
Raw blocks and erasure coded blocks
area:shares
Shares and samples
Question: Do we store the block data in mem for a while and then pop it out after X number of new blocks?
@mattdf 's answer: This sounds reasonable to me, perhaps do what geth does and allow the user to specify a command line argument that sets the max RAM allowed to be used by the cache, so that very big blocks don't DoS nodes in the future. If a node has to restart for whatever reason, then you'd also have to rebuild this cache by reading the disk. I think some kind of ring buffer struct would be fine here since for sampling you'll want to access the entire block.
Ref
The text was updated successfully, but these errors were encountered: