Bitcoin Forum
December 16, 2017, 11:43:59 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 »  All
  Print  
Author Topic: Retrieve lost satoshis  (Read 3323 times)
findftp
Legendary
*
Offline Offline

Activity: 1008


Delusional crypto obsessionist


View Profile
November 09, 2015, 11:45:01 PM
 #1

So I was playing around a bit and lost some relative small amount of bitcoin
I used a certain method to create the public key, but I don't have it anymore.
Now I dug into python (which btw is new to me) and was able to produce a script which is able to give me a few thousand (perhaps few million) addresses of which one of them is the one I used.
In other words, I'm able to brute-force the private key because I know the pattern I used.

I exported first 200 addresses with my script and tried to import them into multibit classic.
This works, but is very slow.

Is there any other (more efficient) way to check balance of the keys?

1FdwDuV2qgsw2w1Lza8nsea7L6mQxsc7g3
1513467839
Hero Member
*
Offline Offline

Posts: 1513467839

View Profile Personal Message (Offline)

Ignore
1513467839
Reply with quote  #2

1513467839
Report to moderator
1513467839
Hero Member
*
Offline Offline

Posts: 1513467839

View Profile Personal Message (Offline)

Ignore
1513467839
Reply with quote  #2

1513467839
Report to moderator
1513467839
Hero Member
*
Offline Offline

Posts: 1513467839

View Profile Personal Message (Offline)

Ignore
1513467839
Reply with quote  #2

1513467839
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513467839
Hero Member
*
Offline Offline

Posts: 1513467839

View Profile Personal Message (Offline)

Ignore
1513467839
Reply with quote  #2

1513467839
Report to moderator
1513467839
Hero Member
*
Offline Offline

Posts: 1513467839

View Profile Personal Message (Offline)

Ignore
1513467839
Reply with quote  #2

1513467839
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1246


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
November 09, 2015, 11:46:07 PM
 #2

You could write a script which just queries an api like blocktrail's to get the balance of all of the addresses.

spin
Sr. Member
****
Offline Offline

Activity: 360


View Profile
November 10, 2015, 08:39:15 AM
 #3

If you are running bitcoin core you can import it there.  If you are importing many addresses you can import them with the following rpc call:
Code:
importprivkey <bitcoinprivkey> [label] [rescan=true]
Adds a private key (as returned by dumpprivkey) to your wallet. This may take a while, as a rescan is done, looking for existing transactions. Optional [rescan] parameter added in 0.8.0. Note: There's no need to import public key, as in ECDSA (unlike RSA) this can be computed from private key

What you could do to speed this up is set rescan=false so that it doesn't rescan for every address.

I think you can then just restart bitcoin core to rescan all?


If you liked this post buy me a beer.  Beers are quite cheap where I live!
194YjsiwmGm3hcbPcJWWyzRAS9CQLX1fJL
amaclin
Legendary
*
Offline Offline

Activity: 1260


View Profile
November 10, 2015, 09:34:06 AM
 #4

Is there any other (more efficient) way to check balance of the keys?
Yes, there are.
You can parse the whole blockchain and create a database of addresses with non-zero balances
The size of such database is not too big.
tspacepilot
Legendary
*
Offline Offline

Activity: 1400


I may write code in exchange for bitcoins.


View Profile
November 10, 2015, 05:13:10 PM
 #5

If you are running bitcoin core you can import it there.  If you are importing many addresses you can import them with the following rpc call:
Code:
importprivkey <bitcoinprivkey> [label] [rescan=true]
Adds a private key (as returned by dumpprivkey) to your wallet. This may take a while, as a rescan is done, looking for existing transactions. Optional [rescan] parameter added in 0.8.0. Note: There's no need to import public key, as in ECDSA (unlike RSA) this can be computed from private key

What you could do to speed this up is set rescan=false so that it doesn't rescan for every address.

I think you can then just restart bitcoin core to rescan all?

Or just write rescan=true on the last one.  findftp, did you get this working?

findftp
Legendary
*
Offline Offline

Activity: 1008


Delusional crypto obsessionist


View Profile
November 10, 2015, 08:01:03 PM
 #6

If you are running bitcoin core you can import it there.  If you are importing many addresses you can import them with the following rpc call:
Code:
importprivkey <bitcoinprivkey> [label] [rescan=true]
Adds a private key (as returned by dumpprivkey) to your wallet. This may take a while, as a rescan is done, looking for existing transactions. Optional [rescan] parameter added in 0.8.0. Note: There's no need to import public key, as in ECDSA (unlike RSA) this can be computed from private key

What you could do to speed this up is set rescan=false so that it doesn't rescan for every address.

I think you can then just restart bitcoin core to rescan all?

Or just write rescan=true on the last one.  findftp, did you get this working?

Not yet.
I'm investigating several options.
I went blocktrail API method, but the API gives errors
I installed armory and it imported the keys much faster but it's currently still 'building databases' probably because I just installed it.
I read a bit about the RPC call method, but I'm not sure yet.

I did a bit of calculation and to cover all possible addresses of which one of them contain my satoshis I have to import about 400.000.000 addresses.
This probably a bit too much for a wallet.
I think I can better check each address against a UTXO database, but how to proceed?


1FdwDuV2qgsw2w1Lza8nsea7L6mQxsc7g3
amaclin
Legendary
*
Offline Offline

Activity: 1260


View Profile
November 10, 2015, 09:31:42 PM
 #7

I think I can better check each address against a UTXO database, but how to proceed?
1) Create a database [address] -> [balance]
2) Check each of your 400m addresses
findftp
Legendary
*
Offline Offline

Activity: 1008


Delusional crypto obsessionist


View Profile
November 10, 2015, 10:38:50 PM
 #8

I think I can better check each address against a UTXO database, but how to proceed?
1) Create a database [address] -> [balance]
2) Check each of your 400m addresses

I don't have a clue how to build that database.

1FdwDuV2qgsw2w1Lza8nsea7L6mQxsc7g3
amaclin
Legendary
*
Offline Offline

Activity: 1260


View Profile
November 11, 2015, 04:11:50 AM
 #9

I don't have a clue how to build that database.
1) Hire a programmer
or
2) Learn programming

I can help you with both items. Ready to pay me?
findftp
Legendary
*
Offline Offline

Activity: 1008


Delusional crypto obsessionist


View Profile
November 11, 2015, 10:00:11 AM
 #10

I don't have a clue how to build that database.
1) Hire a programmer
or
2) Learn programming

I can help you with both items. Ready to pay me?


I'm busy doing number 2.
Just started to learn python from scratch and already made the script to produce the patterns and hash them to compressed and uncompressed bitcoin public keys.
So far so good.

Now I (only) need the UTXO database and check each generated address against it.
Should I extract addresses with balance from the blockchain and put them in a sql database or something?
What would be the general approach for such a thing?


1FdwDuV2qgsw2w1Lza8nsea7L6mQxsc7g3
amaclin
Legendary
*
Offline Offline

Activity: 1260


View Profile
November 11, 2015, 10:25:50 AM
 #11

Now I (only) need the UTXO database and check each generated address against it.
Should I extract addresses with balance from the blockchain and put them in a sql database or something?
What would be the general approach for such a thing?

Yes. You should parse blockchain and get the set of utxo.
The set is not very large.
https://statoshi.info/dashboard/db/unspent-transaction-output-set
There are ~32 mln unspent outputs today according to statoshi.info
It is quite possible to hold this set in memory in hashtable.
You can even use plain-text file for storing this data without using SQL engines.

Quote
I'm busy doing number 2.
Let us discuss number (1). I can create such engine for you. Not for free of course.
findftp
Legendary
*
Offline Offline

Activity: 1008


Delusional crypto obsessionist


View Profile
November 11, 2015, 10:34:03 AM
 #12

Now I (only) need the UTXO database and check each generated address against it.
Should I extract addresses with balance from the blockchain and put them in a sql database or something?
What would be the general approach for such a thing?

Yes. You should parse blockchain and get the set of utxo.
The set is not very large.
https://statoshi.info/dashboard/db/unspent-transaction-output-set
There are ~32 mln unspent outputs today according to statoshi.info
It is quite possible to hold this set in memory in hashtable.
You can even use plain-text file for storing this data without using SQL engines.

I think this is enough information for me to proceed further. Thanks for pointing me in this direction

Quote
Quote
I'm busy doing number 2.
Let us discuss number (1). I can create such engine for you. Not for free of course.

Well, I like your offer, but I only lost some satoshis. The amount of electricity I used to type this message is probably already worth more.
I like to get them back and learn from everything in the journey to reach that goal. I already learnt some python and want to see how far I can get on my own.
If in the end I'm not smart enough to build everything myself I probably won't hire someone else to do it for me. Unless those satoshis become valuable enough to do so.






1FdwDuV2qgsw2w1Lza8nsea7L6mQxsc7g3
spin
Sr. Member
****
Offline Offline

Activity: 360


View Profile
November 11, 2015, 11:06:13 AM
 #13

How many addresses do you have to check?  You mentioned 200 earlier?

If you liked this post buy me a beer.  Beers are quite cheap where I live!
194YjsiwmGm3hcbPcJWWyzRAS9CQLX1fJL
amaclin
Legendary
*
Offline Offline

Activity: 1260


View Profile
November 11, 2015, 11:16:06 AM
 #14

Well, I like your offer, but I only lost some satoshis.
The amount of electricity I used to type this message is probably already worth more.
I started two years ago on this forum with the absolutely same topic - finding the lost satoshis in the blockchain.
The only difference was that I did not lose them.

Quote
I like to get them back and learn from everything in the journey to reach that goal.
I already learnt some python and want to see how far I can get on my own.
I prefer to use C++.

Quote
If in the end I'm not smart enough to build everything myself I probably won't hire someone else to do it for me.
Of course, it is economically unreasonable to spend 1 btc and find lost 0.0001 btc

Quote
Unless those satoshis become valuable enough to do so.
No chances.
findftp
Legendary
*
Offline Offline

Activity: 1008


Delusional crypto obsessionist


View Profile
November 11, 2015, 11:49:48 AM
 #15

How many addresses do you have to check?  You mentioned 200 earlier?

I did 200 addresses as a test to see if my script works.
In the end, my coins can be stuck among 5 to 10 million addresses but if they are not there, they are for sure among one out of 400 million addresses.

1FdwDuV2qgsw2w1Lza8nsea7L6mQxsc7g3
findftp
Legendary
*
Offline Offline

Activity: 1008


Delusional crypto obsessionist


View Profile
November 11, 2015, 12:03:07 PM
 #16

Well, I like your offer, but I only lost some satoshis.
The amount of electricity I used to type this message is probably already worth more.
I started two years ago on this forum with the absolutely same topic - finding the lost satoshis in the blockchain.
The only difference was that I did not lose them.
Precisley, but I know the syntax of the let's say brainwallet I lost.
I know the contents, but not the exact sequence of the possibilities.
Therefor I think I got a good chance.

Quote
Quote
I like to get them back and learn from everything in the journey to reach that goal.
I already learnt some python and want to see how far I can get on my own.
I prefer to use C++.
Why? Is it more efficient?

Quote
Quote
Unless those satoshis become valuable enough to do so.
No chances.

Since I'm a delusional bitcoin obsessionist I think a bitcoin could become worth a house.
In my mind they eventually become valuable enough for other people to retrieve them.
edit: It's not just a few satoshis, but it's less than a full bitcoin

But I also disagree for other reasons. For me they are already valuable enough to retrieve.
Value doesn't necessarily have to mean money.
Just like other people have hobbies which costs money.

I also do metal detecting as a hobby.
Spending hundreds of hours on a field in the hope I find a gold, silver or tarnished copper coin.
There are thousands of people doing the same thing and never earn back their metal detector in economical counter value.


But let's not have this discussion here, it doesn't belong in this subsection of the forum.



1FdwDuV2qgsw2w1Lza8nsea7L6mQxsc7g3
cr1776
Legendary
*
Offline Offline

Activity: 1736


View Profile
November 11, 2015, 02:44:04 PM
 #17

Quote
...
Quote
Quote
I like to get them back and learn from everything in the journey to reach that goal.
I already learnt some python and want to see how far I can get on my own.
I prefer to use C++.
Why? Is it more efficient?

It is a compiled language vs an interpreted one.  Compiled languages are almost always much more efficient than interpreted ones.

From a coding perspective, coding one may be much more efficient than the other depending on your skill set.  e.g. If you don't know Prolog or C++, but do know Python very well, it might be quicker to code and run everything in Python than to spend time learning one of them, then coding and running.
findftp
Legendary
*
Offline Offline

Activity: 1008


Delusional crypto obsessionist


View Profile
November 11, 2015, 02:50:57 PM
 #18

Quote
...
Quote
Quote
I like to get them back and learn from everything in the journey to reach that goal.
I already learnt some python and want to see how far I can get on my own.
I prefer to use C++.
Why? Is it more efficient?

It is a compiled language vs an interpreted one.  Compiled languages are almost always much more efficient than interpreted ones.

From a coding perspective, coding one may be much more efficient than the other depending on your skill set.  e.g. If you don't know Prolog or C++, but do know Python very well, it might be quicker to code and run everything in Python than to spend time learning one of them, then coding and running.

Ah, I already had a suspicion that it was due to compiling.
Makes sense.

I actually started programming a year ago, with arduino in C.
However, for this project I already found a lot written in python which I could use so I figured I could better go this way.
Perhaps I should try and find the same bits and pieces and redo the code in C.
I think I have more than enough homework for now to be able to continue  Smiley
Thanks for all the help.



1FdwDuV2qgsw2w1Lza8nsea7L6mQxsc7g3
tspacepilot
Legendary
*
Offline Offline

Activity: 1400


I may write code in exchange for bitcoins.


View Profile
November 14, 2015, 07:14:27 PM
 #19

Quote
...
Quote
Quote
I like to get them back and learn from everything in the journey to reach that goal.
I already learnt some python and want to see how far I can get on my own.
I prefer to use C++.
Why? Is it more efficient?

It is a compiled language vs an interpreted one.  Compiled languages are almost always much more efficient than interpreted ones.

From a coding perspective, coding one may be much more efficient than the other depending on your skill set.  e.g. If you don't know Prolog or C++, but do know Python very well, it might be quicker to code and run everything in Python than to spend time learning one of them, then coding and running.

Ah, I already had a suspicion that it was due to compiling.
Makes sense.

I actually started programming a year ago, with arduino in C.
However, for this project I already found a lot written in python which I could use so I figured I could better go this way.
Perhaps I should try and find the same bits and pieces and redo the code in C.
I think I have more than enough homework for now to be able to continue  Smiley
Thanks for all the help.


If I'm not incorrect, the python interpreter is written in C, so yah, you're just adding a layer of abstraction when you use python.  However, for one-off scripts like this one, it's probably not worth it to worry about all the typing and memory management of C, just get yer script going so you can  have some fun.  Let us know how you're proceeding.  I, for one, appreciate your attitude.  I like doing things myself simply for the educational experience.

knightkon
Hero Member
*****
Offline Offline

Activity: 532


★Bitvest.io★ Play Plinko or Invest!


View Profile
November 21, 2015, 01:02:58 AM
 #20

I have to ask the simple question; is all of this work worth the small amount you have lost?  Would your time be better spent getting more rather than tracking a small amount down?  I just would think your process would be longer than replacing them through a faucet or something.



.
.BITVEST DICE.
HAS BEEN RELEASED!


▄████████████████████▄
██████████████████████
██████████▀▀██████████
█████████░░░░█████████
██████████▄▄██████████
███████▀▀████▀▀███████
██████░░░░██░░░░██████
███████▄▄████▄▄███████
████▀▀████▀▀████▀▀████
███░░░░██░░░░██░░░░███
████▄▄████▄▄████▄▄████
██████████████████████

▀████████████████████▀
▄████████████████████▄
██████████████████████
█████▀▀█▀▀▀▀▀▀██▀▀████
█████░░░░░░░░░░░░░████
█████░░░░░░░░░░░░▄████
█████░░▄███▄░░░░██████
█████▄▄███▀░░░░▄██████
█████████░░░░░░███████
████████░░░░░░░███████
███████░░░░░░░░███████
███████▄▄▄▄▄▄▄▄███████

██████████████████████
▀████████████████████▀
▄████████████████████▄
███████████████▀▀▀▀▀▀▀
███████████▀▀▄▄█░░░░░█
█████████▀░░█████░░░░█
███████▀░░░░░████▀░░░▀
██████░░░░░░░░▀▄▄█████
█████░▄░░░░░▄██████▀▀█
████░████▄░███████░░░░
███░█████░█████████░░█
███░░░▀█░██████████░░█
███░░░░░░████▀▀██▀░░░░
███░░░░░░███░░░░░░░░░░

██░▄▄▄▄░████▄▄██▄░░░░
████████████▀▀▀▀▀▀▀██
█████████████░█▀▀▀█░███
██████████▀▀░█▀░░░▀█░▀▀
███████▀░▄▄█░█░░░░░█░█▄
████▀░▄▄████░▀█░░░█▀░██
███░▄████▀▀░▄░▀█░█▀░▄░▀
█▀░███▀▀▀░░███░▀█▀░███░
▀░███▀░░░░░████▄░▄████░
░███▀░░░░░░░█████████░░
░███░░░░░░░░░███████░░░
███▀░██░░░░░░▀░▄▄▄░▀░░░
███░██████▄▄░▄█████▄░▄▄

██░████████░███████░█
▄████████████████████▄
████████▀▀░░░▀▀███████
███▀▀░░░░░▄▄▄░░░░▀▀▀██
██░▀▀▄▄░░░▀▀▀░░░▄▄▀▀██
██░▄▄░░▀▀▄▄░▄▄▀▀░░░░██
██░▀▀░░░░░░█░░░░░██░██
██░░░▄▄░░░░█░██░░░░░██
██░░░▀▀░░░░█░░░░░░░░██
██░░░░░▄▄░░█░░░░░██░██
██▄░░░░▀▀░░█░██░░░░░██
█████▄▄░░░░█░░░░▄▄████
█████████▄▄█▄▄████████

▀████████████████████▀




Rainbot
Daily Quests
Faucet
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!