Skip to content

Faster way to get all address balances #264

@simonohanlon101

Description

@simonohanlon101

System Information (if applicable)

AWS: r5.2xlarge
BlockSci version: 0.5
Using AMI: no
Total memory: 64GB

My use-case is that I would like to calculate the current balance of all addresses on the blockchain. I may want to run this query quite a lot, and possibly for historical block heights. My current way to do this would be:

import blocksci
chain = blocksci.Blockchain('/data/blocksci')
balances = chain.addresses( address_type=blocksci.address_type.pubkey ).balance()

Is there a more efficient (faster) way to do this. I understand blocksci is optimised for iterating over txes rather than addresses. Is there therefore a better way to achieve the desired result?

Many thanks,

Simon

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion related to using BlockSci

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions