Skip to content

Instantly share code, notes, and snippets.

@maltemoeser
Created July 19, 2018 12:19
Show Gist options
  • Save maltemoeser/b8ff7be6be23459c659207cdf1c42094 to your computer and use it in GitHub Desktop.
Save maltemoeser/b8ff7be6be23459c659207cdf1c42094 to your computer and use it in GitHub Desktop.
BlockSci clustering
# specify a change address heuristic (https://citp.github.io/BlockSci/reference/heuristics/change.html)
change_heuristic = blocksci.heuristics.change.legacy()
# current workaround to disable change the address heuristic
no_change_heuristic = blocksci.heuristics.change.legacy() - blocksci.heuristics.change.legacy()
# use the ClusterManager to cluster the blockchain using multi-input and legacy change
cm = blocksci.cluster.ClusterManager.create_clustering("/directory/where/cluster/files/can/be/stored", chain, change_heuristic)
# use the ClusterManager to cluster the blockchain using ONLY multi-input
cm = blocksci.cluster.ClusterManager.create_clustering("/directory/where/cluster/files/can/be/stored", chain, no_change_heuristic)
# get the cluster containing a specific address
cluster = cm.cluster_with_address("YourBitcoinAddress")
# more information is available here https://citp.github.io/BlockSci/reference/clustering/clustering.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment