比特币创世论文《Bitcoin: A Peer-to-Peer Electronic Cash System》研读之八:回收磁盘空间

原文翻译

7. Reclaiming Disk Space

Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block's hash, transactions are hashed in a Merkle Tree [7][2][5], with only the root included in the block's hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.

A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore's Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.

7.回收磁盘空间

一旦最新的交易被埋在足够的区块底下,它之前的交易可以被丢以节约磁盘空间。为了在不损毁区块哈希的情况下使这个过程更便捷,交易在Merkle树被哈希化,只有根保存着区块的哈希。旧区块可以通过截断树的分支的方式来压缩。 内部哈希不需要存储。

一个没有交易信息的区块头大概80 bytes大小。如果我们假设区块每10分钟产生,80 bytes * 6 * 24 * 365 = 4.2MB 每年.在2008年在售的典型计算机系统拥有2GB的内存,摩尔定律预测当前的增长为1.2GB每年,就算区块头你存着交易信息,存储也应该不是问题。

细节解读


《Bitcoin: A Peer-to-Peer Electronic Cash System》论文原文地址如下:https://bitcoin.org/bitcoin.pdf


版权所有声明

版权所有归属作者,未经允许不得转载、复制或用作它途。否则作者将具有追究法律责任的权利。

Copyright Clarify

Copyright ownership belongs to the author , shall not be reproduced , copied, or used in other ways without permission. Otherwise the author will have the right to pursue legal responsibilities.

猜你喜欢

转载自blog.csdn.net/qq_27467365/article/details/81631857