回复:RFC:随发布压缩包附带区块链 1-74000?
原始发布页
打开来源页面查看 1 个交叉存档
耗费时间的不是下载,而是验证和建立索引。
从带宽角度看,这比下载存档文件更高效。比特币只下载 blk0001.dat 中的数据,目前为 55MB,然后自行构建 47MB 的 blkindex.dat。构建 blkindex.dat 才是造成所有磁盘活动的原因。
下载区块期间,它每 500 个区块才会把数据库刷新到磁盘。你可能会看到区块数在 ??499 和 ??999 处暂停。那就是它正在刷新。
自行进行验证和建立索引,是确保索引数据安全的唯一方法。如果从不可信的来源复制 blk0001.dat 和 blkindex.dat,就无法知道其中的所有内容是否都值得信任。
也许 Berkeley DB 有一些调整项,可以让我们启用或增加缓存内存。
英文原文
展开英文原文
It's not the downloading that takes the time, it's verifying and indexing it.
Bandwidthwise, it's more efficient than if you downloaded an archive. Bitcoin only downloads the data in blk0001.dat, which is currently 55MB, and builds blkindex.dat itself, which is 47MB. Building blkindex.dat is what causes all the disk activity.
During the block download, it only flushes the database to disk every 500 blocks. You may see the block count pause at ??499 and ??999. That's when it's flushing.
Doing your own verifying and indexing is the only way to be sure your index data is secure. If you copy blk0001.dat and blkindex.dat from an untrusted source, there's no way to know if you can trust all the contents in them.
Maybe Berkeley DB has some tweaks we can make to enable or increase cache memory.