citp / BlockSci

A high-performance tool for blockchain science and exploration
https://citp.github.io/BlockSci/
GNU General Public License v3.0
1.34k stars 259 forks source link

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

Open crantini opened 4 years ago

crantini commented 4 years ago

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?

maltemoeser commented 4 years ago

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

crantini commented 4 years ago

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?

yya518 commented 4 years ago

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