Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers - - PowerPoint PPT Presentation

generalizing blocksci to cross chain analyses of forked
SMART_READER_LITE
LIVE PREVIEW

Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers - - PowerPoint PPT Presentation

Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers Masters Thesis Defensio , September 14 th 2020 Martin Plattner, Universitt Innsbruck martin@mplattner.at Agenda Motivation Implementing the Multi-Chain Mode for


slide-1
SLIDE 1

Generalizing BlockSci to Cross-Chain Analyses

  • f Forked Ledgers

Master’s Thesis Defensio, September 14th 2020 Martin Plattner, Universität Innsbruck

martin@mplattner.at

slide-2
SLIDE 2

Agenda

  • Motivation
  • Implementing the Multi-Chain Mode for BlockSci
  • Cross-Chain Address Clustering
  • Conclusion
slide-3
SLIDE 3

Motivation

and Preliminaries

slide-4
SLIDE 4

Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers

Motivation

slide-5
SLIDE 5

Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

Ledger

Motivation

slide-6
SLIDE 6

Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

Ledger Single-chain analysis

Motivation

slide-7
SLIDE 7

Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

Ledger Single-chain analysis BlockSci

Blockchain analysis tool

Motivation

slide-8
SLIDE 8

Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

Ledger

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

Forked Ledger BlockSci

Blockchain analysis tool

Single-chain analysis

Bitcoin Cash (Aug 2017)

Hard-Fork

due to changed rules

Motivation

slide-9
SLIDE 9

Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

Ledger

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

Forked Ledger BlockSci

Blockchain analysis tool

Single-chain analysis

Bitcoin Cash (Aug 2017)

Hard-Fork

due to changed rules I O I

Motivation

slide-10
SLIDE 10

BlockSci

Blockchain analysis tool BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

Ledger Forked Ledger Cross-chain analysis

Bitcoin Cash (Aug 2017)

Hard-Fork

due to changed rules

Motivation

Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers

slide-11
SLIDE 11

Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

Ledger Forked Ledger BlockSci

Blockchain analysis tool + multi-chain mode

Cross-chain analysis Main contribution Multi-chain mode for BlockSci

Motivation

slide-12
SLIDE 12

BlockSci

BlockSci parser

slide-13
SLIDE 13

BlockSci

BlockSci parser Optimized blockchain data

  • n disk
slide-14
SLIDE 14

BlockSci

Optimized blockchain data (in memory)

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BlockSci parser Optimized blockchain data

  • n disk

mmap()

slide-15
SLIDE 15

BlockSci

Optimized blockchain data (in memory)

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BlockSci parser Optimized blockchain data

  • n disk

mmap()

slide-16
SLIDE 16

Goal

Optimized blockchain data (in memory)

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BlockSci parser Optimized blockchain data

  • n disk

mmap()

slide-17
SLIDE 17

Implementing the Multi-Chain Mode

Requirements, Required Changes, Evaluation

slide-18
SLIDE 18

Requirements

Type No. Requirement Priority Functional 1 Normalized addresses MUST 2 BTC and BCH support MUST 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST Non-functional 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD

slide-19
SLIDE 19

Requirements

Type No. Requirement Priority Functional 1 Normalized addresses MUST 2 BTC and BCH support MUST 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST Non-functional 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

A3 A3 A3

slide-20
SLIDE 20

Requirements

Type No. Requirement Priority Functional 1 Normalized addresses MUST 2 BTC and BCH support MUST 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST Non-functional 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

A3 A3 A3

slide-21
SLIDE 21

Requirements

Type No. Requirement Priority Functional 1 Normalized addresses MUST 2 BTC and BCH support MUST 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST Non-functional 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

A3 A3 A3

BLOCK x

tx1, tx2, ...

slide-22
SLIDE 22

Requirements

Type No. Requirement Priority Functional 1 Normalized addresses MUST 2 BTC and BCH support MUST 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST Non-functional 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

I O I

Output.getSpendingInputs() → [ , ]

O I I

slide-23
SLIDE 23

Requirements

Type No. Requirement Priority Functional 1 Normalized addresses MUST 2 BTC and BCH support MUST 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST Non-functional 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

slide-24
SLIDE 24

Requirements

Type No. Requirement Priority Functional 1 Normalized addresses MUST 2 BTC and BCH support MUST 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST Non-functional 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD

slide-25
SLIDE 25

Requirements

Type No. Requirement Priority Functional 1 Normalized addresses MUST 2 BTC and BCH support MUST 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST Non-functional 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD

slide-26
SLIDE 26

Requirements

Type No. Requirement Priority Functional 1 Normalized addresses MUST 2 BTC and BCH support MUST 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST Non-functional 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD

slide-27
SLIDE 27

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

slide-28
SLIDE 28

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

# /bch/config.json "chainConfig": { "coinName": "bitcoin_cash", "dataDirectory": "/bch/", "parentChainConfigPath": "/btc/config.json", "firstForkedBlockHeight": 478559, "pubkeyPrefix": [0], "scriptPrefix": [5], "segwitActivationHeight": 481824, "segwitPrefix": "bc" }

slide-29
SLIDE 29

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

slide-30
SLIDE 30

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

A3 A3 A3

slide-31
SLIDE 31

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

slide-32
SLIDE 32

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

slide-33
SLIDE 33

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

slide-34
SLIDE 34

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

slide-35
SLIDE 35

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

slide-36
SLIDE 36

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

slide-37
SLIDE 37

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

slide-38
SLIDE 38

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

slide-39
SLIDE 39

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

I O I

slide-40
SLIDE 40

Required Changes

Parser Data layout Analysis library Config file

support links between chains multi-chain mode cross-chain address de-duplication chain-specific data shareable data handle new layout share common data in memory

BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

I O I

slide-41
SLIDE 41

Usage

slide-42
SLIDE 42

Evaluation

Type No. Requirement Priority Result Functional 1 Normalized addresses MUST 2 BTC and BCH support MUST 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST Non-functional 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD

slide-43
SLIDE 43

Evaluation

  • Performance

○ Benchmarked 8 real-world queries ○ On avg. 7% slower

slide-44
SLIDE 44

Cross-Chain Address Clustering

Method, Results

slide-45
SLIDE 45

Cross-Chain Address Clustering

A1 A2 A3 A4

BTC

single-chain clustering

slide-46
SLIDE 46

Cross-Chain Address Clustering

A1 A2 A3 A4

BTC

single-chain clustering BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

I O

slide-47
SLIDE 47

Cross-Chain Address Clustering

A1 A2 A3 A4

BTC

single-chain clustering

A1 A2 A3

BCH

single-chain clustering BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

O I

slide-48
SLIDE 48

Cross-Chain Address Clustering

A1 A2 A3 A4

BTC

single-chain clustering

A1 A2 A3

BCH

single-chain clustering BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

O I

Addresses are normalized in the new multi-chain mode

slide-49
SLIDE 49

Cross-Chain Address Clustering

A1 A2 A3 A4

BTC

single-chain clustering

A1 A2 A3

BCH

single-chain clustering

A1 A2 A3 A4

BTC ← BCH

cross-chain clustering BLOCK 1

tx1, tx2, ...

BLOCK 2

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

BLOCK 3

tx1, tx2, ...

BLOCK x

tx1, tx2, ...

O I

slide-50
SLIDE 50

Cross-Chain Address Clustering: Results

A1 A2 A3 A4

BTC

single-chain clustering

A1 A2 A3

BCH

single-chain clustering

A1 A2 A3 A4

BTC ← BCH

cross-chain clustering

1.05 million additional cluster merges (new edges) as of Dec 2017

Affects 100,000 users with 30 million addresses (3% of all Bitcoin addresses)

slide-51
SLIDE 51

Conclusion

slide-52
SLIDE 52

Conclusion

  • Forks offer a powerful data source due to the links between chains
  • Implemented multi-chain mode for cross-chain analyses of forked ledgers
  • Cross-chain clustering: found that privacy of users can be hurt across chains
  • Contributed my work to USENIX Security ‘20 paper [1]

[1] Kalodner, H., Möser, M., Lee, K., Goldfeder, S., Plattner, M., Chator, A., & Narayanan, A. (2020). Blocksci: Design and applications of a blockchain analysis platform. In 29th USENIX Security Symposium (pp. 2721-2738).

slide-53
SLIDE 53

Conclusion

  • Forks offer a powerful data source due to the links between chains
  • Implemented multi-chain mode for cross-chain analyses of forked ledgers
  • Cross-chain clustering: found that privacy of users can be hurt across chains
  • Contributed my work to USENIX Security ‘20 paper [1]

[1] Kalodner, H., Möser, M., Lee, K., Goldfeder, S., Plattner, M., Chator, A., & Narayanan, A. (2020). Blocksci: Design and applications of a blockchain analysis platform. In 29th USENIX Security Symposium (pp. 2721-2738).

slide-54
SLIDE 54

Thanks.

Questions, thoughts, feedback?

Acknowledgments 1. TITANIUM: Tools for the Investigation of Transactions in Underground Markets. (EU H2020) 2. VIRTCRIME: Forensic Methods and Solutions for the Analysis of Criminal Transactions in Post-Bitcoin Cryptocurrencies. (Austrian Research Promotion Agency FFG)