Downsampling Blockchain Algorithm Qin Huang , Li Quan , Shengli Zhang Beihang University 2019.04.29
Content 1 Background 2 Downsampling Blockchain Algorithm 3 Analysis and Simulation 4 Conclusion
Content 1 Background 2 Downsampling Blockchain Algorithm 3 Analysis and Simulation 4 Conclusion
Background ◆ Definition Blockchain technology is a distributed ledger that cryptographically secures records of transactions [1]. It provides a secure distributed database. Block Block Block Block Block ··· 0 1 2 17996 17997 Fi Fig. g. 1. Th The str tructure of of bl bloc ockchain in. ◆ Characteristics Highly-redundant storage, time-series, non-falsification, non-forgery, distributed credit, smart contract and privacy protection. [1] A. Narayanan, J. Bonneau, E. Felten, A. Miller, and S. Goldfeder, Bitcoin and Cryptocurrency Technologies: A Comprehensive Introduction. Princeton University Press, 2016.
Background ◆ Problems Storage bloating : ⚫ About 250,000 transactions per day; ⚫ About 50GB per year; ⚫ More than 190GB data storage now. Fi Fig. g. 2. Th The bl blockchain in size of of Bi Bitcoi oin [2]. Network routing: In order to verify transactions and broadcast, each node needs to save all the data of the blockchain. 125GB 190GB Fi Fig. g. 3. Co Comparis ison on of of bl blockchain in size and and mo mobi bile le pho phone stor orage capacit ity. [2] Blockchain Monitoring Website [Online], available: https://blockchain.info/, October 23, 2018. Requirement: reduce the storage redundancy of nodes for the use of mobile devices and the IoT.
Background ◆ Contributions Downsampling Do blockchain blo W allet M iner W allet algorithm al W allet N etwork N etwork N etwork F ull F ull Routing Routing Routing Blockchain Blockchain Nodes Nodes Nodes Full ll nod ode SPV (Lig (Lightweigh ght) nod ode Do Downsamplin ing Blo Blockchain (DS (DS) nod ode Full Full capacit ity Par artia ial l capacit ity Fig. Fi g. 4. Di Different ty types of of no nodes on on the the extended bi bitcoin in ne networ ork [3]. [3] A. M. Antonopoulos, Mastering Bitcoin: unlocking digital cryptocurrencies. O’Reilly Media, Inc., 2014. DS node: broadcast transactions, be more secure, reduce the workload of the full node.
Content 1 Background 2 Downsampling Blockchain Algorithm 3 Analysis and Simulation 4 Conclusion
Downsampling blockchain algorithm 1. Verify and broadcast transactions 2. Estimate the block where the most recent state is located 3. Get elastic storage size and broadcast accuracy
Downsampling blockchain algorithm 1. Verify and broadcast new transactions Existing Most Full Inputs Address Amount recent Broadcast algorithm Blockchain check check check state May be be inconsis istent Proposed Part State Address Inputs Amount Broadcast algorithm blockchain estimate check check check Fig. Fi g. 5. Process for or verify fyin ing an and br broa oadcastin ing ne new w tr transactions.
Downsampling blockchain algorithm 2. Estimate the block where the most recent state is located Block Block Block Block Block Block Block Block Es Estim timate Down Do wnlo load al all body body body body ··· body body ··· body body red edundant bloc bl ock bo bodi dies 0 1 17996 17997 0 1 17996 17997 block bo bloc bodi dies Block Block Block Block Block Block Block Do Down wnlo load body body body body body body body ··· ··· Pru rune pru pruned 0 1 17997 0 1 17996 17997 bl bloc ock bo bodi dies Proposed algorithm Existing algorithm Fi Fig. g. 6. Process for or do down wnsampli ling bl bloc ockchain in. Predicting the most recent state distribution based on block information entropy estimation.
Downsampling blockchain algorithm 3. Get elastic storage size and broadcast accuracy F ull 100% 100 Blockchain Full ll nod ode F ull N% N% Blockchain N etwork 100 100% Routing DS DS nod ode Nodes N etwork 100% 100 Routing Nodes N etwork Ha Handli ling transactions SPV (Lig (Lightweigh ght) nod ode Routing rela elated to to itself May be be wrong whe hen Nodes broadcastin br ing transactions Proposed algorithm Existing algorithm Fi Fig. g. 7. Rou outin ing capabili lity of of di different no node des. Partial blockchain, full routing capability, trade-off between broadcast accuracy and storage.
Downsampling blockchain algorithm Obtain Determine Calculate Choose reserved Download block information downsampling base set bodies entropy factor Definition 1. Reserved set is the set of 𝜀 blocks with the largest information entropy. Definition 2. Survival block is the number of blocks that states have been sustained. The survival block of the most recent state reflects the inherent rules of the most recent state. Cumulative Probability Information distribution density entropy Fig. 8. UTXOs’ survival block.
Content 1 Background 2 Downsampling Blockchain Algorithm 3 Analysis and Simulation 4 Conclusion
Analysis and simulation 1. Performance analysis Definition 3. The broadcast accuracy, denoted by 𝜒 , is the probability that a node broadcasts valid transactions. Definition 4. The storage efficiency, denoted by 𝑆 , is broadcast accuracy storage data size ratio. For a DS node, 𝜒 = 𝑂 𝑡𝑣 𝜒 𝑇 , 𝑆 = 𝑂 𝑣 where ⊆ {𝑒 1 , 𝑒 2 , … , 𝑒 𝜀 } is reserved set, 𝜀 Fi Fig. g. 9. St Stor orage effic ficie iency of of ful full l no node des, Sim Simpli lifie fied Payment Ver erifi ificatio ion is the number of reserved block bodies no node des, ran andom sam ampli ling no node des, an and do down wnsampli ling no node des. and 𝑇 is the total block size of . DS nodes have a better storage efficiency than full nodes, SPV nodes and RS nodes.
Analysis and simulation 2. Complexity analysis The selection of blocks in the downsampling blockchain algorithm is a one-time job. Although the block depth is constantly changing, the distribution of the reserved block depth is stable. Thus, the complexity of DS nodes is determined by the number of downloaded block bodies. TABL ABLE I AVE VERAGE DO DOWNLOADED BL BLOCKS NU NUMBER OF OF FU FULL LL NO NODES S , RAN RANDOM SAMP AMPLING NO NODES S , AND AND DO DOWNSAMPLING NO NODES M 1 16 256 1024 4096 Full Nodes 519000 - - - - RS Nodes 519000 32438 2028 507 127 DS Nodes 519000 32438 2028 507 127 DS nodes have about 1/ 𝑁 average number of downloaded blocks of full nodes.
Analysis and simulation 3. Security analysis The blockchain can be viewed as a transaction-based state machine, which begins with a genesis state and incrementally executes transactions to morph it into some final state. Formally 𝜏 𝑢+1 ≡ Υ(𝜏 𝑢 , 𝑈) , where 𝜏 𝑢 is the world state at slot 𝑢, Υ is the state transition function and 𝑈 is a transaction. The 𝑢 𝑛𝑏𝑦 is current largest 𝑢 , and 𝜏 𝑢 𝑛𝑏𝑦 is the most recent state. We can combine state transition function and transactions, denoted as Υ 𝑢 , then 𝜏 𝑢+1 ≡ Υ 𝑢 𝜏 𝑢 . For an Unspent Transaction Outputs (UTXOs) based blockchain, 𝜏 𝑢 can be expressed as {𝑉𝑈𝑌𝑃 𝑢 𝑜 } . 1 , 𝑉𝑈𝑌𝑃 𝑢 2 , … , 𝑉𝑈𝑌𝑃 𝑢 𝑦 ), we can know that it is UTXO if there are Lemma 1. For a Transaction Output ( 𝑈𝑌𝑃 𝑢 0 not any Υ 𝑢 𝑡 changing its state, where 𝑢 0 ≤ 𝑢 ≤ 𝑢 𝑛𝑏𝑦 . Lemma 2. If we know all recent transactions, we can get a set of UTXOs, which is a subset of 𝜏 𝑢 𝑛𝑏𝑦 . The expectation that a DS node is deceived can approach zero, though some valid 𝑈𝑡 cannot pass.
Content 1 Background 2 Downsampling Blockchain Algorithm 3 Analysis and Simulation 4 Conclusion
Conclusion Routing capability Reduce the storage requirement of nodes with downsampling Safer than SPV node DS 1. Verify and broadcast transactions; node 2. Estimate the block where the Reduce the workload of full node most recent state is located; 3. Get elastic storage size and More flexible and stable network broadcast accuracy.
Thank you !
Recommend
More recommend