随着区块链技术的不断发展,区块链中的区块也在不断增加,区块链新节点面临越来越大的区块存储以及较长的区块同步时间等问题.为了解决该问题,提出一种区块链节点存储优化方案.首先分析区块链恶意节点概率并计算每个分片中区块的数量;然后获取区块链节点数量以及分片中编号最大区块被恶意节点攻击的概率,计算出每个分片需要存储的副本数量.经实验分析得到:该优化方案减少了区块链节点约50%的区块存储,并减少节点约22%的同步区块时间.因此,该优化方案不仅减少了区块链的节点存储,还提高了新节点加入区块链的效率.
With the development of blockchain technology, the blocks in blockchain are keeping increasing, the new blockchain nodes are facing the problems of increasingly large storage and increasingly long time in block synchronization. In order to solve the problems, this paper proposes a blockchain node storage optimization scheme, which firstly calculates the number of blocks in each sharding by analyzing the probability of blockchain malicious nodes, then obtains the number of blockchain nodes and the probability of the block with the largest number being attacked by malicious node within the sharding, and at last, calculates the number of copies that need to be stored in each sharding. Experimental analysis shows that the optimization scheme reduces 50% blocks storage and 22% synchronization time in blockchain nodes, therefore, it can not only reduce the node storage in blockchain, but also improve the efficiency of new nodes joining the blockchain.
[1] Nakamoto S. Bitcoin:a peer-to-peer electronic cash system[OL]. https://bitcoin.org/bitcoin.pdf,2009.
[2] Buterin V. A next generation smart contract and decentralized application platform[OL]. https://www.ethereum.org/pdfs/EthereumWhitePaper.pdf, 2015.
[3] Wood G. Ethereum:a secure decentralised generalised transaction ledger[OL]. https://ethereum.github.io/yellowpaper/paper.pdf,2018.
[4] Poon J, Dryja T. The bitcoin lightning network:scalable off-chain instant payments[OL]. https://lightning.network/lightning-network-paper.pdf,2016.
[5] Szilgyi P. eth/63 fast synchronization algorithm[OL], 2015. https://github.com/ethereum/goethereum/pull/1889.
[6] Buterin V. State tree pruning[OL].(2015-06-26) https://blog.ethereum.org.state-treepruning,2015.
[7] França F B. F. Homomorphic mini-blockchain scheme[OL].[2015-04]. http://cryptonite.info/files/HMBC.pdf.
[8] Network Raiden. High speed asset transfers for Ethereum[OL]. http://raiden.network/,2016.
[9] Poon J, Buterin V. Plasma:scalable autonomous smart contracts[OL]. https://plasma.io/plasma.pdf,2017.
[10] Benet J. IPFS-content addressed, versioned, P2P file system[OL]. https://arxiv.org/abs/1407.3561v1,2014.
[11] Norvill R, Pontiveros B B F, State R. IPFS for reduction of chain size in Ethereum[C]//2018 International Conference on Internet of Things and Green Computing. IEEE, 2018:1121-1128.
[12] Perard D, Lacan J, Bachy Y, Detchart J. Erasure code based low storageblockchain node[C]//IEEE International Conference on Blockchain, 2018.
[13] Jia D, Xin J, Wang Z, et al. Elastic chain:Support very large blockchain by reducing data redundancy[J]. Springer, APWeb-WAIM 2018:440-454
[14] Jweiwan. A simplified blockchain implementation in Golang[OL]. https://github.com/Jeiwan/blockchain_go.