Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers Master’s Thesis Defensio , September 14 th 2020 Martin Plattner, Universität Innsbruck martin@mplattner.at
Agenda Motivation ● Implementing the Multi-Chain Mode for BlockSci ● Cross-Chain Address Clustering ● Conclusion ●
Motivation and Preliminaries
Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers Motivation
Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers Motivation BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x Ledger tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ...
Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers Motivation Single-chain analysis BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x Ledger tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ...
Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers Motivation Single-chain analysis BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x Ledger tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... BlockSci Blockchain analysis tool
Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers Motivation Single-chain analysis BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x Ledger tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... BlockSci Blockchain analysis tool BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x Forked Ledger tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... Bitcoin Cash (Aug 2017) Hard-Fork due to changed rules
Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers Motivation Single-chain analysis BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x Ledger tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... O I BlockSci Blockchain analysis tool BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x Forked Ledger tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... I Bitcoin Cash (Aug 2017) Hard-Fork due to changed rules
Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers Motivation Cross-chain analysis BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x Ledger tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... BlockSci Blockchain analysis tool BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x Forked Ledger tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... Bitcoin Cash (Aug 2017) Hard-Fork due to changed rules
Generalizing BlockSci to Cross-Chain Analyses of Forked Ledgers Motivation Cross-chain analysis BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x Ledger BlockSci tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... Blockchain analysis tool + multi-chain mode BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x Forked Ledger tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... Main contribution Multi-chain mode for BlockSci
BlockSci BlockSci parser
BlockSci Optimized blockchain data on disk BlockSci parser
Optimized blockchain data (in memory) BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... BlockSci mmap() Optimized blockchain data on disk BlockSci parser
Optimized blockchain data (in memory) BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... BlockSci mmap() Optimized blockchain data on disk BlockSci parser
Optimized blockchain data (in memory) BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... Goal mmap() Optimized blockchain data on disk BlockSci parser
Implementing the Multi-Chain Mode Requirements, Required Changes, Evaluation
Requirements Type No. Requirement Priority 1 Normalized addresses MUST 2 BTC and BCH support MUST Functional 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD Non-functional 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD
BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... A3 A3 BLOCK 3 BLOCK x Requirements tx1, tx2, ... tx1, tx2, ... A3 Type No. Requirement Priority 1 Normalized addresses MUST 2 BTC and BCH support MUST Functional 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD Non-functional 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD
BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... A3 A3 BLOCK 3 BLOCK x Requirements tx1, tx2, ... tx1, tx2, ... A3 Type No. Requirement Priority 1 Normalized addresses MUST 2 BTC and BCH support MUST Functional 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD Non-functional 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD
BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... A3 A3 BLOCK 3 BLOCK x Requirements tx1, tx2, ... tx1, tx2, ... A3 BLOCK x tx1, tx2, ... Type No. Requirement Priority 1 Normalized addresses MUST 2 BTC and BCH support MUST Functional 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD Non-functional 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD
BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... O I BLOCK 3 BLOCK x Requirements tx1, tx2, ... tx1, tx2, ... I O Output.getSpendingInputs() → [ , ] I I Type No. Requirement Priority 1 Normalized addresses MUST 2 BTC and BCH support MUST Functional 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD Non-functional 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD
BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x Requirements tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... Type No. Requirement Priority 1 Normalized addresses MUST 2 BTC and BCH support MUST Functional 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD Non-functional 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD
Requirements Type No. Requirement Priority 1 Normalized addresses MUST 2 BTC and BCH support MUST Functional 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD Non-functional 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD
Requirements Type No. Requirement Priority 1 Normalized addresses MUST 2 BTC and BCH support MUST Functional 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD Non-functional 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD
Requirements Type No. Requirement Priority 1 Normalized addresses MUST 2 BTC and BCH support MUST Functional 3 Flexible configuration MUST 4 Anticipate cross-chain queries MUST 1 Optimize memory consumption MUST 2 Maintain high performance SHOULD Non-functional 3 Backwards compatibility (API) SHOULD 4 Extensibility SHOULD
Required Changes Parser Data layout Analysis library multi-chain mode chain-specific data handle new layout cross-chain address share common data shareable data de-duplication in memory Config file support links between chains
Required Changes Parser Data layout Analysis library multi-chain mode chain-specific data handle new layout cross-chain address share common data shareable data de-duplication in memory # /bch/config.json "chainConfig": { "coinName": "bitcoin_cash", Config file "dataDirectory": "/bch/", "parentChainConfigPath": "/btc/config.json", "firstForkedBlockHeight": 478559, support links between chains "pubkeyPrefix": [0], "scriptPrefix": [5], "segwitActivationHeight": 481824, "segwitPrefix": "bc" }
Required Changes Parser Data layout Analysis library multi-chain mode chain-specific data handle new layout cross-chain address share common data shareable data de-duplication in memory Config file support links between chains
BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... A3 A3 BLOCK 3 BLOCK x Required Changes tx1, tx2, ... tx1, tx2, ... A3 Parser Data layout Analysis library multi-chain mode chain-specific data handle new layout cross-chain address share common data shareable data de-duplication in memory Config file support links between chains
BLOCK 1 BLOCK 2 BLOCK 3 BLOCK x tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... tx1, tx2, ... BLOCK 3 BLOCK x Required Changes tx1, tx2, ... tx1, tx2, ... Parser Data layout Analysis library multi-chain mode chain-specific data handle new layout cross-chain address share common data shareable data de-duplication in memory Config file support links between chains
Recommend
More recommend