BlockSci icon indicating copy to clipboard operation
BlockSci copied to clipboard

Calling `blocksci.Address.equiv` fails with `std::bad_alloc`

Open crantini opened this issue 6 years ago • 3 comments

Reproduction Steps

import blocksci
chain = blocksci.Blockchain(config_path)
address = chain.address_from_string('1BG7Tq9N5L8PptCDUrH1u9Uv6hUZZKNVFG')
for equivalent_address in address.equiv().addresses:
    print(equivalent_address)
---------------------------------------------------------------------------
MemoryError                               Traceback (most recent call last)
<ipython-input-136-a0289d6938a0> in <module>
      3 address = chain.address_from_string('1BG7Tq9N5L8PptCDUrH1u9Uv6hUZZKNVFG')
      4 for equivalent_address in address.equiv().addresses:
----> 5     print(equivalent_address)

MemoryError: std::bad_alloc

System Information

Using AMI: no
BlockSci version: v0.6 / f074eea40a80d9d51ce08c35e85b70c37793451b Blockchain: Bitcoin Parser: Disk Total memory: 64 GB

######################

Nothing special about that address, per se. I have tried the same with other addresses. No matter the address, I get the same result, above.

Any thoughts?

crantini avatar Dec 15 '19 22:12 crantini

Thanks for the report! It crashes my notebook, too. Will investigate when I find the time.

maltemoeser avatar Dec 16 '19 15:12 maltemoeser

You're very welcome, Mr. Möser. Happy to hear I could help.

I am looking forward to seeing what you can find out! This is because the ability to detect equivalent addresses is rather useful for my analysis.

In the meantime, do you think there is any other syntax, function, etc. which provides an entry point to the same equivalence functionality but is not presently broken?

crantini avatar Dec 16 '19 21:12 crantini

you may already know the solution, but just saying, having addresses.to_list() solves the problem, as mentioned in previous issues #273.

yya518 avatar Aug 01 '20 13:08 yya518