{"time":1617008115204,"blocks":[{"type":"header","data":{"text":"7.回收硬盘空间(Reclaiming Disk Space)","level":2}},{"type":"quote","data":{"text":"Once the latest transaction in a coin is buried under enough blocks, the spent transacitons before it can be discarded to save disk space. To facilitate this without breaking the block's hash, transacitons are hashed in a Merkle Tree, with only the root included in the block' hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored."}},{"type":"paragraph","data":{"text":"如果一枚硬币最新的交易发生在足够多的区块前 ,那么这笔交易之前该硬币的花销记录可以被丢弃,这样可以节省磁盘空间。为了促使在不破坏区块哈希的前提下实现这个功能,交易将被用哈希算法纳入Merkle树之中,而只有“树根”才会被记录在区块的哈希值之中。老区块就可以通过这种切断树的枝叉的办法来压缩大小。而内部的哈希值没必要被储存了。","alignment":"left"}},{"type":"paragraph","data":{"text":"discard:丢弃,抛弃;","alignment":"left"}},{"type":"paragraph","data":{"text":"facilitate:促使;促进;","alignment":"left"}},{"type":"paragraph","data":{"text":"compact:使...紧压在一起;","alignment":"left"}},{"type":"paragraph","data":{"text":"stub off:断开;","alignment":"left"}},{"type":"paragraph","data":{"text":"interior:内部的;","alignment":"left"}},{"type":"image","data":{"url":"https://i-xue-cn.pek3b.qingstor.com/9ad0329.undefined"}},{"type":"delimiter","data":{}},{"type":"quote","data":{"text":"A block header with no transacitons would be about 80 bytes. If we suppose blocks are generated every 10minutes, 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."}},{"type":"paragraph","data":{"text":"一个没有任何交易记录的区块头大约是80个字节。如果我们假设每10分钟生成一个区块的话,80字节 * 6 * 24 * 365,等于每年产生4.2M。按照2008年的标准,大多数售卖的比算计系统配置了2GB的运行内存,而按照摩尔定律可预测未来每年将会增加1.2GB的运行内存,即使是内存中必须要保留这些区块头,也应该没有什么问题。","alignment":"left"}},{"type":"paragraph","data":{"text":"predict:预测;推导;","alignment":"left"}},{"type":"paragraph","data":{"text":"RAM:随机存取存储器(英语:Random Access Memory,缩写:RAM),也叫主存,是与CPU直接交换数据的内部存储器。它可以随时读写(刷新时除外),而且速度很快,通常作为操作系统或其他正在运行中的程序的临时数据存储介质。RAM工作时可以随时从任何一个指定的地址写入(存入)或读出(取出)信息。它与ROM的最大区别是数据的易失性,即一旦断电所存储的数据将随之丢失。RAM在计算机和数字系统中用来暂时存储程序、数据和中间结果。","alignment":"left"}},{"type":"delimiter","data":{}},{"type":"paragraph","data":{"text":"我是陆挺,一名90后,希望在持续学习的路上,与你同行。","alignment":"left"}}],"version":"2.19.1"}