Downsampling Blockchain Algorithm Qin Huang Li Quan Shengli Zhang - - PowerPoint PPT Presentation
Downsampling Blockchain Algorithm Qin Huang Li Quan Shengli Zhang - - PowerPoint PPT Presentation
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
Content
Background
1
Downsampling Blockchain Algorithm
2
Analysis and Simulation
3
Conclusion
4
Content
Background
1
Downsampling Blockchain Algorithm
2
Analysis and Simulation
3
Conclusion
4
Background
◆Definition
Blockchain technology is a distributed ledger that cryptographically secures records
- f transactions [1]. It provides a secure distributed database.
◆Characteristics
Highly-redundant storage, time-series, non-falsification, non-forgery, distributed credit, smart contract and privacy protection. Block Block 1 Block 2 Block 17996 Block 17997
···
Fi Fig.
- g. 1. Th
The str tructure of
- f bl
bloc
- ckchain
in.
[1] A. Narayanan, J. Bonneau, E. Felten, A. Miller, and S. Goldfeder, Bitcoin and Cryptocurrency Technologies: A Comprehensive Introduction. Princeton University Press, 2016.
Requirement: reduce the storage redundancy of nodes for the use of mobile devices and the IoT.
Background
◆Problems
Storage bloating: ⚫ About 250,000 transactions per day; ⚫ About 50GB per year; ⚫ More than 190GB data storage now. Network routing: In order to verify transactions and broadcast, each node needs to save all the data of the blockchain.
Fi Fig.
- g. 2. Th
The bl blockchain in size of
- f Bi
Bitcoi
- in [2].
[2] Blockchain Monitoring Website [Online], available: https://blockchain.info/, October 23, 2018.
190GB 125GB Fi Fig.
- g. 3. Co
Comparis ison
- n of
- f bl
blockchain in size and and mo mobi bile le pho phone stor
- rage capacit
ity.
Background
◆Contributions
Fi Fig.
- g. 4. Di
Different ty types of
- f no
nodes on
- n the
the extended bi bitcoin in ne networ
- rk [3].
Wallet Miner Full
Blockchain
Network
Routing Nodes
Do Downsampling blo blockchain al algorithm
Full ll nod
- de
SPV (Lig (Lightweigh ght) nod
- de
Do Downsamplin ing Blo Blockchain (DS (DS) nod
- de
Wallet Network
Routing Nodes
Wallet Full
Blockchain
Network
Routing Nodes
[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.
Full Full capacit ity Par artia ial l capacit ity
Content
Background
1
Downsampling Blockchain Algorithm
2
Analysis and Simulation
3
Conclusion
4
- 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
Downsampling blockchain algorithm
Full Blockchain Most recent state Address check Amount check Broadcast Part blockchain State estimate Address check Amount check Broadcast Inputs check
Existing algorithm Proposed algorithm
May be be inconsis istent
Fi Fig.
- g. 5. Process for
- r verify
fyin ing an and br broa
- adcastin
ing ne new w tr transactions.
Inputs check
Predicting the most recent state distribution based on block information entropy estimation.
Downsampling blockchain algorithm
- 2. Estimate the block where the most recent state is located
Block body Block body 1 Block body 17996 Block body 17997
···
Block body Block body 1 Block body 17996 Block body 17997
···
Block body Block body 1 Block body 17996 Block body 17997
···
Block body Block body 1 Block body 17997
···
Do Down wnlo load al all bl bloc
- ck bo
bodi dies Pru rune Es Estim timate red edundant bloc block bo bodi dies Do Down wnlo load pru pruned bl bloc
- ck bo
bodi dies
Existing algorithm Proposed algorithm
Fi Fig.
- g. 6. Process for
- r do
down wnsampli ling bl bloc
- ckchain
in.
Partial blockchain, full routing capability, trade-off between broadcast accuracy and storage.
Downsampling blockchain algorithm
- 3. Get elastic storage size and broadcast accuracy
Full ll nod
- de
SPV (Lig (Lightweigh ght) nod
- de
100 100% 100 100% Ha Handli ling transactions rela elated to to itself
DS DS nod
- de
N% N% 100 100% May be be wrong whe hen br broadcastin ing transactions
Existing algorithm Proposed algorithm
Full
Blockchain
Network
Routing Nodes
Network
Routing Nodes
Full
Blockchain
Network
Routing Nodes
Fi Fig.
- g. 7. Rou
- utin
ing capabili lity of
- f di
different no node des.
Downsampling blockchain algorithm
Determine downsampling factor
Cumulative distribution
Calculate base Choose reserved set Obtain information entropy Download block bodies
Probability density 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. Definition 1. Reserved set is the set of 𝜀 blocks with the largest information entropy.
- Fig. 8. UTXOs’ survival block.
Content
Background
1
Downsampling Blockchain Algorithm
2
Analysis and Simulation
3
Conclusion
4
DS nodes have a better storage efficiency than full nodes, SPV nodes and RS nodes.
Analysis and simulation
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, 𝜀 is the number of reserved block bodies and 𝑇 is the total block size of .
- 1. Performance analysis
Fi Fig.
- g. 9. St
Stor
- rage effic
ficie iency of
- f ful
full l no node des, Sim Simpli lifie fied Payment Ver erifi ificatio ion no node des, ran andom sam ampli ling no node des, an and do down wnsampli ling no node des.
Analysis and simulation
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
- f downloaded block bodies.
2. Complexity analysis
M 1 16 256 1024 4096 Full Nodes 519000
- RS Nodes
519000 32438 2028 507 127 DS Nodes 519000 32438 2028 507 127
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
DS nodes have about 1/𝑁 average number of downloaded blocks of full nodes.
Analysis and simulation
3. Security analysis
The expectation that a DS node is deceived can approach zero, though some valid 𝑈𝑡 cannot pass.
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, … , 𝑉𝑈𝑌𝑃𝑢 𝑜}.
Lemma 1. For a Transaction Output (𝑈𝑌𝑃𝑢0
𝑦 ), we can know that it is UTXO if there are
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 𝜏𝑢𝑛𝑏𝑦.
Content
Background
1
Downsampling Blockchain Algorithm
2
Analysis and Simulation
3
Conclusion
4
Conclusion
1. Verify and broadcast transactions; 2. Estimate the block where the most recent state is located; 3. Get elastic storage size and broadcast accuracy.
Reduce the storage requirement of nodes with downsampling
DS node
Routing capability Safer than SPV node Reduce the workload of full node More flexible and stable network