vChain: Enabling Verifjable Boolean Range Queries over Blockchain Databases
Cheng Xu Ce Zhang Jianliang Xu {chengxu, cezhang, xujl}@comp.hkbu.edu.hk July 2, 2019 @ SIGMOD ’19
Department of Computer Science Hong Kong Baptist University
vChain: Enabling Verifjable Boolean Range Queries over Blockchain - - PowerPoint PPT Presentation
vChain: Enabling Verifjable Boolean Range Queries over Blockchain Databases Cheng Xu Ce Zhang Jianliang Xu {chengxu, cezhang, xujl}@comp.hkbu.edu.hk July 2, 2019 @ SIGMOD 19 Department of Computer Science Hong Kong Baptist University
Department of Computer Science Hong Kong Baptist University
1/15
Blockchain Applications [Credit: FAHM Technology Partners] 1/15
Blockchain Database Solutions
2/15
Workfmow of Existing Solutions
2/15
Miner Full Node Light Node Full Node Miner
Q R Q R
3/15
Miner Full Node Light Node Full Node Miner
Q R Q R
3/15
Miner Full Node Light Node Full Node Miner · · ·
Q R Q R
3/15
Miner Full Node Light Node Full Node Miner · · ·
Q R Q R
3/15
4/15
[Credit: Oscar W]
and fair realization,” in IEEE INFOCOM, Honolulu, HI, USA, 2018, pp. 792–800. 5/15
[Credit: Oscar W]
and fair realization,” in IEEE INFOCOM, Honolulu, HI, USA, 2018, pp. 792–800. 5/15
Full Node User Q R, proof synchronize
7/15
Full Node User Q R, proof synchronize
7/15
Blockchain Network Full Node User Q R, proof synchronize
7/15
Blockchain Network Full Node User Q R, proof synchronize
7/15
(Full Node) . . . . . . PreBkHash . . .
ti Vi Wi
t1 1 {a, b}
t2 2 {a}
t3 3 {c}
t4 5 {a, b}
t5 1 {c, d} blocki (Light Node) . . . . . . q1 : [ti, ti], [1, 2], b q2 : −, [1, 2], c ∨ d q3 : −, [1, 2], a ∧ d (Miner) Block Headers Block Headers & Data (incl. ADS) Q Service Provider (SP) Query User
{o1}, VO {o5}, VO ∅, VO
Block Header & Data Block Header
System Model of vChain 8/15
9/15
10/15
N0 = H(N1|N2) N1 = H(N3|N4) N2 = H(N5|N6) N2 = H(N5|N6) N3 = H(o1) N3 = H(o1) N4 = H(o2)
N5 = H(o3) N6 = H(o4)
sig(N0) Q
Merkle Hash Tree
11/15
N0 = H(N1|N2) N1 = H(N3|N4) N2 = H(N5|N6) N2 = H(N5|N6) N3 = H(o1) N3 = H(o1) N4 = H(o2)
N5 = H(o3) N6 = H(o4)
sig(N0) Q
Merkle Hash Tree
11/15
PreBkHash TS ConsProof ObjectHash AttDigest
blocki
Extended Block Structure
“Sedan” “Benz” “BMW” “Sedan” “Benz” “BMW”
“Van” “Benz” , we have “Sedan” “Van” “Benz”
“Van” “Benz” “Sedan” pk to compute proof
acc “Van” “Benz” from the block header and uses VerifyDisjoint AttDigest acc “Sedan” pk to verify the mismatch 12/15
. . . PreBkHash TS ConsProof ObjectHash AttDigest
blocki
. . .
Extended Block Structure
“Sedan” “Benz” “BMW” “Sedan” “Benz” “BMW”
“Van” “Benz” , we have “Sedan” “Van” “Benz”
“Van” “Benz” “Sedan” pk to compute proof
acc “Van” “Benz” from the block header and uses VerifyDisjoint AttDigest acc “Sedan” pk to verify the mismatch 12/15
. . . PreBkHash TS ConsProof ObjectHash AttDigest
blocki
. . .
Extended Block Structure
“Sedan” “Benz” “BMW” “Sedan” “Benz” “BMW”
“Van” “Benz” , we have “Sedan” “Van” “Benz”
“Van” “Benz” “Sedan” pk to compute proof
acc “Van” “Benz” from the block header and uses VerifyDisjoint AttDigest acc “Sedan” pk to verify the mismatch 12/15
. . . PreBkHash TS ConsProof ObjectHash AttDigest
blocki
. . .
Extended Block Structure
“Sedan” “Benz” “BMW” “Sedan” “Benz” “BMW”
“Van” “Benz” , we have “Sedan” “Van” “Benz”
“Van” “Benz” “Sedan” pk to compute proof
acc “Van” “Benz” from the block header and uses VerifyDisjoint AttDigest acc “Sedan” pk to verify the mismatch 12/15
. . . PreBkHash TS ConsProof ObjectHash AttDigest
blocki
. . .
Extended Block Structure
“Sedan” “Benz” “BMW” “Sedan” “Benz” “BMW”
“Van” “Benz” , we have “Sedan” “Van” “Benz”
“Van” “Benz” “Sedan” pk to compute proof
acc “Van” “Benz” from the block header and uses VerifyDisjoint AttDigest acc “Sedan” pk to verify the mismatch 12/15
. . . PreBkHash TS ConsProof ObjectHash AttDigest
blocki
. . .
Extended Block Structure
VerifyDisjoint(AttDigest, acc({“Sedan”}), π, pk) to verify the mismatch 12/15
∗ 0∗ 00∗ 000 001 01∗ 010 011 1∗ 10∗ 100 101 11∗ 110 111 q 0 6
Example of Transformation
13/15
∗ 0∗ 00∗ 000 001 01∗ 010 011 1∗ 10∗ 100 101 11∗ 110 111 q 0 6
Example of Transformation
13/15
∗ 0∗ 00∗ 000 001 01∗ 010 011 1∗ 10∗ 100 101 11∗ 110 111 q = [0, 6]
Example of Transformation
13/15
∗ 0∗ 00∗ 000 001 01∗ 010 011 1∗ 10∗ 100 101 11∗ 110 111 q = [0, 6]
Example of Transformation
13/15
∗ 0∗ 00∗ 000 001 01∗ 010 011 1∗ 10∗ 100 101 11∗ 110 111 q = [0, 6]
Example of Transformation
13/15
PreBkHash TS ConsProof MerkleRoot Nr N5 N1 N2 N6 N3 N4 hashr Wr AttDigestr hash1 W1 AttDigest1
blocki
Node Object Set Attributes N1
W1 “Sedan” “Benz” N2
W2 “Sedan” “Audi” N3
W3 “Van” “Benz” N4
W4 “Van” “BMW”
Intra-Block Index
PreBkHash MerkleRoot SkipListRoot L2 L4
PreSkippedHashL2 WL2 AttDigestL2 PreSkippedHashL4 WL4 AttDigestL4
blocki
PreBkHash
blocki
2
PreBkHash
blocki
4
Inter-Block Index
q1 q2 q3 q4 N1 N2 N3 N4 x y 1 2 3 1 2 3 N0 N1 N5 N6 N7 N8 N2 N3 N4
ti 0 2 “Van” “Benz” ti 001 102 “Van” “Benz” Query Range Boolean Condition q1 0 2 1 3 “Van” “Benz” q2 0 0 1 3 “Van” “BMW” q3 0 2 0 2 “Sedan” “Audi” q4 2 0 3 3 “Sedan” “Benz” Grid Cell 0 2 1 3 0 1 1 2 RCIF: Query Cover Type q1 full q2 full q3 partial Query Condition Set Queries “Van” q1 q2 “Benz” q1 “BMW” q2 BCIF:
Inverted Prefjx Tree 14/15
PreBkHash TS ConsProof MerkleRoot Nr N5 N1 N2 N6 N3 N4 hashr Wr AttDigestr hash1 W1 AttDigest1
blocki
. . . . . . Node Object Set Attributes N1
W1 = {“Sedan”, “Benz”} N2
W2 = {“Sedan”, “Audi”} N3
W3 = {“Van”, “Benz”} N4
W4 = {“Van”, “BMW”}
Intra-Block Index
PreBkHash MerkleRoot SkipListRoot L2 L4
PreSkippedHashL2 WL2 AttDigestL2 PreSkippedHashL4 WL4 AttDigestL4
blocki
PreBkHash
blocki
2
PreBkHash
blocki
4
Inter-Block Index
q1 q2 q3 q4 N1 N2 N3 N4 x y 1 2 3 1 2 3 N0 N1 N5 N6 N7 N8 N2 N3 N4
ti 0 2 “Van” “Benz” ti 001 102 “Van” “Benz” Query Range Boolean Condition q1 0 2 1 3 “Van” “Benz” q2 0 0 1 3 “Van” “BMW” q3 0 2 0 2 “Sedan” “Audi” q4 2 0 3 3 “Sedan” “Benz” Grid Cell 0 2 1 3 0 1 1 2 RCIF: Query Cover Type q1 full q2 full q3 partial Query Condition Set Queries “Van” q1 q2 “Benz” q1 “BMW” q2 BCIF:
Inverted Prefjx Tree 14/15
PreBkHash TS ConsProof MerkleRoot Nr N5 N1 N2 N6 N3 N4 hashr Wr AttDigestr hash1 W1 AttDigest1
blocki
. . . . . . Node Object Set Attributes N1
W1 = {“Sedan”, “Benz”} N2
W2 = {“Sedan”, “Audi”} N3
W3 = {“Van”, “Benz”} N4
W4 = {“Van”, “BMW”}
Intra-Block Index
PreBkHash MerkleRoot SkipListRoot L2 L4 . . .
PreSkippedHashL2 WL2 AttDigestL2 PreSkippedHashL4 WL4 AttDigestL4 . . .
blocki
. . . PreBkHash . . . . . . . . .
blocki−2
. . . PreBkHash . . . . . . . . .
blocki−4
. . . . . .
Inter-Block Index
q1 q2 q3 q4 N1 N2 N3 N4 x y 1 2 3 1 2 3 N0 N1 N5 N6 N7 N8 N2 N3 N4
ti 0 2 “Van” “Benz” ti 001 102 “Van” “Benz” Query Range Boolean Condition q1 0 2 1 3 “Van” “Benz” q2 0 0 1 3 “Van” “BMW” q3 0 2 0 2 “Sedan” “Audi” q4 2 0 3 3 “Sedan” “Benz” Grid Cell 0 2 1 3 0 1 1 2 RCIF: Query Cover Type q1 full q2 full q3 partial Query Condition Set Queries “Van” q1 q2 “Benz” q1 “BMW” q2 BCIF:
Inverted Prefjx Tree 14/15
PreBkHash TS ConsProof MerkleRoot Nr N5 N1 N2 N6 N3 N4 hashr Wr AttDigestr hash1 W1 AttDigest1
blocki
. . . . . . Node Object Set Attributes N1
W1 = {“Sedan”, “Benz”} N2
W2 = {“Sedan”, “Audi”} N3
W3 = {“Van”, “Benz”} N4
W4 = {“Van”, “BMW”}
Intra-Block Index
PreBkHash MerkleRoot SkipListRoot L2 L4 . . .
PreSkippedHashL2 WL2 AttDigestL2 PreSkippedHashL4 WL4 AttDigestL4 . . .
blocki
. . . PreBkHash . . . . . . . . .
blocki−2
. . . PreBkHash . . . . . . . . .
blocki−4
. . . . . .
Inter-Block Index
q1 q2 q3 q4 N1 N2 N3 N4 x y 1 2 3 1 2 3 N0 N1 N5 N6 N7 N8 N2 N3 N4
= ti, {001, 102, “Van”, “Benz”} Query Range Boolean Condition q1 [(0, 2), (1, 3)] {“Van” ∧ “Benz”} q2 [(0, 0), (1, 3)] {“Van” ∧ “BMW”} q3 [(0, 2), (0, 2)] {“Sedan” ∧ “Audi”} q4 [(2, 0), (3, 3)] {“Sedan” ∧ “Benz”} Grid Cell : [(0, 2), (1, 3)] → {0∗1 ∧ 1∗2} RCIF: Query Cover Type q1 full q2 full q3 partial Query Condition Set Υ Queries {“Van”} q1, q2 {“Benz”} q1 {“BMW”} q2 BCIF:
Inverted Prefjx Tree 14/15
terms of SP CPU time
terms of user CPU time
from the SP to the user
100 200 300 400 2 (240) 4 (480) 6 (720) 8 (960) 10 (1200) SP CPU Time (s) Time Window (Hour)/(Blocks) nil-acc1 nil-acc2 intra-acc1 intra-acc2 both-acc1 both-acc2 0.01 0.1 1 10 100 2 (240) 4 (480) 6 (720) 8 (960) 10 (1200) User CPU Time (s) Time Window (Hour)/(Blocks) nil-acc1 nil-acc2 intra-acc1 intra-acc2 both-acc1 both-acc2 1 10 102 103 104 2 (240) 4 (480) 6 (720) 8 (960) 10 (1200) VO Size (KB) Time Window (Hour)/(Blocks) nil-acc1 nil-acc2 intra-acc1 intra-acc2 both-acc1 both-acc2
50 100 150 2 (480) 4 (960) 6 (1440) 8 (1920) 10 (2400) SP CPU Time (s) Time Window (Hour)/(Blocks) nil-acc1 nil-acc2 intra-acc1 intra-acc2 both-acc1 both-acc2 0.01 0.1 1 10 100 2 (480) 4 (960) 6 (1440) 8 (1920) 10 (2400) User CPU Time (s) Time Window (Hour)/(Blocks) nil-acc1 nil-acc2 intra-acc1 intra-acc2 both-acc1 both-acc2 1 10 102 103 104 2 (480) 4 (960) 6 (1440) 8 (1920) 10 (2400) VO Size (KB) Time Window (Hour)/(Blocks) nil-acc1 nil-acc2 intra-acc1 intra-acc2 both-acc1 both-acc2
Time-Window Query Performance 15/15
15/15
[HCW+18]
decentralized, reliable and fair realization,” in IEEE INFOCOM, Honolulu, HI, USA, 2018, pp. 792–800. [ICDE19]
queries in blockchain,” in IEEE ICDE, Macau SAR, China, 2019. [Mer89]
[PTT11]
CRYPTO, Santa Barbara, CA, USA, 2011, pp. 91–110. [SIGMOD19]
ACM SIGMOD, Amsterdam, Netherlands, 2019.