Bitcoin Forum
May 22, 2024, 06:13:54 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Transactions that never complete  (Read 872 times)
optimator (OP)
Sr. Member
****
Offline Offline

Activity: 351
Merit: 250



View Profile WWW
September 07, 2012, 06:02:23 PM
 #1

I was looking at the bitcoinj lite client and it says

Quote
Note that currently BitCoinJ does not support setting transaction fees. It always generates free transactions. This means it's possible to create transactions that will take a long time to confirm or may never confirm. Don't use BitCoinJ for moving large amounts of value around on the production network.

What does "or may never confirm" mean? - aside from the obvious. Are these coins lost? Can the transaction be recovered? Has this ever happened?

etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
September 07, 2012, 06:41:10 PM
Last edit: September 09, 2012, 01:47:40 PM by etotheipi
 #2

The coins aren't lost, but they can be "stuck".  Your client declares the coins spent, but the network doesn't ever include it in the blockchain.  By default, you can't send the coins elsewhere, because the client doesn't believe you own them anymore.   However, if you clear your client's memory pool,  or can import your wallet into another program, you can try re-sending with a higher fee.  Once that new transaction makes it into the blockchain, then your client will see that and invalidate the old transaction.

Also, I have no intention to bash bitcoinj, but I'm curious why the fees aren't implemented yet..?  The way I did it in Armory is very simple and seems to work very reliably.  It's also very close to what the network expects (ignoring block-fill considerations).  Here's the relevant code in Armory.

In order for a transaction to be free, three conditions must be met:

--Transaction is less than 3.5 kB (approx)
--Transaction does not have any dust outputs (<0.01 BTC)
--Transaction inputs have priority-sum greater than 1 bitcoin-day-per-250-bytes

If the transaction cannot be free, then use the folllowing fee:
--If transaction is less than 3.5 kB, use fee 0.0005 BTC
--Otherwise, use (0.0005 * roundup(numkB))

There are more fees required to get it into the next block, if there's already a lot of transactions being included in the next block.  But this fee will always get it included in one of the next blocks.  So far, I haven't experienced any users (or myself) getting coins stuck in Armory.  


Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
chrisrico
Hero Member
*****
Offline Offline

Activity: 496
Merit: 500


View Profile
September 07, 2012, 08:44:54 PM
 #3

Also, I have no intention to bash bitcoinj, but I'm curious why the fees aren't implemented yet..?  The way I did it in Armory is very simple and seems to work very reliably.

I think it was due to discussion on the best way to implement fees. From what I've read, Mike just checked in those changes and setting of fees will be part of the API as of version 0.6 (the next release).
optimator (OP)
Sr. Member
****
Offline Offline

Activity: 351
Merit: 250



View Profile WWW
September 08, 2012, 01:52:59 AM
 #4

I'm sure I'm messing up some terminology.... but, I thought currently bitcoind wasn't taking fees into consideration when publishing a block?? (I know it creates fees when sending)

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!