Author

Topic: Displaying coinbase transactions and their status in a UI (Read 1621 times)

legendary
Activity: 1708
Merit: 1066
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.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
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.

legendary
Activity: 1708
Merit: 1066
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.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
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



donator
Activity: 532
Merit: 501
We have cookies
@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.
Jan
legendary
Activity: 1043
Merit: 1002
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
member
Activity: 85
Merit: 10
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
Activity: 1043
Merit: 1002
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?
donator
Activity: 532
Merit: 501
We have cookies
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.
legendary
Activity: 1652
Merit: 2301
Chief Scientist
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.
full member
Activity: 225
Merit: 101
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.
legendary
Activity: 1246
Merit: 1016
Strength in numbers
I never heard an explanation of the 100/120 difference.
legendary
Activity: 1708
Merit: 1066
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).
Jump to: