Bitcoin Forum
December 09, 2016, 03:59:06 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Bitcoins I Can't Spend  (Read 1966 times)
Enochian
Full Member
***
Offline Offline

Activity: 126


View Profile
May 08, 2011, 03:22:25 PM
 #1

I discovered Bitcoin a few weeks ago, and have read the paper and the source code of the official client.

While playing with my 0.05 faucet bitcoins, and familiarizing myself with the protocol, I managed to get myself into some sort of deadly embrace in which I cannot do anything with my remaining unspent outputs.

In block 122026, in transaction 73, I claim an output of 0.05 bitcoins, and send 0.02 and 0.03 to address 1A8TY7dxURcsRtPBs7fP6bDVzAgpgP4962.  In transaction 123 of the same block, I claim the 0.02 output from transaction 73, and send two outputs of 0.01, again to 1A8TY7dxURcsRtPBs7fP6bDVzAgpgP4962.

That gives me three unclaimed outputs, of values 0.03, 0.01, and 0.01, for a total of 0.05.

The first odd thing is that the official client displays my balance as 0.02 bitcoins, not 0.05.  If I restore an old wallet with just keys in it, and let it rescan the block chain, it again computes the same incorrect balance of 0.02 bitcoins.  The top two transactions displayed are out of temporal order, showing the split of 0.05 into 0.03 and 0.02 as the most recent, with the 0.02 into 0.01 and 0.01 after it.

The second odd thing is that the client lets me spend these 0.02 bitcoins without decreasing my balance, over and over again, and the transactions just sit there in perpetuity with zero confirmations forever.

Any transactions I generate involving these three outputs are accepted by my client as valid, and are broadcast over the network, but never get included in a block, even after days of waiting.

The private key for address 1A8TY7dxURcsRtPBs7fP6bDVzAgpgP4962 is, as a decimal integer,

62914421751202395784887832168971429678493304086217746188800433854666065869728

The associated public key is

04
9ba39856eec011b79f1acb997760ed9d3f90d477077d17df2571d94b2fa2137b
f0976d786b6aabc903746e269628b2c28e4b5db753845e5713a48ee7d6b97aaf

Any ideas as to what is happening here?







1481255946
Hero Member
*
Offline Offline

Posts: 1481255946

View Profile Personal Message (Offline)

Ignore
1481255946
Reply with quote  #2

1481255946
Report to moderator
1481255946
Hero Member
*
Offline Offline

Posts: 1481255946

View Profile Personal Message (Offline)

Ignore
1481255946
Reply with quote  #2

1481255946
Report to moderator
1481255946
Hero Member
*
Offline Offline

Posts: 1481255946

View Profile Personal Message (Offline)

Ignore
1481255946
Reply with quote  #2

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

Posts: 1481255946

View Profile Personal Message (Offline)

Ignore
1481255946
Reply with quote  #2

1481255946
Report to moderator
1481255946
Hero Member
*
Offline Offline

Posts: 1481255946

View Profile Personal Message (Offline)

Ignore
1481255946
Reply with quote  #2

1481255946
Report to moderator
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1036


View Profile WWW
May 08, 2011, 03:36:44 PM
 #2

Which version of the client are you using?

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
Enochian
Full Member
***
Offline Offline

Activity: 126


View Profile
May 08, 2011, 03:44:41 PM
 #3

Which version of the client are you using?

Bitcoin version 0.3.20.2 beta
OS version Windows XP (build 2600, Service Pack 3)

Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1036


View Profile WWW
May 08, 2011, 03:52:22 PM
 #4

The way inputs are selected changed somewhat in 0.3.21. Before, either all or none of the outputs of a particular transaction were used, and the client had no concept of a particular output being used already or not.

I don't understand what can cause the symptoms you describe, but could you try with 0.3.21?

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
Enochian
Full Member
***
Offline Offline

Activity: 126


View Profile
May 08, 2011, 04:28:30 PM
 #5

I don't understand what can cause the symptoms you describe, but could you try with 0.3.21?

0.3.21 computes the balance correctly.  I will try to send my 0.05 bitcoins to a new address.  Are the miners running the improved code?

Enochian
Full Member
***
Offline Offline

Activity: 126


View Profile
May 08, 2011, 04:34:14 PM
 #6

Hmm.  When I try to send the 0.05 bitcoins to another one of my addresses, the client complains with

"This transaction requires a transaction fee of at least 0.01 because of its amount, complexity, or use of recently received funds."

Have new transaction fees been added?  What constitutes "complexity?"

Enochian
Full Member
***
Offline Offline

Activity: 126


View Profile
May 08, 2011, 05:32:08 PM
 #7

OK - I guess it works now.  The balance is computed correctly.  When I brought up the new client, it apparently rebroadcast a wallet transaction from before to transfer the 0.03 BTC to a new address, which had been stalled in the previously broken client.  Some clever person apparently changed the code between versions to not display transactions until they had at least one confirmation, so this didn't show up for 10 minutes.

That made the 0.03 BTC recently received funds, which is why it complained when I tried to send the whole 0.05.

Thanks for your help.


casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1344


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
May 09, 2011, 03:38:45 AM
 #8

What constitutes "complexity?"

1. transactions with lots of inputs (transaction record takes lots of bytes, example, you received a hundred bit pennies from mining in separate transactions and are spending them all at once)

2. transactions with a non-standard script.  All normal transactions come with a script, which is the instructions to the "next guy" for unlocking the coins in the future - the script calls for a matching public key and signature for the address you just sent to.  But all sorts of other things are possible - like sending coins that require two, or three, or any two out of three, or other odd combinations of addresses.  These would be complex transactions.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper wallets instead.
Enochian
Full Member
***
Offline Offline

Activity: 126


View Profile
May 09, 2011, 08:57:11 AM
 #9

2. transactions with a non-standard script.

I noticed in the code that scripts are now restricted to two standard templates, one in which the sender supplies the public key and the receiver supplies the sig, and one in which the sender provides an address, and the receiver supplies a sig and public key.

It appears to me that you can't use a non-standard script unless you also create the block the transaction goes in.

Is this understanding correct?

ribuck
Donator
Legendary
*
Offline Offline

Activity: 826


View Profile
May 09, 2011, 09:56:10 AM
 #10

It appears to me that you can't use a non-standard script unless you also create the block the transaction goes in.

The Eligius pool will put non-standard transactions into its blocks for a small fee. You also need to run a modified Bitcoin client to generate those non-standard transactions.
Pages: [1]
  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!