The EOS Network Foundation development team would like feedback on the usage of blocks.log files to help guide development for future software versions.
Antelope blockchains handle a large volume of transactions, which creates large blocks. Nodeos stores these blocks in a blocks.log file, which can quickly grow very large. Some nodes, like block producer nodes, don’t need to keep these historical block logs. Others, like public-facing API and P2P nodes, need full versions of the blocks.log file.
Different versions of EOSIO allow different methods to reduce the size of the blocks.log file.
EOSIO v2.0
You can start nodeos from a snapshot to trim the blocks.
EOSIO v2.1
You can use the same blocks.log removal method for EOSIO v2.1 as for EOSIO v2.0. Alternatively, you can use EOSIO v2.1-only configuration options to split the blocks.log file into smaller chunks and then keep a certain number of these chunks for use. You can configure nodeos to automatically delete older chunks or move them to an archive location. Nodeos does not use the archived chunks for anything, and operators can delete them once they are no longer needed.
Leap v3.1
You can use the same blocks.log removal method for Leap v3.1 as for EOSIO v2.0. Additionally, you can use a new option in Leap v3.1 called block-log-retain-blocks to define how many blocks to keep in the blocks.log file. The option keeps the most recent blocks, defined by the block-log-retain-blocks parameter, and removes older blocks. The resulting file is sparse, meaning there are holes where the removed blocks were.
Future
In the latest codebase, developers have implemented a feature that allows operators to set the number of recent blocks in the block-log-retain-blocks parameter to zero (0), which eliminates the blocks.log file entirely.
blocks.log survey
Click here to participate in the survey.
The survey results can be found here.
Author: EOS Network Foundation
Editor: Randall Roland
Translator: -
Sources & References: