UTXO address clustering via parallel Union-Find for GraphSense
Project description
graphsense-clustering
UTXO address clustering via a parallel Union-Find, implemented in Rust and exposed to Python through PyO3. Used by graphsense-lib to run the multi-input common-ownership heuristic over Bitcoin and other UTXO chains.
Installation
pip install graphsense-clustering
Pre-built wheels are published for Linux (glibc and musl, x86_64 and aarch64)
and macOS (x86_64 and arm64) against CPython 3.10+ via the stable ABI
(abi3), so a single wheel covers all supported Python versions on a given
platform.
Most users do not need this package directly — install it via the
graphsense-lib clustering extra:
pip install 'graphsense-lib[clustering]'
Usage
from gs_clustering import Clustering
# Size the union-find from the maximum known address id.
c = Clustering(max_address_id=1_000_000)
# Feed batches of multi-input transactions. Each inner list is the set of
# input address ids for a single transaction.
c.process_transactions([[1, 2, 3], [4, 5], [2, 7]])
# Materialize the final (address_id, cluster_id) mapping as a pyarrow
# RecordBatch.
batch = c.get_mapping()
See the graphsense-lib source tree for the integration code that streams
transactions out of Cassandra and writes the cluster mapping back.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphsense_clustering-0.2.0.tar.gz.
File metadata
- Download URL: graphsense_clustering-0.2.0.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1476c58f079f196f09a02ef3fee3c3639d80e71d3d7986b4affb27dd7208b601
|
|
| MD5 |
114db7751612ae43487ec08c2eba82a4
|
|
| BLAKE2b-256 |
c49155512d534910f83b6bfdcb2d2a8d267bacda8daea1f553198bcab82e58b8
|
File details
Details for the file graphsense_clustering-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: graphsense_clustering-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 936.6 kB
- Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07bd87eb23f18d3b23a9b5f56f1d98c0818cc442f7c6d3fcb2e774e21268e899
|
|
| MD5 |
a2410c3119a26cda6685212425ff340f
|
|
| BLAKE2b-256 |
867d4035caa1d09d8a629f89f0a07341bf6515ef8c5efd89669c37c1cc56b94b
|
File details
Details for the file graphsense_clustering-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: graphsense_clustering-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 891.1 kB
- Tags: CPython 3.10+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b99c4b7a70b878e8f9c9ed54b9ba88ebae7119664551c04eddf63f2653fec31e
|
|
| MD5 |
0adba34e66b3e4f451098168c5a554cb
|
|
| BLAKE2b-256 |
6fa8fd63aa84c5e7496f6bce26b1fd446197de44c0aed80d00678ea1a3aeaa52
|
File details
Details for the file graphsense_clustering-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: graphsense_clustering-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 729.8 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a93157dde22964522829fc82954bcd469b558fded5365f56d8f8274dd8809a58
|
|
| MD5 |
50c71ea6a46eec27b44f273bc4258fd4
|
|
| BLAKE2b-256 |
966b1c69914b71fe518a64cc41e932f31b73020db88fe4db9f3dfa56c1c259f0
|
File details
Details for the file graphsense_clustering-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: graphsense_clustering-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 715.3 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4381410470287c7713b8ab08d4a0d1034de66dc4f6f18e0d301ef2c9cb93c3a2
|
|
| MD5 |
91f206149834160c69b1fa455517213c
|
|
| BLAKE2b-256 |
0cf008e1938a2de959fa19ee7757a88dc897a6cfa70d3552eaf40ba532e54f9a
|
File details
Details for the file graphsense_clustering-0.2.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: graphsense_clustering-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 619.6 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d0b48b9887e64b6cf8eaa50d3a6907b6da3818673b7eebbe9dd989436c78f87
|
|
| MD5 |
33380aea5138de5748e9a408d3cc6412
|
|
| BLAKE2b-256 |
72879dfff1d81b5aff9869259881462e950c143beb7cb8ebb457e63159deaa8b
|
File details
Details for the file graphsense_clustering-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: graphsense_clustering-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 644.2 kB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52797aa6b2544bb1fd21634913bb05b07b30a3d5448ed1bf76c65fe2569134cf
|
|
| MD5 |
154e00bdb6b733ddb638b699124863dc
|
|
| BLAKE2b-256 |
0a81dabd0a03aa2b4d76124645ff82cd12327b628b1c02e54264cbde274bc4d1
|