A circular buffer was initialy part of MerkleTree (#3617). This was removed, leaving the developper free to use any history-tracking structure they want.
We should implement a CircularBuffer, which could be used in conjunction with MerkleTree, of for any other usecase.