Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: dhlbusiness on September 30, 2017, 02:47:17 AM



Title: Scan Bitcoin txt file to find collision
Post by: dhlbusiness on September 30, 2017, 02:47:17 AM
I have a issue, I am generating millions of addresses with vanitygen, I have 55 thousand bitcoin addresses that I have saved in my computer and I want all my vanity addresses been checked if collide with any of my 55k addresses.
for example:
money.txt is my vanitygen addresses
cash.txt is the addresses I have with bitcoins in it
I need all addresses in money.txt compare with all addresses in cash,txt to see if found any collision.
How can I do it?


Title: Re: Scan Bitcoin txt file to find collision
Post by: xhomerx10 on September 30, 2017, 02:56:16 AM
I'll do it for you right now manually.  There are no collisions.


Title: Re: Scan Bitcoin txt file to find collision
Post by: aleksej996 on September 30, 2017, 08:53:59 PM
There are many topics about how unlikely it is to get an address collision. This is necessary for safety of Bitcoin, as if you could get a collision for your address, anyone could, which would make Bitcoin useless. So don't bother, there are no collisions if you generated the addresses correctly. There are quadrillion quadrillions of quadrillion quadrillions of addresses. 55k is nothing compared to that.


Title: Re: Scan Bitcoin txt file to find collision
Post by: BenOnceAgain on September 30, 2017, 09:21:54 PM
I have a issue, I am generating millions of addresses with vanitygen, I have 55 thousand bitcoin addresses that I have saved in my computer and I want all my vanity addresses been checked if collide with any of my 55k addresses.
for example:
money.txt is my vanitygen addresses
cash.txt is the addresses I have with bitcoins in it
I need all addresses in money.txt compare with all addresses in cash,txt to see if found any collision.
How can I do it?

Millions of addresses?  Now that's some vanity, lol.

The odds of an address collision are somewhere up there with the odds of you being teleported to Mars and back.


Title: Re: Scan Bitcoin txt file to find collision
Post by: cr1776 on September 30, 2017, 10:57:53 PM
I have a issue, I am generating millions of addresses with vanitygen, I have 55 thousand bitcoin addresses that I have saved in my computer and I want all my vanity addresses been checked if collide with any of my 55k addresses.
for example:
money.txt is my vanitygen addresses
cash.txt is the addresses I have with bitcoins in it
I need all addresses in money.txt compare with all addresses in cash,txt to see if found any collision.
How can I do it?

I liked xhomerx10’s answer the best, but...

Use comm or grep or fgrep.

E.g something like:
grep -F -x -f file1 file2


Title: Re: Scan Bitcoin txt file to find collision
Post by: DannyHamilton on October 01, 2017, 08:18:54 AM
I have a issue, I am generating millions of addresses with vanitygen, I have 55 thousand bitcoin addresses that I have saved in my computer and I want all my vanity addresses been checked if collide with any of my 55k addresses.
for example:
money.txt is my vanitygen addresses
cash.txt is the addresses I have with bitcoins in it
I need all addresses in money.txt compare with all addresses in cash,txt to see if found any collision.
How can I do it?

I liked xhomerx10’s answer the best, but...

Use comm or grep or fgrep.

E.g something like:
grep -F -x -f file1 file2

Sort cash.txt before you save it.

Write a simple computer program that performs something like a binary search (https://en.wikipedia.org/wiki/Binary_search_algorithm) of the sorted data.

It will be faster, and more customizable than grep.


Title: Re: Scan Bitcoin txt file to find collision
Post by: mrayazgul on October 02, 2017, 03:54:11 PM
I have a issue, I am generating millions of addresses with vanitygen, I have 55 thousand bitcoin addresses that I have saved in my computer and I want all my vanity addresses been checked if collide with any of my 55k addresses.
for example:
money.txt is my vanitygen addresses
cash.txt is the addresses I have with bitcoins in it
I need all addresses in money.txt compare with all addresses in cash,txt to see if found any collision.
How can I do it?

For what purpose? Is this to see how it can go with a larger file and to see if it works? If you are deep enough to know that there may be a collision, don't you know that there is nearly a zero chance with only a couple billions addresses?


Title: Re: Scan Bitcoin txt file to find collision
Post by: LoyceV on October 03, 2017, 11:16:48 AM
Sort cash.txt before you save it.

Write a simple computer program that performs something like a binary search (https://en.wikipedia.org/wiki/Binary_search_algorithm) of the sorted data.

It will be faster, and more customizable than grep.
Even faster (on any Linux):
Code:
cat money.txt cash.txt | wc -l # this tells you how many addresses you have
cat money.txt cash.txt | sort | uniq | wc -l # this tells you how many unique addresses you have
Both numbers will be the same.

Even faster:
Code:
cat money.txt cash.txt | sort | uniq -d # this just gives you all duplicates
It'll also show if either one of the txt-files has duplicates on its own.