Open
Description
Say an epoch is 5 days. An epoch should represent the close-to-empirical maximum of disk space we will need to write at once, in one database transaction.
If target block time is two minutes, we'll have around 720 blocks per day. In 5 days, that will be 3600 blocks.
If the maximum block size is 1 MB, then we should be prepared to write 3600 MB = 3.6 GB in one database transaction, which is really huge.
This problem should be studied thoroughly and tested against whatever database backend we choose to use. Especially lmdb, since it has a database resize procedure.