Post
Topic
Board Bitcoin Technical Support
Merits 7 from 2 users
Re: How was the average size of blk*.data chosen?
by
achow101
on 07/05/2024, 02:18:30 UTC
⭐ Merited by LoyceV (4) ,ABCbits (3)
blk*.dat files have a maximum size of 128 MiB, and new files are simply started if the block that is about to be written to disk would cause the file to exceed this size limit.

The PR that introduced this limit, https://github.com/bitcoin/bitcoin/pull/1677, suggests that this limit was chosen to reduce disk fragmentation of the files. However, I don't think there is anything that determines or indicates that this size is "most efficient", whatever that means. This is often the case with many of the maximums that exist throughout Bitcoin and other protocols - maximums are often "it just feels like that's a big enough number".