Bitcoin Forum
December 04, 2016, 02:01:08 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Displaying coinbase transactions and their status in a UI  (Read 1422 times)
jim618
Legendary
*
Offline Offline

Activity: 1708



View Profile WWW
June 05, 2012, 08:00:27 PM
 #1

Coming soon in the bitcoinj codebase is the '120 block maturation' for coinbase transactions. Previously each of the bitcoinj clients rolled their own coinbase solutions.

I was wondering how other clients and mining software depict these transactions as they mature and become available to spend. For MultiBit I would like to reuse the common UI vernacular if possible.

Presumably in the wallet balance you consider them 'unavailable to spend' for 119 blocks and then 'available to spend' at 120 but how are you depicting it ?

(I think in the Bitcoin protocol the unavailable to spend depth is actually 100 blocks but we have copied the Satoshi client 120 blocks).

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
1480816868
Hero Member
*
Offline Offline

Posts: 1480816868

View Profile Personal Message (Offline)

Ignore
1480816868
Reply with quote  #2

1480816868
Report to moderator
1480816868
Hero Member
*
Offline Offline

Posts: 1480816868

View Profile Personal Message (Offline)

Ignore
1480816868
Reply with quote  #2

1480816868
Report to moderator
1480816868
Hero Member
*
Offline Offline

Posts: 1480816868

View Profile Personal Message (Offline)

Ignore
1480816868
Reply with quote  #2

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

Activity: 1246


Strength in numbers


View Profile WWW
June 05, 2012, 08:16:48 PM
 #2

I never heard an explanation of the 100/120 difference.

Play Bitcoin Poker at sealswithclubs.eu. We're active and open to everyone.
blueadept
Full Member
***
Offline Offline

Activity: 225


View Profile
June 05, 2012, 10:30:17 PM
 #3

I believe 100 is enforced in the transaction and block verification code to prevent the client from forwarding transactions with coinbase inputs under 100 blocks old. 120 is used as a limit in the wallet code, to be on the safe side and prevent you from spending a coinbase transaction for at least 120 blocks.

Like my posts?  Connect with me on LinkedIn and endorse my "Bitcoin" skill.
Decentralized, instant off-chain payments.
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
June 06, 2012, 05:36:15 PM
 #4

RE: the 100/120 difference:

Check my work, but I think this is the scenario where it would matter and cause headaches:

You generate a block 100 blocks before a difficulty adjustment.

Then you spend the coinbase exactly 100 blocks later, in a block in the next difficulty period. And, let's say, whoever you send the bitcoins to spends that transaction again immediately.

Now imagine a really wacky scenario where you're reorganized onto a shorter-but-has-more-difficulty block chain.  That could happen if you were disconnected from the main bitcoin network for a while.

Your coinbase-spend transaction and any transactions that depend on it can't be included in the main chain because they're immature, so they get dropped from everybody's memory pool as "trying to spend an immature coinbase."  I'm not sure what then happens; I think you'd eventually retransmit them and get them into the main chain, but that could take a while.

How often do you get the chance to work on a potentially world-changing project?
DeepBit
Donator
Hero Member
*
Offline Offline

Activity: 532


We have cookies


View Profile WWW
June 09, 2012, 04:10:57 PM
 #5

Your coinbase-spend transaction and any transactions that depend on it can't be included in the main chain because they're immature, so they get dropped from everybody's memory pool as "trying to spend an immature coinbase."  I'm not sure what then happens; I think you'd eventually retransmit them and get them into the main chain, but that could take a while.
I think it will be finally included a bit later.
Once I tried spending coinbase at 99-100 confirmations and the problem solved itself without any intervention.

Welcome to my bitcoin mining pool: https://deepbit.net ~ 3600 GH/s, Both payment schemes, instant payout, no invalid blocks !
Coming soon: ICBIT Trading platform
Jan
Legendary
*
Offline Offline

Activity: 1042



View Profile
October 24, 2012, 07:57:54 AM
 #6

Coming soon in the bitcoinj codebase is the '120 block maturation' for coinbase transactions. Previously each of the bitcoinj clients rolled their own coinbase solutions.

I was wondering how other clients and mining software depict these transactions as they mature and become available to spend. For MultiBit I would like to reuse the common UI vernacular if possible.

Presumably in the wallet balance you consider them 'unavailable to spend' for 119 blocks and then 'available to spend' at 120 but how are you depicting it ?

(I think in the Bitcoin protocol the unavailable to spend depth is actually 100 blocks but we have copied the Satoshi client 120 blocks).

Having never mined a block I have no idea how bitcoin-qt depicts an immature coinbase transaction, but I would be interested in knowing how it handles it.
Does it count it against your total balance before it matures?
How does it display it in the transaction history?

@Deepbit: You happen to mine a lot, can you post a screenshot?

Mycelium let's you hold your private keys private.
wabber
Member
**
Offline Offline

Activity: 85


View Profile
October 24, 2012, 01:54:42 PM
 #7

Having never mined a block I have no idea how bitcoin-qt depicts an immature coinbase transaction, but I would be interested in knowing how it handles it.
Does it count it against your total balance before it matures?
How does it display it in the transaction history?

@Deepbit: You happen to mine a lot, can you post a screenshot?

Use the testnet, you can mine plenty of blocks there and see for yourself.
Jan
Legendary
*
Offline Offline

Activity: 1042



View Profile
October 24, 2012, 02:15:55 PM
 #8

Having never mined a block I have no idea how bitcoin-qt depicts an immature coinbase transaction, but I would be interested in knowing how it handles it.
Does it count it against your total balance before it matures?
How does it display it in the transaction history?

@Deepbit: You happen to mine a lot, can you post a screenshot?

Use the testnet, you can mine plenty of blocks there and see for yourself.
Why didn't I think of that? Grin

Mycelium let's you hold your private keys private.
DeepBit
Donator
Hero Member
*
Offline Offline

Activity: 532


We have cookies


View Profile WWW
October 28, 2012, 09:56:09 AM
 #9

@Deepbit: You happen to mine a lot, can you post a screenshot?
Sorry, I don't have a screenshot, but I think everyone will believe me that almost 30 000 blocks were found under my supervision, so I had many opportunities to play with them.

Welcome to my bitcoin mining pool: https://deepbit.net ~ 3600 GH/s, Both payment schemes, instant payout, no invalid blocks !
Coming soon: ICBIT Trading platform
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428


Core Armory Developer


View Profile WWW
October 28, 2012, 02:16:14 PM
 #10

I put coinbase transactions in Armory recently.  I didn't think it would ever matter, because there'd be so few people ever mining blocks directly... then P2Pool came along...

Feel free to plagiarize my pickaxe icon Smiley




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!)
jim618
Legendary
*
Offline Offline

Activity: 1708



View Profile WWW
October 28, 2012, 05:38:14 PM
 #11

I like it !

I presume you show the pickaxe icon for the whole 120 confirmations and then it changes to whatever you use for confirmed (Satoshi: a green tick).

Not really much point in trying to show 20/120, 40/120, 60/120 confirmations etc.

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428


Core Armory Developer


View Profile WWW
October 28, 2012, 05:58:19 PM
 #12

I like it !

I presume you show the pickaxe icon for the whole 120 confirmations and then it changes to whatever you use for confirmed (Satoshi: a green tick).

Not really much point in trying to show 20/120, 40/120, 60/120 confirmations etc.

Well, the pickaxe is always shown, but the little checkboxes on the left are handled differently.  Usually it shows a partially-full bucket with the number of confirmations up to 5 (like on the screenshot on the main page) and then just shows a checkmark.  For coinbase, I decided to just map the 6 bucket levels to 0/120, 20/120, etc, but not actually show the number except in the mouseover text.  Then it changes to the same as others once it hits 120 (as you can see for the coinbase on the bottom of the ledger).

It's one of those millions of polishing things that is useful for so few users, but worth doing it eventually.


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!)
jim618
Legendary
*
Offline Offline

Activity: 1708



View Profile WWW
October 28, 2012, 06:12:21 PM
 #13

Having a separate icon for the transaction type and the status is probably better than what I have in MultiBit - just the one.

I will probably just use a pickaxe and then put the confirmation count in the tooltip to keep it simple.

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
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!