Bitcointalk · RFC: ship block chain 1-74000 with release tarballs?

中本聪,2010 年 11 月 25 日

SN-3665 已核对来源,附原文与上下文。

阅读语言
中文译文

花时间的不是下载,而是验证和建立索引。

从带宽上说,它比下载一个压缩包更高效。比特币仅仅下载 blk0001.dat 里的数据,目前是 55MB,进而自己构建 blkindex.dat,为 47MB。构建 blkindex.dat 才是全部磁盘活动的来源。

在区块下载期间,它每 500 个区块才把数据库刷一次盘。你恐会看到区块计数在 ??499 和 ??999 处停顿。那就是在刷盘。

自己做验证和建索引,是确保索引数据安全的唯一办法。倘若从一个不受信任的来源复制 blk0001.dat 和 blkindex.dat,就无法知道里面的全部内容是否可信。

兴许 Berkeley DB 有一些可调的开关,能够启用或加大缓存内存。

ORIGINAL · 英文原文
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.
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-3665