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. 一旦硬币中的最新事務被埋入足夠的塊中,在可以丢棄之前的已用事務将節省磁盤空間。為了在不破壞塊哈希值的情況下實作這一點,事務在Merkle Tree[7][2][5]中被哈希化,隻有根包含在塊的哈希值中。老街區可以通過砍掉樹枝來壓實。内部散列不需要存儲。
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. 沒有交易的塊頭大約為80位元組。如果我們假設每10分鐘産生一個塊,則每年80位元組×6×24×365=4.2MB。由于計算機系統到2008年通常銷售2GB的RAM,摩爾定律預測目前每年增長1.2GB,即使塊頭必須儲存在記憶體中,存儲也不應該成為問題。
如果最近的交易已經被納入了足夠多的區塊之中,那麼就可以丢棄該交易之前的資料,以回收硬碟空間。為了同時確定不損害區塊的随機散列值,交易資訊被随機散列時,被建構成一種Merkle樹(Merkle tree)[7] 的形态,使得隻有根(root)被納入了區塊的随機散列值。通過将該樹(tree)的分支拔除(stubbing)的方法,老區塊就能被壓縮。而内部的随機散列值是不必儲存的。

不含交易資訊的區塊頭(Block header)大小僅有80位元組。如果我們設定區塊生成的速率為每10分鐘一個,那麼每一年産生的資料位4.2MB。(80 bytes * 6 * 24 * 365 = 4.2MB)。2008年,PC系統通常的記憶體容量為2GB,按照摩爾定律的預言,即使将全部的區塊頭存儲于記憶體之中都不是問題。
8. 簡化的支付确認-Simplified Payment Verification
It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he's convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it's timestamped in. He can't check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it. 可以在不運作完整網絡節點的情況下驗證支付。使用者隻需要保留最長工作證明鍊的塊頭的副本,通過查詢網絡節點,直到他确信自己具有最長鍊為止,就可以獲得該副本,并獲得将事務連結到其時間戳所在的塊的Merkle分支。他不能自己檢查事務,但是通過将它連結到鍊中的一個位置,他可以看到網絡節點已經接受它,并且在進一步确認網絡已經接受它之後添加塊。
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker's fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user's software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification. 是以,隻要誠實的節點控制網絡,驗證是可靠的,但是如果網絡被攻擊者壓倒,則驗證更加脆弱。雖然網絡節點可以自己驗證事務,但是隻要攻擊者可以繼續覆寫網絡,簡化的方法就可以被攻擊者僞造的事務所欺騙。防止這種情況發生的一種政策是,當網絡節點檢測到無效塊時,接受來自它們的警報,提示使用者的軟體下載下傳完整塊和提醒的事務以确認不一緻性。接受頻繁支付的企業可能仍然希望運作自己的節點,進而獲得更獨立的安全性和更快的驗證。
在不運作完整網絡節點的情況下,也能夠對支付進行檢驗。一個使用者需要保留最長的工作量證明鍊條的區塊頭的拷貝,它可以不斷向網絡發起詢問,直到它确信自己擁有最長的鍊條,并能夠通過merkle的分支通向它被加上時間戳并納入區塊的那次交易。節點想要自行檢驗該交易的有效性原本是不可能的,但通過追溯到鍊條的某個位置,它就能看到某個節點曾經接受過它,并且于其後追加的區塊也進一步證明全網曾經接受了它。
當此情形,隻要誠實的節點控制了網絡,檢驗機制就是可靠的。但是,當全網被一個計算力占優的攻擊者攻擊時,将變得較為脆弱。因為網絡節點能夠自行确認交易的有效性,隻要攻擊者能夠持續地保持計算力優勢,簡化的機制會被攻擊者焊接的(fabricated)交易欺騙。那麼一個可行的政策就是,隻要他們發現了一個無效的區塊,就立刻發出警報,收到警報的使用者将立刻開始下載下傳被警告有問題的區塊或交易的完整資訊,以便對資訊的不一緻進行判定。對于日常會發生大量收付的商業機構,可能仍會希望運作他們自己的完整節點,以保持較大的獨立完全性和檢驗的快速性。