Post
Share your knowledge.
How to store more than 128 blocks worth of data in Bor?
I am currently trying to store a month's worth of data when running Bor in full mode, but I can't exceed 128 blocks. Can I change settings or run archives to get around this limit and retain about 30 days of data?
- Polygon Edge
Answers
2If storing everything in memory is not feasible due to data size (which could be multiple terabytes for 30 days), running an archive node might be a better solution. You can consider using Erigon to achieve this as it allows you to maintain a larger historical block data storage, but keep in mind that archive nodes require a lot more storage capacity. Unfortunately, if you want something in between, like keeping just 30 days worth of data, while not using a full archive node, current options are limited to either keeping only the most recent state with 128 blocks in full node mode or utilizing much larger storage with an archive node which can handle everything.
To store more than 128 blocks when running in full mode with Bor, you might need to adjust the triesinmemory
flag in the bor config.toml
. This flag exists in the cache section of the config file and implies that data is held in memory. For detailed configuration, refer to Bor's config file: https://github.com/maticnetwork/bor/blob/16268f6608d09d5b6d0cd0e43f5ec076c3b92616/builder/files/config.toml#L158.
Do you know the answer?
Please log in and share it.
Polygon is a decentralised Ethereum scaling platform that enables developers to build scalable user-friendly dApps with low transaction fees without ever sacrificing on security.